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.2M|void janet_buffer_extra(JanetBuffer *buffer, int32_t n) {
 3194|       |    /* Check for buffer overflow */
 3195|  80.2M|    if ((int64_t)n + buffer->count > INT32_MAX) {
  ------------------
  |  Branch (3195:9): [True: 0, False: 80.2M]
  ------------------
 3196|      0|        janet_panic("buffer overflow");
 3197|      0|    }
 3198|  80.2M|    int32_t new_size = buffer->count + n;
 3199|  80.2M|    if (new_size > buffer->capacity) {
  ------------------
  |  Branch (3199:9): [True: 5.56M, False: 74.6M]
  ------------------
 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.2M|}
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.18M]
  ------------------
 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|   659k|            case JINT_0:
  ------------------
  |  Branch (4209:13): [True: 659k, False: 111M]
  ------------------
 4210|   659k|                continue;
 4211|  21.6M|            case JINT_S: {
  ------------------
  |  Branch (4211:13): [True: 21.6M, False: 90.8M]
  ------------------
 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.53M, False: 109M]
  ------------------
 4216|  2.53M|            case JINT_SU:
  ------------------
  |  Branch (4216:13): [True: 0, False: 112M]
  ------------------
 4217|  2.53M|            case JINT_ST: {
  ------------------
  |  Branch (4217:13): [True: 0, False: 112M]
  ------------------
 4218|  2.53M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (4218:21): [True: 0, False: 2.53M]
  ------------------
 4219|  2.53M|                continue;
 4220|  2.53M|            }
 4221|  5.13M|            case JINT_L: {
  ------------------
  |  Branch (4221:13): [True: 5.13M, False: 107M]
  ------------------
 4222|  5.13M|                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.13M|                continue;
 4225|  5.13M|            }
 4226|  30.5M|            case JINT_SS: {
  ------------------
  |  Branch (4226:13): [True: 30.5M, False: 81.9M]
  ------------------
 4227|  30.5M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (4227:21): [True: 18.4E, False: 30.5M]
  ------------------
 4228|  30.5M|                        (int32_t)(instr >> 16) >= sc) return 4;
  ------------------
  |  Branch (4228:25): [True: 18.4E, False: 30.5M]
  ------------------
 4229|  30.5M|                continue;
 4230|  30.5M|            }
 4231|  30.5M|            case JINT_SSI:
  ------------------
  |  Branch (4231:13): [True: 1.92M, False: 110M]
  ------------------
 4232|  3.09M|            case JINT_SSU: {
  ------------------
  |  Branch (4232:13): [True: 1.17M, False: 111M]
  ------------------
 4233|  3.09M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (4233:21): [True: 719, 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.09M|                continue;
 4236|  3.09M|            }
 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: 45, 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.3M]
  ------------------
 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: 107M]
  ------------------
 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.18M|    {
 4275|  4.18M|        uint32_t lastop = def->bytecode[def->bytecode_length - 1] & 0xFF;
 4276|  4.18M|        switch (lastop) {
 4277|      0|            default:
  ------------------
  |  Branch (4277:13): [True: 0, False: 4.18M]
  ------------------
 4278|      0|                return 9;
 4279|  2.45M|            case JOP_RETURN:
  ------------------
  |  Branch (4279:13): [True: 2.45M, False: 1.72M]
  ------------------
 4280|  2.82M|            case JOP_RETURN_NIL:
  ------------------
  |  Branch (4280:13): [True: 367k, False: 3.81M]
  ------------------
 4281|  2.82M|            case JOP_JUMP:
  ------------------
  |  Branch (4281:13): [True: 0, False: 4.18M]
  ------------------
 4282|  2.83M|            case JOP_ERROR:
  ------------------
  |  Branch (4282:13): [True: 7.50k, False: 4.17M]
  ------------------
 4283|  4.12M|            case JOP_TAILCALL:
  ------------------
  |  Branch (4283:13): [True: 1.29M, False: 2.89M]
  ------------------
 4284|  4.12M|                break;
 4285|  4.18M|        }
 4286|  4.18M|    }
 4287|       |
 4288|       |    /* Verify debug info - slotmapping, etc. */
 4289|  45.8M|    for (int32_t i = def->symbolmap_length - 1; i >= 0; i--) {
  ------------------
  |  Branch (4289:49): [True: 41.7M, False: 4.11M]
  ------------------
 4290|  41.7M|        JanetSymbolMap jsm = def->symbolmap[i];
 4291|  41.7M|        if (jsm.birth_pc == UINT32_MAX) {
  ------------------
  |  Branch (4291:13): [True: 19.6M, False: 22.0M]
  ------------------
 4292|  19.6M|            if (jsm.death_pc >= (uint32_t) def->environments_length) {
  ------------------
  |  Branch (4292:17): [True: 0, False: 19.6M]
  ------------------
 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.11M|    return 0;
 4313|  4.11M|}
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.3k, 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: 374k]
  ------------------
 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: 569, False: 79.2M]
  ------------------
14692|    569|        janet_fiber_grow(fiber, newtop);
14693|    569|    }
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: 81, False: 12.5k]
  ------------------
14846|     81|        JanetFiberStatus s = janet_fiber_status(env->as.fiber);
14847|     81|        int isFinished = s == JANET_STATUS_DEAD ||
  ------------------
  |  Branch (14847:26): [True: 0, False: 81]
  ------------------
14848|     81|                         s == JANET_STATUS_ERROR ||
  ------------------
  |  Branch (14848:26): [True: 0, False: 81]
  ------------------
14849|     81|                         s == JANET_STATUS_USER0 ||
  ------------------
  |  Branch (14849:26): [True: 0, False: 81]
  ------------------
14850|     81|                         s == JANET_STATUS_USER1 ||
  ------------------
  |  Branch (14850:26): [True: 0, False: 81]
  ------------------
14851|     81|                         s == JANET_STATUS_USER2 ||
  ------------------
  |  Branch (14851:26): [True: 0, False: 81]
  ------------------
14852|     81|                         s == JANET_STATUS_USER3 ||
  ------------------
  |  Branch (14852:26): [True: 0, False: 81]
  ------------------
14853|     81|                         s == JANET_STATUS_USER4;
  ------------------
  |  Branch (14853:26): [True: 0, False: 81]
  ------------------
14854|     81|        if (isFinished) {
  ------------------
  |  Branch (14854:13): [True: 0, False: 81]
  ------------------
14855|      0|            janet_env_detach(env);
14856|      0|        }
14857|     81|    }
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: 317, False: 41.4M]
  ------------------
14873|    317|        janet_fiber_setcapacity(fiber, 2 * nextstacktop);
14874|       |#ifdef JANET_DEBUG
14875|       |    } else {
14876|       |        janet_fiber_refresh_memory(fiber);
14877|       |#endif
14878|    317|    }
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.4k|            case JANET_ABSTRACT:
  ------------------
  |  Branch (16284:13): [True: 18.4k, False: 208M]
  ------------------
16285|  18.4k|                janet_mark_abstract(janet_unwrap_abstract(x));
  ------------------
  |  |  861|  18.4k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
16286|  18.4k|                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|    janet_mark_fiber(janet_vm.root_fiber);
16791|  6.08k|    for (i = 0; i < orig_rootcount; i++)
  ------------------
  |  Branch (16791:17): [True: 4.86k, False: 1.21k]
  ------------------
16792|  4.86k|        janet_mark(janet_vm.roots[i]);
16793|  1.21k|    while (orig_rootcount < janet_vm.root_count) {
  ------------------
  |  Branch (16793:12): [True: 0, False: 1.21k]
  ------------------
16794|      0|        Janet x = janet_vm.roots[--janet_vm.root_count];
16795|      0|        janet_mark(x);
16796|      0|    }
16797|  1.21k|    janet_vm.gc_mark_phase = 0;
16798|  1.21k|    janet_sweep();
16799|  1.21k|    janet_vm.next_collection = 0;
16800|  1.21k|    janet_free_all_scratch();
16801|  1.21k|}
janet_gcroot:
16806|  30.2k|void janet_gcroot(Janet root) {
16807|  30.2k|    size_t newcount = janet_vm.root_count + 1;
16808|  30.2k|    if (newcount > janet_vm.root_capacity) {
  ------------------
  |  Branch (16808:9): [True: 14.8k, False: 15.3k]
  ------------------
16809|  14.8k|        size_t newcap = 2 * newcount;
16810|  14.8k|        janet_vm.roots = janet_realloc(janet_vm.roots, sizeof(Janet) * newcap);
  ------------------
  |  | 2396|  14.8k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
16811|  14.8k|        if (NULL == janet_vm.roots) {
  ------------------
  |  Branch (16811:13): [True: 0, False: 14.8k]
  ------------------
16812|      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]
  |  |  ------------------
  ------------------
16813|      0|        }
16814|  14.8k|        janet_vm.root_capacity = newcap;
16815|  14.8k|    }
16816|  30.2k|    janet_vm.roots[janet_vm.root_count] = root;
16817|  30.2k|    janet_vm.root_count = newcount;
16818|  30.2k|}
janet_gcunroot:
16837|  14.4k|int janet_gcunroot(Janet root) {
16838|  14.4k|    Janet *vtop = janet_vm.roots + janet_vm.root_count;
16839|       |    /* Search from top to bottom as access is most likely LIFO */
16840|  50.8k|    for (Janet *v = janet_vm.roots; v < vtop; v++) {
  ------------------
  |  Branch (16840:37): [True: 50.8k, False: 0]
  ------------------
16841|  50.8k|        if (janet_gc_idequals(root, *v)) {
  ------------------
  |  Branch (16841:13): [True: 14.4k, False: 36.3k]
  ------------------
16842|  14.4k|            *v = janet_vm.roots[--janet_vm.root_count];
16843|  14.4k|            return 1;
16844|  14.4k|        }
16845|  50.8k|    }
16846|      0|    return 0;
16847|  14.4k|}
janet_clear_memory:
16865|  7.65k|void janet_clear_memory(void) {
16866|  7.65k|#ifdef JANET_EV
16867|  7.65k|    JanetKV *items = janet_vm.threaded_abstracts.data;
16868|  15.3k|    for (int32_t i = 0; i < janet_vm.threaded_abstracts.capacity; i++) {
  ------------------
  |  Branch (16868:25): [True: 7.72k, False: 7.65k]
  ------------------
16869|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16870|     32|            void *abst = janet_unwrap_abstract(items[i].key);
  ------------------
  |  |  861|     32|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
16871|     32|            JanetAbstractHead *head = janet_abstract_head(abst);
  ------------------
  |  | 1887|     32|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
16872|     32|            if (head->type->gcperthread) {
  ------------------
  |  Branch (16872:17): [True: 0, False: 32]
  ------------------
16873|      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]
  |  |  ------------------
  ------------------
16874|      0|            }
16875|     32|            janet_abstract_decref_maybe_free(abst);
16876|     32|        }
16877|  7.72k|    }
16878|  7.65k|#endif
16879|  7.65k|    JanetGCObject *current = janet_vm.blocks;
16880|   122M|    while (NULL != current) {
  ------------------
  |  Branch (16880:12): [True: 122M, False: 7.65k]
  ------------------
16881|   122M|        janet_deinit_block(current);
16882|   122M|        JanetGCObject *next = current->data.next;
16883|   122M|        janet_free(current);
  ------------------
  |  | 2402|   122M|#define janet_free(X) free((X))
  ------------------
16884|   122M|        current = next;
16885|   122M|    }
16886|  7.65k|    janet_vm.blocks = NULL;
16887|  7.65k|    janet_free_all_scratch();
16888|  7.65k|    janet_free(janet_vm.scratch_mem);
  ------------------
  |  | 2402|  7.65k|#define janet_free(X) free((X))
  ------------------
16889|  7.65k|}
janet_gclock:
16892|   151k|int janet_gclock(void) {
16893|   151k|    return janet_vm.gc_suspend++;
16894|   151k|}
janet_gcunlock:
16895|   151k|void janet_gcunlock(int handle) {
16896|   151k|    janet_vm.gc_suspend = handle;
16897|   151k|}
janet_smalloc:
16903|  3.13M|void *janet_smalloc(size_t size) {
16904|  3.13M|    JanetScratch *s = janet_malloc(sizeof(JanetScratch) + size);
  ------------------
  |  | 2393|  3.13M|#define janet_malloc(X) malloc((X))
  ------------------
16905|  3.13M|    if (NULL == s) {
  ------------------
  |  Branch (16905:9): [True: 0, False: 3.13M]
  ------------------
16906|      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]
  |  |  ------------------
  ------------------
16907|      0|    }
16908|  3.13M|    s->finalize = NULL;
16909|  3.13M|    if (janet_vm.scratch_len == janet_vm.scratch_cap) {
  ------------------
  |  Branch (16909:9): [True: 19.5k, False: 3.11M]
  ------------------
16910|  19.5k|        size_t newcap = 2 * janet_vm.scratch_cap + 2;
16911|  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))
  ------------------
16912|  19.5k|        if (NULL == newmem) {
  ------------------
  |  Branch (16912:13): [True: 0, False: 19.5k]
  ------------------
16913|      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]
  |  |  ------------------
  ------------------
16914|      0|        }
16915|  19.5k|        janet_vm.scratch_cap = newcap;
16916|  19.5k|        janet_vm.scratch_mem = newmem;
16917|  19.5k|    }
16918|  3.13M|    janet_vm.scratch_mem[janet_vm.scratch_len++] = s;
16919|  3.13M|    return (char *)(s->mem);
16920|  3.13M|}
janet_srealloc:
16932|  5.51M|void *janet_srealloc(void *mem, size_t size) {
16933|  5.51M|    if (NULL == mem) return janet_smalloc(size);
  ------------------
  |  Branch (16933:9): [True: 2.37M, False: 3.14M]
  ------------------
16934|  3.14M|    JanetScratch *s = janet_mem2scratch(mem);
16935|  3.14M|    if (janet_vm.scratch_len) {
  ------------------
  |  Branch (16935:9): [True: 3.14M, False: 18.4E]
  ------------------
16936|  5.54M|        for (size_t i = janet_vm.scratch_len - 1; ; i--) {
16937|  5.54M|            if (janet_vm.scratch_mem[i] == s) {
  ------------------
  |  Branch (16937:17): [True: 3.14M, False: 2.39M]
  ------------------
16938|  3.14M|                JanetScratch *news = janet_realloc(s, size + sizeof(JanetScratch));
  ------------------
  |  | 2396|  3.14M|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
16939|  3.14M|                if (NULL == news) {
  ------------------
  |  Branch (16939:21): [True: 0, False: 3.14M]
  ------------------
16940|      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]
  |  |  ------------------
  ------------------
16941|      0|                }
16942|  3.14M|                janet_vm.scratch_mem[i] = news;
16943|  3.14M|                return (char *)(news->mem);
16944|  3.14M|            }
16945|  2.39M|            if (i == 0) break;
  ------------------
  |  Branch (16945:17): [True: 0, False: 2.39M]
  ------------------
16946|  2.39M|        }
16947|  3.14M|    }
16948|  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]
  |  |  ------------------
  ------------------
16949|  18.4E|}
janet_sfree:
16956|  3.03M|void janet_sfree(void *mem) {
16957|  3.03M|    if (NULL == mem) return;
  ------------------
  |  Branch (16957:9): [True: 0, False: 3.03M]
  ------------------
16958|  3.03M|    JanetScratch *s = janet_mem2scratch(mem);
16959|  3.03M|    if (janet_vm.scratch_len) {
  ------------------
  |  Branch (16959:9): [True: 3.03M, False: 0]
  ------------------
16960|  5.04M|        for (size_t i = janet_vm.scratch_len - 1; ; i--) {
16961|  5.04M|            if (janet_vm.scratch_mem[i] == s) {
  ------------------
  |  Branch (16961:17): [True: 3.03M, False: 2.00M]
  ------------------
16962|  3.03M|                janet_vm.scratch_mem[i] = janet_vm.scratch_mem[--janet_vm.scratch_len];
16963|  3.03M|                free_one_scratch(s);
16964|  3.03M|                return;
16965|  3.03M|            }
16966|  2.00M|            if (i == 0) break;
  ------------------
  |  Branch (16966:17): [True: 0, False: 2.00M]
  ------------------
16967|  2.00M|        }
16968|  3.03M|    }
16969|  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]
  |  |  ------------------
  ------------------
16970|  18.4E|}
janet_unwrap_s64:
17091|  25.0k|int64_t janet_unwrap_s64(Janet x) {
17092|  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 (17092:13): [True: 9.99k, False: 15.0k]
  ------------------
17093|     68|        default:
  ------------------
  |  Branch (17093:9): [True: 68, False: 24.9k]
  ------------------
17094|     68|            break;
17095|  15.0k|        case JANET_NUMBER : {
  ------------------
  |  Branch (17095:9): [True: 15.0k, False: 9.99k]
  ------------------
17096|  15.0k|            double d = janet_unwrap_number(x);
  ------------------
  |  |  834|  15.0k|#define janet_unwrap_number(x) ((x).number)
  ------------------
17097|  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]
  |  |  ------------------
  ------------------
17098|  15.0k|            return (int64_t) d;
17099|  15.0k|        }
17100|     17|        case JANET_STRING: {
  ------------------
  |  Branch (17100:9): [True: 17, False: 25.0k]
  ------------------
17101|     17|            int64_t value;
17102|     17|            const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  858|     17|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
17103|     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 (17103:17): [True: 5, False: 12]
  ------------------
17104|      5|                return value;
17105|     12|            break;
17106|     17|        }
17107|  9.90k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (17107:9): [True: 9.90k, False: 15.1k]
  ------------------
17108|  9.90k|            void *abst = janet_unwrap_abstract(x);
  ------------------
  |  |  861|  9.90k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
17109|  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 (17109:17): [True: 9.88k, False: 16]
  ------------------
17110|     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 (17110:21): [True: 15, False: 1]
  ------------------
17111|  9.90k|                return *(int64_t *)abst;
17112|      1|            break;
17113|  9.90k|        }
17114|  25.0k|    }
17115|     83|    janet_panicf("can not convert %t %q to 64 bit signed integer", x, x);
17116|      0|    return 0;
17117|  25.0k|}
janet_unwrap_u64:
17119|  7.64k|uint64_t janet_unwrap_u64(Janet x) {
17120|  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 (17120:13): [True: 4.00k, False: 3.64k]
  ------------------
17121|     63|        default:
  ------------------
  |  Branch (17121:9): [True: 63, False: 7.58k]
  ------------------
17122|     63|            break;
17123|  3.64k|        case JANET_NUMBER : {
  ------------------
  |  Branch (17123:9): [True: 3.64k, False: 4.00k]
  ------------------
17124|  3.64k|            double d = janet_unwrap_number(x);
  ------------------
  |  |  834|  3.64k|#define janet_unwrap_number(x) ((x).number)
  ------------------
17125|  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]
  |  |  ------------------
  ------------------
17126|  3.63k|            return (uint64_t) d;
17127|  3.64k|        }
17128|     12|        case JANET_STRING: {
  ------------------
  |  Branch (17128:9): [True: 12, False: 7.63k]
  ------------------
17129|     12|            uint64_t value;
17130|     12|            const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  858|     12|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
17131|     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 (17131:17): [True: 5, False: 7]
  ------------------
17132|      5|                return value;
17133|      7|            break;
17134|     12|        }
17135|  3.92k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (17135:9): [True: 3.92k, False: 3.71k]
  ------------------
17136|  3.92k|            void *abst = janet_unwrap_abstract(x);
  ------------------
  |  |  861|  3.92k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
17137|  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 (17137:17): [True: 47, False: 3.88k]
  ------------------
17138|  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 (17138:21): [True: 3.88k, False: 1]
  ------------------
17139|  3.92k|                return *(uint64_t *)abst;
17140|      1|            break;
17141|  3.92k|        }
17142|  7.64k|    }
17143|     81|    janet_panicf("can not convert %t %q to a 64 bit unsigned integer", x, x);
17144|      0|    return 0;
17145|  7.64k|}
janet_is_int:
17147|      1|JanetIntType janet_is_int(Janet x) {
17148|      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 (17148:9): [True: 0, False: 1]
  ------------------
17149|      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)))
  |  |  ------------------
  ------------------
17150|      1|    return (at == &janet_s64_type) ? JANET_INT_S64 :
  ------------------
  |  Branch (17150:12): [True: 1, False: 0]
  ------------------
17151|      1|           ((at == &janet_u64_type) ? JANET_INT_U64 :
  ------------------
  |  Branch (17151:13): [True: 0, False: 0]
  ------------------
17152|      0|            JANET_INT_NONE);
17153|      1|}
janet_wrap_s64:
17155|  4.15k|Janet janet_wrap_s64(int64_t x) {
17156|  4.15k|    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
17157|  4.15k|    *box = (int64_t)x;
17158|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17159|  4.15k|}
janet_wrap_u64:
17161|  2.54k|Janet janet_wrap_u64(uint64_t x) {
17162|  2.54k|    uint64_t *box = janet_abstract(&janet_u64_type, sizeof(uint64_t));
17163|  2.54k|    *box = (uint64_t)x;
17164|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17165|  2.54k|}
cfun_it_s64_new:
17169|      5|              "Create a boxed signed 64 bit integer from a string value or a number.") {
17170|      5|    janet_fixarity(argc, 1);
17171|      5|    return janet_wrap_s64(janet_unwrap_s64(argv[0]));
17172|      5|}
cfun_it_u64_new:
17176|      2|              "Create a boxed unsigned 64 bit integer from a string value or a number.") {
17177|      2|    janet_fixarity(argc, 1);
17178|      2|    return janet_wrap_u64(janet_unwrap_u64(argv[0]));
17179|      2|}
cfun_to_bytes:
17220|      1|              "- `:be`: big-endian, most significant byte first\n") {
17221|      1|    janet_arity(argc, 1, 3);
17222|      1|    if (janet_is_int(argv[0]) == JANET_INT_NONE) {
  ------------------
  |  Branch (17222:9): [True: 0, False: 1]
  ------------------
17223|      0|        janet_panicf("int/to-bytes: expected an int/s64 or int/u64, got %q", argv[0]);
17224|      0|    }
17225|       |
17226|      1|    int reverse = 0;
17227|      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 (17227:9): [True: 0, False: 1]
  |  Branch (17227:21): [True: 0, False: 0]
  ------------------
17228|      0|        JanetKeyword endianness_kw = janet_getkeyword(argv, 1);
17229|      0|        if (!janet_cstrcmp(endianness_kw, "le")) {
  ------------------
  |  Branch (17229:13): [True: 0, False: 0]
  ------------------
17230|       |#if JANET_BIG_ENDIAN
17231|       |            reverse = 1;
17232|       |#endif
17233|      0|        } else if (!janet_cstrcmp(endianness_kw, "be")) {
  ------------------
  |  Branch (17233:20): [True: 0, False: 0]
  ------------------
17234|      0|#if JANET_LITTLE_ENDIAN
17235|      0|            reverse = 1;
17236|      0|#endif
17237|      0|        } else {
17238|      0|            janet_panicf("int/to-bytes: expected endianness :le, :be or nil, got %v", argv[1]);
17239|      0|        }
17240|      0|    }
17241|       |
17242|      1|    JanetBuffer *buffer = NULL;
17243|      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 (17243:9): [True: 0, False: 1]
  |  Branch (17243:21): [True: 0, False: 0]
  ------------------
17244|      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 (17244:13): [True: 0, False: 0]
  ------------------
17245|      0|            janet_panicf("int/to-bytes: expected buffer or nil, got %q", argv[2]);
17246|      0|        }
17247|       |
17248|      0|        buffer = janet_unwrap_buffer(argv[2]);
  ------------------
  |  |  857|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
17249|      0|        janet_buffer_extra(buffer, 8);
17250|      1|    } else {
17251|      1|        buffer = janet_buffer(8);
17252|      1|    }
17253|       |
17254|      1|    uint8_t *bytes = janet_unwrap_abstract(argv[0]);
  ------------------
  |  |  861|      1|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
17255|      1|    if (reverse) {
  ------------------
  |  Branch (17255:9): [True: 0, False: 1]
  ------------------
17256|      0|        for (int i = 0; i < 8; ++i) {
  ------------------
  |  Branch (17256:25): [True: 0, False: 0]
  ------------------
17257|      0|            buffer->data[buffer->count + 7 - i] = bytes[i];
17258|      0|        }
17259|      1|    } else {
17260|      1|        memcpy(buffer->data + buffer->count, bytes, 8);
17261|      1|    }
17262|      1|    buffer->count += 8;
17263|       |
17264|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17265|      1|}
janet_lib_inttypes:
17644|  7.16k|void janet_lib_inttypes(JanetTable *env) {
17645|  7.16k|    JanetRegExt it_cfuns[] = {
17646|  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_}
  |  |  ------------------
  ------------------
17647|  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_}
  |  |  ------------------
  ------------------
17648|  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_}
  |  |  ------------------
  ------------------
17649|  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_}
  |  |  ------------------
  ------------------
17650|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
17651|  7.16k|    };
17652|       |    janet_core_cfuns_ext(env, NULL, it_cfuns);
17653|  7.16k|    janet_register_abstract_type(&janet_s64_type);
17654|  7.16k|    janet_register_abstract_type(&janet_u64_type);
17655|  7.16k|}
cfun_io_temp:
17792|      3|              "Raises an error on failure.") {
17793|      3|    janet_sandbox_assert(JANET_SANDBOX_FS_TEMP);
  ------------------
  |  | 2023|      3|#define JANET_SANDBOX_FS_TEMP 1024
  ------------------
17794|      3|    (void)argv;
17795|      3|    janet_fixarity(argc, 0);
17796|       |    // XXX use mkostemp when we can to avoid CLOEXEC race.
17797|      3|    FILE *tmp = tmpfile();
17798|      3|    if (!tmp)
  ------------------
  |  Branch (17798:9): [True: 0, False: 3]
  ------------------
17799|      0|        janet_panicf("unable to create temporary file - %s", janet_strerror(errno));
17800|      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
  ------------------
17801|      3|}
cfun_io_fopen:
17817|     40|              "See fopen (<stdio.h>, C99) for further details.") {
17818|     40|    janet_arity(argc, 1, 3);
17819|     40|    const uint8_t *fname = janet_getstring(argv, 0);
17820|     40|    const uint8_t *fmode;
17821|     40|    int32_t flags;
17822|     40|    if (argc == 2) {
  ------------------
  |  Branch (17822:9): [True: 6, False: 34]
  ------------------
17823|      6|        fmode = janet_getkeyword(argv, 1);
17824|      6|        flags = checkflags(fmode);
17825|     34|    } else {
17826|     34|        fmode = (const uint8_t *)"r";
17827|     34|        janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2019|     34|#define JANET_SANDBOX_FS_READ 64
  ------------------
17828|     34|        flags = JANET_FILE_READ;
  ------------------
  |  | 2262|     34|#define JANET_FILE_READ 2
  ------------------
17829|     34|    }
17830|     40|    FILE *f = fopen((const char *)fname, (const char *)fmode);
17831|     40|    size_t bufsize = BUFSIZ;
17832|     40|    if (f != NULL) {
  ------------------
  |  Branch (17832:9): [True: 4, False: 36]
  ------------------
17833|      4|#if !(defined(JANET_WINDOWS) || defined(JANET_PLAN9))
17834|      4|        struct stat st;
17835|      4|        fstat(fileno(f), &st);
17836|      4|        if (S_ISDIR(st.st_mode)) {
  ------------------
  |  Branch (17836:13): [True: 1, False: 3]
  ------------------
17837|      1|            fclose(f);
17838|      1|            janet_panicf("cannot open directory: %s", fname);
17839|      1|        }
17840|      3|#endif
17841|      3|        bufsize = janet_optsize(argv, argc, 2, BUFSIZ);
17842|      3|        if (bufsize != BUFSIZ) {
  ------------------
  |  Branch (17842:13): [True: 0, False: 3]
  ------------------
17843|      0|            int result = setvbuf(f, NULL, bufsize ? _IOFBF : _IONBF, bufsize);
  ------------------
  |  Branch (17843:43): [True: 0, False: 0]
  ------------------
17844|      0|            if (result) {
  ------------------
  |  Branch (17844:17): [True: 0, False: 0]
  ------------------
17845|      0|                janet_panic("failed to set buffer size for file");
17846|      0|            }
17847|      0|        }
17848|      3|    }
17849|     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 (17849:12): [True: 2, False: 37]
  ------------------
17850|     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 (17850:14): [True: 0, False: 37]
  ------------------
17851|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17852|     39|}
cfun_io_fread:
17876|      2|              "* n (integer) - read up to n bytes from the file") {
17877|      2|    janet_arity(argc, 2, 3);
17878|      2|    JanetFile *iof = janet_getabstract(argv, 0, &janet_file_type);
17879|      2|    if (iof->flags & JANET_FILE_CLOSED) janet_panic("file is closed");
  ------------------
  |  | 2266|      2|#define JANET_FILE_CLOSED 32
  ------------------
  |  Branch (17879:9): [True: 0, False: 2]
  ------------------
17880|      2|    JanetBuffer *buffer;
17881|      2|    if (argc == 2) {
  ------------------
  |  Branch (17881:9): [True: 0, False: 2]
  ------------------
17882|      0|        buffer = janet_buffer(0);
17883|      2|    } else {
17884|      2|        buffer = janet_getbuffer(argv, 2);
17885|      2|    }
17886|      2|    int32_t bufstart = buffer->count;
17887|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17888|      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))
  ------------------
17889|      0|        if (!janet_cstrcmp(sym, "all")) {
  ------------------
  |  Branch (17889:13): [True: 0, False: 0]
  ------------------
17890|      0|            int32_t sizeBefore;
17891|      0|            do {
17892|      0|                sizeBefore = buffer->count;
17893|      0|                read_chunk(iof, buffer, 4096);
17894|      0|            } while (sizeBefore < buffer->count);
  ------------------
  |  Branch (17894:22): [True: 0, False: 0]
  ------------------
17895|       |            /* Never return nil for :all */
17896|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17897|      0|        } else if (!janet_cstrcmp(sym, "line")) {
  ------------------
  |  Branch (17897:20): [True: 0, False: 0]
  ------------------
17898|      0|            for (;;) {
17899|      0|                int x = fgetc(iof->file);
17900|      0|                if (x != EOF) janet_buffer_push_u8(buffer, (uint8_t)x);
  ------------------
  |  Branch (17900:21): [True: 0, False: 0]
  ------------------
17901|      0|                if (x == EOF || x == '\n') break;
  ------------------
  |  Branch (17901:21): [True: 0, False: 0]
  |  Branch (17901:33): [True: 0, False: 0]
  ------------------
17902|      0|            }
17903|      0|        } else {
17904|      0|            janet_panicf("expected one of :all, :line, got %v", argv[1]);
17905|      0|        }
17906|      2|    } else {
17907|      2|        int32_t len = janet_getinteger(argv, 1);
17908|      2|        if (len < 0) janet_panic("expected positive integer");
  ------------------
  |  Branch (17908:13): [True: 0, False: 2]
  ------------------
17909|      2|        read_chunk(iof, buffer, len);
17910|      2|    }
17911|      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 (17911:9): [True: 0, False: 2]
  ------------------
17912|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17913|      2|}
janet_file_close:
17966|  22.5k|int janet_file_close(JanetFile *file) {
17967|  22.5k|    int ret = 0;
17968|  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 (17968:9): [True: 3, False: 22.5k]
  ------------------
17969|      3|        ret = fclose(file->file);
17970|      3|        file->flags |= JANET_FILE_CLOSED;
  ------------------
  |  | 2266|      3|#define JANET_FILE_CLOSED 32
  ------------------
17971|      3|        file->file = NULL; /* NULL dereference is easier to debug then other problems */
17972|      3|        return ret;
17973|      3|    }
17974|  22.5k|    return 0;
17975|  22.5k|}
cfun_io_fseek:
18014|      2|              "number to handle large files of more than 4GB. Returns the file handle.") {
18015|      2|    janet_arity(argc, 2, 3);
18016|      2|    JanetFile *iof = janet_getabstract(argv, 0, &janet_file_type);
18017|      2|    if (iof->flags & JANET_FILE_CLOSED)
  ------------------
  |  | 2266|      2|#define JANET_FILE_CLOSED 32
  ------------------
  |  Branch (18017:9): [True: 0, False: 2]
  ------------------
18018|      0|        janet_panic("file is closed");
18019|      2|    int64_t offset = 0;
18020|      2|    int whence = SEEK_CUR;
18021|      2|    if (argc >= 2) {
  ------------------
  |  Branch (18021:9): [True: 0, False: 2]
  ------------------
18022|      0|        const uint8_t *whence_sym = janet_getkeyword(argv, 1);
18023|      0|        if (!janet_cstrcmp(whence_sym, "cur")) {
  ------------------
  |  Branch (18023:13): [True: 0, False: 0]
  ------------------
18024|      0|            whence = SEEK_CUR;
18025|      0|        } else if (!janet_cstrcmp(whence_sym, "set")) {
  ------------------
  |  Branch (18025:20): [True: 0, False: 0]
  ------------------
18026|      0|            whence = SEEK_SET;
18027|      0|        } else if (!janet_cstrcmp(whence_sym, "end")) {
  ------------------
  |  Branch (18027:20): [True: 0, False: 0]
  ------------------
18028|      0|            whence = SEEK_END;
18029|      0|        } else {
18030|      0|            janet_panicf("expected one of :cur, :set, :end, got %v", argv[1]);
18031|      0|        }
18032|      0|        if (argc == 3) {
  ------------------
  |  Branch (18032:13): [True: 0, False: 0]
  ------------------
18033|      0|            offset = (int64_t) janet_getinteger64(argv, 2);
18034|      0|        }
18035|      0|    }
18036|      2|    if (fseek(iof->file, offset, whence)) janet_panic("error seeking file");
  ------------------
  |  Branch (18036:9): [True: 0, False: 2]
  ------------------
18037|      2|    return argv[0];
18038|      2|}
janet_dynfile:
18138|   204k|FILE *janet_dynfile(const char *name, FILE *def) {
18139|   204k|    Janet x = janet_dyn(name);
18140|   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 (18140:9): [True: 204k, False: 0]
  ------------------
18141|      0|    void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18142|      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 (18142:9): [True: 0, False: 0]
  ------------------
18143|      0|    JanetFile *iofile = abstract;
18144|      0|    return iofile->file;
18145|      0|}
cfun_io_print:
18228|  1.71k|              "a buffer. Returns nil.") {
18229|       |    return cfun_io_print_impl(argc, argv, 1, "out", stdout);
18230|  1.71k|}
cfun_io_prin:
18234|     17|              "Same as `print`, but does not add trailing newline.") {
18235|       |    return cfun_io_print_impl(argc, argv, 0, "out", stdout);
18236|     17|}
cfun_io_eprin:
18246|      6|              "Same as `prin`, but uses `(dyn :err stderr)` instead of `(dyn :out stdout)`.") {
18247|       |    return cfun_io_print_impl(argc, argv, 0, "err", stderr);
18248|      6|}
cfun_io_xprint:
18254|      2|              "to is the first argument, and is otherwise the same as `print`. Returns nil.") {
18255|      2|    janet_arity(argc, 1, -1);
18256|       |    return cfun_io_print_impl_x(argc, argv, 1, NULL, 1, argv[0]);
18257|      2|}
cfun_io_xprin:
18262|     23|              "to is the first argument, and is otherwise the same as `prin`. Returns nil.") {
18263|     23|    janet_arity(argc, 1, -1);
18264|       |    return cfun_io_print_impl_x(argc, argv, 0, NULL, 1, argv[0]);
18265|     23|}
cfun_io_printf:
18334|      2|              "Prints output formatted as if with `(string/format fmt ;xs)` to `(dyn :out stdout)` with a trailing newline.") {
18335|       |    return cfun_io_printf_impl(argc, argv, 1, "out", stdout);
18336|      2|}
cfun_io_prinf:
18340|     14|              "Like `printf` but with no trailing newline.") {
18341|       |    return cfun_io_printf_impl(argc, argv, 0, "out", stdout);
18342|     14|}
cfun_io_eprinf:
18352|    159|              "Like `eprintf` but with no trailing newline.") {
18353|       |    return cfun_io_printf_impl(argc, argv, 0, "err", stderr);
18354|    159|}
cfun_io_xprinf:
18365|      3|              "Like `prinf` but prints to an explicit file or value `to`. Returns nil.") {
18366|      3|    janet_arity(argc, 2, -1);
18367|       |    return cfun_io_printf_impl_x(argc, argv, 0, NULL, 1, argv[0]);
18368|      3|}
cfun_io_flush:
18390|      3|              "Flush `(dyn :out stdout)` if it is a file, otherwise do nothing.") {
18391|      3|    janet_fixarity(argc, 0);
18392|      3|    (void) argv;
18393|      3|    janet_flusher("out", stdout);
18394|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18395|      3|}
janet_dynprintf:
18406|   177k|void janet_dynprintf(const char *name, FILE *dflt_file, const char *format, ...) {
18407|   177k|    va_list args;
18408|   177k|    va_start(args, format);
18409|   177k|    JanetType xtype;
18410|   177k|    Janet x;
18411|   177k|    if (!name || name[0] == '\0') { /* Allow NULL or empty string to just use dflt_file directly */
  ------------------
  |  Branch (18411:9): [True: 0, False: 177k]
  |  Branch (18411:18): [True: 0, False: 177k]
  ------------------
18412|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18413|      0|        xtype = JANET_NIL;
18414|   177k|    } else {
18415|   177k|        x = janet_dyn(name);
18416|   177k|        xtype = janet_type(x);
  ------------------
  |  |  790|   177k|    (isnan((x).number) \
  |  |  791|   177k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   177k|        : JANET_NUMBER)
  ------------------
  |  Branch (18416:17): [True: 177k, False: 0]
  ------------------
18417|   177k|    }
18418|   177k|    switch (xtype) {
18419|      0|        default:
  ------------------
  |  Branch (18419:9): [True: 0, False: 177k]
  ------------------
18420|       |            /* Other values simply do nothing */
18421|      0|            break;
18422|   177k|        case JANET_NIL:
  ------------------
  |  Branch (18422:9): [True: 177k, False: 0]
  ------------------
18423|   177k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (18423:9): [True: 0, False: 177k]
  ------------------
18424|   177k|            FILE *f = dflt_file;
18425|   177k|            JanetBuffer buffer;
18426|   177k|            int32_t len = 0;
18427|  1.41M|            while (format[len]) len++;
  ------------------
  |  Branch (18427:20): [True: 1.23M, False: 177k]
  ------------------
18428|   177k|            janet_buffer_init(&buffer, len);
18429|   177k|            janet_formatbv(&buffer, format, args);
18430|   177k|            if (xtype == JANET_ABSTRACT) {
  ------------------
  |  Branch (18430:17): [True: 0, False: 177k]
  ------------------
18431|      0|                void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18432|      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 (18432:21): [True: 0, False: 0]
  ------------------
18433|      0|                    break;
18434|      0|                JanetFile *iofile = abstract;
18435|      0|                io_assert_writeable(iofile);
18436|      0|                f = iofile->file;
18437|      0|            }
18438|   177k|            fwrite(buffer.data, buffer.count, 1, f);
18439|   177k|            janet_buffer_deinit(&buffer);
18440|   177k|            break;
18441|   177k|        }
18442|      0|        case JANET_FUNCTION: {
  ------------------
  |  Branch (18442:9): [True: 0, False: 177k]
  ------------------
18443|      0|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  863|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
18444|      0|            int32_t len = 0;
18445|      0|            while (format[len]) len++;
  ------------------
  |  Branch (18445:20): [True: 0, False: 0]
  ------------------
18446|      0|            JanetBuffer *buf = janet_buffer(len);
18447|      0|            janet_formatbv(buf, format, args);
18448|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18449|      0|            janet_call(fun, 1, args);
18450|      0|            break;
18451|   177k|        }
18452|      0|        case JANET_BUFFER:
  ------------------
  |  Branch (18452:9): [True: 0, False: 177k]
  ------------------
18453|      0|            janet_formatbv(janet_unwrap_buffer(x), format, args);
  ------------------
  |  |  857|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
18454|      0|            break;
18455|   177k|    }
18456|   177k|    va_end(args);
18457|   177k|    return;
18458|   177k|}
janet_getfile:
18466|      1|FILE *janet_getfile(const Janet *argv, int32_t n, int32_t *flags) {
18467|      1|    JanetFile *iof = janet_getabstract(argv, n, &janet_file_type);
18468|      1|    if (NULL != flags) *flags = iof->flags;
  ------------------
  |  Branch (18468:9): [True: 0, False: 1]
  ------------------
18469|      1|    return iof->file;
18470|      1|}
janet_makefile:
18476|  21.4k|Janet janet_makefile(FILE *f, int32_t flags) {
18477|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18478|  21.4k|}
janet_lib_io:
18491|  7.16k|void janet_lib_io(JanetTable *env) {
18492|  7.16k|    JanetRegExt io_cfuns[] = {
18493|  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_}
  |  |  ------------------
  ------------------
18494|  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_}
  |  |  ------------------
  ------------------
18495|  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_}
  |  |  ------------------
  ------------------
18496|  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_}
  |  |  ------------------
  ------------------
18497|  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_}
  |  |  ------------------
  ------------------
18498|  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_}
  |  |  ------------------
  ------------------
18499|  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_}
  |  |  ------------------
  ------------------
18500|  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_}
  |  |  ------------------
  ------------------
18501|  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_}
  |  |  ------------------
  ------------------
18502|  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_}
  |  |  ------------------
  ------------------
18503|  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_}
  |  |  ------------------
  ------------------
18504|  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_}
  |  |  ------------------
  ------------------
18505|  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_}
  |  |  ------------------
  ------------------
18506|  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_}
  |  |  ------------------
  ------------------
18507|  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_}
  |  |  ------------------
  ------------------
18508|  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_}
  |  |  ------------------
  ------------------
18509|  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_}
  |  |  ------------------
  ------------------
18510|  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_}
  |  |  ------------------
  ------------------
18511|  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_}
  |  |  ------------------
  ------------------
18512|  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_}
  |  |  ------------------
  ------------------
18513|  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_}
  |  |  ------------------
  ------------------
18514|  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_}
  |  |  ------------------
  ------------------
18515|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
18516|  7.16k|    };
18517|  7.16k|    janet_core_cfuns_ext(env, NULL, io_cfuns);
18518|  7.16k|    janet_register_abstract_type(&janet_file_type);
18519|  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
  ------------------
18520|       |    /* stdout */
18521|  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)
  ------------------
18522|  7.16k|                   janet_makefile(stdout, JANET_FILE_APPEND | default_flags),
18523|  7.16k|                   "The standard output file.");
18524|       |    /* stderr */
18525|  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)
  ------------------
18526|  7.16k|                   janet_makefile(stderr, JANET_FILE_APPEND | default_flags),
18527|  7.16k|                   "The standard error file.");
18528|       |    /* stdin */
18529|  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)
  ------------------
18530|  7.16k|                   janet_makefile(stdin, JANET_FILE_READ | default_flags),
18531|  7.16k|                   "The standard input file.");
18532|       |
18533|  7.16k|}
janet_marshal_size:
18915|  1.02k|void janet_marshal_size(JanetMarshalContext *ctx, size_t value) {
18916|  1.02k|    janet_marshal_int64(ctx, (int64_t) value);
18917|  1.02k|}
janet_marshal_int64:
18919|  1.04k|void janet_marshal_int64(JanetMarshalContext *ctx, int64_t value) {
18920|  1.04k|    MarshalState *st = (MarshalState *)(ctx->m_state);
18921|  1.04k|    push64(st, (uint64_t) value);
18922|  1.04k|}
janet_marshal_int:
18924|  2.05k|void janet_marshal_int(JanetMarshalContext *ctx, int32_t value) {
18925|  2.05k|    MarshalState *st = (MarshalState *)(ctx->m_state);
18926|  2.05k|    pushint(st, value);
18927|  2.05k|}
janet_marshal_abstract:
18969|  1.04k|void janet_marshal_abstract(JanetMarshalContext *ctx, void *abstract) {
18970|  1.04k|    MarshalState *st = (MarshalState *)(ctx->m_state);
18971|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18972|  1.04k|    MARK_SEEN();
  ------------------
  |  |18964|  1.04k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18964:14): [True: 1.04k, False: 0]
  |  |  ------------------
  |  |18965|  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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18966|  1.04k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18966:16): [Folded, False: 1.04k]
  |  |  ------------------
  ------------------
18973|  1.04k|}
janet_marshal_flags:
18975|  1.02k|int janet_marshal_flags(JanetMarshalContext *ctx) {
18976|  1.02k|    return ctx->flags;
18977|  1.02k|}
janet_marshal:
19235|  16.1k|    int flags) {
19236|  16.1k|    MarshalState st;
19237|  16.1k|    st.buf = buf;
19238|  16.1k|    st.nextid = 0;
19239|  16.1k|    st.seen_defs = NULL;
19240|  16.1k|    st.seen_envs = NULL;
19241|  16.1k|    st.rreg = rreg;
19242|  16.1k|    st.maybe_cycles = !(flags & JANET_MARSHAL_NO_CYCLES);
  ------------------
  |  | 1902|  16.1k|#define JANET_MARSHAL_NO_CYCLES 0x40000
  ------------------
19243|  16.1k|    janet_table_init(&st.seen, 0);
19244|  16.1k|    marshal_one(&st, x, flags);
19245|  16.1k|    janet_table_deinit(&st.seen);
19246|  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]
  |  |  ------------------
  ------------------
19247|       |    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]
  |  |  ------------------
  ------------------
19248|  16.1k|}
janet_unmarshal_int:
19774|  2.05k|int32_t janet_unmarshal_int(JanetMarshalContext *ctx) {
19775|  2.05k|    UnmarshalState *st = (UnmarshalState *)(ctx->u_state);
19776|  2.05k|    return readint(st, &(ctx->data));
19777|  2.05k|}
janet_unmarshal_size:
19779|  1.02k|size_t janet_unmarshal_size(JanetMarshalContext *ctx) {
19780|  1.02k|    return (size_t) janet_unmarshal_int64(ctx);
19781|  1.02k|}
janet_unmarshal_int64:
19783|  1.04k|int64_t janet_unmarshal_int64(JanetMarshalContext *ctx) {
19784|  1.04k|    UnmarshalState *st = (UnmarshalState *)(ctx->u_state);
19785|  1.04k|    return read64(st, &(ctx->data));
19786|  1.04k|}
janet_unmarshal_abstract_reuse:
19820|  1.04k|void janet_unmarshal_abstract_reuse(JanetMarshalContext *ctx, void *p) {
19821|  1.04k|    UnmarshalState *st = (UnmarshalState *)(ctx->u_state);
19822|  1.04k|    if (ctx->at == NULL) {
  ------------------
  |  Branch (19822:9): [True: 0, False: 1.04k]
  ------------------
19823|      0|        janet_panicf("janet_unmarshal_abstract called more than once");
19824|      0|    }
19825|  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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19826|       |    ctx->at = NULL;
19827|  1.04k|}
janet_unmarshal_abstract:
19829|  1.04k|void *janet_unmarshal_abstract(JanetMarshalContext *ctx, size_t size) {
19830|  1.04k|    void *p = janet_abstract(ctx->at, size);
19831|  1.04k|    janet_unmarshal_abstract_reuse(ctx, p);
19832|  1.04k|    return p;
19833|  1.04k|}
janet_unmarshal_flags:
19847|  1.02k|int janet_unmarshal_flags(JanetMarshalContext *ctx) {
19848|  1.02k|    return ctx->flags;
19849|  1.02k|}
janet_unmarshal:
20192|  8.71k|    const uint8_t **next) {
20193|  8.71k|    UnmarshalState st;
20194|  8.71k|    st.start = bytes;
20195|  8.71k|    st.end = bytes + len;
20196|  8.71k|    st.lookup_defs = NULL;
20197|  8.71k|    st.lookup_envs = NULL;
20198|  8.71k|    st.lookup = NULL;
20199|  8.71k|    st.reg = reg;
20200|  8.71k|    Janet out;
20201|  8.71k|    const uint8_t *nextbytes = unmarshal_one(&st, bytes, &out, flags);
20202|  8.71k|    if (next) *next = nextbytes;
  ------------------
  |  Branch (20202:9): [True: 1.47k, False: 7.24k]
  ------------------
20203|  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: 965]
  |  |  ------------------
  ------------------
20204|  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]
  |  |  ------------------
  ------------------
20205|       |    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]
  |  |  ------------------
  ------------------
20206|  8.71k|    return out;
20207|  8.71k|}
cfun_marshal:
20228|  14.6k|              "unmarshalling.") {
20229|  14.6k|    janet_arity(argc, 1, 4);
20230|  14.6k|    JanetBuffer *buffer;
20231|  14.6k|    JanetTable *rreg = NULL;
20232|  14.6k|    uint32_t flags = 0;
20233|  14.6k|    if (argc > 1) {
  ------------------
  |  Branch (20233:9): [True: 14, False: 14.6k]
  ------------------
20234|     14|        rreg = janet_gettable(argv, 1);
20235|     14|    }
20236|  14.6k|    if (argc > 2) {
  ------------------
  |  Branch (20236:9): [True: 3, False: 14.6k]
  ------------------
20237|      3|        buffer = janet_getbuffer(argv, 2);
20238|  14.6k|    } else {
20239|  14.6k|        buffer = janet_buffer(10);
20240|  14.6k|    }
20241|  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 (20241:9): [True: 1, False: 14.6k]
  ------------------
20242|      1|        flags |= JANET_MARSHAL_NO_CYCLES;
  ------------------
  |  | 1902|      1|#define JANET_MARSHAL_NO_CYCLES 0x40000
  ------------------
20243|      1|    }
20244|  14.6k|    janet_marshal(buffer, argv[0], rreg, flags);
20245|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20246|  14.6k|}
cfun_unmarshal:
20252|     83|              "unmarshalled from the buffer.") {
20253|     83|    janet_sandbox_assert(JANET_SANDBOX_UNMARSHAL);
  ------------------
  |  | 2034|     83|#define JANET_SANDBOX_UNMARSHAL 262144
  ------------------
20254|     83|    janet_arity(argc, 1, 2);
20255|     83|    JanetByteView view = janet_getbytes(argv, 0);
20256|     83|    JanetTable *reg = NULL;
20257|     83|    if (argc > 1) {
  ------------------
  |  Branch (20257:9): [True: 1, False: 82]
  ------------------
20258|      1|        reg = janet_gettable(argv, 1);
20259|      1|    }
20260|       |    return janet_unmarshal(view.bytes, (size_t) view.len, 0, reg, NULL);
20261|     83|}
janet_lib_marsh:
20264|  7.16k|void janet_lib_marsh(JanetTable *env) {
20265|  7.16k|    JanetRegExt marsh_cfuns[] = {
20266|  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_}
  |  |  ------------------
  ------------------
20267|  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_}
  |  |  ------------------
  ------------------
20268|  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_}
  |  |  ------------------
  ------------------
20269|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
20270|  7.16k|    };
20271|       |    janet_core_cfuns_ext(env, NULL, marsh_cfuns);
20272|  7.16k|}
janet_default_rng:
20347|  7.65k|JanetRNG *janet_default_rng(void) {
20348|  7.65k|    return &janet_vm.rng;
20349|  7.65k|}
janet_rng_seed:
20351|  15.3k|void janet_rng_seed(JanetRNG *rng, uint32_t seed) {
20352|  15.3k|    rng->a = seed;
20353|  15.3k|    rng->b = 0x97654321u;
20354|  15.3k|    rng->c = 123871873u;
20355|  15.3k|    rng->d = 0xf23f56c8u;
20356|  15.3k|    rng->counter = 0u;
20357|       |    /* First several numbers aren't that random. */
20358|   260k|    for (int i = 0; i < 16; i++) janet_rng_u32(rng);
  ------------------
  |  Branch (20358:21): [True: 245k, False: 15.3k]
  ------------------
20359|  15.3k|}
janet_rng_longseed:
20361|     50|void janet_rng_longseed(JanetRNG *rng, const uint8_t *bytes, int32_t len) {
20362|     50|    uint8_t state[16] = {0};
20363|  5.71k|    for (int32_t i = 0; i < len; i++)
  ------------------
  |  Branch (20363:25): [True: 5.66k, False: 50]
  ------------------
20364|  5.66k|        state[i & 0xF] ^= bytes[i];
20365|     50|    rng->a = state[0] + ((uint32_t) state[1] << 8) + ((uint32_t) state[2] << 16) + ((uint32_t) state[3] << 24);
20366|     50|    rng->b = state[4] + ((uint32_t) state[5] << 8) + ((uint32_t) state[6] << 16) + ((uint32_t) state[7] << 24);
20367|     50|    rng->c = state[8] + ((uint32_t) state[9] << 8) + ((uint32_t) state[10] << 16) + ((uint32_t) state[11] << 24);
20368|     50|    rng->d = state[12] + ((uint32_t) state[13] << 8) + ((uint32_t) state[14] << 16) + ((uint32_t) state[15] << 24);
20369|     50|    rng->counter = 0u;
20370|       |    /* a, b, c, d can't all be 0 */
20371|     50|    if (rng->a == 0) rng->a = 1u;
  ------------------
  |  Branch (20371:9): [True: 13, False: 37]
  ------------------
20372|    850|    for (int i = 0; i < 16; i++) janet_rng_u32(rng);
  ------------------
  |  Branch (20372:21): [True: 800, False: 50]
  ------------------
20373|     50|}
janet_rng_u32:
20375|   246k|uint32_t janet_rng_u32(JanetRNG *rng) {
20376|       |    /* Algorithm "xorwow" from p. 5 of Marsaglia, "Xorshift RNGs" */
20377|   246k|    uint32_t t = rng->d;
20378|   246k|    uint32_t const s = rng->a;
20379|   246k|    rng->d = rng->c;
20380|   246k|    rng->c = rng->b;
20381|   246k|    rng->b = s;
20382|   246k|    t ^= t >> 2;
20383|   246k|    t ^= t << 1;
20384|   246k|    t ^= s ^ (s << 4);
20385|   246k|    rng->a = t;
20386|   246k|    rng->counter += 362437;
20387|   246k|    return t + rng->counter;
20388|   246k|}
janet_rng_double:
20390|     10|double janet_rng_double(JanetRNG *rng) {
20391|     10|    uint32_t hi = janet_rng_u32(rng);
20392|     10|    uint32_t lo = janet_rng_u32(rng);
20393|     10|    uint64_t big = (uint64_t)(lo) | (((uint64_t) hi) << 32);
20394|     10|    return ldexp((double)(big >> (64 - 52)), -52);
20395|     10|}
cfun_rng_make:
20402|     59|             ) {
20403|     59|    janet_arity(argc, 0, 1);
20404|     59|    JanetRNG *rng = janet_abstract(&janet_rng_type, sizeof(JanetRNG));
20405|     59|    if (argc == 1) {
  ------------------
  |  Branch (20405:9): [True: 56, False: 3]
  ------------------
20406|     56|        if (janet_checkint(argv[0])) {
  ------------------
  |  Branch (20406:13): [True: 5, False: 51]
  ------------------
20407|      5|            uint32_t seed = (uint32_t)(janet_getinteger(argv, 0));
20408|      5|            janet_rng_seed(rng, seed);
20409|     51|        } else {
20410|     51|            JanetByteView bytes = janet_getbytes(argv, 0);
20411|     51|            janet_rng_longseed(rng, bytes.bytes, bytes.len);
20412|     51|        }
20413|     56|    } else {
20414|      3|        janet_rng_seed(rng, 0);
20415|      3|    }
20416|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20417|     59|}
cfun_rng_uniform:
20422|      2|             ) {
20423|      2|    janet_fixarity(argc, 1);
20424|      2|    JanetRNG *rng = janet_getabstract(argv, 0, &janet_rng_type);
20425|      2|    return janet_wrap_number(janet_rng_double(rng));
  ------------------
  |  |  830|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20426|      2|}
cfun_rng_int:
20432|      2|             ) {
20433|      2|    janet_arity(argc, 1, 2);
20434|      2|    JanetRNG *rng = janet_getabstract(argv, 0, &janet_rng_type);
20435|      2|    if (argc == 1) {
  ------------------
  |  Branch (20435:9): [True: 0, False: 2]
  ------------------
20436|      0|        uint32_t word = janet_rng_u32(rng) >> 1;
20437|      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)
  |  |  ------------------
  ------------------
20438|      2|    } else {
20439|      2|        int32_t max = janet_optnat(argv, argc, 1, INT32_MAX);
20440|      2|        if (max == 0) return janet_wrap_number(0.0);
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
  |  Branch (20440:13): [True: 0, False: 2]
  ------------------
20441|      2|        uint32_t modulo = (uint32_t) max;
20442|      2|        uint32_t maxgen = INT32_MAX;
20443|      2|        uint32_t maxword = maxgen - (maxgen % modulo);
20444|      2|        uint32_t word;
20445|      2|        do {
20446|      2|            word = janet_rng_u32(rng) >> 1;
20447|      2|        } while (word > maxword);
  ------------------
  |  Branch (20447:18): [True: 0, False: 2]
  ------------------
20448|      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)
  |  |  ------------------
  ------------------
20449|      2|    }
20450|      2|}
janet_rand:
20511|     14|              "Returns a uniformly distributed random number between 0 and 1.") {
20512|     14|    (void) argv;
20513|     14|    janet_fixarity(argc, 0);
20514|     14|    return janet_wrap_number(janet_rng_double(&janet_vm.rng));
  ------------------
  |  |  830|     14|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20515|     14|}
janet_srand:
20522|      5|             ) {
20523|      5|    janet_fixarity(argc, 1);
20524|      5|    if (janet_checkint(argv[0])) {
  ------------------
  |  Branch (20524:9): [True: 0, False: 5]
  ------------------
20525|      0|        uint32_t seed = (uint32_t)(janet_getinteger(argv, 0));
20526|      0|        janet_rng_seed(&janet_vm.rng, seed);
20527|      5|    } else {
20528|      5|        JanetByteView bytes = janet_getbytes(argv, 0);
20529|      5|        janet_rng_longseed(&janet_vm.rng, bytes.bytes, bytes.len);
20530|      5|    }
20531|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20532|      5|}
janet_acos:
20535|  3.47k|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|  3.47k|    janet_fixarity(argc, 1); \
20537|  3.47k|    double x = janet_getnumber(argv, 0); \
20538|  3.47k|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|  3.47k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|  3.47k|}
janet_asin:
20535|     11|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|     11|    janet_fixarity(argc, 1); \
20537|     11|    double x = janet_getnumber(argv, 0); \
20538|     11|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|     11|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|     11|}
janet_atan:
20535|      2|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|      2|    janet_fixarity(argc, 1); \
20537|      2|    double x = janet_getnumber(argv, 0); \
20538|      2|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|      2|}
janet_cos:
20535|      4|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|      4|    janet_fixarity(argc, 1); \
20537|      4|    double x = janet_getnumber(argv, 0); \
20538|      4|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|      4|}
janet_acosh:
20535|      1|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|      1|    janet_fixarity(argc, 1); \
20537|      1|    double x = janet_getnumber(argv, 0); \
20538|      1|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|      1|}
janet_sin:
20535|     13|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|     13|    janet_fixarity(argc, 1); \
20537|     13|    double x = janet_getnumber(argv, 0); \
20538|     13|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|     13|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|     13|}
janet_sinh:
20535|      3|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|      3|    janet_fixarity(argc, 1); \
20537|      3|    double x = janet_getnumber(argv, 0); \
20538|      3|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      3|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|      3|}
janet_tan:
20535|     13|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|     13|    janet_fixarity(argc, 1); \
20537|     13|    double x = janet_getnumber(argv, 0); \
20538|     13|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|     13|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|     13|}
janet_tanh:
20535|      6|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|      6|    janet_fixarity(argc, 1); \
20537|      6|    double x = janet_getnumber(argv, 0); \
20538|      6|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      6|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|      6|}
janet_expm1:
20535|      4|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|      4|    janet_fixarity(argc, 1); \
20537|      4|    double x = janet_getnumber(argv, 0); \
20538|      4|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|      4|}
janet_cbrt:
20535|      2|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|      2|    janet_fixarity(argc, 1); \
20537|      2|    double x = janet_getnumber(argv, 0); \
20538|      2|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|      2|}
janet_erfc:
20535|      1|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|      1|    janet_fixarity(argc, 1); \
20537|      1|    double x = janet_getnumber(argv, 0); \
20538|      1|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|      1|}
janet_lgamma:
20535|      8|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|      8|    janet_fixarity(argc, 1); \
20537|      8|    double x = janet_getnumber(argv, 0); \
20538|      8|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      8|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|      8|}
janet_tgamma:
20535|      2|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|      2|    janet_fixarity(argc, 1); \
20537|      2|    double x = janet_getnumber(argv, 0); \
20538|      2|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|      2|}
janet_atanh:
20535|      3|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|      3|    janet_fixarity(argc, 1); \
20537|      3|    double x = janet_getnumber(argv, 0); \
20538|      3|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      3|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|      3|}
janet_log:
20535|      4|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|      4|    janet_fixarity(argc, 1); \
20537|      4|    double x = janet_getnumber(argv, 0); \
20538|      4|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|      4|}
janet_log10:
20535|      1|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|      1|    janet_fixarity(argc, 1); \
20537|      1|    double x = janet_getnumber(argv, 0); \
20538|      1|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|      1|}
janet_sqrt:
20535|      1|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|      1|    janet_fixarity(argc, 1); \
20537|      1|    double x = janet_getnumber(argv, 0); \
20538|      1|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|      1|}
janet_floor:
20535|      1|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|      1|    janet_fixarity(argc, 1); \
20537|      1|    double x = janet_getnumber(argv, 0); \
20538|      1|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|      1|}
janet_round:
20535|      5|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20536|      5|    janet_fixarity(argc, 1); \
20537|      5|    double x = janet_getnumber(argv, 0); \
20538|      5|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      5|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20539|      5|}
janet_atan2:
20577|      2|JANET_CORE_FN(janet_##name, signature, doc) {\
20578|      2|    janet_fixarity(argc, 2); \
20579|      2|    double lhs = janet_getnumber(argv, 0); \
20580|      2|    double rhs = janet_getnumber(argv, 1); \
20581|      2|    return janet_wrap_number(fop(lhs, rhs)); \
  ------------------
  |  |  830|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20582|      2|}
janet_pow:
20577|      1|JANET_CORE_FN(janet_##name, signature, doc) {\
20578|      1|    janet_fixarity(argc, 2); \
20579|      1|    double lhs = janet_getnumber(argv, 0); \
20580|      1|    double rhs = janet_getnumber(argv, 1); \
20581|      1|    return janet_wrap_number(fop(lhs, rhs)); \
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20582|      1|}
janet_not:
20591|   193k|JANET_CORE_FN(janet_not, "(not x)", "Returns the boolean inverse of x.") {
20592|   193k|    janet_fixarity(argc, 1);
20593|   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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20594|   193k|}
janet_cfun_lcm:
20626|      1|              "Returns the least common multiple of x and y.") {
20627|      1|    janet_fixarity(argc, 2);
20628|      1|    double x = janet_getnumber(argv, 0);
20629|      1|    double y = janet_getnumber(argv, 1);
20630|      1|    return janet_wrap_number(janet_lcm(x, y));
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20631|      1|}
janet_cfun_frexp:
20634|     10|              "Returns a tuple of (mantissa, exponent) from number.") {
20635|     10|    janet_fixarity(argc, 1);
20636|     10|    double x = janet_getnumber(argv, 0);
20637|     10|    int exp;
20638|     10|    x = frexp(x, &exp);
20639|     10|    Janet *result = janet_tuple_begin(2);
20640|     10|    result[0] = janet_wrap_number(x);
  ------------------
  |  |  830|     10|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20641|     10|    result[1] = janet_wrap_number((double) exp);
  ------------------
  |  |  830|     10|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20642|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20643|     10|}
janet_lib_math:
20654|  7.16k|void janet_lib_math(JanetTable *env) {
20655|  7.16k|    JanetRegExt math_cfuns[] = {
20656|  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_}
  |  |  ------------------
  ------------------
20657|  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_}
  |  |  ------------------
  ------------------
20658|  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_}
  |  |  ------------------
  ------------------
20659|  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_}
  |  |  ------------------
  ------------------
20660|  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_}
  |  |  ------------------
  ------------------
20661|  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_}
  |  |  ------------------
  ------------------
20662|  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_}
  |  |  ------------------
  ------------------
20663|  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_}
  |  |  ------------------
  ------------------
20664|  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_}
  |  |  ------------------
  ------------------
20665|  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_}
  |  |  ------------------
  ------------------
20666|  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_}
  |  |  ------------------
  ------------------
20667|  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_}
  |  |  ------------------
  ------------------
20668|  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_}
  |  |  ------------------
  ------------------
20669|  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_}
  |  |  ------------------
  ------------------
20670|  7.16k|#ifndef JANET_PLAN9
20671|  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_}
  |  |  ------------------
  ------------------
20672|  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_}
  |  |  ------------------
  ------------------
20673|  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_}
  |  |  ------------------
  ------------------
20674|  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_}
  |  |  ------------------
  ------------------
20675|  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_}
  |  |  ------------------
  ------------------
20676|  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_}
  |  |  ------------------
  ------------------
20677|  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_}
  |  |  ------------------
  ------------------
20678|  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_}
  |  |  ------------------
  ------------------
20679|  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_}
  |  |  ------------------
  ------------------
20680|  7.16k|#endif
20681|  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_}
  |  |  ------------------
  ------------------
20682|  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_}
  |  |  ------------------
  ------------------
20683|  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_}
  |  |  ------------------
  ------------------
20684|  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_}
  |  |  ------------------
  ------------------
20685|  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_}
  |  |  ------------------
  ------------------
20686|  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_}
  |  |  ------------------
  ------------------
20687|  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_}
  |  |  ------------------
  ------------------
20688|  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_}
  |  |  ------------------
  ------------------
20689|  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_}
  |  |  ------------------
  ------------------
20690|  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_}
  |  |  ------------------
  ------------------
20691|  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_}
  |  |  ------------------
  ------------------
20692|  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_}
  |  |  ------------------
  ------------------
20693|  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_}
  |  |  ------------------
  ------------------
20694|  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_}
  |  |  ------------------
  ------------------
20695|  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_}
  |  |  ------------------
  ------------------
20696|  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_}
  |  |  ------------------
  ------------------
20697|  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_}
  |  |  ------------------
  ------------------
20698|  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_}
  |  |  ------------------
  ------------------
20699|  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_}
  |  |  ------------------
  ------------------
20700|  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_}
  |  |  ------------------
  ------------------
20701|  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_}
  |  |  ------------------
  ------------------
20702|  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_}
  |  |  ------------------
  ------------------
20703|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
20704|  7.16k|    };
20705|  7.16k|    janet_core_cfuns_ext(env, NULL, math_cfuns);
20706|  7.16k|    janet_register_abstract_type(&janet_rng_type);
20707|       |#ifdef JANET_BOOTSTRAP
20708|       |    JANET_CORE_DEF(env, "math/pi", janet_wrap_number(3.1415926535897931),
20709|       |                   "The value pi.");
20710|       |    JANET_CORE_DEF(env, "math/e", janet_wrap_number(2.7182818284590451),
20711|       |                   "The base of the natural log.");
20712|       |    JANET_CORE_DEF(env, "math/inf", janet_wrap_number(INFINITY),
20713|       |                   "The number representing positive infinity");
20714|       |    JANET_CORE_DEF(env, "math/-inf", janet_wrap_number(-INFINITY),
20715|       |                   "The number representing negative infinity");
20716|       |    JANET_CORE_DEF(env, "math/int32-min", janet_wrap_number(INT32_MIN),
20717|       |                   "The minimum contiguous integer representable by a 32 bit signed integer");
20718|       |    JANET_CORE_DEF(env, "math/int32-max", janet_wrap_number(INT32_MAX),
20719|       |                   "The maximum contiguous integer representable by a 32 bit signed integer");
20720|       |    JANET_CORE_DEF(env, "math/int-min", janet_wrap_number(JANET_INTMIN_DOUBLE),
20721|       |                   "The minimum contiguous integer representable by a double (-(2^53))");
20722|       |    JANET_CORE_DEF(env, "math/int-max", janet_wrap_number(JANET_INTMAX_DOUBLE),
20723|       |                   "The maximum contiguous integer representable by a double (2^53)");
20724|       |#ifdef NAN
20725|       |    JANET_CORE_DEF(env, "math/nan", janet_wrap_number(NAN), "Not a number (IEEE-754 NaN)");
20726|       |#else
20727|       |    JANET_CORE_DEF(env, "math/nan", janet_wrap_number(0.0 / 0.0), "Not a number (IEEE-754 NaN)");
20728|       |#endif
20729|       |#endif
20730|  7.16k|}
cfun_net_sockaddr:
21195|      3|              "return all address that match in an array instead of just the first.") {
21196|      3|    janet_sandbox_assert(JANET_SANDBOX_NET_CONNECT); /* connect OR listen */
  ------------------
  |  | 2015|      3|#define JANET_SANDBOX_NET_CONNECT 4
  ------------------
21197|      3|    janet_arity(argc, 2, 4);
21198|      3|    int socktype = janet_get_sockettype(argv, argc, 2);
21199|      3|    int is_unix = 0;
21200|      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 (21200:21): [True: 0, False: 3]
  ------------------
21201|      3|    socklen_t addrsize = 0;
21202|      3|    struct addrinfo *ai = janet_get_addrinfo(argv, 0, socktype, 0, &is_unix, &addrsize);
21203|      3|#ifndef JANET_WINDOWS
21204|       |    /* no unix domain socket support on windows yet */
21205|      3|    if (is_unix) {
  ------------------
  |  Branch (21205:9): [True: 0, False: 3]
  ------------------
21206|      0|        void *abst = janet_abstract(&janet_address_type, addrsize);
21207|      0|        memcpy(abst, ai, addrsize);
21208|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21209|      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 (21209:16): [True: 0, False: 0]
  ------------------
21210|      0|    }
21211|      3|#endif
21212|      3|    if (make_arr) {
  ------------------
  |  Branch (21212:9): [True: 0, False: 3]
  ------------------
21213|       |        /* Select all */
21214|      0|        JanetArray *arr = janet_array(10);
21215|      0|        struct addrinfo *iter = ai;
21216|      0|        while (NULL != iter) {
  ------------------
  |  Branch (21216:16): [True: 0, False: 0]
  ------------------
21217|      0|            void *abst = janet_abstract(&janet_address_type, iter->ai_addrlen);
21218|      0|            memcpy(abst, iter->ai_addr, iter->ai_addrlen);
21219|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21220|      0|            iter = iter->ai_next;
21221|      0|        }
21222|      0|        freeaddrinfo(ai);
21223|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21224|      3|    } else {
21225|       |        /* Select first */
21226|      3|        if (NULL == ai) {
  ------------------
  |  Branch (21226:13): [True: 0, False: 3]
  ------------------
21227|      0|            janet_panic("no data for given address");
21228|      0|        }
21229|      3|        void *abst = janet_abstract(&janet_address_type, ai->ai_addrlen);
21230|      3|        memcpy(abst, ai->ai_addr, ai->ai_addrlen);
21231|      3|        freeaddrinfo(ai);
21232|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21233|      3|    }
21234|      3|}
cfun_net_connect:
21242|     14|              "connection, with the default being the same as using the OS's preferred address. ") {
21243|     14|    janet_sandbox_assert(JANET_SANDBOX_NET_CONNECT);
  ------------------
  |  | 2015|     14|#define JANET_SANDBOX_NET_CONNECT 4
  ------------------
21244|     14|    janet_arity(argc, 2, 5);
21245|       |
21246|       |    /* Check arguments */
21247|     14|    int socktype = janet_get_sockettype(argv, argc, 2);
21248|     14|    int is_unix = 0;
21249|     14|    char *bindhost = (char *) janet_optcstring(argv, argc, 3, NULL);
21250|     14|    char *bindport = NULL;
21251|     14|    if (argc >= 5 && janet_checkint(argv[4])) {
  ------------------
  |  Branch (21251:9): [True: 0, False: 14]
  |  Branch (21251:22): [True: 0, False: 0]
  ------------------
21252|      0|        bindport = (char *)janet_to_string(argv[4]);
21253|     14|    } else {
21254|     14|        bindport = (char *)janet_optcstring(argv, argc, 4, NULL);
21255|     14|    }
21256|       |
21257|       |    /* Where we're connecting to */
21258|     14|    socklen_t addrlen = 0;
21259|     14|    struct addrinfo *ai = janet_get_addrinfo(argv, 0, socktype, 0, &is_unix, &addrlen);
21260|       |
21261|       |    /* Check if we're binding address */
21262|     14|    struct addrinfo *binding = NULL;
21263|     14|    if (bindhost != NULL) {
  ------------------
  |  Branch (21263:9): [True: 0, False: 14]
  ------------------
21264|      0|        if (is_unix) {
  ------------------
  |  Branch (21264:13): [True: 0, False: 0]
  ------------------
21265|      0|            freeaddrinfo(ai);
21266|      0|            janet_panic("bindhost not supported for unix domain sockets");
21267|      0|        }
21268|       |        /* getaddrinfo */
21269|      0|        struct addrinfo hints;
21270|      0|        memset(&hints, 0, sizeof(hints));
21271|      0|        hints.ai_family = AF_UNSPEC;
21272|      0|        hints.ai_socktype = socktype;
21273|      0|        hints.ai_flags = 0;
21274|      0|        int status = getaddrinfo(bindhost, bindport, &hints, &binding);
21275|      0|        if (status) {
  ------------------
  |  Branch (21275:13): [True: 0, False: 0]
  ------------------
21276|      0|            freeaddrinfo(ai);
21277|      0|            janet_panicf("could not get address info for bindhost: %s", gai_strerror(status));
21278|      0|        }
21279|      0|    }
21280|       |
21281|       |    /* Create socket */
21282|     14|    JSock sock = JSOCKDEFAULT;
  ------------------
  |  |20807|     14|#define JSock int
  ------------------
                  JSock sock = JSOCKDEFAULT;
  ------------------
  |  |20805|     14|#define JSOCKDEFAULT 0
  ------------------
21283|     14|    void *addr = NULL;
21284|     14|#ifndef JANET_WINDOWS
21285|     14|    if (is_unix) {
  ------------------
  |  Branch (21285:9): [True: 0, False: 14]
  ------------------
21286|      0|        sock = socket(AF_UNIX, socktype | JSOCKFLAGS, 0);
  ------------------
  |  |20809|      0|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
21287|      0|        if (!JSOCKVALID(sock)) {
  ------------------
  |  |20806|      0|#define JSOCKVALID(x) ((x) >= 0)
  ------------------
  |  Branch (21287:13): [True: 0, False: 0]
  ------------------
21288|      0|            Janet v = janet_ev_lasterr();
21289|      0|            janet_free(ai);
  ------------------
  |  | 2402|      0|#define janet_free(X) free((X))
  ------------------
21290|      0|            janet_panicf("could not create socket: %V", v);
21291|      0|        }
21292|      0|        addr = (void *) ai;
21293|      0|    } else
21294|     14|#endif
21295|     14|    {
21296|     14|        struct addrinfo *rp = NULL;
21297|     14|        for (rp = ai; rp != NULL; rp = rp->ai_next) {
  ------------------
  |  Branch (21297:23): [True: 0, False: 14]
  ------------------
21298|       |#ifdef JANET_WINDOWS
21299|       |            sock = WSASocketW(rp->ai_family, rp->ai_socktype, rp->ai_protocol, NULL, 0, WSA_FLAG_OVERLAPPED);
21300|       |#else
21301|      0|            sock = socket(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol);
  ------------------
  |  |20809|      0|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
21302|      0|#endif
21303|      0|            if (JSOCKVALID(sock)) {
  ------------------
  |  |20806|      0|#define JSOCKVALID(x) ((x) >= 0)
  |  |  ------------------
  |  |  |  Branch (20806:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
21304|      0|                addr = rp->ai_addr;
21305|      0|                addrlen = (socklen_t) rp->ai_addrlen;
21306|      0|                break;
21307|      0|            }
21308|      0|        }
21309|     14|        if (NULL == addr) {
  ------------------
  |  Branch (21309:13): [True: 0, False: 14]
  ------------------
21310|      0|            Janet v = janet_ev_lasterr();
21311|      0|            if (binding) freeaddrinfo(binding);
  ------------------
  |  Branch (21311:17): [True: 0, False: 0]
  ------------------
21312|      0|            freeaddrinfo(ai);
21313|      0|            janet_panicf("could not create socket: %V", v);
21314|      0|        }
21315|     14|    }
21316|       |
21317|       |    /* Bind to bindhost and bindport if given */
21318|     14|    if (binding) {
  ------------------
  |  Branch (21318:9): [True: 0, False: 14]
  ------------------
21319|      0|        struct addrinfo *rp = NULL;
21320|      0|        int did_bind = 0;
21321|      0|        for (rp = binding; rp != NULL; rp = rp->ai_next) {
  ------------------
  |  Branch (21321:28): [True: 0, False: 0]
  ------------------
21322|      0|            if (bind(sock, rp->ai_addr, (int) rp->ai_addrlen) == 0) {
  ------------------
  |  Branch (21322:17): [True: 0, False: 0]
  ------------------
21323|      0|                did_bind = 1;
21324|      0|                break;
21325|      0|            }
21326|      0|        }
21327|      0|        if (!did_bind) {
  ------------------
  |  Branch (21327:13): [True: 0, False: 0]
  ------------------
21328|      0|            Janet v = janet_ev_lasterr();
21329|      0|            freeaddrinfo(binding);
21330|      0|            freeaddrinfo(ai);
21331|      0|            JSOCKCLOSE(sock);
  ------------------
  |  |20804|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
21332|      0|            janet_panicf("could not bind outgoing address: %V", v);
21333|      0|        } else {
21334|      0|            freeaddrinfo(binding);
21335|      0|        }
21336|      0|    }
21337|       |
21338|       |    /* Wrap socket in abstract type JanetStream */
21339|     14|    uint32_t udp_flag = 0;
21340|     14|    if (socktype == SOCK_DGRAM) udp_flag = JANET_STREAM_UDPSERVER;
  ------------------
  |  |  623|      0|#define JANET_STREAM_UDPSERVER 0x1000
  ------------------
  |  Branch (21340:9): [True: 0, False: 14]
  ------------------
21341|     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
  ------------------
21342|       |
21343|       |    /* Connect to socket */
21344|       |#ifdef JANET_WINDOWS
21345|       |    int status = 0;
21346|       |    int err = 0;
21347|       |    LPFN_CONNECTEX connect_ex = NULL;
21348|       |    if (socktype == SOCK_STREAM && ((connect_ex = lazy_get_connectex(sock)))) {
21349|       |        /* Prefer ConnecEx as it works well with overlapped IO. */
21350|       |        janet_net_socknoblock(sock);
21351|       |        NetStateConnect *state = janet_malloc(sizeof(NetStateConnect));
21352|       |        memset(state, 0, sizeof(NetStateConnect));
21353|       |        BOOL success = connect_ex(sock, addr, addrlen, NULL, 0, NULL, &state->overlapped.as.overlapped);
21354|       |        freeaddrinfo(ai);
21355|       |        if (success) {
21356|       |            /* Did not fail */
21357|       |        } else {
21358|       |            int err = WSAGetLastError();
21359|       |            if (err == ERROR_IO_PENDING) {
21360|       |                /* Did not actually fail yet */
21361|       |            } else {
21362|       |                janet_free(state);
21363|       |                Janet lasterr = janet_ev_lasterr();
21364|       |                janet_panicf("could not connect socket (ConnectEx): %V", lasterr);
21365|       |            }
21366|       |        }
21367|       |
21368|       |        net_sched_connect(stream, state);
21369|       |    } else {
21370|       |        /* Default to blocking connect if ConnectEx not available */
21371|       |        status = WSAConnect(sock, addr, addrlen, NULL, NULL, NULL, NULL);
21372|       |        err = WSAGetLastError();
21373|       |        freeaddrinfo(ai);
21374|       |        /* Set up the socket for non-blocking IO after connecting on windows by default */
21375|       |        janet_net_socknoblock(sock);
21376|       |    }
21377|       |
21378|       |#else
21379|       |    /* Set up the socket for non-blocking IO before connecting */
21380|     14|    janet_net_socknoblock(sock);
21381|     14|    int status;
21382|     14|    do {
21383|     14|        status = connect(sock, addr, addrlen);
21384|     14|    } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (21384:14): [True: 0, False: 14]
  |  Branch (21384:30): [True: 0, False: 0]
  ------------------
21385|     14|    int err = errno;
21386|     14|    if (is_unix) {
  ------------------
  |  Branch (21386:9): [True: 0, False: 14]
  ------------------
21387|      0|        janet_free(ai);
  ------------------
  |  | 2402|      0|#define janet_free(X) free((X))
  ------------------
21388|     14|    } else {
21389|     14|        freeaddrinfo(ai);
21390|     14|    }
21391|     14|#endif
21392|       |
21393|     14|    if (status == 0) {
  ------------------
  |  Branch (21393:9): [True: 0, False: 14]
  ------------------
21394|       |        /* Connect completed synchronously (common for unix domain sockets).
21395|       |         * Return the stream directly without scheduling an async wait,
21396|       |         * as edge-triggered kqueue may not signal EVFILT_WRITE if the socket
21397|       |         * is already connected when registered. */
21398|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21399|      0|    }
21400|       |
21401|       |#ifdef JANET_WINDOWS
21402|       |    if (status == SOCKET_ERROR) {
21403|       |        if (err != WSAEWOULDBLOCK) {
21404|       |#else
21405|     14|    if (status == -1) {
  ------------------
  |  Branch (21405:9): [True: 0, False: 14]
  ------------------
21406|      0|        if (err != EINPROGRESS) {
  ------------------
  |  Branch (21406:13): [True: 0, False: 0]
  ------------------
21407|      0|#endif
21408|      0|            JSOCKCLOSE(sock);
  ------------------
  |  |20804|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
21409|      0|            Janet lasterr = janet_ev_lasterr();
21410|      0|            janet_panicf("could not connect socket: %V", lasterr);
21411|      0|        }
21412|      0|    }
21413|       |
21414|     14|    net_sched_connect(stream, NULL);
21415|     14|}
cfun_net_socket:
21421|      6|              "`address-family` should be one of :ipv4 or :ipv6.") {
21422|      6|    janet_arity(argc, 0, 2);
21423|       |
21424|      6|    int socktype = janet_get_sockettype(argv, argc, 0);
21425|       |
21426|       |    /* Create socket */
21427|      6|    JSock sfd = JSOCKDEFAULT;
  ------------------
  |  |20807|      6|#define JSock int
  ------------------
                  JSock sfd = JSOCKDEFAULT;
  ------------------
  |  |20805|      6|#define JSOCKDEFAULT 0
  ------------------
21428|      6|    struct addrinfo *ai = NULL;
21429|      6|    struct addrinfo hints;
21430|      6|    memset(&hints, 0, sizeof(hints));
21431|      6|    hints.ai_family = AF_UNSPEC;
21432|      6|    hints.ai_socktype = socktype;
21433|      6|#ifdef AI_NUMERICSERV
21434|      6|    hints.ai_flags = AI_NUMERICSERV; /* Explicitly prevent name resolution */
21435|       |#else
21436|       |    hints.ai_flags = 0;
21437|       |#endif
21438|      6|    if (argc >= 2) {
  ------------------
  |  Branch (21438:9): [True: 0, False: 6]
  ------------------
21439|      0|        hints.ai_family = net_get_address_family(argv[1]);
21440|      0|    }
21441|      6|    int status = getaddrinfo(NULL, "0", &hints, &ai);
21442|      6|    if (status) {
  ------------------
  |  Branch (21442:9): [True: 0, False: 6]
  ------------------
21443|      0|        janet_panicf("could not get address info: %s", gai_strerror(status));
21444|      0|    }
21445|       |
21446|      6|    struct addrinfo *rp = NULL;
21447|      6|    for (rp = ai; rp != NULL; rp = rp->ai_next) {
  ------------------
  |  Branch (21447:19): [True: 6, False: 0]
  ------------------
21448|       |#ifdef JANET_WINDOWS
21449|       |        sfd = WSASocketW(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol, NULL, 0, WSA_FLAG_OVERLAPPED);
21450|       |#else
21451|      6|        sfd = socket(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol);
  ------------------
  |  |20809|      6|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
21452|      6|#endif
21453|      6|        if (JSOCKVALID(sfd)) {
  ------------------
  |  |20806|      6|#define JSOCKVALID(x) ((x) >= 0)
  |  |  ------------------
  |  |  |  Branch (20806:23): [True: 6, False: 0]
  |  |  ------------------
  ------------------
21454|      6|            break;
21455|      6|        }
21456|      6|    }
21457|      6|    freeaddrinfo(ai);
21458|       |
21459|      6|    if (!JSOCKVALID(sfd)) {
  ------------------
  |  |20806|      6|#define JSOCKVALID(x) ((x) >= 0)
  ------------------
  |  Branch (21459:9): [True: 0, False: 6]
  ------------------
21460|      0|        Janet v = janet_ev_lasterr();
21461|      0|        janet_panicf("could not create socket: %V", v);
21462|      0|    }
21463|       |
21464|       |    /* Wrap socket in abstract type JanetStream */
21465|      6|    uint32_t udp_flag = 0;
21466|      6|    if (socktype == SOCK_DGRAM) udp_flag = JANET_STREAM_UDPSERVER;
  ------------------
  |  |  623|      0|#define JANET_STREAM_UDPSERVER 0x1000
  ------------------
  |  Branch (21466:9): [True: 0, False: 6]
  ------------------
21467|      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
  ------------------
21468|       |
21469|       |    /* Set up the socket for non-blocking IO */
21470|      6|    janet_net_socknoblock(sfd);
21471|       |
21472|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21473|      6|}
cfun_net_shutdown:
21513|      2|              "Returns the original socket.") {
21514|      2|    janet_arity(argc, 1, 2);
21515|      2|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21516|      2|    janet_stream_flags(stream, JANET_STREAM_SOCKET);
  ------------------
  |  |  618|      2|#define JANET_STREAM_SOCKET 0x2
  ------------------
21517|      2|    int shutdown_type = JANET_SHUTDOWN_RW;
  ------------------
  |  |21501|      2|#define JANET_SHUTDOWN_RW SHUT_RDWR
  ------------------
21518|      2|    if (argc == 2) {
  ------------------
  |  Branch (21518:9): [True: 0, False: 2]
  ------------------
21519|      0|        const uint8_t *kw = janet_getkeyword(argv, 1);
21520|      0|        if (0 == janet_cstrcmp(kw, "rw")) {
  ------------------
  |  Branch (21520:13): [True: 0, False: 0]
  ------------------
21521|      0|            shutdown_type = JANET_SHUTDOWN_RW;
  ------------------
  |  |21501|      0|#define JANET_SHUTDOWN_RW SHUT_RDWR
  ------------------
21522|      0|        } else if (0 == janet_cstrcmp(kw, "r")) {
  ------------------
  |  Branch (21522:20): [True: 0, False: 0]
  ------------------
21523|      0|            shutdown_type = JANET_SHUTDOWN_R;
  ------------------
  |  |21502|      0|#define JANET_SHUTDOWN_R SHUT_RD
  ------------------
21524|      0|        } else if (0 == janet_cstrcmp(kw, "w")) {
  ------------------
  |  Branch (21524:20): [True: 0, False: 0]
  ------------------
21525|      0|            shutdown_type = JANET_SHUTDOWN_W;
  ------------------
  |  |21503|      0|#define JANET_SHUTDOWN_W SHUT_WR
  ------------------
21526|      0|        } else {
21527|      0|            janet_panicf("unexpected keyword %v", argv[1]);
21528|      0|        }
21529|      0|    }
21530|      2|    int status;
21531|       |#ifdef JANET_WINDOWS
21532|       |    status = shutdown((SOCKET) stream->handle, shutdown_type);
21533|       |#else
21534|      2|    do {
21535|      2|        status = shutdown(stream->handle, shutdown_type);
21536|      2|    } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (21536:14): [True: 0, False: 2]
  |  Branch (21536:30): [True: 0, False: 0]
  ------------------
21537|      2|#endif
21538|      2|    if (status) {
  ------------------
  |  Branch (21538:9): [True: 0, False: 2]
  ------------------
21539|      0|        janet_panicf("could not shutdown socket: %V", janet_ev_lasterr());
21540|      0|    }
21541|      2|    return argv[0];
21542|      2|}
cfun_net_listen:
21551|      2|              "disable the use of `SO_REUSEADDR` and `SO_REUSEPORT` when creating a server on some operating systems.") {
21552|      2|    janet_sandbox_assert(JANET_SANDBOX_NET_LISTEN);
  ------------------
  |  | 2016|      2|#define JANET_SANDBOX_NET_LISTEN 8
  ------------------
21553|      2|    janet_arity(argc, 2, 4);
21554|       |
21555|       |    /* Get host, port, and handler*/
21556|      2|    int socktype = janet_get_sockettype(argv, argc, 2);
21557|      2|    int is_unix = 0;
21558|      2|    socklen_t addrlen = 0;
21559|      2|    struct addrinfo *ai = janet_get_addrinfo(argv, 0, socktype, 1, &is_unix, &addrlen);
21560|      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 (21560:19): [True: 0, False: 2]
  ------------------
21561|       |
21562|      2|    JSock sfd = JSOCKDEFAULT;
  ------------------
  |  |20807|      2|#define JSock int
  ------------------
                  JSock sfd = JSOCKDEFAULT;
  ------------------
  |  |20805|      2|#define JSOCKDEFAULT 0
  ------------------
21563|      2|#ifndef JANET_WINDOWS
21564|      2|    if (is_unix) {
  ------------------
  |  Branch (21564:9): [True: 0, False: 2]
  ------------------
21565|      0|        sfd = socket(AF_UNIX, socktype | JSOCKFLAGS, 0);
  ------------------
  |  |20809|      0|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
21566|      0|        if (!JSOCKVALID(sfd)) {
  ------------------
  |  |20806|      0|#define JSOCKVALID(x) ((x) >= 0)
  ------------------
  |  Branch (21566:13): [True: 0, False: 0]
  ------------------
21567|      0|            janet_free(ai);
  ------------------
  |  | 2402|      0|#define janet_free(X) free((X))
  ------------------
21568|      0|            janet_panicf("could not create socket: %V", janet_ev_lasterr());
21569|      0|        }
21570|      0|        const char *err = serverify_socket(sfd, reuse, 0);
21571|      0|        if (NULL != err || bind(sfd, (struct sockaddr *)ai, addrlen)) {
  ------------------
  |  Branch (21571:13): [True: 0, False: 0]
  |  Branch (21571:28): [True: 0, False: 0]
  ------------------
21572|      0|            JSOCKCLOSE(sfd);
  ------------------
  |  |20804|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
21573|      0|            janet_free(ai);
  ------------------
  |  | 2402|      0|#define janet_free(X) free((X))
  ------------------
21574|      0|            if (err) {
  ------------------
  |  Branch (21574:17): [True: 0, False: 0]
  ------------------
21575|      0|                janet_panic(err);
21576|      0|            } else {
21577|      0|                janet_panicf("could not bind socket: %V", janet_ev_lasterr());
21578|      0|            }
21579|      0|        }
21580|      0|        janet_free(ai);
  ------------------
  |  | 2402|      0|#define janet_free(X) free((X))
  ------------------
21581|      0|    } else
21582|      2|#endif
21583|      2|    {
21584|       |        /* Check all addrinfos in a loop for the first that we can bind to. */
21585|      2|        struct addrinfo *rp = NULL;
21586|      2|        for (rp = ai; rp != NULL; rp = rp->ai_next) {
  ------------------
  |  Branch (21586:23): [True: 0, False: 2]
  ------------------
21587|       |#ifdef JANET_WINDOWS
21588|       |            sfd = WSASocketW(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol, NULL, 0, WSA_FLAG_OVERLAPPED);
21589|       |#else
21590|      0|            sfd = socket(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol);
  ------------------
  |  |20809|      0|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
21591|      0|#endif
21592|      0|            if (!JSOCKVALID(sfd)) continue;
  ------------------
  |  |20806|      0|#define JSOCKVALID(x) ((x) >= 0)
  ------------------
  |  Branch (21592:17): [True: 0, False: 0]
  ------------------
21593|      0|            const char *err = serverify_socket(sfd, reuse, reuse);
21594|      0|            if (NULL != err) {
  ------------------
  |  Branch (21594:17): [True: 0, False: 0]
  ------------------
21595|      0|                JSOCKCLOSE(sfd);
  ------------------
  |  |20804|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
21596|      0|                continue;
21597|      0|            }
21598|       |            /* Bind */
21599|      0|            if (bind(sfd, rp->ai_addr, (int) rp->ai_addrlen) == 0) break;
  ------------------
  |  Branch (21599:17): [True: 0, False: 0]
  ------------------
21600|      0|            JSOCKCLOSE(sfd);
  ------------------
  |  |20804|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
21601|      0|        }
21602|      2|        freeaddrinfo(ai);
21603|      2|        if (NULL == rp) {
  ------------------
  |  Branch (21603:13): [True: 0, False: 2]
  ------------------
21604|      0|            janet_panic("could not bind to any sockets");
21605|      0|        }
21606|      2|    }
21607|       |
21608|      2|    if (socktype == SOCK_DGRAM) {
  ------------------
  |  Branch (21608:9): [True: 0, False: 2]
  ------------------
21609|       |        /* Datagram server (UDP) */
21610|      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
  ------------------
21611|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21612|      2|    } else {
21613|       |        /* Stream server (TCP) */
21614|       |
21615|       |        /* listen */
21616|      2|        int status = listen(sfd, 1024);
21617|      2|        if (status) {
  ------------------
  |  Branch (21617:13): [True: 0, False: 2]
  ------------------
21618|      0|            JSOCKCLOSE(sfd);
  ------------------
  |  |20804|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
21619|      0|            janet_panicf("could not listen on file descriptor: %V", janet_ev_lasterr());
21620|      0|        }
21621|       |
21622|       |        /* Put sfd on our loop */
21623|      2|        JanetStream *stream = make_stream(sfd, JANET_STREAM_ACCEPTABLE);
  ------------------
  |  |  622|      2|#define JANET_STREAM_ACCEPTABLE 0x800
  ------------------
21624|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21625|      2|    }
21626|      2|}
cfun_net_getsockname:
21681|      1|              "Gets the local address and port in a tuple in that order.") {
21682|      1|    janet_fixarity(argc, 1);
21683|      1|    JanetStream *js = janet_getabstract(argv, 0, &janet_stream_type);
21684|      1|    if (js->flags & JANET_STREAM_CLOSED) janet_panic("stream closed");
  ------------------
  |  |  617|      1|#define JANET_STREAM_CLOSED 0x1
  ------------------
  |  Branch (21684:9): [True: 0, False: 1]
  ------------------
21685|      1|    struct sockaddr_storage ss;
21686|      1|    socklen_t slen = sizeof(ss);
21687|      1|    memset(&ss, 0, slen);
21688|      1|    if (getsockname((JSock)js->handle, (struct sockaddr *) &ss, &slen)) {
  ------------------
  |  Branch (21688:9): [True: 0, False: 1]
  ------------------
21689|      0|        janet_panicf("Failed to get localname on %v: %V", argv[0], janet_ev_lasterr());
21690|      0|    }
21691|      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]
  |  |  ------------------
  ------------------
21692|      1|    return janet_so_getname(&ss);
21693|      1|}
cfun_stream_accept_loop:
21723|      1|              "Blocks the current fiber until the stream is closed, and will return the stream.") {
21724|      1|    janet_fixarity(argc, 2);
21725|      1|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21726|      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
  ------------------
21727|      1|    JanetFunction *fun = janet_getfunction(argv, 1);
21728|      1|    if (fun->def->min_arity < 1) janet_panic("handler function must take at least 1 argument");
  ------------------
  |  Branch (21728:9): [True: 0, False: 1]
  ------------------
21729|      1|    janet_sched_accept(stream, fun);
21730|      1|}
cfun_stream_accept:
21736|      1|              "Returns a new duplex stream which represents a connection to the client.") {
21737|      1|    janet_arity(argc, 1, 2);
21738|      1|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21739|      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
  ------------------
21740|      1|    double to = janet_optnumber(argv, argc, 1, INFINITY);
21741|      1|    if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21741:9): [True: 0, False: 1]
  ------------------
21742|       |    janet_sched_accept(stream, NULL);
21743|      1|}
cfun_stream_read:
21751|      2|              "Returns a buffer with up to n more bytes in it, or raises an error if the read failed.") {
21752|      2|    janet_arity(argc, 2, 4);
21753|      2|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21754|      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
  ------------------
21755|      2|    JanetBuffer *buffer = janet_optbuffer(argv, argc, 2, 10);
21756|      2|    double to = janet_optnumber(argv, argc, 3, INFINITY);
21757|      2|    if (janet_keyeq(argv[1], "all")) {
  ------------------
  |  Branch (21757:9): [True: 0, False: 2]
  ------------------
21758|      0|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21758:13): [True: 0, False: 0]
  ------------------
21759|      0|        janet_ev_recvchunk(stream, buffer, INT32_MAX, MSG_NOSIGNAL);
21760|      2|    } else {
21761|      2|        int32_t n = janet_getnat(argv, 1);
21762|      2|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21762:13): [True: 0, False: 2]
  ------------------
21763|       |        janet_ev_recv(stream, buffer, n, MSG_NOSIGNAL);
21764|      2|    }
21765|      2|}
cfun_stream_chunk:
21770|      2|              "Takes an optional timeout in seconds, after which will raise an error.") {
21771|      2|    janet_arity(argc, 2, 4);
21772|      2|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21773|      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
  ------------------
21774|      2|    int32_t n = janet_getnat(argv, 1);
21775|      2|    JanetBuffer *buffer = janet_optbuffer(argv, argc, 2, 10);
21776|      2|    double to = janet_optnumber(argv, argc, 3, INFINITY);
21777|      2|    if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21777:9): [True: 0, False: 2]
  ------------------
21778|       |    janet_ev_recvchunk(stream, buffer, n, MSG_NOSIGNAL);
21779|      2|}
cfun_stream_recv_from:
21784|      2|              "packet came from. Takes an optional timeout in seconds, after which will raise an error.") {
21785|      2|    janet_arity(argc, 3, 4);
21786|      2|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21787|      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
  ------------------
21788|      2|    int32_t n = janet_getnat(argv, 1);
21789|      2|    JanetBuffer *buffer = janet_getbuffer(argv, 2);
21790|      2|    double to = janet_optnumber(argv, argc, 3, INFINITY);
21791|      2|    if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21791:9): [True: 0, False: 2]
  ------------------
21792|       |    janet_ev_recvfrom(stream, buffer, n, MSG_NOSIGNAL);
21793|      2|}
cfun_stream_write:
21799|      3|              "Returns nil, or raises an error if the write failed.") {
21800|      3|    janet_arity(argc, 2, 3);
21801|      3|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21802|      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
  ------------------
21803|      3|    double to = janet_optnumber(argv, argc, 2, INFINITY);
21804|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21805|      0|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21805:13): [True: 0, False: 0]
  ------------------
21806|      0|        janet_ev_send_buffer(stream, janet_getbuffer(argv, 1), MSG_NOSIGNAL);
21807|      3|    } else {
21808|      3|        JanetByteView bytes = janet_getbytes(argv, 1);
21809|      3|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21809:13): [True: 0, False: 3]
  ------------------
21810|       |        janet_ev_send_string(stream, bytes.bytes, MSG_NOSIGNAL);
21811|      3|    }
21812|      3|}
cfun_stream_send_to:
21818|      3|              "Returns stream.") {
21819|      3|    janet_arity(argc, 3, 4);
21820|      3|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21821|      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
  ------------------
21822|      3|    void *dest = janet_getabstract(argv, 1, &janet_address_type);
21823|      3|    double to = janet_optnumber(argv, argc, 3, INFINITY);
21824|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21825|      0|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21825:13): [True: 0, False: 0]
  ------------------
21826|      0|        janet_ev_sendto_buffer(stream, janet_getbuffer(argv, 2), dest, MSG_NOSIGNAL);
21827|      3|    } else {
21828|      3|        JanetByteView bytes = janet_getbytes(argv, 2);
21829|      3|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21829:13): [True: 0, False: 3]
  ------------------
21830|       |        janet_ev_sendto_string(stream, bytes.bytes, dest, MSG_NOSIGNAL);
21831|      3|    }
21832|      3|}
cfun_net_setsockopt:
21889|      3|             ) {
21890|      3|    janet_arity(argc, 3, 3);
21891|      3|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21892|      3|    janet_stream_flags(stream, JANET_STREAM_SOCKET);
  ------------------
  |  |  618|      3|#define JANET_STREAM_SOCKET 0x2
  ------------------
21893|      3|    JanetKeyword optstr = janet_getkeyword(argv, 1);
21894|       |
21895|      3|    const struct sockopt_type *st = sockopt_type_list;
21896|      3|    while (st->name) {
  ------------------
  |  Branch (21896:12): [True: 0, False: 3]
  ------------------
21897|      0|        if (janet_cstrcmp(optstr, st->name) == 0) {
  ------------------
  |  Branch (21897:13): [True: 0, False: 0]
  ------------------
21898|      0|            break;
21899|      0|        }
21900|      0|        st++;
21901|      0|    }
21902|       |
21903|      3|    if (st->name == NULL) {
  ------------------
  |  Branch (21903:9): [True: 0, False: 3]
  ------------------
21904|      0|        janet_panicf("unknown socket option %q", argv[1]);
21905|      0|    }
21906|       |
21907|      3|    union {
21908|      3|        unsigned char v_uchar;
21909|      3|        int v_int;
21910|      3|        struct ip_mreq v_mreq;
21911|      3|#ifndef JANET_NO_IPV6
21912|      3|        struct ipv6_mreq v_mreq6;
21913|      3|#endif
21914|      3|    } val;
21915|       |
21916|      3|    void *optval = (void *)&val;
21917|      3|    socklen_t optlen = 0;
21918|       |
21919|      3|    if (st->type == JANET_BOOLEAN) {
  ------------------
  |  Branch (21919:9): [True: 0, False: 3]
  ------------------
21920|      0|        val.v_int = janet_getboolean(argv, 2);
21921|      0|        optlen = sizeof(val.v_int);
21922|      3|    } else if (st->type == JANET_NUMBER) {
  ------------------
  |  Branch (21922:16): [True: 0, False: 3]
  ------------------
21923|       |#if defined(JANET_BSD) || defined(JANET_ILLUMOS)
21924|       |        int v_int = janet_getinteger(argv, 2);
21925|       |        if (st->optname == IP_MULTICAST_TTL) {
21926|       |            val.v_uchar = v_int;
21927|       |            optlen = sizeof(val.v_uchar);
21928|       |        } else {
21929|       |            val.v_int = v_int;
21930|       |            optlen = sizeof(val.v_int);
21931|       |        }
21932|       |#else
21933|      0|        val.v_int = janet_getinteger(argv, 2);
21934|      0|        optlen = sizeof(val.v_int);
21935|      0|#endif
21936|      3|    } else if (st->optname == IP_ADD_MEMBERSHIP || st->optname == IP_DROP_MEMBERSHIP) {
  ------------------
  |  Branch (21936:16): [True: 3, False: 0]
  |  Branch (21936:52): [True: 0, False: 0]
  ------------------
21937|      0|        const char *addr = janet_getcstring(argv, 2);
21938|      0|        memset(&val.v_mreq, 0, sizeof val.v_mreq);
21939|      0|        val.v_mreq.imr_interface.s_addr = htonl(INADDR_ANY);
21940|      0|        inet_pton(AF_INET, addr, &val.v_mreq.imr_multiaddr.s_addr);
21941|      0|        optlen = sizeof(val.v_mreq);
21942|      0|#ifndef JANET_NO_IPV6
21943|      3|    } else if (st->optname == IPV6_JOIN_GROUP || st->optname == IPV6_LEAVE_GROUP) {
  ------------------
  |  Branch (21943:16): [True: 3, False: 0]
  |  Branch (21943:50): [True: 0, False: 0]
  ------------------
21944|      0|        const char *addr = janet_getcstring(argv, 2);
21945|      0|        memset(&val.v_mreq6, 0, sizeof val.v_mreq6);
21946|      0|        val.v_mreq6.ipv6mr_interface = 0;
21947|      0|        inet_pton(AF_INET6, addr, &val.v_mreq6.ipv6mr_multiaddr);
21948|      0|        optlen = sizeof(val.v_mreq6);
21949|      0|#endif
21950|      3|    } else {
21951|      3|        janet_panicf("invalid socket option type");
21952|      3|    }
21953|       |
21954|      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]
  |  |  ------------------
  ------------------
21955|       |
21956|      0|    int r = setsockopt((JSock) stream->handle, st->level, st->optname, optval, optlen);
21957|      0|    if (r == -1) {
  ------------------
  |  Branch (21957:9): [True: 0, False: 0]
  ------------------
21958|      0|        janet_panicf("setsockopt(%q): %s", argv[1], janet_strerror(errno));
21959|      0|    }
21960|       |
21961|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21962|      0|}
janet_lib_net:
21986|  7.16k|void janet_lib_net(JanetTable *env) {
21987|  7.16k|    JanetRegExt net_cfuns[] = {
21988|  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_}
  |  |  ------------------
  ------------------
21989|  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_}
  |  |  ------------------
  ------------------
21990|  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_}
  |  |  ------------------
  ------------------
21991|  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_}
  |  |  ------------------
  ------------------
21992|  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_}
  |  |  ------------------
  ------------------
21993|  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_}
  |  |  ------------------
  ------------------
21994|  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_}
  |  |  ------------------
  ------------------
21995|  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_}
  |  |  ------------------
  ------------------
21996|  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_}
  |  |  ------------------
  ------------------
21997|  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_}
  |  |  ------------------
  ------------------
21998|  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_}
  |  |  ------------------
  ------------------
21999|  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_}
  |  |  ------------------
  ------------------
22000|  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_}
  |  |  ------------------
  ------------------
22001|  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_}
  |  |  ------------------
  ------------------
22002|  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_}
  |  |  ------------------
  ------------------
22003|  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_}
  |  |  ------------------
  ------------------
22004|  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_}
  |  |  ------------------
  ------------------
22005|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
22006|  7.16k|    };
22007|       |    janet_core_cfuns_ext(env, NULL, net_cfuns);
22008|  7.16k|}
janet_net_init:
22010|  7.65k|void janet_net_init(void) {
22011|       |#ifdef JANET_WINDOWS
22012|       |    WSADATA wsaData;
22013|       |    janet_assert(!WSAStartup(MAKEWORD(2, 2), &wsaData), "could not start winsock");
22014|       |    janet_vm.connect_ex_loaded = 0;
22015|       |    janet_vm.connect_ex = NULL;
22016|       |#endif
22017|  7.65k|}
janet_net_deinit:
22019|  7.65k|void janet_net_deinit(void) {
22020|       |#ifdef JANET_WINDOWS
22021|       |    WSACleanup();
22022|       |#endif
22023|  7.65k|}
os_which:
22190|      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.") {
22191|      3|    janet_arity(argc, 0, 1);
22192|      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 (22192:9): [True: 1, False: 2]
  ------------------
22193|      1|        janet_getkeyword(argv, 0); /* Constrain to keywords */
22194|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22195|      1|    }
22196|       |#if defined(JANET_OS_NAME)
22197|       |    return janet_ckeywordv(janet_stringify(JANET_OS_NAME));
22198|       |#elif defined(JANET_MINGW)
22199|       |    return janet_ckeywordv("mingw");
22200|       |#elif defined(JANET_CYGWIN)
22201|       |    return janet_ckeywordv("cygwin");
22202|       |#elif defined(JANET_WINDOWS)
22203|       |    return janet_ckeywordv("windows");
22204|       |#elif defined(JANET_APPLE)
22205|       |    return janet_ckeywordv("macos");
22206|       |#elif defined(__EMSCRIPTEN__)
22207|       |    return janet_ckeywordv("web");
22208|       |#elif defined(JANET_LINUX)
22209|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22210|       |#elif defined(__FreeBSD__)
22211|       |    return janet_ckeywordv("freebsd");
22212|       |#elif defined(__NetBSD__)
22213|       |    return janet_ckeywordv("netbsd");
22214|       |#elif defined(__OpenBSD__)
22215|       |    return janet_ckeywordv("openbsd");
22216|       |#elif defined(__DragonFly__)
22217|       |    return janet_ckeywordv("dragonfly");
22218|       |#elif defined(JANET_BSD)
22219|       |    return janet_ckeywordv("bsd");
22220|       |#elif defined(JANET_ILLUMOS)
22221|       |    return janet_ckeywordv("illumos");
22222|       |#else
22223|       |    return janet_ckeywordv("posix");
22224|       |#endif
22225|      3|}
os_arch:
22241|      1|              "* :unknown\n") {
22242|      1|    janet_fixarity(argc, 0);
22243|      1|    (void) argv;
22244|       |    /* Check 64-bit vs 32-bit */
22245|       |#if defined(JANET_ARCH_NAME)
22246|       |    return janet_ckeywordv(janet_stringify(JANET_ARCH_NAME));
22247|       |#elif defined(__EMSCRIPTEN__)
22248|       |    return janet_ckeywordv("wasm");
22249|       |#elif (defined(__x86_64__) || defined(_M_X64))
22250|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22251|       |#elif defined(__i386) || defined(_M_IX86)
22252|       |    return janet_ckeywordv("x86");
22253|       |#elif defined(_M_ARM64) || defined(__aarch64__)
22254|       |    return janet_ckeywordv("aarch64");
22255|       |#elif defined(_M_ARM) || defined(__arm__)
22256|       |    return janet_ckeywordv("arm");
22257|       |#elif (defined(__riscv) && (__riscv_xlen == 64))
22258|       |    return janet_ckeywordv("riscv64");
22259|       |#elif (defined(__riscv) && (__riscv_xlen == 32))
22260|       |    return janet_ckeywordv("riscv32");
22261|       |#elif (defined(__sparc__))
22262|       |    return janet_ckeywordv("sparc");
22263|       |#elif (defined(__ppc__))
22264|       |    return janet_ckeywordv("ppc");
22265|       |#elif (defined(__ppc64__) || defined(_ARCH_PPC64) || defined(_M_PPC))
22266|       |    return janet_ckeywordv("ppc64");
22267|       |#elif (defined(__s390x__))
22268|       |    return janet_ckeywordv("s390x");
22269|       |#elif (defined(__s390__))
22270|       |    return janet_ckeywordv("s390");
22271|       |#else
22272|       |    return janet_ckeywordv("unknown");
22273|       |#endif
22274|      1|}
os_exit:
22307|      1|              "skip cleanup code.") {
22308|      1|    janet_arity(argc, 0, 2);
22309|      1|    janet_sandbox_assert(JANET_SANDBOX_EXIT);
  ------------------
  |  | 2035|      1|#define JANET_SANDBOX_EXIT 524288
  ------------------
22310|      1|    int status;
22311|      1|    if (argc == 0) {
  ------------------
  |  Branch (22311:9): [True: 0, False: 1]
  ------------------
22312|      0|        status = EXIT_SUCCESS;
22313|      1|    } else if (janet_checkint(argv[0])) {
  ------------------
  |  Branch (22313:16): [True: 0, False: 1]
  ------------------
22314|      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)
  |  |  ------------------
  ------------------
22315|      1|    } else {
22316|      1|        status = EXIT_FAILURE;
22317|      1|    }
22318|      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 (22318:18): [True: 0, False: 1]
  ------------------
22319|      1|    janet_deinit();
22320|      1|    if (force) {
  ------------------
  |  Branch (22320:9): [True: 0, False: 1]
  ------------------
22321|       |#ifdef JANET_PLAN9
22322|       |        exits(nil);
22323|       |#else
22324|      0|        _Exit(status);
22325|      0|#endif
22326|      1|    } else {
22327|      1|        exit(status);
22328|      1|    }
22329|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22330|      1|}
os_cpu_count:
22337|      3|              "unable to get an approximation, will return a default value dflt.") {
22338|      3|    janet_arity(argc, 0, 1);
22339|      3|    (void) argv; /* Prevent unused argument warning */
22340|       |#ifdef JANET_WINDOWS
22341|       |    SYSTEM_INFO info;
22342|       |    GetSystemInfo(&info);
22343|       |    return janet_wrap_integer(info.dwNumberOfProcessors);
22344|       |#elif defined(JANET_LINUX)
22345|       |    cpu_set_t cs;
22346|      3|    CPU_ZERO(&cs);
  ------------------
  |  Branch (22346:5): [Folded, False: 3]
  ------------------
22347|      3|    sched_getaffinity(0, sizeof(cs), &cs);
22348|      3|    int count = CPU_COUNT(&cs);
22349|      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)
  |  |  ------------------
  ------------------
22350|       |#elif defined(JANET_BSD) && defined(HW_NCPUONLINE)
22351|       |    const int name[2] = {CTL_HW, HW_NCPUONLINE};
22352|       |    int result = 0;
22353|       |    size_t len = sizeof(int);
22354|       |    if (-1 == sysctl(name, 2, &result, &len, NULL, 0)) {
22355|       |        return argc > 0 ? argv[0] : janet_wrap_nil();
22356|       |    }
22357|       |    return janet_wrap_integer(result);
22358|       |#elif defined(JANET_BSD) && defined(HW_NCPU)
22359|       |    const int name[2] = {CTL_HW, HW_NCPU};
22360|       |    int result = 0;
22361|       |    size_t len = sizeof(int);
22362|       |    if (-1 == sysctl(name, 2, &result, &len, NULL, 0)) {
22363|       |        return argc > 0 ? argv[0] : janet_wrap_nil();
22364|       |    }
22365|       |    return janet_wrap_integer(result);
22366|       |#elif defined(JANET_ILLUMOS)
22367|       |    long result = sysconf(_SC_NPROCESSORS_CONF);
22368|       |    if (result < 0) {
22369|       |        return argc > 0 ? argv[0] : janet_wrap_nil();
22370|       |    }
22371|       |    return janet_wrap_integer(result);
22372|       |#elif defined(JANET_PLAN9)
22373|       |    return janet_wrap_integer(atoi(getenv("NPROC")));
22374|       |#else
22375|       |    return argc > 0 ? argv[0] : janet_wrap_nil();
22376|       |#endif
22377|      3|}
os_proc_kill:
22829|      1|              "ignored on Windows.") {
22830|      1|    janet_arity(argc, 1, 3);
22831|      1|    JanetProc *proc = janet_getabstract(argv, 0, &ProcAT);
22832|      1|    if (proc->flags & JANET_PROC_WAITED) {
  ------------------
  |  |22539|      1|#define JANET_PROC_WAITED 2
  ------------------
  |  Branch (22832:9): [True: 0, False: 1]
  ------------------
22833|      0|        janet_panicf("cannot kill process that has already finished");
22834|      0|    }
22835|       |#ifdef JANET_WINDOWS
22836|       |    if (proc->flags & JANET_PROC_CLOSED) {
22837|       |        janet_panicf("cannot close process handle that is already closed");
22838|       |    }
22839|       |    proc->flags |= JANET_PROC_CLOSED;
22840|       |    TerminateProcess(proc->pHandle, 1);
22841|       |    CloseHandle(proc->pHandle);
22842|       |    CloseHandle(proc->tHandle);
22843|       |#else
22844|      1|    int signal = -1;
22845|      1|    if (argc == 3) {
  ------------------
  |  Branch (22845:9): [True: 0, False: 1]
  ------------------
22846|      0|        signal = get_signal_kw(argv, 2);
22847|      0|    }
22848|      1|    int status = kill(proc->pid, signal == -1 ? SIGKILL : signal);
  ------------------
  |  Branch (22848:34): [True: 0, False: 1]
  ------------------
22849|      1|    if (status) {
  ------------------
  |  Branch (22849:9): [True: 0, False: 1]
  ------------------
22850|      0|        janet_panic(janet_strerror(errno));
22851|      0|    }
22852|      1|#endif
22853|       |    /* After killing process we wait on it. */
22854|      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 (22854:9): [True: 0, False: 1]
  ------------------
22855|      0|#ifdef JANET_EV
22856|      0|        os_proc_wait_impl(proc);
22857|       |#else
22858|       |        return os_proc_wait_impl(proc);
22859|       |#endif
22860|      1|    } else {
22861|      1|        return argv[0];
22862|      1|    }
22863|      1|}
os_proc_close:
22869|      1|              "`proc` completes, return the exit code of `proc`. Otherwise, return nil.") {
22870|      1|    janet_fixarity(argc, 1);
22871|      1|    JanetProc *proc = janet_getabstract(argv, 0, &ProcAT);
22872|      1|#ifdef JANET_EV
22873|      1|    if (proc->flags & JANET_PROC_OWNS_STDIN) janet_stream_close(proc->in);
  ------------------
  |  |22542|      1|#define JANET_PROC_OWNS_STDIN 16
  ------------------
  |  Branch (22873:9): [True: 0, False: 1]
  ------------------
22874|      1|    if (proc->flags & JANET_PROC_OWNS_STDOUT) janet_stream_close(proc->out);
  ------------------
  |  |22543|      1|#define JANET_PROC_OWNS_STDOUT 32
  ------------------
  |  Branch (22874:9): [True: 0, False: 1]
  ------------------
22875|      1|    if (proc->flags & JANET_PROC_OWNS_STDERR) janet_stream_close(proc->err);
  ------------------
  |  |22544|      1|#define JANET_PROC_OWNS_STDERR 64
  ------------------
  |  Branch (22875:9): [True: 0, False: 1]
  ------------------
22876|       |#else
22877|       |    if (proc->flags & JANET_PROC_OWNS_STDIN) janet_file_close(proc->in);
22878|       |    if (proc->flags & JANET_PROC_OWNS_STDOUT) janet_file_close(proc->out);
22879|       |    if (proc->flags & JANET_PROC_OWNS_STDERR) janet_file_close(proc->err);
22880|       |#endif
22881|      1|    proc->flags &= ~(JANET_PROC_OWNS_STDIN | JANET_PROC_OWNS_STDOUT | JANET_PROC_OWNS_STDERR);
  ------------------
  |  |22542|      1|#define JANET_PROC_OWNS_STDIN 16
  ------------------
                  proc->flags &= ~(JANET_PROC_OWNS_STDIN | JANET_PROC_OWNS_STDOUT | JANET_PROC_OWNS_STDERR);
  ------------------
  |  |22543|      1|#define JANET_PROC_OWNS_STDOUT 32
  ------------------
                  proc->flags &= ~(JANET_PROC_OWNS_STDIN | JANET_PROC_OWNS_STDOUT | JANET_PROC_OWNS_STDERR);
  ------------------
  |  |22544|      1|#define JANET_PROC_OWNS_STDERR 64
  ------------------
22882|      1|    if (proc->flags & (JANET_PROC_WAITED | JANET_PROC_WAITING)) {
  ------------------
  |  |22539|      1|#define JANET_PROC_WAITED 2
  ------------------
                  if (proc->flags & (JANET_PROC_WAITED | JANET_PROC_WAITING)) {
  ------------------
  |  |22540|      1|#define JANET_PROC_WAITING 4
  ------------------
  |  Branch (22882:9): [True: 0, False: 1]
  ------------------
22883|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22884|      0|    }
22885|      1|#ifdef JANET_EV
22886|      1|    os_proc_wait_impl(proc);
22887|       |#else
22888|       |    return os_proc_wait_impl(proc);
22889|       |#endif
22890|      1|}
os_proc_getpid:
22894|      1|              "Get the process ID of the current process.") {
22895|      1|    janet_sandbox_assert(JANET_SANDBOX_SUBPROCESS);
  ------------------
  |  | 2014|      1|#define JANET_SANDBOX_SUBPROCESS 2
  ------------------
22896|      1|    janet_fixarity(argc, 0);
22897|      1|    (void) argv;
22898|       |#ifdef JANET_WINDOWS
22899|       |    return janet_wrap_number((double) _getpid());
22900|       |#else
22901|      1|    return janet_wrap_number((double) getpid());
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22902|      1|#endif
22903|      1|}
os_sigaction:
22966|      3|              "All signal handlers are the same as supported by `os/proc-kill`.") {
22967|      3|    janet_sandbox_assert(JANET_SANDBOX_SIGNAL);
  ------------------
  |  | 2026|      3|#define JANET_SANDBOX_SIGNAL 8192
  ------------------
22968|      3|    janet_arity(argc, 1, 3);
22969|       |#ifdef JANET_WINDOWS
22970|       |    (void) argv;
22971|       |    janet_panic("unsupported on this platform");
22972|       |#else
22973|       |    /* TODO - per thread signal masks */
22974|      3|    int rc;
22975|      3|    int sig = get_signal_kw(argv, 0);
22976|      3|    JanetFunction *handler = janet_optfunction(argv, argc, 1, NULL);
22977|      3|    int can_interrupt = janet_optboolean(argv, argc, 2, 0);
22978|      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)
  |  |  ------------------
  ------------------
22979|      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 (22979:9): [True: 0, False: 3]
  ------------------
22980|      0|        janet_gcunroot(oldhandler);
22981|      0|    }
22982|      3|    if (NULL != handler) {
  ------------------
  |  Branch (22982:9): [True: 0, False: 3]
  ------------------
22983|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22984|      0|        janet_gcroot(handlerv);
22985|      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)
  |  |  ------------------
  ------------------
22986|      3|    } else {
22987|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22988|      3|    }
22989|      3|    struct sigaction action;
22990|      3|    sigset_t mask;
22991|      3|    sigaddset(&mask, sig);
22992|      3|    memset(&action, 0, sizeof(action));
22993|      3|    action.sa_flags |= SA_RESTART;
22994|      3|    if (can_interrupt) {
  ------------------
  |  Branch (22994:9): [True: 0, False: 3]
  ------------------
22995|       |#ifdef JANET_NO_INTERPRETER_INTERRUPT
22996|       |        janet_panic("interpreter interrupt not enabled");
22997|       |#else
22998|      0|        action.sa_handler = janet_signal_trampoline;
22999|      0|#endif
23000|      3|    } else {
23001|      3|        action.sa_handler = janet_signal_trampoline_no_interrupt;
23002|      3|    }
23003|      3|    action.sa_mask = mask;
23004|      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]
  |  |  ------------------
  ------------------
23005|      3|    sigset_t set;
23006|      3|    sigemptyset(&set);
23007|      3|    sigaddset(&set, sig);
23008|       |#ifdef JANET_THREADS
23009|       |    pthread_sigmask(SIG_UNBLOCK, &set, NULL);
23010|       |#else
23011|      3|    sigprocmask(SIG_UNBLOCK, &set, NULL);
23012|      3|#endif
23013|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23014|      3|#endif
23015|      3|}
os_execute:
23551|      2|              "cause the program to block and deadlock.") {
23552|      2|    return os_execute_impl(argc, argv, JANET_EXECUTE_EXECUTE);
23553|      2|}
os_posix_exec:
23579|      1|              "does not allow redirection of stdio.") {
23580|       |#ifdef JANET_WINDOWS
23581|       |    (void) argc;
23582|       |    (void) argv;
23583|       |    janet_panic("not supported on Windows");
23584|       |#else
23585|      1|    return os_execute_impl(argc, argv, JANET_EXECUTE_EXEC);
23586|      1|#endif
23587|      1|}
os_posix_chroot:
23624|      3|              "Not supported on all systems (POSIX only).") {
23625|      3|    janet_sandbox_assert(JANET_SANDBOX_CHROOT);
  ------------------
  |  | 2027|      3|#define JANET_SANDBOX_CHROOT 16384
  ------------------
23626|      3|    janet_fixarity(argc, 1);
23627|       |#if defined(JANET_WINDOWS) || defined(JANET_PLAN9)
23628|       |    (void) argv;
23629|       |    janet_panic("not supported on Windows or Plan 9");
23630|       |#else
23631|      3|    const char *root = janet_getcstring(argv, 0);
23632|      3|    int result;
23633|      3|    do {
23634|      3|        result = chroot(root);
23635|      3|    } while (result == -1 && errno == EINTR);
  ------------------
  |  Branch (23635:14): [True: 0, False: 3]
  |  Branch (23635:30): [True: 0, False: 0]
  ------------------
23636|      3|    if (result == -1) {
  ------------------
  |  Branch (23636:9): [True: 0, False: 3]
  ------------------
23637|      0|        janet_panic(janet_strerror(errno));
23638|      0|    }
23639|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23640|      3|#endif
23641|      3|}
os_environ:
23688|      3|              "Get a copy of the OS environment table.") {
23689|      3|    janet_sandbox_assert(JANET_SANDBOX_ENV);
  ------------------
  |  | 2021|      3|#define JANET_SANDBOX_ENV 256
  ------------------
23690|      3|    (void) argv;
23691|      3|    janet_fixarity(argc, 0);
23692|      3|    int32_t nenv = 0;
23693|      3|    janet_lock_environ();
23694|      3|    char **env = environ;
23695|    102|    while (*env++)
  ------------------
  |  Branch (23695:12): [True: 99, False: 3]
  ------------------
23696|     99|        nenv += 1;
23697|      3|    JanetTable *t = janet_table(nenv);
23698|    102|    for (int32_t i = 0; i < nenv; i++) {
  ------------------
  |  Branch (23698:25): [True: 99, False: 3]
  ------------------
23699|     99|        char *e = environ[i];
23700|     99|        char *eq = strchr(e, '=');
23701|     99|        if (!eq) {
  ------------------
  |  Branch (23701:13): [True: 0, False: 99]
  ------------------
23702|      0|            janet_unlock_environ();
23703|      0|            janet_panic("no '=' in environ");
23704|      0|        }
23705|     99|        char *v = eq + 1;
23706|     99|        int32_t full_len = (int32_t) strlen(e);
23707|     99|        int32_t val_len = (int32_t) strlen(v);
23708|     99|        janet_table_put(
23709|     99|            t,
23710|     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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23711|     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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23712|     99|        );
23713|     99|    }
23714|      3|    janet_unlock_environ();
23715|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23716|      3|}
os_getenv:
23721|      3|              "Get the string value of an environment variable.") {
23722|      3|    janet_sandbox_assert(JANET_SANDBOX_ENV);
  ------------------
  |  | 2021|      3|#define JANET_SANDBOX_ENV 256
  ------------------
23723|      3|    janet_arity(argc, 1, 2);
23724|      3|    const char *cstr = janet_getcstring(argv, 0);
23725|      3|    janet_lock_environ();
23726|      3|    const char *res = getenv(cstr);
23727|      3|    Janet ret = res
  ------------------
  |  Branch (23727:17): [True: 0, False: 3]
  ------------------
23728|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23729|      3|                : argc == 2
  ------------------
  |  Branch (23729:19): [True: 0, False: 3]
  ------------------
23730|      3|                ? argv[1]
23731|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23732|      3|    janet_unlock_environ();
23733|      3|    return ret;
23734|      3|}
os_setenv:
23738|      1|              "Set an environment variable.") {
23739|       |#ifdef JANET_WINDOWS
23740|       |#define SETENV(K,V) _putenv_s(K, V)
23741|       |#define UNSETENV(K) _putenv_s(K, "")
23742|       |#elif defined(JANET_PLAN9)
23743|       |#define SETENV(K,V) putenv(K, V)
23744|       |#define UNSETENV(K) unsetenv(K)
23745|       |#else
23746|      1|#define SETENV(K,V) setenv(K, V, 1)
23747|      1|#define UNSETENV(K) unsetenv(K)
23748|      1|#endif
23749|      1|    janet_sandbox_assert(JANET_SANDBOX_ENV);
  ------------------
  |  | 2021|      1|#define JANET_SANDBOX_ENV 256
  ------------------
23750|      1|    janet_arity(argc, 1, 2);
23751|      1|    const char *ks = janet_getcstring(argv, 0);
23752|      1|    const char *vs = janet_optcstring(argv, argc, 1, NULL);
23753|      1|    janet_lock_environ();
23754|      1|    if (NULL == vs) {
  ------------------
  |  Branch (23754:9): [True: 0, False: 1]
  ------------------
23755|      0|        UNSETENV(ks);
  ------------------
  |  |23747|      0|#define UNSETENV(K) unsetenv(K)
  ------------------
23756|      1|    } else {
23757|      1|        SETENV(ks, vs);
  ------------------
  |  |23746|      1|#define SETENV(K,V) setenv(K, V, 1)
  ------------------
23758|      1|    }
23759|      1|    janet_unlock_environ();
23760|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23761|      1|}
os_time:
23766|      9|              "January 1, 1970, the Unix epoch. Returns a real number.") {
23767|      9|    janet_fixarity(argc, 0);
23768|      9|    (void) argv;
23769|      9|    double dtime = (double)(time(NULL));
23770|      9|    return janet_wrap_number(dtime);
  ------------------
  |  |  830|      9|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23771|      9|}
os_clock:
23786|     11|              "- :tuple: Return a 2 integer tuple [seconds, nanoseconds]\n") {
23787|     11|    enum JanetTimeSource source;
23788|     11|    janet_sandbox_assert(JANET_SANDBOX_HRTIME);
  ------------------
  |  | 2020|     11|#define JANET_SANDBOX_HRTIME 128
  ------------------
23789|     11|    janet_arity(argc, 0, 2);
23790|       |
23791|     11|    JanetKeyword sourcestr = janet_optkeyword(argv, argc, 0, NULL);
23792|     11|    if (sourcestr == NULL || janet_cstrcmp(sourcestr, "realtime") == 0) {
  ------------------
  |  Branch (23792:9): [True: 3, False: 8]
  |  Branch (23792:30): [True: 0, False: 8]
  ------------------
23793|      1|        source = JANET_TIME_REALTIME;
23794|     10|    } else if (janet_cstrcmp(sourcestr, "monotonic") == 0) {
  ------------------
  |  Branch (23794:16): [True: 0, False: 10]
  ------------------
23795|      0|        source = JANET_TIME_MONOTONIC;
23796|     10|    } else if (janet_cstrcmp(sourcestr, "cputime") == 0) {
  ------------------
  |  Branch (23796:16): [True: 0, False: 10]
  ------------------
23797|      0|        source = JANET_TIME_CPUTIME;
23798|     10|    } else {
23799|     10|        janet_panicf("expected :realtime, :monotonic, or :cputime, got %v", argv[0]);
23800|     10|    }
23801|       |
23802|      1|    struct timespec tv;
23803|      1|    if (janet_gettime(&tv, source)) janet_panic("could not get time");
  ------------------
  |  Branch (23803:9): [True: 0, False: 1]
  ------------------
23804|       |
23805|      1|    JanetKeyword formatstr = janet_optkeyword(argv, argc, 1, NULL);
23806|      1|    if (formatstr == NULL || janet_cstrcmp(formatstr, "double") == 0) {
  ------------------
  |  Branch (23806:9): [True: 1, False: 0]
  |  Branch (23806:30): [True: 0, False: 0]
  ------------------
23807|      1|        double dtime = (double)(tv.tv_sec + (tv.tv_nsec / 1E9));
23808|      1|        return janet_wrap_number(dtime);
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23809|      1|    } else if (janet_cstrcmp(formatstr, "int") == 0) {
  ------------------
  |  Branch (23809:16): [True: 0, False: 0]
  ------------------
23810|      0|        return janet_wrap_number((double)(tv.tv_sec));
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23811|      0|    } else if (janet_cstrcmp(formatstr, "tuple") == 0) {
  ------------------
  |  Branch (23811:16): [True: 0, False: 0]
  ------------------
23812|      0|        Janet tup[2] = {janet_wrap_number((double)tv.tv_sec),
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23813|      0|                        janet_wrap_number((double)tv.tv_nsec)
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23814|      0|                       };
23815|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23816|      0|    } else {
23817|      0|        janet_panicf("expected :double, :int, or :tuple, got %v", argv[1]);
23818|      0|    }
23819|      1|}
os_sleep:
23824|      5|              "nil.") {
23825|      5|    janet_fixarity(argc, 1);
23826|      5|    double delay = janet_getnumber(argv, 0);
23827|      5|    if (delay < 0) janet_panic("invalid argument to sleep");
  ------------------
  |  Branch (23827:9): [True: 0, False: 5]
  ------------------
23828|       |#ifdef JANET_WINDOWS
23829|       |    Sleep((DWORD)(delay * 1000));
23830|       |#else
23831|      5|    int rc;
23832|      5|    struct timespec ts;
23833|      5|    ts.tv_sec = (time_t) delay;
23834|      5|    ts.tv_nsec = (delay <= UINT32_MAX)
  ------------------
  |  Branch (23834:18): [True: 1, False: 4]
  ------------------
23835|      5|                 ? (long)((delay - ((uint32_t)delay)) * 1000000000)
23836|      5|                 : 0;
23837|      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]
  |  |  ------------------
  ------------------
23838|      5|#endif
23839|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23840|      5|}
os_isatty:
23845|      5|              "it will default to standard output.") {
23846|      5|    janet_arity(argc, 0, 1);
23847|      5|    FILE *f = (argc == 1) ? janet_getfile(argv, 0, NULL) : stdout;
  ------------------
  |  Branch (23847:15): [True: 1, False: 4]
  ------------------
23848|       |#ifdef JANET_WINDOWS
23849|       |    int fd = _fileno(f);
23850|       |    if (fd == -1) janet_panic("not a valid stream");
23851|       |    return janet_wrap_boolean(_isatty(fd));
23852|       |#else
23853|      5|    int fd = fileno(f);
23854|      5|    if (fd == -1) janet_panic(janet_strerror(errno));
  ------------------
  |  Branch (23854:9): [True: 0, False: 5]
  ------------------
23855|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23856|      5|#endif
23857|      5|}
os_cryptorand:
23877|     24|              "Get or append `n` bytes of good quality random data provided by the OS. Returns a new buffer or `buf`.") {
23878|     24|    JanetBuffer *buffer;
23879|     24|    janet_arity(argc, 1, 2);
23880|     24|    int32_t offset;
23881|     24|    int32_t n = janet_getinteger(argv, 0);
23882|     24|    if (n < 0) janet_panic("expected positive integer");
  ------------------
  |  Branch (23882:9): [True: 6, False: 18]
  ------------------
23883|     18|    if (argc == 2) {
  ------------------
  |  Branch (23883:9): [True: 4, False: 14]
  ------------------
23884|      4|        buffer = janet_getbuffer(argv, 1);
23885|      4|        offset = buffer->count;
23886|     14|    } else {
23887|     14|        offset = 0;
23888|     14|        buffer = janet_buffer(n);
23889|     14|    }
23890|       |    /* We could optimize here by adding setcount_uninit */
23891|     18|    janet_buffer_setcount(buffer, offset + n);
23892|       |
23893|     18|    if (janet_cryptorand(buffer->data + offset, n) != 0)
  ------------------
  |  Branch (23893:9): [True: 0, False: 18]
  ------------------
23894|      0|        janet_panic("unable to get sufficient random data");
23895|       |
23896|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23897|     18|}
os_date:
23952|      4|              "See tzset(<time.h>) or _tzset(<time.h>) for further details.") {
23953|      4|    janet_arity(argc, 0, 2);
23954|      4|    (void) argv;
23955|      4|    struct tm t_infos;
23956|      4|    struct tm *t_info = time_to_tm(argv, argc, 0, &t_infos);
23957|      4|    JanetKV *st = janet_struct_begin(9);
23958|      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)
  ------------------
23959|      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)
  ------------------
23960|      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)
  ------------------
23961|      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)
  ------------------
23962|      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)
  ------------------
23963|      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)
  ------------------
23964|      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)
  ------------------
23965|      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)
  ------------------
23966|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23967|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23968|      4|}
os_strftime:
23978|      1|              "See tzset(<time.h>) or _tzset(<time.h>) for further details.") {
23979|      1|    janet_arity(argc, 1, 3);
23980|      1|    const char *fmt = janet_getcstring(argv, 0);
23981|       |    /* ANSI X3.159-1989, section 4.12.3.5 "The strftime function" */
23982|      1|    static const char *valid = "aAbBcdHIjmMpSUwWxXyYZ%";
23983|      1|    const char *p = fmt;
23984|      1|    while (*p) {
  ------------------
  |  Branch (23984:12): [True: 0, False: 1]
  ------------------
23985|      0|        if (*p++ == '%') {
  ------------------
  |  Branch (23985:13): [True: 0, False: 0]
  ------------------
23986|      0|            if (!*p) {
  ------------------
  |  Branch (23986:17): [True: 0, False: 0]
  ------------------
23987|      0|                janet_panic("invalid conversion specifier");
23988|      0|            }
23989|      0|            if (!strchr(valid, *p)) {
  ------------------
  |  Branch (23989:17): [True: 0, False: 0]
  ------------------
23990|      0|                janet_panicf("invalid conversion specifier '%%%c'", *p);
23991|      0|            }
23992|      0|            p++;
23993|      0|        }
23994|      0|    }
23995|      1|    struct tm t_infos;
23996|      1|    struct tm *t_info = time_to_tm(argv, argc, 1, &t_infos);
23997|      1|    char buf[SIZETIMEFMT];
23998|      1|    (void)strftime(buf, sizeof(buf), fmt, t_info);
23999|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24000|      1|}
os_mktime:
24064|      5|              "Inverse function to os/date.") {
24065|      5|    janet_arity(argc, 1, 2);
24066|      5|    time_t t;
24067|      5|    struct tm t_info;
24068|       |
24069|       |    /* Use memset instead of = {0} to silence paranoid warning in macos */
24070|      5|    memset(&t_info, 0, sizeof(t_info));
24071|       |
24072|      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 (24072:9): [True: 3, False: 2]
  ------------------
24073|      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 (24073:13): [True: 3, False: 0]
  ------------------
24074|      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)
  |  |  ------------------
  ------------------
24075|       |
24076|      2|    t_info.tm_sec = entry_getint(argv[0], "seconds");
24077|      2|    t_info.tm_min = entry_getint(argv[0], "minutes");
24078|      2|    t_info.tm_hour = entry_getint(argv[0], "hours");
24079|      2|    t_info.tm_mday = entry_getint(argv[0], "month-day") + 1;
24080|      2|    t_info.tm_mon = entry_getint(argv[0], "month");
24081|      2|    t_info.tm_year = entry_getint(argv[0], "year") - 1900;
24082|      2|    t_info.tm_isdst = entry_getdst(argv[0]);
24083|       |
24084|      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 (24084:9): [True: 0, False: 2]
  ------------------
24085|       |        /* local time */
24086|      0|        t = mktime(&t_info);
24087|      2|    } else {
24088|       |        /* utc time */
24089|       |#ifdef JANET_NO_UTC_MKTIME
24090|       |        janet_panic("os/mktime UTC not supported on this platform");
24091|       |#else
24092|      2|        t = timegm(&t_info);
24093|      2|#endif
24094|      2|    }
24095|       |
24096|      2|    if (t == (time_t) -1) {
  ------------------
  |  Branch (24096:9): [True: 0, False: 2]
  ------------------
24097|      0|        janet_panicf("%s", janet_strerror(errno));
24098|      0|    }
24099|       |
24100|      2|    return janet_wrap_number((double)t);
  ------------------
  |  |  830|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
24101|      2|}
os_setlocale:
24121|     24|              "other functions such as `os/strftime` and even `printf`.") {
24122|     24|    janet_arity(argc, 0, 2);
24123|     24|    const char *locale_name = janet_optcstring(argv, argc, 0, NULL);
24124|     24|    int category_int = LC_ALL;
24125|     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 (24125:9): [True: 3, False: 21]
  |  Branch (24125:21): [True: 3, False: 0]
  ------------------
24126|      3|        if (janet_keyeq(argv[1], "all")) {
  ------------------
  |  Branch (24126:13): [True: 0, False: 3]
  ------------------
24127|      0|            category_int = LC_ALL;
24128|      3|        } else if (janet_keyeq(argv[1], "collate")) {
  ------------------
  |  Branch (24128:20): [True: 0, False: 3]
  ------------------
24129|      0|            category_int = LC_COLLATE;
24130|      3|        } else if (janet_keyeq(argv[1], "ctype")) {
  ------------------
  |  Branch (24130:20): [True: 0, False: 3]
  ------------------
24131|      0|            category_int = LC_CTYPE;
24132|      3|        } else if (janet_keyeq(argv[1], "monetary")) {
  ------------------
  |  Branch (24132:20): [True: 0, False: 3]
  ------------------
24133|      0|            category_int = LC_MONETARY;
24134|      3|        } else if (janet_keyeq(argv[1], "numeric")) {
  ------------------
  |  Branch (24134:20): [True: 0, False: 3]
  ------------------
24135|      0|            category_int = LC_NUMERIC;
24136|      3|        } else if (janet_keyeq(argv[1], "time")) {
  ------------------
  |  Branch (24136:20): [True: 0, False: 3]
  ------------------
24137|      0|            category_int = LC_TIME;
24138|      3|        } else {
24139|      3|            janet_panicf("expected one of :all, :collate, :ctype, :monetary, :numeric, or :time, got %v", argv[1]);
24140|      3|        }
24141|      3|    }
24142|     21|    const char *old = setlocale(category_int, locale_name);
24143|     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 (24143:9): [True: 1, False: 20]
  ------------------
24144|     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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24145|     21|}
os_link:
24153|      1|              "creates a hard link. Does not work on Windows or Plan 9.") {
24154|      1|    janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2018|      1|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
24155|      1|    janet_arity(argc, 2, 3);
24156|       |#if defined(JANET_WINDOWS) || defined(JANET_PLAN9)
24157|       |    (void) argc;
24158|       |    (void) argv;
24159|       |    janet_panic("not supported on Windows or Plan 9");
24160|       |#else
24161|      1|    const char *oldpath = janet_getcstring(argv, 0);
24162|      1|    const char *newpath = janet_getcstring(argv, 1);
24163|      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);
  ------------------
  |  |24106|      0|#define j_symlink symlink
  ------------------
  |  Branch (24163:17): [True: 0, False: 1]
  ------------------
24164|      1|    if (-1 == res) janet_panicf("%s: %s -> %s", janet_strerror(errno), oldpath, newpath);
  ------------------
  |  Branch (24164:9): [True: 0, False: 1]
  ------------------
24165|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24166|      1|#endif
24167|      1|}
os_symlink:
24171|      1|              "Create a symlink from oldpath to newpath, returning nil. Same as `(os/link oldpath newpath true)`.") {
24172|      1|    janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2018|      1|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
24173|      1|    janet_fixarity(argc, 2);
24174|       |#if defined(JANET_WINDOWS) || defined(JANET_PLAN9)
24175|       |    (void) argc;
24176|       |    (void) argv;
24177|       |    janet_panic("not supported on Windows or Plan 9");
24178|       |#else
24179|      1|    const char *oldpath = janet_getcstring(argv, 0);
24180|      1|    const char *newpath = janet_getcstring(argv, 1);
24181|      1|    int res = j_symlink(oldpath, newpath);
  ------------------
  |  |24106|      1|#define j_symlink symlink
  ------------------
24182|      1|    if (-1 == res) janet_panicf("%s: %s -> %s", janet_strerror(errno), oldpath, newpath);
  ------------------
  |  Branch (24182:9): [True: 0, False: 1]
  ------------------
24183|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24184|      1|#endif
24185|      1|}
os_touch:
24242|      8|              "times to the current time.") {
24243|      8|    janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2018|      8|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
24244|      8|    janet_arity(argc, 1, 3);
24245|      8|    const char *path = janet_getcstring(argv, 0);
24246|      8|    struct utimbuf timebuf, *bufp;
24247|      8|    if (argc >= 2) {
  ------------------
  |  Branch (24247:9): [True: 5, False: 3]
  ------------------
24248|      5|        bufp = &timebuf;
24249|      5|        timebuf.actime = (time_t) janet_getnumber(argv, 1);
24250|      5|        if (argc >= 3) {
  ------------------
  |  Branch (24250:13): [True: 2, False: 3]
  ------------------
24251|      2|            timebuf.modtime = (time_t) janet_getnumber(argv, 2);
24252|      3|        } else {
24253|      3|            timebuf.modtime = timebuf.actime;
24254|      3|        }
24255|      5|    } else {
24256|      3|        bufp = NULL;
24257|      3|    }
24258|      8|    int res = utime(path, bufp);
24259|      8|    if (-1 == res) janet_panic(janet_strerror(errno));
  ------------------
  |  Branch (24259:9): [True: 2, False: 6]
  ------------------
24260|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24261|      8|}
os_stat:
24563|  6.24k|              "* :modified - timestamp when file last modified (content changed)\n") {
24564|  6.24k|    return os_stat_or_lstat(0, argc, argv);
24565|  6.24k|}
os_dir:
24615|      4|              "with only the file name or directory name and no prefix.") {
24616|      4|    janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2019|      4|#define JANET_SANDBOX_FS_READ 64
  ------------------
24617|      4|    janet_arity(argc, 1, 2);
24618|      4|    const char *dir = janet_getcstring(argv, 0);
24619|      4|    JanetArray *paths = (argc == 2) ? janet_getarray(argv, 1) : janet_array(0);
  ------------------
  |  Branch (24619:25): [True: 1, False: 3]
  ------------------
24620|       |#ifdef JANET_WINDOWS
24621|       |    /* Read directory items with FindFirstFile / FindNextFile / FindClose */
24622|       |    struct _finddata_t afile;
24623|       |    char pattern[MAX_PATH + 1];
24624|       |    if (strlen(dir) > (sizeof(pattern) - 3))
24625|       |        janet_panicf("path too long: %s", dir);
24626|       |    snprintf(pattern, sizeof(pattern), "%s/*", dir);
24627|       |    intptr_t res = _findfirst(pattern, &afile);
24628|       |    if (-1 == res) janet_panicv(janet_cstringv(janet_strerror(errno)));
24629|       |    do {
24630|       |        if (strcmp(".", afile.name) && strcmp("..", afile.name)) {
24631|       |            janet_array_push(paths, janet_cstringv(afile.name));
24632|       |        }
24633|       |    } while (_findnext(res, &afile) != -1);
24634|       |    _findclose(res);
24635|       |#else
24636|       |    /* Read directory items with opendir / readdir / closedir */
24637|      4|    struct dirent *dp;
24638|      4|    DIR *dfd = opendir(dir);
24639|      4|    if (dfd == NULL) janet_panicf("cannot open directory %s: %s", dir, janet_strerror(errno));
  ------------------
  |  Branch (24639:9): [True: 0, False: 4]
  ------------------
24640|      4|    for (;;) {
24641|      0|        errno = 0;
24642|      0|        dp = readdir(dfd);
24643|      0|        if (dp == NULL) {
  ------------------
  |  Branch (24643:13): [True: 0, False: 0]
  ------------------
24644|      0|            if (errno) {
  ------------------
  |  Branch (24644:17): [True: 0, False: 0]
  ------------------
24645|      0|                int olderr = errno;
24646|      0|                closedir(dfd);
24647|      0|                janet_panicf("failed to read directory %s: %s", dir, janet_strerror(olderr));
24648|      0|            }
24649|      0|            break;
24650|      0|        }
24651|      0|        if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) {
  ------------------
  |  Branch (24651:13): [True: 0, False: 0]
  |  Branch (24651:41): [True: 0, False: 0]
  ------------------
24652|      0|            continue;
24653|      0|        }
24654|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24655|      0|    }
24656|      4|    closedir(dfd);
24657|      4|#endif
24658|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24659|      4|}
os_permission_string:
24710|  2.29k|              "include the file/directory/symlink character as rendered by `ls`.") {
24711|  2.29k|    janet_fixarity(argc, 1);
24712|  2.29k|    return os_make_permstring(os_get_unix_mode(argv, 0));
24713|  2.29k|}
os_permission_int:
24717|  1.02k|              "Parse a 9-character permission string and return an integer that can be used by chmod.") {
24718|  1.02k|    janet_fixarity(argc, 1);
24719|  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)
  |  |  ------------------
  ------------------
24720|  1.02k|}
os_open:
24760|     41|              "  * :b - FILE\\_FLAG\\_NO\\_BUFFERING\n") {
24761|     41|    janet_arity(argc, 1, 3);
24762|     41|    const char *path = janet_getcstring(argv, 0);
24763|     41|    const uint8_t *opt_flags = janet_optkeyword(argv, argc, 1, (const uint8_t *) "r");
24764|     41|    jmode_t mode = os_optmode(argc, argv, 2, 0666);
24765|     41|    uint32_t stream_flags = 0;
24766|     41|    int disable_stream_mode = 0;
24767|     41|    JanetHandle fd;
24768|       |#ifdef JANET_WINDOWS
24769|       |    (void) mode;
24770|       |    int inherited_handle = 0;
24771|       |    DWORD desiredAccess = 0;
24772|       |    DWORD shareMode = 0;
24773|       |    DWORD creationDisp = 0;
24774|       |    DWORD fileFlags = FILE_FLAG_OVERLAPPED;
24775|       |    DWORD fileAttributes = 0;
24776|       |    /* We map unix-like open flags to the creationDisp parameter */
24777|       |    int creatUnix = 0;
24778|       |#define OCREAT 1
24779|       |#define OEXCL 2
24780|       |#define OTRUNC 4
24781|       |    for (const uint8_t *c = opt_flags; *c; c++) {
24782|       |        switch (*c) {
24783|       |            default:
24784|       |                break;
24785|       |            case 'r':
24786|       |                desiredAccess |= GENERIC_READ;
24787|       |                stream_flags |= JANET_STREAM_READABLE;
24788|       |                janet_sandbox_assert(JANET_SANDBOX_FS_READ);
24789|       |                break;
24790|       |            case 'w':
24791|       |                desiredAccess |= GENERIC_WRITE;
24792|       |                stream_flags |= JANET_STREAM_WRITABLE;
24793|       |                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
24794|       |                break;
24795|       |            case 'a':
24796|       |                desiredAccess |= FILE_APPEND_DATA;
24797|       |                stream_flags |= JANET_STREAM_WRITABLE;
24798|       |                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
24799|       |                break;
24800|       |            case 'c':
24801|       |                creatUnix |= OCREAT;
24802|       |                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
24803|       |                break;
24804|       |            case 'e':
24805|       |                creatUnix |= OEXCL;
24806|       |                break;
24807|       |            case 't':
24808|       |                creatUnix |= OTRUNC;
24809|       |                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
24810|       |                break;
24811|       |            /* Windows only flags */
24812|       |            case 'D':
24813|       |                shareMode |= FILE_SHARE_DELETE;
24814|       |                break;
24815|       |            case 'R':
24816|       |                shareMode |= FILE_SHARE_READ;
24817|       |                break;
24818|       |            case 'W':
24819|       |                shareMode |= FILE_SHARE_WRITE;
24820|       |                break;
24821|       |            case 'H':
24822|       |                fileAttributes |= FILE_ATTRIBUTE_HIDDEN;
24823|       |                break;
24824|       |            case 'O':
24825|       |                fileAttributes |= FILE_ATTRIBUTE_READONLY;
24826|       |                break;
24827|       |            case 'F':
24828|       |                fileAttributes |= FILE_ATTRIBUTE_OFFLINE;
24829|       |                break;
24830|       |            case 'T':
24831|       |                fileAttributes |= FILE_ATTRIBUTE_TEMPORARY;
24832|       |                break;
24833|       |            case 'd':
24834|       |                fileFlags |= FILE_FLAG_DELETE_ON_CLOSE;
24835|       |                break;
24836|       |            case 'b':
24837|       |                fileFlags |= FILE_FLAG_NO_BUFFERING;
24838|       |                break;
24839|       |            case 'I':
24840|       |                inherited_handle = 1;
24841|       |                break;
24842|       |            case 'V':
24843|       |                fileFlags &= ~FILE_FLAG_OVERLAPPED;
24844|       |                disable_stream_mode = 1;
24845|       |                break;
24846|       |                /* we could potentially add more here -
24847|       |                 * https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea
24848|       |                 */
24849|       |        }
24850|       |    }
24851|       |    switch (creatUnix) {
24852|       |        default:
24853|       |            janet_panic("invalid creation flags");
24854|       |        case 0:
24855|       |            creationDisp = OPEN_EXISTING;
24856|       |            break;
24857|       |        case OCREAT:
24858|       |            creationDisp = OPEN_ALWAYS;
24859|       |            break;
24860|       |        case OCREAT + OEXCL:
24861|       |            creationDisp = CREATE_NEW;
24862|       |            break;
24863|       |        case OCREAT + OTRUNC:
24864|       |            creationDisp = CREATE_ALWAYS;
24865|       |            break;
24866|       |        case OTRUNC:
24867|       |            creationDisp = TRUNCATE_EXISTING;
24868|       |            break;
24869|       |    }
24870|       |    if (fileAttributes == 0) {
24871|       |        fileAttributes = FILE_ATTRIBUTE_NORMAL;
24872|       |    }
24873|       |    SECURITY_ATTRIBUTES saAttr;
24874|       |    memset(&saAttr, 0, sizeof(saAttr));
24875|       |    saAttr.nLength = sizeof(saAttr);
24876|       |    if (inherited_handle) {
24877|       |        saAttr.bInheritHandle = TRUE; /* Needed to do interesting things with file */
24878|       |    }
24879|       |    fd = CreateFileA(path, desiredAccess, shareMode, &saAttr, creationDisp, fileFlags | fileAttributes, NULL);
24880|       |    if (fd == INVALID_HANDLE_VALUE) janet_panicv(janet_ev_lasterr());
24881|       |#else
24882|     41|    int open_flags = O_NONBLOCK;
24883|     41|#ifdef JANET_LINUX
24884|     41|    open_flags |= O_CLOEXEC;
24885|     41|#endif
24886|     41|    int read_flag = 0;
24887|     41|    int write_flag = 0;
24888|    688|    for (const uint8_t *c = opt_flags; *c; c++) {
  ------------------
  |  Branch (24888:40): [True: 647, False: 41]
  ------------------
24889|    647|        switch (*c) {
24890|    275|            default:
  ------------------
  |  Branch (24890:13): [True: 275, False: 372]
  ------------------
24891|    275|                break;
24892|    275|            case 'r':
  ------------------
  |  Branch (24892:13): [True: 40, False: 607]
  ------------------
24893|     40|                read_flag = 1;
24894|     40|                stream_flags |= JANET_STREAM_READABLE;
  ------------------
  |  |  620|     40|#define JANET_STREAM_READABLE 0x200
  ------------------
24895|     40|                janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2019|     40|#define JANET_SANDBOX_FS_READ 64
  ------------------
24896|     40|                break;
24897|     13|            case 'w':
  ------------------
  |  Branch (24897:13): [True: 13, False: 634]
  ------------------
24898|     13|                write_flag = 1;
24899|     13|                stream_flags |= JANET_STREAM_WRITABLE;
  ------------------
  |  |  621|     13|#define JANET_STREAM_WRITABLE 0x400
  ------------------
24900|     13|                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2018|     13|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
24901|     13|                break;
24902|     58|            case 'c':
  ------------------
  |  Branch (24902:13): [True: 58, False: 589]
  ------------------
24903|     58|                open_flags |= O_CREAT;
24904|     58|                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2018|     58|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
24905|     58|                break;
24906|     71|            case 'e':
  ------------------
  |  Branch (24906:13): [True: 71, False: 576]
  ------------------
24907|     71|                open_flags |= O_EXCL;
24908|     71|                break;
24909|     33|            case 't':
  ------------------
  |  Branch (24909:13): [True: 33, False: 614]
  ------------------
24910|     33|                open_flags |= O_TRUNC;
24911|     33|                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2018|     33|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
24912|     33|                break;
24913|       |            /* posix only */
24914|      1|            case 'x':
  ------------------
  |  Branch (24914:13): [True: 1, False: 646]
  ------------------
24915|      1|                open_flags |= O_SYNC;
24916|      1|                break;
24917|     40|            case 'C':
  ------------------
  |  Branch (24917:13): [True: 40, False: 607]
  ------------------
24918|     40|                open_flags |= O_NOCTTY;
24919|     40|                break;
24920|     36|            case 'a':
  ------------------
  |  Branch (24920:13): [True: 36, False: 611]
  ------------------
24921|     36|                open_flags |= O_APPEND;
24922|     36|                break;
24923|     80|            case 'N':
  ------------------
  |  Branch (24923:13): [True: 80, False: 567]
  ------------------
24924|     80|                open_flags &= ~O_NONBLOCK;
24925|     80|                disable_stream_mode = 1;
24926|     80|                break;
24927|    647|        }
24928|    647|    }
24929|       |    /* If both read and write, fix up to O_RDWR */
24930|     41|    if (read_flag && !write_flag) {
  ------------------
  |  Branch (24930:9): [True: 10, False: 31]
  |  Branch (24930:22): [True: 9, False: 1]
  ------------------
24931|      9|        open_flags |= O_RDONLY;
24932|     32|    } else if (write_flag && !read_flag) {
  ------------------
  |  Branch (24932:16): [True: 4, False: 28]
  |  Branch (24932:30): [True: 3, False: 1]
  ------------------
24933|      3|        open_flags |= O_WRONLY;
24934|     29|    } else {
24935|     29|        open_flags |= O_RDWR;
24936|     29|    }
24937|       |
24938|     41|    do {
24939|     41|        fd = open(path, open_flags, mode);
24940|     41|    } while (fd == -1 && errno == EINTR);
  ------------------
  |  Branch (24940:14): [True: 29, False: 12]
  |  Branch (24940:26): [True: 0, False: 29]
  ------------------
24941|     41|    if (fd == -1) janet_panicv(janet_ev_lasterr());
  ------------------
  |  Branch (24941:9): [True: 29, False: 12]
  ------------------
24942|     12|#endif
24943|     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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24944|     41|}
os_pipe:
24954|      7|              "By default, both ends of the pipe are non-blocking for use with the `ev` module.") {
24955|      7|    (void) argv;
24956|      7|    janet_arity(argc, 0, 1);
24957|      7|    JanetHandle fds[2];
24958|      7|    int flags = 0;
24959|      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 (24959:9): [True: 1, False: 6]
  |  Branch (24959:21): [True: 1, False: 0]
  ------------------
24960|      1|        flags = (int) janet_getflags(argv, 0, "WR");
24961|      1|    }
24962|      7|    if (janet_make_pipe(fds, flags)) janet_panicv(janet_ev_lasterr());
  ------------------
  |  Branch (24962:9): [True: 0, False: 7]
  ------------------
24963|      7|    JanetStream *reader = janet_stream(fds[0], (flags & 2) ? 0 : JANET_STREAM_READABLE, NULL);
  ------------------
  |  |  620|     14|#define JANET_STREAM_READABLE 0x200
  ------------------
  |  Branch (24963:48): [True: 0, False: 7]
  ------------------
24964|      7|    JanetStream *writer = janet_stream(fds[1], (flags & 1) ? 0 : JANET_STREAM_WRITABLE, NULL);
  ------------------
  |  |  621|     14|#define JANET_STREAM_WRITABLE 0x400
  ------------------
  |  Branch (24964:48): [True: 0, False: 7]
  ------------------
24965|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24966|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24967|      7|}
janet_lib_os:
24974|  7.16k|void janet_lib_os(JanetTable *env) {
24975|       |#if !defined(JANET_REDUCED_OS) && defined(JANET_WINDOWS) && defined(JANET_THREADS)
24976|       |    /* During start up, the top-most abstract machine (thread)
24977|       |     * in the thread tree sets up the critical section. */
24978|       |    static volatile long env_lock_initializing = 0;
24979|       |    static volatile long env_lock_initialized = 0;
24980|       |    if (!InterlockedExchange(&env_lock_initializing, 1)) {
24981|       |        InitializeCriticalSection(&env_lock);
24982|       |        InterlockedOr(&env_lock_initialized, 1);
24983|       |    } else {
24984|       |        while (!InterlockedOr(&env_lock_initialized, 0)) {
24985|       |            Sleep(0);
24986|       |        }
24987|       |    }
24988|       |
24989|       |#endif
24990|  7.16k|#ifndef JANET_NO_PROCESSES
24991|  7.16k|#endif
24992|  7.16k|    JanetRegExt os_cfuns[] = {
24993|  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_}
  |  |  ------------------
  ------------------
24994|  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_}
  |  |  ------------------
  ------------------
24995|  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_}
  |  |  ------------------
  ------------------
24996|  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_}
  |  |  ------------------
  ------------------
24997|  7.16k|#ifndef JANET_REDUCED_OS
24998|       |
24999|       |        /* misc (un-sandboxed) */
25000|  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_}
  |  |  ------------------
  ------------------
25001|  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_}
  |  |  ------------------
  ------------------
25002|  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_}
  |  |  ------------------
  ------------------
25003|  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_}
  |  |  ------------------
  ------------------
25004|  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_}
  |  |  ------------------
  ------------------
25005|  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_}
  |  |  ------------------
  ------------------
25006|  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_}
  |  |  ------------------
  ------------------
25007|  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_}
  |  |  ------------------
  ------------------
25008|  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_}
  |  |  ------------------
  ------------------
25009|  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_}
  |  |  ------------------
  ------------------
25010|  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_}
  |  |  ------------------
  ------------------
25011|  7.16k|#ifndef JANET_NO_LOCALES
25012|  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_}
  |  |  ------------------
  ------------------
25013|  7.16k|#endif
25014|       |
25015|       |        /* env functions */
25016|  7.16k|#ifndef JANET_PLAN9
25017|  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_}
  |  |  ------------------
  ------------------
25018|  7.16k|#endif
25019|  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_}
  |  |  ------------------
  ------------------
25020|  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_}
  |  |  ------------------
  ------------------
25021|       |
25022|       |        /* fs read */
25023|  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_}
  |  |  ------------------
  ------------------
25024|  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_}
  |  |  ------------------
  ------------------
25025|  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_}
  |  |  ------------------
  ------------------
25026|  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_}
  |  |  ------------------
  ------------------
25027|  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_}
  |  |  ------------------
  ------------------
25028|  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_}
  |  |  ------------------
  ------------------
25029|  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_}
  |  |  ------------------
  ------------------
25030|  7.16k|#ifndef JANET_NO_UMASK
25031|  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_}
  |  |  ------------------
  ------------------
25032|  7.16k|#endif
25033|  7.16k|#ifndef JANET_NO_SYMLINKS
25034|  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_}
  |  |  ------------------
  ------------------
25035|  7.16k|#endif
25036|       |
25037|       |        /* fs write */
25038|  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_}
  |  |  ------------------
  ------------------
25039|  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_}
  |  |  ------------------
  ------------------
25040|  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_}
  |  |  ------------------
  ------------------
25041|  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_}
  |  |  ------------------
  ------------------
25042|  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_}
  |  |  ------------------
  ------------------
25043|  7.16k|#ifndef JANET_NO_SYMLINKS
25044|  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_}
  |  |  ------------------
  ------------------
25045|  7.16k|#endif
25046|       |
25047|       |        /* processes */
25048|  7.16k|#ifndef JANET_NO_PROCESSES
25049|  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_}
  |  |  ------------------
  ------------------
25050|  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_}
  |  |  ------------------
  ------------------
25051|  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_}
  |  |  ------------------
  ------------------
25052|  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_}
  |  |  ------------------
  ------------------
25053|  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_}
  |  |  ------------------
  ------------------
25054|  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_}
  |  |  ------------------
  ------------------
25055|       |        /* no need to sandbox process management if you can't create processes
25056|       |         * (allows for limited functionality if use exposes C-functions to create specific processes) */
25057|  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_}
  |  |  ------------------
  ------------------
25058|  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_}
  |  |  ------------------
  ------------------
25059|  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_}
  |  |  ------------------
  ------------------
25060|  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_}
  |  |  ------------------
  ------------------
25061|  7.16k|#ifdef JANET_EV
25062|  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_}
  |  |  ------------------
  ------------------
25063|  7.16k|#endif
25064|  7.16k|#endif
25065|       |
25066|       |        /* high resolution timers */
25067|  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_}
  |  |  ------------------
  ------------------
25068|       |
25069|  7.16k|#ifdef JANET_EV
25070|  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_}
  |  |  ------------------
  ------------------
25071|  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_}
  |  |  ------------------
  ------------------
25072|  7.16k|#endif
25073|  7.16k|#endif
25074|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
25075|  7.16k|    };
25076|       |    janet_core_cfuns_ext(env, NULL, os_cfuns);
25077|  7.16k|}
janet_is_symbol_char:
25137|  6.97M|int janet_is_symbol_char(uint8_t c) {
25138|  6.97M|    return symchars[c >> 5] & ((uint32_t)1 << (c & 0x1F));
25139|  6.97M|}
janet_valid_utf8:
25144|  25.4k|int janet_valid_utf8(const uint8_t *str, int32_t len) {
25145|  25.4k|    int32_t i = 0;
25146|  25.4k|    int32_t j;
25147|   368k|    while (i < len) {
  ------------------
  |  Branch (25147:12): [True: 344k, False: 24.8k]
  ------------------
25148|   344k|        int32_t nexti;
25149|   344k|        uint8_t c = str[i];
25150|       |
25151|       |        /* Check the number of bytes in code point */
25152|   344k|        if (c < 0x80) nexti = i + 1;
  ------------------
  |  Branch (25152:13): [True: 338k, False: 5.50k]
  ------------------
25153|  5.50k|        else if ((c >> 5) == 0x06) nexti = i + 2;
  ------------------
  |  Branch (25153:18): [True: 820, False: 4.68k]
  ------------------
25154|  4.68k|        else if ((c >> 4) == 0x0E) nexti = i + 3;
  ------------------
  |  Branch (25154:18): [True: 1.04k, False: 3.64k]
  ------------------
25155|  3.64k|        else if ((c >> 3) == 0x1E) nexti = i + 4;
  ------------------
  |  Branch (25155:18): [True: 3.19k, False: 457]
  ------------------
25156|       |        /* Don't allow 5 or 6 byte code points */
25157|    457|        else return 0;
25158|       |
25159|       |        /* No overflow */
25160|   343k|        if (nexti > len) return 0;
  ------------------
  |  Branch (25160:13): [True: 61, False: 343k]
  ------------------
25161|       |
25162|       |        /* Ensure trailing bytes are well formed (10XX XXXX) */
25163|   355k|        for (j = i + 1; j < nexti; j++) {
  ------------------
  |  Branch (25163:25): [True: 12.3k, False: 343k]
  ------------------
25164|  12.3k|            if ((str[j] >> 6) != 2) return 0;
  ------------------
  |  Branch (25164:17): [True: 80, False: 12.2k]
  ------------------
25165|  12.3k|        }
25166|       |
25167|       |        /* Check for overlong encoding */
25168|   343k|        if ((nexti == i + 2) && str[i] < 0xC2) return 0;
  ------------------
  |  Branch (25168:13): [True: 722, False: 342k]
  |  Branch (25168:33): [True: 1, False: 721]
  ------------------
25169|   343k|        if ((str[i] == 0xE0) && str[i + 1] < 0xA0) return 0;
  ------------------
  |  Branch (25169:13): [True: 358, False: 343k]
  |  Branch (25169:33): [True: 1, False: 357]
  ------------------
25170|   343k|        if ((str[i] == 0xF0) && str[i + 1] < 0x90) return 0;
  ------------------
  |  Branch (25170:13): [True: 902, False: 342k]
  |  Branch (25170:33): [True: 0, False: 902]
  ------------------
25171|       |
25172|   343k|        i = nexti;
25173|   343k|    }
25174|  24.8k|    return 1;
25175|  25.4k|}
janet_parser_consume:
25779|  12.9M|void janet_parser_consume(JanetParser *parser, uint8_t c) {
25780|  12.9M|    int consumed = 0;
25781|  12.9M|    janet_parser_checkdead(parser);
25782|  12.9M|    if (c == '\r') {
  ------------------
  |  Branch (25782:9): [True: 20.6k, False: 12.9M]
  ------------------
25783|  20.6k|        parser->line++;
25784|  20.6k|        parser->column = 0;
25785|  12.9M|    } else if (c == '\n') {
  ------------------
  |  Branch (25785:16): [True: 214k, False: 12.7M]
  ------------------
25786|   214k|        parser->column = 0;
25787|   214k|        if (parser->lookback != '\r')
  ------------------
  |  Branch (25787:13): [True: 213k, False: 1.22k]
  ------------------
25788|   213k|            parser->line++;
25789|  12.7M|    } else {
25790|  12.7M|        parser->column++;
25791|  12.7M|    }
25792|  28.8M|    while (!consumed && !parser->error) {
  ------------------
  |  Branch (25792:12): [True: 15.8M, False: 12.9M]
  |  Branch (25792:25): [True: 15.8M, False: 785]
  ------------------
25793|  15.8M|        JanetParseState *state = parser->states + parser->statecount - 1;
25794|  15.8M|        consumed = state->consumer(parser, state, c);
25795|  15.8M|    }
25796|  12.9M|    parser->lookback = c;
25797|  12.9M|}
janet_parser_eof:
25799|   103k|void janet_parser_eof(JanetParser *parser) {
25800|   103k|    janet_parser_checkdead(parser);
25801|   103k|    size_t oldcolumn = parser->column;
25802|   103k|    size_t oldline = parser->line;
25803|   103k|    janet_parser_consume(parser, '\n');
25804|   103k|    if (parser->statecount > 1) {
  ------------------
  |  Branch (25804:9): [True: 757, False: 102k]
  ------------------
25805|    757|        delim_error(parser, parser->statecount - 1, 0, "unexpected end of source");
25806|    757|    }
25807|   103k|    parser->line = oldline;
25808|   103k|    parser->column = oldcolumn;
25809|   103k|    parser->flag |= JANET_PARSER_DEAD;
  ------------------
  |  |25111|   103k|#define JANET_PARSER_DEAD 0x1
  ------------------
25810|   103k|}
janet_parser_status:
25812|  12.9M|enum JanetParserStatus janet_parser_status(JanetParser *parser) {
25813|  12.9M|    if (parser->error) return JANET_PARSE_ERROR;
  ------------------
  |  Branch (25813:9): [True: 4.62k, False: 12.9M]
  ------------------
25814|  12.9M|    if (parser->flag) return JANET_PARSE_DEAD;
  ------------------
  |  Branch (25814:9): [True: 102k, False: 12.8M]
  ------------------
25815|  12.8M|    if (parser->statecount > 1) return JANET_PARSE_PENDING;
  ------------------
  |  Branch (25815:9): [True: 12.8M, False: 52.3k]
  ------------------
25816|  52.3k|    return JANET_PARSE_ROOT;
25817|  12.8M|}
janet_parser_flush:
25819|  2.30k|void janet_parser_flush(JanetParser *parser) {
25820|  2.30k|    parser->argcount = 0;
25821|  2.30k|    parser->statecount = 1;
25822|  2.30k|    parser->bufcount = 0;
25823|  2.30k|    parser->pending = 0;
25824|  2.30k|}
janet_parser_error:
25826|  2.30k|const char *janet_parser_error(JanetParser *parser) {
25827|  2.30k|    enum JanetParserStatus status = janet_parser_status(parser);
25828|  2.30k|    if (status == JANET_PARSE_ERROR) {
  ------------------
  |  Branch (25828:9): [True: 2.30k, False: 0]
  ------------------
25829|  2.30k|        const char *e = parser->error;
25830|  2.30k|        parser->error = NULL;
25831|  2.30k|        parser->flag &= ~JANET_PARSER_GENERATED_ERROR;
  ------------------
  |  |25112|  2.30k|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
25832|  2.30k|        janet_parser_flush(parser);
25833|  2.30k|        return e;
25834|  2.30k|    }
25835|      0|    return NULL;
25836|  2.30k|}
janet_parser_produce:
25838|   238k|Janet janet_parser_produce(JanetParser *parser) {
25839|   238k|    Janet ret;
25840|   238k|    size_t i;
25841|   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 (25841:9): [True: 0, False: 238k]
  ------------------
25842|   238k|    ret = janet_unwrap_tuple(parser->args[0])[0];
  ------------------
  |  |  853|   238k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
25843|   239k|    for (i = 1; i < parser->argcount; i++) {
  ------------------
  |  Branch (25843:17): [True: 1.25k, False: 238k]
  ------------------
25844|  1.25k|        parser->args[i - 1] = parser->args[i];
25845|  1.25k|    }
25846|   238k|    parser->pending--;
25847|   238k|    parser->argcount--;
25848|   238k|    parser->states[0].argn--;
25849|   238k|    return ret;
25850|   238k|}
janet_parser_init:
25866|   109k|void janet_parser_init(JanetParser *parser) {
25867|   109k|    parser->args = NULL;
25868|   109k|    parser->states = NULL;
25869|   109k|    parser->buf = NULL;
25870|   109k|    parser->argcount = 0;
25871|   109k|    parser->argcap = 0;
25872|   109k|    parser->bufcount = 0;
25873|   109k|    parser->bufcap = 0;
25874|   109k|    parser->statecount = 0;
25875|   109k|    parser->statecap = 0;
25876|   109k|    parser->error = NULL;
25877|   109k|    parser->lookback = -1;
25878|   109k|    parser->line = 1;
25879|   109k|    parser->column = 0;
25880|   109k|    parser->pending = 0;
25881|   109k|    parser->flag = 0;
25882|       |
25883|   109k|    pushstate(parser, root, PFLAG_CONTAINER);
  ------------------
  |  |25216|   109k|#define PFLAG_CONTAINER 0x100
  ------------------
25884|   109k|}
janet_parser_deinit:
25886|   109k|void janet_parser_deinit(JanetParser *parser) {
25887|   109k|    janet_free(parser->args);
  ------------------
  |  | 2402|   109k|#define janet_free(X) free((X))
  ------------------
25888|   109k|    janet_free(parser->buf);
  ------------------
  |  | 2402|   109k|#define janet_free(X) free((X))
  ------------------
25889|   109k|    janet_free(parser->states);
  ------------------
  |  | 2402|   109k|#define janet_free(X) free((X))
  ------------------
25890|   109k|}
janet_parser_has_more:
25937|  13.2M|int janet_parser_has_more(JanetParser *parser) {
25938|  13.2M|    return !!parser->pending;
25939|  13.2M|}
cfun_parse_parser:
25985|   102k|              "that can receive bytes and generate a stream of values.") {
25986|   102k|    (void) argv;
25987|   102k|    janet_fixarity(argc, 0);
25988|   102k|    JanetParser *p = janet_abstract(&janet_parser_type, sizeof(JanetParser));
25989|   102k|    janet_parser_init(p);
25990|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25991|   102k|}
cfun_parse_consume:
25997|     46|              "the number of bytes read.") {
25998|     46|    janet_arity(argc, 2, 3);
25999|     46|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26000|     46|    JanetByteView view = janet_getbytes(argv, 1);
26001|     46|    if (argc == 3) {
  ------------------
  |  Branch (26001:9): [True: 0, False: 46]
  ------------------
26002|      0|        int32_t offset = janet_getinteger(argv, 2);
26003|      0|        if (offset < 0 || offset > view.len)
  ------------------
  |  Branch (26003:13): [True: 0, False: 0]
  |  Branch (26003:27): [True: 0, False: 0]
  ------------------
26004|      0|            janet_panicf("invalid offset %d out of range [0,%d]", offset, view.len);
26005|      0|        view.len -= offset;
26006|      0|        view.bytes += offset;
26007|      0|    }
26008|     46|    int32_t i;
26009|  9.26k|    for (i = 0; i < view.len; i++) {
  ------------------
  |  Branch (26009:17): [True: 9.22k, False: 37]
  ------------------
26010|  9.22k|        janet_parser_consume(p, view.bytes[i]);
26011|  9.22k|        switch (janet_parser_status(p)) {
26012|  1.69k|            case JANET_PARSE_ROOT:
  ------------------
  |  Branch (26012:13): [True: 1.69k, False: 7.53k]
  ------------------
26013|  9.21k|            case JANET_PARSE_PENDING:
  ------------------
  |  Branch (26013:13): [True: 7.52k, False: 1.70k]
  ------------------
26014|  9.21k|                break;
26015|      9|            default:
  ------------------
  |  Branch (26015:13): [True: 9, False: 9.21k]
  ------------------
26016|      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)
  |  |  ------------------
  ------------------
26017|  9.22k|        }
26018|  9.22k|    }
26019|     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)
  |  |  ------------------
  ------------------
26020|     46|}
cfun_parse_eof:
26024|   102k|              "Indicate to the parser that the end of file was reached. This puts the parser in the :dead state.") {
26025|   102k|    janet_fixarity(argc, 1);
26026|   102k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26027|   102k|    janet_parser_eof(p);
26028|   102k|    return argv[0];
26029|   102k|}
cfun_parse_insert:
26035|      2|              "and tuples, for example. Returns the parser.") {
26036|      2|    janet_fixarity(argc, 2);
26037|      2|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26038|      2|    JanetParseState *s = p->states + p->statecount - 1;
26039|      2|    if (s->consumer == tokenchar) {
  ------------------
  |  Branch (26039:9): [True: 0, False: 2]
  ------------------
26040|      0|        janet_parser_consume(p, ' ');
26041|      0|        p->column--;
26042|      0|        s = p->states + p->statecount - 1;
26043|      0|    }
26044|      2|    if (s->flags & PFLAG_COMMENT) s--;
  ------------------
  |  |25225|      2|#define PFLAG_COMMENT 0x20000
  ------------------
  |  Branch (26044:9): [True: 0, False: 2]
  ------------------
26045|      2|    if (s->flags & PFLAG_CONTAINER) {
  ------------------
  |  |25216|      2|#define PFLAG_CONTAINER 0x100
  ------------------
  |  Branch (26045:9): [True: 0, False: 2]
  ------------------
26046|      0|        s->argn++;
26047|      0|        if (p->statecount == 1) {
  ------------------
  |  Branch (26047:13): [True: 0, False: 0]
  ------------------
26048|      0|            p->pending++;
26049|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26050|      0|            push_arg(p, tup);
26051|      0|        } else {
26052|      0|            push_arg(p, argv[1]);
26053|      0|        }
26054|      2|    } else if (s->flags & (PFLAG_STRING | PFLAG_LONGSTRING)) {
  ------------------
  |  |25221|      2|#define PFLAG_STRING 0x2000
  ------------------
                  } else if (s->flags & (PFLAG_STRING | PFLAG_LONGSTRING)) {
  ------------------
  |  |25222|      2|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (26054:16): [True: 0, False: 2]
  ------------------
26055|      0|        const uint8_t *str = janet_to_string(argv[1]);
26056|      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)))
  |  |  ------------------
  ------------------
26057|      0|        size_t newcount = p->bufcount + slen;
26058|      0|        if (p->bufcap < newcount) {
  ------------------
  |  Branch (26058:13): [True: 0, False: 0]
  ------------------
26059|      0|            size_t newcap = 2 * newcount;
26060|      0|            p->buf = janet_realloc(p->buf, newcap);
  ------------------
  |  | 2396|      0|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
26061|      0|            if (p->buf == NULL) {
  ------------------
  |  Branch (26061:17): [True: 0, False: 0]
  ------------------
26062|      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]
  |  |  ------------------
  ------------------
26063|      0|            }
26064|      0|            p->bufcap = newcap;
26065|      0|        }
26066|      0|        safe_memcpy(p->buf + p->bufcount, str, slen);
26067|      0|        p->bufcount = newcount;
26068|      2|    } else {
26069|      2|        janet_panic("cannot insert value into parser");
26070|      2|    }
26071|      0|    return argv[0];
26072|      2|}
cfun_parse_has_more:
26076|   102k|              "Check if the parser has more values in the value queue.") {
26077|   102k|    janet_fixarity(argc, 1);
26078|   102k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26079|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26080|   102k|}
cfun_parse_status:
26098|   102k|              "* :root - the parser can either read more values or safely terminate.") {
26099|   102k|    janet_fixarity(argc, 1);
26100|   102k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26101|   102k|    const char *stat = NULL;
26102|   102k|    switch (janet_parser_status(p)) {
  ------------------
  |  Branch (26102:13): [True: 102k, False: 1]
  ------------------
26103|     31|        case JANET_PARSE_PENDING:
  ------------------
  |  Branch (26103:9): [True: 31, False: 102k]
  ------------------
26104|     31|            stat = "pending";
26105|     31|            break;
26106|      9|        case JANET_PARSE_ERROR:
  ------------------
  |  Branch (26106:9): [True: 9, False: 102k]
  ------------------
26107|      9|            stat = "error";
26108|      9|            break;
26109|      1|        case JANET_PARSE_ROOT:
  ------------------
  |  Branch (26109:9): [True: 1, False: 102k]
  ------------------
26110|      1|            stat = "root";
26111|      1|            break;
26112|   102k|        case JANET_PARSE_DEAD:
  ------------------
  |  Branch (26112:9): [True: 102k, False: 42]
  ------------------
26113|   102k|            stat = "dead";
26114|   102k|            break;
26115|   102k|    }
26116|   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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26117|   102k|}
cfun_parse_error:
26124|      9|              "`parser/error`.") {
26125|      9|    janet_fixarity(argc, 1);
26126|      9|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26127|      9|    const char *err = janet_parser_error(p);
26128|      9|    if (err) {
  ------------------
  |  Branch (26128:9): [True: 9, False: 0]
  ------------------
26129|      9|        return (p->flag & JANET_PARSER_GENERATED_ERROR)
  ------------------
  |  |25112|      9|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
  |  Branch (26129:16): [True: 0, False: 9]
  ------------------
26130|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26131|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26132|      9|    }
26133|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26134|      9|}
cfun_parse_produce:
26142|     33|              "purposes.") {
26143|     33|    janet_arity(argc, 1, 2);
26144|     33|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26145|     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 (26145:9): [True: 0, False: 33]
  ------------------
26146|      0|        return janet_parser_produce_wrapped(p);
26147|     33|    } else {
26148|     33|        return janet_parser_produce(p);
26149|     33|    }
26150|     33|}
cfun_parse_flush:
26156|      2|              "to begin parsing in a new context, create a new parser.") {
26157|      2|    janet_fixarity(argc, 1);
26158|      2|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26159|      2|    janet_parser_flush(p);
26160|      2|    return argv[0];
26161|      2|}
cfun_parse_where:
26167|   102k|              "also provided, the current column number of the parser is also first set to that value.") {
26168|   102k|    janet_arity(argc, 1, 3);
26169|   102k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26170|   102k|    if (argc > 1) {
  ------------------
  |  Branch (26170:9): [True: 0, False: 102k]
  ------------------
26171|      0|        int32_t line = janet_getinteger(argv, 1);
26172|      0|        if (line < 1)
  ------------------
  |  Branch (26172:13): [True: 0, False: 0]
  ------------------
26173|      0|            janet_panicf("invalid line number %d", line);
26174|      0|        p->line = (size_t) line;
26175|      0|    }
26176|   102k|    if (argc > 2) {
  ------------------
  |  Branch (26176:9): [True: 0, False: 102k]
  ------------------
26177|      0|        int32_t column = janet_getinteger(argv, 2);
26178|      0|        if (column < 0)
  ------------------
  |  Branch (26178:13): [True: 0, False: 0]
  ------------------
26179|      0|            janet_panicf("invalid column number %d", column);
26180|      0|        p->column = (size_t) column;
26181|      0|    }
26182|   102k|    Janet *tup = janet_tuple_begin(2);
26183|   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)
  |  |  ------------------
  ------------------
26184|   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)
  |  |  ------------------
  ------------------
26185|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26186|   102k|}
cfun_parse_state:
26323|   102k|              "type of that expression and some type-specific information.") {
26324|   102k|    janet_arity(argc, 1, 2);
26325|   102k|    const uint8_t *key = NULL;
26326|   102k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26327|   102k|    if (argc == 2) {
  ------------------
  |  Branch (26327:9): [True: 102k, False: 0]
  ------------------
26328|   102k|        key = janet_getkeyword(argv, 1);
26329|   102k|    }
26330|       |
26331|   102k|    if (key) {
  ------------------
  |  Branch (26331:9): [True: 102k, False: 0]
  ------------------
26332|       |        /* Get one result */
26333|   102k|        for (const struct ParserStateGetter *sg = parser_state_getters;
26334|   204k|                sg->name != NULL; sg++) {
  ------------------
  |  Branch (26334:17): [True: 204k, False: 0]
  ------------------
26335|   204k|            if (janet_cstrcmp(key, sg->name)) continue;
  ------------------
  |  Branch (26335:17): [True: 102k, False: 102k]
  ------------------
26336|   102k|            return sg->fn(p);
26337|   204k|        }
26338|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26339|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26340|   102k|    } else {
26341|       |        /* Put results in table */
26342|      0|        JanetTable *tab = janet_table(0);
26343|      0|        for (const struct ParserStateGetter *sg = parser_state_getters;
26344|      0|                sg->name != NULL; sg++) {
  ------------------
  |  Branch (26344:17): [True: 0, False: 0]
  ------------------
26345|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26346|      0|        }
26347|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26348|      0|    }
26349|   102k|}
cfun_parse_clone:
26355|      1|              "if parsing later fails. Returns a new parser.") {
26356|      1|    janet_fixarity(argc, 1);
26357|      1|    JanetParser *src = janet_getabstract(argv, 0, &janet_parser_type);
26358|      1|    JanetParser *dest = janet_abstract(&janet_parser_type, sizeof(JanetParser));
26359|      1|    janet_parser_clone(src, dest);
26360|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26361|      1|}
janet_lib_parse:
26391|  7.16k|void janet_lib_parse(JanetTable *env) {
26392|  7.16k|    JanetRegExt parse_cfuns[] = {
26393|  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_}
  |  |  ------------------
  ------------------
26394|  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_}
  |  |  ------------------
  ------------------
26395|  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_}
  |  |  ------------------
  ------------------
26396|  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_}
  |  |  ------------------
  ------------------
26397|  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_}
  |  |  ------------------
  ------------------
26398|  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_}
  |  |  ------------------
  ------------------
26399|  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_}
  |  |  ------------------
  ------------------
26400|  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_}
  |  |  ------------------
  ------------------
26401|  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_}
  |  |  ------------------
  ------------------
26402|  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_}
  |  |  ------------------
  ------------------
26403|  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_}
  |  |  ------------------
  ------------------
26404|  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_}
  |  |  ------------------
  ------------------
26405|  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_}
  |  |  ------------------
  ------------------
26406|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
26407|  7.16k|    };
26408|       |    janet_core_cfuns_ext(env, NULL, parse_cfuns);
26409|  7.16k|}
cfun_peg_compile:
28339|      2|              "`default-peg-grammar` for the grammar of the peg.") {
28340|      2|    janet_fixarity(argc, 1);
28341|      2|    JanetPeg *peg = compile_peg(argv[0]);
28342|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28343|      2|}
cfun_peg_find:
28416|    205|              "Find first index where the peg matches in text. Returns an integer, or nil if not found.") {
28417|    205|    PegCall c = peg_cfun_init(argc, argv, 0);
28418|  4.44k|    for (int32_t i = c.start; i < c.bytes.len; i++) {
  ------------------
  |  Branch (28418:31): [True: 4.30k, False: 137]
  ------------------
28419|  4.30k|        peg_call_reset(&c);
28420|  4.30k|        if (peg_rule(&c.s, c.s.bytecode, c.bytes.bytes + i))
  ------------------
  |  Branch (28420:13): [True: 68, False: 4.24k]
  ------------------
28421|     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)
  |  |  ------------------
  ------------------
28422|  4.30k|    }
28423|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28424|    205|}
cfun_peg_find_all:
28428|      1|              "Find all indexes where the peg matches in text. Returns an array of integers.") {
28429|      1|    PegCall c = peg_cfun_init(argc, argv, 0);
28430|      1|    JanetArray *ret = janet_array(0);
28431|      1|    for (int32_t i = c.start; i < c.bytes.len; i++) {
  ------------------
  |  Branch (28431:31): [True: 0, False: 1]
  ------------------
28432|      0|        peg_call_reset(&c);
28433|      0|        if (peg_rule(&c.s, c.s.bytecode, c.bytes.bytes + i))
  ------------------
  |  Branch (28433:13): [True: 0, False: 0]
  ------------------
28434|      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)
  |  |  ------------------
  ------------------
28435|      0|    }
28436|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28437|      1|}
cfun_peg_replace_all:
28473|     36|              "matching text followed by any captures.") {
28474|     36|    return cfun_peg_replace_generic(argc, argv, 0);
28475|     36|}
cfun_peg_replace:
28483|    411|              "If no matches are found, returns the input string in a new buffer.") {
28484|    411|    return cfun_peg_replace_generic(argc, argv, 1);
28485|    411|}
janet_lib_peg:
28509|  7.16k|void janet_lib_peg(JanetTable *env) {
28510|  7.16k|    JanetRegExt cfuns[] = {
28511|  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_}
  |  |  ------------------
  ------------------
28512|  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_}
  |  |  ------------------
  ------------------
28513|  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_}
  |  |  ------------------
  ------------------
28514|  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_}
  |  |  ------------------
  ------------------
28515|  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_}
  |  |  ------------------
  ------------------
28516|  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_}
  |  |  ------------------
  ------------------
28517|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
28518|  7.16k|    };
28519|       |    janet_core_cfuns_ext(env, NULL, cfuns);
28520|  7.16k|    janet_register_abstract_type(&janet_peg_type);
28521|  7.16k|}
janet_to_string_b:
28749|  16.9M|void janet_to_string_b(JanetBuffer *buffer, Janet x) {
28750|  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 (28750:13): [True: 11.5M, False: 5.32M]
  ------------------
28751|    461|        case JANET_NIL:
  ------------------
  |  Branch (28751:9): [True: 461, False: 16.9M]
  ------------------
28752|    461|            janet_buffer_push_cstring(buffer, "");
28753|    461|            break;
28754|     75|        case JANET_BOOLEAN:
  ------------------
  |  Branch (28754:9): [True: 75, False: 16.9M]
  ------------------
28755|     75|            janet_buffer_push_cstring(buffer,
28756|     75|                                      janet_unwrap_boolean(x) ? "true" : "false");
  ------------------
  |  |  833|     75|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  |  |  ------------------
  |  |  |  Branch (833:33): [True: 53, False: 22]
  |  |  ------------------
  ------------------
28757|     75|            break;
28758|  5.32M|        case JANET_NUMBER:
  ------------------
  |  Branch (28758:9): [True: 5.32M, False: 11.5M]
  ------------------
28759|  5.32M|            number_to_string_b(buffer, janet_unwrap_number(x));
  ------------------
  |  |  834|  5.32M|#define janet_unwrap_number(x) ((x).number)
  ------------------
28760|  5.32M|            break;
28761|   521k|        case JANET_STRING:
  ------------------
  |  Branch (28761:9): [True: 521k, False: 16.3M]
  ------------------
28762|  11.4M|        case JANET_SYMBOL:
  ------------------
  |  Branch (28762:9): [True: 10.9M, False: 5.93M]
  ------------------
28763|  11.5M|        case JANET_KEYWORD:
  ------------------
  |  Branch (28763:9): [True: 3.80k, False: 16.9M]
  ------------------
28764|  11.5M|            janet_buffer_push_bytes(buffer,
28765|  11.5M|                                    janet_unwrap_string(x),
  ------------------
  |  |  858|  11.5M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
28766|  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)))
  |  |  ------------------
  ------------------
28767|  11.5M|            break;
28768|  18.2k|        case JANET_BUFFER: {
  ------------------
  |  Branch (28768:9): [True: 18.2k, False: 16.8M]
  ------------------
28769|  18.2k|            JanetBuffer *to = janet_unwrap_buffer(x);
  ------------------
  |  |  857|  18.2k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
28770|       |            /* Prevent resizing buffer while appending */
28771|  18.2k|            if (buffer == to) janet_buffer_extra(buffer, to->count);
  ------------------
  |  Branch (28771:17): [True: 0, False: 18.2k]
  ------------------
28772|  18.2k|            janet_buffer_push_bytes(buffer, to->data, to->count);
28773|  18.2k|            break;
28774|  11.4M|        }
28775|     44|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (28775:9): [True: 44, False: 16.9M]
  ------------------
28776|     44|            JanetAbstract p = janet_unwrap_abstract(x);
  ------------------
  |  |  861|     44|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
28777|     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)))
  |  |  ------------------
  ------------------
28778|     44|            if (t->tostring != NULL) {
  ------------------
  |  Branch (28778:17): [True: 26, False: 18]
  ------------------
28779|     26|                t->tostring(p, buffer);
28780|     26|            } else {
28781|     18|                string_description_b(buffer, t->name, p);
28782|     18|            }
28783|     44|        }
28784|     44|        return;
28785|     17|        case JANET_CFUNCTION: {
  ------------------
  |  Branch (28785:9): [True: 17, False: 16.9M]
  ------------------
28786|     17|            JanetCFunRegistry *reg = janet_registry_get(janet_unwrap_cfunction(x));
  ------------------
  |  |  864|     17|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
28787|     17|            if (NULL != reg) {
  ------------------
  |  Branch (28787:17): [True: 15, False: 2]
  ------------------
28788|     15|                janet_buffer_push_cstring(buffer, "<cfunction ");
28789|     15|                if (NULL != reg->name_prefix) {
  ------------------
  |  Branch (28789:21): [True: 0, False: 15]
  ------------------
28790|      0|                    janet_buffer_push_cstring(buffer, reg->name_prefix);
28791|      0|                    janet_buffer_push_u8(buffer, '/');
28792|      0|                }
28793|     15|                janet_buffer_push_cstring(buffer, reg->name);
28794|     15|                janet_buffer_push_u8(buffer, '>');
28795|     15|                break;
28796|     15|            }
28797|      2|            goto fallthrough;
28798|     17|        }
28799|  2.19k|        case JANET_FUNCTION: {
  ------------------
  |  Branch (28799:9): [True: 2.19k, False: 16.9M]
  ------------------
28800|  2.19k|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  863|  2.19k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
28801|  2.19k|            JanetFuncDef *def = fun->def;
28802|  2.19k|            if (def == NULL) {
  ------------------
  |  Branch (28802:17): [True: 0, False: 2.19k]
  ------------------
28803|      0|                janet_buffer_push_cstring(buffer, "<incomplete function>");
28804|      0|                break;
28805|      0|            }
28806|  2.19k|            if (def->name) {
  ------------------
  |  Branch (28806:17): [True: 2.17k, False: 23]
  ------------------
28807|  2.17k|                const uint8_t *n = def->name;
28808|  2.17k|                janet_buffer_push_cstring(buffer, "<function ");
28809|  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)))
  |  |  ------------------
  ------------------
28810|  2.17k|                janet_buffer_push_u8(buffer, '>');
28811|  2.17k|                break;
28812|  2.17k|            }
28813|     23|            goto fallthrough;
28814|  2.19k|        }
28815|     25|    fallthrough:
28816|  66.9k|        default:
  ------------------
  |  Branch (28816:9): [True: 66.9k, False: 16.8M]
  ------------------
28817|  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 (28817:59): [True: 66.9k, False: 0]
  ------------------
28818|  66.9k|            break;
28819|  16.9M|    }
28820|  16.9M|}
janet_description_b:
28835|   415k|void janet_description_b(JanetBuffer *buffer, Janet x) {
28836|   415k|    switch (janet_type(x)) {
  ------------------
  |  |  790|   415k|    (isnan((x).number) \
  |  |  791|   415k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   415k|        : JANET_NUMBER)
  ------------------
  |  Branch (28836:13): [True: 411k, False: 4.30k]
  ------------------
28837|   403k|        default:
  ------------------
  |  Branch (28837:9): [True: 403k, False: 12.1k]
  ------------------
28838|   403k|            break;
28839|   403k|        case JANET_NIL:
  ------------------
  |  Branch (28839:9): [True: 70, False: 415k]
  ------------------
28840|     70|            janet_buffer_push_cstring(buffer, "nil");
28841|     70|            return;
28842|  3.14k|        case JANET_KEYWORD:
  ------------------
  |  Branch (28842:9): [True: 3.14k, False: 412k]
  ------------------
28843|  3.14k|            janet_buffer_push_u8(buffer, ':');
28844|  3.14k|            break;
28845|  7.32k|        case JANET_STRING:
  ------------------
  |  Branch (28845:9): [True: 7.32k, False: 408k]
  ------------------
28846|  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))
  ------------------
28847|  7.32k|            return;
28848|  1.40k|        case JANET_BUFFER: {
  ------------------
  |  Branch (28848:9): [True: 1.40k, False: 414k]
  ------------------
28849|  1.40k|            JanetBuffer *b = janet_unwrap_buffer(x);
  ------------------
  |  |  857|  1.40k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
28850|  1.40k|            janet_escape_buffer_b(buffer, b);
28851|  1.40k|            return;
28852|      0|        }
28853|    229|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (28853:9): [True: 229, False: 415k]
  ------------------
28854|    229|            JanetAbstract p = janet_unwrap_abstract(x);
  ------------------
  |  |  861|    229|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
28855|    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)))
  |  |  ------------------
  ------------------
28856|    229|            if (t->tostring != NULL) {
  ------------------
  |  Branch (28856:17): [True: 203, False: 26]
  ------------------
28857|    203|                janet_buffer_push_cstring(buffer, "<");
28858|    203|                janet_buffer_push_cstring(buffer, t->name);
28859|    203|                janet_buffer_push_cstring(buffer, " ");
28860|    203|                t->tostring(p, buffer);
28861|    203|                janet_buffer_push_cstring(buffer, ">");
28862|    203|            } else {
28863|     26|                string_description_b(buffer, t->name, p);
28864|     26|            }
28865|    229|            return;
28866|      0|        }
28867|   415k|    }
28868|   406k|    janet_to_string_b(buffer, x);
28869|   406k|}
janet_to_string:
28882|  7.88k|const uint8_t *janet_to_string(Janet x) {
28883|  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 (28883:13): [True: 7.82k, False: 65]
  ------------------
28884|    792|        default: {
  ------------------
  |  Branch (28884:9): [True: 792, False: 7.09k]
  ------------------
28885|    792|            JanetBuffer b;
28886|    792|            janet_buffer_init(&b, 10);
28887|    792|            janet_to_string_b(&b, x);
28888|    792|            const uint8_t *ret = janet_string(b.data, b.count);
28889|    792|            janet_buffer_deinit(&b);
28890|    792|            return ret;
28891|      0|        }
28892|      0|        case JANET_BUFFER:
  ------------------
  |  Branch (28892:9): [True: 0, False: 7.88k]
  ------------------
28893|      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))
  ------------------
28894|  5.56k|        case JANET_STRING:
  ------------------
  |  Branch (28894:9): [True: 5.56k, False: 2.32k]
  ------------------
28895|  6.47k|        case JANET_SYMBOL:
  ------------------
  |  Branch (28895:9): [True: 907, False: 6.98k]
  ------------------
28896|  7.09k|        case JANET_KEYWORD:
  ------------------
  |  Branch (28896:9): [True: 624, False: 7.26k]
  ------------------
28897|  7.09k|            return janet_unwrap_string(x);
  ------------------
  |  |  858|  7.09k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
28898|  7.88k|    }
28899|  7.88k|}
janet_formatbv:
29493|   201k|void janet_formatbv(JanetBuffer *b, const char *format, va_list args) {
29494|   201k|    const char *format_end = format + strlen(format);
29495|   201k|    const char *c = format;
29496|   201k|    int32_t startlen = b->count;
29497|  2.00M|    while (c < format_end) {
  ------------------
  |  Branch (29497:12): [True: 1.80M, False: 201k]
  ------------------
29498|  1.80M|        if (*c != '%') {
  ------------------
  |  Branch (29498:13): [True: 1.61M, False: 185k]
  ------------------
29499|  1.61M|            janet_buffer_push_u8(b, (uint8_t) *c++);
29500|  1.61M|        } else if (*++c == '%') {
  ------------------
  |  Branch (29500:20): [True: 0, False: 185k]
  ------------------
29501|      0|            janet_buffer_push_u8(b, (uint8_t) *c++);
29502|   185k|        } else {
29503|   185k|            char form[MAX_FORMAT], item[MAX_ITEM];
29504|   185k|            char width[3], precision[3];
29505|   185k|            int nb = 0; /* number of bytes in added item */
29506|   185k|            c = scanformat(c, form, width, precision);
29507|   185k|            switch (*c++) {
29508|     33|                case 'c': {
  ------------------
  |  Branch (29508:17): [True: 33, False: 185k]
  ------------------
29509|     33|                    int n = va_arg(args, int);
29510|     33|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |29416|     33|#define MAX_ITEM  256
  ------------------
29511|     33|                    break;
29512|      0|                }
29513|  77.5k|                case 'd':
  ------------------
  |  Branch (29513:17): [True: 77.5k, False: 107k]
  ------------------
29514|  77.5k|                case 'i': {
  ------------------
  |  Branch (29514:17): [True: 0, False: 185k]
  ------------------
29515|  77.5k|                    int64_t n = (int64_t) va_arg(args, int32_t);
29516|  77.5k|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |29416|  77.5k|#define MAX_ITEM  256
  ------------------
29517|  77.5k|                    break;
29518|  77.5k|                }
29519|      0|                case 'D':
  ------------------
  |  Branch (29519:17): [True: 0, False: 185k]
  ------------------
29520|      0|                case 'I': {
  ------------------
  |  Branch (29520:17): [True: 0, False: 185k]
  ------------------
29521|      0|                    int64_t n = va_arg(args, int64_t);
29522|      0|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |29416|      0|#define MAX_ITEM  256
  ------------------
29523|      0|                    break;
29524|      0|                }
29525|     10|                case 'x':
  ------------------
  |  Branch (29525:17): [True: 10, False: 185k]
  ------------------
29526|     10|                case 'X':
  ------------------
  |  Branch (29526:17): [True: 0, False: 185k]
  ------------------
29527|     10|                case 'o':
  ------------------
  |  Branch (29527:17): [True: 0, False: 185k]
  ------------------
29528|     10|                case 'u': {
  ------------------
  |  Branch (29528:17): [True: 0, False: 185k]
  ------------------
29529|     10|                    uint64_t n = va_arg(args, uint64_t);
29530|     10|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |29416|     10|#define MAX_ITEM  256
  ------------------
29531|     10|                    break;
29532|     10|                }
29533|      0|                case 'a':
  ------------------
  |  Branch (29533:17): [True: 0, False: 185k]
  ------------------
29534|      0|                case 'A':
  ------------------
  |  Branch (29534:17): [True: 0, False: 185k]
  ------------------
29535|      0|                case 'e':
  ------------------
  |  Branch (29535:17): [True: 0, False: 185k]
  ------------------
29536|      0|                case 'E':
  ------------------
  |  Branch (29536:17): [True: 0, False: 185k]
  ------------------
29537|      5|                case 'f':
  ------------------
  |  Branch (29537:17): [True: 5, False: 185k]
  ------------------
29538|      5|                case 'g':
  ------------------
  |  Branch (29538:17): [True: 0, False: 185k]
  ------------------
29539|      5|                case 'G': {
  ------------------
  |  Branch (29539:17): [True: 0, False: 185k]
  ------------------
29540|      5|                    double d = va_arg(args, double);
29541|      5|                    nb = snprintf(item, MAX_ITEM, form, d);
  ------------------
  |  |29416|      5|#define MAX_ITEM  256
  ------------------
29542|      5|                    break;
29543|      5|                }
29544|  90.4k|                case 's':
  ------------------
  |  Branch (29544:17): [True: 90.4k, False: 94.9k]
  ------------------
29545|  90.5k|                case 'S': {
  ------------------
  |  Branch (29545:17): [True: 59, False: 185k]
  ------------------
29546|  90.5k|                    const char *str = va_arg(args, const char *);
29547|  90.5k|                    int32_t len = (c[-1] == 's')
  ------------------
  |  Branch (29547:35): [True: 90.4k, False: 59]
  ------------------
29548|  90.5k|                                  ? (int32_t) strlen(str)
29549|  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)))
  |  |  ------------------
  ------------------
29550|  90.5k|                    if (form[2] == '\0')
  ------------------
  |  Branch (29550:25): [True: 90.5k, False: 0]
  ------------------
29551|  90.5k|                        janet_buffer_push_bytes(b, (const uint8_t *) str, len);
29552|      0|                    else {
29553|      0|                        if (len != (int32_t) strlen((const char *) str))
  ------------------
  |  Branch (29553:29): [True: 0, False: 0]
  ------------------
29554|      0|                            janet_panic("string contains zeros");
29555|      0|                        if (!strchr(form, '.') && len >= 100) {
  ------------------
  |  Branch (29555:29): [True: 0, False: 0]
  |  Branch (29555:51): [True: 0, False: 0]
  ------------------
29556|      0|                            janet_panic("no precision and string is too long to be formatted");
29557|      0|                        } else {
29558|      0|                            nb = snprintf(item, MAX_ITEM, form, str);
  ------------------
  |  |29416|      0|#define MAX_ITEM  256
  ------------------
29559|      0|                        }
29560|      0|                    }
29561|  90.5k|                    break;
29562|  90.5k|                }
29563|  90.5k|                case 'V':
  ------------------
  |  Branch (29563:17): [True: 478, False: 184k]
  ------------------
29564|    478|                    janet_to_string_b(b, va_arg(args, Janet));
29565|    478|                    break;
29566|  14.0k|                case 'v':
  ------------------
  |  Branch (29566:17): [True: 14.0k, False: 171k]
  ------------------
29567|  14.0k|                    janet_description_b(b, va_arg(args, Janet));
29568|  14.0k|                    break;
29569|    164|                case 't':
  ------------------
  |  Branch (29569:17): [True: 164, False: 185k]
  ------------------
29570|    164|                    janet_buffer_push_cstring(b, typestr(va_arg(args, Janet)));
29571|    164|                    break;
29572|    637|                case 'T': {
  ------------------
  |  Branch (29572:17): [True: 637, False: 184k]
  ------------------
29573|    637|                    int types = va_arg(args, int);
29574|    637|                    pushtypes(b, types);
29575|    637|                    break;
29576|  90.5k|                }
29577|      0|                case 'M':
  ------------------
  |  Branch (29577:17): [True: 0, False: 185k]
  ------------------
29578|      0|                case 'm':
  ------------------
  |  Branch (29578:17): [True: 0, False: 185k]
  ------------------
29579|      0|                case 'N':
  ------------------
  |  Branch (29579:17): [True: 0, False: 185k]
  ------------------
29580|      0|                case 'n':
  ------------------
  |  Branch (29580:17): [True: 0, False: 185k]
  ------------------
29581|      0|                case 'Q':
  ------------------
  |  Branch (29581:17): [True: 0, False: 185k]
  ------------------
29582|  1.77k|                case 'q':
  ------------------
  |  Branch (29582:17): [True: 1.77k, False: 183k]
  ------------------
29583|  1.77k|                case 'P':
  ------------------
  |  Branch (29583:17): [True: 0, False: 185k]
  ------------------
29584|  1.93k|                case 'p': { /* janet pretty , precision = depth */
  ------------------
  |  Branch (29584:17): [True: 161, False: 185k]
  ------------------
29585|  1.93k|                    int depth = atoi(precision);
29586|  1.93k|                    if (depth < 1) depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  291|  1.93k|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (29586:25): [True: 1.93k, False: 0]
  ------------------
29587|  1.93k|                    char d = c[-1];
29588|  1.93k|                    int has_color = (d == 'P') || (d == 'Q') || (d == 'M') || (d == 'N');
  ------------------
  |  Branch (29588:37): [True: 0, False: 1.93k]
  |  Branch (29588:51): [True: 0, False: 1.93k]
  |  Branch (29588:65): [True: 0, False: 1.93k]
  |  Branch (29588:79): [True: 0, False: 1.93k]
  ------------------
29589|  1.93k|                    int has_oneline = (d == 'Q') || (d == 'q') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (29589:39): [True: 0, False: 1.93k]
  |  Branch (29589:53): [True: 1.77k, False: 161]
  |  Branch (29589:67): [True: 0, False: 161]
  |  Branch (29589:81): [True: 0, False: 161]
  ------------------
29590|  1.93k|                    int has_notrunc = (d == 'M') || (d == 'm') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (29590:39): [True: 0, False: 1.93k]
  |  Branch (29590:53): [True: 0, False: 1.93k]
  |  Branch (29590:67): [True: 0, False: 1.93k]
  |  Branch (29590:81): [True: 0, False: 1.93k]
  ------------------
29591|  1.93k|                    int columns = atoi(width);
29592|  1.93k|                    if (columns == 0) {
  ------------------
  |  Branch (29592:25): [True: 1.93k, False: 0]
  ------------------
29593|  1.93k|                        columns = JANET_COLUMNS;
  ------------------
  |  |29329|  1.93k|#define JANET_COLUMNS 80
  ------------------
29594|  1.93k|                    } else if (columns < 0) {
  ------------------
  |  Branch (29594:32): [True: 0, False: 0]
  ------------------
29595|      0|                        has_oneline = 1;
29596|      0|                    }
29597|  1.93k|                    int flags = 0;
29598|  1.93k|                    flags |= has_color ? JANET_PRETTY_COLOR : 0;
  ------------------
  |  | 1957|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29598:30): [True: 0, False: 1.93k]
  ------------------
29599|  1.93k|                    flags |= has_oneline ? JANET_PRETTY_ONELINE : 0;
  ------------------
  |  | 1958|  1.77k|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (29599:30): [True: 1.77k, False: 161]
  ------------------
29600|  1.93k|                    flags |= has_notrunc ? JANET_PRETTY_NOTRUNC : 0;
  ------------------
  |  | 1959|      0|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (29600:30): [True: 0, False: 1.93k]
  ------------------
29601|  1.93k|                    janet_pretty_(b, depth, columns, flags,
29602|  1.93k|                                  va_arg(args, Janet), startlen, b->count);
29603|  1.93k|                    break;
29604|  1.77k|                }
29605|      0|                case 'j': {
  ------------------
  |  Branch (29605:17): [True: 0, False: 185k]
  ------------------
29606|      0|                    int depth = atoi(precision);
29607|      0|                    if (depth < 1) {
  ------------------
  |  Branch (29607:25): [True: 0, False: 0]
  ------------------
29608|      0|                        depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  291|      0|#define JANET_RECURSION_GUARD 1024
  ------------------
29609|      0|                    }
29610|      0|                    janet_jdn_(b, depth, va_arg(args, Janet), startlen, b->count);
29611|      0|                    break;
29612|  1.77k|                }
29613|      0|                default: {
  ------------------
  |  Branch (29613:17): [True: 0, False: 185k]
  ------------------
29614|       |                    /* also treat cases 'nLlh' */
29615|      0|                    janet_panicf("invalid conversion '%s' to 'format'",
29616|      0|                                 form);
29617|  1.77k|                }
29618|   185k|            }
29619|   185k|            if (nb >= MAX_ITEM)
  ------------------
  |  |29416|   185k|#define MAX_ITEM  256
  ------------------
  |  Branch (29619:17): [True: 0, False: 185k]
  ------------------
29620|      0|                janet_panic("format buffer overflow");
29621|   185k|            if (nb > 0)
  ------------------
  |  Branch (29621:17): [True: 77.5k, False: 107k]
  ------------------
29622|  77.5k|                janet_buffer_push_bytes(b, (uint8_t *) item, nb);
29623|   185k|        }
29624|       |
29625|  1.80M|    }
29626|   201k|}
janet_formatc:
29630|  21.3k|const uint8_t *janet_formatc(const char *format, ...) {
29631|  21.3k|    va_list args;
29632|  21.3k|    const uint8_t *ret;
29633|  21.3k|    JanetBuffer buffer;
29634|  21.3k|    int32_t len = 0;
29635|       |
29636|       |    /* Calculate length, init buffer and args */
29637|   676k|    while (format[len]) len++;
  ------------------
  |  Branch (29637:12): [True: 655k, False: 21.3k]
  ------------------
29638|  21.3k|    janet_buffer_init(&buffer, len);
29639|  21.3k|    va_start(args, format);
29640|       |
29641|       |    /* Run format */
29642|  21.3k|    janet_formatbv(&buffer, format, args);
29643|       |
29644|       |    /* Iterate length */
29645|  21.3k|    va_end(args);
29646|       |
29647|  21.3k|    ret = janet_string(buffer.data, buffer.count);
29648|  21.3k|    janet_buffer_deinit(&buffer);
29649|  21.3k|    return ret;
29650|  21.3k|}
janet_formatb:
29652|  1.12k|JanetBuffer *janet_formatb(JanetBuffer *buffer, const char *format, ...) {
29653|  1.12k|    va_list args;
29654|  1.12k|    va_start(args, format);
29655|  1.12k|    janet_formatbv(buffer, format, args);
29656|       |    va_end(args);
29657|  1.12k|    return buffer;
29658|  1.12k|}
janet_buffer_format:
29667|    719|    Janet *argv) {
29668|    719|    size_t sfl = strlen(strfrmt);
29669|    719|    const char *strfrmt_end = strfrmt + sfl;
29670|    719|    int32_t arg = argstart;
29671|    719|    int32_t startlen = b->count;
29672|  27.5k|    while (strfrmt < strfrmt_end) {
  ------------------
  |  Branch (29672:12): [True: 26.8k, False: 633]
  ------------------
29673|  26.8k|        if (*strfrmt != '%')
  ------------------
  |  Branch (29673:13): [True: 26.0k, False: 881]
  ------------------
29674|  26.0k|            janet_buffer_push_u8(b, (uint8_t) * strfrmt++);
29675|    881|        else if (*++strfrmt == '%')
  ------------------
  |  Branch (29675:18): [True: 71, False: 810]
  ------------------
29676|     71|            janet_buffer_push_u8(b, (uint8_t) * strfrmt++); /* %% */
29677|    810|        else { /* format item */
29678|    810|            char form[MAX_FORMAT], item[MAX_ITEM];
29679|    810|            char width[3], precision[3];
29680|    810|            int nb = 0; /* number of bytes in added item */
29681|       |#ifdef JANET_PLAN9
29682|       |            if (*strfrmt == 'r') {
29683|       |                rerrstr(item, MAX_ITEM);
29684|       |                nb = strlen(item);
29685|       |            } else
29686|       |#endif
29687|    810|                if (++arg >= argc)
  ------------------
  |  Branch (29687:21): [True: 11, False: 799]
  ------------------
29688|     11|                    janet_panic("not enough values for format");
29689|    799|            strfrmt = scanformat(strfrmt, form, width, precision);
29690|    799|            switch (*strfrmt++) {
29691|       |#ifdef JANET_PLAN9
29692|       |                case 'r':
29693|       |                    break;
29694|       |#endif
29695|      7|                case 'c': {
  ------------------
  |  Branch (29695:17): [True: 7, False: 792]
  ------------------
29696|      7|                    nb = snprintf(item, MAX_ITEM, form, (int)
  ------------------
  |  |29416|      7|#define MAX_ITEM  256
  ------------------
29697|      7|                                  janet_getinteger(argv, arg));
29698|      7|                    break;
29699|      0|                }
29700|      1|                case 'D':
  ------------------
  |  Branch (29700:17): [True: 1, False: 798]
  ------------------
29701|      5|                case 'I':
  ------------------
  |  Branch (29701:17): [True: 4, False: 795]
  ------------------
29702|      9|                case 'd':
  ------------------
  |  Branch (29702:17): [True: 4, False: 795]
  ------------------
29703|     12|                case 'i': {
  ------------------
  |  Branch (29703:17): [True: 3, False: 796]
  ------------------
29704|     12|                    int64_t n = janet_getinteger64(argv, arg);
29705|     12|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |29416|     12|#define MAX_ITEM  256
  ------------------
29706|     12|                    break;
29707|      9|                }
29708|      6|                case 'x':
  ------------------
  |  Branch (29708:17): [True: 6, False: 793]
  ------------------
29709|      8|                case 'X':
  ------------------
  |  Branch (29709:17): [True: 2, False: 797]
  ------------------
29710|     11|                case 'o':
  ------------------
  |  Branch (29710:17): [True: 3, False: 796]
  ------------------
29711|     15|                case 'u': {
  ------------------
  |  Branch (29711:17): [True: 4, False: 795]
  ------------------
29712|     15|                    uint64_t n = janet_getuinteger64(argv, arg);
29713|     15|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |29416|     15|#define MAX_ITEM  256
  ------------------
29714|     15|                    break;
29715|     11|                }
29716|      1|                case 'a':
  ------------------
  |  Branch (29716:17): [True: 1, False: 798]
  ------------------
29717|      2|                case 'A':
  ------------------
  |  Branch (29717:17): [True: 1, False: 798]
  ------------------
29718|      3|                case 'e':
  ------------------
  |  Branch (29718:17): [True: 1, False: 798]
  ------------------
29719|      3|                case 'E':
  ------------------
  |  Branch (29719:17): [True: 0, False: 799]
  ------------------
29720|      3|                case 'f':
  ------------------
  |  Branch (29720:17): [True: 0, False: 799]
  ------------------
29721|     12|                case 'g':
  ------------------
  |  Branch (29721:17): [True: 9, False: 790]
  ------------------
29722|     15|                case 'G': {
  ------------------
  |  Branch (29722:17): [True: 3, False: 796]
  ------------------
29723|     15|                    double d = janet_getnumber(argv, arg);
29724|     15|                    nb = snprintf(item, MAX_ITEM, form, d);
  ------------------
  |  |29416|     15|#define MAX_ITEM  256
  ------------------
29725|     15|                    break;
29726|     12|                }
29727|     27|                case 's': {
  ------------------
  |  Branch (29727:17): [True: 27, False: 772]
  ------------------
29728|     27|                    const char *s = janet_getcbytes(argv, arg);
29729|     27|                    if (form[2] == '\0')
  ------------------
  |  Branch (29729:25): [True: 6, False: 21]
  ------------------
29730|      6|                        janet_buffer_push_cstring(b, s);
29731|     21|                    else {
29732|     21|                        nb = snprintf(item, MAX_ITEM, form, s);
  ------------------
  |  |29416|     21|#define MAX_ITEM  256
  ------------------
29733|     21|                    }
29734|     27|                    break;
29735|     12|                }
29736|      6|                case 'V': {
  ------------------
  |  Branch (29736:17): [True: 6, False: 793]
  ------------------
29737|      6|                    janet_to_string_b(b, argv[arg]);
29738|      6|                    break;
29739|     12|                }
29740|      3|                case 'v': {
  ------------------
  |  Branch (29740:17): [True: 3, False: 796]
  ------------------
29741|      3|                    janet_description_b(b, argv[arg]);
29742|      3|                    break;
29743|     12|                }
29744|     27|                case 't':
  ------------------
  |  Branch (29744:17): [True: 27, False: 772]
  ------------------
29745|     27|                    janet_buffer_push_cstring(b, typestr(argv[arg]));
29746|     27|                    break;
29747|     50|                case 'M':
  ------------------
  |  Branch (29747:17): [True: 50, False: 749]
  ------------------
29748|     53|                case 'm':
  ------------------
  |  Branch (29748:17): [True: 3, False: 796]
  ------------------
29749|     59|                case 'N':
  ------------------
  |  Branch (29749:17): [True: 6, False: 793]
  ------------------
29750|     70|                case 'n':
  ------------------
  |  Branch (29750:17): [True: 11, False: 788]
  ------------------
29751|     76|                case 'Q':
  ------------------
  |  Branch (29751:17): [True: 6, False: 793]
  ------------------
29752|     78|                case 'q':
  ------------------
  |  Branch (29752:17): [True: 2, False: 797]
  ------------------
29753|     82|                case 'P':
  ------------------
  |  Branch (29753:17): [True: 4, False: 795]
  ------------------
29754|     85|                case 'p': { /* janet pretty , precision = depth */
  ------------------
  |  Branch (29754:17): [True: 3, False: 796]
  ------------------
29755|     85|                    int depth = atoi(precision);
29756|     85|                    if (depth < 1) depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  291|     82|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (29756:25): [True: 82, False: 3]
  ------------------
29757|     85|                    char d = strfrmt[-1];
29758|     85|                    int has_color = (d == 'P') || (d == 'Q') || (d == 'M') || (d == 'N');
  ------------------
  |  Branch (29758:37): [True: 4, False: 81]
  |  Branch (29758:51): [True: 6, False: 75]
  |  Branch (29758:65): [True: 50, False: 25]
  |  Branch (29758:79): [True: 6, False: 19]
  ------------------
29759|     85|                    int has_oneline = (d == 'Q') || (d == 'q') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (29759:39): [True: 6, False: 79]
  |  Branch (29759:53): [True: 2, False: 77]
  |  Branch (29759:67): [True: 6, False: 71]
  |  Branch (29759:81): [True: 11, False: 60]
  ------------------
29760|     85|                    int has_notrunc = (d == 'M') || (d == 'm') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (29760:39): [True: 50, False: 35]
  |  Branch (29760:53): [True: 3, False: 32]
  |  Branch (29760:67): [True: 6, False: 26]
  |  Branch (29760:81): [True: 11, False: 15]
  ------------------
29761|     85|                    int columns = atoi(width);
29762|     85|                    if (columns == 0)
  ------------------
  |  Branch (29762:25): [True: 81, False: 4]
  ------------------
29763|     81|                        columns = JANET_COLUMNS;
  ------------------
  |  |29329|     81|#define JANET_COLUMNS 80
  ------------------
29764|      4|                    else if (columns < 0)
  ------------------
  |  Branch (29764:30): [True: 0, False: 4]
  ------------------
29765|      0|                        has_oneline = 1;
29766|     85|                    int flags = 0;
29767|     85|                    flags |= has_color ? JANET_PRETTY_COLOR : 0;
  ------------------
  |  | 1957|     66|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29767:30): [True: 66, False: 19]
  ------------------
29768|     85|                    flags |= has_oneline ? JANET_PRETTY_ONELINE : 0;
  ------------------
  |  | 1958|     25|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (29768:30): [True: 25, False: 60]
  ------------------
29769|     85|                    flags |= has_notrunc ? JANET_PRETTY_NOTRUNC : 0;
  ------------------
  |  | 1959|     70|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (29769:30): [True: 70, False: 15]
  ------------------
29770|     85|                    janet_pretty_(b, depth, columns, flags,
29771|     85|                                  argv[arg], startlen, b->count);
29772|     85|                    break;
29773|     82|                }
29774|    573|                case 'j': {
  ------------------
  |  Branch (29774:17): [True: 573, False: 226]
  ------------------
29775|    573|                    int depth = atoi(precision);
29776|    573|                    if (depth < 1)
  ------------------
  |  Branch (29776:25): [True: 569, False: 4]
  ------------------
29777|    569|                        depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  291|    569|#define JANET_RECURSION_GUARD 1024
  ------------------
29778|    573|                    janet_jdn_(b, depth, argv[arg], startlen, b->count);
29779|    573|                    break;
29780|     82|                }
29781|     23|                default: {
  ------------------
  |  Branch (29781:17): [True: 23, False: 776]
  ------------------
29782|       |                    /* also treat cases 'nLlh' */
29783|     23|                    janet_panicf("invalid conversion '%s' to 'format'",
29784|     23|                                 form);
29785|     82|                }
29786|    799|            }
29787|    725|            if (nb >= MAX_ITEM)
  ------------------
  |  |29416|    725|#define MAX_ITEM  256
  ------------------
  |  Branch (29787:17): [True: 1, False: 724]
  ------------------
29788|      1|                janet_panic("format buffer overflow");
29789|    724|            if (nb > 0)
  ------------------
  |  Branch (29789:17): [True: 26, False: 698]
  ------------------
29790|     26|                janet_buffer_push_bytes(b, (uint8_t *) item, nb);
29791|    724|        }
29792|  26.8k|    }
29793|    719|}
janetc_regalloc_init:
29833|  2.18M|void janetc_regalloc_init(JanetcRegisterAllocator *ra) {
29834|       |    ra->chunks = NULL;
29835|  2.18M|    ra->count = 0;
29836|  2.18M|    ra->capacity = 0;
29837|  2.18M|    ra->max = 0;
29838|  2.18M|    ra->regtemps = 0;
29839|  2.18M|}
janetc_regalloc_deinit:
29841|  2.21M|void janetc_regalloc_deinit(JanetcRegisterAllocator *ra) {
29842|  2.21M|    janet_free(ra->chunks);
  ------------------
  |  | 2402|  2.21M|#define janet_free(X) free((X))
  ------------------
29843|  2.21M|}
janetc_regalloc_clone:
29868|  30.2k|void janetc_regalloc_clone(JanetcRegisterAllocator *dest, JanetcRegisterAllocator *src) {
29869|  30.2k|    size_t size;
29870|  30.2k|    dest->count = src->count;
29871|  30.2k|    dest->capacity = src->capacity;
29872|  30.2k|    dest->max = src->max;
29873|  30.2k|    size = sizeof(uint32_t) * (size_t) dest->capacity;
29874|  30.2k|    dest->regtemps = 0;
29875|  30.2k|    if (size) {
  ------------------
  |  Branch (29875:9): [True: 28.0k, False: 2.20k]
  ------------------
29876|  28.0k|        dest->chunks = janet_malloc(size);
  ------------------
  |  | 2393|  28.0k|#define janet_malloc(X) malloc((X))
  ------------------
29877|  28.0k|        if (!dest->chunks) {
  ------------------
  |  Branch (29877:13): [True: 0, False: 28.0k]
  ------------------
29878|      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]
  |  |  ------------------
  ------------------
29879|      0|        }
29880|  28.0k|        memcpy(dest->chunks, src->chunks, size);
29881|  28.0k|    } else {
29882|       |        dest->chunks = NULL;
29883|  2.20k|    }
29884|  30.2k|}
janetc_regalloc_touch:
29904|   122M|void janetc_regalloc_touch(JanetcRegisterAllocator *ra, int32_t reg) {
29905|   122M|    int32_t chunk = reg >> 5;
29906|   122M|    int32_t bit = reg & 0x1F;
29907|   125M|    while (chunk >= ra->count) pushchunk(ra);
  ------------------
  |  Branch (29907:12): [True: 3.33M, False: 122M]
  ------------------
29908|   122M|    ra->chunks[chunk] |= ithbit(bit);
  ------------------
  |  |29862|   122M|#define ithbit(I) ((uint32_t)1 << (I))
  ------------------
29909|   122M|}
janetc_regalloc_1:
29912|  20.1M|int32_t janetc_regalloc_1(JanetcRegisterAllocator *ra) {
29913|       |    /* Get the nth bit in the array */
29914|  20.1M|    int32_t bit, chunk, nchunks, reg;
29915|  20.1M|    bit = -1;
29916|  20.1M|    nchunks = ra->count;
29917|  10.8G|    for (chunk = 0; chunk < nchunks; chunk++) {
  ------------------
  |  Branch (29917:21): [True: 10.8G, False: 1.17M]
  ------------------
29918|  10.8G|        uint32_t block = ra->chunks[chunk];
29919|  10.8G|        if (block == 0xFFFFFFFF) continue;
  ------------------
  |  Branch (29919:13): [True: 10.8G, False: 18.9M]
  ------------------
29920|  18.9M|        bit = count_trailing_ones(block);
  ------------------
  |  |29848|  18.9M|#define count_trailing_ones(x) __builtin_ctz(~(x))
  ------------------
29921|  18.9M|        break;
29922|  10.8G|    }
29923|       |    /* No reg found */
29924|  20.1M|    if (bit == -1) {
  ------------------
  |  Branch (29924:9): [True: 1.17M, False: 18.9M]
  ------------------
29925|  1.17M|        pushchunk(ra);
29926|  1.17M|        bit = 0;
29927|  1.17M|        chunk = nchunks;
29928|  1.17M|    }
29929|       |    /* set the bit at index bit in chunk */
29930|  20.1M|    ra->chunks[chunk] |= ithbit(bit);
  ------------------
  |  |29862|  20.1M|#define ithbit(I) ((uint32_t)1 << (I))
  ------------------
29931|  20.1M|    reg = (chunk << 5) + bit;
29932|  20.1M|    if (reg > ra->max)
  ------------------
  |  Branch (29932:9): [True: 15.2M, False: 4.92M]
  ------------------
29933|  15.2M|        ra->max = reg;
29934|  20.1M|    return reg;
29935|  20.1M|}
janetc_regalloc_free:
29939|  5.63M|void janetc_regalloc_free(JanetcRegisterAllocator *ra, int32_t reg) {
29940|  5.63M|    int32_t chunk = reg >> 5;
29941|  5.63M|    int32_t bit = reg & 0x1F;
29942|  5.63M|    ra->chunks[chunk] &= ~ithbit(bit);
  ------------------
  |  |29862|  5.63M|#define ithbit(I) ((uint32_t)1 << (I))
  ------------------
29943|  5.63M|}
janetc_regalloc_check:
29946|   118M|int janetc_regalloc_check(JanetcRegisterAllocator *ra, int32_t reg) {
29947|   118M|    int32_t chunk = reg >> 5;
29948|   118M|    int32_t bit = reg & 0x1F;
29949|   118M|    while (chunk >= ra->count) pushchunk(ra);
  ------------------
  |  Branch (29949:12): [True: 817, False: 118M]
  ------------------
29950|   118M|    return !!(ra->chunks[chunk] & ithbit(bit));
  ------------------
  |  |29862|   118M|#define ithbit(I) ((uint32_t)1 << (I))
  ------------------
29951|   118M|}
janetc_regalloc_temp:
29956|  8.70M|int32_t janetc_regalloc_temp(JanetcRegisterAllocator *ra, JanetcRegisterTemp nth) {
29957|  8.70M|    int32_t oldmax = ra->max;
29958|  8.70M|    if (ra->regtemps & (1 << nth)) {
  ------------------
  |  Branch (29958:9): [True: 0, False: 8.70M]
  ------------------
29959|      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]
  |  |  ------------------
  ------------------
29960|      0|    }
29961|  8.70M|    ra->regtemps |= 1 << nth;
29962|  8.70M|    int32_t reg = janetc_regalloc_1(ra);
29963|  8.70M|    if (reg > 0xFF) {
  ------------------
  |  Branch (29963:9): [True: 7.51M, False: 1.19M]
  ------------------
29964|  7.51M|        reg = 0xF0 + nth;
29965|  7.51M|        ra->max = (reg > oldmax) ? reg : oldmax;
  ------------------
  |  Branch (29965:19): [True: 116, False: 7.51M]
  ------------------
29966|  7.51M|    }
29967|  8.70M|    return reg;
29968|  8.70M|}
janetc_regalloc_freetemp:
29970|  9.20M|void janetc_regalloc_freetemp(JanetcRegisterAllocator *ra, int32_t reg, JanetcRegisterTemp nth) {
29971|  9.20M|    ra->regtemps &= ~(1 << nth);
29972|  9.20M|    if (reg < 0xF0)
  ------------------
  |  Branch (29972:9): [True: 1.51M, False: 7.68M]
  ------------------
29973|  1.51M|        janetc_regalloc_free(ra, reg);
29974|  9.20M|}
janet_dobytes:
30010|  7.16k|int janet_dobytes(JanetTable *env, const uint8_t *bytes, int32_t len, const char *sourcePath, Janet *out) {
30011|  7.16k|    JanetParser *parser;
30012|  7.16k|    int errflags = 0, done = 0;
30013|  7.16k|    int32_t index = 0;
30014|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30015|  7.16k|    JanetFiber *fiber = NULL;
30016|  7.16k|    const uint8_t *where = sourcePath ? janet_cstring(sourcePath) : NULL;
  ------------------
  |  Branch (30016:28): [True: 7.16k, False: 0]
  ------------------
30017|       |
30018|  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 (30018:9): [True: 7.16k, False: 0]
  ------------------
30019|  7.16k|    if (NULL == sourcePath) sourcePath = "<unknown>";
  ------------------
  |  Branch (30019:9): [True: 0, False: 7.16k]
  ------------------
30020|  7.16k|    parser = janet_abstract(&janet_parser_type, sizeof(JanetParser));
30021|  7.16k|    janet_parser_init(parser);
30022|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30023|       |
30024|       |    /* While we haven't seen an error */
30025|  12.8M|    while (!done) {
  ------------------
  |  Branch (30025:12): [True: 12.8M, False: 2.74k]
  ------------------
30026|       |
30027|       |        /* Evaluate parsed values */
30028|  13.1M|        while (janet_parser_has_more(parser)) {
  ------------------
  |  Branch (30028:16): [True: 238k, False: 12.8M]
  ------------------
30029|   238k|            Janet form = janet_parser_produce(parser);
30030|   238k|            JanetCompileResult cres = janet_compile(form, env, where);
30031|   238k|            if (cres.status == JANET_COMPILE_OK) {
  ------------------
  |  Branch (30031:17): [True: 235k, False: 2.32k]
  ------------------
30032|   235k|                JanetFunction *f = janet_thunk(cres.funcdef);
30033|   235k|                fiber = janet_fiber(f, 64, 0, NULL);
30034|   235k|                fiber->env = env;
30035|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30036|   235k|                if (status != JANET_SIGNAL_OK && status != JANET_SIGNAL_EVENT) {
  ------------------
  |  Branch (30036:21): [True: 3.50k, False: 232k]
  |  Branch (30036:50): [True: 2.09k, False: 1.40k]
  ------------------
30037|  2.09k|                    janet_stacktrace_ext(fiber, ret, "");
30038|  2.09k|                    errflags |= JANET_DO_ERROR_RUNTIME;
  ------------------
  |  | 1726|  2.09k|#define JANET_DO_ERROR_RUNTIME 0x01
  ------------------
30039|  2.09k|                    done = 1;
30040|  2.09k|                }
30041|   235k|            } else {
30042|  2.32k|                int32_t line = (int32_t) parser->line;
30043|  2.32k|                int32_t col = (int32_t) parser->column;
30044|  2.32k|                if ((cres.error_mapping.line > 0) &&
  ------------------
  |  Branch (30044:21): [True: 1.75k, False: 568]
  ------------------
30045|  1.75k|                        (cres.error_mapping.column > 0)) {
  ------------------
  |  Branch (30045:25): [True: 1.75k, False: 0]
  ------------------
30046|  1.75k|                    line = cres.error_mapping.line;
30047|  1.75k|                    col = cres.error_mapping.column;
30048|  1.75k|                }
30049|  2.32k|                JanetString ctx = janet_formatc("%s:%d:%d: compile error",
30050|  2.32k|                                                sourcePath, line, col);
30051|  2.32k|                JanetString errstr = janet_formatc("%s: %s",
30052|  2.32k|                                                   (const char *)ctx,
30053|  2.32k|                                                   (const char *)cres.error);
30054|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30055|  2.32k|                if (cres.macrofiber) {
  ------------------
  |  Branch (30055:21): [True: 150, False: 2.17k]
  ------------------
30056|    150|                    janet_eprintf("%s", (const char *)ctx);
  ------------------
  |  | 2184|    150|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
30057|    150|                    janet_stacktrace_ext(cres.macrofiber, ret, "");
30058|  2.17k|                } else {
30059|  2.17k|                    janet_eprintf("%s\n", (const char *)errstr);
  ------------------
  |  | 2184|  2.17k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
30060|  2.17k|                }
30061|  2.32k|                errflags |= JANET_DO_ERROR_COMPILE;
  ------------------
  |  | 1727|  2.32k|#define JANET_DO_ERROR_COMPILE 0x02
  ------------------
30062|  2.32k|                done = 1;
30063|  2.32k|            }
30064|   238k|        }
30065|       |
30066|  12.8M|        if (done) break;
  ------------------
  |  Branch (30066:13): [True: 4.41k, False: 12.8M]
  ------------------
30067|       |
30068|       |        /* Dispatch based on parse state */
30069|  12.8M|        switch (janet_parser_status(parser)) {
  ------------------
  |  Branch (30069:17): [True: 12.8M, False: 0]
  ------------------
30070|    446|            case JANET_PARSE_DEAD:
  ------------------
  |  Branch (30070:13): [True: 446, False: 12.8M]
  ------------------
30071|    446|                done = 1;
30072|    446|                break;
30073|  2.29k|            case JANET_PARSE_ERROR: {
  ------------------
  |  Branch (30073:13): [True: 2.29k, False: 12.8M]
  ------------------
30074|  2.29k|                errflags |= JANET_DO_ERROR_PARSE;
  ------------------
  |  | 1728|  2.29k|#define JANET_DO_ERROR_PARSE 0x04
  ------------------
30075|  2.29k|                int32_t line = (int32_t) parser->line;
30076|  2.29k|                int32_t col = (int32_t) parser->column;
30077|  2.29k|                JanetString errstr = janet_formatc("%s:%d:%d: parse error: %s",
30078|  2.29k|                                                   sourcePath, line, col,
30079|  2.29k|                                                   janet_parser_error(parser));
30080|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30081|  2.29k|                janet_eprintf("%s\n", (const char *)errstr);
  ------------------
  |  | 2184|  2.29k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
30082|  2.29k|                done = 1;
30083|  2.29k|                break;
30084|      0|            }
30085|  50.6k|            case JANET_PARSE_ROOT:
  ------------------
  |  Branch (30085:13): [True: 50.6k, False: 12.8M]
  ------------------
30086|  12.8M|            case JANET_PARSE_PENDING:
  ------------------
  |  Branch (30086:13): [True: 12.8M, False: 53.4k]
  ------------------
30087|  12.8M|                if (index >= len) {
  ------------------
  |  Branch (30087:21): [True: 1.28k, False: 12.8M]
  ------------------
30088|  1.28k|                    janet_parser_eof(parser);
30089|  12.8M|                } else {
30090|  12.8M|                    janet_parser_consume(parser, bytes[index++]);
30091|  12.8M|                }
30092|  12.8M|                break;
30093|  12.8M|        }
30094|       |
30095|  12.8M|    }
30096|       |
30097|       |    /* Clean up and return errors */
30098|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30099|  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 (30099:9): [True: 7.16k, False: 0]
  ------------------
30100|  7.16k|#ifdef JANET_EV
30101|       |    /* Enter the event loop if we are not already in it */
30102|  7.16k|    if (janet_vm.stackn == 0) {
  ------------------
  |  Branch (30102:9): [True: 0, False: 7.16k]
  ------------------
30103|      0|        if (fiber) {
  ------------------
  |  Branch (30103:13): [True: 0, False: 0]
  ------------------
30104|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30105|      0|        }
30106|      0|        janet_loop();
30107|      0|        if (fiber) {
  ------------------
  |  Branch (30107:13): [True: 0, False: 0]
  ------------------
30108|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30109|      0|            if (!errflags)
  ------------------
  |  Branch (30109:17): [True: 0, False: 0]
  ------------------
30110|      0|                ret = fiber->last_value;
30111|      0|        }
30112|      0|    }
30113|  7.16k|#endif
30114|  7.16k|    if (out) *out = ret;
  ------------------
  |  Branch (30114:9): [True: 7.16k, False: 0]
  ------------------
30115|  7.16k|    return errflags;
30116|  7.16k|}
dohead_destructure:
30516|  17.7k|SlotHeadPair *dohead_destructure(JanetCompiler *c, SlotHeadPair *into, JanetFopts opts, Janet lhs, Janet rhs) {
30517|       |
30518|       |    /* Detect if we can do an optimization to avoid some allocations */
30519|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30520|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30521|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30522|  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 (30522:67): [True: 204, False: 9.13k]
  ------------------
30523|  17.7k|    uint32_t has_drop = opts.flags & JANET_FOPTS_DROP;
  ------------------
  |  | 1093|  17.7k|#define JANET_FOPTS_DROP 0x40000
  ------------------
30524|       |
30525|  17.7k|    JanetFopts subopts = janetc_fopts_default(c);
30526|  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
  ------------------
30527|       |
30528|  17.7k|    if (has_drop && can_destructure_lhs && rhs_is_indexed) {
  ------------------
  |  Branch (30528:9): [True: 11.4k, False: 6.31k]
  |  Branch (30528:21): [True: 1.72k, False: 9.74k]
  |  Branch (30528:44): [True: 108, False: 1.62k]
  ------------------
30529|       |        /* Code is of the form (def [a b] [1 2]), avoid the allocation of two tuples */
30530|    108|        JanetView view_lhs = {0};
30531|    108|        JanetView view_rhs = {0};
30532|    108|        janet_indexed_view(lhs, &view_lhs.items, &view_lhs.len);
30533|    108|        janet_indexed_view(rhs, &view_rhs.items, &view_rhs.len);
30534|    108|        int found_amp = 0;
30535|    108|        int found_splice = 0;
30536|       |        /* Check for (def [x y z] [(splice [1 2 3]) 4 5 6]), bail out of optimization */
30537|    324|        for (int32_t i = 0; i < view_rhs.len; i++) {
  ------------------
  |  Branch (30537:29): [True: 216, False: 108]
  ------------------
30538|    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 (30538:17): [True: 108, False: 108]
  ------------------
30539|    108|                continue;
30540|    108|            }
30541|    108|            JanetTuple tup = janet_unwrap_tuple(view_rhs.items[i]);
  ------------------
  |  |  853|    108|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
30542|    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 (30542:17): [True: 0, False: 108]
  ------------------
30543|      0|                continue;
30544|      0|            }
30545|    108|            if (janet_symeq(tup[0], "splice")) {
  ------------------
  |  Branch (30545:17): [True: 0, False: 108]
  ------------------
30546|      0|                found_splice = 1;
30547|       |                /* Good error will be generated later. */
30548|      0|                break;
30549|      0|            }
30550|    108|        }
30551|       |        /* Check for (def [x & more] [1 2 3]), bail out of optimization */
30552|  6.01k|        for (int32_t i = 0; i < view_lhs.len; i++) {
  ------------------
  |  Branch (30552:29): [True: 5.90k, False: 105]
  ------------------
30553|  5.90k|            if (janet_symeq(view_lhs.items[i], "&")) {
  ------------------
  |  Branch (30553:17): [True: 3, False: 5.90k]
  ------------------
30554|      3|                found_amp = 1;
30555|       |                /* Good error will be generated later. */
30556|      3|                break;
30557|      3|            }
30558|  5.90k|        }
30559|    108|        if (!found_amp && !found_splice) {
  ------------------
  |  Branch (30559:13): [True: 105, False: 3]
  |  Branch (30559:27): [True: 105, False: 0]
  ------------------
30560|  5.94k|            for (int32_t i = 0; i < view_lhs.len; i++) {
  ------------------
  |  Branch (30560:33): [True: 5.83k, False: 105]
  ------------------
30561|  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 (30561:33): [True: 5.63k, False: 209]
  ------------------
30562|  5.83k|                into = dohead_destructure(c, into, subopts, view_lhs.items[i], sub_rhs);
30563|  5.83k|            }
30564|    105|            return into;
30565|    105|        }
30566|    108|    }
30567|       |
30568|       |    /* No optimization, do the simple way */
30569|  17.6k|    subopts.hint = opts.hint;
30570|  17.6k|    JanetSlot ret = janetc_value(subopts, rhs);
30571|  17.6k|    SlotHeadPair shp = {lhs, ret};
30572|       |    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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30573|  17.6k|    return into;
30574|  17.7k|}
janetc_special:
31379|  1.01M|const JanetSpecial *janetc_special(const uint8_t *name) {
31380|  1.01M|    return janet_strbinsearch(
31381|  1.01M|               &janetc_specials,
31382|  1.01M|               sizeof(janetc_specials) / sizeof(JanetSpecial),
31383|  1.01M|               sizeof(JanetSpecial),
31384|  1.01M|               name);
31385|  1.01M|}
janet_string_begin:
31500|  1.75k|uint8_t *janet_string_begin(int32_t length) {
31501|  1.75k|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_STRING, sizeof(JanetStringHead) + (size_t) length + 1);
31502|  1.75k|    head->length = length;
31503|  1.75k|    uint8_t *data = (uint8_t *)head->data;
31504|  1.75k|    data[length] = 0;
31505|  1.75k|    return data;
31506|  1.75k|}
janet_string_end:
31509|  1.75k|const uint8_t *janet_string_end(uint8_t *str) {
31510|  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)))
  |  |  ------------------
  ------------------
31511|  1.75k|    return str;
31512|  1.75k|}
janet_string:
31515|  11.8M|const uint8_t *janet_string(const uint8_t *buf, int32_t len) {
31516|  11.8M|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_STRING, sizeof(JanetStringHead) + (size_t) len + 1);
31517|  11.8M|    head->length = len;
31518|  11.8M|    head->hash = janet_string_calchash(buf, len);
31519|  11.8M|    uint8_t *data = (uint8_t *)head->data;
31520|  11.8M|    safe_memcpy(data, buf, len);
31521|  11.8M|    data[len] = 0;
31522|  11.8M|    return data;
31523|  11.8M|}
janet_string_compare:
31526|   307k|int janet_string_compare(const uint8_t *lhs, const uint8_t *rhs) {
31527|   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)))
  |  |  ------------------
  ------------------
31528|   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)))
  |  |  ------------------
  ------------------
31529|   307k|    int32_t len = xlen > ylen ? ylen : xlen;
  ------------------
  |  Branch (31529:19): [True: 103k, False: 204k]
  ------------------
31530|   307k|    int res = memcmp(lhs, rhs, len);
31531|   307k|    if (res) return res > 0 ? 1 : -1;
  ------------------
  |  Branch (31531:9): [True: 213k, False: 93.1k]
  |  Branch (31531:21): [True: 83.7k, False: 130k]
  ------------------
31532|  93.1k|    if (xlen == ylen) return 0;
  ------------------
  |  Branch (31532:9): [True: 83.2k, False: 9.86k]
  ------------------
31533|  9.86k|    return xlen < ylen ? -1 : 1;
  ------------------
  |  Branch (31533:12): [True: 5.40k, False: 4.45k]
  ------------------
31534|  93.1k|}
janet_string_equalconst:
31537|   226M|int janet_string_equalconst(const uint8_t *lhs, const uint8_t *rhs, int32_t rlen, int32_t rhash) {
31538|   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)))
  |  |  ------------------
  ------------------
31539|   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)))
  |  |  ------------------
  ------------------
31540|   226M|    if (lhash != rhash || llen != rlen)
  ------------------
  |  Branch (31540:9): [True: 33.7M, False: 192M]
  |  Branch (31540:27): [True: 41, False: 192M]
  ------------------
31541|  33.8M|        return 0;
31542|   192M|    if (lhs == rhs)
  ------------------
  |  Branch (31542:9): [True: 22.3M, False: 170M]
  ------------------
31543|  22.3M|        return 1;
31544|   170M|    return !memcmp(lhs, rhs, rlen);
31545|   192M|}
janet_string_equal:
31548|  1.21M|int janet_string_equal(const uint8_t *lhs, const uint8_t *rhs) {
31549|  1.21M|    return janet_string_equalconst(lhs, rhs,
31550|  1.21M|                                   janet_string_length(rhs), janet_string_hash(rhs));
  ------------------
  |  | 1803|  1.21M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|  1.21M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
                                                 janet_string_length(rhs), janet_string_hash(rhs));
  ------------------
  |  | 1804|  1.21M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1802|  1.21M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
31551|  1.21M|}
janet_cstring:
31554|   498k|const uint8_t *janet_cstring(const char *str) {
31555|   498k|    return janet_string((const uint8_t *)str, (int32_t)strlen(str));
31556|   498k|}
cfun_string_slice:
31646|  12.0k|              "negative slice range.") {
31647|  12.0k|    JanetByteView view = janet_getbytes(argv, 0);
31648|  12.0k|    JanetRange range = janet_getslice(argc, argv);
31649|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31650|  12.0k|}
cfun_keyword_slice:
31662|      5|              "Same as string/slice, but returns a keyword.") {
31663|      5|    JanetByteView view = janet_getbytes(argv, 0);
31664|      5|    JanetRange range = janet_getslice(argc, argv);
31665|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31666|      5|}
cfun_string_repeat:
31670|  1.11k|              "Returns a string that is `n` copies of `bytes` concatenated.") {
31671|  1.11k|    janet_fixarity(argc, 2);
31672|  1.11k|    JanetByteView view = janet_getbytes(argv, 0);
31673|  1.11k|    int32_t rep = janet_getinteger(argv, 1);
31674|  1.11k|    if (rep < 0) janet_panic("expected non-negative number of repetitions");
  ------------------
  |  Branch (31674:9): [True: 2, False: 1.11k]
  ------------------
31675|  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 (31675:9): [True: 1, False: 1.11k]
  ------------------
31676|  1.11k|    int64_t mulres = (int64_t) rep * view.len;
31677|  1.11k|    if (mulres > INT32_MAX) janet_panic("result string is too long");
  ------------------
  |  Branch (31677:9): [True: 2, False: 1.11k]
  ------------------
31678|  1.11k|    uint8_t *newbuf = janet_string_begin((int32_t) mulres);
31679|  1.11k|    uint8_t *end = newbuf + mulres;
31680|   144k|    for (uint8_t *p = newbuf; p < end; p += view.len) {
  ------------------
  |  Branch (31680:31): [True: 143k, False: 1.11k]
  ------------------
31681|   143k|        safe_memcpy(p, view.bytes, view.len);
31682|   143k|    }
31683|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31684|  1.11k|}
cfun_string_bytes:
31688|      8|              "Returns a tuple of integers that are the byte values of the string.") {
31689|      8|    janet_fixarity(argc, 1);
31690|      8|    JanetByteView view = janet_getbytes(argv, 0);
31691|      8|    Janet *tup = janet_tuple_begin(view.len);
31692|      8|    int32_t i;
31693|     80|    for (i = 0; i < view.len; i++) {
  ------------------
  |  Branch (31693:17): [True: 72, False: 8]
  ------------------
31694|     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)
  |  |  ------------------
  ------------------
31695|     72|    }
31696|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31697|      8|}
cfun_string_frombytes:
31702|      9|              "will be coerced to the range of 1 byte 0-255.") {
31703|      9|    int32_t i;
31704|      9|    uint8_t *buf = janet_string_begin(argc);
31705|     33|    for (i = 0; i < argc; i++) {
  ------------------
  |  Branch (31705:17): [True: 24, False: 9]
  ------------------
31706|     24|        int32_t c = janet_getinteger(argv, i);
31707|     24|        buf[i] = c & 0xFF;
31708|     24|    }
31709|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31710|      9|}
cfun_string_asciilower:
31716|     21|              "case check, meaning no unicode support.") {
31717|     21|    janet_fixarity(argc, 1);
31718|     21|    JanetByteView view = janet_getbytes(argv, 0);
31719|     21|    uint8_t *buf = janet_string_begin(view.len);
31720|   124k|    for (int32_t i = 0; i < view.len; i++) {
  ------------------
  |  Branch (31720:25): [True: 124k, False: 21]
  ------------------
31721|   124k|        uint8_t c = view.bytes[i];
31722|   124k|        if (c >= 65 && c <= 90) {
  ------------------
  |  Branch (31722:13): [True: 124k, False: 380]
  |  Branch (31722:24): [True: 89, False: 124k]
  ------------------
31723|     89|            buf[i] = c + 32;
31724|   124k|        } else {
31725|   124k|            buf[i] = c;
31726|   124k|        }
31727|   124k|    }
31728|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31729|     21|}
cfun_string_reverse:
31752|     83|              "Returns a string that is the reversed version of `str`.") {
31753|     83|    janet_fixarity(argc, 1);
31754|     83|    JanetByteView view = janet_getbytes(argv, 0);
31755|     83|    uint8_t *buf = janet_string_begin(view.len);
31756|     83|    int32_t i, j;
31757|    171|    for (i = 0, j = view.len - 1; i < view.len; i++, j--) {
  ------------------
  |  Branch (31757:35): [True: 88, False: 83]
  ------------------
31758|     88|        buf[i] = view.bytes[j];
31759|     88|    }
31760|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31761|     83|}
cfun_string_find:
31780|  12.7k|              "otherwise returns nil.") {
31781|  12.7k|    int32_t result;
31782|  12.7k|    struct kmp_state state;
31783|  12.7k|    findsetup(argc, argv, &state, 0);
31784|  12.7k|    result = kmp_next(&state);
31785|  12.7k|    kmp_deinit(&state);
31786|  12.7k|    return result < 0
  ------------------
  |  Branch (31786:12): [True: 12.6k, False: 83]
  ------------------
31787|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31788|  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)
  |  |  ------------------
  ------------------
31789|  12.7k|}
cfun_string_hasprefix:
31793|  10.5M|              "Tests whether `str` starts with `pfx`.") {
31794|  10.5M|    janet_fixarity(argc, 2);
31795|  10.5M|    JanetByteView prefix = janet_getbytes(argv, 0);
31796|  10.5M|    JanetByteView str = janet_getbytes(argv, 1);
31797|  10.5M|    return str.len < prefix.len
  ------------------
  |  Branch (31797:12): [True: 29.1k, False: 10.5M]
  ------------------
31798|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31799|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31800|  10.5M|}
cfun_string_hassuffix:
31804|  12.4k|              "Tests whether `str` ends with `sfx`.") {
31805|  12.4k|    janet_fixarity(argc, 2);
31806|  12.4k|    JanetByteView suffix = janet_getbytes(argv, 0);
31807|  12.4k|    JanetByteView str = janet_getbytes(argv, 1);
31808|  12.4k|    return str.len < suffix.len
  ------------------
  |  Branch (31808:12): [True: 11.8k, False: 695]
  ------------------
31809|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31810|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31811|  12.4k|                                       str.bytes + str.len - suffix.len,
31812|  12.4k|                                       suffix.len) == 0);
31813|  12.4k|}
cfun_string_findall:
31820|     38|              "may contribute to multiple found patterns.") {
31821|     38|    int32_t result;
31822|     38|    struct kmp_state state;
31823|     38|    findsetup(argc, argv, &state, 0);
31824|     38|    JanetArray *array = janet_array(0);
31825|     59|    while ((result = kmp_next(&state)) >= 0) {
  ------------------
  |  Branch (31825:12): [True: 21, False: 38]
  ------------------
31826|     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)
  |  |  ------------------
  ------------------
31827|     21|    }
31828|     38|    kmp_deinit(&state);
31829|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31830|     38|}
cfun_string_replace:
31857|     56|              "Will return the new string if `patt` is found, otherwise returns `str`.") {
31858|     56|    int32_t result;
31859|     56|    struct replace_state s;
31860|     56|    uint8_t *buf;
31861|     56|    replacesetup(argc, argv, &s);
31862|     56|    result = kmp_next(&s.kmp);
31863|     56|    if (result < 0) {
  ------------------
  |  Branch (31863:9): [True: 21, False: 35]
  ------------------
31864|     21|        kmp_deinit(&s.kmp);
31865|     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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31866|     21|    }
31867|     35|    JanetByteView subst = janet_text_substitution(&s.subst, s.kmp.text + result, s.kmp.patlen, NULL);
31868|     35|    buf = janet_string_begin(s.kmp.textlen - s.kmp.patlen + subst.len);
31869|     35|    safe_memcpy(buf, s.kmp.text, result);
31870|     35|    safe_memcpy(buf + result, subst.bytes, subst.len);
31871|     35|    safe_memcpy(buf + result + subst.len,
31872|     35|                s.kmp.text + result + s.kmp.patlen,
31873|     35|                s.kmp.textlen - result - s.kmp.patlen);
31874|     35|    kmp_deinit(&s.kmp);
31875|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31876|     56|}
cfun_string_replaceall:
31884|  5.62k|              "Will return the new string if `patt` is found, otherwise returns `str`.") {
31885|  5.62k|    int32_t result;
31886|  5.62k|    struct replace_state s;
31887|  5.62k|    JanetBuffer b;
31888|  5.62k|    int32_t lastindex = 0;
31889|  5.62k|    replacesetup(argc, argv, &s);
31890|  5.62k|    janet_buffer_init(&b, s.kmp.textlen);
31891|  5.62k|    while ((result = kmp_next(&s.kmp)) >= 0) {
  ------------------
  |  Branch (31891:12): [True: 0, False: 5.62k]
  ------------------
31892|      0|        JanetByteView subst = janet_text_substitution(&s.subst, s.kmp.text + result, s.kmp.patlen, NULL);
31893|      0|        janet_buffer_push_bytes(&b, s.kmp.text + lastindex, result - lastindex);
31894|      0|        janet_buffer_push_bytes(&b, subst.bytes, subst.len);
31895|      0|        lastindex = result + s.kmp.patlen;
31896|      0|        kmp_seti(&s.kmp, lastindex);
31897|      0|    }
31898|  5.62k|    janet_buffer_push_bytes(&b, s.kmp.text + lastindex, s.kmp.textlen - lastindex);
31899|  5.62k|    const uint8_t *ret = janet_string(b.data, b.count);
31900|  5.62k|    janet_buffer_deinit(&b);
31901|  5.62k|    kmp_deinit(&s.kmp);
31902|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31903|  5.62k|}
cfun_string_split:
31911|    100|              "of `limit` results (if provided).") {
31912|    100|    int32_t result;
31913|    100|    JanetArray *array;
31914|    100|    struct kmp_state state;
31915|    100|    int32_t limit = -1, lastindex = 0;
31916|    100|    if (argc == 4) {
  ------------------
  |  Branch (31916:9): [True: 4, False: 96]
  ------------------
31917|      4|        limit = janet_getinteger(argv, 3);
31918|      4|    }
31919|    100|    findsetup(argc, argv, &state, 1);
31920|    100|    array = janet_array(0);
31921|    327|    while ((result = kmp_next(&state)) >= 0 && --limit) {
  ------------------
  |  Branch (31921:12): [True: 227, False: 100]
  |  Branch (31921:48): [True: 227, False: 0]
  ------------------
31922|    227|        const uint8_t *slice = janet_string(state.text + lastindex, result - lastindex);
31923|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31924|    227|        lastindex = result + state.patlen;
31925|    227|        kmp_seti(&state, lastindex);
31926|    227|    }
31927|    100|    const uint8_t *slice = janet_string(state.text + lastindex, state.textlen - lastindex);
31928|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31929|    100|    kmp_deinit(&state);
31930|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31931|    100|}
cfun_string_checkset:
31937|     22|              "not appear in `set`.") {
31938|     22|    uint32_t bitset[8] = {0, 0, 0, 0, 0, 0, 0, 0};
31939|     22|    janet_fixarity(argc, 2);
31940|     22|    JanetByteView set = janet_getbytes(argv, 0);
31941|     22|    JanetByteView str = janet_getbytes(argv, 1);
31942|       |    /* Populate set */
31943|    145|    for (int32_t i = 0; i < set.len; i++) {
  ------------------
  |  Branch (31943:25): [True: 123, False: 22]
  ------------------
31944|    123|        int index = set.bytes[i] >> 5;
31945|    123|        uint32_t mask = 1 << (set.bytes[i] & 0x1F);
31946|    123|        bitset[index] |= mask;
31947|    123|    }
31948|       |    /* Check set */
31949|    107|    for (int32_t i = 0; i < str.len; i++) {
  ------------------
  |  Branch (31949:25): [True: 95, False: 12]
  ------------------
31950|     95|        int index = str.bytes[i] >> 5;
31951|     95|        uint32_t mask = 1 << (str.bytes[i] & 0x1F);
31952|     95|        if (!(bitset[index] & mask)) {
  ------------------
  |  Branch (31952:13): [True: 10, False: 85]
  ------------------
31953|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31954|     10|        }
31955|     95|    }
31956|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31957|     22|}
cfun_string_join:
31962|    523|              "a separator string `sep`.") {
31963|    523|    janet_arity(argc, 1, 2);
31964|    523|    JanetView parts = janet_getindexed(argv, 0);
31965|    523|    JanetByteView joiner;
31966|    523|    if (argc == 2) {
  ------------------
  |  Branch (31966:9): [True: 50, False: 473]
  ------------------
31967|     50|        joiner = janet_getbytes(argv, 1);
31968|    473|    } else {
31969|    473|        joiner.bytes = NULL;
31970|    473|        joiner.len = 0;
31971|    473|    }
31972|       |    /* Check args */
31973|    523|    int32_t i;
31974|    523|    int64_t finallen = 0;
31975|  6.43k|    for (i = 0; i < parts.len; i++) {
  ------------------
  |  Branch (31975:17): [True: 5.91k, False: 522]
  ------------------
31976|  5.91k|        const uint8_t *chunk;
31977|  5.91k|        int32_t chunklen = 0;
31978|  5.91k|        if (!janet_bytes_view(parts.items[i], &chunk, &chunklen)) {
  ------------------
  |  Branch (31978:13): [True: 1, False: 5.91k]
  ------------------
31979|      1|            janet_panicf("item %d of parts is not a byte sequence, got %v", i, parts.items[i]);
31980|      1|        }
31981|  5.91k|        if (i) finallen += joiner.len;
  ------------------
  |  Branch (31981:13): [True: 5.42k, False: 488]
  ------------------
31982|  5.91k|        finallen += chunklen;
31983|  5.91k|        if (finallen > INT32_MAX)
  ------------------
  |  Branch (31983:13): [True: 0, False: 5.91k]
  ------------------
31984|      0|            janet_panic("result string too long");
31985|  5.91k|    }
31986|    522|    uint8_t *buf, *out;
31987|    522|    out = buf = janet_string_begin((int32_t) finallen);
31988|  6.42k|    for (i = 0; i < parts.len; i++) {
  ------------------
  |  Branch (31988:17): [True: 5.90k, False: 522]
  ------------------
31989|  5.90k|        const uint8_t *chunk = NULL;
31990|  5.90k|        int32_t chunklen = 0;
31991|  5.90k|        if (i) {
  ------------------
  |  Branch (31991:13): [True: 5.41k, False: 487]
  ------------------
31992|  5.41k|            safe_memcpy(out, joiner.bytes, joiner.len);
31993|  5.41k|            out += joiner.len;
31994|  5.41k|        }
31995|  5.90k|        janet_bytes_view(parts.items[i], &chunk, &chunklen);
31996|  5.90k|        safe_memcpy(out, chunk, chunklen);
31997|  5.90k|        out += chunklen;
31998|  5.90k|    }
31999|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32000|    523|}
cfun_string_trim:
32073|     56|              "`set` is provided, consider only characters in `set` to be whitespace.") {
32074|     56|    JanetByteView str, set;
32075|     56|    trim_help_args(argc, argv, &str, &set);
32076|     56|    int32_t left_edge = trim_help_leftedge(str, set);
32077|     56|    int32_t right_edge = trim_help_rightedge(str, set);
32078|     56|    if (right_edge < left_edge)
  ------------------
  |  Branch (32078:9): [True: 1, False: 55]
  ------------------
32079|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32080|     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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32081|     56|}
cfun_string_triml:
32086|     35|              "`set` is provided, consider only characters in `set` to be whitespace.") {
32087|     35|    JanetByteView str, set;
32088|     35|    trim_help_args(argc, argv, &str, &set);
32089|     35|    int32_t left_edge = trim_help_leftedge(str, set);
32090|     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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32091|     35|}
cfun_string_trimr:
32096|     53|              "`set` is provided, consider only characters in `set` to be whitespace.") {
32097|     53|    JanetByteView str, set;
32098|     53|    trim_help_args(argc, argv, &str, &set);
32099|     53|    int32_t right_edge = trim_help_rightedge(str, set);
32100|     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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32101|     53|}
janet_lib_string:
32104|  7.16k|void janet_lib_string(JanetTable *env) {
32105|  7.16k|    JanetRegExt string_cfuns[] = {
32106|  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_}
  |  |  ------------------
  ------------------
32107|  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_}
  |  |  ------------------
  ------------------
32108|  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_}
  |  |  ------------------
  ------------------
32109|  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_}
  |  |  ------------------
  ------------------
32110|  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_}
  |  |  ------------------
  ------------------
32111|  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_}
  |  |  ------------------
  ------------------
32112|  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_}
  |  |  ------------------
  ------------------
32113|  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_}
  |  |  ------------------
  ------------------
32114|  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_}
  |  |  ------------------
  ------------------
32115|  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_}
  |  |  ------------------
  ------------------
32116|  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_}
  |  |  ------------------
  ------------------
32117|  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_}
  |  |  ------------------
  ------------------
32118|  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_}
  |  |  ------------------
  ------------------
32119|  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_}
  |  |  ------------------
  ------------------
32120|  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_}
  |  |  ------------------
  ------------------
32121|  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_}
  |  |  ------------------
  ------------------
32122|  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_}
  |  |  ------------------
  ------------------
32123|  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_}
  |  |  ------------------
  ------------------
32124|  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_}
  |  |  ------------------
  ------------------
32125|  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_}
  |  |  ------------------
  ------------------
32126|  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_}
  |  |  ------------------
  ------------------
32127|  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_}
  |  |  ------------------
  ------------------
32128|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
32129|  7.16k|    };
32130|       |    janet_core_cfuns_ext(env, NULL, string_cfuns);
32131|  7.16k|}
janet_scan_number_base:
32392|   526k|    double *out) {
32393|   526k|    const uint8_t *end = str + len;
32394|   526k|    int seenadigit = 0;
32395|   526k|    int ex = 0;
32396|   526k|    int seenpoint = 0;
32397|   526k|    int foundexp = 0;
32398|   526k|    int neg = 0;
32399|   526k|    struct BigNat mant;
32400|   526k|    bignat_zero(&mant);
32401|       |
32402|       |    /* Prevent some kinds of overflow bugs relating to the exponent
32403|       |     * overflowing.  For example, if a string was passed 2GB worth of 0s after
32404|       |     * the decimal point, exponent could wrap around and become positive. It's
32405|       |     * easier to reject ridiculously large inputs than to check for overflows.
32406|       |     * */
32407|   526k|    if (len > JANET_NUMBER_LENGTH_RIDICULOUS) goto error;
  ------------------
  |  |32188|   526k|#define JANET_NUMBER_LENGTH_RIDICULOUS 0xFFFF
  ------------------
  |  Branch (32407:9): [True: 4, False: 526k]
  ------------------
32408|       |
32409|       |    /* Get sign */
32410|   526k|    if (str >= end) goto error;
  ------------------
  |  Branch (32410:9): [True: 1, False: 526k]
  ------------------
32411|   526k|    if (*str == '-') {
  ------------------
  |  Branch (32411:9): [True: 368k, False: 158k]
  ------------------
32412|   368k|        neg = 1;
32413|   368k|        str++;
32414|   368k|    } else if (*str == '+') {
  ------------------
  |  Branch (32414:16): [True: 98.9k, False: 59.2k]
  ------------------
32415|  98.9k|        str++;
32416|  98.9k|    }
32417|       |
32418|       |    /* Check for leading 0x or digit digit r */
32419|   526k|    if (base == 0) {
  ------------------
  |  Branch (32419:9): [True: 526k, False: 2]
  ------------------
32420|   526k|        if (str + 1 < end && str[0] == '0' && str[1] == 'x') {
  ------------------
  |  Branch (32420:13): [True: 39.5k, False: 487k]
  |  Branch (32420:30): [True: 10.2k, False: 29.3k]
  |  Branch (32420:47): [True: 87, False: 10.1k]
  ------------------
32421|     87|            base = 16;
32422|     87|            str += 2;
32423|   526k|        } else if (str + 1 < end  &&
  ------------------
  |  Branch (32423:20): [True: 39.4k, False: 487k]
  ------------------
32424|  39.4k|                   str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (32424:20): [True: 36.1k, False: 3.28k]
  |  Branch (32424:37): [True: 31.0k, False: 5.12k]
  ------------------
32425|  31.0k|                   str[1] == 'r') {
  ------------------
  |  Branch (32425:20): [True: 62, False: 30.9k]
  ------------------
32426|     62|            base = str[0] - '0';
32427|     62|            str += 2;
32428|   526k|        } else if (str + 2 < end  &&
  ------------------
  |  Branch (32428:20): [True: 28.2k, False: 498k]
  ------------------
32429|  28.2k|                   str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (32429:20): [True: 26.3k, False: 1.94k]
  |  Branch (32429:37): [True: 23.9k, False: 2.44k]
  ------------------
32430|  23.9k|                   str[1] >= '0' && str[1] <= '9' &&
  ------------------
  |  Branch (32430:20): [True: 22.9k, False: 921]
  |  Branch (32430:37): [True: 18.7k, False: 4.28k]
  ------------------
32431|  18.7k|                   str[2] == 'r') {
  ------------------
  |  Branch (32431:20): [True: 546, False: 18.1k]
  ------------------
32432|    546|            base = 10 * (str[0] - '0') + (str[1] - '0');
32433|    546|            if (base < 2 || base > 36) goto error;
  ------------------
  |  Branch (32433:17): [True: 0, False: 546]
  |  Branch (32433:29): [True: 472, False: 74]
  ------------------
32434|     74|            str += 3;
32435|     74|        }
32436|   526k|    }
32437|       |
32438|       |    /* If still base is 0, set to default (10) */
32439|   526k|    if (base == 0) {
  ------------------
  |  Branch (32439:9): [True: 525k, False: 224]
  ------------------
32440|   525k|        base = 10;
32441|   525k|    }
32442|   526k|    int exp_base = base;
32443|       |
32444|       |    /* Skip leading zeros */
32445|   553k|    while (str < end && (*str == '0' || *str == '.')) {
  ------------------
  |  Branch (32445:12): [True: 302k, False: 250k]
  |  Branch (32445:26): [True: 21.1k, False: 281k]
  |  Branch (32445:41): [True: 6.91k, False: 274k]
  ------------------
32446|  28.1k|        if (seenpoint) ex--;
  ------------------
  |  Branch (32446:13): [True: 1.27k, False: 26.8k]
  ------------------
32447|  28.1k|        if (*str == '.') {
  ------------------
  |  Branch (32447:13): [True: 6.91k, False: 21.1k]
  ------------------
32448|  6.91k|            if (seenpoint) goto error;
  ------------------
  |  Branch (32448:17): [True: 741, False: 6.17k]
  ------------------
32449|  6.17k|            seenpoint = 1;
32450|  21.1k|        } else {
32451|  21.1k|            seenadigit = 1;
32452|  21.1k|        }
32453|  27.3k|        str++;
32454|  27.3k|    }
32455|       |
32456|       |    /* Parse significant digits */
32457|   757k|    while (str < end) {
  ------------------
  |  Branch (32457:12): [True: 469k, False: 288k]
  ------------------
32458|   469k|        if (*str == '.') {
  ------------------
  |  Branch (32458:13): [True: 1.82k, False: 467k]
  ------------------
32459|  1.82k|            if (seenpoint) goto error;
  ------------------
  |  Branch (32459:17): [True: 31, False: 1.79k]
  ------------------
32460|  1.79k|            seenpoint = 1;
32461|   467k|        } else if (*str == '&') {
  ------------------
  |  Branch (32461:20): [True: 2.54k, False: 464k]
  ------------------
32462|  2.54k|            foundexp = 1;
32463|  2.54k|            break;
32464|   464k|        } else if (base == 16 && (*str == 'P' || *str == 'p')) { /* IEEE hex float */
  ------------------
  |  Branch (32464:20): [True: 274, False: 464k]
  |  Branch (32464:35): [True: 11, False: 263]
  |  Branch (32464:50): [True: 5, False: 258]
  ------------------
32465|     16|            foundexp = 1;
32466|     16|            exp_base = 10;
32467|     16|            base = 2;
32468|     16|            ex *= 4; /* We need to correct the current exponent after we change the base */
32469|     16|            break;
32470|   464k|        } else if (base == 10 && (*str == 'E' || *str == 'e')) {
  ------------------
  |  Branch (32470:20): [True: 464k, False: 627]
  |  Branch (32470:35): [True: 420, False: 463k]
  |  Branch (32470:50): [True: 5.97k, False: 457k]
  ------------------
32471|  6.39k|            foundexp = 1;
32472|  6.39k|            break;
32473|   458k|        } else if (*str == '_') {
  ------------------
  |  Branch (32473:20): [True: 6.47k, False: 451k]
  ------------------
32474|  6.47k|            if (!seenadigit) goto error;
  ------------------
  |  Branch (32474:17): [True: 1.35k, False: 5.12k]
  ------------------
32475|   451k|        } else {
32476|   451k|            int digit = digit_lookup[*str & 0x7F];
32477|   451k|            if (*str > 127 || digit >= base) goto error;
  ------------------
  |  Branch (32477:17): [True: 127, False: 451k]
  |  Branch (32477:31): [True: 226k, False: 224k]
  ------------------
32478|   224k|            if (seenpoint) ex--;
  ------------------
  |  Branch (32478:17): [True: 23.9k, False: 200k]
  ------------------
32479|   224k|            bignat_muladd(&mant, base, digit);
32480|   224k|            seenadigit = 1;
32481|   224k|        }
32482|   231k|        str++;
32483|   231k|    }
32484|       |
32485|   296k|    if (!seenadigit)
  ------------------
  |  Branch (32485:9): [True: 241k, False: 55.2k]
  ------------------
32486|   241k|        goto error;
32487|       |
32488|       |    /* Read exponent */
32489|  55.2k|    if (str < end && foundexp) {
  ------------------
  |  Branch (32489:9): [True: 8.88k, False: 46.3k]
  |  Branch (32489:22): [True: 8.88k, False: 0]
  ------------------
32490|  8.88k|        int eneg = 0;
32491|  8.88k|        int32_t ee = 0;
32492|  8.88k|        seenadigit = 0;
32493|  8.88k|        str++;
32494|  8.88k|        if (str >= end) goto error;
  ------------------
  |  Branch (32494:13): [True: 338, False: 8.54k]
  ------------------
32495|  8.54k|        if (*str == '-') {
  ------------------
  |  Branch (32495:13): [True: 2.08k, False: 6.46k]
  ------------------
32496|  2.08k|            eneg = 1;
32497|  2.08k|            str++;
32498|  6.46k|        } else if (*str == '+') {
  ------------------
  |  Branch (32498:20): [True: 7, False: 6.45k]
  ------------------
32499|      7|            str++;
32500|      7|        }
32501|       |        /* Skip leading 0s in exponent */
32502|  19.6k|        while (str < end && *str == '0') {
  ------------------
  |  Branch (32502:16): [True: 16.3k, False: 3.23k]
  |  Branch (32502:29): [True: 11.0k, False: 5.31k]
  ------------------
32503|  11.0k|            str++;
32504|  11.0k|            seenadigit = 1;
32505|  11.0k|        }
32506|  22.9k|        while (str < end) {
  ------------------
  |  Branch (32506:16): [True: 15.0k, False: 7.91k]
  ------------------
32507|  15.0k|            int digit = digit_lookup[*str & 0x7F];
32508|  15.0k|            if (*str > 127 || digit >= exp_base) goto error;
  ------------------
  |  Branch (32508:17): [True: 118, False: 14.9k]
  |  Branch (32508:31): [True: 514, False: 14.4k]
  ------------------
32509|  14.4k|            if (ee < (INT32_MAX / 40)) {
  ------------------
  |  Branch (32509:17): [True: 13.4k, False: 960]
  ------------------
32510|  13.4k|                ee = exp_base * ee + digit;
32511|  13.4k|            }
32512|  14.4k|            str++;
32513|  14.4k|            seenadigit = 1;
32514|  14.4k|        }
32515|  7.91k|        if (eneg) ex -= ee;
  ------------------
  |  Branch (32515:13): [True: 1.91k, False: 5.99k]
  ------------------
32516|  5.99k|        else ex += ee;
32517|  7.91k|    }
32518|       |
32519|  54.2k|    if (!seenadigit)
  ------------------
  |  Branch (32519:9): [True: 121, False: 54.1k]
  ------------------
32520|    121|        goto error;
32521|       |
32522|  54.1k|    *out = convert(neg, &mant, base, ex);
32523|  54.1k|    janet_free(mant.digits);
  ------------------
  |  | 2402|  54.1k|#define janet_free(X) free((X))
  ------------------
32524|  54.1k|    return 0;
32525|       |
32526|   472k|error:
32527|   472k|    janet_free(mant.digits);
  ------------------
  |  | 2402|   472k|#define janet_free(X) free((X))
  ------------------
32528|   472k|    return 1;
32529|  54.2k|}
janet_scan_int64:
32602|  4.17k|int janet_scan_int64(const uint8_t *str, int32_t len, int64_t *out) {
32603|  4.17k|    int neg;
32604|  4.17k|    uint64_t bi;
32605|  4.17k|    if (scan_uint64(str, len, &bi, &neg)) {
  ------------------
  |  Branch (32605:9): [True: 2.48k, False: 1.68k]
  ------------------
32606|  2.48k|        if (neg && bi <= ((UINT64_MAX / 2) + 1)) {
  ------------------
  |  Branch (32606:13): [True: 78, False: 2.41k]
  |  Branch (32606:20): [True: 78, False: 0]
  ------------------
32607|     78|            if (bi > INT64_MAX) {
  ------------------
  |  Branch (32607:17): [True: 0, False: 78]
  ------------------
32608|      0|                *out = INT64_MIN;
32609|     78|            } else {
32610|     78|                *out = -((int64_t) bi);
32611|     78|            }
32612|     78|            return 1;
32613|     78|        }
32614|  2.41k|        if (!neg && bi <= INT64_MAX) {
  ------------------
  |  Branch (32614:13): [True: 2.41k, False: 0]
  |  Branch (32614:21): [True: 2.40k, False: 4]
  ------------------
32615|  2.40k|            *out = (int64_t) bi;
32616|  2.40k|            return 1;
32617|  2.40k|        }
32618|  2.41k|    }
32619|  1.68k|    return 0;
32620|  4.17k|}
janet_scan_uint64:
32622|  2.56k|int janet_scan_uint64(const uint8_t *str, int32_t len, uint64_t *out) {
32623|  2.56k|    int neg;
32624|  2.56k|    uint64_t bi;
32625|  2.56k|    if (scan_uint64(str, len, &bi, &neg)) {
  ------------------
  |  Branch (32625:9): [True: 2.44k, False: 121]
  ------------------
32626|  2.44k|        if (!neg) {
  ------------------
  |  Branch (32626:13): [True: 2.43k, False: 5]
  ------------------
32627|  2.43k|            *out = bi;
32628|  2.43k|            return 1;
32629|  2.43k|        }
32630|  2.44k|    }
32631|    126|    return 0;
32632|  2.56k|}
janet_scan_numeric:
32639|   522k|    Janet *out) {
32640|   522k|    int result;
32641|   522k|    double num;
32642|   522k|    int64_t i64 = 0;
32643|   522k|    uint64_t u64 = 0;
32644|   522k|    if (len < 2 || str[len - 2] != ':') {
  ------------------
  |  Branch (32644:9): [True: 265k, False: 256k]
  |  Branch (32644:20): [True: 247k, False: 8.45k]
  ------------------
32645|   513k|        result = janet_scan_number_base(str, len, 0, &num);
32646|   513k|        *out = janet_wrap_number(num);
  ------------------
  |  |  830|   513k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
32647|   513k|        return result;
32648|   513k|    }
32649|  8.45k|    switch (str[len - 1]) {
32650|    648|        default:
  ------------------
  |  Branch (32650:9): [True: 648, False: 7.80k]
  ------------------
32651|    648|            return 1;
32652|  1.10k|        case 'n':
  ------------------
  |  Branch (32652:9): [True: 1.10k, False: 7.35k]
  ------------------
32653|  1.10k|            result = janet_scan_number_base(str, len - 2, 0, &num);
32654|  1.10k|            *out = janet_wrap_number(num);
  ------------------
  |  |  830|  1.10k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
32655|  1.10k|            return result;
32656|       |        /* Condition is inverted janet_scan_int64 and janet_scan_uint64 */
32657|  4.15k|        case 's':
  ------------------
  |  Branch (32657:9): [True: 4.15k, False: 4.29k]
  ------------------
32658|  4.15k|            result = !janet_scan_int64(str, len - 2, &i64);
32659|  4.15k|            *out = janet_wrap_s64(i64);
32660|  4.15k|            return result;
32661|  2.54k|        case 'u':
  ------------------
  |  Branch (32661:9): [True: 2.54k, False: 5.90k]
  ------------------
32662|  2.54k|            result = !janet_scan_uint64(str, len - 2, &u64);
32663|  2.54k|            *out = janet_wrap_u64(u64);
32664|  2.54k|            return result;
32665|  8.45k|    }
32666|  8.45k|}
janet_buffer_dtostr:
32670|    895|void janet_buffer_dtostr(JanetBuffer *buffer, double x) {
32671|    895|#define BUFSIZE 32
32672|    895|    janet_buffer_extra(buffer, BUFSIZE);
  ------------------
  |  |32671|    895|#define BUFSIZE 32
  ------------------
32673|    895|    int count = snprintf((char *) buffer->data + buffer->count, BUFSIZE, "%.17g", x);
  ------------------
  |  |32671|    895|#define BUFSIZE 32
  ------------------
32674|    895|#undef BUFSIZE
32675|       |    /* fix locale issues with commas */
32676|  4.18k|    for (int i = 0; i < count; i++) {
  ------------------
  |  Branch (32676:21): [True: 3.28k, False: 895]
  ------------------
32677|  3.28k|        char c = buffer->data[buffer->count + i];
32678|  3.28k|        if (c == ',') {
  ------------------
  |  Branch (32678:13): [True: 0, False: 3.28k]
  ------------------
32679|      0|            buffer->data[buffer->count + i] = '.';
32680|      0|        }
32681|  3.28k|    }
32682|    895|    buffer->count += count;
32683|    895|}
janet_struct_begin:
32720|  10.6M|JanetKV *janet_struct_begin(int32_t count) {
32721|       |    /* Calculate capacity as power of 2 after 2 * count. */
32722|  10.6M|    int32_t capacity = janet_tablen(2 * count);
32723|  10.6M|    if (capacity < 0) capacity = janet_tablen(count + 1);
  ------------------
  |  Branch (32723:9): [True: 0, False: 10.6M]
  ------------------
32724|       |
32725|  10.6M|    size_t size = sizeof(JanetStructHead) + (size_t) capacity * sizeof(JanetKV);
32726|  10.6M|    JanetStructHead *head = janet_gcalloc(JANET_MEMORY_STRUCT, size);
32727|  10.6M|    head->length = count;
32728|  10.6M|    head->capacity = capacity;
32729|  10.6M|    head->hash = 0;
32730|  10.6M|    head->proto = NULL;
32731|       |
32732|  10.6M|    JanetKV *st = (JanetKV *)(head->data);
32733|  10.6M|    janet_memempty(st, capacity);
32734|  10.6M|    return st;
32735|  10.6M|}
janet_struct_find:
32739|  22.0M|const JanetKV *janet_struct_find(const JanetKV *st, Janet key) {
32740|  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)))
  |  |  ------------------
  ------------------
32741|  22.0M|    int32_t index = janet_maphash(cap, janet_hash(key));
  ------------------
  |  |  393|  22.0M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
32742|  22.0M|    int32_t i;
32743|  22.8M|    for (i = index; i < cap; i++)
  ------------------
  |  Branch (32743:21): [True: 22.8M, False: 9.82k]
  ------------------
32744|  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 (32744:54): [True: 5.69M, False: 761k]
  ------------------
32745|  22.0M|            return st + i;
32746|  13.8k|    for (i = 0; i < index; i++)
  ------------------
  |  Branch (32746:17): [True: 13.8k, False: 0]
  ------------------
32747|  13.8k|        if (janet_checktype(st[i].key, JANET_NIL) || janet_equals(st[i].key, key))
  ------------------
  |  |  801|  27.7k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 1.05k, False: 12.8k]
  |  |  |  Branch (801:6): [Folded, False: 13.8k]
  |  |  ------------------
  |  |  802|  27.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|  27.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  13.8k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  13.8k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  13.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  13.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32747:54): [True: 8.77k, False: 4.04k]
  ------------------
32748|  9.82k|            return st + i;
32749|      0|    return NULL;
32750|  9.82k|}
janet_struct_put_ext:
32760|   114M|void janet_struct_put_ext(JanetKV *st, Janet key, Janet value, int replace) {
32761|   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)))
  |  |  ------------------
  ------------------
32762|   114M|    int32_t hash = janet_hash(key);
32763|   114M|    int32_t index = janet_maphash(cap, hash);
  ------------------
  |  |  393|   114M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
32764|   114M|    int32_t i, j, dist;
32765|   114M|    int32_t bounds[4] = {index, cap, 0, index};
32766|   114M|    if (janet_checktype(key, JANET_NIL) || janet_checktype(value, JANET_NIL)) return;
  ------------------
  |  |  801|   229M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 1.24k, 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32767|   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.79k, False: 114M]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 114M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   229M|        : 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 (32767:47): [True: 0, False: 9.79k]
  ------------------
32768|       |    /* Avoid extra items */
32769|   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 (32769:9): [True: 0, False: 114M]
  ------------------
32770|   114M|    for (dist = 0, j = 0; j < 4; j += 2)
  ------------------
  |  Branch (32770:27): [True: 114M, False: 11]
  ------------------
32771|   125M|        for (i = bounds[j]; i < bounds[j + 1]; i++, dist++) {
  ------------------
  |  Branch (32771:29): [True: 125M, False: 4.92k]
  ------------------
32772|   125M|            int status;
32773|   125M|            int32_t otherhash;
32774|   125M|            int32_t otherindex, otherdist;
32775|   125M|            JanetKV *kv = st + i;
32776|       |            /* We found an empty slot, so just add key and value */
32777|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32778|   114M|                kv->key = key;
32779|   114M|                kv->value = value;
32780|       |                /* Update the temporary count */
32781|   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)))
  |  |  ------------------
  ------------------
32782|   114M|                return;
32783|   114M|            }
32784|       |            /* Robinhood hashing - check if colliding kv pair
32785|       |             * is closer to their source than current. We use robinhood
32786|       |             * hashing to ensure that equivalent structs that are constructed
32787|       |             * with different order have the same internal layout, and therefor
32788|       |             * will compare properly - i.e., {1 2 3 4} should equal {3 4 1 2}.
32789|       |             * Collisions are resolved via an insertion sort insertion. */
32790|  10.6M|            otherhash = janet_hash(kv->key);
32791|  10.6M|            otherindex = janet_maphash(cap, otherhash);
  ------------------
  |  |  393|  10.6M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
32792|  10.6M|            otherdist = (i + cap - otherindex) & (cap - 1);
32793|  10.6M|            if (dist < otherdist)
  ------------------
  |  Branch (32793:17): [True: 78.8k, False: 10.6M]
  ------------------
32794|  78.8k|                status = -1;
32795|  10.6M|            else if (otherdist < dist)
  ------------------
  |  Branch (32795:22): [True: 2.84k, False: 10.6M]
  ------------------
32796|  2.84k|                status = 1;
32797|  10.6M|            else if (hash < otherhash)
  ------------------
  |  Branch (32797:22): [True: 10.4M, False: 122k]
  ------------------
32798|  10.4M|                status = -1;
32799|   122k|            else if (otherhash < hash)
  ------------------
  |  Branch (32799:22): [True: 108k, False: 13.4k]
  ------------------
32800|   108k|                status = 1;
32801|  13.4k|            else
32802|  13.4k|                status = janet_compare(key, kv->key);
32803|       |            /* If other is closer to their ideal slot */
32804|  10.6M|            if (status == 1) {
  ------------------
  |  Branch (32804:17): [True: 111k, False: 10.5M]
  ------------------
32805|       |                /* Swap current kv pair with pair in slot */
32806|   111k|                JanetKV temp = *kv;
32807|   111k|                kv->key = key;
32808|   111k|                kv->value = value;
32809|   111k|                key = temp.key;
32810|   111k|                value = temp.value;
32811|       |                /* Save dist and hash of new kv pair */
32812|   111k|                dist = otherdist;
32813|   111k|                hash = otherhash;
32814|  10.5M|            } else if (status == 0) {
  ------------------
  |  Branch (32814:24): [True: 13.3k, False: 10.5M]
  ------------------
32815|  13.3k|                if (replace) {
  ------------------
  |  Branch (32815:21): [True: 13.3k, False: 0]
  ------------------
32816|       |                    /* A key was added to the struct more than once - replace old value */
32817|  13.3k|                    kv->value = value;
32818|  13.3k|                }
32819|  13.3k|                return;
32820|  13.3k|            }
32821|  10.6M|        }
32822|   114M|}
janet_struct_put:
32824|   114M|void janet_struct_put(JanetKV *st, Janet key, Janet value) {
32825|   114M|    janet_struct_put_ext(st, key, value, 1);
32826|   114M|}
janet_struct_end:
32829|  10.5M|const JanetKV *janet_struct_end(JanetKV *st) {
32830|  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 (32830:9): [True: 104k, False: 10.4M]
  ------------------
32831|       |        /* Error building struct, probably duplicate values. We need to rebuild
32832|       |         * the struct using only the values that went in. The second creation should always
32833|       |         * succeed. */
32834|   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)))
  |  |  ------------------
  ------------------
32835|  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 (32835:29): [True: 1.71M, False: 104k]
  ------------------
32836|  1.71M|            JanetKV *kv = st + i;
32837|  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 (32837:17): [True: 418k, False: 1.29M]
  ------------------
32838|   418k|                janet_struct_put(newst, kv->key, kv->value);
32839|   418k|            }
32840|  1.71M|        }
32841|   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)))
  |  |  ------------------
  ------------------
32842|   104k|        st = newst;
32843|   104k|    }
32844|  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)))
  |  |  ------------------
  ------------------
32845|  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]
  |  |  ------------------
  ------------------
32846|      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)))
  |  |  ------------------
  ------------------
32847|      3|    }
32848|  10.5M|    return (const JanetKV *)st;
32849|  10.5M|}
janet_struct_rawget:
32852|  60.8k|Janet janet_struct_rawget(const JanetKV *st, Janet key) {
32853|  60.8k|    const JanetKV *kv = janet_struct_find(st, key);
32854|  60.8k|    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 (32854:12): [True: 60.8k, False: 0]
  ------------------
32855|  60.8k|}
janet_struct_get:
32858|  22.0M|Janet janet_struct_get(const JanetKV *st, Janet key) {
32859|  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 (32859:41): [True: 22.0M, False: 16.3M]
  |  Branch (32859:47): [True: 22.0M, False: 0]
  ------------------
32860|  22.0M|        const JanetKV *kv = janet_struct_find(st, key);
32861|  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 (32861:13): [True: 22.0M, False: 0]
  |  Branch (32861:27): [True: 5.66M, False: 16.3M]
  ------------------
32862|  5.66M|            return kv->value;
32863|  5.66M|        }
32864|  22.0M|    }
32865|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32866|  22.0M|}
cfun_struct_getproto:
32913|      2|              "Return the prototype of a struct, or nil if it doesn't have one.") {
32914|      2|    janet_fixarity(argc, 1);
32915|      2|    JanetStruct st = janet_getstruct(argv, 0);
32916|      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]
  |  |  ------------------
  ------------------
32917|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32918|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32919|      2|}
cfun_struct_to_table:
32957|      1|              "table's prototypes into the new struct's prototypes as well.") {
32958|      1|    janet_arity(argc, 1, 2);
32959|      1|    JanetStruct st = janet_getstruct(argv, 0);
32960|      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 (32960:21): [True: 0, False: 1]
  ------------------
32961|      1|    JanetTable *tab = NULL;
32962|      1|    JanetStruct cursor = st;
32963|      1|    JanetTable *tab_cursor = tab;
32964|      1|    do {
32965|      1|        if (tab) {
  ------------------
  |  Branch (32965:13): [True: 0, False: 1]
  ------------------
32966|      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)))
  |  |  ------------------
  ------------------
32967|      0|            tab_cursor = tab_cursor->proto;
32968|      1|        } else {
32969|      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)))
  |  |  ------------------
  ------------------
32970|      1|            tab_cursor = tab;
32971|      1|        }
32972|       |        /* TODO - implement as memcpy since struct memory should be compatible
32973|       |         * with table memory */
32974|      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 (32974:29): [True: 0, False: 1]
  ------------------
32975|      0|            const JanetKV *kv = cursor + i;
32976|      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 (32976:17): [True: 0, False: 0]
  ------------------
32977|      0|                janet_table_put(tab_cursor, kv->key, kv->value);
32978|      0|            }
32979|      0|        }
32980|      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)))
  |  |  ------------------
  ------------------
32981|      1|    } while (recursive && cursor);
  ------------------
  |  Branch (32981:14): [True: 0, False: 1]
  |  Branch (32981:27): [True: 0, False: 0]
  ------------------
32982|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32983|      1|}
cfun_struct_rawget:
32989|  60.8k|              "nil without checking the prototype. Returns the value in the struct.") {
32990|  60.8k|    janet_fixarity(argc, 2);
32991|  60.8k|    JanetStruct st = janet_getstruct(argv, 0);
32992|  60.8k|    return janet_struct_rawget(st, argv[1]);
32993|  60.8k|}
janet_lib_struct:
32996|  7.16k|void janet_lib_struct(JanetTable *env) {
32997|  7.16k|    JanetRegExt struct_cfuns[] = {
32998|  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_}
  |  |  ------------------
  ------------------
32999|  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_}
  |  |  ------------------
  ------------------
33000|  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_}
  |  |  ------------------
  ------------------
33001|  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_}
  |  |  ------------------
  ------------------
33002|  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_}
  |  |  ------------------
  ------------------
33003|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
33004|  7.16k|    };
33005|       |    janet_core_cfuns_ext(env, NULL, struct_cfuns);
33006|  7.16k|}
janet_symcache_init:
33051|  7.65k|void janet_symcache_init() {
33052|  7.65k|    janet_vm.cache_capacity = 1024;
33053|  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))
  ------------------
33054|  7.65k|    if (NULL == janet_vm.cache) {
  ------------------
  |  Branch (33054:9): [True: 0, False: 7.65k]
  ------------------
33055|      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]
  |  |  ------------------
  ------------------
33056|      0|    }
33057|  7.65k|    memset(&janet_vm.gensym_counter, '0', sizeof(janet_vm.gensym_counter));
33058|  7.65k|    janet_vm.gensym_counter[0] = '_';
33059|  7.65k|    janet_vm.cache_count = 0;
33060|  7.65k|    janet_vm.cache_deleted = 0;
33061|  7.65k|}
janet_symcache_deinit:
33064|  7.65k|void janet_symcache_deinit() {
33065|  7.65k|    janet_free((void *)janet_vm.cache);
  ------------------
  |  | 2402|  7.65k|#define janet_free(X) free((X))
  ------------------
33066|       |    janet_vm.cache = NULL;
33067|  7.65k|    janet_vm.cache_capacity = 0;
33068|  7.65k|    janet_vm.cache_count = 0;
33069|  7.65k|    janet_vm.cache_deleted = 0;
33070|  7.65k|}
janet_symbol_deinit:
33172|  21.6M|void janet_symbol_deinit(const uint8_t *sym) {
33173|  21.6M|    int status = 0;
33174|  21.6M|    const uint8_t **bucket = janet_symcache_find(sym, &status);
  ------------------
  |  |33127|  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)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33175|  21.6M|    if (status) {
  ------------------
  |  Branch (33175:9): [True: 21.6M, False: 1.53k]
  ------------------
33176|  21.6M|        janet_vm.cache_count--;
33177|  21.6M|        janet_vm.cache_deleted++;
33178|  21.6M|        *bucket = JANET_SYMCACHE_DELETED;
33179|  21.6M|    }
33180|  21.6M|}
janet_symbol:
33183|   180M|const uint8_t *janet_symbol(const uint8_t *str, int32_t len) {
33184|   180M|    int32_t hash = janet_string_calchash(str, len);
33185|   180M|    uint8_t *newstr;
33186|   180M|    int success = 0;
33187|   180M|    const uint8_t **bucket = janet_symcache_findmem(str, len, hash, &success);
33188|   180M|    if (success)
  ------------------
  |  Branch (33188:9): [True: 159M, False: 20.8M]
  ------------------
33189|   159M|        return *bucket;
33190|  20.8M|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_SYMBOL, sizeof(JanetStringHead) + (size_t) len + 1);
33191|  20.8M|    head->hash = hash;
33192|  20.8M|    head->length = len;
33193|  20.8M|    newstr = (uint8_t *)(head->data);
33194|  20.8M|    safe_memcpy(newstr, str, len);
33195|  20.8M|    newstr[len] = 0;
33196|  20.8M|    janet_symcache_put((const uint8_t *)newstr, bucket);
33197|  20.8M|    return newstr;
33198|   180M|}
janet_csymbol:
33201|   154M|const uint8_t *janet_csymbol(const char *cstr) {
33202|   154M|    return janet_symbol((const uint8_t *)cstr, (int32_t) strlen(cstr));
33203|   154M|}
janet_symbol_gen:
33226|   720k|const uint8_t *janet_symbol_gen(void) {
33227|   720k|    const uint8_t **bucket = NULL;
33228|   720k|    uint8_t *sym;
33229|   720k|    int32_t hash = 0;
33230|   720k|    int status;
33231|       |    /* Leave spaces for 6 base 64 digits and two dashes. That means 64^6 possible suffixes, which
33232|       |     * is enough for resolving collisions. */
33233|  2.23M|    do {
33234|  2.23M|        hash = janet_string_calchash(
33235|  2.23M|                   janet_vm.gensym_counter,
33236|  2.23M|                   sizeof(janet_vm.gensym_counter) - 1);
33237|  2.23M|        bucket = janet_symcache_findmem(
33238|  2.23M|                     janet_vm.gensym_counter,
33239|  2.23M|                     sizeof(janet_vm.gensym_counter) - 1,
33240|  2.23M|                     hash,
33241|  2.23M|                     &status);
33242|  2.23M|    } while (status && (inc_gensym(), 1));
  ------------------
  |  Branch (33242:14): [True: 1.51M, False: 720k]
  |  Branch (33242:24): [True: 1.51M, False: 0]
  ------------------
33243|   720k|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_SYMBOL, sizeof(JanetStringHead) + sizeof(janet_vm.gensym_counter));
33244|   720k|    head->length = sizeof(janet_vm.gensym_counter) - 1;
33245|   720k|    head->hash = hash;
33246|   720k|    sym = (uint8_t *)(head->data);
33247|   720k|    memcpy(sym, janet_vm.gensym_counter, sizeof(janet_vm.gensym_counter));
33248|   720k|    sym[head->length] = 0;
33249|   720k|    janet_symcache_put((const uint8_t *)sym, bucket);
33250|   720k|    return (const uint8_t *)sym;
33251|   720k|}
janet_table_init:
33327|  18.7k|JanetTable *janet_table_init(JanetTable *table, int32_t capacity) {
33328|  18.7k|    return janet_table_init_impl(table, capacity, 1);
33329|  18.7k|}
janet_table_init_raw:
33332|  22.9k|JanetTable *janet_table_init_raw(JanetTable *table, int32_t capacity) {
33333|  22.9k|    return janet_table_init_impl(table, capacity, 0);
33334|  22.9k|}
janet_table_deinit:
33337|  41.6k|void janet_table_deinit(JanetTable *table) {
33338|  41.6k|    if (table->gc.flags & JANET_TABLE_FLAG_STACK) {
  ------------------
  |  |33287|  41.6k|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
  |  Branch (33338:9): [True: 18.7k, False: 22.9k]
  ------------------
33339|  18.7k|        janet_sfree(table->data);
33340|  22.9k|    } else {
33341|  22.9k|        janet_free(table->data);
  ------------------
  |  | 2402|  22.9k|#define janet_free(X) free((X))
  ------------------
33342|  22.9k|    }
33343|  41.6k|}
janet_table:
33347|  5.74M|JanetTable *janet_table(int32_t capacity) {
33348|  5.74M|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE, sizeof(JanetTable));
33349|  5.74M|    return janet_table_init_impl(table, capacity, 0);
33350|  5.74M|}
janet_table_weakk:
33352|      5|JanetTable *janet_table_weakk(int32_t capacity) {
33353|      5|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE_WEAKK, sizeof(JanetTable));
33354|      5|    return janet_table_init_impl(table, capacity, 0);
33355|      5|}
janet_table_weakv:
33357|     19|JanetTable *janet_table_weakv(int32_t capacity) {
33358|     19|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE_WEAKV, sizeof(JanetTable));
33359|     19|    return janet_table_init_impl(table, capacity, 0);
33360|     19|}
janet_table_weakkv:
33362|      9|JanetTable *janet_table_weakkv(int32_t capacity) {
33363|      9|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE_WEAKKV, sizeof(JanetTable));
33364|      9|    return janet_table_init_impl(table, capacity, 0);
33365|      9|}
janet_table_find:
33369|   124M|JanetKV *janet_table_find(JanetTable *t, Janet key) {
33370|   124M|    return (JanetKV *) janet_dict_find(t->data, t->capacity, key);
33371|   124M|}
janet_table_get:
33405|  17.6M|Janet janet_table_get(JanetTable *t, Janet key) {
33406|  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 (33406:41): [True: 18.0M, False: 8.74M]
  |  Branch (33406:46): [True: 18.0M, False: 18.4E]
  ------------------
33407|  18.0M|        JanetKV *bucket = janet_table_find(t, key);
33408|  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 (33408:13): [True: 18.0M, False: 4.17k]
  |  Branch (33408:31): [True: 8.85M, False: 9.15M]
  ------------------
33409|  8.85M|            return bucket->value;
33410|  18.0M|    }
33411|  8.74M|    return janet_wrap_nil();
  ------------------
  |  |  826|  8.74M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  8.74M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  8.74M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  8.74M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33412|  17.6M|}
janet_table_get_keyword:
33415|  1.96M|Janet janet_table_get_keyword(JanetTable *t, const char *keyword) {
33416|  1.96M|    int32_t keyword_len = (int32_t) strlen(keyword);
33417|  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 (33417:41): [True: 1.96M, False: 1.06M]
  |  Branch (33417:46): [True: 1.96M, False: 0]
  ------------------
33418|  1.96M|        JanetKV *bucket = (JanetKV *) janet_dict_find_keyword(t->data, t->capacity, (const uint8_t *) keyword, keyword_len);
33419|  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 (33419:13): [True: 1.96M, False: 0]
  |  Branch (33419:31): [True: 905k, False: 1.06M]
  ------------------
33420|   905k|            return bucket->value;
33421|  1.96M|    }
33422|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33423|  1.96M|}
janet_table_get_ex:
33426|    119|Janet janet_table_get_ex(JanetTable *t, Janet key, JanetTable **which) {
33427|    238|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  294|    119|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (33427:41): [True: 119, False: 119]
  |  Branch (33427:46): [True: 119, False: 0]
  ------------------
33428|    119|        JanetKV *bucket = janet_table_find(t, key);
33429|    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 (33429:13): [True: 119, False: 0]
  |  Branch (33429:31): [True: 0, False: 119]
  ------------------
33430|      0|            *which = t;
33431|      0|            return bucket->value;
33432|      0|        }
33433|    119|    }
33434|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33435|    119|}
janet_table_rawget:
33438|  13.9k|Janet janet_table_rawget(JanetTable *t, Janet key) {
33439|  13.9k|    JanetKV *bucket = janet_table_find(t, key);
33440|  13.9k|    if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  801|  13.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 13.9k]
  |  |  ------------------
  |  |  802|  13.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|  13.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  13.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  13.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  13.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  13.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33440:9): [True: 13.9k, False: 0]
  |  Branch (33440:27): [True: 9.15k, False: 4.75k]
  ------------------
33441|  9.15k|        return bucket->value;
33442|  4.75k|    else
33443|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33444|  13.9k|}
janet_table_remove:
33448|  1.05M|Janet janet_table_remove(JanetTable *t, Janet key) {
33449|  1.05M|    JanetKV *bucket = janet_table_find(t, key);
33450|  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 (33450:9): [True: 1.05M, False: 0]
  |  Branch (33450:27): [True: 420k, False: 629k]
  ------------------
33451|   420k|        Janet ret = bucket->value;
33452|   420k|        t->count--;
33453|   420k|        t->deleted++;
33454|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33455|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33456|   420k|        return ret;
33457|   629k|    } else {
33458|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33459|   629k|    }
33460|  1.05M|}
janet_table_put:
33463|  39.0M|void janet_table_put(JanetTable *t, Janet key, Janet value) {
33464|  39.0M|    if (janet_checktype(key, JANET_NIL)) return;
  ------------------
  |  |  801|  39.0M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 1, False: 39.0M]
  |  |  |  Branch (801:6): [Folded, False: 39.0M]
  |  |  ------------------
  |  |  802|  39.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|  39.0M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  39.0M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  39.0M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  39.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  39.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33465|  39.0M|    if (janet_checktype(key, JANET_NUMBER) && isnan(janet_unwrap_number(key))) return;
  ------------------
  |  |  801|  78.0M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 10.7k, False: 39.0M]
  |  |  |  Branch (801:6): [True: 39.0M, Folded]
  |  |  ------------------
  |  |  802|  78.0M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|  39.0M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 9.04k, False: 39.0M]
  |  |  |  |  |  Branch (798:28): [True: 18.4E, False: 39.0M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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 (33465:47): [True: 342, False: 10.4k]
  ------------------
33466|  39.0M|    if (janet_checktype(value, JANET_NIL)) {
  ------------------
  |  |  801|  39.0M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 405k, False: 38.6M]
  |  |  |  Branch (801:6): [Folded, False: 39.0M]
  |  |  ------------------
  |  |  802|  39.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|  39.0M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  39.0M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  39.0M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  39.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  39.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33467|   405k|        janet_table_remove(t, key);
33468|  38.6M|    } else {
33469|  38.6M|        JanetKV *bucket = janet_table_find(t, key);
33470|  38.6M|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  801|  38.6M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 38.6M]
  |  |  ------------------
  |  |  802|  38.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|  38.6M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  38.6M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  38.6M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  38.6M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  38.6M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33470:13): [True: 38.6M, False: 25.3k]
  |  Branch (33470:31): [True: 435k, False: 38.1M]
  ------------------
33471|   435k|            bucket->value = value;
33472|  38.2M|        } else {
33473|  38.2M|            if (NULL == bucket || 2 * (t->count + t->deleted + 1) > t->capacity) {
  ------------------
  |  Branch (33473:17): [True: 24.7k, False: 38.1M]
  |  Branch (33473:35): [True: 4.53M, False: 33.6M]
  ------------------
33474|  4.56M|                janet_table_rehash(t, janet_tablen(2 * t->count + 2));
33475|  4.56M|            }
33476|  38.2M|            bucket = janet_table_find(t, key);
33477|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33478|      0|                --t->deleted;
33479|  38.2M|            bucket->key = key;
33480|  38.2M|            bucket->value = value;
33481|  38.2M|            ++t->count;
33482|  38.2M|        }
33483|  38.6M|    }
33484|  39.0M|}
janet_table_clear:
33504|     16|void janet_table_clear(JanetTable *t) {
33505|     16|    int32_t capacity = t->capacity;
33506|     16|    JanetKV *data = t->data;
33507|     16|    janet_memempty(data, capacity);
33508|     16|    t->count = 0;
33509|     16|    t->deleted = 0;
33510|     16|}
janet_table_clone:
33513|  3.43k|JanetTable *janet_table_clone(JanetTable *table) {
33514|  3.43k|    JanetTable *newTable = janet_gcalloc(JANET_MEMORY_TABLE, sizeof(JanetTable));
33515|  3.43k|    newTable->count = table->count;
33516|  3.43k|    newTable->capacity = table->capacity;
33517|  3.43k|    newTable->deleted = table->deleted;
33518|  3.43k|    newTable->proto = table->proto;
33519|  3.43k|    newTable->data = janet_malloc(newTable->capacity * sizeof(JanetKV));
  ------------------
  |  | 2393|  3.43k|#define janet_malloc(X) malloc((X))
  ------------------
33520|  3.43k|    if (NULL == newTable->data) {
  ------------------
  |  Branch (33520:9): [True: 0, False: 3.43k]
  ------------------
33521|      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]
  |  |  ------------------
  ------------------
33522|      0|    }
33523|  3.43k|    memcpy(newTable->data, table->data, (size_t) table->capacity * sizeof(JanetKV));
33524|  3.43k|    return newTable;
33525|  3.43k|}
janet_table_merge_struct:
33544|     27|void janet_table_merge_struct(JanetTable *table, const JanetKV *other) {
33545|       |    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)))
  |  |  ------------------
  ------------------
33546|     27|}
janet_table_to_struct:
33549|  22.8k|const JanetKV *janet_table_to_struct(JanetTable *t) {
33550|  22.8k|    JanetKV *st = janet_struct_begin(t->count);
33551|  22.8k|    JanetKV *kv = t->data;
33552|  22.8k|    JanetKV *end = t->data + t->capacity;
33553|   334k|    while (kv < end) {
  ------------------
  |  Branch (33553:12): [True: 311k, False: 22.8k]
  ------------------
33554|   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 (33554:13): [True: 112k, False: 199k]
  ------------------
33555|   112k|            janet_struct_put(st, kv->key, kv->value);
33556|   311k|        kv++;
33557|   311k|    }
33558|  22.8k|    return janet_struct_end(st);
33559|  22.8k|}
cfun_table_new:
33584|      4|              "Returns the new table.") {
33585|      4|    janet_fixarity(argc, 1);
33586|      4|    int32_t cap = janet_getnat(argv, 0);
33587|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33588|      4|}
cfun_table_weak:
33593|      7|              "Returns the new table.") {
33594|      7|    janet_fixarity(argc, 1);
33595|      7|    int32_t cap = janet_getnat(argv, 0);
33596|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33597|      7|}
cfun_table_weak_values:
33611|      1|              "Returns the new table.") {
33612|      1|    janet_fixarity(argc, 1);
33613|      1|    int32_t cap = janet_getnat(argv, 0);
33614|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33615|      1|}
cfun_table_getproto:
33620|     47|              "has no prototype, otherwise returns the prototype.") {
33621|     47|    janet_fixarity(argc, 1);
33622|     47|    JanetTable *t = janet_gettable(argv, 0);
33623|     47|    return t->proto
  ------------------
  |  Branch (33623:12): [True: 0, False: 47]
  ------------------
33624|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33625|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33626|     47|}
cfun_table_setproto:
33630|   102k|              "Set the prototype of a table. Returns the original table `tab`.") {
33631|   102k|    janet_fixarity(argc, 2);
33632|   102k|    JanetTable *table = janet_gettable(argv, 0);
33633|   102k|    JanetTable *proto = NULL;
33634|   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 (33634:9): [True: 102k, False: 2]
  ------------------
33635|   102k|        proto = janet_gettable(argv, 1);
33636|   102k|    }
33637|   102k|    table->proto = proto;
33638|   102k|    return argv[0];
33639|   102k|}
cfun_table_tostruct:
33643|  22.8k|              "Convert a table to a struct. Returns a new struct.") {
33644|  22.8k|    janet_arity(argc, 1, 2);
33645|  22.8k|    JanetTable *t = janet_gettable(argv, 0);
33646|  22.8k|    JanetStruct proto = janet_optstruct(argv, argc, 1, NULL);
33647|  22.8k|    JanetStruct st = janet_table_to_struct(t);
33648|  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)))
  |  |  ------------------
  ------------------
33649|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33650|  22.8k|}
cfun_table_rawget:
33656|  12.3k|              "nil without checking the prototype. Returns the value in the table.") {
33657|  12.3k|    janet_fixarity(argc, 2);
33658|  12.3k|    JanetTable *table = janet_gettable(argv, 0);
33659|  12.3k|    return janet_table_rawget(table, argv[1]);
33660|  12.3k|}
cfun_table_clear:
33673|     16|              "Remove all key-value pairs in a table and return the modified table `tab`.") {
33674|     16|    janet_fixarity(argc, 1);
33675|     16|    JanetTable *table = janet_gettable(argv, 0);
33676|     16|    janet_table_clear(table);
33677|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33678|     16|}
janet_lib_table:
33689|  7.16k|void janet_lib_table(JanetTable *env) {
33690|  7.16k|    JanetRegExt table_cfuns[] = {
33691|  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_}
  |  |  ------------------
  ------------------
33692|  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_}
  |  |  ------------------
  ------------------
33693|  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_}
  |  |  ------------------
  ------------------
33694|  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_}
  |  |  ------------------
  ------------------
33695|  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_}
  |  |  ------------------
  ------------------
33696|  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_}
  |  |  ------------------
  ------------------
33697|  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_}
  |  |  ------------------
  ------------------
33698|  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_}
  |  |  ------------------
  ------------------
33699|  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_}
  |  |  ------------------
  ------------------
33700|  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_}
  |  |  ------------------
  ------------------
33701|  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_}
  |  |  ------------------
  ------------------
33702|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
33703|  7.16k|    };
33704|       |    janet_core_cfuns_ext(env, NULL, table_cfuns);
33705|  7.16k|}
janet_tuple_begin:
33744|  62.2M|Janet *janet_tuple_begin(int32_t length) {
33745|  62.2M|    size_t size = sizeof(JanetTupleHead) + ((size_t) length * sizeof(Janet));
33746|  62.2M|    JanetTupleHead *head = janet_gcalloc(JANET_MEMORY_TUPLE, size);
33747|  62.2M|    head->sm_line = -1;
33748|  62.2M|    head->sm_column = -1;
33749|  62.2M|    head->length = length;
33750|  62.2M|    return (Janet *)(head->data);
33751|  62.2M|}
janet_tuple_end:
33754|  62.2M|const Janet *janet_tuple_end(Janet *tuple) {
33755|  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)))
  |  |  ------------------
  ------------------
33756|  62.2M|    return (const Janet *)tuple;
33757|  62.2M|}
janet_tuple_n:
33760|  51.9M|const Janet *janet_tuple_n(const Janet *values, int32_t n) {
33761|  51.9M|    Janet *t = janet_tuple_begin(n);
33762|  51.9M|    safe_memcpy(t, values, sizeof(Janet) * n);
33763|  51.9M|    return janet_tuple_end(t);
33764|  51.9M|}
cfun_tuple_brackets:
33770|  4.69M|              "Creates a new bracketed tuple containing the elements xs.") {
33771|  4.69M|    const Janet *tup = janet_tuple_n(argv, argc);
33772|  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
  ------------------
33773|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33774|  4.69M|}
cfun_tuple_slice:
33784|  17.3M|              "negative slice range. Returns the new tuple.") {
33785|  17.3M|    JanetView view = janet_getindexed(argv, 0);
33786|  17.3M|    JanetRange range = janet_getslice(argc, argv);
33787|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33788|  17.3M|}
cfun_tuple_type:
33796|  22.0M|              "the compiler.") {
33797|  22.0M|    janet_fixarity(argc, 1);
33798|  22.0M|    const Janet *tup = janet_gettuple(argv, 0);
33799|  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 (33799:9): [True: 4.69M, False: 17.4M]
  ------------------
33800|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33801|  17.4M|    } else {
33802|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33803|  17.4M|    }
33804|  22.0M|}
cfun_tuple_sourcemap:
33809|  9.89M|              "which is another tuple (line, column).") {
33810|  9.89M|    janet_fixarity(argc, 1);
33811|  9.89M|    const Janet *tup = janet_gettuple(argv, 0);
33812|  9.89M|    Janet contents[2];
33813|  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)
  |  |  ------------------
  ------------------
33814|  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)
  |  |  ------------------
  ------------------
33815|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33816|  9.89M|}
cfun_tuple_setmap:
33821|  9.89M|              "should be integers.") {
33822|  9.89M|    janet_fixarity(argc, 3);
33823|  9.89M|    const Janet *tup = janet_gettuple(argv, 0);
33824|  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)))
  ------------------
33825|       |    janet_tuple_head(tup)->sm_column = janet_getinteger(argv, 2);
  ------------------
  |  | 1790|  9.89M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
33826|  9.89M|    return argv[0];
33827|  9.89M|}
cfun_tuple_join:
33831|      8|              "Create a tuple by joining together other tuples and arrays.") {
33832|      8|    janet_arity(argc, 0, -1);
33833|      8|    int32_t total_len = 0;
33834|      8|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (33834:25): [True: 1, False: 7]
  ------------------
33835|      1|        int32_t len = 0;
33836|      1|        const Janet *vals = NULL;
33837|      1|        if (!janet_indexed_view(argv[i], &vals, &len)) {
  ------------------
  |  Branch (33837:13): [True: 1, False: 0]
  ------------------
33838|      1|            janet_panicf("expected indexed type for argument %d, got %v", i, argv[i]);
33839|      1|        }
33840|      0|        if (INT32_MAX - total_len < len) {
  ------------------
  |  Branch (33840:13): [True: 0, False: 0]
  ------------------
33841|      0|            janet_panic("tuple too large");
33842|      0|        }
33843|      0|        total_len += len;
33844|      0|    }
33845|      7|    Janet *tup = janet_tuple_begin(total_len);
33846|      7|    Janet *tup_cursor = tup;
33847|      7|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (33847:25): [True: 0, False: 7]
  ------------------
33848|      0|        int32_t len = 0;
33849|      0|        const Janet *vals = NULL;
33850|      0|        janet_indexed_view(argv[i], &vals, &len);
33851|      0|        memcpy(tup_cursor, vals, len * sizeof(Janet));
33852|      0|        tup_cursor += len;
33853|      0|    }
33854|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33855|      8|}
janet_lib_tuple:
33858|  7.16k|void janet_lib_tuple(JanetTable *env) {
33859|  7.16k|    JanetRegExt tuple_cfuns[] = {
33860|  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_}
  |  |  ------------------
  ------------------
33861|  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_}
  |  |  ------------------
  ------------------
33862|  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_}
  |  |  ------------------
  ------------------
33863|  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_}
  |  |  ------------------
  ------------------
33864|  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_}
  |  |  ------------------
  ------------------
33865|  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_}
  |  |  ------------------
  ------------------
33866|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
33867|  7.16k|    };
33868|       |    janet_core_cfuns_ext(env, NULL, tuple_cfuns);
33869|  7.16k|}
janet_hash_mix:
33994|  1.00G|uint32_t janet_hash_mix(uint32_t input, uint32_t more) {
33995|  1.00G|    uint32_t mix1 = (more + 0x9e3779b9 + (input << 6) + (input >> 2));
33996|  1.00G|    return input ^ (0x9e3779b9 + (mix1 << 6) + (mix1 >> 2));
33997|  1.00G|}
janet_string_calchash:
34001|   196M|int32_t janet_string_calchash(const uint8_t *str, int32_t len) {
34002|   196M|    if (NULL == str || len == 0) return 5381;
  ------------------
  |  Branch (34002:9): [True: 102k, False: 196M]
  |  Branch (34002:24): [True: 68.5k, False: 196M]
  ------------------
34003|   196M|    const uint8_t *end = str + len;
34004|   196M|    uint32_t hash = 5381;
34005|  2.43G|    while (str < end)
  ------------------
  |  Branch (34005:12): [True: 2.24G, False: 196M]
  ------------------
34006|  2.24G|        hash = (hash << 5) + hash + *str++;
34007|   196M|    hash = janet_hash_mix(hash, (uint32_t) len);
34008|   196M|    return (int32_t) hash;
34009|   196M|}
janet_array_calchash:
34124|  62.2M|int32_t janet_array_calchash(const Janet *array, int32_t len) {
34125|  62.2M|    const Janet *end = array + len;
34126|  62.2M|    uint32_t hash = 33;
34127|   204M|    while (array < end) {
  ------------------
  |  Branch (34127:12): [True: 142M, False: 62.2M]
  ------------------
34128|   142M|        hash = janet_hash_mix(hash, janet_hash(*array++));
34129|   142M|    }
34130|  62.2M|    return (int32_t) hash;
34131|  62.2M|}
janet_kv_calchash:
34134|  10.5M|int32_t janet_kv_calchash(const JanetKV *kvs, int32_t len) {
34135|  10.5M|    const JanetKV *end = kvs + len;
34136|  10.5M|    uint32_t hash = 33;
34137|   343M|    while (kvs < end) {
  ------------------
  |  Branch (34137:12): [True: 332M, False: 10.5M]
  ------------------
34138|   332M|        hash = janet_hash_mix(hash, janet_hash(kvs->key));
34139|   332M|        hash = janet_hash_mix(hash, janet_hash(kvs->value));
34140|   332M|        kvs++;
34141|   332M|    }
34142|  10.5M|    return (int32_t) hash;
34143|  10.5M|}
janet_tablen:
34147|  21.0M|int32_t janet_tablen(int32_t n) {
34148|  21.0M|    if (n < 0) return 0;
  ------------------
  |  Branch (34148:9): [True: 0, False: 21.0M]
  ------------------
34149|  21.0M|    n |= n >> 1;
34150|  21.0M|    n |= n >> 2;
34151|  21.0M|    n |= n >> 4;
34152|  21.0M|    n |= n >> 8;
34153|  21.0M|    n |= n >> 16;
34154|  21.0M|    return n == INT32_MAX ? INT32_MAX : n + 1;
  ------------------
  |  Branch (34154:12): [True: 0, False: 21.0M]
  ------------------
34155|  21.0M|}
safe_memcpy:
34158|   132M|void safe_memcpy(void *dest, const void *src, size_t len) {
34159|   132M|    if (!len) return;
  ------------------
  |  Branch (34159:9): [True: 35.1M, False: 97.1M]
  ------------------
34160|  97.1M|    memcpy(dest, src, len);
34161|  97.1M|}
janet_dict_find:
34165|   125M|const JanetKV *janet_dict_find(const JanetKV *buckets, int32_t cap, Janet key) {
34166|   125M|    int32_t index = janet_maphash(cap, janet_hash(key));
  ------------------
  |  |  393|   125M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
34167|   125M|    int32_t i;
34168|   125M|    const JanetKV *first_bucket = NULL;
34169|       |    /* Higher half */
34170|   316M|    for (i = index; i < cap; i++) {
  ------------------
  |  Branch (34170:21): [True: 316M, False: 533k]
  ------------------
34171|   316M|        const JanetKV *kv = buckets + i;
34172|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34173|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34174|   114M|                return kv;
34175|   114M|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (34175:24): [True: 1.42M, False: 96.3M]
  ------------------
34176|  1.42M|                first_bucket = kv;
34177|  1.42M|            }
34178|   212M|        } else if (janet_equals(kv->key, key)) {
  ------------------
  |  Branch (34178:20): [True: 10.0M, False: 94.0M]
  ------------------
34179|  10.0M|            return buckets + i;
34180|  10.0M|        }
34181|   316M|    }
34182|       |    /* Lower half */
34183|   575k|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (34183:17): [True: 555k, False: 19.9k]
  ------------------
34184|   555k|        const JanetKV *kv = buckets + i;
34185|   555k|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  801|   555k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 510k, False: 44.9k]
  |  |  |  Branch (801:6): [Folded, False: 555k]
  |  |  ------------------
  |  |  802|   555k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   555k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   555k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   555k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   555k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   555k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34186|   510k|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  801|   510k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 506k, False: 4.07k]
  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34187|   506k|                return kv;
34188|   506k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (34188:24): [True: 793, False: 3.27k]
  ------------------
34189|    793|                first_bucket = kv;
34190|    793|            }
34191|   510k|        } else if (janet_equals(kv->key, key)) {
  ------------------
  |  Branch (34191:20): [True: 7.13k, False: 37.7k]
  ------------------
34192|  7.13k|            return buckets + i;
34193|  7.13k|        }
34194|   555k|    }
34195|  19.9k|    return first_bucket;
34196|   533k|}
janet_dict_find_keyword:
34202|  1.96M|    const uint8_t *cstr, int32_t cstr_len) {
34203|  1.96M|    int32_t hash = janet_string_calchash(cstr, cstr_len);
34204|  1.96M|    int32_t index = janet_maphash(cap, hash);
  ------------------
  |  |  393|  1.96M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
34205|  1.96M|    int32_t i;
34206|  1.96M|    const JanetKV *first_bucket = NULL;
34207|       |    /* Higher half */
34208|  3.44M|    for (i = index; i < cap; i++) {
  ------------------
  |  Branch (34208:21): [True: 3.02M, False: 413k]
  ------------------
34209|  3.02M|        const JanetKV *kv = buckets + i;
34210|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34211|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34212|   648k|                return kv;
34213|   648k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (34213:24): [True: 145, False: 348]
  ------------------
34214|    145|                first_bucket = kv;
34215|    145|            }
34216|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34217|       |            /* Works for symbol and keyword, too */
34218|  1.85M|            JanetString str = janet_unwrap_string(kv->key);
  ------------------
  |  |  858|  1.85M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
34219|  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)))
  |  |  ------------------
  ------------------
34220|  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 (34220:17): [True: 905k, False: 950k]
  |  Branch (34220:51): [True: 905k, False: 0]
  |  Branch (34220:70): [True: 905k, False: 0]
  ------------------
34221|   905k|                return buckets + i;
34222|   905k|            }
34223|  1.85M|        }
34224|  3.02M|    }
34225|       |    /* Lower half */
34226|   413k|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (34226:17): [True: 413k, False: 0]
  ------------------
34227|   413k|        const JanetKV *kv = buckets + i;
34228|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34229|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34230|   413k|                return kv;
34231|   413k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (34231:24): [True: 0, False: 0]
  ------------------
34232|      0|                first_bucket = kv;
34233|      0|            }
34234|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34235|       |            /* Works for symbol and keyword, too */
34236|    332|            JanetString str = janet_unwrap_string(kv->key);
  ------------------
  |  |  858|    332|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
34237|    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)))
  |  |  ------------------
  ------------------
34238|    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 (34238:17): [True: 0, False: 332]
  |  Branch (34238:51): [True: 0, False: 0]
  |  Branch (34238:70): [True: 0, False: 0]
  ------------------
34239|      0|                return buckets + i;
34240|      0|            }
34241|    332|        }
34242|   413k|    }
34243|      0|    return first_bucket;
34244|   413k|}
janet_dictionary_next:
34256|  12.6k|const JanetKV *janet_dictionary_next(const JanetKV *kvs, int32_t cap, const JanetKV *kv) {
34257|  12.6k|    const JanetKV *end = kvs + cap;
34258|  12.6k|    kv = (kv == NULL) ? kvs : kv + 1;
  ------------------
  |  Branch (34258:10): [True: 10.8k, False: 1.82k]
  ------------------
34259|  26.5k|    while (kv < end) {
  ------------------
  |  Branch (34259:12): [True: 15.7k, False: 10.8k]
  ------------------
34260|  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 (34260:13): [True: 1.82k, False: 13.9k]
  ------------------
34261|  1.82k|            return kv;
34262|  13.9k|        kv++;
34263|  13.9k|    }
34264|  10.8k|    return NULL;
34265|  12.6k|}
janet_cstrcmp:
34269|  12.3M|int janet_cstrcmp(const uint8_t *str, const char *other) {
34270|  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)))
  |  |  ------------------
  ------------------
34271|  12.3M|    int32_t index;
34272|  30.1M|    for (index = 0; index < len; index++) {
  ------------------
  |  Branch (34272:21): [True: 27.8M, False: 2.36M]
  ------------------
34273|  27.8M|        uint8_t c = str[index];
34274|  27.8M|        uint8_t k = ((const uint8_t *)other)[index];
34275|  27.8M|        if (c < k) return -1;
  ------------------
  |  Branch (34275:13): [True: 2.40M, False: 25.4M]
  ------------------
34276|  25.4M|        if (c > k) return 1;
  ------------------
  |  Branch (34276:13): [True: 7.53M, False: 17.8M]
  ------------------
34277|  17.8M|        if (k == '\0') break;
  ------------------
  |  Branch (34277:13): [True: 0, False: 17.8M]
  ------------------
34278|  17.8M|    }
34279|  2.36M|    return (other[index] == '\0') ? 0 : -1;
  ------------------
  |  Branch (34279:12): [True: 2.36M, False: 1.07k]
  ------------------
34280|  12.3M|}
janet_strbinsearch:
34289|  1.01M|    const uint8_t *key) {
34290|  1.01M|    size_t low = 0;
34291|  1.01M|    size_t hi = tabcount;
34292|  1.01M|    const char *t = (const char *)tab;
34293|  2.84M|    while (low < hi) {
  ------------------
  |  Branch (34293:12): [True: 2.68M, False: 162k]
  ------------------
34294|  2.68M|        size_t mid = low + ((hi - low) / 2);
34295|  2.68M|        const char **item = (const char **)(t + mid * itemsize);
34296|  2.68M|        const char *name = *item;
34297|  2.68M|        int comp = janet_cstrcmp(key, name);
34298|  2.68M|        if (comp < 0) {
  ------------------
  |  Branch (34298:13): [True: 1.18M, False: 1.50M]
  ------------------
34299|  1.18M|            hi = mid;
34300|  1.50M|        } else if (comp > 0) {
  ------------------
  |  Branch (34300:20): [True: 650k, False: 849k]
  ------------------
34301|   650k|            low = mid + 1;
34302|   849k|        } else {
34303|   849k|            return (const void *)item;
34304|   849k|        }
34305|  2.68M|    }
34306|   162k|    return NULL;
34307|  1.01M|}
janet_registry_put:
34369|  2.52M|    int32_t source_line) {
34370|  2.52M|    if (janet_vm.registry_count == janet_vm.registry_cap) {
  ------------------
  |  Branch (34370:9): [True: 7.16k, False: 2.51M]
  ------------------
34371|  7.16k|        size_t newcap = (janet_vm.registry_count + 1) * 2;
34372|       |        /* Size it nicely with core by default */
34373|  7.16k|        if (newcap < 512) {
  ------------------
  |  Branch (34373:13): [True: 7.16k, False: 0]
  ------------------
34374|  7.16k|            newcap = 512;
34375|  7.16k|        }
34376|  7.16k|        void *newmem = janet_realloc(janet_vm.registry, newcap * sizeof(JanetCFunRegistry));
  ------------------
  |  | 2396|  7.16k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
34377|  7.16k|        if (NULL == newmem) {
  ------------------
  |  Branch (34377:13): [True: 0, False: 7.16k]
  ------------------
34378|      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]
  |  |  ------------------
  ------------------
34379|      0|        }
34380|  7.16k|        janet_vm.registry = newmem;
34381|  7.16k|        janet_vm.registry_cap = newcap;
34382|  7.16k|    }
34383|  2.52M|    JanetCFunRegistry value = {
34384|  2.52M|        key,
34385|  2.52M|        name,
34386|  2.52M|        name_prefix,
34387|  2.52M|        source_file,
34388|  2.52M|        source_line
34389|  2.52M|    };
34390|  2.52M|    janet_vm.registry[janet_vm.registry_count++] = value;
34391|  2.52M|    janet_vm.registry_dirty = 1;
34392|  2.52M|}
janet_registry_get:
34394|  1.27k|JanetCFunRegistry *janet_registry_get(JanetCFunction key) {
34395|  1.27k|    if (janet_vm.registry_dirty) {
  ------------------
  |  Branch (34395:9): [True: 1.26k, False: 13]
  ------------------
34396|  1.26k|        janet_registry_sort();
34397|  1.26k|    }
34398|   263k|    for (size_t i = 0; i < janet_vm.registry_count; i++) {
  ------------------
  |  Branch (34398:24): [True: 263k, False: 37]
  ------------------
34399|   263k|        if (janet_vm.registry[i].cfun == key) {
  ------------------
  |  Branch (34399:13): [True: 1.23k, False: 262k]
  ------------------
34400|  1.23k|            return janet_vm.registry + i;
34401|  1.23k|        }
34402|   263k|    }
34403|     37|    JanetCFunRegistry *lo = janet_vm.registry;
34404|     37|    JanetCFunRegistry *hi = lo + janet_vm.registry_count;
34405|    333|    while (lo < hi) {
  ------------------
  |  Branch (34405:12): [True: 296, False: 37]
  ------------------
34406|    296|        JanetCFunRegistry *mid = lo + (hi - lo) / 2;
34407|    296|        if (mid->cfun == key) {
  ------------------
  |  Branch (34407:13): [True: 0, False: 296]
  ------------------
34408|      0|            return mid;
34409|      0|        }
34410|    296|        if ((void *)(mid->cfun) > (void *)(key)) {
  ------------------
  |  Branch (34410:13): [True: 0, False: 296]
  ------------------
34411|      0|            hi = mid;
34412|    296|        } else {
34413|    296|            lo = mid + 1;
34414|    296|        }
34415|    296|    }
34416|     37|    return NULL;
34417|     37|}
janet_register_abstract_type:
34518|  64.4k|void janet_register_abstract_type(const JanetAbstractType *at) {
34519|  64.4k|    janet_check_pointer_align((void *) at);
34520|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34521|  64.4k|    Janet check = janet_table_get(janet_vm.abstract_registry, sym);
34522|  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 (34522:9): [True: 0, False: 64.4k]
  |  Branch (34522:47): [True: 0, False: 0]
  ------------------
34523|      0|        janet_panicf("cannot register abstract type %s, "
34524|      0|                     "a type with the same name exists", at->name);
34525|      0|    }
34526|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34527|  64.4k|}
janet_get_abstract_type:
34529|  1.04k|const JanetAbstractType *janet_get_abstract_type(Janet key) {
34530|  1.04k|    Janet wrapped = janet_table_get(janet_vm.abstract_registry, key);
34531|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34532|      1|        return NULL;
34533|      1|    }
34534|  1.04k|    return (JanetAbstractType *)(janet_unwrap_pointer(wrapped));
  ------------------
  |  |  862|  1.04k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
34535|  1.04k|}
janet_core_def_sm:
34538|  21.4k|void janet_core_def_sm(JanetTable *env, const char *name, Janet x, const void *p, const void *sf, int32_t sl) {
34539|  21.4k|    (void) sf;
34540|  21.4k|    (void) sl;
34541|  21.4k|    (void) p;
34542|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34543|  21.4k|    janet_table_put(env, key, x);
34544|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34545|      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))
  ------------------
34546|      0|    }
34547|  21.4k|}
janet_core_cfuns_ext:
34549|   157k|void janet_core_cfuns_ext(JanetTable *env, const char *regprefix, const JanetRegExt *cfuns) {
34550|   157k|    (void) regprefix;
34551|  2.67M|    while (cfuns->name) {
  ------------------
  |  Branch (34551:12): [True: 2.52M, False: 157k]
  ------------------
34552|  2.52M|        janet_check_pointer_align(cfuns->cfun);
34553|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34554|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34555|  2.52M|        janet_registry_put(cfuns->cfun, cfuns->name, regprefix, cfuns->source_file, cfuns->source_line);
34556|  2.52M|        cfuns++;
34557|  2.52M|    }
34558|   157k|}
janet_binding_from_entry:
34561|   292k|JanetBinding janet_binding_from_entry(Janet entry) {
34562|   292k|    JanetTable *entry_table;
34563|   292k|    JanetBinding binding = {
34564|   292k|        JANET_BINDING_NONE,
34565|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34566|   292k|        JANET_BINDING_DEP_NONE
34567|   292k|    };
34568|       |
34569|       |    /* Check environment for entry */
34570|   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 (34570:9): [True: 23.5k, False: 268k]
  ------------------
34571|  23.5k|        return binding;
34572|   268k|    entry_table = janet_unwrap_table(entry);
  ------------------
  |  |  856|   268k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
34573|       |
34574|   268k|    Janet deprecate = janet_table_get_keyword(entry_table, "deprecated");
34575|   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]
  |  |  ------------------
  ------------------
34576|   268k|    Janet value = janet_table_get_keyword(entry_table, "value");
34577|   268k|    Janet ref = janet_table_get_keyword(entry_table, "ref");
34578|       |
34579|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34580|      0|        JanetKeyword depkw = janet_unwrap_keyword(deprecate);
  ------------------
  |  |  860|      0|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
34581|      0|        if (!janet_cstrcmp(depkw, "relaxed")) {
  ------------------
  |  Branch (34581:13): [True: 0, False: 0]
  ------------------
34582|      0|            binding.deprecation = JANET_BINDING_DEP_RELAXED;
34583|      0|        } else if (!janet_cstrcmp(depkw, "normal")) {
  ------------------
  |  Branch (34583:20): [True: 0, False: 0]
  ------------------
34584|      0|            binding.deprecation = JANET_BINDING_DEP_NORMAL;
34585|      0|        } else if (!janet_cstrcmp(depkw, "strict")) {
  ------------------
  |  Branch (34585:20): [True: 0, False: 0]
  ------------------
34586|      0|            binding.deprecation = JANET_BINDING_DEP_STRICT;
34587|      0|        }
34588|   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 (34588:16): [True: 0, False: 268k]
  ------------------
34589|      0|        binding.deprecation = JANET_BINDING_DEP_NORMAL;
34590|      0|    }
34591|       |
34592|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34593|   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 (34593:17): [True: 35, False: 268k]
  ------------------
34594|       |
34595|   268k|    if (macro) {
  ------------------
  |  Branch (34595:9): [True: 206k, False: 62.0k]
  ------------------
34596|   206k|        binding.value = redef ? ref : value;
  ------------------
  |  Branch (34596:25): [True: 0, False: 206k]
  ------------------
34597|   206k|        binding.type = redef ? JANET_BINDING_DYNAMIC_MACRO : JANET_BINDING_MACRO;
  ------------------
  |  Branch (34597:24): [True: 0, False: 206k]
  ------------------
34598|   206k|        return binding;
34599|   206k|    }
34600|       |
34601|  62.0k|    if (ref_is_valid) {
  ------------------
  |  Branch (34601:9): [True: 35, False: 61.9k]
  ------------------
34602|     35|        binding.value = ref;
34603|     35|        binding.type = redef ? JANET_BINDING_DYNAMIC_DEF : JANET_BINDING_VAR;
  ------------------
  |  Branch (34603:24): [True: 0, False: 35]
  ------------------
34604|  61.9k|    } else {
34605|  61.9k|        binding.value = value;
34606|  61.9k|        binding.type = JANET_BINDING_DEF;
34607|  61.9k|    }
34608|       |
34609|  62.0k|    return binding;
34610|   268k|}
janet_text_substitution:
34641|    462|    JanetArray *extra_argv) {
34642|    462|    int32_t extra_argc = extra_argv == NULL ? 0 : extra_argv->count;
  ------------------
  |  Branch (34642:26): [True: 23, False: 439]
  ------------------
34643|    462|    JanetType type = janet_type(*subst);
  ------------------
  |  |  790|    462|    (isnan((x).number) \
  |  |  791|    462|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|    462|        : JANET_NUMBER)
  ------------------
  |  Branch (34643:22): [True: 458, False: 4]
  ------------------
34644|    462|    switch (type) {
34645|     79|        case JANET_FUNCTION:
  ------------------
  |  Branch (34645:9): [True: 79, False: 383]
  ------------------
34646|     79|        case JANET_CFUNCTION: {
  ------------------
  |  Branch (34646:9): [True: 0, False: 462]
  ------------------
34647|     79|            int32_t argc = 1 + extra_argc;
34648|     79|            Janet *argv = janet_tuple_begin(argc);
34649|     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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34650|    252|            for (int32_t i = 0; i < extra_argc; i++) {
  ------------------
  |  Branch (34650:33): [True: 173, False: 79]
  ------------------
34651|    173|                argv[i + 1] = extra_argv->data[i];
34652|    173|            }
34653|     79|            janet_tuple_end(argv);
34654|     79|            if (type == JANET_FUNCTION) {
  ------------------
  |  Branch (34654:17): [True: 79, False: 0]
  ------------------
34655|     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))
  ------------------
34656|     79|            } else {
34657|      0|                return to_byte_view(janet_unwrap_cfunction(*subst)(argc, argv));
  ------------------
  |  |  864|      0|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
34658|      0|            }
34659|     79|        }
34660|    383|        default:
  ------------------
  |  Branch (34660:9): [True: 383, False: 79]
  ------------------
34661|    383|            return memoize_byte_view(subst);
34662|    462|    }
34663|    462|}
janet_resolve_ext:
34665|   292k|JanetBinding janet_resolve_ext(JanetTable *env, const uint8_t *sym) {
34666|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34667|   292k|    return janet_binding_from_entry(entry);
34668|   292k|}
janet_resolve:
34670|   176k|JanetBindingType janet_resolve(JanetTable *env, const uint8_t *sym, Janet *out) {
34671|   176k|    JanetBinding binding = janet_resolve_ext(env, sym);
34672|   176k|    if (binding.type == JANET_BINDING_DYNAMIC_DEF || binding.type == JANET_BINDING_DYNAMIC_MACRO) {
  ------------------
  |  Branch (34672:9): [True: 0, False: 176k]
  |  Branch (34672:54): [True: 0, False: 176k]
  ------------------
34673|      0|        *out = janet_array_peek(janet_unwrap_array(binding.value));
  ------------------
  |  |  855|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
34674|   176k|    } else {
34675|   176k|        *out = binding.value;
34676|   176k|    }
34677|   176k|    return binding.type;
34678|   176k|}
janet_indexed_view:
34690|  40.7M|int janet_indexed_view(Janet seq, const Janet **data, int32_t *len) {
34691|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34692|  12.3M|        *data = janet_unwrap_array(seq)->data;
  ------------------
  |  |  855|  12.3M|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
34693|  12.3M|        *len = janet_unwrap_array(seq)->count;
  ------------------
  |  |  855|  12.3M|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
34694|  12.3M|        return 1;
34695|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34696|  28.3M|        *data = janet_unwrap_tuple(seq);
  ------------------
  |  |  853|  28.3M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
34697|  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)))
  |  |  ------------------
  ------------------
34698|  28.3M|        return 1;
34699|  28.3M|    }
34700|     83|    return 0;
34701|  40.7M|}
janet_bytes_view:
34705|  21.2M|int janet_bytes_view(Janet str, const uint8_t **data, int32_t *len) {
34706|  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 (34706:19): [True: 21.2M, False: 42]
  ------------------
34707|  21.2M|    if (t == JANET_STRING || t == JANET_SYMBOL || t == JANET_KEYWORD) {
  ------------------
  |  Branch (34707:9): [True: 236k, False: 21.0M]
  |  Branch (34707:30): [True: 20.9M, False: 52.6k]
  |  Branch (34707:51): [True: 3.68k, False: 48.9k]
  ------------------
34708|  21.2M|        *data = janet_unwrap_string(str);
  ------------------
  |  |  858|  21.2M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
34709|  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)))
  |  |  ------------------
  ------------------
34710|  21.2M|        return 1;
34711|  21.2M|    } else if (t == JANET_BUFFER) {
  ------------------
  |  Branch (34711:16): [True: 46.9k, False: 2.00k]
  ------------------
34712|  46.9k|        *data = janet_unwrap_buffer(str)->data;
  ------------------
  |  |  857|  46.9k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
34713|  46.9k|        *len = janet_unwrap_buffer(str)->count;
  ------------------
  |  |  857|  46.9k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
34714|  46.9k|        return 1;
34715|  46.9k|    } else if (t == JANET_ABSTRACT) {
  ------------------
  |  Branch (34715:16): [True: 22, False: 1.98k]
  ------------------
34716|     22|        void *abst = janet_unwrap_abstract(str);
  ------------------
  |  |  861|     22|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
34717|     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)))
  |  |  ------------------
  ------------------
34718|     22|        if (NULL == atype->bytes) {
  ------------------
  |  Branch (34718:13): [True: 22, False: 0]
  ------------------
34719|     22|            return 0;
34720|     22|        }
34721|      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)))
  |  |  ------------------
  ------------------
34722|      0|        *data = view.bytes;
34723|      0|        *len = view.len;
34724|      0|        return 1;
34725|     22|    }
34726|  1.98k|    return 0;
34727|  21.2M|}
janet_dictionary_view:
34732|  20.7k|int janet_dictionary_view(Janet tab, const JanetKV **data, int32_t *len, int32_t *cap) {
34733|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34734|    259|        *data = janet_unwrap_table(tab)->data;
  ------------------
  |  |  856|    259|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
34735|    259|        *cap = janet_unwrap_table(tab)->capacity;
  ------------------
  |  |  856|    259|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
34736|    259|        *len = janet_unwrap_table(tab)->count;
  ------------------
  |  |  856|    259|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
34737|    259|        return 1;
34738|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34739|  20.4k|        *data = janet_unwrap_struct(tab);
  ------------------
  |  |  852|  20.4k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
34740|  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)))
  |  |  ------------------
  ------------------
34741|  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)))
  |  |  ------------------
  ------------------
34742|  20.4k|        return 1;
34743|  20.4k|    }
34744|      2|    return 0;
34745|  20.7k|}
janet_checkint:
34747|   157M|int janet_checkint(Janet x) {
34748|   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.52M]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 2.52M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   157M|        : 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 (34748:9): [True: 2.52M, False: 154M]
  ------------------
34749|  2.52M|        return 0;
34750|   154M|    double dval = janet_unwrap_number(x);
  ------------------
  |  |  834|   154M|#define janet_unwrap_number(x) ((x).number)
  ------------------
34751|       |    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.16k]
  |  |  |  Branch (953:73): [True: 154M, False: 1.14k]
  |  |  ------------------
  ------------------
34752|   157M|}
janet_checksize:
34789|      5|int janet_checksize(Janet x) {
34790|      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 (34790:9): [True: 2, False: 3]
  ------------------
34791|      2|        return 0;
34792|      3|    double dval = janet_unwrap_number(x);
  ------------------
  |  |  834|      3|#define janet_unwrap_number(x) ((x).number)
  ------------------
34793|      3|    if (dval != (double)((size_t) dval)) return 0;
  ------------------
  |  Branch (34793:9): [True: 0, False: 3]
  ------------------
34794|       |#ifdef JANET_PLAN9
34795|       |    return dval <= SIZE_MAX;
34796|       |#else
34797|      3|    if (SIZE_MAX > JANET_INTMAX_INT64) {
  ------------------
  |  |  162|      3|#define JANET_INTMAX_INT64 9007199254740992
  ------------------
  |  Branch (34797:9): [True: 3, Folded]
  ------------------
34798|      3|        return dval <= JANET_INTMAX_INT64;
  ------------------
  |  |  162|      3|#define JANET_INTMAX_INT64 9007199254740992
  ------------------
34799|      3|    } else {
34800|       |        return dval <= SIZE_MAX;
34801|      0|    }
34802|      3|#endif
34803|      3|}
janet_sorted_keys:
34815|  3.27k|int32_t janet_sorted_keys(const JanetKV *dict, int32_t cap, int32_t *index_buffer) {
34816|       |
34817|       |    /* First, put populated indices into index_buffer */
34818|  3.27k|    int32_t next_index = 0;
34819|  28.7k|    for (int32_t i = 0; i < cap; i++) {
  ------------------
  |  Branch (34819:25): [True: 25.4k, False: 3.27k]
  ------------------
34820|  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 (34820:13): [True: 8.29k, False: 17.1k]
  ------------------
34821|  8.29k|            index_buffer[next_index++] = i;
34822|  8.29k|        }
34823|  25.4k|    }
34824|       |
34825|       |    /* Next, sort those (simple insertion sort here for now) */
34826|  8.42k|    for (int32_t i = 1; i < next_index; i++) {
  ------------------
  |  Branch (34826:25): [True: 5.14k, False: 3.27k]
  ------------------
34827|  5.14k|        int32_t index_to_insert = index_buffer[i];
34828|  5.14k|        Janet lhs = dict[index_to_insert].key;
34829|  26.8k|        for (int32_t j = i - 1; j >= 0; j--) {
  ------------------
  |  Branch (34829:33): [True: 23.7k, False: 3.17k]
  ------------------
34830|  23.7k|            index_buffer[j + 1] = index_buffer[j];
34831|  23.7k|            Janet rhs = dict[index_buffer[j]].key;
34832|  23.7k|            if (janet_compare(lhs, rhs) >= 0) {
  ------------------
  |  Branch (34832:17): [True: 1.97k, False: 21.7k]
  ------------------
34833|  1.97k|                index_buffer[j + 1] = index_to_insert;
34834|  1.97k|                break;
34835|  21.7k|            } else if (j == 0) {
  ------------------
  |  Branch (34835:24): [True: 3.17k, False: 18.5k]
  ------------------
34836|  3.17k|                index_buffer[0] = index_to_insert;
34837|  3.17k|            }
34838|  23.7k|        }
34839|  5.14k|    }
34840|       |
34841|       |    /* Return number of indices found */
34842|  3.27k|    return next_index;
34843|       |
34844|  3.27k|}
janet_gettime:
34903|  4.15k|int janet_gettime(struct timespec *spec, enum JanetTimeSource source) {
34904|  4.15k|    clockid_t cid = CLOCK_REALTIME;
34905|  4.15k|    if (source == JANET_TIME_REALTIME) {
  ------------------
  |  Branch (34905:9): [True: 1, False: 4.15k]
  ------------------
34906|      1|        cid = CLOCK_REALTIME;
34907|  4.15k|    } else if (source == JANET_TIME_MONOTONIC) {
  ------------------
  |  Branch (34907:16): [True: 4.15k, False: 0]
  ------------------
34908|  4.15k|        cid = CLOCK_MONOTONIC;
34909|  4.15k|    } else if (source == JANET_TIME_CPUTIME) {
  ------------------
  |  Branch (34909:16): [True: 0, False: 0]
  ------------------
34910|       |        cid = CLOCK_PROCESS_CPUTIME_ID;
34911|      0|    }
34912|  4.15k|    return clock_gettime(cid, spec);
34913|  4.15k|}
janet_strerror:
34918|     31|const char *janet_strerror(int e) {
34919|       |#ifdef JANET_WINDOWS
34920|       |    /* Microsoft strerror seems sane here and is thread safe by default */
34921|       |    return strerror(e);
34922|       |#elif defined(__GLIBC__)
34923|       |    /* See https://linux.die.net/man/3/strerror_r */
34924|     31|    return strerror_r(e, janet_vm.strerror_buf, sizeof(janet_vm.strerror_buf));
34925|       |#else
34926|       |    strerror_r(e, janet_vm.strerror_buf, sizeof(janet_vm.strerror_buf));
34927|       |    return janet_vm.strerror_buf;
34928|       |#endif
34929|     31|}
janet_cryptorand:
34937|      7|int janet_cryptorand(uint8_t *out, size_t n) {
34938|      7|#ifndef JANET_NO_CRYPTORAND
34939|       |#ifdef JANET_WINDOWS
34940|       |    for (size_t i = 0; i < n; i += sizeof(unsigned int)) {
34941|       |        unsigned int v;
34942|       |        if (rand_s(&v))
34943|       |            return -1;
34944|       |        for (int32_t j = 0; (j < (int32_t) sizeof(unsigned int)) && (i + j < n); j++) {
34945|       |            out[i + j] = v & 0xff;
34946|       |            v = v >> 8;
34947|       |        }
34948|       |    }
34949|       |    return 0;
34950|       |#elif defined(JANET_BSD) || defined(MAC_OS_X_VERSION_10_7)
34951|       |    arc4random_buf(out, n);
34952|       |    return 0;
34953|       |#else
34954|       |    /* We should be able to call getrandom on linux, but it doesn't seem
34955|       |       to be uniformly supported on linux distros.
34956|       |       On Mac, arc4random_buf wasn't available on until 10.7.
34957|       |       In these cases, use this fallback path for now... */
34958|      7|    int rc;
34959|      7|    int randfd;
34960|      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]
  |  |  ------------------
  ------------------
34961|      7|    if (randfd < 0)
  ------------------
  |  Branch (34961:9): [True: 0, False: 7]
  ------------------
34962|      0|        return -1;
34963|     13|    while (n > 0) {
  ------------------
  |  Branch (34963:12): [True: 6, False: 7]
  ------------------
34964|      6|        ssize_t nread;
34965|      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]
  |  |  ------------------
  ------------------
34966|      6|        if (nread <= 0) {
  ------------------
  |  Branch (34966:13): [True: 0, False: 6]
  ------------------
34967|      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]
  |  |  ------------------
  ------------------
34968|      0|            return -1;
34969|      0|        }
34970|      6|        out += nread;
34971|      6|        n -= nread;
34972|      6|    }
34973|      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]
  |  |  ------------------
  ------------------
34974|      7|    return 0;
34975|      7|#endif
34976|       |#else
34977|       |    (void) out;
34978|       |    (void) n;
34979|       |    return -1;
34980|       |#endif
34981|      7|}
janet_next_impl:
35209|  42.6M|Janet janet_next_impl(Janet ds, Janet key, int is_interpreter) {
35210|  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 (35210:19): [True: 42.6M, False: 28]
  ------------------
35211|  42.6M|    switch (t) {
35212|    103|        default:
  ------------------
  |  Branch (35212:9): [True: 103, False: 42.6M]
  ------------------
35213|    103|            janet_panicf("expected iterable type, got %v", ds);
35214|   360k|        case JANET_TABLE:
  ------------------
  |  Branch (35214:9): [True: 360k, False: 42.2M]
  ------------------
35215|   601k|        case JANET_STRUCT: {
  ------------------
  |  Branch (35215:9): [True: 240k, False: 42.3M]
  ------------------
35216|   601k|            const JanetKV *start;
35217|   601k|            int32_t cap;
35218|   601k|            if (t == JANET_TABLE) {
  ------------------
  |  Branch (35218:17): [True: 360k, False: 240k]
  ------------------
35219|   360k|                JanetTable *tab = janet_unwrap_table(ds);
  ------------------
  |  |  856|   360k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
35220|   360k|                cap = tab->capacity;
35221|   360k|                start = tab->data;
35222|   360k|            } else {
35223|   240k|                JanetStruct st = janet_unwrap_struct(ds);
  ------------------
  |  |  852|   240k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35224|   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)))
  |  |  ------------------
  ------------------
35225|   240k|                start = st;
35226|   240k|            }
35227|   601k|            const JanetKV *end = start + cap;
35228|   601k|            const JanetKV *kv = janet_checktype(key, JANET_NIL)
  ------------------
  |  |  801|   601k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 245k, False: 355k]
  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35229|   601k|                                ? start
35230|   601k|                                : janet_dict_find(start, cap, key) + 1;
35231|  1.49M|            while (kv < end) {
  ------------------
  |  Branch (35231:20): [True: 1.27M, False: 226k]
  ------------------
35232|  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 (35232:21): [True: 374k, False: 898k]
  ------------------
35233|   898k|                kv++;
35234|   898k|            }
35235|   226k|            break;
35236|   601k|        }
35237|   226k|        case JANET_STRING:
  ------------------
  |  Branch (35237:9): [True: 24.1k, False: 42.6M]
  ------------------
35238|  24.4k|        case JANET_KEYWORD:
  ------------------
  |  Branch (35238:9): [True: 305, False: 42.6M]
  ------------------
35239|   165k|        case JANET_SYMBOL:
  ------------------
  |  Branch (35239:9): [True: 141k, False: 42.4M]
  ------------------
35240|   183k|        case JANET_BUFFER:
  ------------------
  |  Branch (35240:9): [True: 17.9k, False: 42.6M]
  ------------------
35241|   910k|        case JANET_ARRAY:
  ------------------
  |  Branch (35241:9): [True: 726k, False: 41.9M]
  ------------------
35242|  42.0M|        case JANET_TUPLE: {
  ------------------
  |  Branch (35242:9): [True: 41.1M, False: 1.51M]
  ------------------
35243|  42.0M|            int32_t i;
35244|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35245|  17.3M|                i = 0;
35246|  24.6M|            } else if (janet_checkint(key)) {
  ------------------
  |  Branch (35246:24): [True: 24.6M, False: 0]
  ------------------
35247|  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)
  |  |  ------------------
  ------------------
35248|  24.6M|            } else {
35249|      0|                break;
35250|      0|            }
35251|  42.0M|            int32_t len;
35252|  42.0M|            if (t == JANET_BUFFER) {
  ------------------
  |  Branch (35252:17): [True: 17.9k, False: 42.0M]
  ------------------
35253|  17.9k|                len = janet_unwrap_buffer(ds)->count;
  ------------------
  |  |  857|  17.9k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
35254|  42.0M|            } else if (t == JANET_ARRAY) {
  ------------------
  |  Branch (35254:24): [True: 726k, False: 41.2M]
  ------------------
35255|   726k|                len = janet_unwrap_array(ds)->count;
  ------------------
  |  |  855|   726k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35256|  41.2M|            } else if (t == JANET_TUPLE) {
  ------------------
  |  Branch (35256:24): [True: 41.1M, False: 165k]
  ------------------
35257|  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)))
  |  |  ------------------
  ------------------
35258|  41.1M|            } else {
35259|   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)))
  |  |  ------------------
  ------------------
35260|   165k|            }
35261|  42.0M|            if (i < len && i >= 0) {
  ------------------
  |  Branch (35261:17): [True: 30.1M, False: 11.9M]
  |  Branch (35261:28): [True: 30.1M, False: 0]
  ------------------
35262|  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)
  |  |  ------------------
  ------------------
35263|  30.1M|            }
35264|  11.9M|            break;
35265|  42.0M|        }
35266|  11.9M|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35266:9): [True: 1.70k, False: 42.6M]
  ------------------
35267|  1.70k|            JanetAbstract abst = janet_unwrap_abstract(ds);
  ------------------
  |  |  861|  1.70k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
35268|  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)))
  |  |  ------------------
  ------------------
35269|  1.70k|            if (NULL == at->next) break;
  ------------------
  |  Branch (35269:17): [True: 0, False: 1.70k]
  ------------------
35270|  1.70k|            return at->next(abst, key);
35271|  1.70k|        }
35272|      3|        case JANET_FIBER: {
  ------------------
  |  Branch (35272:9): [True: 3, False: 42.6M]
  ------------------
35273|      3|            JanetFiber *child = janet_unwrap_fiber(ds);
  ------------------
  |  |  854|      3|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
35274|      3|            Janet retreg;
35275|      3|            JanetFiberStatus status = janet_fiber_status(child);
35276|      3|            if (status == JANET_STATUS_ALIVE ||
  ------------------
  |  Branch (35276:17): [True: 0, False: 3]
  ------------------
35277|      3|                    status == JANET_STATUS_DEAD ||
  ------------------
  |  Branch (35277:21): [True: 0, False: 3]
  ------------------
35278|      3|                    status == JANET_STATUS_ERROR ||
  ------------------
  |  Branch (35278:21): [True: 0, False: 3]
  ------------------
35279|      3|                    status == JANET_STATUS_USER0 ||
  ------------------
  |  Branch (35279:21): [True: 0, False: 3]
  ------------------
35280|      3|                    status == JANET_STATUS_USER1 ||
  ------------------
  |  Branch (35280:21): [True: 0, False: 3]
  ------------------
35281|      3|                    status == JANET_STATUS_USER2 ||
  ------------------
  |  Branch (35281:21): [True: 0, False: 3]
  ------------------
35282|      3|                    status == JANET_STATUS_USER3 ||
  ------------------
  |  Branch (35282:21): [True: 0, False: 3]
  ------------------
35283|      3|                    status == JANET_STATUS_USER4) {
  ------------------
  |  Branch (35283:21): [True: 0, False: 3]
  ------------------
35284|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35285|      0|            }
35286|      3|            janet_vm.fiber->child = child;
35287|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35288|      3|            if (sig != JANET_SIGNAL_OK && !(child->flags & (1 << sig))) {
  ------------------
  |  Branch (35288:17): [True: 0, False: 3]
  |  Branch (35288:43): [True: 0, False: 0]
  ------------------
35289|      0|                if (is_interpreter) {
  ------------------
  |  Branch (35289:21): [True: 0, False: 0]
  ------------------
35290|      0|                    janet_signalv(sig, retreg);
35291|      0|                } else {
35292|      0|                    janet_vm.fiber->child = NULL;
35293|      0|                    janet_panicv(retreg);
35294|      0|                }
35295|      0|            }
35296|      3|            janet_vm.fiber->child = NULL;
35297|      3|            if (sig == JANET_SIGNAL_OK ||
  ------------------
  |  Branch (35297:17): [True: 3, False: 0]
  ------------------
35298|      0|                    sig == JANET_SIGNAL_ERROR ||
  ------------------
  |  Branch (35298:21): [True: 0, False: 0]
  ------------------
35299|      0|                    sig == JANET_SIGNAL_USER0 ||
  ------------------
  |  Branch (35299:21): [True: 0, False: 0]
  ------------------
35300|      0|                    sig == JANET_SIGNAL_USER1 ||
  ------------------
  |  Branch (35300:21): [True: 0, False: 0]
  ------------------
35301|      0|                    sig == JANET_SIGNAL_USER2 ||
  ------------------
  |  Branch (35301:21): [True: 0, False: 0]
  ------------------
35302|      0|                    sig == JANET_SIGNAL_USER3 ||
  ------------------
  |  Branch (35302:21): [True: 0, False: 0]
  ------------------
35303|      3|                    sig == JANET_SIGNAL_USER4) {
  ------------------
  |  Branch (35303:21): [True: 0, False: 0]
  ------------------
35304|       |                /* Fiber cannot be resumed, so discard last value. */
35305|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35306|      3|            } else {
35307|      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)
  |  |  ------------------
  ------------------
35308|      0|            }
35309|      3|        }
35310|  42.6M|    }
35311|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35312|  42.6M|}
janet_equals:
35328|  5.01G|int janet_equals(Janet x, Janet y) {
35329|  5.01G|    janet_vm.traversal = janet_vm.traversal_base;
35330|  5.01G|    do {
35331|  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 (35331:13): [True: 5.00G, False: 11.3M]
  |  Branch (35331:13): [True: 123M, False: 4.88G]
  |  Branch (35331:30): [True: 4.99G, False: 16.7M]
  ------------------
35332|  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 (35332:17): [True: 4.87G, False: 11.1M]
  ------------------
35333|   395k|            case JANET_NIL:
  ------------------
  |  Branch (35333:13): [True: 395k, False: 4.88G]
  ------------------
35334|   395k|                break;
35335|  1.43k|            case JANET_BOOLEAN:
  ------------------
  |  Branch (35335:13): [True: 1.43k, False: 4.88G]
  ------------------
35336|  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 (35336:21): [True: 20, False: 1.41k]
  ------------------
35337|  1.41k|                break;
35338|  11.2M|            case JANET_NUMBER:
  ------------------
  |  Branch (35338:13): [True: 11.2M, False: 4.87G]
  ------------------
35339|  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 (35339:21): [True: 405k, False: 10.8M]
  ------------------
35340|  10.8M|                break;
35341|  10.8M|            case JANET_STRING:
  ------------------
  |  Branch (35341:13): [True: 1.21M, False: 4.88G]
  ------------------
35342|  1.21M|                if (!janet_string_equal(janet_unwrap_string(x), janet_unwrap_string(y))) return 0;
  ------------------
  |  |  858|  1.21M|#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.21M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35342:21): [True: 461k, False: 758k]
  ------------------
35343|   758k|                break;
35344|   758k|            case JANET_ABSTRACT:
  ------------------
  |  Branch (35344:13): [True: 8.89k, False: 4.88G]
  ------------------
35345|  8.89k|                if (janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y))) return 0;
  ------------------
  |  |  861|  8.89k|#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.89k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35345:21): [True: 2.30k, False: 6.58k]
  ------------------
35346|  6.58k|                break;
35347|  4.87G|            default:
  ------------------
  |  Branch (35347:13): [True: 4.87G, False: 16.3M]
  ------------------
35348|  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 (35348:21): [True: 4.73G, False: 137M]
  ------------------
35349|   137M|                break;
35350|   137M|            case JANET_TUPLE: {
  ------------------
  |  Branch (35350:13): [True: 3.55M, False: 4.88G]
  ------------------
35351|  3.55M|                const Janet *t1 = janet_unwrap_tuple(x);
  ------------------
  |  |  853|  3.55M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35352|  3.55M|                const Janet *t2 = janet_unwrap_tuple(y);
  ------------------
  |  |  853|  3.55M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35353|  3.55M|                if (t1 == t2) break;
  ------------------
  |  Branch (35353:21): [True: 587k, False: 2.96M]
  ------------------
35354|  2.96M|                if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(t1) ^ janet_tuple_flag(t2))) return 0;
  ------------------
  |  | 1788|  2.96M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
                              if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(t1) ^ janet_tuple_flag(t2))) return 0;
  ------------------
  |  | 1796|  2.96M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|  2.96M|#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.96M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|  2.96M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35354:21): [True: 13.2k, False: 2.95M]
  ------------------
35355|  2.95M|                if (janet_tuple_hash(t1) != janet_tuple_hash(t2)) return 0;
  ------------------
  |  | 1793|  2.95M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1790|  2.95M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_tuple_hash(t1) != janet_tuple_hash(t2)) return 0;
  ------------------
  |  | 1793|  2.95M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1790|  2.95M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35355:21): [True: 2.67M, False: 279k]
  ------------------
35356|   279k|                if (janet_tuple_length(t1) != janet_tuple_length(t2)) return 0;
  ------------------
  |  | 1792|   279k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|   279k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_tuple_length(t1) != janet_tuple_length(t2)) return 0;
  ------------------
  |  | 1792|   279k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|   279k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35356:21): [True: 0, False: 279k]
  ------------------
35357|   279k|                push_traversal_node(janet_tuple_head(t1), janet_tuple_head(t2), 0);
  ------------------
  |  | 1790|   279k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
                              push_traversal_node(janet_tuple_head(t1), janet_tuple_head(t2), 0);
  ------------------
  |  | 1790|   279k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
35358|   279k|                break;
35359|   279k|            }
35360|      0|            break;
35361|  18.4k|            case JANET_STRUCT: {
  ------------------
  |  Branch (35361:13): [True: 18.4k, False: 4.88G]
  ------------------
35362|  18.4k|                const JanetKV *s1 = janet_unwrap_struct(x);
  ------------------
  |  |  852|  18.4k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35363|  18.4k|                const JanetKV *s2 = janet_unwrap_struct(y);
  ------------------
  |  |  852|  18.4k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35364|  18.4k|                if (s1 == s2) break;
  ------------------
  |  Branch (35364:21): [True: 12.7k, False: 5.73k]
  ------------------
35365|  5.73k|                if (janet_struct_hash(s1) != janet_struct_hash(s2)) return 0;
  ------------------
  |  | 1840|  5.73k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1836|  5.73k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_struct_hash(s1) != janet_struct_hash(s2)) return 0;
  ------------------
  |  | 1840|  5.73k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1836|  5.73k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35365:21): [True: 222, False: 5.51k]
  ------------------
35366|  5.51k|                if (janet_struct_length(s1) != janet_struct_length(s2)) return 0;
  ------------------
  |  | 1838|  5.51k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1836|  5.51k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_struct_length(s1) != janet_struct_length(s2)) return 0;
  ------------------
  |  | 1838|  5.51k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1836|  5.51k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35366:21): [True: 0, False: 5.51k]
  ------------------
35367|  5.51k|                if (janet_struct_proto(s1) && !janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1841|  11.0k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|  5.51k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1841:31): [True: 0, False: 5.51k]
  |  |  ------------------
  ------------------
                              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 (35367:47): [True: 0, False: 0]
  ------------------
35368|  5.51k|                if (!janet_struct_proto(s1) && janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1841|  11.0k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|  5.51k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (!janet_struct_proto(s1) && janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1841|  5.51k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|  5.51k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1841:31): [True: 0, False: 5.51k]
  |  |  ------------------
  ------------------
  |  Branch (35368:21): [True: 5.51k, False: 0]
  ------------------
35369|  5.51k|                push_traversal_node(janet_struct_head(s1), janet_struct_head(s2), 0);
  ------------------
  |  | 1836|  5.51k|#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.51k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
35370|  5.51k|                break;
35371|  5.51k|            }
35372|      0|            break;
35373|  4.88G|        }
35374|  4.88G|    } while (!traversal_next(&x, &y));
  ------------------
  |  Branch (35374:14): [True: 603k, False: 149M]
  ------------------
35375|   149M|    return 1;
35376|  5.01G|}
janet_hash:
35388|  1.08G|int32_t janet_hash(Janet x) {
35389|  1.08G|    int32_t hash = 0;
35390|  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 (35390:13): [True: 1.04G, False: 30.9M]
  ------------------
35391|   437M|        case JANET_NIL:
  ------------------
  |  Branch (35391:9): [True: 437M, False: 643M]
  ------------------
35392|   437M|            hash = 0;
35393|   437M|            break;
35394|  55.4k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (35394:9): [True: 55.4k, False: 1.08G]
  ------------------
35395|  55.4k|            hash = janet_unwrap_boolean(x);
  ------------------
  |  |  833|  55.4k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
35396|  55.4k|            break;
35397|  9.16M|        case JANET_STRING:
  ------------------
  |  Branch (35397:9): [True: 9.16M, False: 1.07G]
  ------------------
35398|   345M|        case JANET_SYMBOL:
  ------------------
  |  Branch (35398:9): [True: 336M, False: 743M]
  ------------------
35399|   427M|        case JANET_KEYWORD:
  ------------------
  |  Branch (35399:9): [True: 81.4M, False: 999M]
  ------------------
35400|   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)))
  |  |  ------------------
  ------------------
35401|   427M|            break;
35402|  50.5M|        case JANET_TUPLE:
  ------------------
  |  Branch (35402:9): [True: 50.5M, False: 1.03G]
  ------------------
35403|  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)))
  |  |  ------------------
  ------------------
35404|  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 (35404:28): [True: 19.3M, False: 31.1M]
  ------------------
35405|  50.5M|            hash = (int32_t)((uint32_t)hash + inc); /* avoid overflow undefined behavior */
35406|  50.5M|            break;
35407|   127k|        case JANET_STRUCT:
  ------------------
  |  Branch (35407:9): [True: 127k, False: 1.08G]
  ------------------
35408|   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)))
  |  |  ------------------
  ------------------
35409|   127k|            break;
35410|  31.0M|        case JANET_NUMBER: {
  ------------------
  |  Branch (35410:9): [True: 31.0M, False: 1.04G]
  ------------------
35411|  31.0M|            union {
35412|  31.0M|                double d;
35413|  31.0M|                uint64_t u;
35414|  31.0M|            } as;
35415|  31.0M|            as.d = janet_unwrap_number(x);
  ------------------
  |  |  834|  31.0M|#define janet_unwrap_number(x) ((x).number)
  ------------------
35416|  31.0M|            as.d += 0.0; /* normalize negative 0 */
35417|  31.0M|            as.u = murmur64(as.u);
35418|  31.0M|            uint32_t hi = (uint32_t)(as.u >> 32);
35419|  31.0M|            hash = (int32_t)hi;
35420|  31.0M|            break;
35421|   345M|        }
35422|  86.2k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35422:9): [True: 86.2k, False: 1.08G]
  ------------------
35423|  86.2k|            JanetAbstract xx = janet_unwrap_abstract(x);
  ------------------
  |  |  861|  86.2k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
35424|  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)))
  |  |  ------------------
  ------------------
35425|  86.2k|            if (at->hash != NULL) {
  ------------------
  |  Branch (35425:17): [True: 10.9k, False: 75.2k]
  ------------------
35426|  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)))
  |  |  ------------------
  ------------------
35427|  10.9k|                break;
35428|  10.9k|            }
35429|  86.2k|        }
35430|       |        /* fallthrough */
35431|   134M|        default:
  ------------------
  |  Branch (35431:9): [True: 134M, False: 946M]
  ------------------
35432|   134M|            if (sizeof(double) == sizeof(void *)) {
  ------------------
  |  Branch (35432:17): [True: 134M, Folded]
  ------------------
35433|       |                /* Assuming 8 byte pointer (8 byte aligned) */
35434|   134M|                uint64_t i = murmur64(janet_u64(x));
  ------------------
  |  |  783|   134M|#define janet_u64(x) ((x).u64)
  ------------------
35435|   134M|                hash = (int32_t)(i >> 32);
35436|   134M|            } else {
35437|       |                /* Assuming 4 byte pointer (or smaller) */
35438|     70|                uintptr_t diff = (uintptr_t) janet_unwrap_pointer(x);
  ------------------
  |  |  862|     70|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
35439|     70|                uint32_t hilo = (uint32_t) diff * 2654435769u;
35440|     70|                hash = (int32_t)((hilo << 16) | (hilo >> 16));
35441|     70|            }
35442|   134M|            break;
35443|  1.08G|    }
35444|  1.08G|    return hash;
35445|  1.08G|}
janet_compare:
35450|   293k|int janet_compare(Janet x, Janet y) {
35451|   293k|    janet_vm.traversal = janet_vm.traversal_base;
35452|   293k|    int status;
35453|   383k|    do {
35454|   383k|        JanetType tx = janet_type(x);
  ------------------
  |  |  790|   383k|    (isnan((x).number) \
  |  |  791|   383k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   383k|        : JANET_NUMBER)
  ------------------
  |  Branch (35454:24): [True: 380k, False: 2.99k]
  ------------------
35455|   383k|        JanetType ty = janet_type(y);
  ------------------
  |  |  790|   383k|    (isnan((x).number) \
  |  |  791|   383k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   383k|        : JANET_NUMBER)
  ------------------
  |  Branch (35455:24): [True: 381k, False: 1.41k]
  ------------------
35456|   383k|        if (tx != ty) return tx < ty ? -1 : 1;
  ------------------
  |  Branch (35456:13): [True: 15.1k, False: 367k]
  |  Branch (35456:30): [True: 12.1k, False: 2.97k]
  ------------------
35457|   367k|        switch (tx) {
35458|  4.85k|            case JANET_NIL:
  ------------------
  |  Branch (35458:13): [True: 4.85k, False: 363k]
  ------------------
35459|  4.85k|                break;
35460|    291|            case JANET_BOOLEAN: {
  ------------------
  |  Branch (35460:13): [True: 291, False: 367k]
  ------------------
35461|    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)
  ------------------
35462|    291|                if (diff) return diff;
  ------------------
  |  Branch (35462:21): [True: 225, False: 66]
  ------------------
35463|     66|                break;
35464|    291|            }
35465|  1.02k|            case JANET_NUMBER: {
  ------------------
  |  Branch (35465:13): [True: 1.02k, False: 366k]
  ------------------
35466|  1.02k|                double xx = janet_unwrap_number(x);
  ------------------
  |  |  834|  1.02k|#define janet_unwrap_number(x) ((x).number)
  ------------------
35467|  1.02k|                double yy = janet_unwrap_number(y);
  ------------------
  |  |  834|  1.02k|#define janet_unwrap_number(x) ((x).number)
  ------------------
35468|  1.02k|                if (xx == yy) {
  ------------------
  |  Branch (35468:21): [True: 819, False: 205]
  ------------------
35469|    819|                    break;
35470|    819|                } else {
35471|    205|                    return (xx < yy) ? -1 : 1;
  ------------------
  |  Branch (35471:28): [True: 85, False: 120]
  ------------------
35472|    205|                }
35473|  1.02k|            }
35474|  2.15k|            case JANET_STRING:
  ------------------
  |  Branch (35474:13): [True: 2.15k, False: 365k]
  ------------------
35475|   298k|            case JANET_SYMBOL:
  ------------------
  |  Branch (35475:13): [True: 296k, False: 71.8k]
  ------------------
35476|   307k|            case JANET_KEYWORD: {
  ------------------
  |  Branch (35476:13): [True: 8.91k, False: 358k]
  ------------------
35477|   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))
  ------------------
35478|   307k|                if (diff) return diff;
  ------------------
  |  Branch (35478:21): [True: 223k, False: 83.2k]
  ------------------
35479|  83.2k|                break;
35480|   307k|            }
35481|  83.2k|            case JANET_ABSTRACT: {
  ------------------
  |  Branch (35481:13): [True: 206, False: 367k]
  ------------------
35482|    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))
  ------------------
35483|    206|                if (diff) return diff;
  ------------------
  |  Branch (35483:21): [True: 128, False: 78]
  ------------------
35484|     78|                break;
35485|    206|            }
35486|  10.6k|            default: {
  ------------------
  |  Branch (35486:13): [True: 10.6k, False: 357k]
  ------------------
35487|  10.6k|                if (janet_unwrap_pointer(x) == janet_unwrap_pointer(y)) {
  ------------------
  |  |  862|  10.6k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                              if (janet_unwrap_pointer(x) == janet_unwrap_pointer(y)) {
  ------------------
  |  |  862|  10.6k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35487:21): [True: 2.22k, False: 8.43k]
  ------------------
35488|  2.22k|                    break;
35489|  8.43k|                } else {
35490|  8.43k|                    return janet_unwrap_pointer(x) > janet_unwrap_pointer(y) ? 1 : -1;
  ------------------
  |  |  862|  8.43k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                                  return janet_unwrap_pointer(x) > janet_unwrap_pointer(y) ? 1 : -1;
  ------------------
  |  |  862|  8.43k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35490:28): [True: 350, False: 8.08k]
  ------------------
35491|  8.43k|                }
35492|  10.6k|            }
35493|  43.1k|            case JANET_TUPLE: {
  ------------------
  |  Branch (35493:13): [True: 43.1k, False: 324k]
  ------------------
35494|  43.1k|                const Janet *lhs = janet_unwrap_tuple(x);
  ------------------
  |  |  853|  43.1k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35495|  43.1k|                const Janet *rhs = janet_unwrap_tuple(y);
  ------------------
  |  |  853|  43.1k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35496|  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 (35496:21): [True: 42, False: 43.1k]
  ------------------
35497|     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 (35497:28): [True: 5, False: 37]
  ------------------
35498|     42|                }
35499|  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)))
  ------------------
35500|  43.1k|                break;
35501|  43.1k|            }
35502|    583|            case JANET_STRUCT: {
  ------------------
  |  Branch (35502:13): [True: 583, False: 367k]
  ------------------
35503|    583|                const JanetKV *lhs = janet_unwrap_struct(x);
  ------------------
  |  |  852|    583|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35504|    583|                const JanetKV *rhs = janet_unwrap_struct(y);
  ------------------
  |  |  852|    583|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35505|    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)))
  |  |  ------------------
  ------------------
35506|    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)))
  |  |  ------------------
  ------------------
35507|    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)))
  |  |  ------------------
  ------------------
35508|    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)))
  |  |  ------------------
  ------------------
35509|    583|                if (llen < rlen) return -1;
  ------------------
  |  Branch (35509:21): [True: 16, False: 567]
  ------------------
35510|    567|                if (llen > rlen) return 1;
  ------------------
  |  Branch (35510:21): [True: 20, False: 547]
  ------------------
35511|    547|                if (lhash < rhash) return -1;
  ------------------
  |  Branch (35511:21): [True: 59, False: 488]
  ------------------
35512|    488|                if (lhash > rhash) return 1;
  ------------------
  |  Branch (35512:21): [True: 55, False: 433]
  ------------------
35513|    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)))
  ------------------
35514|    433|                break;
35515|    488|            }
35516|   367k|        }
35517|   367k|    } while (!(status = traversal_next(&x, &y)));
  ------------------
  |  Branch (35517:14): [True: 89.1k, False: 45.7k]
  ------------------
35518|  45.7k|    return status - 2;
35519|   293k|}
janet_in:
35532|   110M|Janet janet_in(Janet ds, Janet key) {
35533|   110M|    Janet value;
35534|   110M|    JanetType type = janet_type(ds);
  ------------------
  |  |  790|   110M|    (isnan((x).number) \
  |  |  791|   110M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   110M|        : JANET_NUMBER)
  ------------------
  |  Branch (35534:22): [True: 110M, False: 0]
  ------------------
35535|   110M|    switch (type) {
35536|      2|        default:
  ------------------
  |  Branch (35536:9): [True: 2, False: 110M]
  ------------------
35537|      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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35538|      0|            break;
35539|  12.0M|        case JANET_STRUCT:
  ------------------
  |  Branch (35539:9): [True: 12.0M, False: 98.8M]
  ------------------
35540|  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))
  ------------------
35541|  12.0M|            break;
35542|   930k|        case JANET_TABLE:
  ------------------
  |  Branch (35542:9): [True: 930k, False: 109M]
  ------------------
35543|   930k|            value = janet_table_get(janet_unwrap_table(ds), key);
  ------------------
  |  |  856|   930k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
35544|   930k|            break;
35545|   935k|        case JANET_ARRAY: {
  ------------------
  |  Branch (35545:9): [True: 935k, False: 109M]
  ------------------
35546|   935k|            JanetArray *array = janet_unwrap_array(ds);
  ------------------
  |  |  855|   935k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35547|   935k|            int32_t index = getter_checkint(type, key, array->count);
35548|   935k|            value = array->data[index];
35549|   935k|            break;
35550|      0|        }
35551|  96.3M|        case JANET_TUPLE: {
  ------------------
  |  Branch (35551:9): [True: 96.3M, False: 14.5M]
  ------------------
35552|  96.3M|            const Janet *tuple = janet_unwrap_tuple(ds);
  ------------------
  |  |  853|  96.3M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35553|  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)))
  |  |  ------------------
  ------------------
35554|  96.3M|            value = tuple[getter_checkint(type, key, len)];
35555|  96.3M|            break;
35556|      0|        }
35557|  18.7k|        case JANET_BUFFER: {
  ------------------
  |  Branch (35557:9): [True: 18.7k, False: 110M]
  ------------------
35558|  18.7k|            JanetBuffer *buffer = janet_unwrap_buffer(ds);
  ------------------
  |  |  857|  18.7k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
35559|  18.7k|            int32_t index = getter_checkint(type, key, buffer->count);
35560|  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)
  |  |  ------------------
  ------------------
35561|  18.7k|            break;
35562|      0|        }
35563|  59.7k|        case JANET_STRING:
  ------------------
  |  Branch (35563:9): [True: 59.7k, False: 110M]
  ------------------
35564|   201k|        case JANET_SYMBOL:
  ------------------
  |  Branch (35564:9): [True: 142k, False: 110M]
  ------------------
35565|   202k|        case JANET_KEYWORD: {
  ------------------
  |  Branch (35565:9): [True: 1.09k, False: 110M]
  ------------------
35566|   202k|            const uint8_t *str = janet_unwrap_string(ds);
  ------------------
  |  |  858|   202k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
35567|   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)))
  |  |  ------------------
  ------------------
35568|   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)
  |  |  ------------------
  ------------------
35569|   202k|            break;
35570|   201k|        }
35571|   409k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35571:9): [True: 409k, False: 110M]
  ------------------
35572|   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)))
  |  |  ------------------
  ------------------
35573|   409k|            if (type->get) {
  ------------------
  |  Branch (35573:17): [True: 409k, False: 0]
  ------------------
35574|   409k|                if (!(type->get)(janet_unwrap_abstract(ds), key, &value))
  ------------------
  |  |  861|   409k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35574:21): [True: 13, False: 409k]
  ------------------
35575|     13|                    janet_panicf("key %v not found in %v ", key, ds);
35576|   409k|            } else {
35577|      0|                janet_panicf("no getter for %v", ds);
35578|      0|            }
35579|   409k|            break;
35580|   409k|        }
35581|   409k|        case JANET_FIBER: {
  ------------------
  |  Branch (35581:9): [True: 1, False: 110M]
  ------------------
35582|       |            /* Bit of a hack to allow iterating over fibers. */
35583|      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 (35583:17): [True: 0, False: 1]
  ------------------
35584|      0|                return janet_unwrap_fiber(ds)->last_value;
  ------------------
  |  |  854|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
35585|      1|            } else {
35586|      1|                janet_panicf("expected key 0, got %v", key);
35587|      1|            }
35588|      1|        }
35589|   110M|    }
35590|   110M|    return value;
35591|   110M|}
janet_get:
35593|  13.8M|Janet janet_get(Janet ds, Janet key) {
35594|  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 (35594:19): [True: 13.8M, False: 431]
  ------------------
35595|  13.8M|    switch (t) {
35596|    535|        default:
  ------------------
  |  Branch (35596:9): [True: 535, False: 13.8M]
  ------------------
35597|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35598|   111k|        case JANET_STRING:
  ------------------
  |  Branch (35598:9): [True: 111k, False: 13.7M]
  ------------------
35599|   111k|        case JANET_SYMBOL:
  ------------------
  |  Branch (35599:9): [True: 57, False: 13.8M]
  ------------------
35600|   111k|        case JANET_KEYWORD: {
  ------------------
  |  Branch (35600:9): [True: 1, False: 13.8M]
  ------------------
35601|   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 (35601:17): [True: 135, False: 111k]
  ------------------
35602|   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)
  |  |  ------------------
  ------------------
35603|   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 (35603:17): [True: 9, False: 111k]
  ------------------
35604|   111k|            const uint8_t *str = janet_unwrap_string(ds);
  ------------------
  |  |  858|   111k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
35605|   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 (35605:17): [True: 266, False: 110k]
  ------------------
35606|   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)
  |  |  ------------------
  ------------------
35607|   111k|        }
35608|   317k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35608:9): [True: 317k, False: 13.5M]
  ------------------
35609|   317k|            Janet value;
35610|   317k|            void *abst = janet_unwrap_abstract(ds);
  ------------------
  |  |  861|   317k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
35611|   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)))
  |  |  ------------------
  ------------------
35612|   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 (35612:17): [True: 0, False: 317k]
  ------------------
35613|   317k|            if ((type->get)(abst, key, &value))
  ------------------
  |  Branch (35613:17): [True: 317k, False: 9]
  ------------------
35614|   317k|                return value;
35615|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35616|   317k|        }
35617|  29.7k|        case JANET_ARRAY:
  ------------------
  |  Branch (35617:9): [True: 29.7k, False: 13.8M]
  ------------------
35618|  2.16M|        case JANET_TUPLE:
  ------------------
  |  Branch (35618:9): [True: 2.13M, False: 11.7M]
  ------------------
35619|  2.37M|        case JANET_BUFFER: {
  ------------------
  |  Branch (35619:9): [True: 215k, False: 13.6M]
  ------------------
35620|  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 (35620:17): [True: 42, False: 2.37M]
  ------------------
35621|  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)
  |  |  ------------------
  ------------------
35622|  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 (35622:17): [True: 0, False: 2.37M]
  ------------------
35623|  2.37M|            if (t == JANET_ARRAY) {
  ------------------
  |  Branch (35623:17): [True: 29.7k, False: 2.34M]
  ------------------
35624|  29.7k|                JanetArray *a = janet_unwrap_array(ds);
  ------------------
  |  |  855|  29.7k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35625|  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 (35625:21): [True: 0, False: 29.7k]
  ------------------
35626|  29.7k|                return a->data[index];
35627|  2.34M|            } else if (t == JANET_BUFFER) {
  ------------------
  |  Branch (35627:24): [True: 215k, False: 2.13M]
  ------------------
35628|   215k|                JanetBuffer *b = janet_unwrap_buffer(ds);
  ------------------
  |  |  857|   215k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
35629|   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 (35629:21): [True: 204k, False: 11.2k]
  ------------------
35630|  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)
  |  |  ------------------
  ------------------
35631|  2.13M|            } else {
35632|  2.13M|                const Janet *t = janet_unwrap_tuple(ds);
  ------------------
  |  |  853|  2.13M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35633|  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 (35633:21): [True: 1.70k, False: 2.13M]
  ------------------
35634|  2.13M|                return t[index];
35635|  2.13M|            }
35636|  2.37M|        }
35637|  1.05M|        case JANET_TABLE: {
  ------------------
  |  Branch (35637:9): [True: 1.05M, False: 12.8M]
  ------------------
35638|  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))
  ------------------
35639|  2.37M|        }
35640|  10.0M|        case JANET_STRUCT: {
  ------------------
  |  Branch (35640:9): [True: 10.0M, False: 3.86M]
  ------------------
35641|  10.0M|            const JanetKV *st = janet_unwrap_struct(ds);
  ------------------
  |  |  852|  10.0M|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35642|  10.0M|            return janet_struct_get(st, key);
35643|  2.37M|        }
35644|     17|        case JANET_FIBER: {
  ------------------
  |  Branch (35644:9): [True: 17, False: 13.8M]
  ------------------
35645|       |            /* Bit of a hack to allow iterating over fibers. */
35646|     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 (35646:17): [True: 0, False: 17]
  ------------------
35647|      0|                return janet_unwrap_fiber(ds)->last_value;
  ------------------
  |  |  854|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
35648|     17|            } else {
35649|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35650|     17|            }
35651|     17|        }
35652|  13.8M|    }
35653|  13.8M|}
janet_getindex:
35655|   373k|Janet janet_getindex(Janet ds, int32_t index) {
35656|   373k|    Janet value;
35657|   373k|    if (index < 0) janet_panic("expected non-negative index");
  ------------------
  |  Branch (35657:9): [True: 0, False: 373k]
  ------------------
35658|   373k|    switch (janet_type(ds)) {
  ------------------
  |  |  790|   373k|    (isnan((x).number) \
  |  |  791|   373k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   373k|        : JANET_NUMBER)
  ------------------
  |  Branch (35658:13): [True: 373k, False: 331]
  ------------------
35659|    354|        default:
  ------------------
  |  Branch (35659:9): [True: 354, False: 373k]
  ------------------
35660|    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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35661|      0|            break;
35662|  5.86k|        case JANET_STRING:
  ------------------
  |  Branch (35662:9): [True: 5.86k, False: 367k]
  ------------------
35663|  7.03k|        case JANET_SYMBOL:
  ------------------
  |  Branch (35663:9): [True: 1.16k, False: 372k]
  ------------------
35664|  7.19k|        case JANET_KEYWORD:
  ------------------
  |  Branch (35664:9): [True: 158, False: 373k]
  ------------------
35665|  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 (35665:17): [True: 6.22k, False: 969]
  ------------------
35666|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35667|  6.22k|            } else {
35668|    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)
  |  |  ------------------
  ------------------
35669|    969|            }
35670|  7.19k|            break;
35671|    112|        case JANET_ARRAY:
  ------------------
  |  Branch (35671:9): [True: 112, False: 373k]
  ------------------
35672|    112|            if (index >= janet_unwrap_array(ds)->count) {
  ------------------
  |  |  855|    112|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35672:17): [True: 86, False: 26]
  ------------------
35673|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35674|     86|            } else {
35675|     26|                value = janet_unwrap_array(ds)->data[index];
  ------------------
  |  |  855|     26|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35676|     26|            }
35677|    112|            break;
35678|    218|        case JANET_BUFFER:
  ------------------
  |  Branch (35678:9): [True: 218, False: 373k]
  ------------------
35679|    218|            if (index >= janet_unwrap_buffer(ds)->count) {
  ------------------
  |  |  857|    218|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35679:17): [True: 137, False: 81]
  ------------------
35680|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35681|    137|            } else {
35682|     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)
  |  |  ------------------
  ------------------
35683|     81|            }
35684|    218|            break;
35685|   365k|        case JANET_TUPLE:
  ------------------
  |  Branch (35685:9): [True: 365k, False: 7.90k]
  ------------------
35686|   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 (35686:17): [True: 70, False: 365k]
  ------------------
35687|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35688|   365k|            } else {
35689|   365k|                value = janet_unwrap_tuple(ds)[index];
  ------------------
  |  |  853|   365k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35690|   365k|            }
35691|   365k|            break;
35692|      2|        case JANET_TABLE:
  ------------------
  |  Branch (35692:9): [True: 2, False: 373k]
  ------------------
35693|      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)
  |  |  ------------------
  ------------------
35694|      2|            break;
35695|     15|        case JANET_STRUCT:
  ------------------
  |  Branch (35695:9): [True: 15, False: 373k]
  ------------------
35696|     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)
  |  |  ------------------
  ------------------
35697|     15|            break;
35698|     12|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35698:9): [True: 12, False: 373k]
  ------------------
35699|     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)))
  |  |  ------------------
  ------------------
35700|     12|            if (type->get) {
  ------------------
  |  Branch (35700:17): [True: 12, False: 0]
  ------------------
35701|     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 (35701:21): [True: 12, False: 0]
  ------------------
35702|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35703|     12|            } else {
35704|      0|                janet_panicf("no getter for %v", ds);
35705|      0|            }
35706|     12|            break;
35707|     12|        }
35708|     12|        case JANET_FIBER: {
  ------------------
  |  Branch (35708:9): [True: 0, False: 373k]
  ------------------
35709|      0|            if (index == 0) {
  ------------------
  |  Branch (35709:17): [True: 0, False: 0]
  ------------------
35710|      0|                value = janet_unwrap_fiber(ds)->last_value;
  ------------------
  |  |  854|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
35711|      0|            } else {
35712|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35713|      0|            }
35714|      0|            break;
35715|     12|        }
35716|   373k|    }
35717|   373k|    return value;
35718|   373k|}
janet_length:
35720|  17.4M|int32_t janet_length(Janet x) {
35721|  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 (35721:13): [True: 17.4M, False: 0]
  ------------------
35722|      0|        default:
  ------------------
  |  Branch (35722:9): [True: 0, False: 17.4M]
  ------------------
35723|      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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35724|    159|        case JANET_STRING:
  ------------------
  |  Branch (35724:9): [True: 159, False: 17.4M]
  ------------------
35725|  12.1k|        case JANET_SYMBOL:
  ------------------
  |  Branch (35725:9): [True: 11.9k, False: 17.3M]
  ------------------
35726|  14.5k|        case JANET_KEYWORD:
  ------------------
  |  Branch (35726:9): [True: 2.46k, False: 17.3M]
  ------------------
35727|  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)))
  |  |  ------------------
  ------------------
35728|  2.30M|        case JANET_ARRAY:
  ------------------
  |  Branch (35728:9): [True: 2.30M, False: 15.0M]
  ------------------
35729|  2.30M|            return janet_unwrap_array(x)->count;
  ------------------
  |  |  855|  2.30M|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35730|      1|        case JANET_BUFFER:
  ------------------
  |  Branch (35730:9): [True: 1, False: 17.4M]
  ------------------
35731|      1|            return janet_unwrap_buffer(x)->count;
  ------------------
  |  |  857|      1|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
35732|  15.0M|        case JANET_TUPLE:
  ------------------
  |  Branch (35732:9): [True: 15.0M, False: 2.32M]
  ------------------
35733|  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)))
  |  |  ------------------
  ------------------
35734|      0|        case JANET_STRUCT:
  ------------------
  |  Branch (35734:9): [True: 0, False: 17.4M]
  ------------------
35735|      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)))
  |  |  ------------------
  ------------------
35736|      0|        case JANET_TABLE:
  ------------------
  |  Branch (35736:9): [True: 0, False: 17.4M]
  ------------------
35737|      0|            return janet_unwrap_table(x)->count;
  ------------------
  |  |  856|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
35738|      0|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35738:9): [True: 0, False: 17.4M]
  ------------------
35739|      0|            void *abst = janet_unwrap_abstract(x);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
35740|      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)))
  |  |  ------------------
  ------------------
35741|      0|            if (type->length != NULL) {
  ------------------
  |  Branch (35741:17): [True: 0, False: 0]
  ------------------
35742|      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)))
  |  |  ------------------
  ------------------
35743|      0|                if (len > INT32_MAX) {
  ------------------
  |  Branch (35743:21): [True: 0, False: 0]
  ------------------
35744|      0|                    janet_panicf("invalid integer length %u", len);
35745|      0|                }
35746|      0|                return (int32_t)(len);
35747|      0|            }
35748|      0|            Janet argv[1] = { x };
35749|      0|            Janet len = janet_mcall("length", 1, argv);
35750|      0|            if (!janet_checkint(len))
  ------------------
  |  Branch (35750:17): [True: 0, False: 0]
  ------------------
35751|      0|                janet_panicf("invalid integer length %v", len);
35752|      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)
  |  |  ------------------
  ------------------
35753|      0|        }
35754|  17.4M|    }
35755|  17.4M|}
janet_lengthv:
35757|  44.7M|Janet janet_lengthv(Janet x) {
35758|  44.7M|    switch (janet_type(x)) {
  ------------------
  |  |  790|  44.7M|    (isnan((x).number) \
  |  |  791|  44.7M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  44.7M|        : JANET_NUMBER)
  ------------------
  |  Branch (35758:13): [True: 44.7M, False: 0]
  ------------------
35759|      0|        default:
  ------------------
  |  Branch (35759:9): [True: 0, False: 44.7M]
  ------------------
35760|      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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35761|  12.5k|        case JANET_STRING:
  ------------------
  |  Branch (35761:9): [True: 12.5k, False: 44.7M]
  ------------------
35762|  12.8k|        case JANET_SYMBOL:
  ------------------
  |  Branch (35762:9): [True: 278, False: 44.7M]
  ------------------
35763|  13.1k|        case JANET_KEYWORD:
  ------------------
  |  Branch (35763:9): [True: 281, False: 44.7M]
  ------------------
35764|  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)
  |  |  ------------------
  ------------------
35765|   220k|        case JANET_ARRAY:
  ------------------
  |  Branch (35765:9): [True: 220k, False: 44.5M]
  ------------------
35766|   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)
  |  |  ------------------
  ------------------
35767|   154k|        case JANET_BUFFER:
  ------------------
  |  Branch (35767:9): [True: 154k, False: 44.6M]
  ------------------
35768|   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)
  |  |  ------------------
  ------------------
35769|  44.2M|        case JANET_TUPLE:
  ------------------
  |  Branch (35769:9): [True: 44.2M, False: 511k]
  ------------------
35770|  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)
  |  |  ------------------
  ------------------
35771|  36.0k|        case JANET_STRUCT:
  ------------------
  |  Branch (35771:9): [True: 36.0k, False: 44.7M]
  ------------------
35772|  36.0k|            return janet_wrap_integer(janet_struct_length(janet_unwrap_struct(x)));
  ------------------
  |  |  958|  36.0k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|  36.0k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35773|  87.5k|        case JANET_TABLE:
  ------------------
  |  Branch (35773:9): [True: 87.5k, False: 44.7M]
  ------------------
35774|  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)
  |  |  ------------------
  ------------------
35775|      1|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35775:9): [True: 1, False: 44.7M]
  ------------------
35776|      1|            void *abst = janet_unwrap_abstract(x);
  ------------------
  |  |  861|      1|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
35777|      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)))
  |  |  ------------------
  ------------------
35778|      1|            if (type->length != NULL) {
  ------------------
  |  Branch (35778:17): [True: 0, False: 1]
  ------------------
35779|      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)))
  |  |  ------------------
  ------------------
35780|       |                /* If len is always less then double, we can never overflow */
35781|       |#ifdef JANET_32
35782|       |                return janet_wrap_number(len);
35783|       |#else
35784|      0|                if (len < (size_t) JANET_INTMAX_INT64) {
  ------------------
  |  |  162|      0|#define JANET_INTMAX_INT64 9007199254740992
  ------------------
  |  Branch (35784:21): [True: 0, False: 0]
  ------------------
35785|      0|                    return janet_wrap_number((double) len);
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
35786|      0|                } else {
35787|      0|                    janet_panicf("integer length %u too large", len);
35788|      0|                }
35789|      0|#endif
35790|      0|            }
35791|      1|            Janet argv[1] = { x };
35792|      1|            return janet_mcall("length", 1, argv);
35793|      1|        }
35794|  44.7M|    }
35795|  44.7M|}
janet_putindex:
35797|     17|void janet_putindex(Janet ds, int32_t index, Janet value) {
35798|     17|    switch (janet_type(ds)) {
  ------------------
  |  |  790|     17|    (isnan((x).number) \
  |  |  791|     17|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|     17|        : JANET_NUMBER)
  ------------------
  |  Branch (35798:13): [True: 17, False: 0]
  ------------------
35799|      0|        default:
  ------------------
  |  Branch (35799:9): [True: 0, False: 17]
  ------------------
35800|      0|            janet_panicf("expected %T, got %v",
35801|      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)
  ------------------
35802|     17|        case JANET_ARRAY: {
  ------------------
  |  Branch (35802:9): [True: 17, False: 0]
  ------------------
35803|     17|            JanetArray *array = janet_unwrap_array(ds);
  ------------------
  |  |  855|     17|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35804|     17|            if (index >= array->count) {
  ------------------
  |  Branch (35804:17): [True: 0, False: 17]
  ------------------
35805|      0|                janet_array_ensure(array, index + 1, 2);
35806|      0|                for (int32_t i = array->count; i < index + 1; i++) {
  ------------------
  |  Branch (35806:48): [True: 0, False: 0]
  ------------------
35807|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35808|      0|                }
35809|      0|                array->count = index + 1;
35810|      0|            }
35811|     17|            array->data[index] = value;
35812|     17|            break;
35813|      0|        }
35814|      0|        case JANET_BUFFER: {
  ------------------
  |  Branch (35814:9): [True: 0, False: 17]
  ------------------
35815|      0|            JanetBuffer *buffer = janet_unwrap_buffer(ds);
  ------------------
  |  |  857|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
35816|      0|            if (!janet_checkint(value))
  ------------------
  |  Branch (35816:17): [True: 0, False: 0]
  ------------------
35817|      0|                janet_panicf("can only put integers in buffers, got %v", value);
35818|      0|            if (index >= buffer->count) {
  ------------------
  |  Branch (35818:17): [True: 0, False: 0]
  ------------------
35819|      0|                janet_buffer_ensure(buffer, index + 1, 2);
35820|      0|                memset(buffer->data + buffer->count, 0, index + 1 - buffer->count);
35821|      0|                buffer->count = index + 1;
35822|      0|            }
35823|      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)
  |  |  ------------------
  ------------------
35824|      0|            break;
35825|      0|        }
35826|      0|        case JANET_TABLE: {
  ------------------
  |  Branch (35826:9): [True: 0, False: 17]
  ------------------
35827|      0|            JanetTable *table = janet_unwrap_table(ds);
  ------------------
  |  |  856|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
35828|      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)
  |  |  ------------------
  ------------------
35829|      0|            break;
35830|      0|        }
35831|      0|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35831:9): [True: 0, False: 17]
  ------------------
35832|      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)))
  |  |  ------------------
  ------------------
35833|      0|            if (type->put) {
  ------------------
  |  Branch (35833:17): [True: 0, False: 0]
  ------------------
35834|      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)
  |  |  ------------------
  ------------------
35835|      0|            } else {
35836|      0|                janet_panicf("no setter for %v ", ds);
35837|      0|            }
35838|      0|            break;
35839|      0|        }
35840|     17|    }
35841|     17|}
janet_put:
35843|   647k|void janet_put(Janet ds, Janet key, Janet value) {
35844|   647k|    JanetType type = janet_type(ds);
  ------------------
  |  |  790|   647k|    (isnan((x).number) \
  |  |  791|   647k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   647k|        : JANET_NUMBER)
  ------------------
  |  Branch (35844:22): [True: 647k, False: 0]
  ------------------
35845|   647k|    switch (type) {
35846|      0|        default:
  ------------------
  |  Branch (35846:9): [True: 0, False: 647k]
  ------------------
35847|      0|            janet_panicf("expected %T, got %v",
35848|      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)
  ------------------
35849|   346k|        case JANET_ARRAY: {
  ------------------
  |  Branch (35849:9): [True: 346k, False: 300k]
  ------------------
35850|   346k|            JanetArray *array = janet_unwrap_array(ds);
  ------------------
  |  |  855|   346k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35851|   346k|            int32_t index = getter_checkint(type, key, INT32_MAX - 1);
35852|   346k|            if (index >= array->count) {
  ------------------
  |  Branch (35852:17): [True: 0, False: 346k]
  ------------------
35853|      0|                janet_array_ensure(array, index + 1, 2);
35854|      0|                for (int32_t i = array->count; i < index + 1; i++) {
  ------------------
  |  Branch (35854:48): [True: 0, False: 0]
  ------------------
35855|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35856|      0|                }
35857|      0|                array->count = index + 1;
35858|      0|            }
35859|   346k|            array->data[index] = value;
35860|   346k|            break;
35861|      0|        }
35862|  6.55k|        case JANET_BUFFER: {
  ------------------
  |  Branch (35862:9): [True: 6.55k, False: 640k]
  ------------------
35863|  6.55k|            JanetBuffer *buffer = janet_unwrap_buffer(ds);
  ------------------
  |  |  857|  6.55k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
35864|  6.55k|            int32_t index = getter_checkint(type, key, INT32_MAX - 1);
35865|  6.55k|            if (!janet_checkint(value))
  ------------------
  |  Branch (35865:17): [True: 0, False: 6.55k]
  ------------------
35866|      0|                janet_panicf("can only put integers in buffers, got %v", value);
35867|  6.55k|            if (index >= buffer->count) {
  ------------------
  |  Branch (35867:17): [True: 0, False: 6.55k]
  ------------------
35868|      0|                janet_buffer_ensure(buffer, index + 1, 2);
35869|      0|                memset(buffer->data + buffer->count, 0, index + 1 - buffer->count);
35870|      0|                buffer->count = index + 1;
35871|      0|            }
35872|  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)
  |  |  ------------------
  ------------------
35873|  6.55k|            break;
35874|  6.55k|        }
35875|   294k|        case JANET_TABLE:
  ------------------
  |  Branch (35875:9): [True: 294k, False: 353k]
  ------------------
35876|   294k|            janet_table_put(janet_unwrap_table(ds), key, value);
  ------------------
  |  |  856|   294k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
35877|   294k|            break;
35878|      0|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35878:9): [True: 0, False: 647k]
  ------------------
35879|      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)))
  |  |  ------------------
  ------------------
35880|      0|            if (type->put) {
  ------------------
  |  Branch (35880:17): [True: 0, False: 0]
  ------------------
35881|      0|                (type->put)(janet_unwrap_abstract(ds), key, value);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
35882|      0|            } else {
35883|      0|                janet_panicf("no setter for %v ", ds);
35884|      0|            }
35885|      0|            break;
35886|      0|        }
35887|   647k|    }
35888|   647k|}
janet_v_grow:
35923|  5.51M|void *janet_v_grow(void *v, int32_t increment, int32_t itemsize) {
35924|  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 (35924:23): [True: 3.14M, False: 2.37M]
  ------------------
35925|  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]
  |  |  ------------------
  ------------------
35926|  5.51M|    int32_t m = dbl_cur > min_needed ? dbl_cur : min_needed;
  ------------------
  |  Branch (35926:17): [True: 1.50M, False: 4.01M]
  ------------------
35927|  5.51M|    size_t newsize = ((size_t) itemsize) * m + sizeof(int32_t) * 2;
35928|  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 (35928:45): [True: 3.14M, False: 2.37M]
  ------------------
35929|  5.51M|    if (!v) p[1] = 0;
  ------------------
  |  Branch (35929:9): [True: 2.37M, False: 3.14M]
  ------------------
35930|  5.51M|    p[0] = m;
35931|  5.51M|    return p + 2;
35932|  5.51M|}
janet_v_flattenmem:
35935|  2.10M|void *janet_v_flattenmem(void *v, int32_t itemsize) {
35936|  2.10M|    char *p;
35937|  2.10M|    if (NULL == v) return NULL;
  ------------------
  |  Branch (35937:9): [True: 1.40M, False: 704k]
  ------------------
35938|   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)
  |  |  ------------------
  ------------------
35939|   704k|    p = janet_malloc(size);
  ------------------
  |  | 2393|   704k|#define janet_malloc(X) malloc((X))
  ------------------
35940|   704k|    if (NULL != p) {
  ------------------
  |  Branch (35940:9): [True: 704k, False: 0]
  ------------------
35941|   704k|        safe_memcpy(p, v, size);
35942|   704k|        return p;
35943|   704k|    } else {
35944|       |        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]
  |  |  ------------------
  ------------------
35945|      0|    }
35946|   704k|}
janet_call:
37333|    103|Janet janet_call(JanetFunction *fun, int32_t argc, const Janet *argv) {
37334|       |    /* Check entry conditions */
37335|    103|    if (!janet_vm.fiber)
  ------------------
  |  Branch (37335:9): [True: 0, False: 103]
  ------------------
37336|      0|        janet_panic("janet_call failed because there is no current fiber");
37337|    103|    if (janet_vm.stackn >= JANET_RECURSION_GUARD)
  ------------------
  |  |  291|    103|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (37337:9): [True: 0, False: 103]
  ------------------
37338|      0|        janet_panic("C stack recursed too deeply");
37339|       |
37340|       |    /* Dirty stack */
37341|    103|    int32_t dirty_stack = janet_vm.fiber->stacktop - janet_vm.fiber->stackstart;
37342|    103|    if (dirty_stack) {
  ------------------
  |  Branch (37342:9): [True: 0, False: 103]
  ------------------
37343|      0|        janet_fiber_cframe(janet_vm.fiber, void_cfunction);
37344|      0|    }
37345|       |
37346|       |    /* Tracing */
37347|    103|    if (fun->gc.flags & JANET_FUNCFLAG_TRACE) {
  ------------------
  |  | 1155|    103|#define JANET_FUNCFLAG_TRACE (1 << 16)
  ------------------
  |  Branch (37347:9): [True: 0, False: 103]
  ------------------
37348|      0|        janet_vm.stackn++;
37349|      0|        vm_do_trace(fun, argc, argv);
  ------------------
  |  |36192|      0|#define vm_do_trace(func, argc, argv) do { \
  |  |36193|      0|    JanetFunction* _func = (func);\
  |  |36194|      0|    if (_func->def->name) {\
  |  |  ------------------
  |  |  |  Branch (36194:9): [True: 0, False: 0]
  |  |  ------------------
  |  |36195|      0|        janet_eprintf("trace (%S", _func->def->name);\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36196|      0|    } else {\
  |  |36197|      0|        janet_eprintf("trace (%p", janet_wrap_function(_func));\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36198|      0|    }\
  |  |36199|      0|    int32_t _argc = (argc);\
  |  |36200|      0|    for (int32_t i = 0; i < _argc; i++) {\
  |  |  ------------------
  |  |  |  Branch (36200:25): [True: 0, False: 0]
  |  |  ------------------
  |  |36201|      0|        janet_eprintf(" %p", (argv)[i]);\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36202|      0|    }\
  |  |36203|      0|    janet_eprintf(")\n");\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36204|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36204:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37350|      0|        janet_vm.stackn--;
37351|      0|    }
37352|       |
37353|       |    /* Push frame */
37354|    103|    janet_fiber_pushn(janet_vm.fiber, argv, argc);
37355|    103|    if (janet_fiber_funcframe(janet_vm.fiber, fun)) {
  ------------------
  |  Branch (37355:9): [True: 6, False: 97]
  ------------------
37356|      6|        int32_t min = fun->def->min_arity;
37357|      6|        int32_t max = fun->def->max_arity;
37358|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37359|      6|        if (min == max && min != argc)
  ------------------
  |  Branch (37359:13): [True: 6, False: 0]
  |  Branch (37359:27): [True: 6, False: 0]
  ------------------
37360|      6|            janet_panicf("arity mismatch in %v, expected %d, got %d", funv, min, argc);
37361|      0|        if (min >= 0 && argc < min)
  ------------------
  |  Branch (37361:13): [True: 0, False: 0]
  |  Branch (37361:25): [True: 0, False: 0]
  ------------------
37362|      0|            janet_panicf("arity mismatch in %v, expected at least %d, got %d", funv, min, argc);
37363|      0|        janet_panicf("arity mismatch in %v, expected at most %d, got %d", funv, max, argc);
37364|      0|    }
37365|     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
  ------------------
37366|       |
37367|       |    /* Set up */
37368|     97|    int32_t oldn = janet_vm.stackn++;
37369|     97|    int handle = janet_gclock();
37370|       |
37371|       |    /* Run vm */
37372|     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
  ------------------
37373|     97|    int old_coerce_error = janet_vm.coerce_error;
37374|     97|    janet_vm.coerce_error = 1;
37375|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37376|     97|    janet_vm.coerce_error = old_coerce_error;
37377|       |
37378|       |    /* Teardown */
37379|     97|    janet_vm.stackn = oldn;
37380|     97|    janet_gcunlock(handle);
37381|     97|    if (dirty_stack) {
  ------------------
  |  Branch (37381:9): [True: 0, False: 97]
  ------------------
37382|      0|        janet_fiber_popframe(janet_vm.fiber);
37383|      0|        janet_vm.fiber->stacktop += dirty_stack;
37384|      0|    }
37385|       |
37386|     97|    if (signal != JANET_SIGNAL_OK) {
  ------------------
  |  Branch (37386:9): [True: 0, False: 97]
  ------------------
37387|       |        /* Should match logic in janet_signalv */
37388|      0|#ifdef JANET_EV
37389|      0|        if (janet_vm.root_fiber != NULL && signal == JANET_SIGNAL_EVENT) {
  ------------------
  |  Branch (37389:13): [True: 0, False: 0]
  |  Branch (37389:44): [True: 0, False: 0]
  ------------------
37390|      0|            janet_vm.root_fiber->sched_id++;
37391|      0|        }
37392|      0|#endif
37393|      0|        if (signal != JANET_SIGNAL_ERROR) {
  ------------------
  |  Branch (37393:13): [True: 0, False: 0]
  ------------------
37394|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37395|      0|        }
37396|      0|        janet_panicv(*janet_vm.return_reg);
37397|      0|    }
37398|       |
37399|     97|    return *janet_vm.return_reg;
37400|     97|}
janet_try_init:
37436|   395k|void janet_try_init(JanetTryState *state) {
37437|   395k|    state->stackn = janet_vm.stackn++;
37438|   395k|    state->gc_handle = janet_vm.gc_suspend;
37439|   395k|    state->vm_fiber = janet_vm.fiber;
37440|   395k|    state->vm_jmp_buf = janet_vm.signal_buf;
37441|   395k|    state->vm_return_reg = janet_vm.return_reg;
37442|   395k|    state->coerce_error = janet_vm.coerce_error;
37443|   395k|    janet_vm.return_reg = &(state->payload);
37444|   395k|    janet_vm.signal_buf = &(state->buf);
37445|   395k|    janet_vm.coerce_error = 0;
37446|   395k|}
janet_restore:
37448|   395k|void janet_restore(JanetTryState *state) {
37449|   395k|    janet_vm.stackn = state->stackn;
37450|   395k|    janet_vm.gc_suspend = state->gc_handle;
37451|   395k|    janet_vm.fiber = state->vm_fiber;
37452|   395k|    janet_vm.signal_buf = state->vm_jmp_buf;
37453|   395k|    janet_vm.return_reg = state->vm_return_reg;
37454|   395k|    janet_vm.coerce_error = state->coerce_error;
37455|   395k|}
janet_continue:
37552|   387k|JanetSignal janet_continue(JanetFiber *fiber, Janet in, Janet *out) {
37553|       |    /* Check conditions */
37554|   387k|    JanetSignal tmp_signal = janet_check_can_resume(fiber, out, 0);
37555|   387k|    if (tmp_signal) return tmp_signal;
  ------------------
  |  Branch (37555:9): [True: 0, False: 387k]
  ------------------
37556|   387k|    return janet_continue_no_check(fiber, in, out);
37557|   387k|}
janet_continue_signal:
37560|    538|JanetSignal janet_continue_signal(JanetFiber *fiber, Janet in, Janet *out, JanetSignal sig) {
37561|    538|    JanetSignal tmp_signal = janet_check_can_resume(fiber, out, sig != JANET_SIGNAL_OK);
37562|    538|    if (tmp_signal) return tmp_signal;
  ------------------
  |  Branch (37562:9): [True: 0, False: 538]
  ------------------
37563|    538|    if (sig != JANET_SIGNAL_OK) {
  ------------------
  |  Branch (37563:9): [True: 0, False: 538]
  ------------------
37564|      0|        JanetFiber *child = fiber;
37565|      0|        while (child->child) child = child->child;
  ------------------
  |  Branch (37565:16): [True: 0, False: 0]
  ------------------
37566|      0|        child->gc.flags &= ~JANET_FIBER_STATUS_MASK;
  ------------------
  |  |  779|      0|#define JANET_FIBER_STATUS_MASK 0x3F0000
  ------------------
37567|      0|        child->gc.flags |= sig << JANET_FIBER_STATUS_OFFSET;
  ------------------
  |  |  781|      0|#define JANET_FIBER_STATUS_OFFSET 16
  ------------------
37568|      0|        child->flags |= JANET_FIBER_RESUME_SIGNAL;
  ------------------
  |  |  780|      0|#define JANET_FIBER_RESUME_SIGNAL 0x400000
  ------------------
37569|      0|    }
37570|    538|    return janet_continue_no_check(fiber, in, out);
37571|    538|}
janet_mcall:
37593|  3.40k|Janet janet_mcall(const char *name, int32_t argc, Janet *argv) {
37594|       |    /* At least 1 argument */
37595|  3.40k|    if (argc < 1) {
  ------------------
  |  Branch (37595:9): [True: 0, False: 3.40k]
  ------------------
37596|      0|        janet_panicf("method :%s expected at least 1 argument", name);
37597|      0|    }
37598|       |    /* Find method */
37599|  3.40k|    Janet method = janet_method_lookup(argv[0], name);
37600|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37601|     19|        janet_panicf("could not find method :%s for %v", name, argv[0]);
37602|     19|    }
37603|       |    /* Invoke method */
37604|  3.38k|    return janet_method_invoke(method, argc, argv);
37605|  3.40k|}
janet_init:
37608|  7.65k|int janet_init(void) {
37609|       |
37610|       |    /* Garbage collection */
37611|  7.65k|    janet_vm.blocks = NULL;
37612|  7.65k|    janet_vm.weak_blocks = NULL;
37613|  7.65k|    janet_vm.next_collection = 0;
37614|  7.65k|    janet_vm.gc_interval = 0x400000;
37615|  7.65k|    janet_vm.block_count = 0;
37616|  7.65k|    janet_vm.gc_mark_phase = 0;
37617|       |
37618|  7.65k|    janet_symcache_init();
37619|       |
37620|       |    /* Initialize gc roots */
37621|  7.65k|    janet_vm.roots = NULL;
37622|  7.65k|    janet_vm.root_count = 0;
37623|  7.65k|    janet_vm.root_capacity = 0;
37624|       |
37625|       |    /* Scratch memory */
37626|  7.65k|    janet_vm.user = NULL;
37627|  7.65k|    janet_vm.scratch_mem = NULL;
37628|  7.65k|    janet_vm.scratch_len = 0;
37629|  7.65k|    janet_vm.scratch_cap = 0;
37630|       |
37631|       |    /* Sandbox flags */
37632|  7.65k|    janet_vm.sandbox_flags = 0;
37633|       |
37634|       |    /* Initialize registry */
37635|  7.65k|    janet_vm.registry = NULL;
37636|  7.65k|    janet_vm.registry_cap = 0;
37637|  7.65k|    janet_vm.registry_count = 0;
37638|  7.65k|    janet_vm.registry_dirty = 0;
37639|       |
37640|       |    /* Initialize abstract registry */
37641|  7.65k|    janet_vm.abstract_registry = janet_table(0);
37642|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37643|       |
37644|       |    /* Traversal */
37645|  7.65k|    janet_vm.traversal = NULL;
37646|  7.65k|    janet_vm.traversal_base = NULL;
37647|  7.65k|    janet_vm.traversal_top = NULL;
37648|       |
37649|       |    /* Core env */
37650|  7.65k|    janet_vm.core_env = NULL;
37651|       |
37652|       |    /* Auto suspension */
37653|  7.65k|    janet_vm.auto_suspend = 0;
37654|       |
37655|       |    /* Dynamic bindings */
37656|  7.65k|    janet_vm.top_dyns = NULL;
37657|       |
37658|       |    /* Seed RNG */
37659|  7.65k|    janet_rng_seed(janet_default_rng(), 0);
37660|       |
37661|       |    /* Fibers */
37662|  7.65k|    janet_vm.fiber = NULL;
37663|  7.65k|    janet_vm.root_fiber = NULL;
37664|  7.65k|    janet_vm.stackn = 0;
37665|       |
37666|  7.65k|#ifdef JANET_EV
37667|  7.65k|    janet_ev_init();
37668|  7.65k|#endif
37669|  7.65k|#ifdef JANET_NET
37670|  7.65k|    janet_net_init();
37671|  7.65k|#endif
37672|  7.65k|    return 0;
37673|  7.65k|}
janet_sandbox_assert:
37681|  7.09k|void janet_sandbox_assert(uint32_t forbidden_flags) {
37682|  7.09k|    if (forbidden_flags & janet_vm.sandbox_flags) {
  ------------------
  |  Branch (37682:9): [True: 0, False: 7.09k]
  ------------------
37683|      0|        janet_panic("operation forbidden by sandbox");
37684|      0|    }
37685|  7.09k|}
janet_deinit:
37688|  7.65k|void janet_deinit(void) {
37689|  7.65k|    janet_clear_memory();
37690|  7.65k|    janet_symcache_deinit();
37691|  7.65k|    janet_free(janet_vm.roots);
  ------------------
  |  | 2402|  7.65k|#define janet_free(X) free((X))
  ------------------
37692|  7.65k|    janet_vm.roots = NULL;
37693|  7.65k|    janet_vm.root_count = 0;
37694|  7.65k|    janet_vm.root_capacity = 0;
37695|  7.65k|    janet_vm.abstract_registry = NULL;
37696|  7.65k|    janet_vm.core_env = NULL;
37697|  7.65k|    janet_vm.top_dyns = NULL;
37698|  7.65k|    janet_vm.user = NULL;
37699|  7.65k|    janet_free(janet_vm.traversal_base);
  ------------------
  |  | 2402|  7.65k|#define janet_free(X) free((X))
  ------------------
37700|  7.65k|    janet_vm.fiber = NULL;
37701|  7.65k|    janet_vm.root_fiber = NULL;
37702|  7.65k|    janet_free(janet_vm.registry);
  ------------------
  |  | 2402|  7.65k|#define janet_free(X) free((X))
  ------------------
37703|       |    janet_vm.registry = NULL;
37704|  7.65k|#ifdef JANET_EV
37705|  7.65k|    janet_ev_deinit();
37706|  7.65k|#endif
37707|  7.65k|#ifdef JANET_NET
37708|  7.65k|    janet_net_deinit();
37709|  7.65k|#endif
37710|  7.65k|}
janet_memalloc_empty:
37878|  10.3M|void *janet_memalloc_empty(int32_t count) {
37879|  10.3M|    int32_t i;
37880|  10.3M|    void *mem = janet_malloc((size_t) count * sizeof(JanetKV));
  ------------------
  |  | 2393|  10.3M|#define janet_malloc(X) malloc((X))
  ------------------
37881|  10.3M|    janet_vm.next_collection += (size_t) count * sizeof(JanetKV);
37882|  10.3M|    if (NULL == mem) {
  ------------------
  |  Branch (37882:9): [True: 0, False: 10.3M]
  ------------------
37883|      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]
  |  |  ------------------
  ------------------
37884|      0|    }
37885|  10.3M|    JanetKV *mmem = (JanetKV *)mem;
37886|   160M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (37886:17): [True: 150M, False: 10.3M]
  ------------------
37887|   150M|        JanetKV *kv = mmem + i;
37888|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37889|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37890|   150M|    }
37891|  10.3M|    return mem;
37892|  10.3M|}
janet_memempty:
37894|  10.6M|void janet_memempty(JanetKV *mem, int32_t count) {
37895|  10.6M|    int32_t i;
37896|   345M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (37896:17): [True: 334M, False: 10.6M]
  ------------------
37897|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37898|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37899|   334M|    }
37900|  10.6M|}
janet_wrap_number_safe:
37904|  52.5k|Janet janet_wrap_number_safe(double d) {
37905|  52.5k|    Janet ret;
37906|  52.5k|    ret.number = isnan(d) ? NAN : d;
  ------------------
  |  Branch (37906:18): [True: 7.50k, False: 45.0k]
  ------------------
37907|  52.5k|    return ret;
37908|  52.5k|}
janet_nanbox_to_pointer:
37910|  11.4G|void *janet_nanbox_to_pointer(Janet x) {
37911|  11.4G|    x.i64 &= JANET_NANBOX_PAYLOADBITS;
  ------------------
  |  |  786|  11.4G|#define JANET_NANBOX_PAYLOADBITS 0x00007FFFFFFFFFFFllu
  ------------------
37912|  11.4G|    x.u64 <<= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  336|  11.4G|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
37913|  11.4G|    return x.pointer;
37914|  11.4G|}
janet_nanbox_from_pointer:
37916|   168M|Janet janet_nanbox_from_pointer(void *p, uint64_t tagmask) {
37917|   168M|    Janet ret;
37918|   168M|    ret.pointer = p;
37919|       |    /* Should be noop when pointer shift is 0 */
37920|       |    /*
37921|       |    janet_assert(!(ret.u64 & (uint64_t) ((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)), "unaligned pointer wrap");
37922|       |    */
37923|   168M|    ret.u64 >>= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  336|   168M|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
37924|   168M|    ret.u64 |= tagmask;
37925|   168M|    return ret;
37926|   168M|}
janet_nanbox_from_cpointer:
37928|   271M|Janet janet_nanbox_from_cpointer(const void *p, uint64_t tagmask) {
37929|   271M|    Janet ret;
37930|   271M|    ret.pointer = (void *)p;
37931|       |    /* Should be noop when pointer shift is 0 */
37932|       |    /*
37933|       |    janet_assert(!(ret.u64 & (uint64_t) ((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)), "unaligned pointer wrap");
37934|       |    */
37935|   271M|    ret.u64 >>= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  336|   271M|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
37936|   271M|    ret.u64 |= tagmask;
37937|   271M|    return ret;
37938|   271M|}
janet_nanbox_from_double:
37940|   352M|Janet janet_nanbox_from_double(double d) {
37941|   352M|    Janet ret;
37942|   352M|    ret.number = d;
37943|   352M|    return ret;
37944|   352M|}
janet_nanbox_from_bits:
37946|  3.93G|Janet janet_nanbox_from_bits(uint64_t bits) {
37947|  3.93G|    Janet ret;
37948|  3.93G|    ret.u64 = bits;
37949|  3.93G|    return ret;
37950|  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|  4.91k|    for (;;) {
 9147|  4.91k|        size_t left = (index << 1) + 1;
 9148|  4.91k|        size_t right = left + 1;
 9149|  4.91k|        size_t smallest = index;
 9150|  4.91k|        if (left < janet_vm.tq_count &&
  ------------------
  |  Branch (9150:13): [True: 4.42k, False: 494]
  ------------------
 9151|  4.42k|                (janet_vm.tq[left].when < janet_vm.tq[smallest].when))
  ------------------
  |  Branch (9151:17): [True: 1.06k, False: 3.36k]
  ------------------
 9152|  1.06k|            smallest = left;
 9153|  4.91k|        if (right < janet_vm.tq_count &&
  ------------------
  |  Branch (9153:13): [True: 4.28k, False: 629]
  ------------------
 9154|  4.28k|                (janet_vm.tq[right].when < janet_vm.tq[smallest].when))
  ------------------
  |  Branch (9154:17): [True: 546, False: 3.74k]
  ------------------
 9155|    546|            smallest = right;
 9156|  4.91k|        if (smallest == index) return;
  ------------------
  |  Branch (9156:13): [True: 3.61k, False: 1.29k]
  ------------------
 9157|  1.29k|        JanetTimeout temp = janet_vm.tq[index];
 9158|  1.29k|        janet_vm.tq[index] = janet_vm.tq[smallest];
 9159|  1.29k|        janet_vm.tq[smallest] = temp;
 9160|  1.29k|        index = smallest;
 9161|  1.29k|    }
 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|    494|    while (tries > 0) {
  ------------------
  |  Branch (11249:12): [True: 494, False: 0]
  ------------------
11250|    494|        int status;
11251|    494|        do {
11252|    494|            status = write(fd, &response, sizeof(response));
11253|    494|        } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (11253:18): [True: 2, False: 492]
  |  Branch (11253:34): [True: 0, False: 2]
  ------------------
11254|    494|        if (status > 0) break;
  ------------------
  |  Branch (11254:13): [True: 492, False: 2]
  ------------------
11255|      2|        sleep(1);
11256|      2|        tries--;
11257|      2|    }
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.73k|static void janet_fiber_grow(JanetFiber *fiber, int32_t needed) {
14662|  7.73k|    int32_t cap = needed > (INT32_MAX / 2) ? INT32_MAX : 2 * needed;
  ------------------
  |  Branch (14662:19): [True: 0, False: 7.73k]
  ------------------
14663|  7.73k|    janet_fiber_setcapacity(fiber, cap);
14664|  7.73k|}
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|   148M|static void janet_env_detach(JanetFuncEnv *env) {
14785|       |    /* Check for closure environment */
14786|   148M|    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|   148M|}
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: 337k, False: 1.55M]
  ------------------
16322|   337k|        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: 108, False: 889k]
  ------------------
16382|    108|        table = table->proto;
16383|    108|        goto recur;
16384|    108|    }
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.7k, False: 9.85k]
  |  |  ------------------
  ------------------
16407|  42.7k|        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: 81, False: 9.77k]
  ------------------
16413|       |        /* On stack */
16414|     81|        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.31k, False: 876k]
  |  |  ------------------
  ------------------
16425|  6.31k|        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: 346, False: 1.41k]
  |  |  ------------------
  ------------------
16464|    346|        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.53k, False: 112]
  ------------------
16478|  1.53k|            janet_mark_function(frame->func);
16479|  1.64k|        if (NULL != frame->env)
  ------------------
  |  Branch (16479:13): [True: 81, False: 1.56k]
  ------------------
16480|     81|            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:
16821|  50.8k|static int janet_gc_idequals(Janet lhs, Janet rhs) {
16822|  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 (16822:9): [True: 50.8k, False: 0]
  |  Branch (16822:9): [True: 36.3k, False: 14.5k]
  |  Branch (16822:28): [True: 50.8k, False: 0]
  ------------------
16823|  36.3k|        return 0;
16824|  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 (16824:13): [True: 14.5k, False: 0]
  ------------------
16825|      0|        case JANET_BOOLEAN:
  ------------------
  |  Branch (16825:9): [True: 0, False: 14.5k]
  ------------------
16826|      0|        case JANET_NIL:
  ------------------
  |  Branch (16826:9): [True: 0, False: 14.5k]
  ------------------
16827|      0|        case JANET_NUMBER:
  ------------------
  |  Branch (16827:9): [True: 0, False: 14.5k]
  ------------------
16828|       |            /* These values don't really matter to the gc so returning 1 all the time is fine. */
16829|      0|            return 1;
16830|  14.5k|        default:
  ------------------
  |  Branch (16830:9): [True: 14.5k, False: 0]
  ------------------
16831|  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))
  ------------------
16832|  14.5k|    }
16833|  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:
17038|     16|static void int64_marshal(void *p, JanetMarshalContext *ctx) {
17039|     16|    janet_marshal_abstract(ctx, p);
17040|     16|    janet_marshal_int64(ctx, *((int64_t *)p));
17041|     16|}
janet.c:int64_unmarshal:
17043|     15|static void *int64_unmarshal(JanetMarshalContext *ctx) {
17044|     15|    int64_t *p = janet_unmarshal_abstract(ctx, sizeof(int64_t));
17045|     15|    p[0] = janet_unmarshal_int64(ctx);
17046|     15|    return p;
17047|     15|}
janet.c:it_s64_tostring:
17049|     92|static void it_s64_tostring(void *p, JanetBuffer *buffer) {
17050|     92|    char str[32];
17051|       |    snprintf(str, sizeof(str), "%" PRId64, *((int64_t *)p));
17052|     92|    janet_buffer_push_cstring(buffer, str);
17053|     92|}
janet.c:janet_int64_compare:
17026|    936|static int janet_int64_compare(void *p1, void *p2) {
17027|    936|    int64_t x = *((int64_t *)p1);
17028|    936|    int64_t y = *((int64_t *)p2);
17029|    936|    return x == y ? 0 : x < y ? -1 : 1;
  ------------------
  |  Branch (17029:12): [True: 372, False: 564]
  |  Branch (17029:25): [True: 215, False: 349]
  ------------------
17030|    936|}
janet.c:janet_int64_hash:
17020|  10.9k|static int32_t janet_int64_hash(void *p1, size_t size) {
17021|  10.9k|    (void) size;
17022|  10.9k|    int32_t *words = p1;
17023|  10.9k|    return words[0] ^ words[1];
17024|  10.9k|}
janet.c:it_u64_tostring:
17055|    137|static void it_u64_tostring(void *p, JanetBuffer *buffer) {
17056|    137|    char str[32];
17057|       |    snprintf(str, sizeof(str), "%" PRIu64, *((uint64_t *)p));
17058|    137|    janet_buffer_push_cstring(buffer, str);
17059|    137|}
janet.c:janet_uint64_compare:
17032|  1.62k|static int janet_uint64_compare(void *p1, void *p2) {
17033|  1.62k|    uint64_t x = *((uint64_t *)p1);
17034|  1.62k|    uint64_t y = *((uint64_t *)p2);
17035|  1.62k|    return x == y ? 0 : x < y ? -1 : 1;
  ------------------
  |  Branch (17035:12): [True: 711, False: 917]
  |  Branch (17035:25): [True: 251, False: 666]
  ------------------
17036|  1.62k|}
janet.c:cfun_it_s64_add:
17394|     88|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17395|     88|    janet_arity(argc, 2, -1); \
17396|     88|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17397|     88|    *box = janet_unwrap_##type(argv[0]); \
17398|    175|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17398:25): [True: 87, False: 88]
  ------------------
17399|     88|        /* This avoids undefined behavior. See above for why. */ \
17400|     88|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17401|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17402|     88|} \
janet.c:cfun_it_s64_sub:
17394|  9.05k|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17395|  9.05k|    janet_arity(argc, 2, -1); \
17396|  9.05k|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17397|  9.05k|    *box = janet_unwrap_##type(argv[0]); \
17398|  23.9k|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17398:25): [True: 14.8k, False: 9.05k]
  ------------------
17399|  9.05k|        /* This avoids undefined behavior. See above for why. */ \
17400|  14.8k|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17401|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17402|  9.05k|} \
janet.c:cfun_it_s64_subi:
17405|      1|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name##i(int32_t argc, Janet *argv) { \
17406|      1|    janet_fixarity(argc, 2); \
17407|      1|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17408|      1|    *box = janet_unwrap_##type(argv[1]); \
17409|      1|    /* This avoids undefined behavior. See above for why. */ \
17410|      1|    *box = (T) ((uint64_t) *box) oper ((uint64_t) janet_unwrap_##type(argv[0])); \
17411|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17412|      1|} \
janet.c:cfun_it_s64_mul:
17394|     27|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17395|     27|    janet_arity(argc, 2, -1); \
17396|     27|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17397|     27|    *box = janet_unwrap_##type(argv[0]); \
17398|     94|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17398:25): [True: 67, False: 27]
  ------------------
17399|     27|        /* This avoids undefined behavior. See above for why. */ \
17400|     67|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17401|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17402|     27|} \
janet.c:cfun_it_s64_mod:
17499|     94|static JANET_CFUNCTION_ALIGN Janet cfun_it_s64_mod(int32_t argc, Janet *argv) {
17500|     94|    janet_fixarity(argc, 2);
17501|     94|    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
17502|     94|    int64_t op1 = janet_unwrap_s64(argv[0]);
17503|     94|    int64_t op2 = janet_unwrap_s64(argv[1]);
17504|     94|    if (op2 == 0) {
  ------------------
  |  Branch (17504:9): [True: 31, False: 63]
  ------------------
17505|     31|        *box = op1;
17506|     63|    } else {
17507|     63|        int64_t x = op1 % op2;
17508|     63|        *box = (((op1 ^ op2) < 0) && (x != 0)) ? x + op2 : x;
  ------------------
  |  Branch (17508:17): [True: 11, False: 52]
  |  Branch (17508:38): [True: 8, False: 3]
  ------------------
17509|     63|    }
17510|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17511|     94|}
janet.c:cfun_it_s64_modi:
17513|      5|static JANET_CFUNCTION_ALIGN Janet cfun_it_s64_modi(int32_t argc, Janet *argv) {
17514|      5|    janet_fixarity(argc, 2);
17515|      5|    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
17516|      5|    int64_t op2 = janet_unwrap_s64(argv[0]);
17517|      5|    int64_t op1 = janet_unwrap_s64(argv[1]);
17518|      5|    if (op2 == 0) {
  ------------------
  |  Branch (17518:9): [True: 1, False: 4]
  ------------------
17519|      1|        *box = op1;
17520|      4|    } else {
17521|      4|        int64_t x = op1 % op2;
17522|      4|        *box = (((op1 ^ op2) < 0) && (x != 0)) ? x + op2 : x;
  ------------------
  |  Branch (17522:17): [True: 2, False: 2]
  |  Branch (17522:38): [True: 2, False: 0]
  ------------------
17523|      4|    }
17524|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17525|      5|}
janet.c:cfun_it_s64_and:
17394|     14|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17395|     14|    janet_arity(argc, 2, -1); \
17396|     14|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17397|     14|    *box = janet_unwrap_##type(argv[0]); \
17398|     31|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17398:25): [True: 17, False: 14]
  ------------------
17399|     14|        /* This avoids undefined behavior. See above for why. */ \
17400|     17|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17401|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17402|     14|} \
janet.c:cfun_it_s64_or:
17394|     15|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17395|     15|    janet_arity(argc, 2, -1); \
17396|     15|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17397|     15|    *box = janet_unwrap_##type(argv[0]); \
17398|     30|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17398:25): [True: 15, False: 15]
  ------------------
17399|     15|        /* This avoids undefined behavior. See above for why. */ \
17400|     15|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17401|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17402|     15|} \
janet.c:cfun_it_s64_xor:
17394|     16|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17395|     16|    janet_arity(argc, 2, -1); \
17396|     16|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17397|     16|    *box = janet_unwrap_##type(argv[0]); \
17398|     77|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17398:25): [True: 61, False: 16]
  ------------------
17399|     16|        /* This avoids undefined behavior. See above for why. */ \
17400|     61|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17401|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17402|     16|} \
janet.c:cfun_it_s64_rshift:
17394|      2|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17395|      2|    janet_arity(argc, 2, -1); \
17396|      2|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17397|      2|    *box = janet_unwrap_##type(argv[0]); \
17398|      4|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17398:25): [True: 2, False: 2]
  ------------------
17399|      2|        /* This avoids undefined behavior. See above for why. */ \
17400|      2|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17401|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17402|      2|} \
janet.c:cfun_it_s64_compare:
17311|      1|static JANET_CFUNCTION_ALIGN Janet cfun_it_s64_compare(int32_t argc, Janet *argv) {
17312|      1|    janet_fixarity(argc, 2);
17313|      1|    if (janet_is_int(argv[0]) != JANET_INT_S64) {
  ------------------
  |  Branch (17313:9): [True: 0, False: 1]
  ------------------
17314|      0|        janet_panic("compare method requires int/s64 as first argument");
17315|      0|    }
17316|      1|    int64_t x = janet_unwrap_s64(argv[0]);
17317|      1|    switch (janet_type(argv[1])) {
  ------------------
  |  |  790|      1|    (isnan((x).number) \
  |  |  791|      1|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|      1|        : JANET_NUMBER)
  ------------------
  |  Branch (17317:13): [True: 1, False: 0]
  ------------------
17318|      1|        default:
  ------------------
  |  Branch (17318:9): [True: 1, False: 0]
  ------------------
17319|      1|            break;
17320|      1|        case JANET_NUMBER : {
  ------------------
  |  Branch (17320:9): [True: 0, False: 1]
  ------------------
17321|      0|            double y = janet_unwrap_number(argv[1]);
  ------------------
  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  ------------------
17322|      0|            return janet_wrap_number(compare_int64_double(x, y));
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
17323|      0|        }
17324|      0|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (17324:9): [True: 0, False: 1]
  ------------------
17325|      0|            void *abst = janet_unwrap_abstract(argv[1]);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
17326|      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 (17326:17): [True: 0, False: 0]
  ------------------
17327|      0|                int64_t y = *(int64_t *)abst;
17328|      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]
  |  |  ------------------
  ------------------
17329|      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 (17329:24): [True: 0, False: 0]
  ------------------
17330|      0|                uint64_t y = *(uint64_t *)abst;
17331|      0|                if (x < 0) {
  ------------------
  |  Branch (17331:21): [True: 0, False: 0]
  ------------------
17332|      0|                    return janet_wrap_number(-1);
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
17333|      0|                } else if (y > INT64_MAX) {
  ------------------
  |  Branch (17333:28): [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 {
17336|      0|                    int64_t y2 = (int64_t) y;
17337|      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]
  |  |  ------------------
  ------------------
17338|      0|                }
17339|      0|            }
17340|      0|            break;
17341|      0|        }
17342|      1|    }
17343|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17344|      1|}
janet.c:janet_uint64_next:
17624|  1.70k|static Janet janet_uint64_next(void *p, Janet key) {
17625|  1.70k|    (void) p;
17626|  1.70k|    return janet_nextmethod(it_u64_methods, key);
17627|  1.70k|}
janet.c:cfun_it_u64_add:
17394|     40|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17395|     40|    janet_arity(argc, 2, -1); \
17396|     40|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17397|     40|    *box = janet_unwrap_##type(argv[0]); \
17398|     83|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17398:25): [True: 43, False: 40]
  ------------------
17399|     40|        /* This avoids undefined behavior. See above for why. */ \
17400|     43|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17401|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17402|     40|} \
janet.c:cfun_it_u64_sub:
17394|    263|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17395|    263|    janet_arity(argc, 2, -1); \
17396|    263|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17397|    263|    *box = janet_unwrap_##type(argv[0]); \
17398|    530|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17398:25): [True: 267, False: 263]
  ------------------
17399|    263|        /* This avoids undefined behavior. See above for why. */ \
17400|    267|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17401|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17402|    263|} \
janet.c:cfun_it_u64_subi:
17405|     18|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name##i(int32_t argc, Janet *argv) { \
17406|     18|    janet_fixarity(argc, 2); \
17407|     18|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17408|     18|    *box = janet_unwrap_##type(argv[1]); \
17409|     18|    /* This avoids undefined behavior. See above for why. */ \
17410|     18|    *box = (T) ((uint64_t) *box) oper ((uint64_t) janet_unwrap_##type(argv[0])); \
17411|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17412|     18|} \
janet.c:cfun_it_u64_mul:
17394|     22|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17395|     22|    janet_arity(argc, 2, -1); \
17396|     22|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17397|     22|    *box = janet_unwrap_##type(argv[0]); \
17398|     72|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17398:25): [True: 50, False: 22]
  ------------------
17399|     22|        /* This avoids undefined behavior. See above for why. */ \
17400|     50|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17401|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17402|     22|} \
janet.c:cfun_it_u64_div:
17428|     63|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17429|     63|    janet_arity(argc, 2, -1);                       \
17430|     63|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17431|     63|    *box = janet_unwrap_##type(argv[0]); \
17432|    128|    for (int32_t i = 1; i < argc; i++) { \
  ------------------
  |  Branch (17432:25): [True: 69, False: 59]
  ------------------
17433|     69|      T value = janet_unwrap_##type(argv[i]); \
17434|     69|      if (value == 0) DIVZERO(name); \
  ------------------
  |  |17422|      4|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |17423|      4|#define DIVZERO_div janet_panic("division by zero")
  |  |  ------------------
  ------------------
  |  Branch (17434:11): [True: 4, False: 65]
  ------------------
17435|     69|      *box oper##= value; \
17436|     65|    } \
17437|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17438|     63|} \
janet.c:cfun_it_u64_mod:
17428|     18|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17429|     18|    janet_arity(argc, 2, -1);                       \
17430|     18|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17431|     18|    *box = janet_unwrap_##type(argv[0]); \
17432|     36|    for (int32_t i = 1; i < argc; i++) { \
  ------------------
  |  Branch (17432:25): [True: 18, False: 18]
  ------------------
17433|     18|      T value = janet_unwrap_##type(argv[i]); \
17434|     18|      if (value == 0) DIVZERO(name); \
  ------------------
  |  |17422|      0|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |17425|      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 (17434:11): [True: 0, False: 18]
  ------------------
17435|     18|      *box oper##= value; \
17436|     18|    } \
17437|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17438|     18|} \
janet.c:cfun_it_u64_modi:
17441|      3|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name##i(int32_t argc, Janet *argv) { \
17442|      3|    janet_fixarity(argc, 2);                       \
17443|      3|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17444|      3|    *box = janet_unwrap_##type(argv[1]); \
17445|      3|    T value = janet_unwrap_##type(argv[0]); \
17446|      3|    if (value == 0) DIVZERO(name); \
  ------------------
  |  |17422|      0|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |17425|      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 (17446:9): [True: 0, False: 3]
  ------------------
17447|      3|    *box oper##= value; \
17448|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17449|      3|} \
janet.c:cfun_it_u64_rem:
17428|    206|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17429|    206|    janet_arity(argc, 2, -1);                       \
17430|    206|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17431|    206|    *box = janet_unwrap_##type(argv[0]); \
17432|    420|    for (int32_t i = 1; i < argc; i++) { \
  ------------------
  |  Branch (17432:25): [True: 215, False: 205]
  ------------------
17433|    215|      T value = janet_unwrap_##type(argv[i]); \
17434|    215|      if (value == 0) DIVZERO(name); \
  ------------------
  |  |17422|      1|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |17424|      1|#define DIVZERO_rem janet_panic("division by zero")
  |  |  ------------------
  ------------------
  |  Branch (17434:11): [True: 1, False: 214]
  ------------------
17435|    215|      *box oper##= value; \
17436|    214|    } \
17437|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17438|    206|} \
janet.c:cfun_it_u64_remi:
17441|     17|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name##i(int32_t argc, Janet *argv) { \
17442|     17|    janet_fixarity(argc, 2);                       \
17443|     17|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17444|     17|    *box = janet_unwrap_##type(argv[1]); \
17445|     17|    T value = janet_unwrap_##type(argv[0]); \
17446|     17|    if (value == 0) DIVZERO(name); \
  ------------------
  |  |17422|      1|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |17424|      1|#define DIVZERO_rem janet_panic("division by zero")
  |  |  ------------------
  ------------------
  |  Branch (17446:9): [True: 1, False: 16]
  ------------------
17447|     17|    *box oper##= value; \
17448|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17449|     17|} \
janet.c:cfun_it_u64_and:
17394|     14|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17395|     14|    janet_arity(argc, 2, -1); \
17396|     14|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17397|     14|    *box = janet_unwrap_##type(argv[0]); \
17398|     41|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17398:25): [True: 27, False: 14]
  ------------------
17399|     14|        /* This avoids undefined behavior. See above for why. */ \
17400|     27|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17401|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17402|     14|} \
janet.c:cfun_it_u64_or:
17394|    105|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17395|    105|    janet_arity(argc, 2, -1); \
17396|    105|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17397|    105|    *box = janet_unwrap_##type(argv[0]); \
17398|    210|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17398:25): [True: 105, False: 105]
  ------------------
17399|    105|        /* This avoids undefined behavior. See above for why. */ \
17400|    105|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17401|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17402|    105|} \
janet.c:cfun_it_u64_xor:
17394|  1.50k|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17395|  1.50k|    janet_arity(argc, 2, -1); \
17396|  1.50k|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17397|  1.50k|    *box = janet_unwrap_##type(argv[0]); \
17398|  6.03k|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17398:25): [True: 4.52k, False: 1.50k]
  ------------------
17399|  1.50k|        /* This avoids undefined behavior. See above for why. */ \
17400|  4.52k|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17401|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17402|  1.50k|} \
janet.c:it_s64_get:
17629|  9.57k|static int it_s64_get(void *p, Janet key, Janet *out) {
17630|  9.57k|    (void) p;
17631|  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 (17631:9): [True: 4, False: 9.57k]
  ------------------
17632|      4|        return 0;
17633|  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))
  ------------------
17634|  9.57k|}
janet.c:it_u64_get:
17636|  3.91k|static int it_u64_get(void *p, Janet key, Janet *out) {
17637|  3.91k|    (void) p;
17638|  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 (17638:9): [True: 10, False: 3.90k]
  ------------------
17639|     10|        return 0;
17640|  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))
  ------------------
17641|  3.91k|}
janet.c:checkflags:
17729|      5|static int32_t checkflags(const uint8_t *str) {
17730|      5|    int32_t flags = 0;
17731|      5|    int32_t i;
17732|      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)))
  |  |  ------------------
  ------------------
17733|      5|    if (!len || len > 10)
  ------------------
  |  Branch (17733:9): [True: 0, False: 5]
  |  Branch (17733:17): [True: 1, False: 4]
  ------------------
17734|      1|        janet_panic("file mode must have a length between 1 and 10");
17735|      4|    switch (*str) {
17736|      0|        default:
  ------------------
  |  Branch (17736:9): [True: 0, False: 4]
  ------------------
17737|      0|            janet_panicf("invalid flag %c, expected w, a, or r", *str);
17738|      0|            break;
17739|      3|        case 'w':
  ------------------
  |  Branch (17739:9): [True: 3, False: 1]
  ------------------
17740|      3|            flags |= JANET_FILE_WRITE;
  ------------------
  |  | 2261|      3|#define JANET_FILE_WRITE 1
  ------------------
17741|      3|            janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2018|      3|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
17742|      3|            break;
17743|      0|        case 'a':
  ------------------
  |  Branch (17743:9): [True: 0, False: 4]
  ------------------
17744|      0|            flags |= JANET_FILE_APPEND;
  ------------------
  |  | 2263|      0|#define JANET_FILE_APPEND 4
  ------------------
17745|      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
  |  |  ------------------
  ------------------
17746|      0|            break;
17747|      1|        case 'r':
  ------------------
  |  Branch (17747:9): [True: 1, False: 3]
  ------------------
17748|      1|            flags |= JANET_FILE_READ;
  ------------------
  |  | 2262|      1|#define JANET_FILE_READ 2
  ------------------
17749|      1|            janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2019|      1|#define JANET_SANDBOX_FS_READ 64
  ------------------
17750|      1|            break;
17751|      4|    }
17752|      8|    for (i = 1; i < len; i++) {
  ------------------
  |  Branch (17752:17): [True: 6, False: 2]
  ------------------
17753|      6|        switch (str[i]) {
17754|      1|            default:
  ------------------
  |  Branch (17754:13): [True: 1, False: 5]
  ------------------
17755|      1|                janet_panicf("invalid flag %c, expected +, b, or n", str[i]);
17756|      0|                break;
17757|      0|            case '+':
  ------------------
  |  Branch (17757:13): [True: 0, False: 6]
  ------------------
17758|      0|                if (flags & JANET_FILE_UPDATE) return -1;
  ------------------
  |  | 2264|      0|#define JANET_FILE_UPDATE 8
  ------------------
  |  Branch (17758:21): [True: 0, False: 0]
  ------------------
17759|      0|                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2018|      0|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
17760|      0|                flags |= JANET_FILE_UPDATE;
  ------------------
  |  | 2264|      0|#define JANET_FILE_UPDATE 8
  ------------------
17761|      0|                break;
17762|      2|            case 'b':
  ------------------
  |  Branch (17762:13): [True: 2, False: 4]
  ------------------
17763|      2|                if (flags & JANET_FILE_BINARY) return -1;
  ------------------
  |  | 2267|      2|#define JANET_FILE_BINARY 64
  ------------------
  |  Branch (17763:21): [True: 0, False: 2]
  ------------------
17764|      2|                flags |= JANET_FILE_BINARY;
  ------------------
  |  | 2267|      2|#define JANET_FILE_BINARY 64
  ------------------
17765|      2|                break;
17766|      3|            case 'n':
  ------------------
  |  Branch (17766:13): [True: 3, False: 3]
  ------------------
17767|      3|                if (flags & JANET_FILE_NONIL) return -1;
  ------------------
  |  | 2269|      3|#define JANET_FILE_NONIL 512
  ------------------
  |  Branch (17767:21): [True: 1, False: 2]
  ------------------
17768|      2|                flags |= JANET_FILE_NONIL;
  ------------------
  |  | 2269|      2|#define JANET_FILE_NONIL 512
  ------------------
17769|      2|                break;
17770|      6|        }
17771|      6|    }
17772|      2|    return flags;
17773|      4|}
janet.c:makef:
17775|  21.4k|static void *makef(FILE *f, int32_t flags, size_t bufsize) {
17776|  21.4k|    JanetFile *iof = (JanetFile *) janet_abstract(&janet_file_type, sizeof(JanetFile));
17777|  21.4k|    iof->file = f;
17778|  21.4k|    iof->flags = flags;
17779|  21.4k|    iof->vbufsize = bufsize;
17780|  21.4k|#if !(defined(JANET_WINDOWS) || defined(JANET_PLAN9))
17781|       |    /* While we would like fopen to set cloexec by default (like O_CLOEXEC) with the e flag, that is
17782|       |     * not standard. */
17783|  21.4k|    if (!(flags & JANET_FILE_NOT_CLOSEABLE))
  ------------------
  |  | 2265|  21.4k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
  |  Branch (17783:9): [True: 3, False: 21.4k]
  ------------------
17784|      3|        fcntl(fileno(f), F_SETFD, FD_CLOEXEC);
17785|  21.4k|#endif
17786|  21.4k|    return iof;
17787|  21.4k|}
janet.c:cfun_io_gc:
17978|  22.5k|static int cfun_io_gc(void *p, size_t len) {
17979|  22.5k|    (void) len;
17980|  22.5k|    JanetFile *iof = (JanetFile *)p;
17981|  22.5k|    janet_file_close(iof);
17982|  22.5k|    return 0;
17983|  22.5k|}
janet.c:io_file_get:
18062|      7|static int io_file_get(void *p, Janet key, Janet *out) {
18063|      7|    (void) p;
18064|      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 (18064:9): [True: 0, False: 7]
  ------------------
18065|      0|        return 0;
18066|      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))
  ------------------
18067|      7|}
janet.c:io_file_marshal:
18074|  1.02k|static void io_file_marshal(void *p, JanetMarshalContext *ctx) {
18075|  1.02k|    JanetFile *iof = (JanetFile *)p;
18076|  1.02k|    if (janet_marshal_flags(ctx) & JANET_MARSHAL_UNSAFE) {
  ------------------
  |  | 1901|  1.02k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (18076:9): [True: 1.02k, False: 0]
  ------------------
18077|  1.02k|        janet_marshal_abstract(ctx, p);
18078|  1.02k|        int fno = -1;
18079|       |#ifdef JANET_WINDOWS
18080|       |        if (iof->flags & JANET_FILE_NOT_CLOSEABLE) {
18081|       |            fno = _fileno(iof->file);
18082|       |        } else {
18083|       |            fno = _dup(_fileno(iof->file));
18084|       |        }
18085|       |#else
18086|  1.02k|        if (iof->flags & JANET_FILE_NOT_CLOSEABLE) {
  ------------------
  |  | 2265|  1.02k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
  |  Branch (18086:13): [True: 1.02k, False: 0]
  ------------------
18087|  1.02k|            fno = fileno(iof->file);
18088|  1.02k|        } else {
18089|       |#ifdef JANET_PLAN9
18090|       |            fno = dup(fileno(iof->file), -1);
18091|       |#else
18092|      0|            fno = dup(fileno(iof->file));
18093|      0|#endif
18094|      0|        }
18095|  1.02k|#endif
18096|  1.02k|        janet_marshal_int(ctx, fno);
18097|  1.02k|        janet_marshal_int(ctx, iof->flags);
18098|  1.02k|        janet_marshal_size(ctx, iof->vbufsize);
18099|  1.02k|    } else {
18100|      0|        janet_panic("cannot marshal file in safe mode");
18101|      0|    }
18102|  1.02k|}
janet.c:io_file_unmarshal:
18104|  1.02k|static void *io_file_unmarshal(JanetMarshalContext *ctx) {
18105|  1.02k|    if (janet_unmarshal_flags(ctx) & JANET_MARSHAL_UNSAFE) {
  ------------------
  |  | 1901|  1.02k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (18105:9): [True: 1.02k, False: 0]
  ------------------
18106|  1.02k|        JanetFile *iof = janet_unmarshal_abstract(ctx, sizeof(JanetFile));
18107|  1.02k|        int32_t fd = janet_unmarshal_int(ctx);
18108|  1.02k|        int32_t flags = janet_unmarshal_int(ctx);
18109|  1.02k|        char fmt[4] = {0};
18110|  1.02k|        int index = 0;
18111|  1.02k|        if (flags & JANET_FILE_READ) fmt[index++] = 'r';
  ------------------
  |  | 2262|  1.02k|#define JANET_FILE_READ 2
  ------------------
  |  Branch (18111:13): [True: 342, False: 684]
  ------------------
18112|  1.02k|        if (flags & JANET_FILE_APPEND) {
  ------------------
  |  | 2263|  1.02k|#define JANET_FILE_APPEND 4
  ------------------
  |  Branch (18112:13): [True: 684, False: 342]
  ------------------
18113|    684|            fmt[index++] = 'a';
18114|    684|        } else if (flags & JANET_FILE_WRITE) {
  ------------------
  |  | 2261|    342|#define JANET_FILE_WRITE 1
  ------------------
  |  Branch (18114:20): [True: 0, False: 342]
  ------------------
18115|      0|            fmt[index++] = 'w';
18116|      0|        }
18117|       |#ifdef JANET_WINDOWS
18118|       |        iof->file = _fdopen(fd, fmt);
18119|       |#else
18120|  1.02k|        iof->file = fdopen(fd, fmt);
18121|  1.02k|#endif
18122|  1.02k|        if (iof->file == NULL) {
  ------------------
  |  Branch (18122:13): [True: 0, False: 1.02k]
  ------------------
18123|      0|            iof->flags = JANET_FILE_CLOSED;
  ------------------
  |  | 2266|      0|#define JANET_FILE_CLOSED 32
  ------------------
18124|  1.02k|        } else {
18125|  1.02k|            iof->flags = flags;
18126|  1.02k|        }
18127|  1.02k|        iof->vbufsize = janet_unmarshal_size(ctx);
18128|  1.02k|        if (iof->vbufsize != BUFSIZ) {
  ------------------
  |  Branch (18128:13): [True: 0, False: 1.02k]
  ------------------
18129|      0|            int result = setvbuf(iof->file, NULL, iof->vbufsize ? _IOFBF : _IONBF, iof->vbufsize);
  ------------------
  |  Branch (18129:51): [True: 0, False: 0]
  ------------------
18130|      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]
  |  |  ------------------
  ------------------
18131|      0|        }
18132|  1.02k|        return iof;
18133|  1.02k|    } else {
18134|      0|        janet_panic("cannot unmarshal file in safe mode");
18135|      0|    }
18136|  1.02k|}
janet.c:cfun_io_print_impl:
18217|  1.73k|                                int newline, const char *name, FILE *dflt_file) {
18218|  1.73k|    Janet x = janet_dyn(name);
18219|  1.73k|    return cfun_io_print_impl_x(argc, argv, newline, dflt_file, 0, x);
18220|  1.73k|}
janet.c:cfun_io_print_impl_x:
18148|  1.75k|                                  FILE *dflt_file, int32_t offset, Janet x) {
18149|  1.75k|    FILE *f;
18150|  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 (18150:13): [True: 1.75k, False: 0]
  ------------------
18151|      1|        default:
  ------------------
  |  Branch (18151:9): [True: 1, False: 1.75k]
  ------------------
18152|      1|            janet_panicf("cannot print to %v", x);
18153|      0|        case JANET_BUFFER: {
  ------------------
  |  Branch (18153:9): [True: 0, False: 1.75k]
  ------------------
18154|       |            /* Special case buffer */
18155|      0|            JanetBuffer *buf = janet_unwrap_buffer(x);
  ------------------
  |  |  857|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
18156|      0|            for (int32_t i = offset; i < argc; ++i) {
  ------------------
  |  Branch (18156:38): [True: 0, False: 0]
  ------------------
18157|      0|                janet_to_string_b(buf, argv[i]);
18158|      0|            }
18159|      0|            if (newline)
  ------------------
  |  Branch (18159:17): [True: 0, False: 0]
  ------------------
18160|      0|                janet_buffer_push_u8(buf, '\n');
18161|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18162|      0|        }
18163|     23|        case JANET_FUNCTION: {
  ------------------
  |  Branch (18163:9): [True: 23, False: 1.73k]
  ------------------
18164|       |            /* Special case function */
18165|     23|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  863|     23|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
18166|     23|            JanetBuffer *buf = janet_buffer(0);
18167|  65.9k|            for (int32_t i = offset; i < argc; ++i) {
  ------------------
  |  Branch (18167:38): [True: 65.8k, False: 23]
  ------------------
18168|  65.8k|                janet_to_string_b(buf, argv[i]);
18169|  65.8k|            }
18170|     23|            if (newline)
  ------------------
  |  Branch (18170:17): [True: 2, False: 21]
  ------------------
18171|      2|                janet_buffer_push_u8(buf, '\n');
18172|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18173|     23|            janet_call(fun, 1, args);
18174|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18175|      0|        }
18176|  1.73k|        case JANET_NIL:
  ------------------
  |  Branch (18176:9): [True: 1.73k, False: 24]
  ------------------
18177|  1.73k|            f = dflt_file;
18178|  1.73k|            if (f == NULL) janet_panic("cannot print to nil");
  ------------------
  |  Branch (18178:17): [True: 0, False: 1.73k]
  ------------------
18179|  1.73k|            break;
18180|  1.73k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (18180:9): [True: 0, False: 1.75k]
  ------------------
18181|      0|            void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18182|      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 (18182:17): [True: 0, False: 0]
  ------------------
18183|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18184|      0|            JanetFile *iofile = abstract;
18185|      0|            io_assert_writeable(iofile);
18186|      0|            f = iofile->file;
18187|      0|            break;
18188|      0|        }
18189|  1.75k|    }
18190|  6.90k|    for (int32_t i = offset; i < argc; ++i) {
  ------------------
  |  Branch (18190:30): [True: 5.17k, False: 1.73k]
  ------------------
18191|  5.17k|        int32_t len;
18192|  5.17k|        const uint8_t *vstr;
18193|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18194|     81|            JanetBuffer *b = janet_unwrap_buffer(argv[i]);
  ------------------
  |  |  857|     81|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
18195|     81|            vstr = b->data;
18196|     81|            len = b->count;
18197|  5.09k|        } else {
18198|  5.09k|            vstr = janet_to_string(argv[i]);
18199|  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)))
  |  |  ------------------
  ------------------
18200|  5.09k|        }
18201|  5.17k|        if (len) {
  ------------------
  |  Branch (18201:13): [True: 4.50k, False: 667]
  ------------------
18202|  4.50k|            if (1 != fwrite(vstr, len, 1, f)) {
  ------------------
  |  Branch (18202:17): [True: 0, False: 4.50k]
  ------------------
18203|      0|                if (f == dflt_file) {
  ------------------
  |  Branch (18203:21): [True: 0, False: 0]
  ------------------
18204|      0|                    janet_panicf("cannot print %d bytes", len);
18205|      0|                } else {
18206|      0|                    janet_panicf("cannot print %d bytes to %v", len, x);
18207|      0|                }
18208|      0|            }
18209|  4.50k|        }
18210|  5.17k|    }
18211|  1.73k|    if (newline)
  ------------------
  |  Branch (18211:9): [True: 1.71k, False: 23]
  ------------------
18212|  1.71k|        putc('\n', f);
18213|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18214|  1.73k|}
janet.c:cfun_io_printf_impl:
18325|    175|                                 const char *name, FILE *dflt_file) {
18326|    175|    janet_arity(argc, 1, -1);
18327|    175|    Janet x = janet_dyn(name);
18328|    175|    return cfun_io_printf_impl_x(argc, argv, newline, dflt_file, 0, x);
18329|       |
18330|    175|}
janet.c:cfun_io_printf_impl_x:
18268|    178|                                   FILE *dflt_file, int32_t offset, Janet x) {
18269|    178|    FILE *f;
18270|    178|    const char *fmt = janet_getcstring(argv, offset);
18271|    178|    switch (janet_type(x)) {
  ------------------
  |  |  790|    178|    (isnan((x).number) \
  |  |  791|    178|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|    178|        : JANET_NUMBER)
  ------------------
  |  Branch (18271:13): [True: 173, False: 5]
  ------------------
18272|      2|        default:
  ------------------
  |  Branch (18272:9): [True: 2, False: 176]
  ------------------
18273|      2|            janet_panicf("cannot print to %v", x);
18274|      0|        case JANET_BUFFER: {
  ------------------
  |  Branch (18274:9): [True: 0, False: 178]
  ------------------
18275|       |            /* Special case buffer */
18276|      0|            JanetBuffer *buf = janet_unwrap_buffer(x);
  ------------------
  |  |  857|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
18277|      0|            janet_buffer_format(buf, fmt, offset, argc, argv);
18278|      0|            if (newline) janet_buffer_push_u8(buf, '\n');
  ------------------
  |  Branch (18278:17): [True: 0, False: 0]
  ------------------
18279|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18280|      0|        }
18281|      1|        case JANET_FUNCTION: {
  ------------------
  |  Branch (18281:9): [True: 1, False: 177]
  ------------------
18282|       |            /* Special case function */
18283|      1|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  863|      1|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
18284|      1|            JanetBuffer *buf = janet_buffer(0);
18285|      1|            janet_buffer_format(buf, fmt, offset, argc, argv);
18286|      1|            if (newline) janet_buffer_push_u8(buf, '\n');
  ------------------
  |  Branch (18286:17): [True: 0, False: 1]
  ------------------
18287|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18288|      1|            janet_call(fun, 1, args);
18289|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18290|      0|        }
18291|    171|        case JANET_NIL:
  ------------------
  |  Branch (18291:9): [True: 171, False: 7]
  ------------------
18292|    171|            f = dflt_file;
18293|    171|            if (f == NULL) janet_panic("cannot print to nil");
  ------------------
  |  Branch (18293:17): [True: 0, False: 171]
  ------------------
18294|    171|            break;
18295|    171|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (18295:9): [True: 0, False: 178]
  ------------------
18296|      0|            void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18297|      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 (18297:17): [True: 0, False: 0]
  ------------------
18298|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18299|      0|            JanetFile *iofile = abstract;
18300|      0|            if (iofile->flags & JANET_FILE_CLOSED) {
  ------------------
  |  | 2266|      0|#define JANET_FILE_CLOSED 32
  ------------------
  |  Branch (18300:17): [True: 0, False: 0]
  ------------------
18301|      0|                janet_panic("cannot print to closed file");
18302|      0|            }
18303|      0|            io_assert_writeable(iofile);
18304|      0|            f = iofile->file;
18305|      0|            break;
18306|      0|        }
18307|    178|    }
18308|    171|    JanetBuffer *buf = janet_buffer(10);
18309|    171|    janet_buffer_format(buf, fmt, offset, argc, argv);
18310|    171|    if (newline) janet_buffer_push_u8(buf, '\n');
  ------------------
  |  Branch (18310:9): [True: 2, False: 169]
  ------------------
18311|    171|    if (buf->count) {
  ------------------
  |  Branch (18311:9): [True: 90, False: 81]
  ------------------
18312|     90|        if (1 != fwrite(buf->data, buf->count, 1, f)) {
  ------------------
  |  Branch (18312:13): [True: 0, False: 90]
  ------------------
18313|      0|            janet_panicf("could not print %d bytes to file", buf->count);
18314|      0|        }
18315|     90|    }
18316|       |    /* Clear buffer to make things easier for GC */
18317|    171|    buf->count = 0;
18318|    171|    buf->capacity = 0;
18319|    171|    janet_free(buf->data);
  ------------------
  |  | 2402|    171|#define janet_free(X) free((X))
  ------------------
18320|    171|    buf->data = NULL;
18321|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18322|    171|}
janet.c:janet_flusher:
18370|      2|static void janet_flusher(const char *name, FILE *dflt_file) {
18371|      2|    Janet x = janet_dyn(name);
18372|      2|    switch (janet_type(x)) {
  ------------------
  |  |  790|      2|    (isnan((x).number) \
  |  |  791|      2|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|      2|        : JANET_NUMBER)
  ------------------
  |  Branch (18372:13): [True: 2, False: 0]
  ------------------
18373|      0|        default:
  ------------------
  |  Branch (18373:9): [True: 0, False: 2]
  ------------------
18374|      0|            break;
18375|      2|        case JANET_NIL:
  ------------------
  |  Branch (18375:9): [True: 2, False: 0]
  ------------------
18376|      2|            fflush(dflt_file);
18377|      2|            break;
18378|      0|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (18378:9): [True: 0, False: 2]
  ------------------
18379|      0|            void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18380|      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 (18380:17): [True: 0, False: 0]
  ------------------
18381|      0|            JanetFile *iofile = abstract;
18382|      0|            fflush(iofile->file);
18383|      0|            break;
18384|      0|        }
18385|      2|    }
18386|      2|}
janet.c:push64:
18708|  1.04k|static void push64(MarshalState *st, uint64_t x) {
18709|  1.04k|    if (x <= 0xF0) {
  ------------------
  |  Branch (18709:9): [True: 10, False: 1.03k]
  ------------------
18710|       |        /* Single byte */
18711|     10|        pushbyte(st, (uint8_t) x);
18712|  1.03k|    } else {
18713|       |        /* Multibyte, little endian */
18714|  1.03k|        uint8_t bytes[9];
18715|  1.03k|        int nbytes = 0;
18716|  3.10k|        while (x) {
  ------------------
  |  Branch (18716:16): [True: 2.07k, False: 1.03k]
  ------------------
18717|  2.07k|            bytes[++nbytes] = x & 0xFF;
18718|  2.07k|            x >>= 8;
18719|  2.07k|        }
18720|  1.03k|        bytes[0] = 0xF0 + nbytes;
18721|  1.03k|        pushbytes(st, bytes, nbytes + 1);
18722|  1.03k|    }
18723|  1.04k|}
janet.c:pushint:
18676|  28.7M|static void pushint(MarshalState *st, int32_t x) {
18677|  28.7M|    if (x >= 0 && x < 128) {
  ------------------
  |  Branch (18677:9): [True: 27.6M, False: 1.13M]
  |  Branch (18677:19): [True: 22.6M, False: 5.00M]
  ------------------
18678|  22.6M|        janet_buffer_push_u8(st->buf, x);
18679|  22.6M|    } else if (x <= 8191 && x >= -8192) {
  ------------------
  |  Branch (18679:16): [True: 5.30M, False: 842k]
  |  Branch (18679:29): [True: 5.30M, False: 326]
  ------------------
18680|  5.30M|        uint8_t intbuf[2];
18681|  5.30M|        intbuf[0] = ((x >> 8) & 0x3F) | 0x80;
18682|  5.30M|        intbuf[1] = x & 0xFF;
18683|  5.30M|        janet_buffer_push_bytes(st->buf, intbuf, 2);
18684|  5.30M|    } else {
18685|   842k|        uint8_t intbuf[5];
18686|   842k|        intbuf[0] = LB_INTEGER;
18687|   842k|        intbuf[1] = (x >> 24) & 0xFF;
18688|   842k|        intbuf[2] = (x >> 16) & 0xFF;
18689|   842k|        intbuf[3] = (x >> 8) & 0xFF;
18690|   842k|        intbuf[4] = x & 0xFF;
18691|   842k|        janet_buffer_push_bytes(st->buf, intbuf, 5);
18692|   842k|    }
18693|  28.7M|}
janet.c:pushpointer:
18703|  4.41k|static void pushpointer(MarshalState *st, const void *ptr) {
18704|  4.41k|    janet_buffer_push_bytes(st->buf, (const uint8_t *) &ptr, sizeof(ptr));
18705|  4.41k|}
janet.c:pushbyte:
18695|  30.4M|static void pushbyte(MarshalState *st, uint8_t b) {
18696|  30.4M|    janet_buffer_push_u8(st->buf, b);
18697|  30.4M|}
janet.c:pushbytes:
18699|  1.81M|static void pushbytes(MarshalState *st, const uint8_t *bytes, int32_t len) {
18700|  1.81M|    janet_buffer_push_bytes(st->buf, bytes, len);
18701|  1.81M|}
janet.c:marshal_one:
19009|  7.67M|static void marshal_one(MarshalState *st, Janet x, int flags) {
19010|  7.67M|    MARSH_STACKCHECK;
  ------------------
  |  |18732|  7.67M|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  291|  7.67M|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (18732:30): [True: 0, False: 7.67M]
  |  |  ------------------
  ------------------
19011|  7.67M|    JanetType type = janet_type(x);
  ------------------
  |  |  790|  7.67M|    (isnan((x).number) \
  |  |  791|  7.67M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  7.67M|        : JANET_NUMBER)
  ------------------
  |  Branch (19011:22): [True: 7.20M, False: 474k]
  ------------------
19012|       |
19013|       |    /* Check simple primitives (non reference types, no benefit from memoization) */
19014|  7.67M|    switch (type) {
19015|  7.00M|        default:
  ------------------
  |  Branch (19015:9): [True: 7.00M, False: 676k]
  ------------------
19016|  7.00M|            break;
19017|  7.00M|        case JANET_NIL:
  ------------------
  |  Branch (19017:9): [True: 157k, False: 7.52M]
  ------------------
19018|   157k|            pushbyte(st, LB_NIL);
19019|   157k|            return;
19020|  45.1k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (19020:9): [True: 45.1k, False: 7.63M]
  ------------------
19021|  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]
  |  |  ------------------
  ------------------
19022|  45.1k|            return;
19023|   476k|        case JANET_NUMBER: {
  ------------------
  |  Branch (19023:9): [True: 476k, False: 7.20M]
  ------------------
19024|   476k|            double xval = janet_unwrap_number(x);
  ------------------
  |  |  834|   476k|#define janet_unwrap_number(x) ((x).number)
  ------------------
19025|   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]
  |  |  ------------------
  ------------------
19026|   473k|                pushint(st, (int32_t) xval);
19027|   473k|                return;
19028|   473k|            }
19029|  3.12k|            break;
19030|   476k|        }
19031|  7.67M|    }
19032|       |
19033|       |    /* Check reference and registry value */
19034|  7.00M|    {
19035|  7.00M|        Janet check;
19036|  7.00M|        if (st->maybe_cycles) {
  ------------------
  |  Branch (19036:13): [True: 7.00M, False: 34]
  ------------------
19037|  7.00M|            check = janet_table_get(&st->seen, x);
19038|  7.00M|            if (janet_checkint(check)) {
  ------------------
  |  Branch (19038:17): [True: 4.53M, False: 2.47M]
  ------------------
19039|  4.53M|                pushbyte(st, LB_REFERENCE);
19040|  4.53M|                pushint(st, janet_unwrap_integer(check));
  ------------------
  |  |  957|  4.53M|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  834|  4.53M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
19041|  4.53M|                return;
19042|  4.53M|            }
19043|  7.00M|        }
19044|  2.47M|        if (st->rreg) {
  ------------------
  |  Branch (19044:13): [True: 134, False: 2.47M]
  ------------------
19045|    134|            check = janet_table_get(st->rreg, x);
19046|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19047|      0|                MARK_SEEN();
  ------------------
  |  |18964|      0|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18964:14): [True: 0, False: 0]
  |  |  ------------------
  |  |18965|      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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18966|      0|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18966:16): [Folded, False: 0]
  |  |  ------------------
  ------------------
19048|      0|                const uint8_t *regname = janet_unwrap_symbol(check);
  ------------------
  |  |  859|      0|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
19049|      0|                pushbyte(st, LB_REGISTRY);
19050|      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)))
  |  |  ------------------
  ------------------
19051|      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)))
  |  |  ------------------
  ------------------
19052|      0|                return;
19053|      0|            }
19054|    134|        }
19055|  2.47M|    }
19056|       |
19057|       |    /* Reference types */
19058|  2.47M|    switch (type) {
19059|  2.44k|        case JANET_NUMBER: {
  ------------------
  |  Branch (19059:9): [True: 2.44k, False: 2.46M]
  ------------------
19060|  2.44k|            union {
19061|  2.44k|                double d;
19062|  2.44k|                uint8_t bytes[8];
19063|  2.44k|            } u;
19064|  2.44k|            u.d = janet_unwrap_number(x);
  ------------------
  |  |  834|  2.44k|#define janet_unwrap_number(x) ((x).number)
  ------------------
19065|       |#ifdef JANET_BIG_ENDIAN
19066|       |            /* Swap byte order */
19067|       |            uint8_t temp;
19068|       |            temp = u.bytes[7];
19069|       |            u.bytes[7] = u.bytes[0];
19070|       |            u.bytes[0] = temp;
19071|       |            temp = u.bytes[6];
19072|       |            u.bytes[6] = u.bytes[1];
19073|       |            u.bytes[1] = temp;
19074|       |            temp = u.bytes[5];
19075|       |            u.bytes[5] = u.bytes[2];
19076|       |            u.bytes[2] = temp;
19077|       |            temp = u.bytes[4];
19078|       |            u.bytes[4] = u.bytes[3];
19079|       |            u.bytes[3] = temp;
19080|       |#endif
19081|  2.44k|            pushbyte(st, LB_REAL);
19082|  2.44k|            pushbytes(st, u.bytes, 8);
19083|  2.44k|            MARK_SEEN();
  ------------------
  |  |18964|  2.44k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18964:14): [True: 2.44k, False: 0]
  |  |  ------------------
  |  |18965|  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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18966|  2.44k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18966:16): [Folded, False: 2.44k]
  |  |  ------------------
  ------------------
19084|  2.44k|            return;
19085|      0|        }
19086|   511k|        case JANET_STRING:
  ------------------
  |  Branch (19086:9): [True: 511k, False: 1.95M]
  ------------------
19087|  1.60M|        case JANET_SYMBOL:
  ------------------
  |  Branch (19087:9): [True: 1.09M, False: 1.37M]
  ------------------
19088|  1.68M|        case JANET_KEYWORD: {
  ------------------
  |  Branch (19088:9): [True: 81.0k, False: 2.38M]
  ------------------
19089|  1.68M|            const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  858|  1.68M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
19090|  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)))
  |  |  ------------------
  ------------------
19091|       |            /* Record reference */
19092|  1.68M|            MARK_SEEN();
  ------------------
  |  |18964|  1.68M|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18964:14): [True: 1.68M, False: 310]
  |  |  ------------------
  |  |18965|  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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18966|  1.68M|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18966:16): [Folded, False: 1.68M]
  |  |  ------------------
  ------------------
19093|  1.68M|            uint8_t lb = (type == JANET_STRING) ? LB_STRING :
  ------------------
  |  Branch (19093:26): [True: 511k, False: 1.17M]
  ------------------
19094|  1.68M|                         (type == JANET_SYMBOL) ? LB_SYMBOL :
  ------------------
  |  Branch (19094:26): [True: 1.09M, False: 81.1k]
  ------------------
19095|  1.17M|                         LB_KEYWORD;
19096|  1.68M|            pushbyte(st, lb);
19097|  1.68M|            pushint(st, length);
19098|  1.68M|            pushbytes(st, str, length);
19099|  1.68M|            return;
19100|  1.60M|        }
19101|  4.78k|        case JANET_BUFFER: {
  ------------------
  |  Branch (19101:9): [True: 4.78k, False: 2.46M]
  ------------------
19102|  4.78k|            JanetBuffer *buffer = janet_unwrap_buffer(x);
  ------------------
  |  |  857|  4.78k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
19103|       |            /* Record reference */
19104|  4.78k|            MARK_SEEN();
  ------------------
  |  |18964|  4.78k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18964:14): [True: 4.78k, False: 0]
  |  |  ------------------
  |  |18965|  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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18966|  4.78k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18966:16): [Folded, False: 4.78k]
  |  |  ------------------
  ------------------
19105|  4.78k|#ifdef JANET_EV
19106|  4.78k|            if ((flags & JANET_MARSHAL_UNSAFE) &&
  ------------------
  |  | 1901|  4.78k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (19106:17): [True: 344, False: 4.43k]
  ------------------
19107|    344|                    (buffer->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC)) {
  ------------------
  |  | 1770|    344|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (19107:21): [True: 0, False: 344]
  ------------------
19108|      0|                pushbyte(st, LB_POINTER_BUFFER);
19109|      0|                pushint(st, buffer->count);
19110|      0|                pushint(st, buffer->capacity);
19111|      0|                pushpointer(st, buffer->data);
19112|      0|                return;
19113|      0|            }
19114|  4.78k|#endif
19115|  4.78k|            pushbyte(st, LB_BUFFER);
19116|  4.78k|            pushint(st, buffer->count);
19117|  4.78k|            pushbytes(st, buffer->data, buffer->count);
19118|  4.78k|            return;
19119|  4.78k|        }
19120|  1.03k|        case JANET_ARRAY: {
  ------------------
  |  Branch (19120:9): [True: 1.03k, False: 2.46M]
  ------------------
19121|  1.03k|            int32_t i;
19122|  1.03k|            JanetArray *a = janet_unwrap_array(x);
  ------------------
  |  |  855|  1.03k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
19123|  1.03k|            MARK_SEEN();
  ------------------
  |  |18964|  1.03k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18964:14): [True: 1.03k, False: 0]
  |  |  ------------------
  |  |18965|  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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18966|  1.03k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18966:16): [Folded, False: 1.03k]
  |  |  ------------------
  ------------------
19124|  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))
  |  |  ------------------
  ------------------
19125|  1.03k|            pushbyte(st, memtype == JANET_MEMORY_ARRAY_WEAK ? LB_ARRAY_WEAK : LB_ARRAY);
  ------------------
  |  Branch (19125:26): [True: 0, False: 1.03k]
  ------------------
19126|  1.03k|            pushint(st, a->count);
19127|  8.91k|            for (i = 0; i < a->count; i++)
  ------------------
  |  Branch (19127:25): [True: 7.88k, False: 1.03k]
  ------------------
19128|  7.88k|                marshal_one(st, a->data[i], flags + 1);
19129|  1.03k|            return;
19130|  4.78k|        }
19131|   267k|        case JANET_TUPLE: {
  ------------------
  |  Branch (19131:9): [True: 267k, False: 2.20M]
  ------------------
19132|   267k|            int32_t i, count, flag;
19133|   267k|            const Janet *tup = janet_unwrap_tuple(x);
  ------------------
  |  |  853|   267k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
19134|   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)))
  |  |  ------------------
  ------------------
19135|   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)))
  |  |  ------------------
  ------------------
19136|   267k|            pushbyte(st, LB_TUPLE);
19137|   267k|            pushint(st, count);
19138|   267k|            pushint(st, flag);
19139|  1.02M|            for (i = 0; i < count; i++)
  ------------------
  |  Branch (19139:25): [True: 761k, False: 267k]
  ------------------
19140|   761k|                marshal_one(st, tup[i], flags + 1);
19141|       |            /* Mark as seen AFTER marshaling */
19142|   267k|            MARK_SEEN();
  ------------------
  |  |18964|   267k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18964:14): [True: 267k, False: 3]
  |  |  ------------------
  |  |18965|   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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18966|   267k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18966:16): [Folded, False: 267k]
  |  |  ------------------
  ------------------
19143|   267k|            return;
19144|  4.78k|        }
19145|   250k|        case JANET_TABLE: {
  ------------------
  |  Branch (19145:9): [True: 250k, False: 2.22M]
  ------------------
19146|   250k|            JanetTable *t = janet_unwrap_table(x);
  ------------------
  |  |  856|   250k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
19147|   250k|            MARK_SEEN();
  ------------------
  |  |18964|   250k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18964:14): [True: 250k, False: 0]
  |  |  ------------------
  |  |18965|   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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18966|   250k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18966:16): [Folded, False: 250k]
  |  |  ------------------
  ------------------
19148|   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))
  |  |  ------------------
  ------------------
19149|   250k|            if (memtype == JANET_MEMORY_TABLE_WEAKK) {
  ------------------
  |  Branch (19149:17): [True: 0, False: 250k]
  ------------------
19150|      0|                pushbyte(st, t->proto ? LB_TABLE_WEAKK_PROTO : LB_TABLE_WEAKK);
  ------------------
  |  Branch (19150:30): [True: 0, False: 0]
  ------------------
19151|   250k|            } else if (memtype == JANET_MEMORY_TABLE_WEAKV) {
  ------------------
  |  Branch (19151:24): [True: 0, False: 250k]
  ------------------
19152|      0|                pushbyte(st, t->proto ? LB_TABLE_WEAKV_PROTO : LB_TABLE_WEAKV);
  ------------------
  |  Branch (19152:30): [True: 0, False: 0]
  ------------------
19153|   250k|            } else if (memtype == JANET_MEMORY_TABLE_WEAKKV) {
  ------------------
  |  Branch (19153:24): [True: 0, False: 250k]
  ------------------
19154|      0|                pushbyte(st, t->proto ? LB_TABLE_WEAKKV_PROTO : LB_TABLE_WEAKKV);
  ------------------
  |  Branch (19154:30): [True: 0, False: 0]
  ------------------
19155|   250k|            } else {
19156|   250k|                pushbyte(st, t->proto ? LB_TABLE_PROTO : LB_TABLE);
  ------------------
  |  Branch (19156:30): [True: 0, False: 250k]
  ------------------
19157|   250k|            }
19158|   250k|            pushint(st, t->count);
19159|   250k|            if (t->proto)
  ------------------
  |  Branch (19159:17): [True: 0, False: 250k]
  ------------------
19160|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19161|  4.37M|            for (int32_t i = 0; i < t->capacity; i++) {
  ------------------
  |  Branch (19161:33): [True: 4.12M, False: 250k]
  ------------------
19162|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19163|  2.63M|                    continue;
19164|  1.48M|                marshal_one(st, t->data[i].key, flags + 1);
19165|  1.48M|                marshal_one(st, t->data[i].value, flags + 1);
19166|  1.48M|            }
19167|   250k|            return;
19168|  4.78k|        }
19169|  2.41k|        case JANET_STRUCT: {
  ------------------
  |  Branch (19169:9): [True: 2.41k, False: 2.46M]
  ------------------
19170|  2.41k|            int32_t count;
19171|  2.41k|            const JanetKV *struct_ = janet_unwrap_struct(x);
  ------------------
  |  |  852|  2.41k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
19172|  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)))
  |  |  ------------------
  ------------------
19173|  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]
  |  |  ------------------
  ------------------
19174|  2.41k|            pushint(st, count);
19175|  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]
  |  |  ------------------
  ------------------
19176|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19177|  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 (19177:33): [True: 41.4k, False: 2.41k]
  ------------------
19178|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19179|  26.0k|                    continue;
19180|  15.3k|                marshal_one(st, struct_[i].key, flags + 1);
19181|  15.3k|                marshal_one(st, struct_[i].value, flags + 1);
19182|  15.3k|            }
19183|       |            /* Mark as seen AFTER marshaling */
19184|  2.41k|            MARK_SEEN();
  ------------------
  |  |18964|  2.41k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18964:14): [True: 2.41k, False: 0]
  |  |  ------------------
  |  |18965|  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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18966|  2.41k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18966:16): [Folded, False: 2.41k]
  |  |  ------------------
  ------------------
19185|  2.41k|            return;
19186|  4.78k|        }
19187|  1.04k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (19187:9): [True: 1.04k, False: 2.46M]
  ------------------
19188|  1.04k|            marshal_one_abstract(st, x, flags);
19189|  1.04k|            return;
19190|  4.78k|        }
19191|   136k|        case JANET_FUNCTION: {
  ------------------
  |  Branch (19191:9): [True: 136k, False: 2.33M]
  ------------------
19192|   136k|            pushbyte(st, LB_FUNCTION);
19193|   136k|            JanetFunction *func = janet_unwrap_function(x);
  ------------------
  |  |  863|   136k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
19194|   136k|            pushint(st, func->def->environments_length);
19195|       |            /* Mark seen before reading def */
19196|   136k|            MARK_SEEN();
  ------------------
  |  |18964|   136k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18964:14): [True: 136k, False: 18.4E]
  |  |  ------------------
  |  |18965|   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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18966|   136k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18966:16): [Folded, False: 136k]
  |  |  ------------------
  ------------------
19197|   136k|            marshal_one_def(st, func->def, flags);
19198|   151k|            for (int32_t i = 0; i < func->def->environments_length; i++)
  ------------------
  |  Branch (19198:33): [True: 14.7k, False: 136k]
  ------------------
19199|  14.7k|                marshal_one_env(st, func->envs[i], flags + 1);
19200|   136k|            return;
19201|  4.78k|        }
19202|    343|        case JANET_FIBER: {
  ------------------
  |  Branch (19202:9): [True: 343, False: 2.47M]
  ------------------
19203|    343|            MARK_SEEN();
  ------------------
  |  |18964|    343|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18964:14): [True: 343, False: 0]
  |  |  ------------------
  |  |18965|    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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18966|    343|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18966:16): [Folded, False: 343]
  |  |  ------------------
  ------------------
19204|    343|            pushbyte(st, LB_FIBER);
19205|    343|            marshal_one_fiber(st, janet_unwrap_fiber(x), flags + 1);
  ------------------
  |  |  854|    343|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
19206|    343|            return;
19207|  4.78k|        }
19208|   120k|        case JANET_CFUNCTION: {
  ------------------
  |  Branch (19208:9): [True: 120k, False: 2.34M]
  ------------------
19209|   120k|            if (!(flags & JANET_MARSHAL_UNSAFE)) goto no_registry;
  ------------------
  |  | 1901|   120k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (19209:17): [True: 1, False: 120k]
  ------------------
19210|   120k|            MARK_SEEN();
  ------------------
  |  |18964|   120k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18964:14): [True: 120k, False: 0]
  |  |  ------------------
  |  |18965|   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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18966|   120k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18966:16): [Folded, False: 120k]
  |  |  ------------------
  ------------------
19211|   120k|            pushbyte(st, LB_UNSAFE_CFUNCTION);
19212|   120k|            JanetCFunction cfn = janet_unwrap_cfunction(x);
  ------------------
  |  |  864|   120k|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
19213|   120k|            pushbytes(st, (uint8_t *) &cfn, sizeof(JanetCFunction));
19214|   120k|            return;
19215|   120k|        }
19216|  4.41k|        case JANET_POINTER: {
  ------------------
  |  Branch (19216:9): [True: 4.41k, False: 2.46M]
  ------------------
19217|  4.41k|            if (!(flags & JANET_MARSHAL_UNSAFE)) goto no_registry;
  ------------------
  |  | 1901|  4.41k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (19217:17): [True: 0, False: 4.41k]
  ------------------
19218|  4.41k|            MARK_SEEN();
  ------------------
  |  |18964|  4.41k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18964:14): [True: 4.41k, False: 0]
  |  |  ------------------
  |  |18965|  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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18966|  4.41k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18966:16): [Folded, False: 4.41k]
  |  |  ------------------
  ------------------
19219|  4.41k|            pushbyte(st, LB_UNSAFE_POINTER);
19220|  4.41k|            pushpointer(st, janet_unwrap_pointer(x));
  ------------------
  |  |  862|  4.41k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
19221|  4.41k|            return;
19222|  4.41k|        }
19223|      1|    no_registry:
19224|      1|        default: {
  ------------------
  |  Branch (19224:9): [True: 0, False: 2.47M]
  ------------------
19225|      1|            janet_panicf("no registry value and cannot marshal %p", x);
19226|      1|        }
19227|  2.47M|    }
19228|  2.47M|#undef MARK_SEEN
19229|  2.47M|}
janet.c:marshal_one_abstract:
18979|  1.04k|static void marshal_one_abstract(MarshalState *st, Janet x, int flags) {
18980|  1.04k|    void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  861|  1.04k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18981|  1.04k|#ifdef JANET_EV
18982|       |    /* Threaded abstract types get passed through as pointers in the unsafe mode */
18983|  1.04k|    if ((flags & JANET_MARSHAL_UNSAFE) &&
  ------------------
  |  | 1901|  1.04k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (18983:9): [True: 1.04k, False: 1]
  ------------------
18984|  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 (18984:13): [True: 0, False: 1.04k]
  ------------------
18985|       |
18986|       |        /* Increment refcount before sending message. This prevents a "death in transit" problem
18987|       |         * where a message is garbage collected while in transit between two threads - i.e., the sending threads
18988|       |         * loses the reference and runs a garbage collection before the receiving thread gets the message. */
18989|      0|        janet_abstract_incref(abstract);
18990|      0|        pushbyte(st, LB_THREADED_ABSTRACT);
18991|      0|        pushbytes(st, (uint8_t *) &abstract, sizeof(abstract));
18992|      0|        MARK_SEEN();
  ------------------
  |  |18964|      0|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18964:14): [True: 0, False: 0]
  |  |  ------------------
  |  |18965|      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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18966|      0|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18966:16): [Folded, False: 0]
  |  |  ------------------
  ------------------
18993|      0|        return;
18994|      0|    }
18995|  1.04k|#endif
18996|  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)))
  |  |  ------------------
  ------------------
18997|  1.04k|    if (at->marshal) {
  ------------------
  |  Branch (18997:9): [True: 1.04k, False: 0]
  ------------------
18998|  1.04k|        pushbyte(st, LB_ABSTRACT);
18999|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19000|  1.04k|        JanetMarshalContext context = {st, NULL, flags + 1, NULL, at};
19001|  1.04k|        at->marshal(abstract, &context);
19002|  1.04k|    } else {
19003|      0|        janet_panicf("cannot marshal %p", x);
19004|      0|    }
19005|  1.04k|}
janet.c:marshal_one_def:
18799|   318k|static void marshal_one_def(MarshalState *st, JanetFuncDef *def, int flags) {
18800|   318k|    MARSH_STACKCHECK;
  ------------------
  |  |18732|   318k|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  291|   318k|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (18732:30): [True: 0, False: 318k]
  |  |  ------------------
  ------------------
18801|   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.10k]
  |  |  ------------------
  ------------------
  |  Branch (18801:25): [True: 320M, False: 316k]
  ------------------
18802|   320M|        if (st->seen_defs[i] == def) {
  ------------------
  |  Branch (18802:13): [True: 1.36k, False: 320M]
  ------------------
18803|  1.36k|            pushbyte(st, LB_FUNCDEF_REF);
18804|  1.36k|            pushint(st, i);
18805|  1.36k|            return;
18806|  1.36k|        }
18807|   320M|    }
18808|       |    /* Add to lookup */
18809|   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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18810|       |
18811|   316k|    pushint(st, def->flags);
18812|   316k|    pushint(st, def->slotcount);
18813|   316k|    pushint(st, def->arity);
18814|   316k|    pushint(st, def->min_arity);
18815|   316k|    pushint(st, def->max_arity);
18816|   316k|    pushint(st, def->constants_length);
18817|   316k|    pushint(st, def->bytecode_length);
18818|   316k|    if (def->flags & JANET_FUNCDEF_FLAG_NAMEDARGS)
  ------------------
  |  | 1098|   316k|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (18818:9): [True: 684, False: 315k]
  ------------------
18819|    684|        pushint(st, def->named_args_count);
18820|   316k|    if (def->flags & JANET_FUNCDEF_FLAG_HASENVS)
  ------------------
  |  | 1094|   316k|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (18820:9): [True: 305k, False: 11.3k]
  ------------------
18821|   305k|        pushint(st, def->environments_length);
18822|   316k|    if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS)
  ------------------
  |  | 1093|   316k|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (18822:9): [True: 119k, False: 196k]
  ------------------
18823|   119k|        pushint(st, def->defs_length);
18824|   316k|    if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP)
  ------------------
  |  | 1090|   316k|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (18824:9): [True: 178k, False: 138k]
  ------------------
18825|   178k|        pushint(st, def->symbolmap_length);
18826|   316k|    if (def->flags & JANET_FUNCDEF_FLAG_HASNAME)
  ------------------
  |  | 1091|   316k|#define JANET_FUNCDEF_FLAG_HASNAME 0x80000
  ------------------
  |  Branch (18826:9): [True: 304k, False: 12.3k]
  ------------------
18827|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18828|   316k|    if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCE)
  ------------------
  |  | 1092|   316k|#define JANET_FUNCDEF_FLAG_HASSOURCE 0x100000
  ------------------
  |  Branch (18828:9): [True: 305k, False: 11.3k]
  ------------------
18829|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18830|       |
18831|       |    /* marshal constants */
18832|  1.11M|    for (int32_t i = 0; i < def->constants_length; i++)
  ------------------
  |  Branch (18832:25): [True: 799k, False: 316k]
  ------------------
18833|   799k|        marshal_one(st, def->constants[i], flags + 1);
18834|       |
18835|       |    /* Marshal symbol map, if needed */
18836|  2.63M|    for (int32_t i = 0; i < def->symbolmap_length; i++) {
  ------------------
  |  Branch (18836:25): [True: 2.31M, False: 316k]
  ------------------
18837|  2.31M|        pushint(st, (int32_t) def->symbolmap[i].birth_pc);
18838|  2.31M|        pushint(st, (int32_t) def->symbolmap[i].death_pc);
18839|  2.31M|        pushint(st, (int32_t) def->symbolmap[i].slot_index);
18840|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18841|  2.31M|    }
18842|       |
18843|       |    /* marshal the bytecode */
18844|   316k|    janet_marshal_u32s(st, def->bytecode, def->bytecode_length);
18845|       |
18846|       |    /* marshal the environments if needed */
18847|   384k|    for (int32_t i = 0; i < def->environments_length; i++)
  ------------------
  |  Branch (18847:25): [True: 67.3k, False: 316k]
  ------------------
18848|  67.3k|        pushint(st, def->environments[i]);
18849|       |
18850|       |    /* marshal the sub funcdefs if needed */
18851|   498k|    for (int32_t i = 0; i < def->defs_length; i++)
  ------------------
  |  Branch (18851:25): [True: 181k, False: 316k]
  ------------------
18852|   181k|        marshal_one_def(st, def->defs[i], flags + 1);
18853|       |
18854|       |    /* marshal source maps if needed */
18855|   316k|    if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCEMAP) {
  ------------------
  |  | 1095|   316k|#define JANET_FUNCDEF_FLAG_HASSOURCEMAP 0x800000
  ------------------
  |  Branch (18855:9): [True: 305k, False: 11.3k]
  ------------------
18856|   305k|        int32_t current = 0;
18857|  5.95M|        for (int32_t i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (18857:29): [True: 5.65M, False: 305k]
  ------------------
18858|  5.65M|            JanetSourceMapping map = def->sourcemap[i];
18859|  5.65M|            pushint(st, map.line - current);
18860|  5.65M|            pushint(st, map.column);
18861|  5.65M|            current = map.line;
18862|  5.65M|        }
18863|   305k|    }
18864|       |
18865|       |    /* Marshal closure bitset, if needed */
18866|   316k|    if (def->flags & JANET_FUNCDEF_FLAG_HASCLOBITSET) {
  ------------------
  |  | 1097|   316k|#define JANET_FUNCDEF_FLAG_HASCLOBITSET 0x2000000
  ------------------
  |  Branch (18866:9): [True: 20.1k, False: 296k]
  ------------------
18867|  20.1k|        janet_marshal_u32s(st, def->closure_bitset, ((def->slotcount + 31) >> 5));
18868|  20.1k|    }
18869|   316k|}
janet.c:janet_marshal_u32s:
18789|   336k|static void janet_marshal_u32s(MarshalState *st, const uint32_t *u32s, int32_t n) {
18790|  6.14M|    for (int32_t i = 0; i < n; i++) {
  ------------------
  |  Branch (18790:25): [True: 5.80M, False: 336k]
  ------------------
18791|  5.80M|        pushbyte(st, u32s[i] & 0xFF);
18792|  5.80M|        pushbyte(st, (u32s[i] >> 8) & 0xFF);
18793|  5.80M|        pushbyte(st, (u32s[i] >> 16) & 0xFF);
18794|  5.80M|        pushbyte(st, (u32s[i] >> 24) & 0xFF);
18795|  5.80M|    }
18796|   336k|}
janet.c:marshal_one_env:
18748|  14.7k|static void marshal_one_env(MarshalState *st, JanetFuncEnv *env, int flags) {
18749|  14.7k|    MARSH_STACKCHECK;
  ------------------
  |  |18732|  14.7k|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  291|  14.7k|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (18732:30): [True: 0, False: 14.7k]
  |  |  ------------------
  ------------------
18750|  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 (18750:25): [True: 81.7k, False: 2.73k]
  ------------------
18751|  81.7k|        if (st->seen_envs[i] == env) {
  ------------------
  |  Branch (18751:13): [True: 11.9k, False: 69.7k]
  ------------------
18752|  11.9k|            pushbyte(st, LB_FUNCENV_REF);
18753|  11.9k|            pushint(st, i);
18754|  11.9k|            return;
18755|  11.9k|        }
18756|  81.7k|    }
18757|  2.73k|    janet_env_valid(env);
18758|  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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18759|       |
18760|       |    /* Special case for early detachment */
18761|  2.73k|    if (env->offset > 0 && fiber_cannot_be_marshalled(env->as.fiber)) {
  ------------------
  |  Branch (18761:9): [True: 0, False: 2.73k]
  |  Branch (18761:28): [True: 0, False: 0]
  ------------------
18762|      0|        pushint(st, 0);
18763|      0|        pushint(st, env->length);
18764|      0|        Janet *values = env->as.fiber->data + env->offset;
18765|      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
  |  |  ------------------
  ------------------
18766|      0|        for (int32_t i = 0; i < env->length; i++) {
  ------------------
  |  Branch (18766:29): [True: 0, False: 0]
  ------------------
18767|      0|            if (1 & (bitset[i >> 5] >> (i & 0x1F))) {
  ------------------
  |  Branch (18767:17): [True: 0, False: 0]
  ------------------
18768|      0|                marshal_one(st, values[i], flags + 1);
18769|      0|            } else {
18770|      0|                pushbyte(st, LB_NIL);
18771|      0|            }
18772|      0|        }
18773|  2.73k|    } else {
18774|  2.73k|        janet_env_maybe_detach(env);
18775|  2.73k|        pushint(st, env->offset);
18776|  2.73k|        pushint(st, env->length);
18777|  2.73k|        if (env->offset > 0) {
  ------------------
  |  Branch (18777:13): [True: 0, False: 2.73k]
  ------------------
18778|       |            /* On stack variant */
18779|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18780|  2.73k|        } else {
18781|       |            /* Off stack variant */
18782|  35.5k|            for (int32_t i = 0; i < env->length; i++)
  ------------------
  |  Branch (18782:33): [True: 32.8k, False: 2.73k]
  ------------------
18783|  32.8k|                marshal_one(st, env->as.values[i], flags + 1);
18784|  2.73k|        }
18785|  2.73k|    }
18786|  2.73k|}
janet.c:marshal_one_fiber:
18876|    343|static void marshal_one_fiber(MarshalState *st, JanetFiber *fiber, int flags) {
18877|    343|    MARSH_STACKCHECK;
  ------------------
  |  |18732|    343|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  291|    343|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (18732:30): [True: 0, False: 343]
  |  |  ------------------
  ------------------
18878|    343|    int32_t fflags = fiber->flags;
18879|    343|    if (fiber->child) fflags |= JANET_FIBER_FLAG_HASCHILD;
  ------------------
  |  |18871|      0|#define JANET_FIBER_FLAG_HASCHILD (1 << 29)
  ------------------
  |  Branch (18879:9): [True: 0, False: 343]
  ------------------
18880|    343|    if (fiber->env) fflags |= JANET_FIBER_FLAG_HASENV;
  ------------------
  |  |18872|    343|#define JANET_FIBER_FLAG_HASENV   (1 << 30)
  ------------------
  |  Branch (18880:9): [True: 343, False: 0]
  ------------------
18881|    343|    if (janet_fiber_status(fiber) == JANET_STATUS_ALIVE)
  ------------------
  |  Branch (18881:9): [True: 0, False: 343]
  ------------------
18882|      0|        janet_panic("cannot marshal alive fiber");
18883|    343|    pushint(st, fflags);
18884|    343|    pushint(st, fiber->frame);
18885|    343|    pushint(st, fiber->stackstart);
18886|    343|    pushint(st, fiber->stacktop);
18887|    343|    pushint(st, fiber->maxstack);
18888|       |    /* Do frames */
18889|    343|    int32_t i = fiber->frame;
18890|    343|    int32_t j = fiber->stackstart - JANET_FRAME_SIZE;
  ------------------
  |  | 1017|    343|#define JANET_FRAME_SIZE 4
  ------------------
18891|    686|    while (i > 0) {
  ------------------
  |  Branch (18891:12): [True: 343, False: 343]
  ------------------
18892|    343|        JanetStackFrame *frame = (JanetStackFrame *)(fiber->data + i - JANET_FRAME_SIZE);
  ------------------
  |  | 1017|    343|#define JANET_FRAME_SIZE 4
  ------------------
18893|    343|        if (frame->env) frame->flags |= JANET_STACKFRAME_HASENV;
  ------------------
  |  |18873|      0|#define JANET_STACKFRAME_HASENV   (INT32_MIN)
  ------------------
  |  Branch (18893:13): [True: 0, False: 343]
  ------------------
18894|    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 (18894:13): [True: 0, False: 343]
  ------------------
18895|    343|        pushint(st, frame->flags);
18896|    343|        pushint(st, frame->prevframe);
18897|    343|        int32_t pcdiff = (int32_t)(frame->pc - frame->func->def->bytecode);
18898|    343|        pushint(st, pcdiff);
18899|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18900|    343|        if (frame->env) marshal_one_env(st, frame->env, flags + 1);
  ------------------
  |  Branch (18900:13): [True: 0, False: 343]
  ------------------
18901|       |        /* Marshal all values in the stack frame */
18902|   136k|        for (int32_t k = i; k < j; k++)
  ------------------
  |  Branch (18902:29): [True: 136k, False: 343]
  ------------------
18903|   136k|            marshal_one(st, fiber->data[k], flags + 1);
18904|    343|        j = i - JANET_FRAME_SIZE;
  ------------------
  |  | 1017|    343|#define JANET_FRAME_SIZE 4
  ------------------
18905|    343|        i = frame->prevframe;
18906|    343|    }
18907|    343|    if (fiber->env) {
  ------------------
  |  Branch (18907:9): [True: 343, False: 0]
  ------------------
18908|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18909|    343|    }
18910|    343|    if (fiber->child)
  ------------------
  |  Branch (18910:9): [True: 0, False: 343]
  ------------------
18911|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18912|    343|    marshal_one(st, fiber->last_value, flags + 1);
18913|    343|}
janet.c:readint:
19265|   523M|static int32_t readint(UnmarshalState *st, const uint8_t **atdata) {
19266|   523M|    const uint8_t *data = *atdata;
19267|   523M|    int32_t ret;
19268|   523M|    MARSH_EOS(st, data);
  ------------------
  |  |19260|   523M|#define MARSH_EOS(st, data) do { \
  |  |19261|   523M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19261:9): [True: 1, False: 523M]
  |  |  ------------------
  |  |19262|   523M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19262:10): [Folded, False: 523M]
  |  |  ------------------
  ------------------
19269|   523M|    if (*data < 128) {
  ------------------
  |  Branch (19269:9): [True: 425M, False: 97.7M]
  ------------------
19270|   425M|        ret = *data++;
19271|   425M|    } else if (*data < 192) {
  ------------------
  |  Branch (19271:16): [True: 92.9M, False: 4.81M]
  ------------------
19272|  92.9M|        MARSH_EOS(st, data + 1);
  ------------------
  |  |19260|  92.9M|#define MARSH_EOS(st, data) do { \
  |  |19261|  92.9M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19261:9): [True: 0, False: 92.9M]
  |  |  ------------------
  |  |19262|  92.9M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19262:10): [Folded, False: 92.9M]
  |  |  ------------------
  ------------------
19273|  92.9M|        uint32_t uret = ((data[0] & 0x3F) << 8) + data[1];
19274|       |        /* Sign extend 18 MSBs */
19275|  92.9M|        uret |= (uret >> 13) ? 0xFFFFC000 : 0;
  ------------------
  |  Branch (19275:17): [True: 24.9M, False: 67.9M]
  ------------------
19276|  92.9M|        ret = (int32_t)uret;
19277|  92.9M|        data += 2;
19278|  92.9M|    } else if (*data == LB_INTEGER) {
  ------------------
  |  Branch (19278:16): [True: 5.86M, False: 18.4E]
  ------------------
19279|  5.86M|        MARSH_EOS(st, data + 4);
  ------------------
  |  |19260|  5.86M|#define MARSH_EOS(st, data) do { \
  |  |19261|  5.86M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19261:9): [True: 1, False: 5.86M]
  |  |  ------------------
  |  |19262|  5.86M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19262:10): [Folded, False: 5.86M]
  |  |  ------------------
  ------------------
19280|  5.86M|        uint32_t ui = ((uint32_t)(data[1]) << 24) |
19281|  5.86M|                      ((uint32_t)(data[2]) << 16) |
19282|  5.86M|                      ((uint32_t)(data[3]) << 8) |
19283|  5.86M|                      (uint32_t)(data[4]);
19284|  5.86M|        ret = (int32_t)ui;
19285|  5.86M|        data += 5;
19286|  18.4E|    } else {
19287|  18.4E|        janet_panicf("expected integer, got byte %x at index %d",
19288|  18.4E|                     *data,
19289|  18.4E|                     data - st->start);
19290|      0|        ret = 0;
19291|      0|    }
19292|   524M|    *atdata = data;
19293|   524M|    return ret;
19294|   523M|}
janet.c:read64:
19306|  1.04k|static uint64_t read64(UnmarshalState *st, const uint8_t **atdata) {
19307|  1.04k|    uint64_t ret;
19308|  1.04k|    const uint8_t *data = *atdata;
19309|  1.04k|    MARSH_EOS(st, data);
  ------------------
  |  |19260|  1.04k|#define MARSH_EOS(st, data) do { \
  |  |19261|  1.04k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19261:9): [True: 0, False: 1.04k]
  |  |  ------------------
  |  |19262|  1.04k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19262:10): [Folded, False: 1.04k]
  |  |  ------------------
  ------------------
19310|  1.04k|    if (*data <= 0xF0) {
  ------------------
  |  Branch (19310:9): [True: 10, False: 1.03k]
  ------------------
19311|       |        /* Single byte */
19312|     10|        ret = *data;
19313|     10|        *atdata = data + 1;
19314|  1.03k|    } else {
19315|       |        /* Multibyte, little endian */
19316|  1.03k|        int nbytes = *data - 0xF0;
19317|  1.03k|        ret = 0;
19318|  1.03k|        if (nbytes > 8) janet_panic("invalid 64 bit integer");
  ------------------
  |  Branch (19318:13): [True: 0, False: 1.03k]
  ------------------
19319|  1.03k|        MARSH_EOS(st, data + nbytes);
  ------------------
  |  |19260|  1.03k|#define MARSH_EOS(st, data) do { \
  |  |19261|  1.03k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19261:9): [True: 0, False: 1.03k]
  |  |  ------------------
  |  |19262|  1.03k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19262:10): [Folded, False: 1.03k]
  |  |  ------------------
  ------------------
19320|  3.09k|        for (int i = nbytes; i > 0; i--)
  ------------------
  |  Branch (19320:30): [True: 2.06k, False: 1.03k]
  ------------------
19321|  2.06k|            ret = (ret << 8) + data[i];
19322|  1.03k|        *atdata = data + nbytes + 1;
19323|  1.03k|    }
19324|  1.04k|    return ret;
19325|  1.04k|}
janet.c:unmarshal_one:
19873|   139M|    int flags) {
19874|   139M|    uint8_t lead;
19875|   139M|    MARSH_STACKCHECK;
  ------------------
  |  |18732|   139M|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  291|   139M|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (18732:30): [True: 0, False: 139M]
  |  |  ------------------
  ------------------
19876|   139M|    MARSH_EOS(st, data);
  ------------------
  |  |19260|   139M|#define MARSH_EOS(st, data) do { \
  |  |19261|   139M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19261:9): [True: 2, False: 139M]
  |  |  ------------------
  |  |19262|   139M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19262:10): [Folded, False: 139M]
  |  |  ------------------
  ------------------
19877|   139M|    lead = data[0];
19878|   139M|    if (lead < LB_REAL) {
  ------------------
  |  Branch (19878:9): [True: 10.3M, False: 128M]
  ------------------
19879|  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)
  |  |  ------------------
  ------------------
19880|  10.3M|        return data;
19881|  10.3M|    }
19882|   128M|    switch (lead) {
19883|   579k|        case LB_NIL:
  ------------------
  |  Branch (19883:9): [True: 579k, False: 128M]
  ------------------
19884|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19885|   579k|            return data + 1;
19886|    101|        case LB_FALSE:
  ------------------
  |  Branch (19886:9): [True: 101, False: 128M]
  ------------------
19887|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19888|    101|            return data + 1;
19889|   990k|        case LB_TRUE:
  ------------------
  |  Branch (19889:9): [True: 990k, False: 127M]
  ------------------
19890|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19891|   990k|            return data + 1;
19892|  22.5k|        case LB_INTEGER:
  ------------------
  |  Branch (19892:9): [True: 22.5k, False: 128M]
  ------------------
19893|       |            /* Long integer */
19894|  22.5k|            MARSH_EOS(st, data + 4);
  ------------------
  |  |19260|  22.5k|#define MARSH_EOS(st, data) do { \
  |  |19261|  22.5k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19261:9): [True: 0, False: 22.5k]
  |  |  ------------------
  |  |19262|  22.5k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19262:10): [Folded, False: 22.5k]
  |  |  ------------------
  ------------------
19895|  22.5k|            uint32_t ui = ((uint32_t)(data[4])) |
19896|  22.5k|                          ((uint32_t)(data[3]) << 8) |
19897|  22.5k|                          ((uint32_t)(data[2]) << 16) |
19898|  22.5k|                          ((uint32_t)(data[1]) << 24);
19899|  22.5k|            int32_t si = (int32_t)ui;
19900|  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)
  |  |  ------------------
  ------------------
19901|  22.5k|            return data + 5;
19902|  52.5k|        case LB_REAL:
  ------------------
  |  Branch (19902:9): [True: 52.5k, False: 128M]
  ------------------
19903|       |            /* Real */
19904|  52.5k|        {
19905|  52.5k|            union {
19906|  52.5k|                double d;
19907|  52.5k|                uint8_t bytes[8];
19908|  52.5k|            } u;
19909|  52.5k|            MARSH_EOS(st, data + 8);
  ------------------
  |  |19260|  52.5k|#define MARSH_EOS(st, data) do { \
  |  |19261|  52.5k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19261:9): [True: 3, False: 52.5k]
  |  |  ------------------
  |  |19262|  52.5k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19262:10): [Folded, False: 52.5k]
  |  |  ------------------
  ------------------
19910|       |#ifdef JANET_BIG_ENDIAN
19911|       |            u.bytes[0] = data[8];
19912|       |            u.bytes[1] = data[7];
19913|       |            u.bytes[2] = data[6];
19914|       |            u.bytes[3] = data[5];
19915|       |            u.bytes[4] = data[4];
19916|       |            u.bytes[5] = data[3];
19917|       |            u.bytes[6] = data[2];
19918|       |            u.bytes[7] = data[1];
19919|       |#else
19920|  52.5k|            memcpy(&u.bytes, data + 1, sizeof(double));
19921|  52.5k|#endif
19922|  52.5k|            *out = janet_wrap_number_safe(u.d);
19923|  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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19924|  52.5k|            return data + 9;
19925|  52.5k|        }
19926|  11.0M|        case LB_STRING:
  ------------------
  |  Branch (19926:9): [True: 11.0M, False: 117M]
  ------------------
19927|  25.7M|        case LB_SYMBOL:
  ------------------
  |  Branch (19927:9): [True: 14.7M, False: 114M]
  ------------------
19928|  25.7M|        case LB_BUFFER:
  ------------------
  |  Branch (19928:9): [True: 7.50k, False: 128M]
  ------------------
19929|  27.5M|        case LB_KEYWORD:
  ------------------
  |  Branch (19929:9): [True: 1.77M, False: 127M]
  ------------------
19930|  30.0M|        case LB_REGISTRY: {
  ------------------
  |  Branch (19930:9): [True: 2.54M, False: 126M]
  ------------------
19931|  30.0M|            data++;
19932|  30.0M|            int32_t len = readnat(st, &data);
19933|  30.0M|            MARSH_EOS(st, data - 1 + len);
  ------------------
  |  |19260|  30.0M|#define MARSH_EOS(st, data) do { \
  |  |19261|  30.0M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19261:9): [True: 3, False: 30.0M]
  |  |  ------------------
  |  |19262|  30.0M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19262:10): [Folded, False: 30.0M]
  |  |  ------------------
  ------------------
19934|  30.0M|            if (lead == LB_STRING) {
  ------------------
  |  Branch (19934:17): [True: 11.0M, False: 19.0M]
  ------------------
19935|  11.0M|                const uint8_t *str = janet_string(data, len);
19936|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19937|  19.0M|            } else if (lead == LB_SYMBOL) {
  ------------------
  |  Branch (19937:24): [True: 14.7M, False: 4.33M]
  ------------------
19938|  14.7M|                const uint8_t *str = janet_symbol(data, len);
19939|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19940|  14.7M|            } else if (lead == LB_KEYWORD) {
  ------------------
  |  Branch (19940:24): [True: 1.77M, False: 2.55M]
  ------------------
19941|  1.77M|                const uint8_t *str = janet_keyword(data, len);
  ------------------
  |  | 1830|  1.77M|#define janet_keyword janet_symbol
  ------------------
19942|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19943|  2.55M|            } else if (lead == LB_REGISTRY) {
  ------------------
  |  Branch (19943:24): [True: 2.54M, False: 14.2k]
  ------------------
19944|  2.54M|                if (st->reg) {
  ------------------
  |  Branch (19944:21): [True: 2.54M, False: 1]
  ------------------
19945|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19946|  2.54M|                    *out = janet_table_get(st->reg, regkey);
19947|  2.54M|                } else {
19948|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19949|      1|                }
19950|  2.54M|            } else { /* (lead == LB_BUFFER) */
19951|  14.2k|                JanetBuffer *buffer = janet_buffer(len);
19952|  14.2k|                buffer->count = len;
19953|  14.2k|                safe_memcpy(buffer->data, data, len);
19954|  14.2k|                *out = janet_wrap_buffer(buffer);
  ------------------
  |  |  842|  14.2k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|  14.2k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19955|  14.2k|            }
19956|  30.0M|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  706|  30.0M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  30.0M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  30.0M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  30.0M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  30.0M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  30.0M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  30.0M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 11.3k, False: 30.0M]
  |  |  |  |  |  |  |  Branch (717:50): [True: 91.2k, False: 29.9M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #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.0M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  30.0M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19957|  30.0M|            return data + len;
19958|  30.0M|        }
19959|    354|        case LB_FIBER: {
  ------------------
  |  Branch (19959:9): [True: 354, False: 128M]
  ------------------
19960|    354|            JanetFiber *fiber;
19961|    354|            data = unmarshal_one_fiber(st, data + 1, &fiber, flags + 1);
19962|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19963|    354|            return data;
19964|  30.0M|        }
19965|  2.88M|        case LB_FUNCTION: {
  ------------------
  |  Branch (19965:9): [True: 2.88M, False: 126M]
  ------------------
19966|  2.88M|            JanetFunction *func;
19967|  2.88M|            JanetFuncDef *def;
19968|  2.88M|            data++;
19969|  2.88M|            int32_t len = readnat(st, &data);
19970|  2.88M|            if (len > 255) {
  ------------------
  |  Branch (19970:17): [True: 1, False: 2.88M]
  ------------------
19971|      1|                janet_panicf("invalid function - too many environments (%d)", len);
19972|      1|            }
19973|  2.88M|            func = janet_gcalloc(JANET_MEMORY_FUNCTION, sizeof(JanetFunction) +
19974|  2.88M|                                 len * sizeof(JanetFuncEnv));
19975|  2.88M|            func->def = NULL;
19976|  3.20M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (19976:33): [True: 322k, False: 2.88M]
  ------------------
19977|   322k|                func->envs[i] = NULL;
19978|   322k|            }
19979|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19980|  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: 113, False: 2.88M]
  |  |  |  |  |  |  |  Branch (717:50): [True: 648, 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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19981|  2.88M|            data = unmarshal_one_def(st, data, &def, flags + 1);
19982|  2.88M|            func->def = def;
19983|  3.20M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (19983:33): [True: 322k, False: 2.88M]
  ------------------
19984|   322k|                data = unmarshal_one_env(st, data, &(func->envs[i]), flags + 1);
19985|   322k|            }
19986|  2.88M|            return data;
19987|  2.88M|        }
19988|  1.04k|        case LB_ABSTRACT: {
  ------------------
  |  Branch (19988:9): [True: 1.04k, False: 128M]
  ------------------
19989|  1.04k|            data++;
19990|  1.04k|            return unmarshal_one_abstract(st, data, out, flags);
19991|  2.88M|        }
19992|  83.7M|        case LB_REFERENCE:
  ------------------
  |  Branch (19992:9): [True: 83.7M, False: 45.1M]
  ------------------
19993|  83.7M|        case LB_ARRAY:
  ------------------
  |  Branch (19993:9): [True: 22.5k, False: 128M]
  ------------------
19994|  83.7M|        case LB_ARRAY_WEAK:
  ------------------
  |  Branch (19994:9): [True: 12, False: 128M]
  ------------------
19995|  89.3M|        case LB_TUPLE:
  ------------------
  |  Branch (19995:9): [True: 5.63M, False: 123M]
  ------------------
19996|  89.4M|        case LB_STRUCT:
  ------------------
  |  Branch (19996:9): [True: 52.5k, False: 128M]
  ------------------
19997|  89.4M|        case LB_STRUCT_PROTO:
  ------------------
  |  Branch (19997:9): [True: 8, False: 128M]
  ------------------
19998|  94.8M|        case LB_TABLE:
  ------------------
  |  Branch (19998:9): [True: 5.47M, False: 123M]
  ------------------
19999|  94.8M|        case LB_TABLE_PROTO:
  ------------------
  |  Branch (19999:9): [True: 3, False: 128M]
  ------------------
20000|  94.8M|        case LB_TABLE_WEAKK:
  ------------------
  |  Branch (20000:9): [True: 2, False: 128M]
  ------------------
20001|  94.8M|        case LB_TABLE_WEAKV:
  ------------------
  |  Branch (20001:9): [True: 19, False: 128M]
  ------------------
20002|  94.8M|        case LB_TABLE_WEAKKV:
  ------------------
  |  Branch (20002:9): [True: 5, False: 128M]
  ------------------
20003|  94.8M|        case LB_TABLE_WEAKK_PROTO:
  ------------------
  |  Branch (20003:9): [True: 4, False: 128M]
  ------------------
20004|  94.8M|        case LB_TABLE_WEAKV_PROTO:
  ------------------
  |  Branch (20004:9): [True: 1, False: 128M]
  ------------------
20005|  94.8M|        case LB_TABLE_WEAKKV_PROTO:
  ------------------
  |  Branch (20005:9): [True: 1, False: 128M]
  ------------------
20006|       |            /* Things that open with integers */
20007|  94.8M|        {
20008|  94.8M|            data++;
20009|  94.8M|            int32_t len = readnat(st, &data);
20010|       |            /* DOS check */
20011|  94.8M|            if (lead != LB_REFERENCE) {
  ------------------
  |  Branch (20011:17): [True: 11.1M, False: 83.7M]
  ------------------
20012|  11.1M|                MARSH_EOS(st, data - 1 + len);
  ------------------
  |  |19260|  11.1M|#define MARSH_EOS(st, data) do { \
  |  |19261|  11.1M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19261:9): [True: 1, False: 11.1M]
  |  |  ------------------
  |  |19262|  11.1M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19262:10): [Folded, False: 11.1M]
  |  |  ------------------
  ------------------
20013|  11.1M|            }
20014|  94.8M|            if (lead == LB_ARRAY || lead == LB_ARRAY_WEAK) {
  ------------------
  |  Branch (20014:17): [True: 156k, False: 94.7M]
  |  Branch (20014:37): [True: 18.4E, False: 94.7M]
  ------------------
20015|       |                /* Array */
20016|  22.5k|                JanetArray *array = (lead == LB_ARRAY_WEAK) ? janet_array_weak(len) : janet_array(len);
  ------------------
  |  Branch (20016:37): [True: 10, False: 22.5k]
  ------------------
20017|  22.5k|                array->count = len;
20018|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20019|  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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20020|   195k|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (20020:37): [True: 172k, False: 22.5k]
  ------------------
20021|   172k|                    data = unmarshal_one(st, data, array->data + i, flags + 1);
20022|   172k|                }
20023|  94.8M|            } else if (lead == LB_TUPLE) {
  ------------------
  |  Branch (20023:24): [True: 5.63M, False: 89.2M]
  ------------------
20024|       |                /* Tuple */
20025|  5.63M|                Janet *tup = janet_tuple_begin(len);
20026|  5.63M|                int32_t flag = readint(st, &data);
20027|  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)))
  |  |  ------------------
  ------------------
20028|  22.2M|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (20028:37): [True: 16.6M, False: 5.63M]
  ------------------
20029|  16.6M|                    data = unmarshal_one(st, data, tup + i, flags + 1);
20030|  16.6M|                }
20031|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20032|  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: 3.75k, False: 5.63M]
  |  |  |  |  |  |  |  Branch (717:50): [True: 468, False: 5.62M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20033|  89.2M|            } else if (lead == LB_STRUCT || lead == LB_STRUCT_PROTO) {
  ------------------
  |  Branch (20033:24): [True: 127k, False: 89.1M]
  |  Branch (20033:45): [True: 18.4E, False: 89.1M]
  ------------------
20034|       |                /* Struct */
20035|  52.5k|                JanetKV *struct_ = janet_struct_begin(len);
20036|  52.5k|                if (lead == LB_STRUCT_PROTO) {
  ------------------
  |  Branch (20036:21): [True: 7, False: 52.5k]
  ------------------
20037|      7|                    Janet proto;
20038|      7|                    data = unmarshal_one(st, data, &proto, flags + 1);
20039|      7|                    janet_asserttype(proto, JANET_STRUCT, st);
20040|      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))
  ------------------
20041|      7|                }
20042|   390k|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (20042:37): [True: 337k, False: 52.5k]
  ------------------
20043|   337k|                    Janet key, value;
20044|   337k|                    data = unmarshal_one(st, data, &key, flags + 1);
20045|   337k|                    data = unmarshal_one(st, data, &value, flags + 1);
20046|   337k|                    janet_struct_put(struct_, key, value);
20047|   337k|                }
20048|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20049|  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: 10, 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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20050|  89.1M|            } else if (lead == LB_REFERENCE) {
  ------------------
  |  Branch (20050:24): [True: 83.6M, False: 5.49M]
  ------------------
20051|  83.6M|                if (len >= janet_v_count(st->lookup))
  ------------------
  |  |  708|  83.6M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  83.6M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  83.6M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 83.6M, False: 1.19k]
  |  |  ------------------
  ------------------
  |  Branch (20051:21): [True: 0, False: 83.6M]
  ------------------
20052|      0|                    janet_panicf("invalid reference %d", len);
20053|  83.6M|                *out = st->lookup[len];
20054|  83.6M|            } else {
20055|       |                /* Table */
20056|  5.49M|                JanetTable *t;
20057|  5.49M|                if (lead == LB_TABLE_WEAKK_PROTO || lead == LB_TABLE_WEAKK) {
  ------------------
  |  Branch (20057:21): [True: 23.3k, False: 5.47M]
  |  Branch (20057:53): [True: 1, False: 5.47M]
  ------------------
20058|      5|                    t = janet_table_weakk(len);
20059|  5.49M|                } else if (lead == LB_TABLE_WEAKV_PROTO || lead == LB_TABLE_WEAKV) {
  ------------------
  |  Branch (20059:28): [True: 23.3k, False: 5.47M]
  |  Branch (20059:60): [True: 14, False: 5.47M]
  ------------------
20060|     19|                    t = janet_table_weakv(len);
20061|  5.49M|                } else if (lead == LB_TABLE_WEAKKV_PROTO || lead == LB_TABLE_WEAKKV) {
  ------------------
  |  Branch (20061:28): [True: 23.3k, False: 5.47M]
  |  Branch (20061:61): [True: 18.4E, False: 5.47M]
  ------------------
20062|      6|                    t = janet_table_weakkv(len);
20063|  5.49M|                } else {
20064|  5.49M|                    t = janet_table(len);
20065|  5.49M|                }
20066|  5.49M|                *out = janet_wrap_table(t);
  ------------------
  |  |  841|  5.49M|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|  5.49M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  5.49M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  5.49M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20067|  5.49M|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  706|  5.49M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  5.49M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  5.49M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  5.46M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  5.46M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  5.46M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  5.46M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 27.8k, False: 5.46M]
  |  |  |  |  |  |  |  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.49M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  5.49M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20068|  5.49M|                if (lead == LB_TABLE_PROTO || lead == LB_TABLE_WEAKK_PROTO || lead == LB_TABLE_WEAKV_PROTO || lead == LB_TABLE_WEAKKV_PROTO) {
  ------------------
  |  Branch (20068:21): [True: 20.1k, False: 5.47M]
  |  Branch (20068:47): [True: 1, False: 5.47M]
  |  Branch (20068:79): [True: 1, False: 5.47M]
  |  Branch (20068:111): [True: 204, False: 5.47M]
  ------------------
20069|      7|                    Janet proto;
20070|      7|                    data = unmarshal_one(st, data, &proto, flags + 1);
20071|      7|                    janet_asserttype(proto, JANET_TABLE, st);
20072|      7|                    t->proto = janet_unwrap_table(proto);
  ------------------
  |  |  856|      7|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
20073|      7|                }
20074|  33.2M|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (20074:37): [True: 27.7M, False: 5.49M]
  ------------------
20075|  27.7M|                    Janet key, value;
20076|  27.7M|                    data = unmarshal_one(st, data, &key, flags + 1);
20077|  27.7M|                    data = unmarshal_one(st, data, &value, flags + 1);
20078|  27.7M|                    janet_table_put(t, key, value);
20079|  27.7M|                }
20080|  5.49M|            }
20081|  94.8M|            return data;
20082|  94.8M|        }
20083|  4.41k|        case LB_UNSAFE_POINTER: {
  ------------------
  |  Branch (20083:9): [True: 4.41k, False: 128M]
  ------------------
20084|  4.41k|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |19260|  4.41k|#define MARSH_EOS(st, data) do { \
  |  |19261|  4.41k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19261:9): [True: 0, False: 4.41k]
  |  |  ------------------
  |  |19262|  4.41k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19262:10): [Folded, False: 4.41k]
  |  |  ------------------
  ------------------
20085|  4.41k|            data++;
20086|  4.41k|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1901|  4.41k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (20086:17): [True: 0, False: 4.41k]
  ------------------
20087|      0|                janet_panicf("unsafe flag not given, "
20088|      0|                             "will not unmarshal raw pointer at index %d",
20089|      0|                             (int)(data - st->start));
20090|      0|            }
20091|  4.41k|            union {
20092|  4.41k|                void *ptr;
20093|  4.41k|                uint8_t bytes[sizeof(void *)];
20094|  4.41k|            } u;
20095|  4.41k|            memcpy(u.bytes, data, sizeof(void *));
20096|  4.41k|            data += sizeof(void *);
20097|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20098|  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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20099|  4.41k|            return data;
20100|  4.41k|        }
20101|      0|#ifdef JANET_EV
20102|      1|        case LB_POINTER_BUFFER: {
  ------------------
  |  Branch (20102:9): [True: 1, False: 128M]
  ------------------
20103|      1|            data++;
20104|      1|            int32_t count = readnat(st, &data);
20105|      1|            int32_t capacity = readnat(st, &data);
20106|      1|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |19260|      1|#define MARSH_EOS(st, data) do { \
  |  |19261|      1|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19261:9): [True: 0, False: 1]
  |  |  ------------------
  |  |19262|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (19262:10): [Folded, False: 1]
  |  |  ------------------
  ------------------
20107|      1|            union {
20108|      1|                void *ptr;
20109|      1|                uint8_t bytes[sizeof(void *)];
20110|      1|            } u;
20111|      1|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1901|      1|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (20111:17): [True: 1, False: 0]
  ------------------
20112|      1|                janet_panicf("unsafe flag not given, "
20113|      1|                             "will not unmarshal raw pointer at index %d",
20114|      1|                             (int)(data - st->start));
20115|      1|            }
20116|      0|            memcpy(u.bytes, data, sizeof(void *));
20117|      0|            data += sizeof(void *);
20118|      0|            JanetBuffer *buffer = janet_pointer_buffer_unsafe(u.ptr, capacity, count);
20119|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20120|      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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20121|      0|            return data;
20122|      1|        }
20123|      0|#endif
20124|   120k|        case LB_UNSAFE_CFUNCTION: {
  ------------------
  |  Branch (20124:9): [True: 120k, False: 128M]
  ------------------
20125|   120k|            MARSH_EOS(st, data + sizeof(JanetCFunction));
  ------------------
  |  |19260|   120k|#define MARSH_EOS(st, data) do { \
  |  |19261|   120k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19261:9): [True: 0, False: 120k]
  |  |  ------------------
  |  |19262|   120k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19262:10): [Folded, False: 120k]
  |  |  ------------------
  ------------------
20126|   120k|            data++;
20127|   120k|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1901|   120k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (20127:17): [True: 0, False: 120k]
  ------------------
20128|      0|                janet_panicf("unsafe flag not given, "
20129|      0|                             "will not unmarshal function pointer at index %d",
20130|      0|                             (int)(data - st->start));
20131|      0|            }
20132|   120k|            union {
20133|   120k|                JanetCFunction ptr;
20134|   120k|                uint8_t bytes[sizeof(JanetCFunction)];
20135|   120k|            } u;
20136|   120k|            memcpy(u.bytes, data, sizeof(JanetCFunction));
20137|   120k|            data += sizeof(JanetCFunction);
20138|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20139|   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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20140|   120k|            return data;
20141|   120k|        }
20142|      0|#ifdef JANET_EV
20143|      1|        case LB_THREADED_ABSTRACT: {
  ------------------
  |  Branch (20143:9): [True: 1, False: 128M]
  ------------------
20144|      1|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |19260|      1|#define MARSH_EOS(st, data) do { \
  |  |19261|      1|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19261:9): [True: 1, False: 0]
  |  |  ------------------
  |  |19262|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (19262:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
20145|      0|            data++;
20146|      0|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1901|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (20146:17): [True: 0, False: 0]
  ------------------
20147|      0|                janet_panicf("unsafe flag not given, "
20148|      0|                             "will not unmarshal threaded abstract pointer at index %d",
20149|      0|                             (int)(data - st->start));
20150|      0|            }
20151|      0|            union {
20152|      0|                void *ptr;
20153|      0|                uint8_t bytes[sizeof(void *)];
20154|      0|            } u;
20155|      0|            memcpy(u.bytes, data, sizeof(void *));
20156|      0|            data += sizeof(void *);
20157|       |
20158|      0|            if (flags & JANET_MARSHAL_DECREF) {
  ------------------
  |  |  384|      0|#define JANET_MARSHAL_DECREF 0x40000
  ------------------
  |  Branch (20158:17): [True: 0, False: 0]
  ------------------
20159|       |                /* Decrement immediately and don't bother putting into heap */
20160|      0|                janet_abstract_decref(u.ptr);
20161|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20162|      0|            } else {
20163|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20164|      0|                Janet check = janet_table_get(&janet_vm.threaded_abstracts, *out);
20165|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20166|       |                    /* Transfers reference from threaded channel buffer to current heap */
20167|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20168|      0|                } else {
20169|       |                    /* Heap reference already accounted for, remove threaded channel reference. */
20170|      0|                    janet_abstract_decref(u.ptr);
20171|      0|                }
20172|      0|            }
20173|       |
20174|      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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20175|      0|            return data;
20176|      0|        }
20177|      0|#endif
20178|      4|        default: {
  ------------------
  |  Branch (20178:9): [True: 4, False: 128M]
  ------------------
20179|      4|            janet_panicf("unknown byte %x at index %d",
20180|      4|                         *data,
20181|      4|                         (int)(data - st->start));
20182|      0|            return NULL;
20183|      0|        }
20184|   128M|    }
20185|   128M|}
janet.c:readnat:
19297|   160M|static int32_t readnat(UnmarshalState *st, const uint8_t **atdata) {
19298|   160M|    int32_t ret = readint(st, atdata);
19299|   160M|    if (ret < 0) {
  ------------------
  |  Branch (19299:9): [True: 8, False: 160M]
  ------------------
19300|      8|        janet_panicf("expected integer >= 0, got %d", ret);
19301|      8|    }
19302|   160M|    return ret;
19303|   160M|}
janet.c:unmarshal_one_fiber:
19616|    354|    int flags) {
19617|       |
19618|       |    /* Initialize a new fiber with gc friendly defaults */
19619|    354|    JanetFiber *fiber = janet_gcalloc(JANET_MEMORY_FIBER, sizeof(JanetFiber));
19620|    354|    fiber->flags = 0;
19621|    354|    fiber->frame = 0;
19622|    354|    fiber->stackstart = 0;
19623|    354|    fiber->stacktop = 0;
19624|    354|    fiber->capacity = 0;
19625|    354|    fiber->maxstack = 0;
19626|    354|    fiber->data = NULL;
19627|    354|    fiber->child = NULL;
19628|    354|    fiber->env = NULL;
19629|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19630|    354|#ifdef JANET_EV
19631|    354|    fiber->sched_id = 0;
19632|    354|    fiber->supervisor_channel = NULL;
19633|    354|    fiber->ev_state = NULL;
19634|    354|    fiber->ev_callback = NULL;
19635|    354|    fiber->ev_stream = NULL;
19636|    354|#endif
19637|       |
19638|       |    /* Push fiber to seen stack */
19639|    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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19640|       |
19641|       |    /* Read ints */
19642|    354|    int32_t fiber_flags = readint(st, &data);
19643|    354|    int32_t frame = readnat(st, &data);
19644|    354|    int32_t fiber_stackstart = readnat(st, &data);
19645|    354|    int32_t fiber_stacktop = readnat(st, &data);
19646|    354|    int32_t fiber_maxstack = readnat(st, &data);
19647|    354|    JanetTable *fiber_env = NULL;
19648|       |
19649|       |    /* Check for bad flags and ints */
19650|    354|    if ((int32_t)(frame + JANET_FRAME_SIZE) > fiber_stackstart ||
  ------------------
  |  | 1017|    354|#define JANET_FRAME_SIZE 4
  ------------------
  |  Branch (19650:9): [True: 9, False: 345]
  ------------------
19651|    345|            fiber_stackstart > fiber_stacktop ||
  ------------------
  |  Branch (19651:13): [True: 1, False: 344]
  ------------------
19652|    344|            fiber_stacktop > fiber_maxstack) {
  ------------------
  |  Branch (19652:13): [True: 1, False: 343]
  ------------------
19653|      4|        janet_panic("fiber has incorrect stack setup");
19654|      4|    }
19655|       |
19656|       |    /* Allocate stack memory */
19657|    350|    if (fiber_stacktop < INT32_MAX - 10) {
  ------------------
  |  Branch (19657:9): [True: 343, False: 7]
  ------------------
19658|    343|        fiber->capacity = fiber_stacktop + 10;
19659|    343|    } else {
19660|       |        /* Extra capacity is usually nice to avoid immediately reallocing on pushed arguments, but not needed */
19661|      7|        fiber->capacity = INT32_MAX;
19662|      7|    }
19663|    350|    fiber->data = janet_malloc(sizeof(Janet) * fiber->capacity);
  ------------------
  |  | 2393|    350|#define janet_malloc(X) malloc((X))
  ------------------
19664|    350|    if (!fiber->data) {
  ------------------
  |  Branch (19664:9): [True: 0, False: 350]
  ------------------
19665|      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]
  |  |  ------------------
  ------------------
19666|      0|    }
19667|   142k|    for (int32_t i = 0; i < fiber->capacity; i++) {
  ------------------
  |  Branch (19667:25): [True: 142k, False: 350]
  ------------------
19668|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19669|   142k|    }
19670|       |
19671|       |    /* get frames */
19672|    350|    int32_t stack = frame;
19673|    350|    int32_t stacktop = fiber_stackstart - JANET_FRAME_SIZE;
  ------------------
  |  | 1017|    350|#define JANET_FRAME_SIZE 4
  ------------------
19674|    693|    while (stack > 0) {
  ------------------
  |  Branch (19674:12): [True: 343, False: 350]
  ------------------
19675|    343|        JanetFunction *func = NULL;
19676|    343|        JanetFuncDef *def = NULL;
19677|    343|        JanetFuncEnv *env = NULL;
19678|    343|        int32_t frameflags = readint(st, &data);
19679|    343|        int32_t prevframe = readnat(st, &data);
19680|    343|        int32_t pcdiff = readnat(st, &data);
19681|       |
19682|       |        /* Get frame items */
19683|    343|        Janet *framestack = fiber->data + stack;
19684|    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
  |  |  ------------------
  ------------------
19685|       |
19686|       |        /* Get function */
19687|    343|        Janet funcv;
19688|    343|        data = unmarshal_one(st, data, &funcv, flags + 1);
19689|    343|        janet_asserttype(funcv, JANET_FUNCTION, st);
19690|    343|        func = janet_unwrap_function(funcv);
  ------------------
  |  |  863|    343|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
19691|    343|        def = func->def;
19692|       |
19693|       |        /* Check env */
19694|    343|        if (frameflags & JANET_STACKFRAME_HASENV) {
  ------------------
  |  |18873|    343|#define JANET_STACKFRAME_HASENV   (INT32_MIN)
  ------------------
  |  Branch (19694:13): [True: 0, False: 343]
  ------------------
19695|      0|            frameflags &= ~JANET_STACKFRAME_HASENV;
  ------------------
  |  |18873|      0|#define JANET_STACKFRAME_HASENV   (INT32_MIN)
  ------------------
19696|      0|            data = unmarshal_one_env(st, data, &env, flags + 1);
19697|      0|        }
19698|       |
19699|       |        /* Error checking */
19700|    343|        int32_t expected_framesize = def->slotcount;
19701|    343|        if (expected_framesize != stacktop - stack) {
  ------------------
  |  Branch (19701:13): [True: 0, False: 343]
  ------------------
19702|      0|            janet_panic("fiber stackframe size mismatch");
19703|      0|        }
19704|    343|        if (pcdiff >= def->bytecode_length) {
  ------------------
  |  Branch (19704:13): [True: 0, False: 343]
  ------------------
19705|      0|            janet_panic("fiber stackframe has invalid pc");
19706|      0|        }
19707|    343|        if ((int32_t)(prevframe + JANET_FRAME_SIZE) > stack) {
  ------------------
  |  | 1017|    343|#define JANET_FRAME_SIZE 4
  ------------------
  |  Branch (19707:13): [True: 0, False: 343]
  ------------------
19708|      0|            janet_panic("fiber stackframe does not align with previous frame");
19709|      0|        }
19710|       |
19711|       |        /* Get stack items */
19712|   136k|        for (int32_t i = stack; i < stacktop; i++)
  ------------------
  |  Branch (19712:33): [True: 136k, False: 343]
  ------------------
19713|   136k|            data = unmarshal_one(st, data, fiber->data + i, flags + 1);
19714|       |
19715|       |        /* Set frame */
19716|    343|        framep->env = env;
19717|    343|        framep->pc = def->bytecode + pcdiff;
19718|    343|        framep->prevframe = prevframe;
19719|    343|        framep->flags = frameflags;
19720|    343|        framep->func = func;
19721|       |
19722|       |        /* Goto previous frame */
19723|    343|        stacktop = stack - JANET_FRAME_SIZE;
  ------------------
  |  | 1017|    343|#define JANET_FRAME_SIZE 4
  ------------------
19724|    343|        stack = prevframe;
19725|    343|    }
19726|    350|    if (stack < 0) {
  ------------------
  |  Branch (19726:9): [True: 0, False: 350]
  ------------------
19727|      0|        janet_panic("fiber has too many stackframes");
19728|      0|    }
19729|       |
19730|       |    /* Check for fiber env */
19731|    350|    if (fiber_flags & JANET_FIBER_FLAG_HASENV) {
  ------------------
  |  |18872|    350|#define JANET_FIBER_FLAG_HASENV   (1 << 30)
  ------------------
  |  Branch (19731:9): [True: 343, False: 7]
  ------------------
19732|    343|        Janet envv;
19733|    343|        fiber_flags &= ~JANET_FIBER_FLAG_HASENV;
  ------------------
  |  |18872|    343|#define JANET_FIBER_FLAG_HASENV   (1 << 30)
  ------------------
19734|    343|        data = unmarshal_one(st, data, &envv, flags + 1);
19735|    343|        janet_asserttype(envv, JANET_TABLE, st);
19736|    343|        fiber_env = janet_unwrap_table(envv);
  ------------------
  |  |  856|    343|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
19737|    343|    }
19738|       |
19739|       |    /* Check for child fiber */
19740|    350|    if (fiber_flags & JANET_FIBER_FLAG_HASCHILD) {
  ------------------
  |  |18871|    350|#define JANET_FIBER_FLAG_HASCHILD (1 << 29)
  ------------------
  |  Branch (19740:9): [True: 0, False: 350]
  ------------------
19741|      0|        Janet fiberv;
19742|      0|        fiber_flags &= ~JANET_FIBER_FLAG_HASCHILD;
  ------------------
  |  |18871|      0|#define JANET_FIBER_FLAG_HASCHILD (1 << 29)
  ------------------
19743|      0|        data = unmarshal_one(st, data, &fiberv, flags + 1);
19744|      0|        janet_asserttype(fiberv, JANET_FIBER, st);
19745|      0|        fiber->child = janet_unwrap_fiber(fiberv);
  ------------------
  |  |  854|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
19746|      0|    }
19747|       |
19748|       |    /* Get the fiber last value */
19749|    350|    data = unmarshal_one(st, data, &fiber->last_value, flags + 1);
19750|       |
19751|       |    /* We have valid fiber, finally construct remaining fields. */
19752|    350|    fiber->frame = frame;
19753|    350|    fiber->flags = fiber_flags;
19754|    350|    fiber->stackstart = fiber_stackstart;
19755|    350|    fiber->stacktop = fiber_stacktop;
19756|    350|    fiber->maxstack = fiber_maxstack;
19757|    350|    fiber->env = fiber_env;
19758|       |
19759|    350|    int status = janet_fiber_status(fiber);
19760|    350|    if (status < 0 || status > JANET_STATUS_ALIVE) {
  ------------------
  |  Branch (19760:9): [True: 7, False: 343]
  |  Branch (19760:23): [True: 0, False: 343]
  ------------------
19761|      0|        janet_panic("invalid fiber status");
19762|      0|    }
19763|       |
19764|       |    /* Return data */
19765|    350|    *out = fiber;
19766|    350|    return data;
19767|    350|}
janet.c:unmarshal_one_def:
19436|  4.15M|    int flags) {
19437|  4.15M|    MARSH_EOS(st, data);
  ------------------
  |  |19260|  4.15M|#define MARSH_EOS(st, data) do { \
  |  |19261|  4.15M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19261:9): [True: 0, False: 4.15M]
  |  |  ------------------
  |  |19262|  4.15M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19262:10): [Folded, False: 4.15M]
  |  |  ------------------
  ------------------
19438|  4.15M|    if (*data == LB_FUNCDEF_REF) {
  ------------------
  |  Branch (19438:9): [True: 30.0k, False: 4.12M]
  ------------------
19439|  30.0k|        data++;
19440|  30.0k|        int32_t index = readint(st, &data);
19441|  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 (19441:13): [True: 0, False: 30.0k]
  |  Branch (19441:26): [True: 0, False: 30.0k]
  ------------------
19442|      0|            janet_panicf("invalid funcdef reference %d", index);
19443|  30.0k|        *out = st->lookup_defs[index];
19444|  4.12M|    } else {
19445|       |        /* Initialize with values that will not break garbage collection
19446|       |         * if unmarshalling fails. */
19447|  4.12M|        JanetFuncDef *def = janet_gcalloc(JANET_MEMORY_FUNCDEF, sizeof(JanetFuncDef));
19448|  4.12M|        def->environments_length = 0;
19449|  4.12M|        def->defs_length = 0;
19450|  4.12M|        def->constants_length = 0;
19451|  4.12M|        def->bytecode_length = 0;
19452|  4.12M|        def->name = NULL;
19453|  4.12M|        def->source = NULL;
19454|  4.12M|        def->closure_bitset = NULL;
19455|  4.12M|        def->defs = NULL;
19456|  4.12M|        def->environments = NULL;
19457|  4.12M|        def->constants = NULL;
19458|  4.12M|        def->bytecode = NULL;
19459|  4.12M|        def->sourcemap = NULL;
19460|  4.12M|        def->symbolmap = NULL;
19461|  4.12M|        def->symbolmap_length = 0;
19462|  4.12M|        def->named_args_count = 0;
19463|  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.70k, False: 4.11M]
  |  |  |  |  |  |  |  Branch (717:50): [True: 75.4k, 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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19464|       |
19465|       |        /* Set default lengths to zero */
19466|  4.12M|        int32_t bytecode_length = 0;
19467|  4.12M|        int32_t constants_length = 0;
19468|  4.12M|        int32_t environments_length = 0;
19469|  4.12M|        int32_t defs_length = 0;
19470|  4.12M|        int32_t symbolmap_length = 0;
19471|       |
19472|       |        /* Read flags and other fixed values */
19473|  4.12M|        def->flags = readint(st, &data);
19474|  4.12M|        def->slotcount = readnat(st, &data);
19475|  4.12M|        def->arity = readnat(st, &data);
19476|  4.12M|        def->min_arity = readnat(st, &data);
19477|  4.12M|        def->max_arity = readnat(st, &data);
19478|       |
19479|       |        /* Read some lengths */
19480|  4.12M|        constants_length = readnat(st, &data);
19481|  4.12M|        bytecode_length = readnat(st, &data);
19482|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_NAMEDARGS)
  ------------------
  |  | 1098|  4.12M|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (19482:13): [True: 15.0k, False: 4.10M]
  ------------------
19483|  15.0k|            def->named_args_count = readnat(st, &data);
19484|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASENVS)
  ------------------
  |  | 1094|  4.12M|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (19484:13): [True: 3.87M, False: 248k]
  ------------------
19485|  3.87M|            environments_length = readnat(st, &data);
19486|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS)
  ------------------
  |  | 1093|  4.12M|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (19486:13): [True: 594k, False: 3.52M]
  ------------------
19487|   594k|            defs_length = readnat(st, &data);
19488|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP)
  ------------------
  |  | 1090|  4.12M|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (19488:13): [True: 3.72M, False: 395k]
  ------------------
19489|  3.72M|            symbolmap_length = readnat(st, &data);
19490|       |
19491|       |        /* Check name and source (optional) */
19492|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASNAME) {
  ------------------
  |  | 1091|  4.12M|#define JANET_FUNCDEF_FLAG_HASNAME 0x80000
  ------------------
  |  Branch (19492:13): [True: 3.85M, False: 271k]
  ------------------
19493|  3.85M|            Janet x;
19494|  3.85M|            data = unmarshal_one(st, data, &x, flags + 1);
19495|  3.85M|            janet_asserttype(x, JANET_STRING, st);
19496|  3.85M|            def->name = janet_unwrap_string(x);
  ------------------
  |  |  858|  3.85M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
19497|  3.85M|        }
19498|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCE) {
  ------------------
  |  | 1092|  4.12M|#define JANET_FUNCDEF_FLAG_HASSOURCE 0x100000
  ------------------
  |  Branch (19498:13): [True: 3.87M, False: 248k]
  ------------------
19499|  3.87M|            Janet x;
19500|  3.87M|            data = unmarshal_one(st, data, &x, flags + 1);
19501|  3.87M|            janet_asserttype(x, JANET_STRING, st);
19502|  3.87M|            def->source = janet_unwrap_string(x);
  ------------------
  |  |  858|  3.87M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
19503|  3.87M|        }
19504|       |
19505|       |        /* Unmarshal constants */
19506|  4.12M|        if (constants_length) {
  ------------------
  |  Branch (19506:13): [True: 3.08M, False: 1.03M]
  ------------------
19507|  3.08M|            def->constants = janet_malloc(sizeof(Janet) * constants_length);
  ------------------
  |  | 2393|  3.08M|#define janet_malloc(X) malloc((X))
  ------------------
19508|  3.08M|            if (!def->constants) {
  ------------------
  |  Branch (19508:17): [True: 0, False: 3.08M]
  ------------------
19509|      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]
  |  |  ------------------
  ------------------
19510|      0|            }
19511|  19.9M|            for (int32_t i = 0; i < constants_length; i++)
  ------------------
  |  Branch (19511:33): [True: 16.8M, False: 3.08M]
  ------------------
19512|  16.8M|                data = unmarshal_one(st, data, def->constants + i, flags + 1);
19513|  3.08M|        } else {
19514|  1.03M|            def->constants = NULL;
19515|  1.03M|        }
19516|  4.12M|        def->constants_length = constants_length;
19517|       |
19518|       |        /* Unmarshal symbol map, if needed */
19519|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP) {
  ------------------
  |  | 1090|  4.12M|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (19519:13): [True: 3.73M, False: 394k]
  ------------------
19520|  3.73M|            size_t size = sizeof(JanetSymbolMap) * symbolmap_length;
19521|  3.73M|            def->symbolmap = janet_malloc(size);
  ------------------
  |  | 2393|  3.73M|#define janet_malloc(X) malloc((X))
  ------------------
19522|  3.73M|            if (def->symbolmap == NULL) {
  ------------------
  |  Branch (19522:17): [True: 0, False: 3.73M]
  ------------------
19523|      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]
  |  |  ------------------
  ------------------
19524|      0|            }
19525|  45.4M|            for (int32_t i = 0; i < symbolmap_length; i++) {
  ------------------
  |  Branch (19525:33): [True: 41.6M, False: 3.73M]
  ------------------
19526|  41.6M|                def->symbolmap[i].birth_pc = (uint32_t) readint(st, &data);
19527|  41.6M|                def->symbolmap[i].death_pc = (uint32_t) readint(st, &data);
19528|  41.6M|                def->symbolmap[i].slot_index = (uint32_t) readint(st, &data);
19529|  41.6M|                Janet value;
19530|  41.6M|                data = unmarshal_one(st, data, &value, flags + 1);
19531|  41.6M|                if (!janet_checktype(value, JANET_SYMBOL)) {
  ------------------
  |  |  801|  41.6M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 41.6M]
  |  |  ------------------
  |  |  802|  41.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|  41.6M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  41.6M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  41.6M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  41.6M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  41.6M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (19531:21): [True: 0, False: 41.6M]
  ------------------
19532|      0|                    janet_panicf("corrupted symbolmap when unmarshalling debug info, got %v", value);
19533|      0|                }
19534|  41.6M|                def->symbolmap[i].symbol = janet_unwrap_symbol(value);
  ------------------
  |  |  859|  41.6M|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
19535|  41.6M|            }
19536|  3.73M|            def->symbolmap_length = (uint32_t) symbolmap_length;
19537|  3.73M|        }
19538|       |
19539|       |        /* Unmarshal bytecode */
19540|  4.12M|        def->bytecode = janet_malloc(sizeof(uint32_t) * bytecode_length);
  ------------------
  |  | 2393|  4.12M|#define janet_malloc(X) malloc((X))
  ------------------
19541|  4.12M|        if (!def->bytecode) {
  ------------------
  |  Branch (19541:13): [True: 0, False: 4.12M]
  ------------------
19542|      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]
  |  |  ------------------
  ------------------
19543|      0|        }
19544|  4.12M|        data = janet_unmarshal_u32s(st, data, def->bytecode, bytecode_length);
19545|  4.12M|        def->bytecode_length = bytecode_length;
19546|       |
19547|       |        /* Unmarshal environments */
19548|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASENVS) {
  ------------------
  |  | 1094|  4.12M|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (19548:13): [True: 3.87M, False: 247k]
  ------------------
19549|  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))
  ------------------
19550|  3.87M|            if (!def->environments) {
  ------------------
  |  Branch (19550:17): [True: 0, False: 3.87M]
  ------------------
19551|      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]
  |  |  ------------------
  ------------------
19552|      0|            }
19553|  5.35M|            for (int32_t i = 0; i < environments_length; i++) {
  ------------------
  |  Branch (19553:33): [True: 1.47M, False: 3.87M]
  ------------------
19554|  1.47M|                def->environments[i] = readint(st, &data);
19555|  1.47M|            }
19556|  3.87M|        } else {
19557|   247k|            def->environments = NULL;
19558|   247k|        }
19559|  4.12M|        def->environments_length = environments_length;
19560|       |
19561|       |        /* Unmarshal sub funcdefs */
19562|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS) {
  ------------------
  |  | 1093|  4.12M|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (19562:13): [True: 594k, False: 3.52M]
  ------------------
19563|   594k|            def->defs = janet_calloc(1, sizeof(JanetFuncDef *) * (size_t) defs_length);
  ------------------
  |  | 2399|   594k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
19564|   594k|            if (!def->defs) {
  ------------------
  |  Branch (19564:17): [True: 0, False: 594k]
  ------------------
19565|      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]
  |  |  ------------------
  ------------------
19566|      0|            }
19567|  1.86M|            for (int32_t i = 0; i < defs_length; i++) {
  ------------------
  |  Branch (19567:33): [True: 1.27M, False: 594k]
  ------------------
19568|  1.27M|                data = unmarshal_one_def(st, data, def->defs + i, flags + 1);
19569|  1.27M|            }
19570|  3.52M|        } else {
19571|  3.52M|            def->defs = NULL;
19572|  3.52M|        }
19573|  4.12M|        def->defs_length = defs_length;
19574|       |
19575|       |        /* Unmarshal source maps if needed */
19576|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCEMAP) {
  ------------------
  |  | 1095|  4.12M|#define JANET_FUNCDEF_FLAG_HASSOURCEMAP 0x800000
  ------------------
  |  Branch (19576:13): [True: 3.87M, False: 247k]
  ------------------
19577|  3.87M|            int32_t current = 0;
19578|  3.87M|            def->sourcemap = janet_malloc(sizeof(JanetSourceMapping) * (size_t) bytecode_length);
  ------------------
  |  | 2393|  3.87M|#define janet_malloc(X) malloc((X))
  ------------------
19579|  3.87M|            if (!def->sourcemap) {
  ------------------
  |  Branch (19579:17): [True: 0, False: 3.87M]
  ------------------
19580|      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]
  |  |  ------------------
  ------------------
19581|      0|            }
19582|   113M|            for (int32_t i = 0; i < bytecode_length; i++) {
  ------------------
  |  Branch (19582:33): [True: 109M, False: 3.87M]
  ------------------
19583|   109M|                current += readint(st, &data);
19584|   109M|                def->sourcemap[i].line = current;
19585|   109M|                def->sourcemap[i].column = readint(st, &data);
19586|   109M|            }
19587|  3.87M|        } else {
19588|   247k|            def->sourcemap = NULL;
19589|   247k|        }
19590|       |
19591|       |        /* Unmarshal closure bitset if needed */
19592|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASCLOBITSET) {
  ------------------
  |  | 1097|  4.12M|#define JANET_FUNCDEF_FLAG_HASCLOBITSET 0x2000000
  ------------------
  |  Branch (19592:13): [True: 442k, False: 3.68M]
  ------------------
19593|   442k|            int32_t n = (def->slotcount + 31) >> 5;
19594|   442k|            def->closure_bitset = janet_malloc(sizeof(uint32_t) * (size_t) n);
  ------------------
  |  | 2393|   442k|#define janet_malloc(X) malloc((X))
  ------------------
19595|   442k|            if (NULL == def->closure_bitset) {
  ------------------
  |  Branch (19595:17): [True: 0, False: 442k]
  ------------------
19596|      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]
  |  |  ------------------
  ------------------
19597|      0|            }
19598|   442k|            data = janet_unmarshal_u32s(st, data, def->closure_bitset, n);
19599|   442k|        }
19600|       |
19601|       |        /* Validate */
19602|  4.12M|        if (janet_verify(def))
  ------------------
  |  Branch (19602:13): [True: 0, False: 4.12M]
  ------------------
19603|      0|            janet_panic("funcdef has invalid bytecode");
19604|       |
19605|       |        /* Set def */
19606|  4.12M|        *out = def;
19607|  4.12M|    }
19608|  4.15M|    return data;
19609|  4.15M|}
janet.c:janet_unmarshal_u32s:
19418|  4.56M|static const uint8_t *janet_unmarshal_u32s(UnmarshalState *st, const uint8_t *data, uint32_t *into, int32_t n) {
19419|   117M|    for (int32_t i = 0; i < n; i++) {
  ------------------
  |  Branch (19419:25): [True: 113M, False: 4.56M]
  ------------------
19420|   113M|        MARSH_EOS(st, data + 3);
  ------------------
  |  |19260|   113M|#define MARSH_EOS(st, data) do { \
  |  |19261|   113M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19261:9): [True: 0, False: 113M]
  |  |  ------------------
  |  |19262|   113M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19262:10): [Folded, False: 113M]
  |  |  ------------------
  ------------------
19421|   113M|        into[i] =
19422|   113M|            (uint32_t)(data[0]) |
19423|   113M|            ((uint32_t)(data[1]) << 8) |
19424|   113M|            ((uint32_t)(data[2]) << 16) |
19425|   113M|            ((uint32_t)(data[3]) << 24);
19426|   113M|        data += 4;
19427|   113M|    }
19428|  4.56M|    return data;
19429|  4.56M|}
janet.c:unmarshal_one_env:
19374|   322k|    int flags) {
19375|   322k|    MARSH_EOS(st, data);
  ------------------
  |  |19260|   322k|#define MARSH_EOS(st, data) do { \
  |  |19261|   322k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19261:9): [True: 0, False: 322k]
  |  |  ------------------
  |  |19262|   322k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19262:10): [Folded, False: 322k]
  |  |  ------------------
  ------------------
19376|   322k|    if (*data == LB_FUNCENV_REF) {
  ------------------
  |  Branch (19376:9): [True: 262k, False: 60.0k]
  ------------------
19377|   262k|        data++;
19378|   262k|        int32_t index = readint(st, &data);
19379|   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 (19379:13): [True: 1, False: 262k]
  |  Branch (19379:26): [True: 0, False: 262k]
  ------------------
19380|      0|            janet_panicf("invalid funcenv reference %d", index);
19381|   262k|        *out = st->lookup_envs[index];
19382|   262k|    } else {
19383|  60.0k|        JanetFuncEnv *env = janet_gcalloc(JANET_MEMORY_FUNCENV, sizeof(JanetFuncEnv));
19384|  60.0k|        env->length = 0;
19385|  60.0k|        env->offset = 0;
19386|  60.0k|        env->as.values = NULL;
19387|  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.49k, 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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19388|  60.0k|        int32_t offset = readnat(st, &data);
19389|  60.0k|        int32_t length = readnat(st, &data);
19390|  60.0k|        if (offset > 0) {
  ------------------
  |  Branch (19390:13): [True: 0, False: 60.0k]
  ------------------
19391|      0|            Janet fiberv;
19392|       |            /* On stack variant */
19393|      0|            data = unmarshal_one(st, data, &fiberv, flags);
19394|      0|            janet_asserttype(fiberv, JANET_FIBER, st);
19395|      0|            env->as.fiber = janet_unwrap_fiber(fiberv);
  ------------------
  |  |  854|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
19396|       |            /* Negative offset indicates untrusted input */
19397|      0|            env->offset = -offset;
19398|  60.0k|        } else {
19399|       |            /* Off stack variant */
19400|  60.0k|            if (length == 0) {
  ------------------
  |  Branch (19400:17): [True: 0, False: 60.0k]
  ------------------
19401|      0|                janet_panic("invalid funcenv length");
19402|      0|            }
19403|  60.0k|            env->as.values = janet_malloc(sizeof(Janet) * (size_t) length);
  ------------------
  |  | 2393|  60.0k|#define janet_malloc(X) malloc((X))
  ------------------
19404|  60.0k|            if (!env->as.values) {
  ------------------
  |  Branch (19404:17): [True: 0, False: 60.0k]
  ------------------
19405|      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]
  |  |  ------------------
  ------------------
19406|      0|            }
19407|  60.0k|            env->offset = 0;
19408|   780k|            for (int32_t i = 0; i < length; i++)
  ------------------
  |  Branch (19408:33): [True: 720k, False: 60.0k]
  ------------------
19409|   720k|                data = unmarshal_one(st, data, env->as.values + i, flags);
19410|  60.0k|        }
19411|  60.0k|        env->length = length;
19412|  60.0k|        *out = env;
19413|  60.0k|    }
19414|   322k|    return data;
19415|   322k|}
janet.c:unmarshal_one_abstract:
19851|  1.04k|static const uint8_t *unmarshal_one_abstract(UnmarshalState *st, const uint8_t *data, Janet *out, int flags) {
19852|  1.04k|    Janet key;
19853|  1.04k|    data = unmarshal_one(st, data, &key, flags + 1);
19854|  1.04k|    const JanetAbstractType *at = janet_get_abstract_type(key);
19855|  1.04k|    if (at == NULL) janet_panic("unknown abstract type");
  ------------------
  |  Branch (19855:9): [True: 1, False: 1.04k]
  ------------------
19856|  1.04k|    if (at->unmarshal) {
  ------------------
  |  Branch (19856:9): [True: 1.04k, False: 0]
  ------------------
19857|  1.04k|        JanetMarshalContext context = {NULL, st, flags, data, at};
19858|  1.04k|        void *abst = at->unmarshal(&context);
19859|  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]
  |  |  ------------------
  ------------------
19860|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19861|  1.04k|        if (context.at != NULL) {
  ------------------
  |  Branch (19861:13): [True: 0, False: 1.04k]
  ------------------
19862|      0|            janet_panic("janet_unmarshal_abstract not called");
19863|      0|        }
19864|  1.04k|        return context.data;
19865|  1.04k|    }
19866|      0|    janet_panic("invalid abstract type - no unmarshal function pointer");
19867|  1.04k|}
janet.c:janet_asserttype:
19336|  7.72M|static void janet_asserttype(Janet x, JanetType t, UnmarshalState *st) {
19337|  7.72M|    if (!janet_checktype(x, t)) {
  ------------------
  |  |  801|  7.72M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [True: 0, False: 7.72M]
  |  |  ------------------
  |  |  802|  7.72M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!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.72M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  7.72M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  7.72M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  7.72M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  7.72M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (19337:9): [True: 3, False: 7.72M]
  ------------------
19338|       |#ifdef JANET_MARSHAL_DEBUG
19339|       |        dump_reference_table(st);
19340|       |#else
19341|      3|        (void) st;
19342|      3|#endif
19343|      3|        janet_panicf("expected type %T, got %v", 1 << t, x);
19344|      3|    }
19345|  7.72M|}
janet.c:janet_rng_get:
20497|     10|static int janet_rng_get(void *p, Janet key, Janet *out) {
20498|     10|    (void) p;
20499|     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 (20499:9): [True: 1, False: 9]
  ------------------
20500|      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))
  ------------------
20501|     10|}
janet.c:janet_net_socknoblock:
20840|      6|static void janet_net_socknoblock(JSock s) {
20841|       |#ifdef JANET_WINDOWS
20842|       |    unsigned long arg = 1;
20843|       |    ioctlsocket(s, FIONBIO, &arg);
20844|       |#else
20845|       |#if !defined(SOCK_CLOEXEC) && defined(O_CLOEXEC)
20846|       |    int extra = O_CLOEXEC;
20847|       |#else
20848|      6|    int extra = 0;
20849|      6|#endif
20850|      6|    fcntl(s, F_SETFL, fcntl(s, F_GETFL, 0) | O_NONBLOCK | extra);
20851|       |#ifdef SO_NOSIGPIPE
20852|       |    int enable = 1;
20853|       |    setsockopt(s, SOL_SOCKET, SO_NOSIGPIPE, &enable, sizeof(int));
20854|       |#endif
20855|      6|#endif
20856|      6|}
janet.c:janet_get_sockettype:
21119|     21|static int janet_get_sockettype(Janet *argv, int32_t argc, int32_t n) {
21120|     21|    JanetKeyword stype = janet_optkeyword(argv, argc, n, NULL);
21121|     21|    int socktype = SOCK_DGRAM;
21122|     21|    if ((NULL == stype) || !janet_cstrcmp(stype, "stream")) {
  ------------------
  |  Branch (21122:9): [True: 10, False: 11]
  |  Branch (21122:28): [True: 0, False: 11]
  ------------------
21123|      9|        socktype = SOCK_STREAM;
21124|     12|    } else if (janet_cstrcmp(stype, "datagram")) {
  ------------------
  |  Branch (21124:16): [True: 11, False: 1]
  ------------------
21125|     11|        janet_panicf("expected socket type as :stream or :datagram, got %v", argv[n]);
21126|     11|    }
21127|     10|    return socktype;
21128|     21|}
janet.c:janet_get_addrinfo:
21133|      3|static struct addrinfo *janet_get_addrinfo(Janet *argv, int32_t offset, int socktype, int passive, int *is_unix, socklen_t *sizeout) {
21134|       |    /* Unix socket support - not yet supported on windows. */
21135|      3|#ifndef JANET_WINDOWS
21136|      3|    if (janet_keyeq(argv[offset], "unix")) {
  ------------------
  |  Branch (21136:9): [True: 0, False: 3]
  ------------------
21137|      0|        const char *path = janet_getcstring(argv, offset + 1);
21138|      0|        struct sockaddr_un *saddr = janet_calloc(1, sizeof(struct sockaddr_un));
  ------------------
  |  | 2399|      0|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
21139|      0|        if (saddr == NULL) {
  ------------------
  |  Branch (21139:13): [True: 0, False: 0]
  ------------------
21140|      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]
  |  |  ------------------
  ------------------
21141|      0|        }
21142|      0|        saddr->sun_family = AF_UNIX;
21143|      0|        size_t path_size = sizeof(saddr->sun_path);
21144|      0|        snprintf(saddr->sun_path, path_size, "%s", path);
21145|      0|        *sizeout = sizeof(struct sockaddr_un);
21146|      0|#ifdef JANET_LINUX
21147|      0|        if (path[0] == '@') {
  ------------------
  |  Branch (21147:13): [True: 0, False: 0]
  ------------------
21148|      0|            saddr->sun_path[0] = '\0';
21149|      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)))
  |  |  ------------------
  ------------------
21150|      0|        }
21151|      0|#endif
21152|      0|        *is_unix = 1;
21153|      0|        return (struct addrinfo *) saddr;
21154|      0|    }
21155|      3|#endif
21156|       |    /* Get host and port */
21157|      3|    char *host = (char *)janet_getcstring(argv, offset);
21158|      3|    char *port = NULL;
21159|      3|    if (janet_checkint(argv[offset + 1])) {
  ------------------
  |  Branch (21159:9): [True: 0, False: 3]
  ------------------
21160|      0|        port = (char *)janet_to_string(argv[offset + 1]);
21161|      3|    } else {
21162|      3|        port = (char *)janet_optcstring(argv, offset + 2, offset + 1, NULL);
21163|      3|    }
21164|       |    /* getaddrinfo */
21165|      3|    struct addrinfo *ai = NULL;
21166|      3|    struct addrinfo hints;
21167|      3|    memset(&hints, 0, sizeof(hints));
21168|      3|    hints.ai_family = AF_UNSPEC;
21169|      3|    hints.ai_socktype = socktype;
21170|      3|    hints.ai_flags = passive ? AI_PASSIVE : 0;
  ------------------
  |  Branch (21170:22): [True: 0, False: 3]
  ------------------
21171|      3|    int status = getaddrinfo(host, port, &hints, &ai);
21172|      3|    if (status) {
  ------------------
  |  Branch (21172:9): [True: 1, False: 2]
  ------------------
21173|      1|        janet_panicf("could not get address info: %s", gai_strerror(status));
21174|      1|    }
21175|      2|    *is_unix = 0;
21176|       |#ifdef JANET_WINDOWS
21177|       |    *sizeout = 0;
21178|       |#else
21179|      2|    *sizeout = sizeof(struct sockaddr_un);
21180|      2|#endif
21181|      2|    return ai;
21182|      3|}
janet.c:make_stream:
21982|      6|static JanetStream *make_stream(JSock handle, uint32_t flags) {
21983|      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
  ------------------
21984|      6|}
janet.c:get_signal_kw:
22808|      1|static int get_signal_kw(const Janet *argv, int32_t n) {
22809|      1|    JanetKeyword signal_kw = janet_getkeyword(argv, n);
22810|      1|    const struct keyword_signal *ptr = signal_keywords;
22811|      1|    while (ptr->keyword) {
  ------------------
  |  Branch (22811:12): [True: 0, False: 1]
  ------------------
22812|      0|        if (!janet_cstrcmp(signal_kw, ptr->keyword)) {
  ------------------
  |  Branch (22812:13): [True: 0, False: 0]
  ------------------
22813|      0|            return ptr->signal;
22814|      0|        }
22815|      0|        ptr++;
22816|      0|    }
22817|      1|    janet_panicf("undefined signal %v", argv[n]);
22818|      1|}
janet.c:os_execute_impl:
23204|      3|static Janet os_execute_impl(int32_t argc, Janet *argv, JanetExecuteMode mode) {
23205|      3|    janet_sandbox_assert(JANET_SANDBOX_SUBPROCESS);
  ------------------
  |  | 2014|      3|#define JANET_SANDBOX_SUBPROCESS 2
  ------------------
23206|      3|    janet_arity(argc, 1, 3);
23207|       |
23208|       |    /* Get flags */
23209|      3|    int is_spawn = mode == JANET_EXECUTE_SPAWN;
23210|      3|    uint64_t flags = 0;
23211|      3|    if (argc > 1) {
  ------------------
  |  Branch (23211:9): [True: 2, False: 1]
  ------------------
23212|      2|        flags = janet_getflags(argv, 1, "epxd");
23213|      2|    }
23214|       |
23215|       |    /* Get environment */
23216|      3|    int use_environ = !janet_flag_at(flags, 0);
  ------------------
  |  | 1986|      3|#define janet_flag_at(F, I) ((F) & ((1ULL) << (I)))
  ------------------
23217|      3|    EnvBlock envp = os_execute_env(argc, argv);
23218|       |
23219|       |    /* Get arguments */
23220|      3|    JanetView exargs = janet_getindexed(argv, 0);
23221|      3|    if (exargs.len < 1) {
  ------------------
  |  Branch (23221:9): [True: 0, False: 3]
  ------------------
23222|      0|        janet_panic("expected at least 1 command line argument");
23223|      0|    }
23224|       |
23225|       |    /* Optional stdio redirections */
23226|      3|    JanetAbstract orig_in = NULL, orig_out = NULL, orig_err = NULL;
23227|      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)
  ------------------
23228|      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)
  ------------------
23229|      3|    int stderr_is_stdout = 0;
23230|      3|    int pipe_errflag = 0; /* Track errors setting up pipes */
23231|      3|    int pipe_owner_flags = (is_spawn && (flags & 0x8)) ? JANET_PROC_ALLOW_ZOMBIE : 0;
  ------------------
  |  |22545|      0|#define JANET_PROC_ALLOW_ZOMBIE 128
  ------------------
  |  Branch (23231:29): [True: 0, False: 3]
  |  Branch (23231:41): [True: 0, False: 0]
  ------------------
23232|       |
23233|       |    /* Get optional redirections */
23234|      3|    if (argc > 2 && (mode != JANET_EXECUTE_EXEC)) {
  ------------------
  |  Branch (23234:9): [True: 0, False: 3]
  |  Branch (23234:21): [True: 0, False: 0]
  ------------------
23235|      0|        JanetDictView tab = janet_getdictionary(argv, 2);
23236|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23237|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23238|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23239|      0|        if (is_spawn && janet_keyeq(maybe_stdin, "pipe")) {
  ------------------
  |  Branch (23239:13): [True: 0, False: 0]
  |  Branch (23239:25): [True: 0, False: 0]
  ------------------
23240|      0|            new_in = make_pipes(&pipe_in, 1, &pipe_errflag);
23241|      0|            pipe_owner_flags |= JANET_PROC_OWNS_STDIN;
  ------------------
  |  |22542|      0|#define JANET_PROC_OWNS_STDIN 16
  ------------------
23242|      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 (23242:20): [True: 0, False: 0]
  ------------------
23243|      0|            new_in = janet_getjstream(&maybe_stdin, 0, &orig_in);
23244|      0|        }
23245|      0|        if (is_spawn && janet_keyeq(maybe_stdout, "pipe")) {
  ------------------
  |  Branch (23245:13): [True: 0, False: 0]
  |  Branch (23245:25): [True: 0, False: 0]
  ------------------
23246|      0|            new_out = make_pipes(&pipe_out, 0, &pipe_errflag);
23247|      0|            pipe_owner_flags |= JANET_PROC_OWNS_STDOUT;
  ------------------
  |  |22543|      0|#define JANET_PROC_OWNS_STDOUT 32
  ------------------
23248|      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 (23248:20): [True: 0, False: 0]
  ------------------
23249|      0|            new_out = janet_getjstream(&maybe_stdout, 0, &orig_out);
23250|      0|        }
23251|      0|        if (is_spawn && janet_keyeq(maybe_stderr, "pipe")) {
  ------------------
  |  Branch (23251:13): [True: 0, False: 0]
  |  Branch (23251:25): [True: 0, False: 0]
  ------------------
23252|      0|            new_err = make_pipes(&pipe_err, 0, &pipe_errflag);
23253|      0|            pipe_owner_flags |= JANET_PROC_OWNS_STDERR;
  ------------------
  |  |22544|      0|#define JANET_PROC_OWNS_STDERR 64
  ------------------
23254|      0|        } else if (janet_keyeq(maybe_stderr, "out")) {
  ------------------
  |  Branch (23254:20): [True: 0, False: 0]
  ------------------
23255|      0|            stderr_is_stdout = 1;
23256|      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 (23256:20): [True: 0, False: 0]
  ------------------
23257|      0|            new_err = janet_getjstream(&maybe_stderr, 0, &orig_err);
23258|      0|        }
23259|      0|    }
23260|       |
23261|       |    /* Optional working directory. Available for both os/execute and os/spawn. */
23262|      3|    const char *chdir_path = NULL;
23263|      3|    if (argc > 2) {
  ------------------
  |  Branch (23263:9): [True: 0, False: 3]
  ------------------
23264|      0|        JanetDictView tab = janet_getdictionary(argv, 2);
23265|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23266|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23267|      0|            chdir_path = (const char *) janet_unwrap_string(workdir);
  ------------------
  |  |  858|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
23268|       |#ifndef JANET_SPAWN_CHDIR
23269|       |            janet_panicf(":cd argument not supported on this system - %s", chdir_path);
23270|       |#endif
23271|      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 (23271:20): [True: 0, False: 0]
  ------------------
23272|      0|            janet_panicf("expected string for :cd argumnet, got %v", workdir);
23273|      0|        }
23274|      0|    }
23275|       |
23276|       |    /* Clean up if any of the pipes have any issues */
23277|      3|    if (pipe_errflag) {
  ------------------
  |  Branch (23277:9): [True: 0, False: 3]
  ------------------
23278|      0|        if (pipe_in != JANET_HANDLE_NONE) close_handle(pipe_in);
  ------------------
  |  |  433|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23278:13): [True: 0, False: 0]
  ------------------
23279|      0|        if (pipe_out != JANET_HANDLE_NONE) close_handle(pipe_out);
  ------------------
  |  |  433|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23279:13): [True: 0, False: 0]
  ------------------
23280|      0|        if (pipe_err != JANET_HANDLE_NONE) close_handle(pipe_err);
  ------------------
  |  |  433|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23280:13): [True: 0, False: 0]
  ------------------
23281|      0|        janet_panic("failed to create pipes");
23282|      0|    }
23283|       |
23284|       |#ifdef JANET_WINDOWS
23285|       |
23286|       |    HANDLE pHandle, tHandle;
23287|       |    SECURITY_ATTRIBUTES saAttr;
23288|       |    PROCESS_INFORMATION processInfo;
23289|       |    STARTUPINFO startupInfo;
23290|       |    LPCSTR lpCurrentDirectory = NULL;
23291|       |    memset(&saAttr, 0, sizeof(saAttr));
23292|       |    memset(&processInfo, 0, sizeof(processInfo));
23293|       |    memset(&startupInfo, 0, sizeof(startupInfo));
23294|       |    startupInfo.cb = sizeof(startupInfo);
23295|       |    startupInfo.dwFlags |= STARTF_USESTDHANDLES;
23296|       |    saAttr.nLength = sizeof(saAttr);
23297|       |
23298|       |    JanetBuffer *buf = os_exec_escape(exargs);
23299|       |    if (buf->count > 8191) {
23300|       |        if (pipe_in != JANET_HANDLE_NONE) CloseHandle(pipe_in);
23301|       |        if (pipe_out != JANET_HANDLE_NONE) CloseHandle(pipe_out);
23302|       |        if (pipe_err != JANET_HANDLE_NONE) CloseHandle(pipe_err);
23303|       |        janet_panic("command line string too long (max 8191 characters)");
23304|       |    }
23305|       |    const char *path = (const char *) janet_unwrap_string(exargs.items[0]);
23306|       |
23307|       |    if (chdir_path != NULL) {
23308|       |        lpCurrentDirectory = chdir_path;
23309|       |    }
23310|       |
23311|       |    /* Do IO redirection */
23312|       |
23313|       |    if (pipe_in != JANET_HANDLE_NONE) {
23314|       |        startupInfo.hStdInput = pipe_in;
23315|       |    } else if (new_in != JANET_HANDLE_NONE) {
23316|       |        startupInfo.hStdInput = new_in;
23317|       |    } else {
23318|       |        startupInfo.hStdInput = (HANDLE) _get_osfhandle(_fileno(stdin));
23319|       |    }
23320|       |
23321|       |    if (pipe_out != JANET_HANDLE_NONE) {
23322|       |        startupInfo.hStdOutput = pipe_out;
23323|       |    } else if (new_out != JANET_HANDLE_NONE) {
23324|       |        startupInfo.hStdOutput = new_out;
23325|       |    } else {
23326|       |        startupInfo.hStdOutput = (HANDLE) _get_osfhandle(_fileno(stdout));
23327|       |    }
23328|       |
23329|       |    if (pipe_err != JANET_HANDLE_NONE) {
23330|       |        startupInfo.hStdError = pipe_err;
23331|       |    } else if (new_err != NULL) {
23332|       |        startupInfo.hStdError = new_err;
23333|       |    } else if (stderr_is_stdout) {
23334|       |        startupInfo.hStdError = startupInfo.hStdOutput;
23335|       |    } else {
23336|       |        startupInfo.hStdError = (HANDLE) _get_osfhandle(_fileno(stderr));
23337|       |    }
23338|       |
23339|       |    int cp_failed = 0;
23340|       |    DWORD cp_error_code = 0;
23341|       |    if (!CreateProcess(janet_flag_at(flags, 1) ? NULL : path,
23342|       |                       (char *) buf->data, /* Single CLI argument */
23343|       |                       &saAttr, /* no proc inheritance */
23344|       |                       &saAttr, /* no thread inheritance */
23345|       |                       TRUE, /* handle inheritance */
23346|       |                       0, /* flags */
23347|       |                       use_environ ? NULL : envp, /* pass in environment */
23348|       |                       lpCurrentDirectory,
23349|       |                       &startupInfo,
23350|       |                       &processInfo)) {
23351|       |        cp_failed = 1;
23352|       |        cp_error_code = GetLastError();
23353|       |    }
23354|       |
23355|       |    if (pipe_in != JANET_HANDLE_NONE) CloseHandle(pipe_in);
23356|       |    if (pipe_out != JANET_HANDLE_NONE) CloseHandle(pipe_out);
23357|       |    if (pipe_err != JANET_HANDLE_NONE) CloseHandle(pipe_err);
23358|       |
23359|       |    os_execute_cleanup(envp, NULL);
23360|       |
23361|       |    if (cp_failed)  {
23362|       |        char msgbuf[256];
23363|       |        msgbuf[0] = '\0';
23364|       |        FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
23365|       |                      NULL,
23366|       |                      cp_error_code,
23367|       |                      MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
23368|       |                      msgbuf,
23369|       |                      sizeof(msgbuf),
23370|       |                      NULL);
23371|       |        if (!*msgbuf) snprintf(msgbuf, sizeof(msgbuf), "%" PRIu32, (uint32_t) cp_error_code);
23372|       |        char *c = msgbuf;
23373|       |        while (*c) {
23374|       |            if (*c == '\n' || *c == '\r') {
23375|       |                *c = '\0';
23376|       |                break;
23377|       |            }
23378|       |            c++;
23379|       |        }
23380|       |        janet_panicf("failed to create process: %s", janet_cstringv(msgbuf));
23381|       |    }
23382|       |
23383|       |    pHandle = processInfo.hProcess;
23384|       |    tHandle = processInfo.hThread;
23385|       |
23386|       |#else
23387|       |
23388|       |    /* Result */
23389|      3|    int status = 0;
23390|       |
23391|      3|    const char **child_argv = janet_smalloc(sizeof(char *) * ((size_t) exargs.len + 1));
23392|      3|    for (int32_t i = 0; i < exargs.len; i++)
  ------------------
  |  Branch (23392:25): [True: 0, False: 3]
  ------------------
23393|      0|        child_argv[i] = janet_getcstring(exargs.items, i);
23394|      3|    child_argv[exargs.len] = NULL;
23395|       |    /* Coerce to form that works for spawn. I'm fairly confident no implementation
23396|       |     * of posix_spawn would modify the argv array passed in. */
23397|      3|    char *const *cargv = (char *const *)child_argv;
23398|       |
23399|      3|    if (use_environ) {
  ------------------
  |  Branch (23399:9): [True: 0, False: 3]
  ------------------
23400|      0|        janet_lock_environ();
23401|      0|    }
23402|       |
23403|       |    /* exec mode */
23404|      3|    if (mode == JANET_EXECUTE_EXEC) {
  ------------------
  |  Branch (23404:9): [True: 0, False: 3]
  ------------------
23405|      0|        int status;
23406|       |#ifdef JANET_PLAN9
23407|       |        status = exec(cargv[0], cargv);
23408|       |#else
23409|      0|        if (!use_environ) {
  ------------------
  |  Branch (23409:13): [True: 0, False: 0]
  ------------------
23410|      0|            environ = envp;
23411|      0|        }
23412|      0|        do {
23413|      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]
  |  |  ------------------
  ------------------
23414|      0|                status = execvp(cargv[0], cargv);
23415|      0|            } else {
23416|      0|                status = execv(cargv[0], cargv);
23417|      0|            }
23418|      0|        } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (23418:18): [True: 0, False: 0]
  |  Branch (23418:34): [True: 0, False: 0]
  ------------------
23419|      0|#endif
23420|      0|        janet_panicf("%p: %s", cargv[0], janet_strerror(errno ? errno : ENOENT));
  ------------------
  |  Branch (23420:57): [True: 0, False: 0]
  ------------------
23421|      0|    }
23422|       |
23423|      3|#ifndef JANET_NO_SPAWN
23424|       |    /* Use posix_spawn to spawn new process */
23425|       |
23426|       |    /* Posix spawn setup */
23427|      3|    posix_spawn_file_actions_t actions;
23428|      3|    posix_spawn_file_actions_init(&actions);
23429|      3|#ifdef JANET_SPAWN_CHDIR
23430|      3|    if (chdir_path != NULL) {
  ------------------
  |  Branch (23430:9): [True: 0, False: 3]
  ------------------
23431|       |#ifdef JANET_SPAWN_CHDIR_NO_NP
23432|       |        posix_spawn_file_actions_addchdir(&actions, chdir_path);
23433|       |#else
23434|      0|        posix_spawn_file_actions_addchdir_np(&actions, chdir_path);
23435|      0|#endif
23436|      0|    }
23437|      3|#endif
23438|      3|    if (pipe_in != JANET_HANDLE_NONE) {
  ------------------
  |  |  433|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23438:9): [True: 0, False: 3]
  ------------------
23439|      0|        posix_spawn_file_actions_adddup2(&actions, pipe_in, 0);
23440|      0|        posix_spawn_file_actions_addclose(&actions, pipe_in);
23441|      3|    } else if (new_in != JANET_HANDLE_NONE && new_in != 0) {
  ------------------
  |  |  433|      6|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23441:16): [True: 0, False: 3]
  |  Branch (23441:47): [True: 0, False: 0]
  ------------------
23442|      0|        posix_spawn_file_actions_adddup2(&actions, new_in, 0);
23443|      0|        if (new_in != new_out && new_in != new_err)
  ------------------
  |  Branch (23443:13): [True: 0, False: 0]
  |  Branch (23443:34): [True: 0, False: 0]
  ------------------
23444|      0|            posix_spawn_file_actions_addclose(&actions, new_in);
23445|      0|    }
23446|      3|    if (pipe_out != JANET_HANDLE_NONE) {
  ------------------
  |  |  433|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23446:9): [True: 0, False: 3]
  ------------------
23447|      0|        posix_spawn_file_actions_adddup2(&actions, pipe_out, 1);
23448|      0|        posix_spawn_file_actions_addclose(&actions, pipe_out);
23449|      3|    } else if (new_out != JANET_HANDLE_NONE && new_out != 1) {
  ------------------
  |  |  433|      6|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23449:16): [True: 0, False: 3]
  |  Branch (23449:48): [True: 0, False: 0]
  ------------------
23450|      0|        posix_spawn_file_actions_adddup2(&actions, new_out, 1);
23451|      0|        if (new_out != new_err)
  ------------------
  |  Branch (23451:13): [True: 0, False: 0]
  ------------------
23452|      0|            posix_spawn_file_actions_addclose(&actions, new_out);
23453|      0|    }
23454|      3|    if (pipe_err != JANET_HANDLE_NONE) {
  ------------------
  |  |  433|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23454:9): [True: 0, False: 3]
  ------------------
23455|      0|        posix_spawn_file_actions_adddup2(&actions, pipe_err, 2);
23456|      0|        posix_spawn_file_actions_addclose(&actions, pipe_err);
23457|      3|    } else if (new_err != JANET_HANDLE_NONE && new_err != 2) {
  ------------------
  |  |  433|      6|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23457:16): [True: 0, False: 3]
  |  Branch (23457:48): [True: 0, False: 0]
  ------------------
23458|      0|        posix_spawn_file_actions_adddup2(&actions, new_err, 2);
23459|      0|        posix_spawn_file_actions_addclose(&actions, new_err);
23460|      3|    } else if (stderr_is_stdout) {
  ------------------
  |  Branch (23460:16): [True: 0, False: 3]
  ------------------
23461|      0|        posix_spawn_file_actions_adddup2(&actions, 1, 2);
23462|      0|    }
23463|       |
23464|      3|    pid_t pid;
23465|      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]
  |  |  ------------------
  ------------------
23466|      0|        status = posix_spawnp(&pid,
23467|      0|                              child_argv[0], &actions, NULL, cargv,
23468|      0|                              use_environ ? environ : envp);
  ------------------
  |  Branch (23468:31): [True: 0, False: 0]
  ------------------
23469|      3|    } else {
23470|      3|        status = posix_spawn(&pid,
23471|      3|                             child_argv[0], &actions, NULL, cargv,
23472|      3|                             use_environ ? environ : envp);
  ------------------
  |  Branch (23472:30): [True: 0, False: 3]
  ------------------
23473|      3|    }
23474|       |
23475|      3|    posix_spawn_file_actions_destroy(&actions);
23476|       |
23477|      3|    if (pipe_in != JANET_HANDLE_NONE) close(pipe_in);
  ------------------
  |  |  433|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23477:9): [True: 0, False: 3]
  ------------------
23478|      3|    if (pipe_out != JANET_HANDLE_NONE) close(pipe_out);
  ------------------
  |  |  433|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23478:9): [True: 0, False: 3]
  ------------------
23479|      3|    if (pipe_err != JANET_HANDLE_NONE) close(pipe_err);
  ------------------
  |  |  433|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23479:9): [True: 0, False: 3]
  ------------------
23480|       |
23481|      3|    if (use_environ) {
  ------------------
  |  Branch (23481:9): [True: 0, False: 3]
  ------------------
23482|      0|        janet_unlock_environ();
23483|      0|    }
23484|       |
23485|      3|    os_execute_cleanup(envp, child_argv);
23486|      3|    if (status) {
  ------------------
  |  Branch (23486:9): [True: 0, False: 3]
  ------------------
23487|       |        /* correct for macos bug where errno is not set */
23488|      0|        janet_panicf("%p: %s", argv[0], janet_strerror(errno ? errno : ENOENT));
  ------------------
  |  Branch (23488:56): [True: 0, False: 0]
  ------------------
23489|      0|    }
23490|       |
23491|      3|#endif
23492|      3|#endif
23493|      3|#ifndef JANET_NO_SPAWN
23494|      3|    JanetProc *proc = janet_abstract(&ProcAT, sizeof(JanetProc));
23495|      3|    proc->return_code = -1;
23496|       |#ifdef JANET_WINDOWS
23497|       |    proc->pHandle = pHandle;
23498|       |    proc->tHandle = tHandle;
23499|       |#else
23500|      3|    proc->pid = pid;
23501|      3|#endif
23502|      3|    proc->in = NULL;
23503|      3|    proc->out = NULL;
23504|      3|    proc->err = NULL;
23505|      3|    proc->flags = pipe_owner_flags;
23506|      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]
  |  |  ------------------
  ------------------
23507|      0|        proc->flags |= JANET_PROC_ERROR_NONZERO;
  ------------------
  |  |22541|      0|#define JANET_PROC_ERROR_NONZERO 8
  ------------------
23508|      0|    }
23509|      3|    if (is_spawn) {
  ------------------
  |  Branch (23509:9): [True: 0, False: 3]
  ------------------
23510|       |        /* Only set up pointers to stdin, stdout, and stderr if os/spawn. */
23511|      0|        if (new_in != JANET_HANDLE_NONE) {
  ------------------
  |  |  433|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23511:13): [True: 0, False: 0]
  ------------------
23512|      0|            proc->in = get_stdio_for_handle(new_in, orig_in, 1);
23513|      0|            if (NULL == proc->in) janet_panic("failed to construct proc");
  ------------------
  |  Branch (23513:17): [True: 0, False: 0]
  ------------------
23514|      0|        }
23515|      0|        if (new_out != JANET_HANDLE_NONE) {
  ------------------
  |  |  433|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23515:13): [True: 0, False: 0]
  ------------------
23516|      0|            proc->out = get_stdio_for_handle(new_out, orig_out, 0);
23517|      0|            if (NULL == proc->out) janet_panic("failed to construct proc");
  ------------------
  |  Branch (23517:17): [True: 0, False: 0]
  ------------------
23518|      0|        }
23519|      0|        if (new_err != JANET_HANDLE_NONE) {
  ------------------
  |  |  433|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23519:13): [True: 0, False: 0]
  ------------------
23520|      0|            proc->err = get_stdio_for_handle(new_err, orig_err, 0);
23521|      0|            if (NULL == proc->err) janet_panic("failed to construct proc");
  ------------------
  |  Branch (23521:17): [True: 0, False: 0]
  ------------------
23522|      0|        }
23523|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23524|      3|    } else {
23525|      3|#ifdef JANET_EV
23526|      3|        os_proc_wait_impl(proc);
23527|       |#else
23528|       |        return os_proc_wait_impl(proc);
23529|       |#endif
23530|      3|    }
23531|      3|#endif
23532|      3|}
janet.c:os_execute_env:
22389|      3|static EnvBlock os_execute_env(int32_t argc, const Janet *argv) {
22390|      3|    if (argc <= 2) return NULL;
  ------------------
  |  Branch (22390:9): [True: 1, False: 2]
  ------------------
22391|      2|    JanetDictView dict = janet_getdictionary(argv, 2);
22392|       |#ifdef JANET_WINDOWS
22393|       |    JanetBuffer *temp = janet_buffer(10);
22394|       |    for (int32_t i = 0; i < dict.cap; i++) {
22395|       |        const JanetKV *kv = dict.kvs + i;
22396|       |        if (!janet_checktype(kv->key, JANET_STRING)) continue;
22397|       |        if (!janet_checktype(kv->value, JANET_STRING)) continue;
22398|       |        const uint8_t *keys = janet_unwrap_string(kv->key);
22399|       |        const uint8_t *vals = janet_unwrap_string(kv->value);
22400|       |        janet_buffer_push_bytes(temp, keys, janet_string_length(keys));
22401|       |        janet_buffer_push_u8(temp, '=');
22402|       |        janet_buffer_push_bytes(temp, vals, janet_string_length(vals));
22403|       |        janet_buffer_push_u8(temp, '\0');
22404|       |    }
22405|       |    /* Windows environment blocks must be double-NULL terminated */
22406|       |    if (temp->count == 0) janet_buffer_push_u8(temp, '\0');
22407|       |    janet_buffer_push_u8(temp, '\0');
22408|       |    char *ret = janet_smalloc(temp->count);
22409|       |    memcpy(ret, temp->data, temp->count);
22410|       |    return ret;
22411|       |#else
22412|      2|    char **envp = janet_smalloc(sizeof(char *) * ((size_t)dict.len + 1));
22413|      2|    int32_t j = 0;
22414|      2|    for (int32_t i = 0; i < dict.cap; i++) {
  ------------------
  |  Branch (22414:25): [True: 0, False: 2]
  ------------------
22415|      0|        const JanetKV *kv = dict.kvs + i;
22416|      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 (22416:13): [True: 0, False: 0]
  ------------------
22417|      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 (22417:13): [True: 0, False: 0]
  ------------------
22418|      0|        const uint8_t *keys = janet_unwrap_string(kv->key);
  ------------------
  |  |  858|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
22419|      0|        const uint8_t *vals = janet_unwrap_string(kv->value);
  ------------------
  |  |  858|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
22420|      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)))
  |  |  ------------------
  ------------------
22421|      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)))
  |  |  ------------------
  ------------------
22422|       |        /* Check keys has no embedded 0s or =s. */
22423|      0|        int skip = 0;
22424|      0|        for (int32_t k = 0; k < klen; k++) {
  ------------------
  |  Branch (22424:29): [True: 0, False: 0]
  ------------------
22425|      0|            if (keys[k] == '\0' || keys[k] == '=') {
  ------------------
  |  Branch (22425:17): [True: 0, False: 0]
  |  Branch (22425:36): [True: 0, False: 0]
  ------------------
22426|      0|                skip = 1;
22427|      0|                break;
22428|      0|            }
22429|      0|        }
22430|      0|        if (skip) continue;
  ------------------
  |  Branch (22430:13): [True: 0, False: 0]
  ------------------
22431|      0|        char *envitem = janet_smalloc((size_t) klen + (size_t) vlen + 2);
22432|      0|        memcpy(envitem, keys, klen);
22433|      0|        envitem[klen] = '=';
22434|      0|        memcpy(envitem + klen + 1, vals, vlen);
22435|      0|        envitem[klen + vlen + 1] = 0;
22436|      0|        envp[j++] = envitem;
22437|      0|    }
22438|       |    envp[j] = NULL;
22439|      2|    return envp;
22440|      3|#endif
22441|      3|}
janet.c:janet_lock_environ:
22160|      3|static void janet_lock_environ(void) {
22161|      3|}
janet.c:janet_unlock_environ:
22162|      3|static void janet_unlock_environ(void) {
22163|      3|}
janet.c:time_to_tm:
23902|      3|static struct tm *time_to_tm(const Janet *argv, int32_t argc, int32_t n, struct tm *t_infos) {
23903|      3|    time_t t;
23904|      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 (23904:9): [True: 0, False: 3]
  |  Branch (23904:21): [True: 0, False: 0]
  ------------------
23905|      0|        int64_t integer = janet_getinteger64(argv, n);
23906|      0|        t = (time_t) integer;
23907|      3|    } else {
23908|      3|        time(&t);
23909|      3|    }
23910|      3|    struct tm *t_info = NULL;
23911|      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 (23911:9): [True: 0, False: 3]
  ------------------
23912|       |        /* local time */
23913|       |#ifdef JANET_WINDOWS
23914|       |        _tzset();
23915|       |        localtime_s(t_infos, &t);
23916|       |        t_info = t_infos;
23917|       |#elif defined(JANET_PLAN9)
23918|       |        t_info = localtime(&t);
23919|       |#else
23920|      0|        tzset();
23921|      0|        t_info = localtime_r(&t, t_infos);
23922|      0|#endif
23923|      3|    } else {
23924|       |        /* utc time */
23925|       |#ifdef JANET_WINDOWS
23926|       |        gmtime_s(t_infos, &t);
23927|       |        t_info = t_infos;
23928|       |#elif defined(JANET_PLAN9)
23929|       |        t_info = gmtime(&t);
23930|       |#else
23931|      3|        t_info = gmtime_r(&t, t_infos);
23932|      3|#endif
23933|      3|    }
23934|      3|    return t_info;
23935|      3|}
janet.c:os_stat_or_lstat:
24493|  6.24k|static Janet os_stat_or_lstat(int do_lstat, int32_t argc, Janet *argv) {
24494|  6.24k|    janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2019|  6.24k|#define JANET_SANDBOX_FS_READ 64
  ------------------
24495|  6.24k|    janet_arity(argc, 1, 2);
24496|  6.24k|    const char *path = janet_getcstring(argv, 0);
24497|  6.24k|    JanetTable *tab = NULL;
24498|  6.24k|    const uint8_t *key = NULL;
24499|  6.24k|    if (argc == 2) {
  ------------------
  |  Branch (24499:9): [True: 6.24k, False: 0]
  ------------------
24500|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24501|  6.24k|            key = janet_getkeyword(argv, 1);
24502|  6.24k|        } else {
24503|      0|            tab = janet_gettable(argv, 1);
24504|      0|        }
24505|  6.24k|    } else {
24506|      0|        tab = janet_table(0);
24507|      0|    }
24508|       |
24509|       |    /* Build result */
24510|  6.24k|    jstat_t st;
24511|       |#ifdef JANET_WINDOWS
24512|       |    (void) do_lstat;
24513|       |    int res = _stat(path, &st);
24514|       |#elif defined(JANET_PLAN9)
24515|       |    (void)do_lstat;
24516|       |    int res = stat(path, &st);
24517|       |#else
24518|  6.24k|    int res;
24519|  6.24k|    if (do_lstat) {
  ------------------
  |  Branch (24519:9): [True: 0, False: 6.24k]
  ------------------
24520|      0|        res = lstat(path, &st);
24521|  6.24k|    } else {
24522|  6.24k|        res = stat(path, &st);
24523|  6.24k|    }
24524|  6.24k|#endif
24525|  6.24k|    if (-1 == res) {
  ------------------
  |  Branch (24525:9): [True: 6.24k, False: 0]
  ------------------
24526|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24527|  6.24k|    }
24528|       |
24529|      0|    if (NULL == key) {
  ------------------
  |  Branch (24529:9): [True: 0, False: 0]
  ------------------
24530|       |        /* Put results in table */
24531|      0|        for (const struct OsStatGetter *sg = os_stat_getters; sg->name != NULL; sg++) {
  ------------------
  |  Branch (24531:63): [True: 0, False: 0]
  ------------------
24532|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24533|      0|        }
24534|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24535|      0|    } else {
24536|       |        /* Get one result */
24537|      0|        for (const struct OsStatGetter *sg = os_stat_getters; sg->name != NULL; sg++) {
  ------------------
  |  Branch (24537:63): [True: 0, False: 0]
  ------------------
24538|      0|            if (janet_cstrcmp(key, sg->name)) continue;
  ------------------
  |  Branch (24538:17): [True: 0, False: 0]
  ------------------
24539|      0|            return sg->fn(&st);
24540|      0|        }
24541|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24542|      0|    }
24543|      0|}
janet.c:os_getmode:
24407|      1|static jmode_t os_getmode(const Janet *argv, int32_t n) {
24408|      1|    return janet_perm_from_unix(os_get_unix_mode(argv, n));
24409|      1|}
janet.c:janet_perm_from_unix:
24335|     35|static mode_t janet_perm_from_unix(int32_t x) {
24336|     35|    return (mode_t) x;
24337|     35|}
janet.c:os_make_permstring:
24373|  2.29k|static Janet os_make_permstring(int32_t permissions) {
24374|  2.29k|    uint8_t bytes[9] = {0};
24375|  2.29k|    bytes[0] = (permissions & 0400) ? 'r' : '-';
  ------------------
  |  Branch (24375:16): [True: 2.26k, False: 30]
  ------------------
24376|  2.29k|    bytes[1] = (permissions & 0200) ? 'w' : '-';
  ------------------
  |  Branch (24376:16): [True: 16, False: 2.27k]
  ------------------
24377|  2.29k|    bytes[2] = (permissions & 0100) ? 'x' : '-';
  ------------------
  |  Branch (24377:16): [True: 19, False: 2.27k]
  ------------------
24378|  2.29k|    bytes[3] = (permissions & 0040) ? 'r' : '-';
  ------------------
  |  Branch (24378:16): [True: 14, False: 2.27k]
  ------------------
24379|  2.29k|    bytes[4] = (permissions & 0020) ? 'w' : '-';
  ------------------
  |  Branch (24379:16): [True: 16, False: 2.27k]
  ------------------
24380|  2.29k|    bytes[5] = (permissions & 0010) ? 'x' : '-';
  ------------------
  |  Branch (24380:16): [True: 12, False: 2.27k]
  ------------------
24381|  2.29k|    bytes[6] = (permissions & 0004) ? 'r' : '-';
  ------------------
  |  Branch (24381:16): [True: 12, False: 2.27k]
  ------------------
24382|  2.29k|    bytes[7] = (permissions & 0002) ? 'w' : '-';
  ------------------
  |  Branch (24382:16): [True: 14, False: 2.27k]
  ------------------
24383|  2.29k|    bytes[8] = (permissions & 0001) ? 'x' : '-';
  ------------------
  |  Branch (24383:16): [True: 18, False: 2.27k]
  ------------------
24384|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24385|  2.29k|}
janet.c:os_get_unix_mode:
24387|  3.31k|static int32_t os_get_unix_mode(const Janet *argv, int32_t n) {
24388|  3.31k|    int32_t unix_mode;
24389|  3.31k|    if (janet_checkint(argv[n])) {
  ------------------
  |  Branch (24389:9): [True: 3.30k, False: 14]
  ------------------
24390|       |        /* Integer mode */
24391|  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)
  |  |  ------------------
  ------------------
24392|  3.30k|        if (x < 0 || x > 0777) {
  ------------------
  |  Branch (24392:13): [True: 1, False: 3.30k]
  |  Branch (24392:22): [True: 1, False: 3.29k]
  ------------------
24393|      2|            janet_panicf("bad slot #%d, expected integer in range [0, 8r777], got %v", n, argv[n]);
24394|      2|        }
24395|  3.29k|        unix_mode = x;
24396|  3.29k|    } else {
24397|       |        /* Bytes mode */
24398|     14|        JanetByteView bytes = janet_getbytes(argv, n);
24399|     14|        if (bytes.len != 9) {
  ------------------
  |  Branch (24399:13): [True: 0, False: 14]
  ------------------
24400|      0|            janet_panicf("bad slot #%d: expected byte sequence of length 9, got %v", n, argv[n]);
24401|      0|        }
24402|     14|        unix_mode = os_parse_permstring(bytes.bytes);
24403|     14|    }
24404|  3.31k|    return unix_mode;
24405|  3.31k|}
janet.c:os_parse_permstring:
24359|     12|static int32_t os_parse_permstring(const uint8_t *perm) {
24360|     12|    int32_t m = 0;
24361|     12|    if (perm[0] == 'r') m |= 0400;
  ------------------
  |  Branch (24361:9): [True: 1, False: 11]
  ------------------
24362|     12|    if (perm[1] == 'w') m |= 0200;
  ------------------
  |  Branch (24362:9): [True: 7, False: 5]
  ------------------
24363|     12|    if (perm[2] == 'x') m |= 0100;
  ------------------
  |  Branch (24363:9): [True: 8, False: 4]
  ------------------
24364|     12|    if (perm[3] == 'r') m |= 0040;
  ------------------
  |  Branch (24364:9): [True: 6, False: 6]
  ------------------
24365|     12|    if (perm[4] == 'w') m |= 0020;
  ------------------
  |  Branch (24365:9): [True: 5, False: 7]
  ------------------
24366|     12|    if (perm[5] == 'x') m |= 0010;
  ------------------
  |  Branch (24366:9): [True: 5, False: 7]
  ------------------
24367|     12|    if (perm[6] == 'r') m |= 0004;
  ------------------
  |  Branch (24367:9): [True: 3, False: 9]
  ------------------
24368|     12|    if (perm[7] == 'w') m |= 0002;
  ------------------
  |  Branch (24368:9): [True: 6, False: 6]
  ------------------
24369|     12|    if (perm[8] == 'x') m |= 0001;
  ------------------
  |  Branch (24369:9): [True: 6, False: 6]
  ------------------
24370|     12|    return m;
24371|     12|}
janet.c:os_optmode:
24728|     36|static jmode_t os_optmode(int32_t argc, const Janet *argv, int32_t n, int32_t dflt) {
24729|     36|    if (argc > n) return os_getmode(argv, n);
  ------------------
  |  Branch (24729:9): [True: 1, False: 35]
  ------------------
24730|     35|    return janet_perm_from_unix(dflt);
24731|     36|}
janet.c:janet_parser_checkdead:
25772|  13.0M|static void janet_parser_checkdead(JanetParser *parser) {
25773|  13.0M|    if (parser->flag) janet_panic("parser is dead, cannot consume");
  ------------------
  |  Branch (25773:9): [True: 0, False: 13.0M]
  ------------------
25774|  13.0M|    if (parser->error) janet_panic("parser has unchecked error, cannot consume");
  ------------------
  |  Branch (25774:9): [True: 0, False: 13.0M]
  ------------------
25775|  13.0M|}
janet.c:delim_error:
25282|  1.43k|static void delim_error(JanetParser *parser, size_t stack_index, char c, const char *msg) {
25283|  1.43k|    JanetParseState *s = parser->states + stack_index;
25284|  1.43k|    JanetBuffer *buffer = janet_buffer(40);
25285|  1.43k|    if (msg) {
  ------------------
  |  Branch (25285:9): [True: 1.43k, False: 0]
  ------------------
25286|  1.43k|        janet_buffer_push_cstring(buffer, msg);
25287|  1.43k|    }
25288|  1.43k|    if (c) {
  ------------------
  |  Branch (25288:9): [True: 681, False: 757]
  ------------------
25289|    681|        janet_buffer_push_u8(buffer, c);
25290|    681|    }
25291|  1.43k|    if (stack_index > 0) {
  ------------------
  |  Branch (25291:9): [True: 793, False: 645]
  ------------------
25292|    793|        janet_buffer_push_cstring(buffer, ", ");
25293|    793|        if (s->flags & PFLAG_PARENS) {
  ------------------
  |  |25218|    793|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (25293:13): [True: 147, False: 646]
  ------------------
25294|    147|            janet_buffer_push_u8(buffer, '(');
25295|    646|        } else if (s->flags & PFLAG_SQRBRACKETS) {
  ------------------
  |  |25219|    646|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (25295:20): [True: 21, False: 625]
  ------------------
25296|     21|            janet_buffer_push_u8(buffer, '[');
25297|    625|        } else if (s->flags & PFLAG_CURLYBRACKETS) {
  ------------------
  |  |25220|    625|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (25297:20): [True: 41, False: 584]
  ------------------
25298|     41|            janet_buffer_push_u8(buffer, '{');
25299|    584|        } else if (s->flags & PFLAG_STRING) {
  ------------------
  |  |25221|    584|#define PFLAG_STRING 0x2000
  ------------------
  |  Branch (25299:20): [True: 149, False: 435]
  ------------------
25300|    149|            janet_buffer_push_u8(buffer, '"');
25301|    435|        } else if (s->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |25222|    435|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (25301:20): [True: 171, False: 264]
  ------------------
25302|    171|            int32_t i;
25303|  66.5k|            for (i = 0; i < s->argn; i++) {
  ------------------
  |  Branch (25303:25): [True: 66.4k, False: 171]
  ------------------
25304|  66.4k|                janet_buffer_push_u8(buffer, '`');
25305|  66.4k|            }
25306|    171|        }
25307|    793|        janet_formatb(buffer, " opened at line %d, column %d", (int32_t) s->line, (int32_t) s->column);
25308|    793|    }
25309|  1.43k|    parser->error = (const char *) janet_string(buffer->data, buffer->count);
25310|  1.43k|    parser->flag |= JANET_PARSER_GENERATED_ERROR;
  ------------------
  |  |25112|  1.43k|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
25311|  1.43k|}
janet.c:pushstate:
25228|  6.65M|static void pushstate(JanetParser *p, Consumer consumer, int flags) {
25229|  6.65M|    JanetParseState s;
25230|  6.65M|    s.counter = 0;
25231|  6.65M|    s.argn = 0;
25232|  6.65M|    s.flags = flags;
25233|  6.65M|    s.consumer = consumer;
25234|  6.65M|    s.line = p->line;
25235|  6.65M|    s.column = p->column;
25236|  6.65M|    _pushstate(p, s);
25237|  6.65M|}
janet.c:root:
25699|  7.93M|static int root(JanetParser *p, JanetParseState *state, uint8_t c) {
25700|  7.93M|    switch (c) {
25701|  2.79M|        default:
  ------------------
  |  Branch (25701:9): [True: 2.79M, False: 5.14M]
  ------------------
25702|  2.79M|            if (is_whitespace(c)) return 1;
  ------------------
  |  Branch (25702:17): [True: 1.38M, False: 1.40M]
  ------------------
25703|  1.40M|            if (!janet_is_symbol_char(c)) {
  ------------------
  |  Branch (25703:17): [True: 333, False: 1.40M]
  ------------------
25704|    333|                p->error = "unexpected character";
25705|    333|                return 1;
25706|    333|            }
25707|  1.40M|            pushstate(p, tokenchar, PFLAG_TOKEN);
  ------------------
  |  |25226|  1.40M|#define PFLAG_TOKEN 0x40000
  ------------------
25708|  1.40M|            return 0;
25709|   232k|        case '\'':
  ------------------
  |  Branch (25709:9): [True: 232k, False: 7.70M]
  ------------------
25710|   248k|        case ',':
  ------------------
  |  Branch (25710:9): [True: 16.2k, False: 7.91M]
  ------------------
25711|   263k|        case ';':
  ------------------
  |  Branch (25711:9): [True: 15.4k, False: 7.91M]
  ------------------
25712|  2.67M|        case '~':
  ------------------
  |  Branch (25712:9): [True: 2.40M, False: 5.52M]
  ------------------
25713|  4.52M|        case '|':
  ------------------
  |  Branch (25713:9): [True: 1.85M, False: 6.07M]
  ------------------
25714|  4.52M|            pushstate(p, root, PFLAG_READERMAC | c);
  ------------------
  |  |25223|  4.52M|#define PFLAG_READERMAC 0x8000
  ------------------
25715|  4.52M|            return 1;
25716|  45.4k|        case '"':
  ------------------
  |  Branch (25716:9): [True: 45.4k, False: 7.88M]
  ------------------
25717|  45.4k|            pushstate(p, stringchar, PFLAG_STRING);
  ------------------
  |  |25221|  45.4k|#define PFLAG_STRING 0x2000
  ------------------
25718|  45.4k|            return 1;
25719|    974|        case '#':
  ------------------
  |  Branch (25719:9): [True: 974, False: 7.93M]
  ------------------
25720|    974|            pushstate(p, comment, PFLAG_COMMENT);
  ------------------
  |  |25225|    974|#define PFLAG_COMMENT 0x20000
  ------------------
25721|    974|            return 1;
25722|  84.3k|        case '@':
  ------------------
  |  Branch (25722:9): [True: 84.3k, False: 7.84M]
  ------------------
25723|  84.3k|            pushstate(p, atsign, PFLAG_ATSYM);
  ------------------
  |  |25224|  84.3k|#define PFLAG_ATSYM 0x10000
  ------------------
25724|  84.3k|            return 1;
25725|  8.32k|        case '`':
  ------------------
  |  Branch (25725:9): [True: 8.32k, False: 7.92M]
  ------------------
25726|  8.32k|            pushstate(p, longstring, PFLAG_LONGSTRING);
  ------------------
  |  |25222|  8.32k|#define PFLAG_LONGSTRING 0x4000
  ------------------
25727|  8.32k|            return 1;
25728|  34.1k|        case ')':
  ------------------
  |  Branch (25728:9): [True: 34.1k, False: 7.89M]
  ------------------
25729|  37.2k|        case ']':
  ------------------
  |  Branch (25729:9): [True: 3.07k, False: 7.93M]
  ------------------
25730|  83.3k|        case '}': {
  ------------------
  |  Branch (25730:9): [True: 46.1k, False: 7.88M]
  ------------------
25731|  83.3k|            Janet ds;
25732|  83.3k|            if (p->statecount == 1) {
  ------------------
  |  Branch (25732:17): [True: 645, False: 82.6k]
  ------------------
25733|    645|                delim_error(p, 0, c, "unexpected closing delimiter ");
25734|    645|                return 1;
25735|    645|            }
25736|  82.6k|            if ((c == ')' && (state->flags & PFLAG_PARENS)) ||
  ------------------
  |  |25218|  33.5k|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (25736:18): [True: 33.5k, False: 49.1k]
  |  Branch (25736:30): [True: 33.5k, False: 16]
  ------------------
25737|  49.1k|                    (c == ']' && (state->flags & PFLAG_SQRBRACKETS))) {
  ------------------
  |  |25219|  3.04k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (25737:22): [True: 3.04k, False: 46.1k]
  |  Branch (25737:34): [True: 3.03k, False: 11]
  ------------------
25738|  36.5k|                if (state->flags & PFLAG_ATSYM) {
  ------------------
  |  |25224|  36.5k|#define PFLAG_ATSYM 0x10000
  ------------------
  |  Branch (25738:21): [True: 1.22k, False: 35.3k]
  ------------------
25739|  1.22k|                    ds = close_array(p, state);
25740|  35.3k|                } else {
25741|  35.3k|                    ds = close_tuple(p, state, c == ']' ? JANET_TUPLE_FLAG_BRACKETCTOR : 0);
  ------------------
  |  | 1788|  2.86k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (25741:48): [True: 2.86k, False: 32.4k]
  ------------------
25742|  35.3k|                }
25743|  46.1k|            } else if (c == '}' && (state->flags & PFLAG_CURLYBRACKETS)) {
  ------------------
  |  |25220|  46.0k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (25743:24): [True: 46.0k, False: 27]
  |  Branch (25743:36): [True: 46.0k, False: 9]
  ------------------
25744|  46.0k|                if (state->argn & 1) {
  ------------------
  |  Branch (25744:21): [True: 5, False: 46.0k]
  ------------------
25745|      5|                    p->error = "struct and table literals expect even number of arguments";
25746|      5|                    return 1;
25747|      5|                }
25748|  46.0k|                if (state->flags & PFLAG_ATSYM) {
  ------------------
  |  |25224|  46.0k|#define PFLAG_ATSYM 0x10000
  ------------------
  |  Branch (25748:21): [True: 649, False: 45.4k]
  ------------------
25749|    649|                    ds = close_table(p, state);
25750|  45.4k|                } else {
25751|  45.4k|                    ds = close_struct(p, state);
25752|  45.4k|                }
25753|  46.0k|            } else {
25754|     36|                delim_error(p, p->statecount - 1, c, "mismatched delimiter ");
25755|     36|                return 1;
25756|     36|            }
25757|  82.6k|            popstate(p, ds);
25758|  82.6k|        }
25759|      0|        return 1;
25760|   109k|        case '(':
  ------------------
  |  Branch (25760:9): [True: 109k, False: 7.82M]
  ------------------
25761|   109k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS);
  ------------------
  |  |25216|   109k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS);
  ------------------
  |  |25218|   109k|#define PFLAG_PARENS 0x400
  ------------------
25762|   109k|            return 1;
25763|   164k|        case '[':
  ------------------
  |  Branch (25763:9): [True: 164k, False: 7.76M]
  ------------------
25764|   164k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS);
  ------------------
  |  |25216|   164k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS);
  ------------------
  |  |25219|   164k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
25765|   164k|            return 1;
25766|   121k|        case '{':
  ------------------
  |  Branch (25766:9): [True: 121k, False: 7.81M]
  ------------------
25767|   121k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS);
  ------------------
  |  |25216|   121k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS);
  ------------------
  |  |25220|   121k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
25768|   121k|            return 1;
25769|  7.93M|    }
25770|  7.93M|}
janet.c:is_whitespace:
25115|  2.79M|static int is_whitespace(uint8_t c) {
25116|  2.79M|    return c == ' '
  ------------------
  |  Branch (25116:12): [True: 12.8k, False: 2.77M]
  ------------------
25117|  2.77M|           || c == '\t'
  ------------------
  |  Branch (25117:15): [True: 14.5k, False: 2.76M]
  ------------------
25118|  2.76M|           || c == '\n'
  ------------------
  |  Branch (25118:15): [True: 196k, False: 2.56M]
  ------------------
25119|  2.56M|           || c == '\r'
  ------------------
  |  Branch (25119:15): [True: 6.35k, False: 2.56M]
  ------------------
25120|  2.56M|           || c == '\0'
  ------------------
  |  Branch (25120:15): [True: 1.14M, False: 1.41M]
  ------------------
25121|  1.41M|           || c == '\v'
  ------------------
  |  Branch (25121:15): [True: 3.75k, False: 1.41M]
  ------------------
25122|  1.41M|           || c == '\f';
  ------------------
  |  Branch (25122:15): [True: 14.2k, False: 1.40M]
  ------------------
25123|  2.79M|}
janet.c:stringchar:
25494|   801k|static int stringchar(JanetParser *p, JanetParseState *state, uint8_t c) {
25495|       |    /* Enter escape */
25496|   801k|    if (c == '\\') {
  ------------------
  |  Branch (25496:9): [True: 4.36k, False: 796k]
  ------------------
25497|  4.36k|        state->consumer = escape1;
25498|  4.36k|        return 1;
25499|  4.36k|    }
25500|       |    /* String end */
25501|   796k|    if (c == '"') {
  ------------------
  |  Branch (25501:9): [True: 47.3k, False: 749k]
  ------------------
25502|  47.3k|        return stringend(p, state);
25503|  47.3k|    }
25504|       |    /* normal char */
25505|   749k|    if (c != '\n' && c != '\r')
  ------------------
  |  Branch (25505:9): [True: 743k, False: 6.38k]
  |  Branch (25505:22): [True: 733k, False: 10.0k]
  ------------------
25506|   733k|        push_buf(p, c);
25507|   749k|    return 1;
25508|   796k|}
janet.c:escape1:
25409|  4.36k|static int escape1(JanetParser *p, JanetParseState *state, uint8_t c) {
25410|  4.36k|    int e = checkescape(c);
25411|  4.36k|    if (e < 0) {
  ------------------
  |  Branch (25411:9): [True: 29, False: 4.33k]
  ------------------
25412|     29|        p->error = "invalid string escape sequence";
25413|     29|        return 1;
25414|     29|    }
25415|  4.33k|    if (c == 'x') {
  ------------------
  |  Branch (25415:9): [True: 673, False: 3.66k]
  ------------------
25416|    673|        state->counter = 2;
25417|    673|        state->argn = 0;
25418|    673|        state->consumer = escapeh;
25419|  3.66k|    } else if (c == 'u' || c == 'U') {
  ------------------
  |  Branch (25419:16): [True: 1.31k, False: 2.34k]
  |  Branch (25419:28): [True: 63, False: 2.28k]
  ------------------
25420|  1.37k|        state->counter = c == 'u' ? 4 : 6;
  ------------------
  |  Branch (25420:26): [True: 1.31k, False: 63]
  ------------------
25421|  1.37k|        state->argn = 0;
25422|  1.37k|        state->consumer = escapeu;
25423|  2.28k|    } else {
25424|  2.28k|        push_buf(p, (uint8_t) e);
25425|  2.28k|        state->consumer = stringchar;
25426|  2.28k|    }
25427|  4.33k|    return 1;
25428|  4.36k|}
janet.c:checkescape:
25313|  4.36k|static int checkescape(uint8_t c) {
25314|  4.36k|    switch (c) {
25315|     29|        default:
  ------------------
  |  Branch (25315:9): [True: 29, False: 4.33k]
  ------------------
25316|     29|            return -1;
25317|    673|        case 'x':
  ------------------
  |  Branch (25317:9): [True: 673, False: 3.69k]
  ------------------
25318|  1.98k|        case 'u':
  ------------------
  |  Branch (25318:9): [True: 1.31k, False: 3.05k]
  ------------------
25319|  2.05k|        case 'U':
  ------------------
  |  Branch (25319:9): [True: 63, False: 4.30k]
  ------------------
25320|  2.05k|            return 1;
25321|     17|        case 'n':
  ------------------
  |  Branch (25321:9): [True: 17, False: 4.34k]
  ------------------
25322|     17|            return '\n';
25323|      6|        case 't':
  ------------------
  |  Branch (25323:9): [True: 6, False: 4.36k]
  ------------------
25324|      6|            return '\t';
25325|     81|        case 'r':
  ------------------
  |  Branch (25325:9): [True: 81, False: 4.28k]
  ------------------
25326|     81|            return '\r';
25327|    143|        case '0':
  ------------------
  |  Branch (25327:9): [True: 143, False: 4.22k]
  ------------------
25328|    143|            return '\0';
25329|    208|        case 'z':
  ------------------
  |  Branch (25329:9): [True: 208, False: 4.15k]
  ------------------
25330|    208|            return '\0';
25331|      7|        case 'f':
  ------------------
  |  Branch (25331:9): [True: 7, False: 4.35k]
  ------------------
25332|      7|            return '\f';
25333|     13|        case 'v':
  ------------------
  |  Branch (25333:9): [True: 13, False: 4.35k]
  ------------------
25334|     13|            return '\v';
25335|     63|        case 'a':
  ------------------
  |  Branch (25335:9): [True: 63, False: 4.30k]
  ------------------
25336|     63|            return '\a';
25337|    268|        case 'b':
  ------------------
  |  Branch (25337:9): [True: 268, False: 4.09k]
  ------------------
25338|    268|            return '\b';
25339|    249|        case '\'':
  ------------------
  |  Branch (25339:9): [True: 249, False: 4.11k]
  ------------------
25340|    249|            return '\'';
25341|     79|        case '?':
  ------------------
  |  Branch (25341:9): [True: 79, False: 4.28k]
  ------------------
25342|     79|            return '?';
25343|      9|        case 'e':
  ------------------
  |  Branch (25343:9): [True: 9, False: 4.35k]
  ------------------
25344|      9|            return 27;
25345|    229|        case '"':
  ------------------
  |  Branch (25345:9): [True: 229, False: 4.13k]
  ------------------
25346|    229|            return '"';
25347|    914|        case '\\':
  ------------------
  |  Branch (25347:9): [True: 914, False: 3.45k]
  ------------------
25348|    914|            return '\\';
25349|  4.36k|    }
25350|  4.36k|}
janet.c:escapeh:
25373|  1.34k|static int escapeh(JanetParser *p, JanetParseState *state, uint8_t c) {
25374|  1.34k|    int digit = to_hex(c);
25375|  1.34k|    if (digit < 0) {
  ------------------
  |  Branch (25375:9): [True: 2, False: 1.34k]
  ------------------
25376|      2|        p->error = "invalid hex digit in hex escape";
25377|      2|        return 1;
25378|      2|    }
25379|  1.34k|    state->argn = (state->argn << 4) + digit;
25380|  1.34k|    state->counter--;
25381|  1.34k|    if (!state->counter) {
  ------------------
  |  Branch (25381:9): [True: 671, False: 672]
  ------------------
25382|    671|        push_buf(p, (uint8_t)(state->argn & 0xFF));
25383|    671|        state->argn = 0;
25384|    671|        state->consumer = stringchar;
25385|    671|    }
25386|  1.34k|    return 1;
25387|  1.34k|}
janet.c:to_hex:
25178|  6.95k|static int to_hex(uint8_t c) {
25179|  6.95k|    if (c >= '0' && c <= '9') {
  ------------------
  |  Branch (25179:9): [True: 6.94k, False: 12]
  |  Branch (25179:21): [True: 4.71k, False: 2.22k]
  ------------------
25180|  4.71k|        return c - '0';
25181|  4.71k|    } else if (c >= 'A' && c <= 'F') {
  ------------------
  |  Branch (25181:16): [True: 2.22k, False: 14]
  |  Branch (25181:28): [True: 1.38k, False: 842]
  ------------------
25182|  1.38k|        return 10 + c - 'A';
25183|  1.38k|    } else if (c >= 'a' && c <= 'f') {
  ------------------
  |  Branch (25183:16): [True: 841, False: 15]
  |  Branch (25183:28): [True: 835, False: 6]
  ------------------
25184|    835|        return 10 + c - 'a';
25185|    835|    } else {
25186|     21|        return -1;
25187|     21|    }
25188|  6.95k|}
janet.c:escapeu:
25389|  5.60k|static int escapeu(JanetParser *p, JanetParseState *state, uint8_t c) {
25390|  5.60k|    int digit = to_hex(c);
25391|  5.60k|    if (digit < 0) {
  ------------------
  |  Branch (25391:9): [True: 19, False: 5.58k]
  ------------------
25392|     19|        p->error = "invalid hex digit in unicode escape";
25393|     19|        return 1;
25394|     19|    }
25395|  5.58k|    state->argn = (state->argn << 4) + digit;
25396|  5.58k|    state->counter--;
25397|  5.58k|    if (!state->counter) {
  ------------------
  |  Branch (25397:9): [True: 1.35k, False: 4.22k]
  ------------------
25398|  1.35k|        if (state->argn > 0x10FFFF) {
  ------------------
  |  Branch (25398:13): [True: 0, False: 1.35k]
  ------------------
25399|      0|            p->error = "invalid unicode codepoint";
25400|      0|            return 1;
25401|      0|        }
25402|  1.35k|        write_codepoint(p, state->argn);
25403|  1.35k|        state->argn = 0;
25404|  1.35k|        state->consumer = stringchar;
25405|  1.35k|    }
25406|  5.58k|    return 1;
25407|  5.58k|}
janet.c:write_codepoint:
25355|  1.35k|static void write_codepoint(JanetParser *p, int32_t codepoint) {
25356|  1.35k|    if (codepoint <= 0x7F) {
  ------------------
  |  Branch (25356:9): [True: 338, False: 1.02k]
  ------------------
25357|    338|        push_buf(p, (uint8_t) codepoint);
25358|  1.02k|    } else if (codepoint <= 0x7FF) {
  ------------------
  |  Branch (25358:16): [True: 202, False: 819]
  ------------------
25359|    202|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x1F) | 0xC0);
25360|    202|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
25361|    819|    } else if (codepoint <= 0xFFFF) {
  ------------------
  |  Branch (25361:16): [True: 760, False: 59]
  ------------------
25362|    760|        push_buf(p, (uint8_t)((codepoint >> 12) & 0x0F) | 0xE0);
25363|    760|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x3F) | 0x80);
25364|    760|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
25365|    760|    } else {
25366|     59|        push_buf(p, (uint8_t)((codepoint >> 18) & 0x07) | 0xF0);
25367|     59|        push_buf(p, (uint8_t)((codepoint >> 12) & 0x3F) | 0x80);
25368|     59|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x3F) | 0x80);
25369|     59|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
25370|     59|    }
25371|  1.35k|}
janet.c:stringend:
25430|   105k|static int stringend(JanetParser *p, JanetParseState *state) {
25431|   105k|    Janet ret;
25432|   105k|    uint8_t *bufstart = p->buf;
25433|   105k|    int32_t buflen = (int32_t) p->bufcount;
25434|   105k|    if (state->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |25222|   105k|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (25434:9): [True: 58.6k, False: 47.3k]
  ------------------
25435|       |        /* Post process to remove leading whitespace */
25436|  58.6k|        JanetParseState top = p->states[p->statecount - 1];
25437|  58.6k|        int32_t indent_col = (int32_t) top.column - 1;
25438|  58.6k|        uint8_t *r = bufstart, *end = r + buflen;
25439|       |        /* Unless there are only spaces before EOLs, disable reindenting */
25440|  58.6k|        int reindent = 1;
25441|  1.05M|        while (reindent && (r < end)) {
  ------------------
  |  Branch (25441:16): [True: 1.05M, False: 774]
  |  Branch (25441:28): [True: 997k, False: 57.8k]
  ------------------
25442|   997k|            if (*r++ == '\n') {
  ------------------
  |  Branch (25442:17): [True: 7.52k, False: 990k]
  ------------------
25443|  7.95k|                for (int32_t j = 0; (r < end) && (*r != '\n') && (j < indent_col); j++, r++) {
  ------------------
  |  Branch (25443:37): [True: 6.84k, False: 1.10k]
  |  Branch (25443:50): [True: 3.87k, False: 2.97k]
  |  Branch (25443:66): [True: 1.21k, False: 2.65k]
  ------------------
25444|  1.21k|                    if (*r != ' ') {
  ------------------
  |  Branch (25444:25): [True: 784, False: 432]
  ------------------
25445|    784|                        reindent = 0;
25446|    784|                        break;
25447|    784|                    }
25448|  1.21k|                }
25449|  7.52k|                if ((r + 1) < end && *r == '\r' && *(r + 1) == '\n') reindent = 1;
  ------------------
  |  Branch (25449:21): [True: 6.25k, False: 1.26k]
  |  Branch (25449:38): [True: 504, False: 5.75k]
  |  Branch (25449:52): [True: 299, False: 205]
  ------------------
25450|  7.52k|            }
25451|   997k|        }
25452|       |        /* Now reindent if able */
25453|  58.6k|        if (reindent) {
  ------------------
  |  Branch (25453:13): [True: 57.8k, False: 774]
  ------------------
25454|  57.8k|            uint8_t *w = bufstart;
25455|  57.8k|            r = bufstart;
25456|   984k|            while (r < end) {
  ------------------
  |  Branch (25456:20): [True: 926k, False: 57.8k]
  ------------------
25457|   926k|                if (*r == '\n') {
  ------------------
  |  Branch (25457:21): [True: 5.78k, False: 920k]
  ------------------
25458|  5.78k|                    *w++ = *r++;
25459|  6.17k|                    for (int32_t j = 0; (r < end) && (*r != '\n') && (j < indent_col); j++, r++);
  ------------------
  |  Branch (25459:41): [True: 5.07k, False: 1.10k]
  |  Branch (25459:54): [True: 3.04k, False: 2.02k]
  |  Branch (25459:70): [True: 390, False: 2.65k]
  ------------------
25460|  5.78k|                    if ((r + 1) < end && *r == '\r' && *(r + 1) == '\n') *w++ = *r++;
  ------------------
  |  Branch (25460:25): [True: 4.62k, False: 1.15k]
  |  Branch (25460:42): [True: 470, False: 4.15k]
  |  Branch (25460:56): [True: 289, False: 181]
  ------------------
25461|   920k|                } else {
25462|   920k|                    *w++ = *r++;
25463|   920k|                }
25464|   926k|            }
25465|  57.8k|            buflen = (int32_t)(w - bufstart);
25466|  57.8k|        }
25467|       |        /* Check for leading EOL so we can remove it */
25468|  58.6k|        if (buflen > 1 && bufstart[0] == '\r' && bufstart[1] == '\n') { /* Windows EOL */
  ------------------
  |  Branch (25468:13): [True: 56.1k, False: 2.43k]
  |  Branch (25468:27): [True: 738, False: 55.4k]
  |  Branch (25468:50): [True: 333, False: 405]
  ------------------
25469|    333|            buflen = buflen - 2;
25470|    333|            bufstart = bufstart + 2;
25471|  58.2k|        } else if (buflen > 0 && bufstart[0] == '\n') { /* Unix EOL */
  ------------------
  |  Branch (25471:20): [True: 58.2k, False: 0]
  |  Branch (25471:34): [True: 572, False: 57.7k]
  ------------------
25472|    572|            buflen--;
25473|    572|            bufstart++;
25474|    572|        }
25475|       |        /* Check for trailing EOL so we can remove it */
25476|  58.6k|        if (buflen > 1 && bufstart[buflen - 2] == '\r' && bufstart[buflen - 1] == '\n') { /* Windows EOL */
  ------------------
  |  Branch (25476:13): [True: 56.0k, False: 2.54k]
  |  Branch (25476:27): [True: 416, False: 55.6k]
  |  Branch (25476:59): [True: 19, False: 397]
  ------------------
25477|     19|            buflen = buflen - 2;
25478|  58.5k|        } else if (buflen > 0 && bufstart[buflen - 1] == '\n') { /* Unix EOL */
  ------------------
  |  Branch (25478:20): [True: 58.2k, False: 353]
  |  Branch (25478:34): [True: 751, False: 57.4k]
  ------------------
25479|    751|            buflen--;
25480|    751|        }
25481|  58.6k|    }
25482|   105k|    if (state->flags & PFLAG_BUFFER) {
  ------------------
  |  |25217|   105k|#define PFLAG_BUFFER 0x200
  ------------------
  |  Branch (25482:9): [True: 52.5k, False: 53.4k]
  ------------------
25483|  52.5k|        JanetBuffer *b = janet_buffer(buflen);
25484|  52.5k|        janet_buffer_push_bytes(b, bufstart, buflen);
25485|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25486|  53.4k|    } else {
25487|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25488|  53.4k|    }
25489|   105k|    p->bufcount = 0;
25490|   105k|    popstate(p, ret);
25491|   105k|    return 1;
25492|   105k|}
janet.c:comment:
25576|   172k|static int comment(JanetParser *p, JanetParseState *state, uint8_t c) {
25577|   172k|    (void) state;
25578|   172k|    if (c == '\n') {
  ------------------
  |  Branch (25578:9): [True: 933, False: 171k]
  ------------------
25579|    933|        p->statecount--;
25580|    933|        p->bufcount = 0;
25581|   171k|    } else {
25582|   171k|        push_buf(p, c);
25583|   171k|    }
25584|   172k|    return 1;
25585|   172k|}
janet.c:atsign:
25671|  84.3k|static int atsign(JanetParser *p, JanetParseState *state, uint8_t c) {
25672|  84.3k|    (void) state;
25673|  84.3k|    p->statecount--;
25674|  84.3k|    switch (c) {
25675|    706|        case '{':
  ------------------
  |  Branch (25675:9): [True: 706, False: 83.6k]
  ------------------
25676|    706|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |25216|    706|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |25220|    706|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |25224|    706|#define PFLAG_ATSYM 0x10000
  ------------------
25677|    706|            return 1;
25678|  2.05k|        case '"':
  ------------------
  |  Branch (25678:9): [True: 2.05k, False: 82.3k]
  ------------------
25679|  2.05k|            pushstate(p, stringchar, PFLAG_BUFFER | PFLAG_STRING);
  ------------------
  |  |25217|  2.05k|#define PFLAG_BUFFER 0x200
  ------------------
                          pushstate(p, stringchar, PFLAG_BUFFER | PFLAG_STRING);
  ------------------
  |  |25221|  2.05k|#define PFLAG_STRING 0x2000
  ------------------
25680|  2.05k|            return 1;
25681|  50.4k|        case '`':
  ------------------
  |  Branch (25681:9): [True: 50.4k, False: 33.9k]
  ------------------
25682|  50.4k|            pushstate(p, longstring, PFLAG_BUFFER | PFLAG_LONGSTRING);
  ------------------
  |  |25217|  50.4k|#define PFLAG_BUFFER 0x200
  ------------------
                          pushstate(p, longstring, PFLAG_BUFFER | PFLAG_LONGSTRING);
  ------------------
  |  |25222|  50.4k|#define PFLAG_LONGSTRING 0x4000
  ------------------
25683|  50.4k|            return 1;
25684|    468|        case '[':
  ------------------
  |  Branch (25684:9): [True: 468, False: 83.9k]
  ------------------
25685|    468|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |25216|    468|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |25219|    468|#define PFLAG_SQRBRACKETS 0x800
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |25224|    468|#define PFLAG_ATSYM 0x10000
  ------------------
25686|    468|            return 1;
25687|  18.4k|        case '(':
  ------------------
  |  Branch (25687:9): [True: 18.4k, False: 65.8k]
  ------------------
25688|  18.4k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |25216|  18.4k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |25218|  18.4k|#define PFLAG_PARENS 0x400
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |25224|  18.4k|#define PFLAG_ATSYM 0x10000
  ------------------
25689|  18.4k|            return 1;
25690|  12.1k|        default:
  ------------------
  |  Branch (25690:9): [True: 12.1k, False: 72.1k]
  ------------------
25691|  12.1k|            break;
25692|  84.3k|    }
25693|  12.1k|    pushstate(p, tokenchar, PFLAG_TOKEN);
  ------------------
  |  |25226|  12.1k|#define PFLAG_TOKEN 0x40000
  ------------------
25694|  12.1k|    push_buf(p, '@'); /* Push the leading at-sign that was dropped */
25695|  12.1k|    return 0;
25696|  84.3k|}
janet.c:longstring:
25627|  1.43M|static int longstring(JanetParser *p, JanetParseState *state, uint8_t c) {
25628|  1.43M|    if (state->flags & PFLAG_INSTRING) {
  ------------------
  |  |25625|  1.43M|#define PFLAG_INSTRING 0x100000
  ------------------
  |  Branch (25628:9): [True: 1.13M, False: 300k]
  ------------------
25629|       |        /* We are inside the long string */
25630|  1.13M|        if (c == '`') {
  ------------------
  |  Branch (25630:13): [True: 61.2k, False: 1.07M]
  ------------------
25631|  61.2k|            state->flags |= PFLAG_END_CANDIDATE;
  ------------------
  |  |25626|  61.2k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
25632|  61.2k|            state->flags &= ~PFLAG_INSTRING;
  ------------------
  |  |25625|  61.2k|#define PFLAG_INSTRING 0x100000
  ------------------
25633|  61.2k|            state->counter = 1; /* Use counter to keep track of number of '=' seen */
25634|  61.2k|            return 1;
25635|  61.2k|        }
25636|  1.07M|        push_buf(p, c);
25637|  1.07M|        return 1;
25638|  1.13M|    } else if (state->flags & PFLAG_END_CANDIDATE) {
  ------------------
  |  |25626|   300k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
  |  Branch (25638:16): [True: 159k, False: 140k]
  ------------------
25639|   159k|        int i;
25640|       |        /* We are checking a potential end of the string */
25641|   159k|        if (state->counter == state->argn) {
  ------------------
  |  Branch (25641:13): [True: 58.6k, False: 101k]
  ------------------
25642|  58.6k|            stringend(p, state);
25643|  58.6k|            return 0;
25644|  58.6k|        }
25645|   101k|        if (c == '`' && state->counter < state->argn) {
  ------------------
  |  Branch (25645:13): [True: 98.5k, False: 2.66k]
  |  Branch (25645:25): [True: 98.5k, False: 0]
  ------------------
25646|  98.5k|            state->counter++;
25647|  98.5k|            return 1;
25648|  98.5k|        }
25649|       |        /* Failed end candidate */
25650|  88.2k|        for (i = 0; i < state->counter; i++) {
  ------------------
  |  Branch (25650:21): [True: 85.5k, False: 2.66k]
  ------------------
25651|  85.5k|            push_buf(p, '`');
25652|  85.5k|        }
25653|  2.66k|        push_buf(p, c);
25654|  2.66k|        state->counter = 0;
25655|  2.66k|        state->flags &= ~PFLAG_END_CANDIDATE;
  ------------------
  |  |25626|  2.66k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
25656|  2.66k|        state->flags |= PFLAG_INSTRING;
  ------------------
  |  |25625|  2.66k|#define PFLAG_INSTRING 0x100000
  ------------------
25657|  2.66k|        return 1;
25658|   140k|    } else {
25659|       |        /* We are at beginning of string */
25660|   140k|        state->argn++;
25661|   140k|        if (c != '`') {
  ------------------
  |  Branch (25661:13): [True: 58.7k, False: 81.9k]
  ------------------
25662|  58.7k|            state->flags |= PFLAG_INSTRING;
  ------------------
  |  |25625|  58.7k|#define PFLAG_INSTRING 0x100000
  ------------------
25663|  58.7k|            push_buf(p, c);
25664|  58.7k|        }
25665|   140k|        return 1;
25666|   140k|    }
25667|  1.43M|}
janet.c:close_array:
25595|  1.22k|static Janet close_array(JanetParser *p, JanetParseState *state) {
25596|  1.22k|    JanetArray *array = janet_array(state->argn);
25597|  14.5k|    for (int32_t i = state->argn - 1; i >= 0; i--)
  ------------------
  |  Branch (25597:39): [True: 13.3k, False: 1.22k]
  ------------------
25598|  13.3k|        array->data[i] = p->args[--p->argcount];
25599|  1.22k|    array->count = state->argn;
25600|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25601|  1.22k|}
janet.c:close_tuple:
25587|  35.3k|static Janet close_tuple(JanetParser *p, JanetParseState *state, int32_t flag) {
25588|  35.3k|    Janet *ret = janet_tuple_begin(state->argn);
25589|  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)))
  |  |  ------------------
  ------------------
25590|  1.10M|    for (int32_t i = state->argn - 1; i >= 0; i--)
  ------------------
  |  Branch (25590:39): [True: 1.06M, False: 35.3k]
  ------------------
25591|  1.06M|        ret[i] = p->args[--p->argcount];
25592|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25593|  35.3k|}
janet.c:close_table:
25614|    649|static Janet close_table(JanetParser *p, JanetParseState *state) {
25615|    649|    JanetTable *table = janet_table(state->argn >> 1);
25616|  1.79k|    for (size_t i = p->argcount - state->argn; i < p->argcount; i += 2) {
  ------------------
  |  Branch (25616:48): [True: 1.14k, False: 649]
  ------------------
25617|  1.14k|        Janet key = p->args[i];
25618|  1.14k|        Janet value = p->args[i + 1];
25619|  1.14k|        janet_table_put(table, key, value);
25620|  1.14k|    }
25621|    649|    p->argcount -= state->argn;
25622|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25623|    649|}
janet.c:close_struct:
25603|  45.4k|static Janet close_struct(JanetParser *p, JanetParseState *state) {
25604|  45.4k|    JanetKV *st = janet_struct_begin(state->argn >> 1);
25605|  77.7k|    for (size_t i = p->argcount - state->argn; i < p->argcount; i += 2) {
  ------------------
  |  Branch (25605:48): [True: 32.3k, False: 45.4k]
  ------------------
25606|  32.3k|        Janet key = p->args[i];
25607|  32.3k|        Janet value = p->args[i + 1];
25608|  32.3k|        janet_struct_put(st, key, value);
25609|  32.3k|    }
25610|  45.4k|    p->argcount -= state->argn;
25611|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25612|  45.4k|}
janet.c:popstate:
25239|  1.60M|static void popstate(JanetParser *p, Janet val) {
25240|  6.11M|    for (;;) {
25241|  6.11M|        JanetParseState top = p->states[--p->statecount];
25242|  6.11M|        JanetParseState *newtop = p->states + p->statecount - 1;
25243|       |        /* Source mapping info */
25244|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25245|  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)))
  |  |  ------------------
  ------------------
25246|  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)))
  |  |  ------------------
  ------------------
25247|  4.54M|        }
25248|  6.11M|        if (newtop->flags & PFLAG_CONTAINER) {
  ------------------
  |  |25216|  6.11M|#define PFLAG_CONTAINER 0x100
  ------------------
  |  Branch (25248:13): [True: 1.60M, False: 4.50M]
  ------------------
25249|  1.60M|            newtop->argn++;
25250|       |            /* Keep track of number of values in the root state */
25251|  1.60M|            if (p->statecount == 1) {
  ------------------
  |  Branch (25251:17): [True: 239k, False: 1.36M]
  ------------------
25252|   239k|                p->pending++;
25253|       |                /* Root items are always wrapped in a tuple for source map info. */
25254|   239k|                const Janet *tup = janet_tuple_n(&val, 1);
25255|   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)))
  |  |  ------------------
  ------------------
25256|   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)))
  |  |  ------------------
  ------------------
25257|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25258|   239k|            }
25259|  1.60M|            push_arg(p, val);
25260|  1.60M|            return;
25261|  4.50M|        } else if (newtop->flags & PFLAG_READERMAC) {
  ------------------
  |  |25223|  4.50M|#define PFLAG_READERMAC 0x8000
  ------------------
  |  Branch (25261:20): [True: 4.50M, False: 0]
  ------------------
25262|  4.50M|            Janet *t = janet_tuple_begin(2);
25263|  4.50M|            int c = newtop->flags & 0xFF;
25264|  4.50M|            const char *which =
25265|  4.50M|                (c == '\'') ? "quote" :
  ------------------
  |  Branch (25265:17): [True: 231k, False: 4.27M]
  ------------------
25266|  4.50M|                (c == ',') ? "unquote" :
  ------------------
  |  Branch (25266:17): [True: 16.0k, False: 4.26M]
  ------------------
25267|  4.27M|                (c == ';') ? "splice" :
  ------------------
  |  Branch (25267:17): [True: 15.3k, False: 4.24M]
  ------------------
25268|  4.26M|                (c == '|') ? "short-fn" :
  ------------------
  |  Branch (25268:17): [True: 1.85M, False: 2.39M]
  ------------------
25269|  4.24M|                (c == '~') ? "quasiquote" : "<unknown>";
  ------------------
  |  Branch (25269:17): [True: 2.39M, False: 0]
  ------------------
25270|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25271|  4.50M|            t[1] = val;
25272|       |            /* Quote source mapping info */
25273|  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)))
  |  |  ------------------
  ------------------
25274|  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)))
  |  |  ------------------
  ------------------
25275|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25276|  4.50M|        } else {
25277|      0|            return;
25278|      0|        }
25279|  6.11M|    }
25280|  1.60M|}
janet.c:parsergc:
25956|   109k|static int parsergc(void *p, size_t size) {
25957|   109k|    JanetParser *parser = (JanetParser *)p;
25958|   109k|    (void) size;
25959|   109k|    janet_parser_deinit(parser);
25960|   109k|    return 0;
25961|   109k|}
janet.c:parsermark:
25943|  1.22k|static int parsermark(void *p, size_t size) {
25944|  1.22k|    size_t i;
25945|  1.22k|    JanetParser *parser = (JanetParser *)p;
25946|  1.22k|    (void) size;
25947|  1.22k|    for (i = 0; i < parser->argcount; i++) {
  ------------------
  |  Branch (25947:17): [True: 0, False: 1.22k]
  ------------------
25948|      0|        janet_mark(parser->args[i]);
25949|      0|    }
25950|  1.22k|    if (parser->flag & JANET_PARSER_GENERATED_ERROR) {
  ------------------
  |  |25112|  1.22k|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
  |  Branch (25950:9): [True: 1, False: 1.22k]
  ------------------
25951|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25952|      1|    }
25953|  1.22k|    return 0;
25954|  1.22k|}
janet.c:tokenchar:
25523|  5.43M|static int tokenchar(JanetParser *p, JanetParseState *state, uint8_t c) {
25524|  5.43M|    Janet ret;
25525|  5.43M|    double numval;
25526|  5.43M|    int32_t blen;
25527|  5.43M|    if (janet_is_symbol_char(c)) {
  ------------------
  |  Branch (25527:9): [True: 4.02M, False: 1.41M]
  ------------------
25528|  4.02M|        push_buf(p, (uint8_t) c);
25529|  4.02M|        if (c > 127) state->argn = 1; /* Use to indicate non ascii */
  ------------------
  |  Branch (25529:13): [True: 19.8k, False: 4.00M]
  ------------------
25530|  4.02M|        return 1;
25531|  4.02M|    }
25532|       |    /* Token finished */
25533|  1.41M|    blen = (int32_t) p->bufcount;
25534|  1.41M|    int start_dig = p->buf[0] >= '0' && p->buf[0] <= '9';
  ------------------
  |  Branch (25534:21): [True: 518k, False: 894k]
  |  Branch (25534:41): [True: 49.7k, False: 468k]
  ------------------
25535|  1.41M|    int start_num = start_dig || p->buf[0] == '-' || p->buf[0] == '+' || p->buf[0] == '.';
  ------------------
  |  Branch (25535:21): [True: 49.7k, False: 1.36M]
  |  Branch (25535:34): [True: 369k, False: 994k]
  |  Branch (25535:54): [True: 97.5k, False: 897k]
  |  Branch (25535:74): [True: 5.78k, False: 891k]
  ------------------
25536|  1.41M|    if (p->buf[0] == ':') {
  ------------------
  |  Branch (25536:9): [True: 29.0k, False: 1.38M]
  ------------------
25537|       |        /* Don't do full utf-8 check unless we have seen non ascii characters. */
25538|  29.0k|        int valid = (!state->argn) || janet_valid_utf8(p->buf + 1, blen - 1);
  ------------------
  |  Branch (25538:21): [True: 28.9k, False: 84]
  |  Branch (25538:39): [True: 67, False: 17]
  ------------------
25539|  29.0k|        if (!valid) {
  ------------------
  |  Branch (25539:13): [True: 17, False: 28.9k]
  ------------------
25540|     17|            p->error = "invalid utf-8 in keyword";
25541|     17|            return 0;
25542|     17|        }
25543|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25544|  28.9k|#ifdef JANET_INT_TYPES
25545|  1.38M|    } else if (start_num && !janet_scan_numeric(p->buf, blen, &ret)) {
  ------------------
  |  Branch (25545:16): [True: 522k, False: 862k]
  |  Branch (25545:29): [True: 53.7k, False: 468k]
  ------------------
25546|  53.7k|        (void) numval;
25547|       |#else
25548|       |    } else if (start_num && !janet_scan_number(p->buf, blen, &numval)) {
25549|       |        ret = janet_wrap_number(numval);
25550|       |#endif
25551|  1.33M|    } else if (!check_str_const("nil", p->buf, blen)) {
  ------------------
  |  Branch (25551:16): [True: 337, False: 1.33M]
  ------------------
25552|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25553|  1.33M|    } else if (!check_str_const("false", p->buf, blen)) {
  ------------------
  |  Branch (25553:16): [True: 75, False: 1.33M]
  ------------------
25554|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25555|  1.33M|    } else if (!check_str_const("true", p->buf, blen)) {
  ------------------
  |  Branch (25555:16): [True: 1.02k, False: 1.32M]
  ------------------
25556|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25557|  1.32M|    } else {
25558|  1.32M|        if (start_dig) {
  ------------------
  |  Branch (25558:13): [True: 185, False: 1.32M]
  ------------------
25559|    185|            p->error = "symbol literal cannot start with a digit";
25560|    185|            return 0;
25561|  1.32M|        } else {
25562|       |            /* Don't do full utf-8 check unless we have seen non ascii characters. */
25563|  1.32M|            int valid = (!state->argn) || janet_valid_utf8(p->buf, blen);
  ------------------
  |  Branch (25563:25): [True: 1.32M, False: 4.79k]
  |  Branch (25563:43): [True: 4.20k, False: 583]
  ------------------
25564|  1.32M|            if (!valid) {
  ------------------
  |  Branch (25564:17): [True: 583, False: 1.32M]
  ------------------
25565|    583|                p->error = "invalid utf-8 in symbol";
25566|    583|                return 0;
25567|    583|            }
25568|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25569|  1.32M|        }
25570|  1.32M|    }
25571|  1.41M|    p->bufcount = 0;
25572|  1.41M|    popstate(p, ret);
25573|  1.41M|    return 0;
25574|  1.41M|}
janet.c:check_str_const:
25511|  3.99M|static int check_str_const(const char *cstr, const uint8_t *str, int32_t len) {
25512|  3.99M|    int32_t index;
25513|  4.01M|    for (index = 0; index < len; index++) {
  ------------------
  |  Branch (25513:21): [True: 4.00M, False: 14.0k]
  ------------------
25514|  4.00M|        uint8_t c = str[index];
25515|  4.00M|        uint8_t k = ((const uint8_t *)cstr)[index];
25516|  4.00M|        if (c < k) return -1;
  ------------------
  |  Branch (25516:13): [True: 3.77M, False: 230k]
  ------------------
25517|   230k|        if (c > k) return 1;
  ------------------
  |  Branch (25517:13): [True: 206k, False: 23.8k]
  ------------------
25518|  23.8k|        if (k == '\0') break;
  ------------------
  |  Branch (25518:13): [True: 0, False: 23.8k]
  ------------------
25519|  23.8k|    }
25520|  14.0k|    return (cstr[index] == '\0') ? 0 : -1;
  ------------------
  |  Branch (25520:12): [True: 1.43k, False: 12.5k]
  ------------------
25521|  3.99M|}
janet.c:parser_state_delimiters:
26261|   102k|static Janet parser_state_delimiters(const JanetParser *_p) {
26262|   102k|    JanetParser *p = (JanetParser *)_p;
26263|   102k|    size_t i;
26264|   102k|    const uint8_t *str;
26265|   102k|    size_t oldcount;
26266|   102k|    oldcount = p->bufcount;
26267|   204k|    for (i = 0; i < p->statecount; i++) {
  ------------------
  |  Branch (26267:17): [True: 102k, False: 102k]
  ------------------
26268|   102k|        JanetParseState *s = p->states + i;
26269|   102k|        if (s->flags & PFLAG_PARENS) {
  ------------------
  |  |25218|   102k|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (26269:13): [True: 0, False: 102k]
  ------------------
26270|      0|            push_buf(p, '(');
26271|   102k|        } else if (s->flags & PFLAG_SQRBRACKETS) {
  ------------------
  |  |25219|   102k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (26271:20): [True: 0, False: 102k]
  ------------------
26272|      0|            push_buf(p, '[');
26273|   102k|        } else if (s->flags & PFLAG_CURLYBRACKETS) {
  ------------------
  |  |25220|   102k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (26273:20): [True: 0, False: 102k]
  ------------------
26274|      0|            push_buf(p, '{');
26275|   102k|        } else if (s->flags & PFLAG_STRING) {
  ------------------
  |  |25221|   102k|#define PFLAG_STRING 0x2000
  ------------------
  |  Branch (26275:20): [True: 0, False: 102k]
  ------------------
26276|      0|            push_buf(p, '"');
26277|   102k|        } else if (s->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |25222|   102k|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (26277:20): [True: 0, False: 102k]
  ------------------
26278|      0|            int32_t i;
26279|      0|            for (i = 0; i < s->argn; i++) {
  ------------------
  |  Branch (26279:25): [True: 0, False: 0]
  ------------------
26280|      0|                push_buf(p, '`');
26281|      0|            }
26282|      0|        }
26283|   102k|    }
26284|       |    /* avoid ptr arithmetic on NULL */
26285|   102k|    str = janet_string(oldcount ? p->buf + oldcount : p->buf, (int32_t)(p->bufcount - oldcount));
  ------------------
  |  Branch (26285:24): [True: 0, False: 102k]
  ------------------
26286|   102k|    p->bufcount = oldcount;
26287|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26288|   102k|}
janet.c:parserget:
26379|   714k|static int parserget(void *p, Janet key, Janet *out) {
26380|   714k|    (void) p;
26381|   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 (26381:9): [True: 0, False: 714k]
  ------------------
26382|   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))
  ------------------
26383|   714k|}
janet.c:size_padded:
28042|    970|static size_t size_padded(size_t offset, size_t size) {
28043|    970|    size_t x = size + offset - 1;
28044|    970|    return x - (x % size);
28045|    970|}
janet.c:compile_peg:
28308|    645|static JanetPeg *compile_peg(Janet x) {
28309|    645|    Builder builder;
28310|    645|    builder.grammar = janet_table(0);
28311|    645|    builder.default_grammar = NULL;
28312|    645|    {
28313|    645|        Janet default_grammarv = janet_dyn("peg-grammar");
28314|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28315|    645|            builder.default_grammar = janet_unwrap_table(default_grammarv);
  ------------------
  |  |  856|    645|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
28316|    645|        }
28317|    645|    }
28318|    645|    builder.tags = janet_table(0);
28319|    645|    builder.constants = NULL;
28320|    645|    builder.bytecode = NULL;
28321|    645|    builder.nexttag = 1;
28322|    645|    builder.form = x;
28323|    645|    builder.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  291|    645|#define JANET_RECURSION_GUARD 1024
  ------------------
28324|    645|    builder.has_backref = 0;
28325|    645|    peg_compile1(&builder, x);
28326|    645|    JanetPeg *peg = make_peg(&builder);
28327|    645|    builder_cleanup(&builder);
28328|    645|    return peg;
28329|    645|}
janet.c:peg_compile1:
27859|  2.43k|static uint32_t peg_compile1(Builder *b, Janet peg) {
27860|       |
27861|       |    /* Keep track of the form being compiled for error purposes */
27862|  2.43k|    Janet old_form = b->form;
27863|  2.43k|    JanetTable *old_grammar = b->grammar;
27864|  2.43k|    b->form = peg;
27865|       |
27866|       |    /* Resolve keyword references */
27867|  2.43k|    int i = JANET_RECURSION_GUARD;
  ------------------
  |  |  291|  2.43k|#define JANET_RECURSION_GUARD 1024
  ------------------
27868|  2.43k|    JanetTable *grammar = old_grammar;
27869|  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 (27869:12): [True: 2.55k, False: 0]
  ------------------
27870|    119|        Janet nextPeg = janet_table_get_ex(grammar, peg, &grammar);
27871|    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 (27871:13): [True: 0, False: 119]
  ------------------
27872|    119|            nextPeg = (b->default_grammar == NULL)
  ------------------
  |  Branch (27872:23): [True: 0, False: 119]
  ------------------
27873|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27874|    119|                      : janet_table_get(b->default_grammar, peg);
27875|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27876|      0|                peg_panic(b, "unknown rule");
27877|      0|            }
27878|    119|        }
27879|    119|        peg = nextPeg;
27880|    119|        b->form = peg;
27881|    119|        b->grammar = grammar;
27882|    119|    }
27883|  2.43k|    if (i == 0)
  ------------------
  |  Branch (27883:9): [True: 0, False: 2.43k]
  ------------------
27884|      0|        peg_panic(b, "reference chain too deep");
27885|       |
27886|       |    /* Check cache - for tuples we check only the local cache, as
27887|       |     * in a different grammar, the same tuple can compile to a different
27888|       |     * rule - for example, (+ :a :b) depends on whatever :a and :b are bound to. */
27889|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27890|  2.43k|                  ? janet_table_rawget(grammar, peg)
27891|  2.43k|                  : janet_table_get(grammar, peg);
27892|  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 (27892:9): [True: 133, False: 2.30k]
  ------------------
27893|    133|        b->form = old_form;
27894|    133|        b->grammar = old_grammar;
27895|    133|        return (uint32_t) janet_unwrap_number(check);
  ------------------
  |  |  834|    133|#define janet_unwrap_number(x) ((x).number)
  ------------------
27896|    133|    }
27897|       |
27898|       |    /* Check depth */
27899|  2.30k|    if (b->depth-- == 0)
  ------------------
  |  Branch (27899:9): [True: 0, False: 2.30k]
  ------------------
27900|      0|        peg_panic(b, "peg grammar recursed too deeply");
27901|       |
27902|       |    /* The final rule to return */
27903|  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]
  |  |  ------------------
  ------------------
27904|       |
27905|       |    /* Add to cache. Do not cache structs, as we don't yet know
27906|       |     * what rule they will return! We can just as effectively cache
27907|       |     * the structs main rule. */
27908|  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 (27908:9): [True: 2.29k, False: 12]
  ------------------
27909|  2.29k|        JanetTable *which_grammar = grammar;
27910|       |        /* If we are a primitive pattern, add to the global cache (root grammar table) */
27911|  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 (27911:13): [True: 780, False: 1.51k]
  ------------------
27912|    780|            while (which_grammar->proto)
  ------------------
  |  Branch (27912:20): [True: 0, False: 780]
  ------------------
27913|      0|                which_grammar = which_grammar->proto;
27914|    780|        }
27915|  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)
  ------------------
27916|  2.29k|    }
27917|       |
27918|  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 (27918:13): [True: 2.13k, False: 167]
  ------------------
27919|     23|        default:
  ------------------
  |  Branch (27919:9): [True: 23, False: 2.28k]
  ------------------
27920|     23|            peg_panic(b, "unexpected peg source");
27921|      0|            return 0;
27922|       |
27923|      7|        case JANET_BOOLEAN: {
  ------------------
  |  Branch (27923:9): [True: 7, False: 2.29k]
  ------------------
27924|      7|            int n = janet_unwrap_boolean(peg);
  ------------------
  |  |  833|      7|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
27925|      7|            Reserve r = reserve(b, 2);
27926|      7|            emit_1(r, n ? RULE_NCHAR : RULE_NOTNCHAR, 0);
  ------------------
  |  Branch (27926:23): [True: 3, False: 4]
  ------------------
27927|      7|            break;
27928|      0|        }
27929|    167|        case JANET_NUMBER: {
  ------------------
  |  Branch (27929:9): [True: 167, False: 2.13k]
  ------------------
27930|    167|            int32_t n = peg_getinteger(b, peg);
27931|    167|            Reserve r = reserve(b, 2);
27932|    167|            if (n < 0) {
  ------------------
  |  Branch (27932:17): [True: 31, False: 136]
  ------------------
27933|     31|                emit_1(r, RULE_NOTNCHAR, -n);
27934|    136|            } else {
27935|    136|                emit_1(r, RULE_NCHAR, n);
27936|    136|            }
27937|    167|            break;
27938|      0|        }
27939|    389|        case JANET_STRING: {
  ------------------
  |  Branch (27939:9): [True: 389, False: 1.91k]
  ------------------
27940|    389|            const uint8_t *str = janet_unwrap_string(peg);
  ------------------
  |  |  858|    389|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
27941|    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)))
  |  |  ------------------
  ------------------
27942|    389|            emit_bytes(b, RULE_LITERAL, len, str);
27943|    389|            break;
27944|      0|        }
27945|    188|        case JANET_BUFFER: {
  ------------------
  |  Branch (27945:9): [True: 188, False: 2.11k]
  ------------------
27946|    188|            const JanetBuffer *buf = janet_unwrap_buffer(peg);
  ------------------
  |  |  857|    188|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
27947|    188|            emit_bytes(b, RULE_LITERAL, buf->count, buf->data);
27948|    188|            break;
27949|      0|        }
27950|      6|        case JANET_TABLE: {
  ------------------
  |  Branch (27950:9): [True: 6, False: 2.30k]
  ------------------
27951|       |            /* Build grammar table */
27952|      6|            JanetTable *new_grammar = janet_table_clone(janet_unwrap_table(peg));
  ------------------
  |  |  856|      6|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
27953|      6|            new_grammar->proto = grammar;
27954|      6|            b->grammar = grammar = new_grammar;
27955|       |            /* Run the main rule */
27956|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27957|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27958|      6|                peg_panic(b, "grammar requires :main rule");
27959|      0|            rule = peg_compile1(b, main_rule);
27960|      0|            break;
27961|      6|        }
27962|     12|        case JANET_STRUCT: {
  ------------------
  |  Branch (27962:9): [True: 12, False: 2.29k]
  ------------------
27963|       |            /* Build grammar table */
27964|     12|            const JanetKV *st = janet_unwrap_struct(peg);
  ------------------
  |  |  852|     12|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
27965|     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)))
  |  |  ------------------
  ------------------
27966|    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 (27966:33): [True: 193, False: 12]
  ------------------
27967|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27968|     14|                    janet_table_put(new_grammar, st[i].key, st[i].value);
27969|     14|                }
27970|    193|            }
27971|     12|            new_grammar->proto = grammar;
27972|     12|            b->grammar = grammar = new_grammar;
27973|       |            /* Run the main rule */
27974|     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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27975|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27976|     12|                peg_panic(b, "grammar requires :main rule");
27977|      0|            rule = peg_compile1(b, main_rule);
27978|      0|            break;
27979|     12|        }
27980|  1.51k|        case JANET_TUPLE: {
  ------------------
  |  Branch (27980:9): [True: 1.51k, False: 792]
  ------------------
27981|  1.51k|            const Janet *tup = janet_unwrap_tuple(peg);
  ------------------
  |  |  853|  1.51k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
27982|  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)))
  |  |  ------------------
  ------------------
27983|  1.51k|            if (len == 0) peg_panic(b, "tuple in grammar must have non-zero length");
  ------------------
  |  Branch (27983:17): [True: 1, False: 1.51k]
  ------------------
27984|  1.51k|            if (janet_checkint(tup[0])) {
  ------------------
  |  Branch (27984:17): [True: 59, False: 1.45k]
  ------------------
27985|     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)
  |  |  ------------------
  ------------------
27986|     59|                if (n < 0) {
  ------------------
  |  Branch (27986:21): [True: 4, False: 55]
  ------------------
27987|      4|                    peg_panicf(b, "expected non-negative integer, got %d", n);
  ------------------
  |  |27300|      4|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27988|      4|                }
27989|     55|                spec_repeat(b, len, tup);
27990|     55|                break;
27991|     59|            }
27992|  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 (27992:17): [True: 7, False: 1.44k]
  ------------------
27993|      7|                peg_panicf(b, "expected grammar command, found %v", tup[0]);
  ------------------
  |  |27300|      7|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27994|  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))
  ------------------
27995|  1.44k|            const SpecialPair *sp = janet_strbinsearch(
27996|  1.44k|                                        &peg_specials,
27997|  1.44k|                                        sizeof(peg_specials) / sizeof(SpecialPair),
27998|  1.44k|                                        sizeof(SpecialPair),
27999|  1.44k|                                        sym);
28000|  1.44k|            if (sp) {
  ------------------
  |  Branch (28000:17): [True: 1.38k, False: 59]
  ------------------
28001|  1.38k|                sp->special(b, len - 1, tup + 1);
28002|  1.38k|            } else {
28003|     59|                peg_panicf(b, "unknown special %S", sym);
  ------------------
  |  |27300|     59|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
28004|     59|            }
28005|  1.38k|            break;
28006|  1.44k|        }
28007|  2.30k|    }
28008|       |
28009|       |    /* Increase depth again */
28010|  1.96k|    b->depth++;
28011|  1.96k|    b->form = old_form;
28012|  1.96k|    b->grammar = old_grammar;
28013|  1.96k|    return rule;
28014|  2.30k|}
janet.c:peg_panic:
27295|    160|JANET_NO_RETURN static void peg_panic(Builder *b, const char *msg) {
27296|    160|    builder_cleanup(b);
27297|    160|    janet_panicf("grammar error in %p, %s", b->form, msg);
27298|    160|}
janet.c:reserve:
27386|  1.40k|static Reserve reserve(Builder *b, int32_t size) {
27387|  1.40k|    Reserve r;
27388|  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]
  |  |  ------------------
  ------------------
27389|  1.40k|    r.builder = b;
27390|  1.40k|    r.size = size;
27391|  5.84k|    for (int32_t i = 0; i < size; i++)
  ------------------
  |  Branch (27391:25): [True: 4.43k, False: 1.40k]
  ------------------
27392|       |        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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27393|  1.40k|    return r;
27394|  1.40k|}
janet.c:emit_1:
27415|    224|static void emit_1(Reserve r, uint32_t op, uint32_t arg) {
27416|    224|    emit_rule(r, op, 1, &arg);
27417|    224|}
janet.c:emit_rule:
27397|  1.22k|static void emit_rule(Reserve r, int32_t op, int32_t n, const uint32_t *body) {
27398|  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]
  |  |  ------------------
  ------------------
27399|  1.22k|    r.builder->bytecode[r.index] = op;
27400|  1.22k|    memcpy(r.builder->bytecode + r.index + 1, body, n * sizeof(uint32_t));
27401|  1.22k|}
janet.c:peg_getinteger:
27336|    240|static int32_t peg_getinteger(Builder *b, Janet x) {
27337|    240|    if (!janet_checkint(x))
  ------------------
  |  Branch (27337:9): [True: 8, False: 232]
  ------------------
27338|      8|        peg_panicf(b, "expected integer, got %v", x);
  ------------------
  |  |27300|      8|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27339|    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)
  |  |  ------------------
  ------------------
27340|    240|}
janet.c:emit_bytes:
27404|    577|static void emit_bytes(Builder *b, uint32_t op, int32_t len, const uint8_t *bytes) {
27405|    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]
  |  |  ------------------
  ------------------
27406|    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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27407|    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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27408|    577|    int32_t words = ((len + 3) >> 2);
27409|  90.6k|    for (int32_t i = 0; i < words; i++)
  ------------------
  |  Branch (27409:25): [True: 90.0k, False: 577]
  ------------------
27410|       |        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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27411|    577|    memcpy(b->bytecode + next_rule + 2, bytes, len);
27412|    577|}
janet.c:spec_repeat:
27559|     55|static void spec_repeat(Builder *b, int32_t argc, const Janet *argv) {
27560|     55|    peg_fixarity(b, argc, 2);
27561|     55|    Reserve r = reserve(b, 4);
27562|     55|    int32_t n = peg_getnat(b, argv[0]);
27563|     55|    uint32_t subrule = peg_compile1(b, argv[1]);
27564|     55|    emit_3(r, RULE_BETWEEN, n, n, subrule);
27565|     55|}
janet.c:peg_fixarity:
27302|    107|static void peg_fixarity(Builder *b, int32_t argc, int32_t arity) {
27303|    107|    if (argc != arity) {
  ------------------
  |  Branch (27303:9): [True: 7, False: 100]
  ------------------
27304|      7|        peg_panicf(b, "expected %d argument%s, got %d",
  ------------------
  |  |27300|     14|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  |  |  ------------------
  |  |  |  Branch (27300:71): [True: 4, False: 3]
  |  |  ------------------
  ------------------
27305|      7|                   arity,
27306|      7|                   arity == 1 ? "" : "s",
27307|      7|                   argc);
27308|      7|    }
27309|    107|}
janet.c:peg_getnat:
27342|     52|static int32_t peg_getnat(Builder *b, Janet x) {
27343|     52|    int32_t i = peg_getinteger(b, x);
27344|     52|    if (i < 0)
  ------------------
  |  Branch (27344:9): [True: 0, False: 52]
  ------------------
27345|      0|        peg_panicf(b, "expected non-negative integer, got %v", x);
  ------------------
  |  |27300|      0|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27346|     52|    return i;
27347|     52|}
janet.c:emit_3:
27422|     69|static void emit_3(Reserve r, uint32_t op, uint32_t arg1, uint32_t arg2, uint32_t arg3) {
27423|     69|    uint32_t arr[3] = {arg1, arg2, arg3};
27424|     69|    emit_rule(r, op, 3, arr);
27425|     69|}
janet.c:spec_not:
27575|     11|static void spec_not(Builder *b, int32_t argc, const Janet *argv) {
27576|     11|    spec_onerule(b, argc, argv, RULE_NOT);
27577|     11|}
janet.c:spec_onerule:
27568|     11|static void spec_onerule(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
27569|     11|    peg_fixarity(b, argc, 1);
27570|     11|    Reserve r = reserve(b, 2);
27571|     11|    uint32_t rule = peg_compile1(b, argv[0]);
27572|     11|    emit_1(r, op, rule);
27573|     11|}
janet.c:spec_position:
27667|     12|static void spec_position(Builder *b, int32_t argc, const Janet *argv) {
27668|     12|    spec_tag1(b, argc, argv, RULE_POSITION);
27669|     12|}
janet.c:spec_tag1:
27659|     12|static void spec_tag1(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
27660|     12|    peg_arity(b, argc, 0, 1);
27661|     12|    Reserve r = reserve(b, 2);
27662|     12|    uint32_t tag = (argc) ? emit_tag(b, argv[0]) : 0;
  ------------------
  |  Branch (27662:20): [True: 2, False: 10]
  ------------------
27663|     12|    (void) argv;
27664|     12|    emit_1(r, op, tag);
27665|     12|}
janet.c:peg_arity:
27311|  1.16k|static void peg_arity(Builder *b, int32_t arity, int32_t min, int32_t max) {
27312|  1.16k|    if (min >= 0 && arity < min)
  ------------------
  |  Branch (27312:9): [True: 1.16k, False: 0]
  |  Branch (27312:21): [True: 4, False: 1.16k]
  ------------------
27313|      4|        peg_panicf(b, "arity mismatch, expected at least %d, got %d", min, arity);
  ------------------
  |  |27300|      4|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27314|  1.16k|    if (max >= 0 && arity > max)
  ------------------
  |  Branch (27314:9): [True: 1.07k, False: 81]
  |  Branch (27314:21): [True: 23, False: 1.05k]
  ------------------
27315|     23|        peg_panicf(b, "arity mismatch, expected at most %d, got %d", max, arity);
  ------------------
  |  |27300|     23|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27316|  1.16k|}
janet.c:emit_tag:
27359|      6|static uint32_t emit_tag(Builder *b, Janet t) {
27360|      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 (27360:9): [True: 6, False: 0]
  ------------------
27361|      6|        peg_panicf(b, "expected keyword for capture tag, got %v", t);
  ------------------
  |  |27300|      6|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27362|      0|    Janet check = janet_table_get(b->tags, t);
27363|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27364|      0|        uint32_t tag = b->nexttag++;
27365|      0|        if (tag > 255) {
  ------------------
  |  Branch (27365:13): [True: 0, False: 0]
  ------------------
27366|      0|            peg_panic(b, "too many tags - up to 255 tags are supported per peg");
27367|      0|        }
27368|      0|        Janet val = janet_wrap_number(tag);
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
27369|      0|        janet_table_put(b->tags, t, val);
27370|      0|        return tag;
27371|      0|    } else {
27372|      0|        return (uint32_t) janet_unwrap_number(check);
  ------------------
  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  ------------------
27373|      0|    }
27374|      0|}
janet.c:spec_accumulate:
27612|     15|static void spec_accumulate(Builder *b, int32_t argc, const Janet *argv) {
27613|     15|    spec_cap1(b, argc, argv, RULE_ACCUMULATE);
27614|     15|}
janet.c:spec_cap1:
27601|    993|static void spec_cap1(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
27602|    993|    peg_arity(b, argc, 1, 2);
27603|    993|    Reserve r = reserve(b, 3);
27604|    993|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (27604:20): [True: 1, False: 992]
  ------------------
27605|    993|    uint32_t rule = peg_compile1(b, argv[0]);
27606|    993|    emit_2(r, op, rule, tag);
27607|    993|}
janet.c:emit_2:
27418|    867|static void emit_2(Reserve r, uint32_t op, uint32_t arg1, uint32_t arg2) {
27419|    867|    uint32_t arr[2] = {arg1, arg2};
27420|    867|    emit_rule(r, op, 2, arr);
27421|    867|}
janet.c:spec_sequence:
27490|     79|static void spec_sequence(Builder *b, int32_t argc, const Janet *argv) {
27491|     79|    spec_variadic(b, argc, argv, RULE_SEQUENCE);
27492|     79|}
janet.c:spec_variadic:
27475|    172|static void spec_variadic(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
27476|    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]
  |  |  ------------------
  ------------------
27477|    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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27478|    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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27479|  2.34k|    for (int32_t i = 0; i < argc; i++)
  ------------------
  |  Branch (27479:25): [True: 2.17k, False: 172]
  ------------------
27480|  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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27481|    824|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (27481:25): [True: 652, False: 172]
  ------------------
27482|    652|        uint32_t rulei = peg_compile1(b, argv[i]);
27483|    652|        b->bytecode[rule + 2 + i] = rulei;
27484|    652|    }
27485|    172|}
janet.c:spec_choice:
27487|     93|static void spec_choice(Builder *b, int32_t argc, const Janet *argv) {
27488|     93|    spec_variadic(b, argc, argv, RULE_CHOICE);
27489|     93|}
janet.c:spec_reference:
27650|      3|static void spec_reference(Builder *b, int32_t argc, const Janet *argv) {
27651|      3|    peg_arity(b, argc, 1, 2);
27652|      3|    Reserve r = reserve(b, 3);
27653|      3|    uint32_t search = emit_tag(b, argv[0]);
27654|      3|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (27654:20): [True: 0, False: 3]
  ------------------
27655|      3|    b->has_backref = 1;
27656|      3|    emit_2(r, RULE_GETTAG, search, tag);
27657|      3|}
janet.c:spec_replace:
27705|     41|static void spec_replace(Builder *b, int32_t argc, const Janet *argv) {
27706|     41|    peg_arity(b, argc, 2, 3);
27707|     41|    Reserve r = reserve(b, 4);
27708|     41|    uint32_t subrule = peg_compile1(b, argv[0]);
27709|     41|    uint32_t constant = emit_constant(b, argv[1]);
27710|     41|    uint32_t tag = (argc == 3) ? emit_tag(b, argv[2]) : 0;
  ------------------
  |  Branch (27710:20): [True: 2, False: 39]
  ------------------
27711|     41|    emit_3(r, RULE_REPLACE, subrule, constant, tag);
27712|     41|}
janet.c:emit_constant:
27353|     24|static uint32_t emit_constant(Builder *b, Janet c) {
27354|     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]
  |  |  ------------------
  ------------------
27355|       |    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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27356|     24|    return cindex;
27357|     24|}
janet.c:spec_capture:
27609|    978|static void spec_capture(Builder *b, int32_t argc, const Janet *argv) {
27610|    978|    spec_cap1(b, argc, argv, RULE_CAPTURE);
27611|    978|}
janet.c:spec_look:
27465|     33|static void spec_look(Builder *b, int32_t argc, const Janet *argv) {
27466|     33|    peg_arity(b, argc, 1, 2);
27467|     33|    Reserve r = reserve(b, 3);
27468|     33|    int32_t rulearg = argc == 2 ? 1 : 0;
  ------------------
  |  Branch (27468:23): [True: 21, False: 12]
  ------------------
27469|     33|    int32_t offset = argc == 2 ? peg_getinteger(b, argv[0]) : 0;
  ------------------
  |  Branch (27469:22): [True: 21, False: 12]
  ------------------
27470|     33|    uint32_t subrule = peg_compile1(b, argv[rulearg]);
27471|     33|    emit_2(r, RULE_LOOK, (uint32_t) offset, subrule);
27472|     33|}
janet.c:spec_opt:
27552|      3|static void spec_opt(Builder *b, int32_t argc, const Janet *argv) {
27553|      3|    peg_fixarity(b, argc, 1);
27554|      3|    Reserve r = reserve(b, 4);
27555|      3|    uint32_t subrule = peg_compile1(b, argv[0]);
27556|      3|    emit_3(r, RULE_BETWEEN, 0, 1, subrule);
27557|      3|}
janet.c:spec_debug:
27697|      1|static void spec_debug(Builder *b, int32_t argc, const Janet *argv) {
27698|      1|    peg_arity(b, argc, 0, 0);
27699|      1|    Reserve r = reserve(b, 1);
27700|      1|    uint32_t empty = 0;
27701|      1|    (void) argv;
27702|      1|    emit_rule(r, RULE_DEBUG, 0, &empty);
27703|      1|}
janet.c:spec_branch:
27495|     20|static void spec_branch(Builder *b, int32_t argc, const Janet *argv, uint32_t rule) {
27496|     20|    peg_fixarity(b, argc, 2);
27497|     20|    Reserve r = reserve(b, 3);
27498|     20|    uint32_t rule_a = peg_compile1(b, argv[0]);
27499|     20|    uint32_t rule_b = peg_compile1(b, argv[1]);
27500|     20|    emit_2(r, rule, rule_a, rule_b);
27501|     20|}
janet.c:spec_ifnot:
27506|     20|static void spec_ifnot(Builder *b, int32_t argc, const Janet *argv) {
27507|     20|    spec_branch(b, argc, argv, RULE_IFNOT);
27508|     20|}
janet.c:spec_range:
27435|     81|static void spec_range(Builder *b, int32_t argc, const Janet *argv) {
27436|     81|    peg_arity(b, argc, 1, -1);
27437|     81|    if (argc == 1) {
  ------------------
  |  Branch (27437:9): [True: 38, False: 43]
  ------------------
27438|     38|        Reserve r = reserve(b, 2);
27439|     38|        const uint8_t *str = peg_getrange(b, argv[0]);
27440|     38|        uint32_t arg = str[0] | (str[1] << 16);
27441|     38|        emit_1(r, RULE_RANGE, arg);
27442|     43|    } else {
27443|       |        /* Compile as a set */
27444|     43|        Reserve r = reserve(b, 9);
27445|     43|        uint32_t bitmap[8] = {0};
27446|    132|        for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (27446:29): [True: 89, False: 43]
  ------------------
27447|     89|            const uint8_t *str = peg_getrange(b, argv[i]);
27448|  2.31k|            for (uint32_t c = str[0]; c <= str[1]; c++)
  ------------------
  |  Branch (27448:39): [True: 2.22k, False: 89]
  ------------------
27449|  2.22k|                bitmap_set(bitmap, c);
27450|     89|        }
27451|     43|        emit_rule(r, RULE_SET, 8, bitmap);
27452|     43|    }
27453|     81|}
janet.c:peg_getrange:
27325|    127|static const uint8_t *peg_getrange(Builder *b, Janet x) {
27326|    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 (27326:9): [True: 0, False: 127]
  ------------------
27327|      0|        peg_panic(b, "expected string for character range");
27328|    127|    const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  858|    127|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
27329|    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 (27329:9): [True: 0, False: 127]
  ------------------
27330|      0|        peg_panicf(b, "expected string to have length 2, got %v", x);
  ------------------
  |  |27300|      0|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27331|    127|    if (str[1] < str[0])
  ------------------
  |  Branch (27331:9): [True: 0, False: 127]
  ------------------
27332|      0|        peg_panicf(b, "range %v is empty", x);
  ------------------
  |  |27300|      0|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27333|    127|    return str;
27334|    127|}
janet.c:bitmap_set:
27431|  2.35k|static void bitmap_set(uint32_t *bitmap, uint8_t c) {
27432|  2.35k|    bitmap[c >> 5] |= ((uint32_t)1) << (c & 0x1F);
27433|  2.35k|}
janet.c:spec_set:
27455|     18|static void spec_set(Builder *b, int32_t argc, const Janet *argv) {
27456|     18|    peg_fixarity(b, argc, 1);
27457|     18|    Reserve r = reserve(b, 9);
27458|     18|    const uint8_t *str = peg_getset(b, argv[0]);
27459|     18|    uint32_t bitmap[8] = {0};
27460|    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 (27460:25): [True: 126, False: 18]
  ------------------
27461|    126|        bitmap_set(bitmap, str[i]);
27462|     18|    emit_rule(r, RULE_SET, 8, bitmap);
27463|     18|}
janet.c:peg_getset:
27318|     18|static const uint8_t *peg_getset(Builder *b, Janet x) {
27319|     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 (27319:9): [True: 0, False: 18]
  ------------------
27320|      0|        peg_panic(b, "expected string for character set");
27321|     18|    const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  858|     18|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
27322|     18|    return str;
27323|     18|}
janet.c:make_peg:
28289|    485|static JanetPeg *make_peg(Builder *b) {
28290|    485|    size_t bytecode_start = size_padded(sizeof(JanetPeg), sizeof(uint32_t));
28291|    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]
  |  |  ------------------
  ------------------
28292|    485|    size_t constants_start = size_padded(bytecode_start + bytecode_size, sizeof(Janet));
28293|    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]
  |  |  ------------------
  ------------------
28294|    485|    size_t total_size = constants_start + constants_size;
28295|    485|    char *mem = janet_abstract(&janet_peg_type, total_size);
28296|    485|    JanetPeg *peg = (JanetPeg *)mem;
28297|    485|    peg->bytecode = (uint32_t *)(mem + bytecode_start);
28298|    485|    peg->constants = (Janet *)(mem + constants_start);
28299|    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]
  |  |  ------------------
  ------------------
28300|    485|    safe_memcpy(peg->bytecode, b->bytecode, bytecode_size);
28301|    485|    safe_memcpy(peg->constants, b->constants, constants_size);
28302|       |    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]
  |  |  ------------------
  ------------------
28303|    485|    peg->has_backref = b->has_backref;
28304|    485|    return peg;
28305|    485|}
janet.c:builder_cleanup:
27290|    645|static void builder_cleanup(Builder *b) {
27291|    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]
  |  |  ------------------
  ------------------
27292|       |    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]
  |  |  ------------------
  ------------------
27293|    645|}
janet.c:peg_cfun_init:
28355|    653|static PegCall peg_cfun_init(int32_t argc, Janet *argv, int get_replace) {
28356|    653|    PegCall ret;
28357|    653|    int32_t min = get_replace ? 3 : 2;
  ------------------
  |  Branch (28357:19): [True: 447, False: 206]
  ------------------
28358|    653|    janet_arity(argc, min, -1);
28359|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28360|      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 (28360:13): [True: 0, False: 1]
  ------------------
28361|      0|        ret.peg = janet_unwrap_abstract(argv[0]);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
28362|    653|    } else {
28363|    653|        ret.peg = compile_peg(argv[0]);
28364|    653|    }
28365|    653|    if (get_replace) {
  ------------------
  |  Branch (28365:9): [True: 333, False: 320]
  ------------------
28366|    333|        ret.subst = argv[1];
28367|    333|        ret.bytes = janet_getbytes(argv, 2);
28368|    333|    } else {
28369|    320|        ret.bytes = janet_getbytes(argv, 1);
28370|    320|    }
28371|    653|    if (argc > min) {
  ------------------
  |  Branch (28371:9): [True: 194, False: 459]
  ------------------
28372|    194|        ret.start = janet_gethalfrange(argv, min, ret.bytes.len, "offset");
28373|    194|        ret.s.extrac = argc - min - 1;
28374|    194|        ret.s.extrav = janet_tuple_n(argv + min + 1, argc - min - 1);
28375|    459|    } else {
28376|    459|        ret.start = 0;
28377|    459|        ret.s.extrac = 0;
28378|    459|        ret.s.extrav = NULL;
28379|    459|    }
28380|    653|    ret.s.mode = PEG_MODE_NORMAL;
28381|    653|    ret.s.text_start = ret.bytes.bytes;
28382|    653|    ret.s.text_end = ret.bytes.bytes + ret.bytes.len;
28383|    653|    ret.s.outer_text_end = ret.s.text_end;
28384|    653|    ret.s.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  291|    653|#define JANET_RECURSION_GUARD 1024
  ------------------
28385|    653|    ret.s.captures = janet_array(0);
28386|    653|    ret.s.tagged_captures = janet_array(0);
28387|    653|    ret.s.scratch = janet_buffer(10);
28388|    653|    ret.s.tags = janet_buffer(10);
28389|    653|    ret.s.constants = ret.peg->constants;
28390|    653|    ret.s.bytecode = ret.peg->bytecode;
28391|       |    ret.s.linemap = NULL;
28392|    653|    ret.s.linemaplen = -1;
28393|    653|    ret.s.has_backref = ret.peg->has_backref;
28394|    653|    return ret;
28395|    653|}
janet.c:peg_rule:
26598|   177k|    const uint8_t *text) {
26599|   185k|tail:
26600|   185k|    switch (*rule) {
26601|      0|        default:
  ------------------
  |  Branch (26601:9): [True: 0, False: 185k]
  ------------------
26602|      0|            janet_panic("unexpected opcode");
26603|      0|            return NULL;
26604|       |
26605|   152k|        case RULE_LITERAL: {
  ------------------
  |  Branch (26605:9): [True: 152k, False: 32.3k]
  ------------------
26606|   152k|            uint32_t len = rule[1];
26607|   152k|            if (text + len > s->text_end) return NULL;
  ------------------
  |  Branch (26607:17): [True: 3.98k, False: 148k]
  ------------------
26608|   148k|            return memcmp(text, rule + 2, len) ? NULL : text + len;
  ------------------
  |  Branch (26608:20): [True: 17.0k, False: 131k]
  ------------------
26609|   152k|        }
26610|       |
26611|      0|        case RULE_DEBUG: {
  ------------------
  |  Branch (26611:9): [True: 0, False: 185k]
  ------------------
26612|      0|            char buffer[32] = {0};
26613|      0|            size_t len = (size_t)(s->outer_text_end - text);
26614|      0|            memcpy(buffer, text, (len > 31 ? 31 : len));
  ------------------
  |  Branch (26614:35): [True: 0, False: 0]
  ------------------
26615|      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__)
  ------------------
26616|      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]
  |  |  ------------------
  ------------------
26617|       |            /* Accumulate buffer */
26618|      0|            if (s->scratch->count) {
  ------------------
  |  Branch (26618:17): [True: 0, False: 0]
  ------------------
26619|      0|                janet_eprintf("accumulate buffer: %v\n", janet_wrap_buffer(s->scratch));
  ------------------
  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26620|      0|            }
26621|       |            /* Normal captures */
26622|      0|            if (s->captures->count) {
  ------------------
  |  Branch (26622:17): [True: 0, False: 0]
  ------------------
26623|      0|                janet_eprintf("stack [%d]:\n", s->captures->count);
  ------------------
  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26624|      0|                for (int32_t i = 0; i < s->captures->count; i++) {
  ------------------
  |  Branch (26624:37): [True: 0, False: 0]
  ------------------
26625|      0|                    if (has_color) {
  ------------------
  |  Branch (26625:25): [True: 0, False: 0]
  ------------------
26626|      0|                        janet_eprintf("  [%d]: %M\n", i, s->captures->data[i]);
  ------------------
  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26627|      0|                    } else {
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|                    }
26630|      0|                }
26631|      0|            }
26632|       |            /* Tagged captures */
26633|      0|            if (s->tagged_captures->count) {
  ------------------
  |  Branch (26633:17): [True: 0, False: 0]
  ------------------
26634|      0|                janet_eprintf("tag stack [%d]:\n", s->tagged_captures->count);
  ------------------
  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26635|      0|                for (int32_t i = 0; i < s->tagged_captures->count; i++) {
  ------------------
  |  Branch (26635:37): [True: 0, False: 0]
  ------------------
26636|      0|                    if (has_color) {
  ------------------
  |  Branch (26636:25): [True: 0, False: 0]
  ------------------
26637|      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__)
  ------------------
26638|      0|                    } else {
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|                    }
26641|      0|                }
26642|      0|            }
26643|      0|            return text;
26644|   152k|        }
26645|       |
26646|    985|        case RULE_NCHAR: {
  ------------------
  |  Branch (26646:9): [True: 985, False: 184k]
  ------------------
26647|    985|            uint32_t n = rule[1];
26648|    985|            return (text + n > s->text_end) ? NULL : text + n;
  ------------------
  |  Branch (26648:20): [True: 396, False: 589]
  ------------------
26649|   152k|        }
26650|       |
26651|    491|        case RULE_NOTNCHAR: {
  ------------------
  |  Branch (26651:9): [True: 491, False: 184k]
  ------------------
26652|    491|            uint32_t n = rule[1];
26653|    491|            return (text + n > s->text_end) ? text : NULL;
  ------------------
  |  Branch (26653:20): [True: 121, False: 370]
  ------------------
26654|   152k|        }
26655|       |
26656|  3.32k|        case RULE_RANGE: {
  ------------------
  |  Branch (26656:9): [True: 3.32k, False: 181k]
  ------------------
26657|  3.32k|            uint8_t lo = rule[1] & 0xFF;
26658|  3.32k|            uint8_t hi = (rule[1] >> 16) & 0xFF;
26659|  3.32k|            return (text < s->text_end &&
  ------------------
  |  Branch (26659:21): [True: 3.32k, False: 0]
  ------------------
26660|  3.32k|                    text[0] >= lo &&
  ------------------
  |  Branch (26660:21): [True: 749, False: 2.58k]
  ------------------
26661|    749|                    text[0] <= hi)
  ------------------
  |  Branch (26661:21): [True: 105, False: 644]
  ------------------
26662|  3.32k|                   ? text + 1
26663|  3.32k|                   : NULL;
26664|   152k|        }
26665|       |
26666|    392|        case RULE_SET: {
  ------------------
  |  Branch (26666:9): [True: 392, False: 184k]
  ------------------
26667|    392|            if (text >= s->text_end) return NULL;
  ------------------
  |  Branch (26667:17): [True: 0, False: 392]
  ------------------
26668|    392|            uint32_t word = rule[1 + (text[0] >> 5)];
26669|    392|            uint32_t mask = (uint32_t)1 << (text[0] & 0x1F);
26670|    392|            return (word & mask)
  ------------------
  |  Branch (26670:20): [True: 38, False: 354]
  ------------------
26671|    392|                   ? text + 1
26672|    392|                   : NULL;
26673|    392|        }
26674|       |
26675|  1.02k|        case RULE_LOOK: {
  ------------------
  |  Branch (26675:9): [True: 1.02k, False: 184k]
  ------------------
26676|  1.02k|            text += ((int32_t *)rule)[1];
26677|  1.02k|            if (text < s->text_start || text > s->text_end) return NULL;
  ------------------
  |  Branch (26677:17): [True: 301, False: 727]
  |  Branch (26677:41): [True: 76, False: 651]
  ------------------
26678|    651|            down1(s);
  ------------------
  |  |26583|    651|#define down1(s) do { \
  |  |26584|    651|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 651]
  |  |  ------------------
  |  |26585|    651|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 651]
  |  |  ------------------
  ------------------
26679|    651|            const uint8_t *result = peg_rule(s, s->bytecode + rule[2], text);
26680|    651|            up1(s);
  ------------------
  |  |26586|    651|#define up1(s) ((s)->depth++)
  ------------------
26681|    651|            text -= ((int32_t *)rule)[1];
26682|    651|            return result ? text : NULL;
  ------------------
  |  Branch (26682:20): [True: 3, False: 648]
  ------------------
26683|    651|        }
26684|       |
26685|  7.46k|        case RULE_CHOICE: {
  ------------------
  |  Branch (26685:9): [True: 7.46k, False: 177k]
  ------------------
26686|  7.46k|            uint32_t len = rule[1];
26687|  7.46k|            const uint32_t *args = rule + 2;
26688|  7.46k|            if (len == 0) return NULL;
  ------------------
  |  Branch (26688:17): [True: 256, False: 7.21k]
  ------------------
26689|  7.21k|            down1(s);
  ------------------
  |  |26583|  7.21k|#define down1(s) do { \
  |  |26584|  7.21k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 7.21k]
  |  |  ------------------
  |  |26585|  7.21k|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 7.21k]
  |  |  ------------------
  ------------------
26690|  7.21k|            CapState cs = cap_save(s);
26691|  17.8k|            for (uint32_t i = 0; i < len - 1; i++) {
  ------------------
  |  Branch (26691:34): [True: 10.6k, False: 7.18k]
  ------------------
26692|  10.6k|                const uint8_t *result = peg_rule(s, s->bytecode + args[i], text);
26693|  10.6k|                if (result) {
  ------------------
  |  Branch (26693:21): [True: 23, False: 10.6k]
  ------------------
26694|     23|                    up1(s);
  ------------------
  |  |26586|     23|#define up1(s) ((s)->depth++)
  ------------------
26695|     23|                    return result;
26696|     23|                }
26697|  10.6k|                cap_load(s, cs);
26698|  10.6k|            }
26699|  7.18k|            up1(s);
  ------------------
  |  |26586|  7.18k|#define up1(s) ((s)->depth++)
  ------------------
26700|  7.18k|            rule = s->bytecode + args[len - 1];
26701|  7.18k|            goto tail;
26702|  7.21k|        }
26703|       |
26704|  9.27k|        case RULE_SEQUENCE: {
  ------------------
  |  Branch (26704:9): [True: 9.27k, False: 175k]
  ------------------
26705|  9.27k|            uint32_t len = rule[1];
26706|  9.27k|            const uint32_t *args = rule + 2;
26707|  9.27k|            if (len == 0) return text;
  ------------------
  |  Branch (26707:17): [True: 8.01k, False: 1.26k]
  ------------------
26708|  1.26k|            down1(s);
  ------------------
  |  |26583|  1.26k|#define down1(s) do { \
  |  |26584|  1.26k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 1.26k]
  |  |  ------------------
  |  |26585|  1.26k|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 1.26k]
  |  |  ------------------
  ------------------
26709|  2.37k|            for (uint32_t i = 0; text && i < len - 1; i++)
  ------------------
  |  Branch (26709:34): [True: 1.69k, False: 684]
  |  Branch (26709:42): [True: 1.11k, False: 576]
  ------------------
26710|  1.11k|                text = peg_rule(s, s->bytecode + args[i], text);
26711|  1.26k|            up1(s);
  ------------------
  |  |26586|  1.26k|#define up1(s) ((s)->depth++)
  ------------------
26712|  1.26k|            if (!text) return NULL;
  ------------------
  |  Branch (26712:17): [True: 684, False: 576]
  ------------------
26713|    576|            rule = s->bytecode + args[len - 1];
26714|    576|            goto tail;
26715|  1.26k|        }
26716|       |
26717|      0|        case RULE_IF: {
  ------------------
  |  Branch (26717:9): [True: 0, False: 185k]
  ------------------
26718|      0|            const uint32_t *rule_a = s->bytecode + rule[1];
26719|      0|            const uint32_t *rule_b = s->bytecode + rule[2];
26720|      0|            down1(s);
  ------------------
  |  |26583|      0|#define down1(s) do { \
  |  |26584|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26585|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26721|      0|            const uint8_t *result = peg_rule(s, rule_a, text);
26722|      0|            up1(s);
  ------------------
  |  |26586|      0|#define up1(s) ((s)->depth++)
  ------------------
26723|      0|            if (!result) return NULL;
  ------------------
  |  Branch (26723:17): [True: 0, False: 0]
  ------------------
26724|      0|            rule = rule_b;
26725|      0|            goto tail;
26726|      0|        }
26727|    119|        case RULE_IFNOT: {
  ------------------
  |  Branch (26727:9): [True: 119, False: 185k]
  ------------------
26728|    119|            const uint32_t *rule_a = s->bytecode + rule[1];
26729|    119|            const uint32_t *rule_b = s->bytecode + rule[2];
26730|    119|            down1(s);
  ------------------
  |  |26583|    119|#define down1(s) do { \
  |  |26584|    119|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 119]
  |  |  ------------------
  |  |26585|    119|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 119]
  |  |  ------------------
  ------------------
26731|    119|            CapState cs = cap_save(s);
26732|    119|            const uint8_t *result = peg_rule(s, rule_a, text);
26733|    119|            if (!!result) {
  ------------------
  |  Branch (26733:17): [True: 101, False: 18]
  ------------------
26734|    101|                up1(s);
  ------------------
  |  |26586|    101|#define up1(s) ((s)->depth++)
  ------------------
26735|    101|                return NULL;
26736|    101|            } else {
26737|     18|                cap_load(s, cs);
26738|     18|                up1(s);
  ------------------
  |  |26586|     18|#define up1(s) ((s)->depth++)
  ------------------
26739|     18|                rule = rule_b;
26740|     18|                goto tail;
26741|     18|            }
26742|    119|        }
26743|       |
26744|    256|        case RULE_NOT: {
  ------------------
  |  Branch (26744:9): [True: 256, False: 184k]
  ------------------
26745|    256|            const uint32_t *rule_a = s->bytecode + rule[1];
26746|    256|            down1(s);
  ------------------
  |  |26583|    256|#define down1(s) do { \
  |  |26584|    256|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 256]
  |  |  ------------------
  |  |26585|    256|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 256]
  |  |  ------------------
  ------------------
26747|    256|            CapState cs = cap_save(s);
26748|    256|            const uint8_t *result = peg_rule(s, rule_a, text);
26749|    256|            if (result) {
  ------------------
  |  Branch (26749:17): [True: 249, False: 7]
  ------------------
26750|    249|                up1(s);
  ------------------
  |  |26586|    249|#define up1(s) ((s)->depth++)
  ------------------
26751|    249|                return NULL;
26752|    249|            } else {
26753|      7|                cap_load(s, cs);
26754|      7|                up1(s);
  ------------------
  |  |26586|      7|#define up1(s) ((s)->depth++)
  ------------------
26755|      7|                return text;
26756|      7|            }
26757|    256|        }
26758|       |
26759|      0|        case RULE_THRU:
  ------------------
  |  Branch (26759:9): [True: 0, False: 185k]
  ------------------
26760|      0|        case RULE_TO: {
  ------------------
  |  Branch (26760:9): [True: 0, False: 185k]
  ------------------
26761|      0|            const uint32_t *rule_a = s->bytecode + rule[1];
26762|      0|            const uint8_t *next_text = NULL;
26763|      0|            CapState cs = cap_save(s);
26764|      0|            down1(s);
  ------------------
  |  |26583|      0|#define down1(s) do { \
  |  |26584|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26585|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26765|      0|            while (text <= s->text_end) {
  ------------------
  |  Branch (26765:20): [True: 0, False: 0]
  ------------------
26766|      0|                CapState cs2 = cap_save(s);
26767|      0|                next_text = peg_rule(s, rule_a, text);
26768|      0|                if (next_text) {
  ------------------
  |  Branch (26768:21): [True: 0, False: 0]
  ------------------
26769|      0|                    if (rule[0] == RULE_TO) cap_load(s, cs2);
  ------------------
  |  Branch (26769:25): [True: 0, False: 0]
  ------------------
26770|      0|                    break;
26771|      0|                }
26772|      0|                cap_load(s, cs2);
26773|      0|                text++;
26774|      0|            }
26775|      0|            up1(s);
  ------------------
  |  |26586|      0|#define up1(s) ((s)->depth++)
  ------------------
26776|      0|            if (text > s->text_end) {
  ------------------
  |  Branch (26776:17): [True: 0, False: 0]
  ------------------
26777|      0|                cap_load(s, cs);
26778|      0|                return NULL;
26779|      0|            }
26780|      0|            return rule[0] == RULE_TO ? text : next_text;
  ------------------
  |  Branch (26780:20): [True: 0, False: 0]
  ------------------
26781|      0|        }
26782|       |
26783|    533|        case RULE_BETWEEN: {
  ------------------
  |  Branch (26783:9): [True: 533, False: 184k]
  ------------------
26784|    533|            uint32_t lo = rule[1];
26785|    533|            uint32_t hi = rule[2];
26786|    533|            const uint32_t *rule_a = s->bytecode + rule[3];
26787|    533|            uint32_t captured = 0;
26788|    533|            const uint8_t *next_text;
26789|    533|            CapState cs = cap_save(s);
26790|    533|            down1(s);
  ------------------
  |  |26583|    533|#define down1(s) do { \
  |  |26584|    533|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 533]
  |  |  ------------------
  |  |26585|    533|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 533]
  |  |  ------------------
  ------------------
26791|   141k|            while (captured < hi) {
  ------------------
  |  Branch (26791:20): [True: 141k, False: 39]
  ------------------
26792|   141k|                CapState cs2 = cap_save(s);
26793|   141k|                next_text = peg_rule(s, rule_a, text);
26794|   141k|                if (!next_text || ((next_text == text) && (hi == UINT32_MAX))) {
  ------------------
  |  Branch (26794:21): [True: 494, False: 140k]
  |  Branch (26794:36): [True: 140k, False: 97]
  |  Branch (26794:59): [True: 0, False: 140k]
  ------------------
26795|    494|                    cap_load(s, cs2);
26796|    494|                    break;
26797|    494|                }
26798|   140k|                captured++;
26799|   140k|                text = next_text;
26800|   140k|            }
26801|    533|            up1(s);
  ------------------
  |  |26586|    533|#define up1(s) ((s)->depth++)
  ------------------
26802|    533|            if (captured < lo) {
  ------------------
  |  Branch (26802:17): [True: 493, False: 40]
  ------------------
26803|    493|                cap_load(s, cs);
26804|    493|                return NULL;
26805|    493|            }
26806|     40|            return text;
26807|    533|        }
26808|       |
26809|       |        /* Capturing rules */
26810|       |
26811|      0|        case RULE_GETTAG: {
  ------------------
  |  Branch (26811:9): [True: 0, False: 185k]
  ------------------
26812|      0|            uint32_t search = rule[1];
26813|      0|            uint32_t tag = rule[2];
26814|      0|            for (int32_t i = s->tags->count - 1; i >= 0; i--) {
  ------------------
  |  Branch (26814:50): [True: 0, False: 0]
  ------------------
26815|      0|                if (s->tags->data[i] == search) {
  ------------------
  |  Branch (26815:21): [True: 0, False: 0]
  ------------------
26816|      0|                    pushcap(s, s->tagged_captures->data[i], tag);
26817|      0|                    return text;
26818|      0|                }
26819|      0|            }
26820|      0|            return NULL;
26821|      0|        }
26822|       |
26823|  1.16k|        case RULE_POSITION: {
  ------------------
  |  Branch (26823:9): [True: 1.16k, False: 184k]
  ------------------
26824|  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)
  ------------------
26825|  1.16k|            return text;
26826|      0|        }
26827|       |
26828|      0|        case RULE_LINE: {
  ------------------
  |  Branch (26828:9): [True: 0, False: 185k]
  ------------------
26829|      0|            LineCol lc = get_linecol_from_position(s, (int32_t)(text - s->text_start));
26830|      0|            pushcap(s, janet_wrap_number((double)(lc.line)), rule[1]);
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
26831|      0|            return text;
26832|      0|        }
26833|       |
26834|      0|        case RULE_COLUMN: {
  ------------------
  |  Branch (26834:9): [True: 0, False: 185k]
  ------------------
26835|      0|            LineCol lc = get_linecol_from_position(s, (int32_t)(text - s->text_start));
26836|      0|            pushcap(s, janet_wrap_number((double)(lc.col)), rule[1]);
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
26837|      0|            return text;
26838|      0|        }
26839|       |
26840|      0|        case RULE_ARGUMENT: {
  ------------------
  |  Branch (26840:9): [True: 0, False: 185k]
  ------------------
26841|      0|            int32_t index = ((int32_t *)rule)[1];
26842|      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 (26842:29): [True: 0, False: 0]
  ------------------
26843|      0|            pushcap(s, capture, rule[2]);
26844|      0|            return text;
26845|      0|        }
26846|       |
26847|      0|        case RULE_CONSTANT: {
  ------------------
  |  Branch (26847:9): [True: 0, False: 185k]
  ------------------
26848|      0|            pushcap(s, s->constants[rule[1]], rule[2]);
26849|      0|            return text;
26850|      0|        }
26851|       |
26852|  6.60k|        case RULE_CAPTURE: {
  ------------------
  |  Branch (26852:9): [True: 6.60k, False: 178k]
  ------------------
26853|  6.60k|            down1(s);
  ------------------
  |  |26583|  6.60k|#define down1(s) do { \
  |  |26584|  6.60k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 6.60k]
  |  |  ------------------
  |  |26585|  6.60k|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 6.60k]
  |  |  ------------------
  ------------------
26854|  6.60k|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
26855|  6.60k|            up1(s);
  ------------------
  |  |26586|  6.60k|#define up1(s) ((s)->depth++)
  ------------------
26856|  6.60k|            if (!result) return NULL;
  ------------------
  |  Branch (26856:17): [True: 5.18k, False: 1.41k]
  ------------------
26857|       |            /* Specialized pushcap - avoid intermediate string creation */
26858|  1.41k|            if (!s->has_backref && s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (26858:17): [True: 1.41k, False: 0]
  |  Branch (26858:36): [True: 1, False: 1.41k]
  ------------------
26859|      1|                janet_buffer_push_bytes(s->scratch, text, (int32_t)(result - text));
26860|  1.41k|            } else {
26861|  1.41k|                uint32_t tag = rule[2];
26862|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26863|  1.41k|            }
26864|  1.41k|            return result;
26865|  6.60k|        }
26866|       |
26867|      0|        case RULE_CAPTURE_NUM: {
  ------------------
  |  Branch (26867:9): [True: 0, False: 185k]
  ------------------
26868|      0|            down1(s);
  ------------------
  |  |26583|      0|#define down1(s) do { \
  |  |26584|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26585|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26869|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
26870|      0|            up1(s);
  ------------------
  |  |26586|      0|#define up1(s) ((s)->depth++)
  ------------------
26871|      0|            if (!result) return NULL;
  ------------------
  |  Branch (26871:17): [True: 0, False: 0]
  ------------------
26872|       |            /* check number parsing */
26873|      0|            double x = 0.0;
26874|      0|            int32_t base = (int32_t) rule[2];
26875|      0|            if (janet_scan_number_base(text, (int32_t)(result - text), base, &x)) return NULL;
  ------------------
  |  Branch (26875:17): [True: 0, False: 0]
  ------------------
26876|       |            /* Specialized pushcap - avoid intermediate string creation */
26877|      0|            if (!s->has_backref && s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (26877:17): [True: 0, False: 0]
  |  Branch (26877:36): [True: 0, False: 0]
  ------------------
26878|      0|                janet_buffer_push_bytes(s->scratch, text, (int32_t)(result - text));
26879|      0|            } else {
26880|      0|                uint32_t tag = rule[3];
26881|      0|                pushcap(s, janet_wrap_number(x), tag);
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
26882|      0|            }
26883|      0|            return result;
26884|      0|        }
26885|       |
26886|    101|        case RULE_ACCUMULATE: {
  ------------------
  |  Branch (26886:9): [True: 101, False: 185k]
  ------------------
26887|    101|            uint32_t tag = rule[2];
26888|    101|            int oldmode = s->mode;
26889|    101|            if (!tag && oldmode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (26889:17): [True: 101, False: 0]
  |  Branch (26889:25): [True: 0, False: 101]
  ------------------
26890|      0|                rule = s->bytecode + rule[1];
26891|      0|                goto tail;
26892|      0|            }
26893|    101|            CapState cs = cap_save(s);
26894|    101|            s->mode = PEG_MODE_ACCUMULATE;
26895|    101|            down1(s);
  ------------------
  |  |26583|    101|#define down1(s) do { \
  |  |26584|    101|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 101]
  |  |  ------------------
  |  |26585|    101|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 101]
  |  |  ------------------
  ------------------
26896|    101|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
26897|    101|            up1(s);
  ------------------
  |  |26586|    101|#define up1(s) ((s)->depth++)
  ------------------
26898|    101|            s->mode = oldmode;
26899|    101|            if (!result) return NULL;
  ------------------
  |  Branch (26899:17): [True: 97, False: 4]
  ------------------
26900|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26901|      4|                                      s->scratch->count - cs.scratch);
26902|      4|            cap_load_keept(s, cs);
26903|      4|            pushcap(s, cap, tag);
26904|      4|            return result;
26905|    101|        }
26906|       |
26907|      0|        case RULE_DROP: {
  ------------------
  |  Branch (26907:9): [True: 0, False: 185k]
  ------------------
26908|      0|            CapState cs = cap_save(s);
26909|      0|            down1(s);
  ------------------
  |  |26583|      0|#define down1(s) do { \
  |  |26584|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26585|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26910|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
26911|      0|            up1(s);
  ------------------
  |  |26586|      0|#define up1(s) ((s)->depth++)
  ------------------
26912|      0|            if (!result) return NULL;
  ------------------
  |  Branch (26912:17): [True: 0, False: 0]
  ------------------
26913|      0|            cap_load(s, cs);
26914|      0|            return result;
26915|      0|        }
26916|       |
26917|      0|        case RULE_ONLY_TAGS: {
  ------------------
  |  Branch (26917:9): [True: 0, False: 185k]
  ------------------
26918|      0|            CapState cs = cap_save(s);
26919|      0|            down1(s);
  ------------------
  |  |26583|      0|#define down1(s) do { \
  |  |26584|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26585|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26920|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
26921|      0|            up1(s);
  ------------------
  |  |26586|      0|#define up1(s) ((s)->depth++)
  ------------------
26922|      0|            if (!result) return NULL;
  ------------------
  |  Branch (26922:17): [True: 0, False: 0]
  ------------------
26923|      0|            cap_load_keept(s, cs);
26924|      0|            return result;
26925|      0|        }
26926|       |
26927|      0|        case RULE_GROUP: {
  ------------------
  |  Branch (26927:9): [True: 0, False: 185k]
  ------------------
26928|      0|            uint32_t tag = rule[2];
26929|      0|            int oldmode = s->mode;
26930|      0|            CapState cs = cap_save(s);
26931|      0|            s->mode = PEG_MODE_NORMAL;
26932|      0|            down1(s);
  ------------------
  |  |26583|      0|#define down1(s) do { \
  |  |26584|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26585|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26933|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
26934|      0|            up1(s);
  ------------------
  |  |26586|      0|#define up1(s) ((s)->depth++)
  ------------------
26935|      0|            s->mode = oldmode;
26936|      0|            if (!result) return NULL;
  ------------------
  |  Branch (26936:17): [True: 0, False: 0]
  ------------------
26937|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
26938|      0|            JanetArray *sub_captures = janet_array(num_sub_captures);
26939|      0|            safe_memcpy(sub_captures->data,
26940|      0|                        s->captures->data + cs.cap,
26941|      0|                        sizeof(Janet) * num_sub_captures);
26942|      0|            sub_captures->count = num_sub_captures;
26943|      0|            cap_load_keept(s, cs);
26944|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26945|      0|            return result;
26946|      0|        }
26947|       |
26948|      0|        case RULE_NTH: {
  ------------------
  |  Branch (26948:9): [True: 0, False: 185k]
  ------------------
26949|      0|            uint32_t nth = rule[1];
26950|      0|            if (nth > INT32_MAX) nth = INT32_MAX;
  ------------------
  |  Branch (26950:17): [True: 0, False: 0]
  ------------------
26951|      0|            uint32_t tag = rule[3];
26952|      0|            int oldmode = s->mode;
26953|      0|            CapState cs = cap_save(s);
26954|      0|            s->mode = PEG_MODE_NORMAL;
26955|      0|            down1(s);
  ------------------
  |  |26583|      0|#define down1(s) do { \
  |  |26584|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26585|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26956|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[2], text);
26957|      0|            up1(s);
  ------------------
  |  |26586|      0|#define up1(s) ((s)->depth++)
  ------------------
26958|      0|            s->mode = oldmode;
26959|      0|            if (!result) return NULL;
  ------------------
  |  Branch (26959:17): [True: 0, False: 0]
  ------------------
26960|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
26961|      0|            Janet cap;
26962|      0|            if (num_sub_captures > (int32_t) nth) {
  ------------------
  |  Branch (26962:17): [True: 0, False: 0]
  ------------------
26963|      0|                cap = s->captures->data[cs.cap + nth];
26964|      0|            } else {
26965|      0|                return NULL;
26966|      0|            }
26967|      0|            cap_load_keept(s, cs);
26968|      0|            pushcap(s, cap, tag);
26969|      0|            return result;
26970|      0|        }
26971|       |
26972|      0|        case RULE_SUB: {
  ------------------
  |  Branch (26972:9): [True: 0, False: 185k]
  ------------------
26973|      0|            const uint8_t *text_start = text;
26974|      0|            const uint32_t *rule_window = s->bytecode + rule[1];
26975|      0|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
26976|      0|            down1(s);
  ------------------
  |  |26583|      0|#define down1(s) do { \
  |  |26584|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26585|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26977|      0|            const uint8_t *window_end = peg_rule(s, rule_window, text);
26978|      0|            up1(s);
  ------------------
  |  |26586|      0|#define up1(s) ((s)->depth++)
  ------------------
26979|      0|            if (!window_end) {
  ------------------
  |  Branch (26979:17): [True: 0, False: 0]
  ------------------
26980|      0|                return NULL;
26981|      0|            }
26982|      0|            const uint8_t *saved_end = s->text_end;
26983|      0|            s->text_end = window_end;
26984|      0|            down1(s);
  ------------------
  |  |26583|      0|#define down1(s) do { \
  |  |26584|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26585|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26985|      0|            const uint8_t *next_text = peg_rule(s, rule_subpattern, text_start);
26986|      0|            up1(s);
  ------------------
  |  |26586|      0|#define up1(s) ((s)->depth++)
  ------------------
26987|      0|            s->text_end = saved_end;
26988|       |
26989|      0|            if (!next_text) {
  ------------------
  |  Branch (26989:17): [True: 0, False: 0]
  ------------------
26990|      0|                return NULL;
26991|      0|            }
26992|       |
26993|      0|            return window_end;
26994|      0|        }
26995|       |
26996|      0|        case RULE_TIL: {
  ------------------
  |  Branch (26996:9): [True: 0, False: 185k]
  ------------------
26997|      0|            const uint32_t *rule_terminus = s->bytecode + rule[1];
26998|      0|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
26999|       |
27000|      0|            const uint8_t *terminus_start = text;
27001|      0|            const uint8_t *terminus_end = NULL;
27002|      0|            down1(s);
  ------------------
  |  |26583|      0|#define down1(s) do { \
  |  |26584|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26585|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27003|      0|            while (terminus_start <= s->text_end) {
  ------------------
  |  Branch (27003:20): [True: 0, False: 0]
  ------------------
27004|      0|                CapState cs2 = cap_save(s);
27005|      0|                terminus_end = peg_rule(s, rule_terminus, terminus_start);
27006|      0|                cap_load(s, cs2);
27007|      0|                if (terminus_end) {
  ------------------
  |  Branch (27007:21): [True: 0, False: 0]
  ------------------
27008|      0|                    break;
27009|      0|                }
27010|      0|                terminus_start++;
27011|      0|            }
27012|      0|            up1(s);
  ------------------
  |  |26586|      0|#define up1(s) ((s)->depth++)
  ------------------
27013|       |
27014|      0|            if (!terminus_end) {
  ------------------
  |  Branch (27014:17): [True: 0, False: 0]
  ------------------
27015|      0|                return NULL;
27016|      0|            }
27017|       |
27018|      0|            const uint8_t *saved_end = s->text_end;
27019|      0|            s->text_end = terminus_start;
27020|      0|            down1(s);
  ------------------
  |  |26583|      0|#define down1(s) do { \
  |  |26584|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26585|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27021|      0|            const uint8_t *matched = peg_rule(s, rule_subpattern, text);
27022|      0|            up1(s);
  ------------------
  |  |26586|      0|#define up1(s) ((s)->depth++)
  ------------------
27023|      0|            s->text_end = saved_end;
27024|       |
27025|      0|            if (!matched) {
  ------------------
  |  Branch (27025:17): [True: 0, False: 0]
  ------------------
27026|      0|                return NULL;
27027|      0|            }
27028|       |
27029|      0|            return terminus_end;
27030|      0|        }
27031|       |
27032|      0|        case RULE_SPLIT: {
  ------------------
  |  Branch (27032:9): [True: 0, False: 185k]
  ------------------
27033|      0|            const uint8_t *saved_end = s->text_end;
27034|      0|            const uint32_t *rule_separator = s->bytecode + rule[1];
27035|      0|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
27036|       |
27037|      0|            const uint8_t *chunk_start = text;
27038|      0|            const uint8_t *chunk_end = NULL;
27039|       |
27040|      0|            while (text <= saved_end) {
  ------------------
  |  Branch (27040:20): [True: 0, False: 0]
  ------------------
27041|       |                /* Find next split (or end of text) */
27042|      0|                CapState cs = cap_save(s);
27043|      0|                down1(s);
  ------------------
  |  |26583|      0|#define down1(s) do { \
  |  |26584|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26585|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27044|      0|                while (text <= saved_end) {
  ------------------
  |  Branch (27044:24): [True: 0, False: 0]
  ------------------
27045|      0|                    chunk_end = text;
27046|      0|                    const uint8_t *check = peg_rule(s, rule_separator, text);
27047|      0|                    cap_load(s, cs);
27048|      0|                    if (check) {
  ------------------
  |  Branch (27048:25): [True: 0, False: 0]
  ------------------
27049|      0|                        text = check;
27050|      0|                        break;
27051|      0|                    }
27052|      0|                    text++;
27053|      0|                }
27054|      0|                up1(s);
  ------------------
  |  |26586|      0|#define up1(s) ((s)->depth++)
  ------------------
27055|       |
27056|       |                /* Match between splits */
27057|      0|                s->text_end = chunk_end;
27058|      0|                down1(s);
  ------------------
  |  |26583|      0|#define down1(s) do { \
  |  |26584|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26585|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27059|      0|                const uint8_t *subpattern_end = peg_rule(s, rule_subpattern, chunk_start);
27060|      0|                up1(s);
  ------------------
  |  |26586|      0|#define up1(s) ((s)->depth++)
  ------------------
27061|      0|                s->text_end = saved_end;
27062|      0|                if (!subpattern_end) return NULL; /* Don't match anything */
  ------------------
  |  Branch (27062:21): [True: 0, False: 0]
  ------------------
27063|       |
27064|       |                /* Ensure forward progress */
27065|      0|                if (text == chunk_start) return NULL;
  ------------------
  |  Branch (27065:21): [True: 0, False: 0]
  ------------------
27066|      0|                chunk_start = text;
27067|      0|            }
27068|       |
27069|      0|            s->text_end = saved_end;
27070|      0|            return s->text_end;
27071|      0|        }
27072|       |
27073|    558|        case RULE_REPLACE:
  ------------------
  |  Branch (27073:9): [True: 558, False: 184k]
  ------------------
27074|    558|        case RULE_MATCHSPLICE:
  ------------------
  |  Branch (27074:9): [True: 0, False: 185k]
  ------------------
27075|    558|        case RULE_MATCHTIME: {
  ------------------
  |  Branch (27075:9): [True: 0, False: 185k]
  ------------------
27076|    558|            uint32_t tag = rule[3];
27077|    558|            int oldmode = s->mode;
27078|    558|            CapState cs = cap_save(s);
27079|    558|            s->mode = PEG_MODE_NORMAL;
27080|    558|            down1(s);
  ------------------
  |  |26583|    558|#define down1(s) do { \
  |  |26584|    558|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 558]
  |  |  ------------------
  |  |26585|    558|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 558]
  |  |  ------------------
  ------------------
27081|    558|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
27082|    558|            up1(s);
  ------------------
  |  |26586|    558|#define up1(s) ((s)->depth++)
  ------------------
27083|    558|            s->mode = oldmode;
27084|    558|            if (!result) return NULL;
  ------------------
  |  Branch (27084:17): [True: 553, False: 5]
  ------------------
27085|       |
27086|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27087|      5|            Janet constant = s->constants[rule[2]];
27088|      5|            switch (janet_type(constant)) {
  ------------------
  |  |  790|      5|    (isnan((x).number) \
  |  |  791|      5|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|      5|        : JANET_NUMBER)
  ------------------
  |  Branch (27088:21): [True: 5, False: 0]
  ------------------
27089|      5|                default:
  ------------------
  |  Branch (27089:17): [True: 5, False: 0]
  ------------------
27090|      5|                    cap = constant;
27091|      5|                    break;
27092|      0|                case JANET_STRUCT:
  ------------------
  |  Branch (27092:17): [True: 0, False: 5]
  ------------------
27093|      0|                    if (s->captures->count) {
  ------------------
  |  Branch (27093:25): [True: 0, False: 0]
  ------------------
27094|      0|                        cap = janet_struct_get(janet_unwrap_struct(constant),
  ------------------
  |  |  852|      0|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
27095|      0|                                               s->captures->data[s->captures->count - 1]);
27096|      0|                    }
27097|      0|                    break;
27098|      0|                case JANET_TABLE:
  ------------------
  |  Branch (27098:17): [True: 0, False: 5]
  ------------------
27099|      0|                    if (s->captures->count) {
  ------------------
  |  Branch (27099:25): [True: 0, False: 0]
  ------------------
27100|      0|                        cap = janet_table_get(janet_unwrap_table(constant),
  ------------------
  |  |  856|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
27101|      0|                                              s->captures->data[s->captures->count - 1]);
27102|      0|                    }
27103|      0|                    break;
27104|      0|                case JANET_CFUNCTION:
  ------------------
  |  Branch (27104:17): [True: 0, False: 5]
  ------------------
27105|      0|                    cap = janet_unwrap_cfunction(constant)(s->captures->count - cs.cap,
  ------------------
  |  |  864|      0|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
27106|      0|                                                           s->captures->data + cs.cap);
27107|      0|                    break;
27108|      0|                case JANET_FUNCTION:
  ------------------
  |  Branch (27108:17): [True: 0, False: 5]
  ------------------
27109|      0|                    cap = janet_call(janet_unwrap_function(constant),
  ------------------
  |  |  863|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
27110|      0|                                     s->captures->count - cs.cap,
27111|      0|                                     s->captures->data + cs.cap);
27112|      0|                    break;
27113|      5|            }
27114|      5|            cap_load_keept(s, cs);
27115|      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 (27115:17): [True: 0, False: 5]
  ------------------
27116|      5|            const Janet *elements = NULL;
27117|      5|            int32_t len = 0;
27118|      5|            if ((rule[0] == RULE_MATCHSPLICE) && janet_indexed_view(cap, &elements, &len)) {
  ------------------
  |  Branch (27118:17): [True: 0, False: 5]
  |  Branch (27118:50): [True: 0, False: 0]
  ------------------
27119|       |                /* unpack and flatten capture */
27120|      0|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (27120:37): [True: 0, False: 0]
  ------------------
27121|      0|                    pushcap(s, elements[i], tag);
27122|      0|                }
27123|      5|            } else {
27124|      5|                pushcap(s, cap, tag);
27125|      5|            }
27126|      5|            return result;
27127|      5|        }
27128|       |
27129|      0|        case RULE_ERROR: {
  ------------------
  |  Branch (27129:9): [True: 0, False: 185k]
  ------------------
27130|      0|            int oldmode = s->mode;
27131|      0|            s->mode = PEG_MODE_NORMAL;
27132|      0|            int32_t old_cap = s->captures->count;
27133|      0|            down1(s);
  ------------------
  |  |26583|      0|#define down1(s) do { \
  |  |26584|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26585|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27134|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
27135|      0|            up1(s);
  ------------------
  |  |26586|      0|#define up1(s) ((s)->depth++)
  ------------------
27136|      0|            s->mode = oldmode;
27137|      0|            if (!result) return NULL;
  ------------------
  |  Branch (27137:17): [True: 0, False: 0]
  ------------------
27138|      0|            if (s->captures->count > old_cap) {
  ------------------
  |  Branch (27138:17): [True: 0, False: 0]
  ------------------
27139|       |                /* Throw last capture */
27140|      0|                janet_panicv(s->captures->data[s->captures->count - 1]);
27141|      0|            } else {
27142|       |                /* Throw generic error */
27143|      0|                int32_t start = (int32_t)(text - s->text_start);
27144|      0|                LineCol lc = get_linecol_from_position(s, start);
27145|      0|                janet_panicf("match error at line %d, column %d", lc.line, lc.col);
27146|      0|            }
27147|      0|            return NULL;
27148|      0|        }
27149|       |
27150|      0|        case RULE_BACKMATCH: {
  ------------------
  |  Branch (27150:9): [True: 0, False: 185k]
  ------------------
27151|      0|            uint32_t search = rule[1];
27152|      0|            for (int32_t i = s->tags->count - 1; i >= 0; i--) {
  ------------------
  |  Branch (27152:50): [True: 0, False: 0]
  ------------------
27153|      0|                if (s->tags->data[i] == search) {
  ------------------
  |  Branch (27153:21): [True: 0, False: 0]
  ------------------
27154|      0|                    Janet capture = s->tagged_captures->data[i];
27155|      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 (27155:25): [True: 0, False: 0]
  ------------------
27156|      0|                        return NULL;
27157|      0|                    const uint8_t *bytes = janet_unwrap_string(capture);
  ------------------
  |  |  858|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
27158|      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)))
  |  |  ------------------
  ------------------
27159|      0|                    if (text + len > s->text_end)
  ------------------
  |  Branch (27159:25): [True: 0, False: 0]
  ------------------
27160|      0|                        return NULL;
27161|      0|                    return memcmp(text, bytes, len) ? NULL : text + len;
  ------------------
  |  Branch (27161:28): [True: 0, False: 0]
  ------------------
27162|      0|                }
27163|      0|            }
27164|      0|            return NULL;
27165|      0|        }
27166|       |
27167|      0|        case RULE_LENPREFIX: {
  ------------------
  |  Branch (27167:9): [True: 0, False: 185k]
  ------------------
27168|      0|            int oldmode = s->mode;
27169|      0|            s->mode = PEG_MODE_NORMAL;
27170|      0|            const uint8_t *next_text;
27171|      0|            CapState cs = cap_save(s);
27172|      0|            down1(s);
  ------------------
  |  |26583|      0|#define down1(s) do { \
  |  |26584|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26585|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27173|      0|            next_text = peg_rule(s, s->bytecode + rule[1], text);
27174|      0|            up1(s);
  ------------------
  |  |26586|      0|#define up1(s) ((s)->depth++)
  ------------------
27175|      0|            if (NULL == next_text) return NULL;
  ------------------
  |  Branch (27175:17): [True: 0, False: 0]
  ------------------
27176|      0|            s->mode = oldmode;
27177|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
27178|      0|            Janet lencap;
27179|      0|            if (num_sub_captures <= 0 ||
  ------------------
  |  Branch (27179:17): [True: 0, False: 0]
  ------------------
27180|      0|                    (lencap = s->captures->data[cs.cap], !janet_checkint(lencap))) {
  ------------------
  |  Branch (27180:21): [True: 0, False: 0]
  ------------------
27181|      0|                cap_load(s, cs);
27182|      0|                return NULL;
27183|      0|            }
27184|      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)
  |  |  ------------------
  ------------------
27185|       |            /* drop captures from len pattern */
27186|      0|            cap_load(s, cs);
27187|      0|            for (int32_t i = 0; i < nrep; i++) {
  ------------------
  |  Branch (27187:33): [True: 0, False: 0]
  ------------------
27188|      0|                down1(s);
  ------------------
  |  |26583|      0|#define down1(s) do { \
  |  |26584|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26585|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27189|      0|                next_text = peg_rule(s, s->bytecode + rule[2], next_text);
27190|      0|                up1(s);
  ------------------
  |  |26586|      0|#define up1(s) ((s)->depth++)
  ------------------
27191|      0|                if (NULL == next_text) {
  ------------------
  |  Branch (27191:21): [True: 0, False: 0]
  ------------------
27192|      0|                    cap_load(s, cs);
27193|      0|                    return NULL;
27194|      0|                }
27195|      0|            }
27196|      0|            return next_text;
27197|      0|        }
27198|       |
27199|      0|        case RULE_READINT: {
  ------------------
  |  Branch (27199:9): [True: 0, False: 185k]
  ------------------
27200|      0|            uint32_t tag = rule[2];
27201|      0|            uint32_t signedness = rule[1] & 0x10;
27202|      0|            uint32_t endianness = rule[1] & 0x20;
27203|      0|            int width = (int)(rule[1] & 0xF);
27204|      0|            if (text + width > s->text_end) return NULL;
  ------------------
  |  Branch (27204:17): [True: 0, False: 0]
  ------------------
27205|      0|            uint64_t accum = 0;
27206|      0|            if (endianness) {
  ------------------
  |  Branch (27206:17): [True: 0, False: 0]
  ------------------
27207|       |                /* BE */
27208|      0|                for (int i = 0; i < width; i++) accum = (accum << 8) | text[i];
  ------------------
  |  Branch (27208:33): [True: 0, False: 0]
  ------------------
27209|      0|            } else {
27210|       |                /* LE */
27211|      0|                for (int i = width - 1; i >= 0; i--) accum = (accum << 8) | text[i];
  ------------------
  |  Branch (27211:41): [True: 0, False: 0]
  ------------------
27212|      0|            }
27213|       |
27214|      0|            Janet capture_value;
27215|       |            /* We can only parse integeres of greater than 6 bytes reliable if int-types are enabled.
27216|       |             * Otherwise, we may lose precision, so 6 is the maximum size when int-types are disabled. */
27217|      0|#ifdef JANET_INT_TYPES
27218|      0|            if (width > 6) {
  ------------------
  |  Branch (27218:17): [True: 0, False: 0]
  ------------------
27219|      0|                if (signedness) {
  ------------------
  |  Branch (27219:21): [True: 0, False: 0]
  ------------------
27220|      0|                    capture_value = janet_wrap_s64(peg_convert_u64_s64(accum, width));
27221|      0|                } else {
27222|      0|                    capture_value = janet_wrap_u64(accum);
27223|      0|                }
27224|      0|            } else
27225|      0|#endif
27226|      0|            {
27227|      0|                double double_value;
27228|      0|                if (signedness) {
  ------------------
  |  Branch (27228:21): [True: 0, False: 0]
  ------------------
27229|      0|                    double_value = (double)(peg_convert_u64_s64(accum, width));
27230|      0|                } else {
27231|      0|                    double_value = (double)accum;
27232|      0|                }
27233|      0|                capture_value = janet_wrap_number(double_value);
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
27234|      0|            }
27235|       |
27236|      0|            pushcap(s, capture_value, tag);
27237|      0|            return text + width;
27238|      0|        }
27239|       |
27240|      0|        case RULE_UNREF: {
  ------------------
  |  Branch (27240:9): [True: 0, False: 185k]
  ------------------
27241|      0|            int32_t tcap = s->tags->count;
27242|      0|            down1(s);
  ------------------
  |  |26583|      0|#define down1(s) do { \
  |  |26584|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26584:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26585|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26585:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27243|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
27244|      0|            up1(s);
  ------------------
  |  |26586|      0|#define up1(s) ((s)->depth++)
  ------------------
27245|      0|            if (!result) return NULL;
  ------------------
  |  Branch (27245:17): [True: 0, False: 0]
  ------------------
27246|      0|            int32_t final_tcap = s->tags->count;
27247|       |            /* Truncate tagged captures to not include items of the given tag */
27248|      0|            int32_t w = tcap;
27249|       |            /* If no tag is given, drop ALL tagged captures */
27250|      0|            if (rule[2]) {
  ------------------
  |  Branch (27250:17): [True: 0, False: 0]
  ------------------
27251|      0|                for (int32_t i = tcap; i < final_tcap; i++) {
  ------------------
  |  Branch (27251:40): [True: 0, False: 0]
  ------------------
27252|      0|                    if (s->tags->data[i] != (0xFF & rule[2])) {
  ------------------
  |  Branch (27252:25): [True: 0, False: 0]
  ------------------
27253|      0|                        s->tags->data[w] = s->tags->data[i];
27254|      0|                        s->tagged_captures->data[w] = s->tagged_captures->data[i];
27255|      0|                        w++;
27256|      0|                    }
27257|      0|                }
27258|      0|            }
27259|      0|            s->tags->count = w;
27260|      0|            s->tagged_captures->count = w;
27261|      0|            return result;
27262|      0|        }
27263|       |
27264|   185k|    }
27265|   185k|}
janet.c:cap_save:
26488|   149k|static CapState cap_save(PegState *s) {
26489|   149k|    CapState cs;
26490|   149k|    cs.scratch = s->scratch->count;
26491|   149k|    cs.cap = s->captures->count;
26492|   149k|    cs.tcap = s->tagged_captures->count;
26493|   149k|    return cs;
26494|   149k|}
janet.c:cap_load:
26497|  11.6k|static void cap_load(PegState *s, CapState cs) {
26498|  11.6k|    s->scratch->count = cs.scratch;
26499|  11.6k|    s->captures->count = cs.cap;
26500|  11.6k|    s->tags->count = cs.tcap;
26501|  11.6k|    s->tagged_captures->count = cs.tcap;
26502|  11.6k|}
janet.c:pushcap:
26512|  2.58k|static void pushcap(PegState *s, Janet capture, uint32_t tag) {
26513|  2.58k|    if (s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (26513:9): [True: 0, False: 2.58k]
  ------------------
26514|      0|        janet_to_string_b(s->scratch, capture);
26515|      0|    }
26516|  2.58k|    if (s->mode == PEG_MODE_NORMAL) {
  ------------------
  |  Branch (26516:9): [True: 2.58k, False: 0]
  ------------------
26517|  2.58k|        janet_array_push(s->captures, capture);
26518|  2.58k|    }
26519|  2.58k|    if (s->has_backref) {
  ------------------
  |  Branch (26519:9): [True: 0, False: 2.58k]
  ------------------
26520|      0|        janet_array_push(s->tagged_captures, capture);
26521|      0|        janet_buffer_push_u8(s->tags, tag);
26522|      0|    }
26523|  2.58k|}
janet.c:cap_load_keept:
26506|      9|static void cap_load_keept(PegState *s, CapState cs) {
26507|      9|    s->scratch->count = cs.scratch;
26508|      9|    s->captures->count = cs.cap;
26509|      9|}
janet.c:peg_call_reset:
28397|  16.2k|static void peg_call_reset(PegCall *c) {
28398|  16.2k|    c->s.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  291|  16.2k|#define JANET_RECURSION_GUARD 1024
  ------------------
28399|  16.2k|    c->s.captures->count = 0;
28400|  16.2k|    c->s.tagged_captures->count = 0;
28401|  16.2k|    c->s.scratch->count = 0;
28402|  16.2k|    c->s.tags->count = 0;
28403|  16.2k|}
janet.c:cfun_peg_replace_generic:
28439|    447|static Janet cfun_peg_replace_generic(int32_t argc, Janet *argv, int only_one) {
28440|    447|    PegCall c = peg_cfun_init(argc, argv, 1);
28441|    447|    JanetBuffer *ret = janet_buffer(0);
28442|    447|    int32_t trail = 0;
28443|  12.3k|    for (int32_t i = c.start; i < c.bytes.len;) {
  ------------------
  |  Branch (28443:31): [True: 11.9k, False: 411]
  ------------------
28444|  11.9k|        peg_call_reset(&c);
28445|  11.9k|        const uint8_t *result = peg_rule(&c.s, c.s.bytecode, c.bytes.bytes + i);
28446|  11.9k|        if (NULL != result) {
  ------------------
  |  Branch (28446:13): [True: 439, False: 11.5k]
  ------------------
28447|    439|            if (trail < i) {
  ------------------
  |  Branch (28447:17): [True: 271, False: 168]
  ------------------
28448|    271|                janet_buffer_push_bytes(ret, c.bytes.bytes + trail, (i - trail));
28449|    271|                trail = i;
28450|    271|            }
28451|    439|            int32_t nexti = (int32_t)(result - c.bytes.bytes);
28452|    439|            JanetByteView subst = janet_text_substitution(&c.subst, c.bytes.bytes + i, nexti - i, c.s.captures);
28453|    439|            janet_buffer_push_bytes(ret, subst.bytes, subst.len);
28454|    439|            trail = nexti;
28455|    439|            if (nexti == i) nexti++;
  ------------------
  |  Branch (28455:17): [True: 258, False: 181]
  ------------------
28456|    439|            i = nexti;
28457|    439|            if (only_one) break;
  ------------------
  |  Branch (28457:17): [True: 36, False: 403]
  ------------------
28458|  11.5k|        } else {
28459|  11.5k|            i++;
28460|  11.5k|        }
28461|  11.9k|    }
28462|    447|    if (trail < c.bytes.len) {
  ------------------
  |  Branch (28462:9): [True: 221, False: 226]
  ------------------
28463|    221|        janet_buffer_push_bytes(ret, c.bytes.bytes + trail, (c.bytes.len - trail));
28464|    221|    }
28465|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28466|    447|}
janet.c:number_to_string_b:
28574|  5.32M|static void number_to_string_b(JanetBuffer *buffer, double x) {
28575|  5.32M|    janet_buffer_ensure(buffer, buffer->count + BUFSIZE, 2);
  ------------------
  |  |28568|  5.32M|#define BUFSIZE 64
  ------------------
28576|  5.32M|    const char *fmt = (x == floor(x) &&
  ------------------
  |  Branch (28576:24): [True: 5.32M, False: 198]
  ------------------
28577|  5.32M|                       x <= JANET_INTMAX_DOUBLE &&
  ------------------
  |  |  160|  10.6M|#define JANET_INTMAX_DOUBLE 9007199254740992.0
  ------------------
  |  Branch (28577:24): [True: 5.32M, False: 173]
  ------------------
28578|  5.32M|                       x >= JANET_INTMIN_DOUBLE) ? "%.0f" : ("%." STR(DBL_DIG) "g");
  ------------------
  |  |  161|  5.32M|#define JANET_INTMIN_DOUBLE (-9007199254740992.0)
  ------------------
  |  Branch (28578:24): [True: 5.32M, False: 31]
  ------------------
28579|  5.32M|    int count;
28580|  5.32M|    if (x == 0.0) {
  ------------------
  |  Branch (28580:9): [True: 74.4k, False: 5.24M]
  ------------------
28581|       |        /* Prevent printing of '-0' */
28582|  74.4k|        count = 1;
28583|  74.4k|        buffer->data[buffer->count] = '0';
28584|  5.24M|    } else {
28585|  5.24M|        count = snprintf((char *) buffer->data + buffer->count, BUFSIZE, fmt, x);
  ------------------
  |  |28568|  5.24M|#define BUFSIZE 64
  ------------------
28586|  5.24M|    }
28587|  5.32M|    buffer->count += count;
28588|  5.32M|}
janet.c:string_description_b:
28634|  67.0k|static void string_description_b(JanetBuffer *buffer, const char *title, void *pointer) {
28635|  67.0k|    janet_buffer_ensure(buffer, buffer->count + BUFSIZE, 2);
  ------------------
  |  |28568|  67.0k|#define BUFSIZE 64
  ------------------
28636|  67.0k|    uint8_t *c = buffer->data + buffer->count;
28637|  67.0k|    int32_t i;
28638|  67.0k|    union {
28639|  67.0k|        uint8_t bytes[sizeof(void *)];
28640|  67.0k|        void *p;
28641|  67.0k|    } pbuf;
28642|       |
28643|  67.0k|    pbuf.p = pointer;
28644|  67.0k|    *c++ = '<';
28645|       |    /* Maximum of 32 bytes for abstract type name */
28646|   402k|    for (i = 0; i < 32 && title[i]; ++i)
  ------------------
  |  Branch (28646:17): [True: 402k, False: 0]
  |  Branch (28646:27): [True: 335k, False: 67.0k]
  ------------------
28647|   335k|        *c++ = ((uint8_t *)title) [i];
28648|  67.0k|    *c++ = ' ';
28649|  67.0k|    *c++ = '0';
28650|  67.0k|    *c++ = 'x';
28651|  67.0k|#if defined(JANET_64)
28652|  67.0k|#define POINTSIZE 6
28653|       |#else
28654|       |#define POINTSIZE (sizeof(void *))
28655|       |#endif
28656|   469k|    for (i = POINTSIZE; i > 0; --i) {
  ------------------
  |  |28652|  67.0k|#define POINTSIZE 6
  ------------------
  |  Branch (28656:25): [True: 402k, False: 67.0k]
  ------------------
28657|   402k|        uint8_t byte = pbuf.bytes[i - 1];
28658|   402k|        *c++ = HEX(byte >> 4);
  ------------------
  |  |28630|   402k|#define HEX(i) (((uint8_t *) janet_base64)[(i)])
  ------------------
28659|   402k|        *c++ = HEX(byte & 0xF);
  ------------------
  |  |28630|   402k|#define HEX(i) (((uint8_t *) janet_base64)[(i)])
  ------------------
28660|   402k|    }
28661|  67.0k|    *c++ = '>';
28662|  67.0k|    buffer->count = (int32_t)(c - buffer->data);
28663|  67.0k|#undef POINTSIZE
28664|  67.0k|}
janet.c:janet_escape_string_b:
28736|  7.32k|static void janet_escape_string_b(JanetBuffer *buffer, const uint8_t *str) {
28737|       |    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)))
  |  |  ------------------
  ------------------
28738|  7.32k|}
janet.c:janet_escape_string_impl:
28666|  8.72k|static int janet_escape_string_impl(JanetBuffer *buffer, const uint8_t *str, int32_t len) {
28667|  8.72k|    janet_buffer_push_u8(buffer, '"');
28668|  8.72k|    int align = 1;
28669|  98.5k|    for (int32_t i = 0; i < len; ++i) {
  ------------------
  |  Branch (28669:25): [True: 89.8k, False: 8.72k]
  ------------------
28670|  89.8k|        uint8_t c = str[i];
28671|  89.8k|        switch (c) {
28672|    851|            case '"':
  ------------------
  |  Branch (28672:13): [True: 851, False: 88.9k]
  ------------------
28673|    851|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\\"", 2);
28674|    851|                align += 2;
28675|    851|                break;
28676|  1.28k|            case '\n':
  ------------------
  |  Branch (28676:13): [True: 1.28k, False: 88.5k]
  ------------------
28677|  1.28k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\n", 2);
28678|  1.28k|                align += 2;
28679|  1.28k|                break;
28680|    535|            case '\r':
  ------------------
  |  Branch (28680:13): [True: 535, False: 89.2k]
  ------------------
28681|    535|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\r", 2);
28682|    535|                align += 2;
28683|    535|                break;
28684|  14.8k|            case '\0':
  ------------------
  |  Branch (28684:13): [True: 14.8k, False: 74.9k]
  ------------------
28685|  14.8k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\0", 2);
28686|  14.8k|                align += 2;
28687|  14.8k|                break;
28688|  1.07k|            case '\f':
  ------------------
  |  Branch (28688:13): [True: 1.07k, False: 88.7k]
  ------------------
28689|  1.07k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\f", 2);
28690|  1.07k|                align += 2;
28691|  1.07k|                break;
28692|    331|            case '\v':
  ------------------
  |  Branch (28692:13): [True: 331, False: 89.4k]
  ------------------
28693|    331|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\v", 2);
28694|    331|                align += 2;
28695|    331|                break;
28696|    312|            case '\a':
  ------------------
  |  Branch (28696:13): [True: 312, False: 89.4k]
  ------------------
28697|    312|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\a", 2);
28698|    312|                align += 2;
28699|    312|                break;
28700|    318|            case '\b':
  ------------------
  |  Branch (28700:13): [True: 318, False: 89.4k]
  ------------------
28701|    318|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\b", 2);
28702|    318|                align += 2;
28703|    318|                break;
28704|    238|            case 27:
  ------------------
  |  Branch (28704:13): [True: 238, False: 89.5k]
  ------------------
28705|    238|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\e", 2);
28706|    238|                align += 2;
28707|    238|                break;
28708|  2.08k|            case '\\':
  ------------------
  |  Branch (28708:13): [True: 2.08k, False: 87.7k]
  ------------------
28709|  2.08k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\\\", 2);
28710|  2.08k|                align += 2;
28711|  2.08k|                break;
28712|    498|            case '\t':
  ------------------
  |  Branch (28712:13): [True: 498, False: 89.3k]
  ------------------
28713|    498|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\t", 2);
28714|    498|                align += 2;
28715|    498|                break;
28716|  67.4k|            default:
  ------------------
  |  Branch (28716:13): [True: 67.4k, False: 22.3k]
  ------------------
28717|  67.4k|                if (c < 32 || c > 126) {
  ------------------
  |  Branch (28717:21): [True: 1.65k, False: 65.7k]
  |  Branch (28717:31): [True: 8.50k, False: 57.2k]
  ------------------
28718|  10.1k|                    uint8_t buf[4];
28719|  10.1k|                    buf[0] = '\\';
28720|  10.1k|                    buf[1] = 'x';
28721|  10.1k|                    buf[2] = janet_base64[(c >> 4) & 0xF];
28722|  10.1k|                    buf[3] = janet_base64[c & 0xF];
28723|  10.1k|                    janet_buffer_push_bytes(buffer, buf, 4);
28724|  10.1k|                    align += 4;
28725|  57.2k|                } else {
28726|  57.2k|                    janet_buffer_push_u8(buffer, c);
28727|  57.2k|                    align++;
28728|  57.2k|                }
28729|  67.4k|                break;
28730|  89.8k|        }
28731|  89.8k|    }
28732|  8.72k|    janet_buffer_push_u8(buffer, '"');
28733|  8.72k|    return align + 1;
28734|  8.72k|}
janet.c:janet_escape_buffer_b:
28740|  1.40k|static void janet_escape_buffer_b(JanetBuffer *buffer, JanetBuffer *bx) {
28741|  1.40k|    if (bx == buffer) {
  ------------------
  |  Branch (28741:9): [True: 0, False: 1.40k]
  ------------------
28742|       |        /* Ensures buffer won't resize while escaping */
28743|      0|        janet_buffer_ensure(bx, bx->count + 5 * bx->count + 3, 1);
28744|      0|    }
28745|  1.40k|    janet_buffer_push_u8(buffer, '@');
28746|  1.40k|    janet_escape_string_impl(buffer, bx->data, bx->count);
28747|  1.40k|}
janet.c:janet_pretty_:
29332|  2.02k|                                  int flags, Janet x, int32_t startlen, int32_t lookback_barrier) {
29333|  2.02k|    struct pretty S;
29334|  2.02k|    if (NULL == buffer) {
  ------------------
  |  Branch (29334:9): [True: 0, False: 2.02k]
  ------------------
29335|      0|        buffer = janet_buffer(0);
29336|      0|    }
29337|  2.02k|    S.buffer = buffer;
29338|  2.02k|    S.depth = depth;
29339|  2.02k|    S.width = width;
29340|  2.02k|    S.align = 0;
29341|  2.02k|    S.flags = flags;
29342|  2.02k|    S.bufstartlen = startlen;
29343|  2.02k|    S.lookback_barrier = lookback_barrier;
29344|  2.02k|    S.keysort_capacity = 0;
29345|       |    S.keysort_buffer = NULL;
29346|  2.02k|    S.keysort_start = 0;
29347|  2.02k|    janet_table_init(&S.seen, 10);
29348|  2.02k|    janet_pretty_one(&S, x);
29349|  2.02k|    backtrack_newlines(&S);
29350|  2.02k|    janet_table_deinit(&S.seen);
29351|  2.02k|    return S.buffer;
29352|  2.02k|}
janet.c:janet_pretty_one:
29101|   644k|static void janet_pretty_one(struct pretty *S, Janet x) {
29102|       |    /* Add to seen */
29103|   644k|    switch (janet_type(x)) {
  ------------------
  |  |  790|   644k|    (isnan((x).number) \
  |  |  791|   644k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   644k|        : JANET_NUMBER)
  ------------------
  |  Branch (29103:13): [True: 643k, False: 635]
  ------------------
29104|      0|        case JANET_NIL:
  ------------------
  |  Branch (29104:9): [True: 0, False: 644k]
  ------------------
29105|    635|        case JANET_NUMBER:
  ------------------
  |  Branch (29105:9): [True: 635, False: 643k]
  ------------------
29106|   376k|        case JANET_SYMBOL:
  ------------------
  |  Branch (29106:9): [True: 375k, False: 268k]
  ------------------
29107|   376k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (29107:9): [True: 13, False: 644k]
  ------------------
29108|   376k|            break;
29109|   268k|        default: {
  ------------------
  |  Branch (29109:9): [True: 268k, False: 376k]
  ------------------
29110|   268k|            Janet seenid = janet_table_get(&S->seen, x);
29111|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29112|      0|                if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1957|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29112:21): [True: 0, False: 0]
  ------------------
29113|      0|                    janet_buffer_push_cstring(S->buffer, janet_cycle_color);
29114|      0|                }
29115|      0|                janet_buffer_push_cstring(S->buffer, "<cycle ");
29116|      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)
  |  |  ------------------
  ------------------
29117|      0|                janet_buffer_push_u8(S->buffer, '>');
29118|      0|                if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1957|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29118:21): [True: 0, False: 0]
  ------------------
29119|      0|                    janet_buffer_push_cstring(S->buffer, "\x1B[0m");
29120|      0|                }
29121|      0|                return;
29122|   268k|            } else {
29123|   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)
  |  |  ------------------
  ------------------
29124|   268k|                break;
29125|   268k|            }
29126|   268k|        }
29127|   644k|    }
29128|       |
29129|   644k|    switch (janet_type(x)) {
  ------------------
  |  |  790|   644k|    (isnan((x).number) \
  |  |  791|   644k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   644k|        : JANET_NUMBER)
  ------------------
  |  Branch (29129:13): [True: 643k, False: 635]
  ------------------
29130|   378k|        default: {
  ------------------
  |  Branch (29130:9): [True: 378k, False: 265k]
  ------------------
29131|   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 (29131:53): [True: 378k, False: 635]
  ------------------
29132|   378k|            if (color && (S->flags & JANET_PRETTY_COLOR)) {
  ------------------
  |  | 1957|   378k|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29132:17): [True: 378k, False: 0]
  |  Branch (29132:26): [True: 579, False: 378k]
  ------------------
29133|    579|                janet_buffer_push_cstring(S->buffer, color);
29134|    579|            }
29135|   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 (29135:53): [True: 0, False: 110]
  ------------------
29136|      0|                janet_buffer_ensure(S->buffer, S->buffer->count + S->bufstartlen * 4 + 3, 1);
29137|      0|                janet_buffer_push_u8(S->buffer, '@');
29138|       |                /* Use start len to print to self better */
29139|      0|                S->align += 1 + janet_escape_string_impl(S->buffer, S->buffer->data, S->bufstartlen);
29140|   378k|            } else {
29141|   378k|                S->align -= S->buffer->count;
29142|   378k|                janet_description_b(S->buffer, x);
29143|   378k|                S->align += S->buffer->count;
29144|   378k|            }
29145|   378k|            if (color && (S->flags & JANET_PRETTY_COLOR)) {
  ------------------
  |  | 1957|   378k|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29145:17): [True: 378k, False: 0]
  |  Branch (29145:26): [True: 579, False: 378k]
  ------------------
29146|    579|                janet_buffer_push_cstring(S->buffer, "\x1B[0m");
29147|    579|            }
29148|   378k|            break;
29149|      0|        }
29150|    140|        case JANET_ARRAY:
  ------------------
  |  Branch (29150:9): [True: 140, False: 644k]
  ------------------
29151|   262k|        case JANET_TUPLE: {
  ------------------
  |  Branch (29151:9): [True: 262k, False: 382k]
  ------------------
29152|   262k|            int32_t i = 0, len = 0;
29153|   262k|            const Janet *arr = NULL;
29154|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29155|   262k|            janet_indexed_view(x, &arr, &len);
29156|   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 (29156:31): [True: 262k, False: 140]
  |  Branch (29156:43): [True: 129, False: 262k]
  ------------------
29157|   262k|            const char *startstr = isarray ? "@[" : hasbrackets ? "[" : "(";
  ------------------
  |  Branch (29157:36): [True: 140, False: 262k]
  |  Branch (29157:53): [True: 129, False: 262k]
  ------------------
29158|   262k|            const char endchar = isarray ? ']' : hasbrackets ? ']' : ')';
  ------------------
  |  Branch (29158:34): [True: 140, False: 262k]
  |  Branch (29158:50): [True: 129, False: 262k]
  ------------------
29159|   262k|            janet_buffer_push_cstring(S->buffer, startstr);
29160|   262k|            S->align += strlen(startstr);
29161|   262k|            const int align = S->leaf_align = S->align;
29162|   262k|            S->depth--;
29163|   262k|            if (S->depth == 0) {
  ------------------
  |  Branch (29163:17): [True: 44, False: 262k]
  ------------------
29164|     44|                janet_buffer_push_cstring(S->buffer, "...");
29165|     44|                S->align += 3;
29166|   262k|            } else {
29167|   262k|                if (len > JANET_PRETTY_ARRAY_LIMIT && !(S->flags & JANET_PRETTY_NOTRUNC)) {
  ------------------
  |  |29098|   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 (29167:21): [True: 29, False: 262k]
  |  Branch (29167:55): [True: 29, False: 0]
  ------------------
29168|    116|                    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (29168:33): [True: 87, False: 29]
  ------------------
29169|     87|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (29169:29): [True: 58, False: 29]
  ------------------
29170|     87|                        janet_pretty_one(S, arr[i]);
29171|     87|                    }
29172|     29|                    print_newline(S, align);
29173|     29|                    janet_buffer_push_cstring(S->buffer, "...");
29174|     29|                    S->align += 3;
29175|    116|                    for (i = len - 3; i < len; i++) {
  ------------------
  |  Branch (29175:39): [True: 87, False: 29]
  ------------------
29176|     87|                        print_newline(S, align);
29177|     87|                        janet_pretty_one(S, arr[i]);
29178|     87|                    }
29179|   262k|                } else {
29180|   892k|                    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (29180:33): [True: 629k, False: 262k]
  ------------------
29181|   629k|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (29181:29): [True: 367k, False: 262k]
  ------------------
29182|   629k|                        janet_pretty_one(S, arr[i]);
29183|   629k|                    }
29184|   262k|                }
29185|   262k|            }
29186|   262k|            S->depth++;
29187|   262k|            janet_buffer_push_u8(S->buffer, endchar);
29188|   262k|            S->align++;
29189|   262k|            break;
29190|    140|        }
29191|  3.02k|        case JANET_STRUCT:
  ------------------
  |  Branch (29191:9): [True: 3.02k, False: 641k]
  ------------------
29192|  3.05k|        case JANET_TABLE: {
  ------------------
  |  Branch (29192:9): [True: 28, False: 644k]
  ------------------
29193|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29194|       |
29195|       |            /* For object-like tables, print class name */
29196|  3.05k|            if (istable) {
  ------------------
  |  Branch (29196:17): [True: 28, False: 3.02k]
  ------------------
29197|     28|                JanetTable *t = janet_unwrap_table(x);
  ------------------
  |  |  856|     28|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
29198|     28|                JanetTable *proto = t->proto;
29199|     28|                S->align++;
29200|     28|                janet_buffer_push_cstring(S->buffer, "@");
29201|     28|                if (NULL != proto) {
  ------------------
  |  Branch (29201:21): [True: 1, False: 27]
  ------------------
29202|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29203|      1|                    const uint8_t *n;
29204|      1|                    int32_t len;
29205|      1|                    if (janet_bytes_view(name, &n, &len)) {
  ------------------
  |  Branch (29205:25): [True: 0, False: 1]
  ------------------
29206|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1957|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29206:29): [True: 0, False: 0]
  ------------------
29207|      0|                            janet_buffer_push_cstring(S->buffer, janet_class_color);
29208|      0|                        }
29209|      0|                        janet_buffer_push_bytes(S->buffer, n, len);
29210|      0|                        S->align += len;
29211|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1957|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29211:29): [True: 0, False: 0]
  ------------------
29212|      0|                            janet_buffer_push_cstring(S->buffer, "\x1B[0m");
29213|      0|                        }
29214|      0|                    }
29215|      1|                }
29216|  3.02k|            } else {
29217|  3.02k|                JanetStruct st = janet_unwrap_struct(x);
  ------------------
  |  |  852|  3.02k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
29218|  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)))
  |  |  ------------------
  ------------------
29219|  3.02k|                if (NULL != proto) {
  ------------------
  |  Branch (29219:21): [True: 0, False: 3.02k]
  ------------------
29220|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29221|      0|                    const uint8_t *n;
29222|      0|                    int32_t len;
29223|      0|                    if (janet_bytes_view(name, &n, &len)) {
  ------------------
  |  Branch (29223:25): [True: 0, False: 0]
  ------------------
29224|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1957|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29224:29): [True: 0, False: 0]
  ------------------
29225|      0|                            janet_buffer_push_cstring(S->buffer, janet_class_color);
29226|      0|                        }
29227|      0|                        janet_buffer_push_bytes(S->buffer, n, len);
29228|      0|                        S->align += len;
29229|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1957|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29229:29): [True: 0, False: 0]
  ------------------
29230|      0|                            janet_buffer_push_cstring(S->buffer, "\x1B[0m");
29231|      0|                        }
29232|      0|                    }
29233|      0|                }
29234|  3.02k|            }
29235|  3.05k|            janet_buffer_push_u8(S->buffer, '{');
29236|  3.05k|            const int align = S->leaf_align = ++S->align;
29237|       |
29238|  3.05k|            S->depth--;
29239|  3.05k|            if (S->depth == 0) {
  ------------------
  |  Branch (29239:17): [True: 0, False: 3.05k]
  ------------------
29240|      0|                janet_buffer_push_cstring(S->buffer, "...");
29241|      0|                S->align += 3;
29242|  3.05k|            } else {
29243|  3.05k|                int32_t len = 0, cap = 0;
29244|  3.05k|                const JanetKV *kvs = NULL;
29245|  3.05k|                janet_dictionary_view(x, &kvs, &len, &cap);
29246|  3.05k|                int32_t ks_start = S->keysort_start;
29247|  3.05k|                int truncated = 0;
29248|       |
29249|       |                /* Shortcut for huge dictionaries, don't bother sorting keys */
29250|  3.05k|                if (len > JANET_PRETTY_DICT_KEYSORT_LIMIT) {
  ------------------
  |  |29097|  3.05k|#define JANET_PRETTY_DICT_KEYSORT_LIMIT 2000
  ------------------
  |  Branch (29250:21): [True: 0, False: 3.05k]
  ------------------
29251|      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)) {
  ------------------
  |  |29096|      0|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
  |  Branch (29251:25): [True: 0, False: 0]
  |  Branch (29251:63): [True: 0, False: 0]
  ------------------
29252|      0|                        len = JANET_PRETTY_DICT_LIMIT;
  ------------------
  |  |29096|      0|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
29253|      0|                        truncated = 1;
29254|      0|                    }
29255|      0|                    int32_t j = 0;
29256|      0|                    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (29256:41): [True: 0, False: 0]
  ------------------
29257|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29258|      0|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (29258:29): [True: 0, False: 0]
  ------------------
29259|      0|                        janet_pretty_one(S, kvs[j].key);
29260|      0|                        janet_buffer_push_u8(S->buffer, ' ');
29261|      0|                        S->align++;
29262|      0|                        janet_pretty_one(S, kvs[j].value);
29263|      0|                        j++;
29264|      0|                    }
29265|      0|                    if (truncated) {
  ------------------
  |  Branch (29265:25): [True: 0, False: 0]
  ------------------
29266|      0|                        print_newline(S, align);
29267|      0|                        janet_buffer_push_cstring(S->buffer, "...");
29268|      0|                        S->align += 3;
29269|      0|                    }
29270|  3.05k|                } else {
29271|       |                    /* Sorted keys dictionaries */
29272|       |
29273|       |                    /* Ensure buffer is large enough to sort keys. */
29274|  3.05k|                    int64_t mincap = (int64_t) len + (int64_t) ks_start;
29275|  3.05k|                    if (mincap > INT32_MAX) {
  ------------------
  |  Branch (29275:25): [True: 0, False: 3.05k]
  ------------------
29276|      0|                        truncated = 1;
29277|      0|                        len = 0;
29278|      0|                        mincap = ks_start;
29279|      0|                    }
29280|       |
29281|  3.05k|                    if (S->keysort_capacity < mincap) {
  ------------------
  |  Branch (29281:25): [True: 72, False: 2.98k]
  ------------------
29282|     72|                        if (mincap >= INT32_MAX / 2) {
  ------------------
  |  Branch (29282:29): [True: 0, False: 72]
  ------------------
29283|      0|                            S->keysort_capacity = INT32_MAX;
29284|     72|                        } else {
29285|     72|                            S->keysort_capacity = (int32_t)(mincap * 2);
29286|     72|                        }
29287|     72|                        S->keysort_buffer = janet_srealloc(S->keysort_buffer, sizeof(int32_t) * S->keysort_capacity);
29288|     72|                        if (NULL == S->keysort_buffer) {
  ------------------
  |  Branch (29288:29): [True: 0, False: 72]
  ------------------
29289|      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]
  |  |  ------------------
  ------------------
29290|      0|                        }
29291|     72|                    }
29292|       |
29293|  3.05k|                    janet_sorted_keys(kvs, cap, S->keysort_buffer == NULL ? NULL : S->keysort_buffer + ks_start);
  ------------------
  |  Branch (29293:49): [True: 60, False: 2.99k]
  ------------------
29294|  3.05k|                    S->keysort_start += len;
29295|  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)) {
  ------------------
  |  |29096|  3.05k|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
  |  Branch (29295:25): [True: 3.05k, False: 3]
  |  Branch (29295:63): [True: 0, False: 3.05k]
  ------------------
29296|      0|                        len = JANET_PRETTY_DICT_LIMIT;
  ------------------
  |  |29096|      0|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
29297|      0|                        truncated = 1;
29298|      0|                    }
29299|       |
29300|  9.15k|                    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (29300:41): [True: 6.10k, False: 3.05k]
  ------------------
29301|  6.10k|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (29301:29): [True: 3.18k, False: 2.92k]
  ------------------
29302|  6.10k|                        int32_t j = S->keysort_buffer[i + ks_start];
29303|  6.10k|                        janet_pretty_one(S, kvs[j].key);
29304|  6.10k|                        janet_buffer_push_u8(S->buffer, ' ');
29305|  6.10k|                        S->align++;
29306|  6.10k|                        janet_pretty_one(S, kvs[j].value);
29307|  6.10k|                    }
29308|       |
29309|  3.05k|                    if (truncated) {
  ------------------
  |  Branch (29309:25): [True: 0, False: 3.05k]
  ------------------
29310|      0|                        print_newline(S, align);
29311|      0|                        janet_buffer_push_cstring(S->buffer, "...");
29312|      0|                        S->align += 3;
29313|      0|                    }
29314|       |
29315|  3.05k|                }
29316|  3.05k|                S->keysort_start = ks_start;
29317|  3.05k|            }
29318|  3.05k|            S->depth++;
29319|  3.05k|            janet_buffer_push_u8(S->buffer, '}');
29320|  3.05k|            S->align++;
29321|  3.05k|            break;
29322|  3.05k|        }
29323|   644k|    }
29324|       |    /* Remove from seen */
29325|   644k|    janet_table_remove(&S->seen, x);
29326|   644k|    return;
29327|   644k|}
janet.c:print_newline:
29060|   371k|static void print_newline(struct pretty *S, int align) {
29061|   371k|    int i;
29062|   371k|    if (S->flags & JANET_PRETTY_ONELINE) {
  ------------------
  |  | 1958|   371k|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (29062:9): [True: 331k, False: 40.1k]
  ------------------
29063|   331k|        janet_buffer_push_u8(S->buffer, ' ');
29064|   331k|        return;
29065|   331k|    }
29066|  40.1k|    backtrack_newlines(S);
29067|  40.1k|    janet_buffer_push_u8(S->buffer, '\n');
29068|  40.1k|    S->leaf_align = S->align = align;
29069|  4.85M|    for (i = 0; i < S->align; i++) {
  ------------------
  |  Branch (29069:17): [True: 4.81M, False: 40.1k]
  ------------------
29070|  4.81M|        janet_buffer_push_u8(S->buffer, ' ');
29071|  4.81M|    }
29072|  40.1k|}
janet.c:backtrack_newlines:
29000|  42.1k|static void backtrack_newlines(const struct pretty *S) {
29001|  42.1k|    if (S->flags & JANET_PRETTY_ONELINE || S->buffer->count <= 0)
  ------------------
  |  | 1958|  84.2k|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (29001:9): [True: 1.80k, False: 40.3k]
  |  Branch (29001:44): [True: 0, False: 40.3k]
  ------------------
29002|  1.80k|        return;
29003|  40.3k|    switch (S->buffer->data[S->buffer->count - 1]) {
29004|  2.73k|        case ')':
  ------------------
  |  Branch (29004:9): [True: 2.73k, False: 37.6k]
  ------------------
29005|  2.76k|        case '}':
  ------------------
  |  Branch (29005:9): [True: 36, False: 40.3k]
  ------------------
29006|  2.77k|        case ']':
  ------------------
  |  Branch (29006:9): [True: 11, False: 40.3k]
  ------------------
29007|  2.77k|            break;
29008|  37.5k|        default:
  ------------------
  |  Branch (29008:9): [True: 37.5k, False: 2.77k]
  ------------------
29009|  37.5k|            return;
29010|  40.3k|    }
29011|  2.77k|    int32_t removed = 0;
29012|  2.77k|    int32_t old_count = S->buffer->count;
29013|  2.77k|    int32_t offset = old_count;
29014|  2.77k|    int32_t b0 = S->lookback_barrier;
29015|  2.77k|    int32_t columns = S->width;
29016|  2.77k|    int32_t align = 0;
29017|   119k|    while (--offset >= b0) {
  ------------------
  |  Branch (29017:12): [True: 119k, False: 49]
  ------------------
29018|   119k|        const char *s = (const char *)S->buffer->data + offset;
29019|   119k|        if (*s == '\n') {
  ------------------
  |  Branch (29019:13): [True: 4.26k, False: 115k]
  ------------------
29020|  4.26k|            if (align < S->leaf_align) {
  ------------------
  |  Branch (29020:17): [True: 1.92k, False: 2.34k]
  ------------------
29021|  1.92k|                break;
29022|  1.92k|            }
29023|  2.34k|            columns += align;
29024|  2.34k|            removed += align;
29025|  2.34k|            align = 0;
29026|   115k|        } else if (*s == ' ') {
  ------------------
  |  Branch (29026:20): [True: 55.3k, False: 60.2k]
  ------------------
29027|  55.3k|            align++;
29028|  60.2k|        } else {
29029|  60.2k|            align = 0;
29030|       |            /* Don't count color sequences: \x1B(0|3\d)m */
29031|  60.2k|            if (S->flags & JANET_PRETTY_COLOR && *s == 'm') {
  ------------------
  |  | 1957|   120k|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29031:17): [True: 3.39k, False: 56.8k]
  |  Branch (29031:50): [True: 938, False: 2.46k]
  ------------------
29032|    938|                if (offset >= (3 + b0) && strncmp("\x1B[0m", s - 3, 4) == 0) {
  ------------------
  |  Branch (29032:21): [True: 938, False: 0]
  |  Branch (29032:43): [True: 384, False: 554]
  ------------------
29033|    384|                    offset -= 3;
29034|    384|                    columns++;
29035|    554|                } else if (offset >= (4 + b0) && strncmp("\x1B[3", s - 4, 3) == 0) {
  ------------------
  |  Branch (29035:28): [True: 554, False: 0]
  |  Branch (29035:50): [True: 382, False: 172]
  ------------------
29036|    382|                    offset -= 4;
29037|    382|                    columns++;
29038|    382|                }
29039|    938|            }
29040|  60.2k|        }
29041|   117k|        if (--columns <= 0) {
  ------------------
  |  Branch (29041:13): [True: 807, False: 117k]
  ------------------
29042|    807|            return;
29043|    807|        }
29044|   117k|    }
29045|  1.97k|    offset++; /* Don't mess with the last newline we found */
29046|  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]
  |  |  ------------------
  ------------------
29047|  1.97k|    S->buffer->count -= removed;
29048|  42.1k|    for (int32_t i = offset; i < S->buffer->count; i++) {
  ------------------
  |  Branch (29048:30): [True: 40.1k, False: 1.97k]
  ------------------
29049|  40.1k|        if (S->buffer->data[offset] == '\n') {
  ------------------
  |  Branch (29049:13): [True: 1.99k, False: 38.1k]
  ------------------
29050|  1.99k|            S->buffer->data[i] = ' ';
29051|  13.4k|            while (S->buffer->data[++offset] == ' ') {
  ------------------
  |  Branch (29051:20): [True: 11.4k, False: 1.99k]
  ------------------
29052|  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]
  |  |  ------------------
  ------------------
29053|  11.4k|            }
29054|  38.1k|        } else {
29055|  38.1k|            S->buffer->data[i] = S->buffer->data[offset++];
29056|  38.1k|        }
29057|  40.1k|    }
29058|  1.97k|}
janet.c:janet_jdn_:
29361|    573|static JanetBuffer *janet_jdn_(JanetBuffer *buffer, int depth, Janet x, int32_t startlen, int32_t lookback_barrier) {
29362|    573|    struct pretty S;
29363|    573|    if (NULL == buffer) {
  ------------------
  |  Branch (29363:9): [True: 0, False: 573]
  ------------------
29364|      0|        buffer = janet_buffer(0);
29365|      0|    }
29366|    573|    S.buffer = buffer;
29367|    573|    S.depth = depth;
29368|    573|    S.align = 0;
29369|    573|    S.flags = 0;
29370|    573|    S.bufstartlen = startlen;
29371|    573|    S.lookback_barrier = lookback_barrier;
29372|    573|    S.keysort_capacity = 0;
29373|    573|    S.keysort_buffer = NULL;
29374|    573|    S.keysort_start = 0;
29375|    573|    janet_table_init(&S.seen, 10);
29376|    573|    int res = print_jdn_one(&S, x, depth);
29377|    573|    janet_table_deinit(&S.seen);
29378|    573|    if (res) {
  ------------------
  |  Branch (29378:9): [True: 8, False: 565]
  ------------------
29379|      8|        janet_panic("could not print to jdn format");
29380|      8|    }
29381|    565|    return S.buffer;
29382|    573|}
janet.c:print_jdn_one:
28918|  39.0k|static int print_jdn_one(struct pretty *S, Janet x, int depth) {
28919|  39.0k|    if (depth == 0) return 1;
  ------------------
  |  Branch (28919:9): [True: 1, False: 39.0k]
  ------------------
28920|  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 (28920:13): [True: 38.1k, False: 897]
  ------------------
28921|      8|        case JANET_NIL:
  ------------------
  |  Branch (28921:9): [True: 8, False: 39.0k]
  ------------------
28922|     10|        case JANET_BOOLEAN:
  ------------------
  |  Branch (28922:9): [True: 2, False: 39.0k]
  ------------------
28923|     24|        case JANET_BUFFER:
  ------------------
  |  Branch (28923:9): [True: 14, False: 39.0k]
  ------------------
28924|    162|        case JANET_STRING:
  ------------------
  |  Branch (28924:9): [True: 138, False: 38.8k]
  ------------------
28925|    162|            janet_description_b(S->buffer, x);
28926|    162|            break;
28927|    897|        case JANET_NUMBER:
  ------------------
  |  Branch (28927:9): [True: 897, False: 38.1k]
  ------------------
28928|    897|            janet_buffer_ensure(S->buffer, S->buffer->count + BUFSIZE, 2);
  ------------------
  |  |28568|    897|#define BUFSIZE 64
  ------------------
28929|    897|            double num = janet_unwrap_number(x);
  ------------------
  |  |  834|    897|#define janet_unwrap_number(x) ((x).number)
  ------------------
28930|    897|            if (isnan(num)) return 1;
  ------------------
  |  Branch (28930:17): [True: 0, False: 897]
  ------------------
28931|    897|            if (isinf(num)) return 1;
  ------------------
  |  Branch (28931:17): [True: 2, False: 895]
  ------------------
28932|    895|            janet_buffer_dtostr(S->buffer, num);
28933|    895|            break;
28934|  20.2k|        case JANET_SYMBOL:
  ------------------
  |  Branch (28934:9): [True: 20.2k, False: 18.7k]
  ------------------
28935|  20.5k|        case JANET_KEYWORD:
  ------------------
  |  Branch (28935:9): [True: 290, False: 38.7k]
  ------------------
28936|  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 (28936:17): [True: 0, False: 20.5k]
  |  Branch (28936:61): [True: 20.5k, False: 0]
  ------------------
28937|  20.5k|            janet_description_b(S->buffer, x);
28938|  20.5k|            break;
28939|  16.8k|        case JANET_TUPLE: {
  ------------------
  |  Branch (28939:9): [True: 16.8k, False: 22.1k]
  ------------------
28940|  16.8k|            JanetTuple t = janet_unwrap_tuple(x);
  ------------------
  |  |  853|  16.8k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
28941|  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
  ------------------
28942|  16.8k|            janet_buffer_push_u8(S->buffer, isb ? '[' : '(');
  ------------------
  |  Branch (28942:45): [True: 14, False: 16.8k]
  ------------------
28943|  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 (28943:33): [True: 34.5k, False: 15.6k]
  ------------------
28944|  34.5k|                if (i) janet_buffer_push_u8(S->buffer, ' ');
  ------------------
  |  Branch (28944:21): [True: 17.7k, False: 16.8k]
  ------------------
28945|  34.5k|                if (print_jdn_one(S, t[i], depth - 1)) return 1;
  ------------------
  |  Branch (28945:21): [True: 1.28k, False: 33.2k]
  ------------------
28946|  34.5k|            }
28947|  15.6k|            janet_buffer_push_u8(S->buffer, isb ? ']' : ')');
  ------------------
  |  Branch (28947:45): [True: 14, False: 15.5k]
  ------------------
28948|  15.6k|        }
28949|      0|        break;
28950|    100|        case JANET_ARRAY: {
  ------------------
  |  Branch (28950:9): [True: 100, False: 38.9k]
  ------------------
28951|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28952|    100|            JanetArray *a = janet_unwrap_array(x);
  ------------------
  |  |  855|    100|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
28953|    100|            janet_buffer_push_cstring(S->buffer, "@[");
28954|  1.87k|            for (int32_t i = 0; i < a->count; i++) {
  ------------------
  |  Branch (28954:33): [True: 1.77k, False: 97]
  ------------------
28955|  1.77k|                if (i) janet_buffer_push_u8(S->buffer, ' ');
  ------------------
  |  Branch (28955:21): [True: 1.69k, False: 79]
  ------------------
28956|  1.77k|                if (print_jdn_one(S, a->data[i], depth - 1)) return 1;
  ------------------
  |  Branch (28956:21): [True: 3, False: 1.77k]
  ------------------
28957|  1.77k|            }
28958|     97|            janet_buffer_push_u8(S->buffer, ']');
28959|     97|        }
28960|      0|        break;
28961|     24|        case JANET_TABLE: {
  ------------------
  |  Branch (28961:9): [True: 24, False: 39.0k]
  ------------------
28962|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28963|     24|            JanetTable *tab = janet_unwrap_table(x);
  ------------------
  |  |  856|     24|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
28964|     24|            janet_buffer_push_cstring(S->buffer, "@{");
28965|     24|            int isFirst = 1;
28966|    119|            for (int32_t i = 0; i < tab->capacity; i++) {
  ------------------
  |  Branch (28966:33): [True: 95, False: 24]
  ------------------
28967|     95|                const JanetKV *kv = tab->data + i;
28968|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28969|     31|                if (!isFirst) janet_buffer_push_u8(S->buffer, ' ');
  ------------------
  |  Branch (28969:21): [True: 18, False: 13]
  ------------------
28970|     31|                isFirst = 0;
28971|     31|                if (print_jdn_one(S, kv->key, depth - 1)) return 1;
  ------------------
  |  Branch (28971:21): [True: 0, False: 31]
  ------------------
28972|     31|                janet_buffer_push_u8(S->buffer, ' ');
28973|     31|                if (print_jdn_one(S, kv->value, depth - 1)) return 1;
  ------------------
  |  Branch (28973:21): [True: 0, False: 31]
  ------------------
28974|     31|            }
28975|     24|            janet_buffer_push_u8(S->buffer, '}');
28976|     24|        }
28977|      0|        break;
28978|    406|        case JANET_STRUCT: {
  ------------------
  |  Branch (28978:9): [True: 406, False: 38.6k]
  ------------------
28979|    406|            JanetStruct st = janet_unwrap_struct(x);
  ------------------
  |  |  852|    406|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
28980|    406|            janet_buffer_push_u8(S->buffer, '{');
28981|    406|            int isFirst = 1;
28982|  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 (28982:33): [True: 2.84k, False: 404]
  ------------------
28983|  2.84k|                const JanetKV *kv = st + i;
28984|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28985|  1.02k|                if (!isFirst) janet_buffer_push_u8(S->buffer, ' ');
  ------------------
  |  Branch (28985:21): [True: 674, False: 353]
  ------------------
28986|  1.02k|                isFirst = 0;
28987|  1.02k|                if (print_jdn_one(S, kv->key, depth - 1)) return 1;
  ------------------
  |  Branch (28987:21): [True: 1, False: 1.02k]
  ------------------
28988|  1.02k|                janet_buffer_push_u8(S->buffer, ' ');
28989|  1.02k|                if (print_jdn_one(S, kv->value, depth - 1)) return 1;
  ------------------
  |  Branch (28989:21): [True: 1, False: 1.02k]
  ------------------
28990|  1.02k|            }
28991|    404|            janet_buffer_push_u8(S->buffer, '}');
28992|    404|        }
28993|      0|        break;
28994|      5|        default:
  ------------------
  |  Branch (28994:9): [True: 5, False: 39.0k]
  ------------------
28995|      5|            return 1;
28996|  39.0k|    }
28997|  37.7k|    return 0;
28998|  39.0k|}
janet.c:contains_bad_chars:
28825|  20.5k|static int contains_bad_chars(const uint8_t *sym, int issym) {
28826|  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)))
  |  |  ------------------
  ------------------
28827|  20.5k|    if (len && issym && sym[0] >= '0' && sym[0] <= '9') return 1;
  ------------------
  |  Branch (28827:9): [True: 20.3k, False: 237]
  |  Branch (28827:16): [True: 20.2k, False: 53]
  |  Branch (28827:25): [True: 19.4k, False: 833]
  |  Branch (28827:42): [True: 0, False: 19.4k]
  ------------------
28828|  20.5k|    if (!janet_valid_utf8(sym, len)) return 1;
  ------------------
  |  Branch (28828:9): [True: 0, False: 20.5k]
  ------------------
28829|   157k|    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (28829:25): [True: 136k, False: 20.5k]
  ------------------
28830|   136k|        if (!janet_is_symbol_char(sym[i])) return 1;
  ------------------
  |  Branch (28830:13): [True: 0, False: 136k]
  ------------------
28831|   136k|    }
28832|  20.5k|    return 0;
28833|  20.5k|}
janet.c:scanformat:
29451|   186k|    char precision[3]) {
29452|   186k|    const char *p = strfrmt;
29453|       |
29454|       |    /* Parse strfrmt */
29455|   186k|    memset(width, '\0', 3);
29456|   186k|    memset(precision, '\0', 3);
29457|   186k|    while (*p != '\0' && strchr(FMT_FLAGS, *p) != NULL)
  ------------------
  |  |29417|   186k|#define FMT_FLAGS "-+ #0"
  ------------------
  |  Branch (29457:12): [True: 186k, False: 3]
  |  Branch (29457:26): [True: 157, False: 186k]
  ------------------
29458|    157|        p++; /* skip flags */
29459|   186k|    if ((size_t)(p - strfrmt) >= sizeof(FMT_FLAGS)) janet_panic("invalid format (repeated flags)");
  ------------------
  |  |29417|   186k|#define FMT_FLAGS "-+ #0"
  ------------------
  |  Branch (29459:9): [True: 4, False: 186k]
  ------------------
29460|   186k|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (29460:9): [True: 6, False: 186k]
  ------------------
29461|      6|        width[0] = *p++; /* skip width */
29462|   186k|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (29462:9): [True: 2, False: 186k]
  ------------------
29463|      2|        width[1] = *p++; /* (2 digits at most) */
29464|   186k|    if (*p == '.') {
  ------------------
  |  Branch (29464:9): [True: 18, False: 186k]
  ------------------
29465|     18|        p++;
29466|     18|        if (isdigit((int)(*p)))
  ------------------
  |  Branch (29466:13): [True: 14, False: 4]
  ------------------
29467|     14|            precision[0] = *p++; /* skip precision */
29468|     18|        if (isdigit((int)(*p)))
  ------------------
  |  Branch (29468:13): [True: 5, False: 13]
  ------------------
29469|      5|            precision[1] = *p++; /* (2 digits at most) */
29470|     18|    }
29471|   186k|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (29471:9): [True: 2, False: 186k]
  ------------------
29472|      2|        janet_panic("invalid format (width or precision too long)");
29473|       |
29474|       |    /* Write to form - replace characters with fixed size stuff */
29475|   186k|    *(form++) = '%';
29476|   186k|    const char *p2 = strfrmt;
29477|   372k|    while (p2 <= p) {
  ------------------
  |  Branch (29477:12): [True: 186k, False: 186k]
  ------------------
29478|   186k|        char *loc = strchr(FMT_REPLACE_INTTYPES, *p2);
  ------------------
  |  |29418|   186k|#define FMT_REPLACE_INTTYPES "diouxX"
  ------------------
29479|   186k|        if (loc != NULL && *loc != '\0') {
  ------------------
  |  Branch (29479:13): [True: 77.5k, False: 108k]
  |  Branch (29479:28): [True: 77.5k, False: 3]
  ------------------
29480|  77.5k|            const char *mapping = get_fmt_mapping(*p2++);
29481|  77.5k|            size_t len = strlen(mapping);
29482|  77.5k|            memcpy(form, mapping, len);
29483|  77.5k|            form += len;
29484|   108k|        } else {
29485|   108k|            *(form++) = *(p2++);
29486|   108k|        }
29487|   186k|    }
29488|   186k|    *form = '\0';
29489|       |
29490|   186k|    return p;
29491|   186k|}
janet.c:get_fmt_mapping:
29439|  77.5k|static const char *get_fmt_mapping(char c) {
29440|   232k|    for (size_t i = 0; i < (sizeof(format_mappings) / sizeof(struct FmtMapping)); i++) {
  ------------------
  |  Branch (29440:24): [True: 232k, False: 0]
  ------------------
29441|   232k|        if (format_mappings[i].c == c)
  ------------------
  |  Branch (29441:13): [True: 77.5k, False: 155k]
  ------------------
29442|  77.5k|            return format_mappings[i].mapping;
29443|   232k|    }
29444|      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]
  |  |  ------------------
  ------------------
29445|      0|}
janet.c:typestr:
29388|    191|static const char *typestr(Janet x) {
29389|    191|    JanetType t = janet_type(x);
  ------------------
  |  |  790|    191|    (isnan((x).number) \
  |  |  791|    191|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|    191|        : JANET_NUMBER)
  ------------------
  |  Branch (29389:19): [True: 167, False: 24]
  ------------------
29390|    191|    return (t == JANET_ABSTRACT)
  ------------------
  |  Branch (29390:12): [True: 3, False: 188]
  ------------------
29391|    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)))
  |  |  ------------------
  ------------------
29392|    191|           : janet_type_names[t];
29393|    191|}
janet.c:pushtypes:
29395|    637|static void pushtypes(JanetBuffer *buffer, int types) {
29396|    637|    int first = 1;
29397|    637|    int i = 0;
29398|  7.36k|    while (types) {
  ------------------
  |  Branch (29398:12): [True: 6.73k, False: 637]
  ------------------
29399|  6.73k|        if (1 & types) {
  ------------------
  |  Branch (29399:13): [True: 3.43k, False: 3.29k]
  ------------------
29400|  3.43k|            if (first) {
  ------------------
  |  Branch (29400:17): [True: 637, False: 2.79k]
  ------------------
29401|    637|                first = 0;
29402|  2.79k|            } else {
29403|  2.79k|                janet_buffer_push_cstring(buffer, (types == 1) ? " or " : ", ");
  ------------------
  |  Branch (29403:51): [True: 489, False: 2.31k]
  ------------------
29404|  2.79k|            }
29405|  3.43k|            janet_buffer_push_cstring(buffer, janet_type_names[i]);
29406|  3.43k|        }
29407|  6.73k|        i++;
29408|  6.73k|        types >>= 1;
29409|  6.73k|    }
29410|    637|}
janet.c:pushchunk:
29887|  4.50M|static void pushchunk(JanetcRegisterAllocator *ra) {
29888|       |    /* Registers 240-255 are always allocated (reserved) */
29889|  4.50M|    uint32_t chunk = ra->count == 7 ? 0xFFFF0000 : 0;
  ------------------
  |  Branch (29889:22): [True: 13.0k, False: 4.49M]
  ------------------
29890|  4.50M|    int32_t newcount = ra->count + 1;
29891|  4.50M|    if (newcount > ra->capacity) {
  ------------------
  |  Branch (29891:9): [True: 1.48M, False: 3.01M]
  ------------------
29892|  1.48M|        int32_t newcapacity = newcount * 2;
29893|  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))
  ------------------
29894|  1.48M|        if (!ra->chunks) {
  ------------------
  |  Branch (29894:13): [True: 0, False: 1.48M]
  ------------------
29895|      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]
  |  |  ------------------
  ------------------
29896|      0|        }
29897|  1.48M|        ra->capacity = newcapacity;
29898|  1.48M|    }
29899|  4.50M|    ra->chunks[ra->count] = chunk;
29900|  4.50M|    ra->count = newcount;
29901|  4.50M|}
janet.c:janetc_break:
30946|     10|static JanetSlot janetc_break(JanetFopts opts, int32_t argn, const Janet *argv) {
30947|     10|    JanetCompiler *c = opts.compiler;
30948|     10|    JanetScope *scope = c->scope;
30949|     10|    if (argn > 1) {
  ------------------
  |  Branch (30949:9): [True: 1, False: 9]
  ------------------
30950|      1|        janetc_cerror(c, "expected at most 1 argument");
30951|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30952|      1|    }
30953|       |
30954|       |    /* Find scope to break from */
30955|     10|    while (scope) {
  ------------------
  |  Branch (30955:12): [True: 10, False: 0]
  ------------------
30956|     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 (30956:13): [True: 9, False: 1]
  ------------------
30957|      9|            break;
30958|      1|        scope = scope->parent;
30959|      1|    }
30960|      9|    if (NULL == scope) {
  ------------------
  |  Branch (30960:9): [True: 0, False: 9]
  ------------------
30961|      0|        janetc_cerror(c, "break must occur in while loop or closure");
30962|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30963|      0|    }
30964|       |
30965|       |    /* Emit code to break from that scope */
30966|      9|    JanetFopts subopts = janetc_fopts_default(c);
30967|      9|    if (scope->flags & JANET_SCOPE_FUNCTION) {
  ------------------
  |  | 1003|      9|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (30967:9): [True: 3, False: 6]
  ------------------
30968|      3|        if (!(scope->flags & JANET_SCOPE_WHILE) && argn) {
  ------------------
  |  | 1008|      3|#define JANET_SCOPE_WHILE 32
  ------------------
  |  Branch (30968:13): [True: 3, False: 0]
  |  Branch (30968:52): [True: 0, False: 3]
  ------------------
30969|       |            /* Closure body with return argument */
30970|      0|            subopts.flags |= JANET_FOPTS_TAIL;
  ------------------
  |  | 1091|      0|#define JANET_FOPTS_TAIL 0x10000
  ------------------
30971|      0|            janetc_value(subopts, argv[0]);
30972|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30973|      3|        } else {
30974|       |            /* while loop IIFE or no argument */
30975|      3|            if (argn) {
  ------------------
  |  Branch (30975:17): [True: 0, False: 3]
  ------------------
30976|      0|                subopts.flags |= JANET_FOPTS_DROP;
  ------------------
  |  | 1093|      0|#define JANET_FOPTS_DROP 0x40000
  ------------------
30977|      0|                janetc_value(subopts, argv[0]);
30978|      0|            }
30979|      3|            janetc_emit(c, JOP_RETURN_NIL);
30980|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30981|      3|        }
30982|      6|    } else {
30983|      6|        if (argn) {
  ------------------
  |  Branch (30983:13): [True: 0, False: 6]
  ------------------
30984|      0|            subopts.flags |= JANET_FOPTS_DROP;
  ------------------
  |  | 1093|      0|#define JANET_FOPTS_DROP 0x40000
  ------------------
30985|      0|            janetc_value(subopts, argv[0]);
30986|      0|        }
30987|       |        /* Tag the instruction so the while special can turn it into a proper jump */
30988|      6|        janetc_emit(c, 0x80 | JOP_JUMP);
30989|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30990|      6|    }
30991|      9|}
janet.c:janetc_def:
30722|  10.5k|static JanetSlot janetc_def(JanetFopts opts, int32_t argn, const Janet *argv) {
30723|  10.5k|    JanetCompiler *c = opts.compiler;
30724|  10.5k|    JanetTable *attr_table = handleattr(c, "def", argn, argv);
30725|  10.5k|    if (c->result.status == JANET_COMPILE_ERROR) {
  ------------------
  |  Branch (30725:9): [True: 15, False: 10.5k]
  ------------------
30726|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30727|     15|    }
30728|  10.5k|    check_metadata_lint(c, attr_table);
30729|  10.5k|    opts.flags &= ~JANET_FOPTS_HINT;
  ------------------
  |  | 1092|  10.5k|#define JANET_FOPTS_HINT 0x20000
  ------------------
30730|  10.5k|    SlotHeadPair *into = NULL;
30731|  10.5k|    into = dohead_destructure(c, into, opts, argv[0], argv[argn - 1]);
30732|  10.5k|    if (c->result.status == JANET_COMPILE_ERROR) {
  ------------------
  |  Branch (30732:9): [True: 190, False: 10.3k]
  ------------------
30733|    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]
  |  |  ------------------
  ------------------
30734|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30735|    190|    }
30736|  10.3k|    JanetSlot ret;
30737|  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]
  |  |  ------------------
  ------------------
30738|  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 (30738:25): [True: 16.0k, False: 10.3k]
  ------------------
30739|  16.0k|        destructure(c, into[i].lhs, into[i].rhs, defleaf, attr_table);
30740|  16.0k|        ret = into[i].rhs;
30741|  16.0k|    }
30742|       |    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]
  |  |  ------------------
  ------------------
30743|  10.3k|    return ret;
30744|  10.3k|}
janet.c:handleattr:
30478|  11.9k|static JanetTable *handleattr(JanetCompiler *c, const char *kind, int32_t argn, const Janet *argv) {
30479|  11.9k|    int32_t i;
30480|  11.9k|    if (argn < 2) {
  ------------------
  |  Branch (30480:9): [True: 1, False: 11.9k]
  ------------------
30481|      1|        janetc_error(c, janet_formatc("expected at least 2 arguments to %s", kind));
30482|      1|        return NULL;
30483|      1|    }
30484|  11.9k|    JanetTable *tab = janet_table(2);
30485|  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 (30485:32): [True: 11.9k, False: 11]
  |  Branch (30485:32): [True: 10.0k, False: 1.90k]
  ------------------
30486|  11.9k|                               ? ((const char *)janet_unwrap_symbol(argv[0]))
  ------------------
  |  |  859|  10.0k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
30487|  11.9k|                               : "<multiple bindings>";
30488|  19.6k|    for (i = 1; i < argn - 1; i++) {
  ------------------
  |  Branch (30488:17): [True: 7.67k, False: 11.9k]
  ------------------
30489|  7.67k|        Janet attr = argv[i];
30490|  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 (30490:17): [True: 7.50k, False: 172]
  ------------------
30491|  4.97k|            case JANET_TUPLE:
  ------------------
  |  Branch (30491:13): [True: 4.97k, False: 2.69k]
  ------------------
30492|  4.97k|                janetc_cerror(c, "unexpected form - did you intend to use defn?");
30493|  4.97k|                break;
30494|    672|            default:
  ------------------
  |  Branch (30494:13): [True: 672, False: 7.00k]
  ------------------
30495|    672|                janetc_error(c, janet_formatc("cannot add metadata %v to binding %s", attr, binding_name));
30496|    672|                break;
30497|  1.56k|            case JANET_KEYWORD:
  ------------------
  |  Branch (30497:13): [True: 1.56k, False: 6.11k]
  ------------------
30498|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30499|  1.56k|                break;
30500|    434|            case JANET_STRING:
  ------------------
  |  Branch (30500:13): [True: 434, False: 7.24k]
  ------------------
30501|    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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30502|    434|                break;
30503|     27|            case JANET_STRUCT:
  ------------------
  |  Branch (30503:13): [True: 27, False: 7.64k]
  ------------------
30504|     27|                janet_table_merge_struct(tab, janet_unwrap_struct(attr));
  ------------------
  |  |  852|     27|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
30505|     27|                break;
30506|  7.67k|        }
30507|  7.67k|    }
30508|  11.9k|    return tab;
30509|  11.9k|}
janet.c:check_metadata_lint:
30644|  11.9k|static void check_metadata_lint(JanetCompiler *c, JanetTable *attr_table) {
30645|  11.9k|    if (!(c->scope->flags & JANET_SCOPE_TOP) && attr_table && attr_table->count) {
  ------------------
  |  | 1005|  11.9k|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (30645:9): [True: 11.7k, False: 224]
  |  Branch (30645:49): [True: 11.7k, False: 0]
  |  Branch (30645:63): [True: 1.57k, False: 10.1k]
  ------------------
30646|       |        /* A macro is a normal lint, other metadata is a strict lint */
30647|  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]
  |  |  ------------------
  ------------------
30648|      0|            janetc_lintf(c, JANET_C_LINT_NORMAL, "macro tag is ignored in inner scopes");
30649|      0|        }
30650|  1.57k|    }
30651|  11.9k|}
janet.c:destructure:
30317|  3.12M|                       JanetTable *attr) {
30318|  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 (30318:13): [True: 3.11M, False: 2.66k]
  ------------------
30319|  11.0k|        default:
  ------------------
  |  Branch (30319:9): [True: 11.0k, False: 3.11M]
  ------------------
30320|  11.0k|            janetc_error(c, janet_formatc("unexpected type in destructuring, got %v", left));
30321|  11.0k|            return 1;
30322|  1.61M|        case JANET_SYMBOL:
  ------------------
  |  Branch (30322:9): [True: 1.61M, False: 1.51M]
  ------------------
30323|       |            /* Leaf, assign right to left */
30324|  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))
  ------------------
30325|  1.49M|        case JANET_TUPLE:
  ------------------
  |  Branch (30325:9): [True: 1.49M, False: 1.62M]
  ------------------
30326|  1.49M|        case JANET_ARRAY: {
  ------------------
  |  Branch (30326:9): [True: 176, False: 3.12M]
  ------------------
30327|  1.49M|            int32_t len = 0;
30328|  1.49M|            const Janet *values = NULL;
30329|  1.49M|            janet_indexed_view(left, &values, &len);
30330|  4.58M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (30330:33): [True: 3.08M, False: 1.49M]
  ------------------
30331|  3.08M|                JanetSlot nextright = janetc_farslot(c);
30332|  3.08M|                Janet subval = values[i];
30333|       |
30334|  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 (30334:62): [True: 377, False: 1.60M]
  ------------------
30335|    377|                    if (i + 1 >= len) {
  ------------------
  |  Branch (30335:25): [True: 212, False: 165]
  ------------------
30336|    212|                        janetc_cerror(c, "expected symbol following '& in destructuring pattern");
30337|    212|                        return 1;
30338|    212|                    }
30339|       |
30340|    165|                    if (i + 2 < len) {
  ------------------
  |  Branch (30340:25): [True: 127, False: 38]
  ------------------
30341|    127|                        int32_t num_extra = len - i - 1;
30342|    127|                        Janet *extra = janet_tuple_begin(num_extra);
30343|    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
  ------------------
30344|       |
30345|   203k|                        for (int32_t j = 0; j < num_extra; ++j) {
  ------------------
  |  Branch (30345:45): [True: 203k, False: 127]
  ------------------
30346|   203k|                            extra[j] = values[j + i + 1];
30347|   203k|                        }
30348|       |
30349|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30350|    127|                        return 1;
30351|    127|                    }
30352|       |
30353|     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 (30353:25): [True: 6, False: 32]
  ------------------
30354|      6|                        janetc_error(c, janet_formatc("expected symbol following '& in destructuring pattern, found %q", values[i + 1]));
30355|      6|                        return 1;
30356|      6|                    }
30357|       |
30358|     32|                    JanetSlot argi = janetc_farslot(c);
30359|     32|                    JanetSlot arg  = janetc_farslot(c);
30360|     32|                    JanetSlot len  = janetc_farslot(c);
30361|       |
30362|     32|                    janetc_emit_si(c, JOP_LOAD_INTEGER, argi, i, 0);
30363|     32|                    janetc_emit_ss(c, JOP_LENGTH, len, right, 0);
30364|       |
30365|       |                    /* loop condition - reuse arg slot for the condition result */
30366|     32|                    int32_t label_loop_start = janetc_emit_sss(c, JOP_LESS_THAN, arg, argi, len, 0);
30367|     32|                    int32_t label_loop_cond_jump = janetc_emit_si(c, JOP_JUMP_IF_NOT, arg, 0, 0);
30368|       |
30369|       |                    /* loop body */
30370|     32|                    janetc_emit_sss(c, JOP_GET, arg, right, argi, 0);
30371|     32|                    janetc_emit_s(c, JOP_PUSH, arg, 0);
30372|     32|                    janetc_emit_ssi(c, JOP_ADD_IMMEDIATE, argi, argi, 1, 0);
30373|       |
30374|       |                    /* loop - jump back to the start of the loop */
30375|     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]
  |  |  ------------------
  ------------------
30376|     32|                    janetc_emit(c, JOP_JUMP);
30377|     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]
  |  |  ------------------
  ------------------
30378|       |
30379|       |                    /* avoid shifting negative numbers */
30380|     32|                    check_16bit_jump(c, label_loop_cond_jump, label_loop_exit);
30381|     32|                    check_24bit_jump(c, label_loop_start, label_loop_loop);
30382|     32|                    c->buffer[label_loop_cond_jump] |= (uint32_t)(label_loop_exit - label_loop_cond_jump) << 16;
30383|     32|                    c->buffer[label_loop_loop] |= (uint32_t)(label_loop_start - label_loop_loop) << 8;
30384|       |
30385|     32|                    janetc_freeslot(c, argi);
30386|     32|                    janetc_freeslot(c, arg);
30387|     32|                    janetc_freeslot(c, len);
30388|       |
30389|     32|                    janetc_emit_s(c, JOP_MAKE_TUPLE, nextright, 1);
30390|       |
30391|     32|                    leaf(c, janet_unwrap_symbol(values[i + 1]), nextright, attr);
  ------------------
  |  |  859|     32|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
30392|     32|                    janetc_freeslot(c, nextright);
30393|     32|                    break;
30394|     38|                }
30395|       |
30396|  3.08M|                if (i < 0x100) {
  ------------------
  |  Branch (30396:21): [True: 3.07M, False: 18.9k]
  ------------------
30397|  3.07M|                    janetc_emit_ssu(c, JOP_GET_INDEX, nextright, right, (uint8_t) i, 1);
30398|  3.07M|                } else {
30399|  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)
  |  |  ------------------
  ------------------
30400|  18.9k|                    janetc_emit_sss(c, JOP_IN, nextright, right, k, 1);
30401|  18.9k|                }
30402|  3.08M|                if (destructure(c, subval, nextright, leaf, attr))
  ------------------
  |  Branch (30402:21): [True: 3.08M, False: 0]
  ------------------
30403|  3.08M|                    janetc_freeslot(c, nextright);
30404|  3.08M|            }
30405|  1.49M|        }
30406|  1.49M|        return 1;
30407|     67|        case JANET_TABLE:
  ------------------
  |  Branch (30407:9): [True: 67, False: 3.12M]
  ------------------
30408|    905|        case JANET_STRUCT: {
  ------------------
  |  Branch (30408:9): [True: 838, False: 3.12M]
  ------------------
30409|    905|            const JanetKV *kvs = NULL;
30410|    905|            int32_t cap = 0, len = 0;
30411|    905|            janet_dictionary_view(left, &kvs, &len, &cap);
30412|  7.19k|            for (int32_t i = 0; i < cap; i++) {
  ------------------
  |  Branch (30412:33): [True: 6.29k, False: 905]
  ------------------
30413|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30414|  1.90k|                JanetSlot nextright = janetc_farslot(c);
30415|  1.90k|                JanetSlot k = janetc_value(janetc_fopts_default(c), kvs[i].key);
30416|  1.90k|                janetc_emit_sss(c, JOP_IN, nextright, right, k, 1);
30417|  1.90k|                if (destructure(c, kvs[i].value, nextright, leaf, attr))
  ------------------
  |  Branch (30417:21): [True: 1.90k, False: 0]
  ------------------
30418|  1.90k|                    janetc_freeslot(c, nextright);
30419|  1.90k|            }
30420|    905|        }
30421|    905|        return 1;
30422|  3.12M|    }
30423|  3.12M|}
janet.c:check_16bit_jump:
30182|  6.51k|static void check_16bit_jump(JanetCompiler *c, int32_t lab1, int32_t lab2) {
30183|  6.51k|    if (bad_16bit_jump(lab1, lab2)) {
  ------------------
  |  Branch (30183:9): [True: 47, False: 6.47k]
  ------------------
30184|     47|        janetc_cerror(c, "bad 16-bit jump, too large");
30185|     47|    }
30186|  6.51k|}
janet.c:bad_16bit_jump:
30176|  6.51k|static int bad_16bit_jump(int32_t lab1, int32_t lab2) {
30177|  6.51k|    if (lab2 - lab1 > INT16_MAX) return 1;
  ------------------
  |  Branch (30177:9): [True: 47, False: 6.47k]
  ------------------
30178|  6.47k|    if (lab2 - lab1 < INT16_MIN) return 1;
  ------------------
  |  Branch (30178:9): [True: 0, False: 6.47k]
  ------------------
30179|  6.47k|    return 0;
30180|  6.47k|}
janet.c:check_24bit_jump:
30194|  1.94k|static void check_24bit_jump(JanetCompiler *c, int32_t lab1, int32_t lab2) {
30195|  1.94k|    if (bad_24bit_jump(lab1, lab2)) {
  ------------------
  |  Branch (30195:9): [True: 0, False: 1.94k]
  ------------------
30196|      0|        janetc_cerror(c, "bad 24-bit jump, too large");
30197|      0|    }
30198|  1.94k|}
janet.c:bad_24bit_jump:
30188|  1.94k|static int bad_24bit_jump(int32_t lab1, int32_t lab2) {
30189|  1.94k|    if (lab2 - lab1 > 0xFFFFFF) return 1;
  ------------------
  |  Branch (30189:9): [True: 0, False: 1.94k]
  ------------------
30190|  1.94k|    if (lab2 - lab1 < -0x1000000) return 1;
  ------------------
  |  Branch (30190:9): [True: 0, False: 1.94k]
  ------------------
30191|  1.94k|    return 0;
30192|  1.94k|}
janet.c:defleaf:
30680|  1.59M|    JanetTable *tab) {
30681|  1.59M|    JanetTable *entry = NULL;
30682|  1.59M|    int is_redef = 0;
30683|  1.59M|    if (c->scope->flags & JANET_SCOPE_TOP) {
  ------------------
  |  | 1005|  1.59M|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (30683:9): [True: 380, False: 1.59M]
  ------------------
30684|    380|        entry = janet_table_clone(tab);
30685|    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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30686|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30687|       |
30688|    380|        is_redef = c->is_redef;
30689|    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 (30689:13): [True: 0, False: 380]
  ------------------
30690|       |
30691|    380|        if (is_redef) {
  ------------------
  |  Branch (30691:13): [True: 0, False: 380]
  ------------------
30692|      0|            JanetBinding binding = janet_resolve_ext(c->env, sym);
30693|      0|            JanetArray *ref;
30694|      0|            if (binding.type == JANET_BINDING_DYNAMIC_DEF || binding.type == JANET_BINDING_DYNAMIC_MACRO) {
  ------------------
  |  Branch (30694:17): [True: 0, False: 0]
  |  Branch (30694:62): [True: 0, False: 0]
  ------------------
30695|      0|                ref = janet_unwrap_array(binding.value);
  ------------------
  |  |  855|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
30696|      0|            } else {
30697|      0|                ref = janet_array(1);
30698|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30699|      0|            }
30700|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30701|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30702|      0|            janetc_emit_ssu(c, JOP_PUT_INDEX, refslot, s, 0, 0);
30703|    380|        } else {
30704|    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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30705|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30706|    380|            janetc_emit_sss(c, JOP_PUT, tabslot, valsym, s, 0);
30707|    380|        }
30708|    380|    }
30709|  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 (30709:21): [True: 1.47M, False: 116k]
  |  Branch (30709:28): [True: 1.69k, False: 1.47M]
  ------------------
30710|  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 (30710:21): [True: 0, False: 1.59M]
  |  Branch (30710:34): [True: 1.47M, False: 116k]
  |  Branch (30710:41): [True: 1.69k, False: 1.47M]
  ------------------
30711|  1.59M|    uint32_t def_flags = 0;
30712|  1.59M|    if (no_unused) def_flags |= JANET_DEFFLAG_NO_UNUSED;
  ------------------
  |  | 1127|  1.54k|#define JANET_DEFFLAG_NO_UNUSED 2
  ------------------
  |  Branch (30712:9): [True: 1.54k, False: 1.59M]
  ------------------
30713|  1.59M|    if (no_shadow) def_flags |= JANET_DEFFLAG_NO_SHADOWCHECK;
  ------------------
  |  | 1126|      0|#define JANET_DEFFLAG_NO_SHADOWCHECK 1
  ------------------
  |  Branch (30713:9): [True: 0, False: 1.59M]
  ------------------
30714|  1.59M|    int result = namelocal(c, sym, 0, s, def_flags);
30715|  1.59M|    if (entry) {
  ------------------
  |  Branch (30715:9): [True: 380, False: 1.59M]
  ------------------
30716|       |        /* Add env entry to env AFTER namelocal to avoid the shadowcheck false positive */
30717|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30718|    380|    }
30719|  1.59M|    return result;
30720|  1.59M|}
janet.c:janetc_make_sourcemap:
30426|  3.42k|static const Janet *janetc_make_sourcemap(JanetCompiler *c) {
30427|  3.42k|    Janet *tup = janet_tuple_begin(3);
30428|  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 (30428:14): [True: 3.42k, False: 0]
  ------------------
30429|  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)
  |  |  ------------------
  ------------------
30430|  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)
  |  |  ------------------
  ------------------
30431|  3.42k|    return janet_tuple_end(tup);
30432|  3.42k|}
janet.c:namelocal:
30577|  1.60M|static int namelocal(JanetCompiler *c, const uint8_t *head, int32_t flags, JanetSlot ret, uint32_t def_flags) {
30578|  1.60M|    int isUnnamedRegister = !(ret.flags & JANET_SLOT_NAMED) &&
  ------------------
  |  |  984|  1.60M|#define JANET_SLOT_NAMED 0x20000
  ------------------
  |  Branch (30578:29): [True: 1.60M, False: 478]
  ------------------
30579|  1.60M|                            ret.index > 0 &&
  ------------------
  |  Branch (30579:29): [True: 1.60M, False: 5.28k]
  ------------------
30580|  1.60M|                            ret.envindex >= 0;
  ------------------
  |  Branch (30580:29): [True: 0, False: 1.60M]
  ------------------
30581|       |    /* optimization for `(def x my-def)` - don't emit a movn/movf instruction, we can just alias my-def */
30582|       |    /* TODO - implement optimization for `(def x my-var)` correctly as well w/ de-aliasing */
30583|  1.60M|    int canAlias = !(flags & JANET_SLOT_MUTABLE) &&
  ------------------
  |  |  985|  1.60M|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
  |  Branch (30583:20): [True: 1.59M, False: 13.6k]
  ------------------
30584|  1.59M|                   !(ret.flags & JANET_SLOT_MUTABLE) &&
  ------------------
  |  |  985|  1.59M|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
  |  Branch (30584:20): [True: 1.59M, False: 69]
  ------------------
30585|  1.59M|                   (ret.flags & JANET_SLOT_NAMED) &&
  ------------------
  |  |  984|  1.59M|#define JANET_SLOT_NAMED 0x20000
  ------------------
  |  Branch (30585:20): [True: 409, False: 1.59M]
  ------------------
30586|    409|                   (ret.index >= 0) &&
  ------------------
  |  Branch (30586:20): [True: 409, False: 0]
  ------------------
30587|    409|                   (ret.envindex == -1);
  ------------------
  |  Branch (30587:20): [True: 408, False: 1]
  ------------------
30588|  1.60M|    if (canAlias) {
  ------------------
  |  Branch (30588:9): [True: 408, False: 1.60M]
  ------------------
30589|    408|        ret.flags &= ~JANET_SLOT_MUTABLE;
  ------------------
  |  |  985|    408|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
30590|    408|        isUnnamedRegister = 1; /* don't free slot after use - is an alias for another slot */
30591|  1.60M|    } else if (!isUnnamedRegister) {
  ------------------
  |  Branch (30591:16): [True: 1.60M, False: 0]
  ------------------
30592|       |        /* Slot is not able to be named */
30593|  1.60M|        JanetSlot localslot = janetc_farslot(c);
30594|  1.60M|        janetc_copy(c, localslot, ret);
30595|  1.60M|        ret = localslot;
30596|  1.60M|    }
30597|  1.60M|    ret.flags |= flags;
30598|  1.60M|    if (c->scope->flags & JANET_SCOPE_TOP) {
  ------------------
  |  | 1005|  1.60M|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (30598:9): [True: 380, False: 1.60M]
  ------------------
30599|    380|        def_flags |= JANET_DEFFLAG_NO_UNUSED;
  ------------------
  |  | 1127|    380|#define JANET_DEFFLAG_NO_UNUSED 2
  ------------------
30600|    380|    }
30601|  1.60M|    janetc_nameslot(c, head, ret, def_flags);
30602|  1.60M|    return !isUnnamedRegister;
30603|  1.60M|}
janet.c:janetc_do:
30883|  8.24k|static JanetSlot janetc_do(JanetFopts opts, int32_t argn, const Janet *argv) {
30884|  8.24k|    int32_t i;
30885|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30886|  8.24k|    JanetCompiler *c = opts.compiler;
30887|  8.24k|    JanetFopts subopts = janetc_fopts_default(c);
30888|  8.24k|    JanetScope tempscope;
30889|  8.24k|    janetc_scope(&tempscope, c, 0, "do");
30890|  26.5k|    for (i = 0; i < argn; i++) {
  ------------------
  |  Branch (30890:17): [True: 18.2k, False: 8.24k]
  ------------------
30891|  18.2k|        if (i != argn - 1) {
  ------------------
  |  Branch (30891:13): [True: 10.0k, False: 8.22k]
  ------------------
30892|  10.0k|            subopts.flags = JANET_FOPTS_DROP;
  ------------------
  |  | 1093|  10.0k|#define JANET_FOPTS_DROP 0x40000
  ------------------
30893|  10.0k|        } else {
30894|  8.22k|            subopts = opts;
30895|  8.22k|            subopts.flags &= ~JANET_FOPTS_ACCEPT_SPLICE;
  ------------------
  |  | 1094|  8.22k|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
30896|  8.22k|        }
30897|  18.2k|        ret = janetc_value(subopts, argv[i]);
30898|  18.2k|        if (i != argn - 1) {
  ------------------
  |  Branch (30898:13): [True: 10.0k, False: 8.22k]
  ------------------
30899|  10.0k|            janetc_freeslot(c, ret);
30900|  10.0k|        }
30901|  18.2k|    }
30902|  8.24k|    janetc_popscope_keepslot(c, ret);
30903|  8.24k|    return ret;
30904|  8.24k|}
janet.c:janetc_fn:
31137|   476k|static JanetSlot janetc_fn(JanetFopts opts, int32_t argn, const Janet *argv) {
31138|   476k|    JanetCompiler *c = opts.compiler;
31139|   476k|    JanetFuncDef *def;
31140|   476k|    JanetSlot ret;
31141|   476k|    Janet head;
31142|   476k|    JanetScope fnscope;
31143|   476k|    int32_t paramcount, argi, parami, arity, min_arity = 0, max_arity, defindex, i;
31144|   476k|    JanetFopts subopts = janetc_fopts_default(c);
31145|   476k|    const Janet *params;
31146|   476k|    const char *errmsg = NULL;
31147|       |
31148|       |    /* Function flags */
31149|   476k|    int vararg = 0;
31150|   476k|    int structarg = 0;
31151|   476k|    int allow_extra = 0;
31152|   476k|    int selfref = 0;
31153|   476k|    int hasname = 0;
31154|   476k|    int seenamp = 0;
31155|   476k|    int seenopt = 0;
31156|   476k|    int namedargs = 0;
31157|       |
31158|       |    /* Begin function */
31159|   476k|    c->scope->flags |= JANET_SCOPE_CLOSURE;
  ------------------
  |  | 1007|   476k|#define JANET_SCOPE_CLOSURE 16
  ------------------
31160|   476k|    janetc_scope(&fnscope, c, JANET_SCOPE_FUNCTION, "function");
  ------------------
  |  | 1003|   476k|#define JANET_SCOPE_FUNCTION 1
  ------------------
31161|       |
31162|   476k|    if (argn == 0) {
  ------------------
  |  Branch (31162:9): [True: 0, False: 476k]
  ------------------
31163|      0|        errmsg = "expected at least 1 argument to function literal";
31164|      0|        goto error;
31165|      0|    }
31166|       |
31167|       |    /* Read function parameters */
31168|   476k|    parami = 0;
31169|   476k|    head = argv[0];
31170|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31171|    378|        selfref = 1;
31172|    378|        hasname = 1;
31173|    378|        parami = 1;
31174|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31175|   476k|        hasname = 1;
31176|   476k|        parami = 1;
31177|   476k|    }
31178|   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 (31178:9): [True: 0, False: 476k]
  |  Branch (31178:27): [True: 12, False: 476k]
  ------------------
31179|     12|        errmsg = "expected function parameters";
31180|     12|        goto error;
31181|     12|    }
31182|       |
31183|       |    /* Keep track of destructured parameters */
31184|   476k|    JanetSlot *destructed_params = NULL;
31185|   476k|    JanetSlot *named_params = NULL;
31186|   476k|    JanetTable *named_table = NULL;
31187|   476k|    JanetSlot named_slot;
31188|       |
31189|       |    /* Compile function parameters */
31190|   476k|    params = janet_unwrap_tuple(argv[parami]);
  ------------------
  |  |  853|   476k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
31191|   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)))
  |  |  ------------------
  ------------------
31192|   476k|    arity = paramcount;
31193|  5.49M|    for (i = 0; i < paramcount; i++) {
  ------------------
  |  Branch (31193:17): [True: 5.01M, False: 476k]
  ------------------
31194|  5.01M|        Janet param = params[i];
31195|  5.01M|        if (namedargs) {
  ------------------
  |  Branch (31195:13): [True: 0, False: 5.01M]
  ------------------
31196|      0|            arity--;
31197|      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 (31197:17): [True: 0, False: 0]
  ------------------
31198|      0|                errmsg = "only named arguments can follow &named";
31199|      0|                goto error;
31200|      0|            }
31201|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31202|      0|            janet_table_put(named_table, key, param);
31203|      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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31204|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31205|       |            /* Check for varargs and unfixed arity */
31206|  5.00M|            const uint8_t *sym = janet_unwrap_symbol(param);
  ------------------
  |  |  859|  5.00M|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
31207|  5.00M|            if (sym[0] == '&') {
  ------------------
  |  Branch (31207:17): [True: 81, False: 5.00M]
  ------------------
31208|     81|                if (!janet_cstrcmp(sym, "&")) {
  ------------------
  |  Branch (31208:21): [True: 37, False: 44]
  ------------------
31209|     37|                    if (seenamp) {
  ------------------
  |  Branch (31209:25): [True: 0, False: 37]
  ------------------
31210|      0|                        errmsg = "& in unexpected location";
31211|      0|                        goto error;
31212|     37|                    } else if (i == paramcount - 1) {
  ------------------
  |  Branch (31212:32): [True: 6, False: 31]
  ------------------
31213|      6|                        allow_extra = 1;
31214|      6|                        arity--;
31215|     31|                    } else if (i == paramcount - 2) {
  ------------------
  |  Branch (31215:32): [True: 29, False: 2]
  ------------------
31216|     29|                        vararg = 1;
31217|     29|                        arity -= 2;
31218|     29|                    } else {
31219|      2|                        errmsg = "& in unexpected location";
31220|      2|                        goto error;
31221|      2|                    }
31222|     35|                    seenamp = 1;
31223|     44|                } else if (!janet_cstrcmp(sym, "&opt")) {
  ------------------
  |  Branch (31223:28): [True: 1, False: 43]
  ------------------
31224|      1|                    if (seenopt) {
  ------------------
  |  Branch (31224:25): [True: 0, False: 1]
  ------------------
31225|      0|                        errmsg = "only one &opt allowed";
31226|      0|                        goto error;
31227|      1|                    } else if (i == paramcount - 1) {
  ------------------
  |  Branch (31227:32): [True: 1, False: 0]
  ------------------
31228|      1|                        errmsg = "&opt cannot be last item in parameter list";
31229|      1|                        goto error;
31230|      1|                    }
31231|      0|                    min_arity = i;
31232|      0|                    arity--;
31233|      0|                    seenopt = 1;
31234|     43|                } else if (!janet_cstrcmp(sym, "&keys")) {
  ------------------
  |  Branch (31234:28): [True: 0, False: 43]
  ------------------
31235|      0|                    if (seenamp) {
  ------------------
  |  Branch (31235:25): [True: 0, False: 0]
  ------------------
31236|      0|                        errmsg = "&keys in unexpected location";
31237|      0|                        goto error;
31238|      0|                    } else if (i == paramcount - 2) {
  ------------------
  |  Branch (31238:32): [True: 0, False: 0]
  ------------------
31239|      0|                        vararg = 1;
31240|      0|                        structarg = 1;
31241|      0|                        arity -= 2;
31242|      0|                    } else {
31243|      0|                        errmsg = "&keys in unexpected location";
31244|      0|                        goto error;
31245|      0|                    }
31246|      0|                    seenamp = 1;
31247|     43|                } else if (!janet_cstrcmp(sym, "&named")) {
  ------------------
  |  Branch (31247:28): [True: 0, False: 43]
  ------------------
31248|      0|                    if (seenamp) {
  ------------------
  |  Branch (31248:25): [True: 0, False: 0]
  ------------------
31249|      0|                        errmsg = "&named in unexpected location";
31250|      0|                        goto error;
31251|      0|                    }
31252|      0|                    vararg = 1;
31253|      0|                    structarg = 1;
31254|      0|                    arity--;
31255|      0|                    seenamp = 1;
31256|      0|                    namedargs = 1;
31257|      0|                    named_table = janet_table(10);
31258|      0|                    named_slot = janetc_farslot(c);
31259|     43|                } else {
31260|     43|                    janetc_nameslot(c, sym, janetc_farslot(c), 0);
31261|     43|                }
31262|  5.00M|            } else {
31263|  5.00M|                janetc_nameslot(c, sym, janetc_farslot(c), 0);
31264|  5.00M|            }
31265|  5.00M|        } else {
31266|  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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31267|  13.8k|        }
31268|  5.01M|    }
31269|       |
31270|       |    /* Compile named arguments */
31271|   476k|    if (namedargs) {
  ------------------
  |  Branch (31271:9): [True: 0, False: 476k]
  ------------------
31272|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31273|      0|        destructure(c, param, named_slot, defleaf, NULL);
31274|      0|        janetc_freeslot(c, named_slot);
31275|      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]
  |  |  ------------------
  ------------------
31276|      0|    }
31277|       |
31278|       |    /* Compile destructed params */
31279|   476k|    int32_t j = 0;
31280|  5.49M|    for (i = 0; i < paramcount; i++) {
  ------------------
  |  Branch (31280:17): [True: 5.01M, False: 476k]
  ------------------
31281|  5.01M|        Janet param = params[i];
31282|  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 (31282:13): [True: 13.7k, False: 5.00M]
  ------------------
31283|  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]
  |  |  ------------------
  ------------------
31284|  13.7k|            JanetSlot reg = destructed_params[j++];
31285|  13.7k|            destructure(c, param, reg, defleaf, NULL);
31286|  13.7k|            janetc_freeslot(c, reg);
31287|  13.7k|        }
31288|  5.01M|    }
31289|   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]
  |  |  ------------------
  ------------------
31290|       |
31291|   476k|    max_arity = (vararg || allow_extra) ? INT32_MAX : arity;
  ------------------
  |  Branch (31291:18): [True: 29, False: 476k]
  |  Branch (31291:28): [True: 6, False: 476k]
  ------------------
31292|   476k|    if (!seenopt) min_arity = arity;
  ------------------
  |  Branch (31292:9): [True: 476k, False: 0]
  ------------------
31293|       |
31294|       |    /* Check for self ref (also avoid if arguments shadow own name) */
31295|   476k|    if (selfref) {
  ------------------
  |  Branch (31295:9): [True: 374, False: 476k]
  ------------------
31296|       |        /* Check if the parameters shadow the function name. If so, don't
31297|       |         * emit JOP_LOAD_SELF and add a binding since that most users
31298|       |         * seem to expect that function parameters take precedence over the
31299|       |         * function name */
31300|    374|        const uint8_t *sym = janet_unwrap_symbol(head);
  ------------------
  |  |  859|    374|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
31301|    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]
  |  |  ------------------
  ------------------
31302|    374|        int found = 0;
31303|   116k|        for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (31303:29): [True: 116k, False: 374]
  ------------------
31304|   116k|            if (c->scope->syms[i].sym == sym) {
  ------------------
  |  Branch (31304:17): [True: 1.47k, False: 114k]
  ------------------
31305|  1.47k|                found = 1;
31306|  1.47k|            }
31307|   116k|        }
31308|    374|        if (!found) {
  ------------------
  |  Branch (31308:13): [True: 220, False: 154]
  ------------------
31309|    220|            JanetSlot slot = janetc_farslot(c);
31310|    220|            slot.flags = JANET_SLOT_NAMED | JANET_FUNCTION;
  ------------------
  |  |  984|    220|#define JANET_SLOT_NAMED 0x20000
  ------------------
31311|    220|            janetc_emit_s(c, JOP_LOAD_SELF, slot, 1);
31312|       |            /* We should figure out a better way to avoid `(def x 1) (def x :shadow (fn x [...] ...))` triggering a
31313|       |             * shadow lint for the last x */
31314|    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
  ------------------
31315|    220|        }
31316|    374|    }
31317|       |
31318|       |    /* Compile function body */
31319|   476k|    if (parami + 1 == argn) {
  ------------------
  |  Branch (31319:9): [True: 221, False: 476k]
  ------------------
31320|    221|        janetc_emit(c, JOP_RETURN_NIL);
31321|   476k|    } else {
31322|   977k|        for (argi = parami + 1; argi < argn; argi++) {
  ------------------
  |  Branch (31322:33): [True: 511k, False: 465k]
  ------------------
31323|   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 (31323:29): [True: 476k, False: 35.0k]
  ------------------
31324|   511k|            janetc_value(subopts, argv[argi]);
31325|   511k|            if (c->result.status == JANET_COMPILE_ERROR)
  ------------------
  |  Branch (31325:17): [True: 11.0k, False: 500k]
  ------------------
31326|  11.0k|                goto error2;
31327|   511k|        }
31328|   476k|    }
31329|       |
31330|       |    /* Build function */
31331|   465k|    def = janetc_pop_funcdef(c);
31332|   465k|    def->arity = arity;
31333|   465k|    def->min_arity = min_arity;
31334|   465k|    def->max_arity = max_arity;
31335|   465k|    if (named_table != NULL) {
  ------------------
  |  Branch (31335:9): [True: 0, False: 465k]
  ------------------
31336|      0|        def->named_args_count = named_table->count;
31337|      0|    }
31338|   465k|    if (vararg) def->flags |= JANET_FUNCDEF_FLAG_VARARG;
  ------------------
  |  | 1088|     13|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
  |  Branch (31338:9): [True: 13, False: 465k]
  ------------------
31339|   465k|    if (structarg) def->flags |= JANET_FUNCDEF_FLAG_STRUCTARG;
  ------------------
  |  | 1096|      0|#define JANET_FUNCDEF_FLAG_STRUCTARG 0x1000000
  ------------------
  |  Branch (31339:9): [True: 0, False: 465k]
  ------------------
31340|   465k|    if (namedargs) def->flags |= JANET_FUNCDEF_FLAG_NAMEDARGS;
  ------------------
  |  | 1098|      0|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (31340:9): [True: 0, False: 465k]
  ------------------
31341|       |
31342|   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 (31342:9): [True: 465k, False: 210]
  ------------------
31343|   465k|    janet_def_addflags(def);
31344|   465k|    defindex = janetc_addfuncdef(c, def);
31345|       |
31346|       |    /* Ensure enough slots for vararg function. */
31347|   465k|    if (arity + vararg > def->slotcount) def->slotcount = arity + vararg;
  ------------------
  |  Branch (31347:9): [True: 0, False: 465k]
  ------------------
31348|       |
31349|       |    /* Instantiate closure */
31350|   465k|    ret = janetc_gettarget(opts);
31351|   465k|    janetc_emit_su(c, JOP_CLOSURE, ret, defindex, 1);
31352|   465k|    return ret;
31353|       |
31354|     15|error:
31355|     15|    janetc_cerror(c, errmsg);
31356|  11.0k|error2:
31357|  11.0k|    janetc_popscope(c);
31358|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31359|     15|}
janet.c:janetc_addfuncdef:
30929|   466k|static int32_t janetc_addfuncdef(JanetCompiler *c, JanetFuncDef *def) {
30930|   466k|    JanetScope *scope = c->scope;
30931|  1.96M|    while (scope) {
  ------------------
  |  Branch (30931:12): [True: 1.96M, False: 0]
  ------------------
30932|  1.96M|        if (scope->flags & JANET_SCOPE_FUNCTION)
  ------------------
  |  | 1003|  1.96M|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (30932:13): [True: 466k, False: 1.49M]
  ------------------
30933|   466k|            break;
30934|  1.49M|        scope = scope->parent;
30935|  1.49M|    }
30936|   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]
  |  |  ------------------
  ------------------
30937|   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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30938|       |    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]
  |  |  ------------------
  ------------------
30939|   466k|}
janet.c:janetc_if:
30777|  6.76k|static JanetSlot janetc_if(JanetFopts opts, int32_t argn, const Janet *argv) {
30778|  6.76k|    JanetCompiler *c = opts.compiler;
30779|  6.76k|    int32_t labelr, labeljr, labeld, labeljd;
30780|  6.76k|    JanetFopts condopts, bodyopts;
30781|  6.76k|    JanetSlot cond, left, right, target;
30782|  6.76k|    Janet truebody, falsebody;
30783|  6.76k|    JanetScope condscope, tempscope;
30784|  6.76k|    const int tail = opts.flags & JANET_FOPTS_TAIL;
  ------------------
  |  | 1091|  6.76k|#define JANET_FOPTS_TAIL 0x10000
  ------------------
30785|  6.76k|    const int drop = opts.flags & JANET_FOPTS_DROP;
  ------------------
  |  | 1093|  6.76k|#define JANET_FOPTS_DROP 0x40000
  ------------------
30786|  6.76k|    uint8_t ifnjmp = JOP_JUMP_IF_NOT;
30787|       |
30788|  6.76k|    if (argn < 2 || argn > 3) {
  ------------------
  |  Branch (30788:9): [True: 0, False: 6.76k]
  |  Branch (30788:21): [True: 0, False: 6.76k]
  ------------------
30789|      0|        janetc_cerror(c, "expected 2 or 3 arguments to if");
30790|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30791|      0|    }
30792|       |
30793|       |    /* Get the bodies of the if expression */
30794|  6.76k|    truebody = argv[1];
30795|  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 (30795:17): [True: 6.71k, False: 47]
  ------------------
30796|       |
30797|       |    /* Get options */
30798|  6.76k|    condopts = janetc_fopts_default(c);
30799|  6.76k|    bodyopts = opts;
30800|  6.76k|    bodyopts.flags &= ~JANET_FOPTS_ACCEPT_SPLICE;
  ------------------
  |  | 1094|  6.76k|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
30801|       |
30802|       |    /* Set target for compilation */
30803|  6.76k|    target = (drop || tail)
  ------------------
  |  Branch (30803:15): [True: 29, False: 6.73k]
  |  Branch (30803:23): [True: 5.28k, False: 1.44k]
  ------------------
30804|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30805|  6.76k|             : janetc_gettarget(opts);
30806|       |
30807|       |    /* Compile condition */
30808|  6.76k|    janetc_scope(&condscope, c, 0, "if");
30809|       |
30810|  6.76k|    Janet condform = argv[0];
30811|  6.76k|    if (janetc_check_nil_form(condform, &condform, JANET_FUN_EQ)) {
  ------------------
  |  |  962|  6.76k|#define JANET_FUN_EQ 24
  ------------------
  |  Branch (30811:9): [True: 0, False: 6.76k]
  ------------------
30812|      0|        ifnjmp = JOP_JUMP_IF_NOT_NIL;
30813|  6.76k|    } else if (janetc_check_nil_form(condform, &condform, JANET_FUN_NEQ)) {
  ------------------
  |  |  963|  6.76k|#define JANET_FUN_NEQ 25
  ------------------
  |  Branch (30813:16): [True: 0, False: 6.76k]
  ------------------
30814|      0|        ifnjmp = JOP_JUMP_IF_NIL;
30815|      0|    }
30816|       |
30817|  6.76k|    cond = janetc_value(condopts, condform);
30818|       |
30819|       |    /* Check constant condition. */
30820|       |    /* TODO: Use type info for more short circuits */
30821|  6.76k|    if (cond.flags & JANET_SLOT_CONSTANT) {
  ------------------
  |  |  983|  6.76k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (30821:9): [True: 747, False: 6.01k]
  ------------------
30822|    747|        int swap_condition = 0;
30823|    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 (30823:13): [True: 747, False: 0]
  ------------------
30824|    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 (30824:13): [True: 0, False: 747]
  ------------------
30825|    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 (30825:13): [True: 0, False: 747]
  |  Branch (30825:46): [True: 0, False: 0]
  ------------------
30826|    747|        if (swap_condition) {
  ------------------
  |  Branch (30826:13): [True: 87, False: 660]
  ------------------
30827|       |            /* Swap the true and false bodies */
30828|     87|            Janet temp = falsebody;
30829|     87|            falsebody = truebody;
30830|     87|            truebody = temp;
30831|     87|        }
30832|    747|        janetc_scope(&tempscope, c, 0, "if-true");
30833|    747|        right = janetc_value(bodyopts, truebody);
30834|    747|        if (!drop && !tail) janetc_copy(c, target, right);
  ------------------
  |  Branch (30834:13): [True: 738, False: 9]
  |  Branch (30834:22): [True: 221, False: 517]
  ------------------
30835|    747|        janetc_popscope(c);
30836|    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 (30836:13): [True: 712, False: 35]
  ------------------
30837|    712|            janetc_throwaway(bodyopts, falsebody);
30838|    712|        }
30839|    747|        janetc_popscope(c);
30840|    747|        return target;
30841|    747|    }
30842|       |
30843|       |    /* Compile jump to right */
30844|  6.01k|    labeljr = janetc_emit_si(c, ifnjmp, cond, 0, 0);
30845|       |
30846|       |    /* Condition left body */
30847|  6.01k|    janetc_scope(&tempscope, c, 0, "if-true");
30848|  6.01k|    left = janetc_value(bodyopts, truebody);
30849|  6.01k|    if (!drop && !tail) janetc_copy(c, target, left);
  ------------------
  |  Branch (30849:9): [True: 5.99k, False: 20]
  |  Branch (30849:18): [True: 1.22k, False: 4.77k]
  ------------------
30850|  6.01k|    janetc_popscope(c);
30851|       |
30852|       |    /* Compile jump to done */
30853|  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]
  |  |  ------------------
  ------------------
30854|  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 (30854:9): [True: 1.24k, False: 4.77k]
  |  Branch (30854:20): [True: 20, False: 1.22k]
  ------------------
30855|       |
30856|       |    /* Compile right body */
30857|  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]
  |  |  ------------------
  ------------------
30858|  6.01k|    janetc_scope(&tempscope, c, 0, "if-false");
30859|  6.01k|    right = janetc_value(bodyopts, falsebody);
30860|  6.01k|    if (!drop && !tail) janetc_copy(c, target, right);
  ------------------
  |  Branch (30860:9): [True: 5.99k, False: 20]
  |  Branch (30860:18): [True: 1.22k, False: 4.77k]
  ------------------
30861|  6.01k|    janetc_popscope(c);
30862|       |
30863|       |    /* Pop main scope */
30864|  6.01k|    janetc_popscope(c);
30865|       |
30866|       |    /* Write jumps - only add jump lengths if jump actually emitted */
30867|  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]
  |  |  ------------------
  ------------------
30868|  6.01k|    if (labeljr < labeld) {
  ------------------
  |  Branch (30868:9): [True: 6.01k, False: 0]
  ------------------
30869|  6.01k|        check_16bit_jump(c, labeljr, labelr);
30870|  6.01k|        c->buffer[labeljr] |= (uint32_t) (labelr - labeljr) << 16;
30871|  6.01k|        if (!tail && labeljd < labeld) {
  ------------------
  |  Branch (30871:13): [True: 1.24k, False: 4.77k]
  |  Branch (30871:22): [True: 1.24k, False: 3]
  ------------------
30872|  1.24k|            check_24bit_jump(c, labeljd, labeld);
30873|  1.24k|            c->buffer[labeljd] |= (uint32_t) (labeld - labeljd) << 8;
30874|  1.24k|        }
30875|  6.01k|    }
30876|       |
30877|  6.01k|    if (tail) target.flags |= JANET_SLOT_RETURNED;
  ------------------
  |  |  987|  4.77k|#define JANET_SLOT_RETURNED 0x100000
  ------------------
  |  Branch (30877:9): [True: 4.77k, False: 1.24k]
  ------------------
30878|  6.01k|    return target;
30879|  6.76k|}
janet.c:janetc_check_nil_form:
30747|  16.9k|static int janetc_check_nil_form(Janet x, Janet *capture, uint32_t fun_tag) {
30748|  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 (30748:9): [True: 11.4k, False: 5.53k]
  ------------------
30749|  5.53k|    JanetTuple tup = janet_unwrap_tuple(x);
  ------------------
  |  |  853|  5.53k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
30750|  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 (30750:9): [True: 2.45k, False: 3.07k]
  ------------------
30751|  3.07k|    Janet op1 = tup[0];
30752|  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 (30752:9): [True: 570, False: 2.50k]
  ------------------
30753|  2.50k|    JanetFunction *fun = janet_unwrap_function(op1);
  ------------------
  |  |  863|  2.50k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
30754|  2.50k|    uint32_t tag = fun->def->flags & JANET_FUNCDEF_FLAG_TAG;
  ------------------
  |  | 1099|  2.50k|#define JANET_FUNCDEF_FLAG_TAG 0xFFFF
  ------------------
30755|  2.50k|    if (tag != fun_tag) return 0;
  ------------------
  |  Branch (30755:9): [True: 1.25k, False: 1.25k]
  ------------------
30756|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30757|  1.24k|        *capture = tup[2];
30758|  1.24k|        return 1;
30759|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30760|      0|        *capture = tup[1];
30761|      0|        return 1;
30762|      0|    }
30763|      4|    return 0;
30764|  1.25k|}
janet.c:janetc_quasiquote:
30292|   306k|static JanetSlot janetc_quasiquote(JanetFopts opts, int32_t argn, const Janet *argv) {
30293|   306k|    if (argn != 1) {
  ------------------
  |  Branch (30293:9): [True: 5, False: 306k]
  ------------------
30294|      5|        janetc_cerror(opts.compiler, "expected 1 argument to quasiquote");
30295|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30296|      5|    }
30297|   306k|    return quasiquote(opts, argv[0], JANET_RECURSION_GUARD, 0);
  ------------------
  |  |  291|   306k|#define JANET_RECURSION_GUARD 1024
  ------------------
30298|   306k|}
janet.c:quasiquote:
30231|  2.71M|static JanetSlot quasiquote(JanetFopts opts, Janet x, int depth, int level) {
30232|  2.71M|    if (depth == 0) {
  ------------------
  |  Branch (30232:9): [True: 37, False: 2.71M]
  ------------------
30233|     37|        janetc_cerror(opts.compiler, "quasiquote too deeply nested");
30234|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30235|     37|    }
30236|  2.71M|    JanetSlot *slots = NULL;
30237|  2.71M|    JanetFopts subopts = opts;
30238|  2.71M|    subopts.flags &= ~JANET_FOPTS_HINT;
  ------------------
  |  | 1092|  2.71M|#define JANET_FOPTS_HINT 0x20000
  ------------------
30239|  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 (30239:13): [True: 2.70M, False: 9.77k]
  ------------------
30240|  1.63M|        default:
  ------------------
  |  Branch (30240:9): [True: 1.63M, False: 1.07M]
  ------------------
30241|  1.63M|            return janetc_cslot(x);
30242|  1.06M|        case JANET_TUPLE: {
  ------------------
  |  Branch (30242:9): [True: 1.06M, False: 1.64M]
  ------------------
30243|  1.06M|            int32_t i, len;
30244|  1.06M|            const Janet *tup = janet_unwrap_tuple(x);
  ------------------
  |  |  853|  1.06M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
30245|  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)))
  |  |  ------------------
  ------------------
30246|  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 (30246:17): [True: 1.00M, False: 65.6k]
  ------------------
30247|   999k|                const uint8_t *head = janet_unwrap_symbol(tup[0]);
  ------------------
  |  |  859|   999k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
30248|   999k|                if (!janet_cstrcmp(head, "unquote")) {
  ------------------
  |  Branch (30248:21): [True: 11.2k, False: 988k]
  ------------------
30249|  11.2k|                    if (level == 0) {
  ------------------
  |  Branch (30249:25): [True: 559, False: 10.6k]
  ------------------
30250|    559|                        JanetFopts subopts = janetc_fopts_default(opts.compiler);
30251|    559|                        subopts.flags |= JANET_FOPTS_ACCEPT_SPLICE;
  ------------------
  |  | 1094|    559|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
30252|    559|                        return janetc_value(subopts, tup[1]);
30253|  10.6k|                    } else {
30254|  10.6k|                        level--;
30255|  10.6k|                    }
30256|   988k|                } else if (!janet_cstrcmp(head, "quasiquote")) {
  ------------------
  |  Branch (30256:28): [True: 675k, False: 313k]
  ------------------
30257|   675k|                    level++;
30258|   675k|                }
30259|   999k|            }
30260|  3.46M|            for (i = 0; i < len; i++)
  ------------------
  |  Branch (30260:25): [True: 2.39M, False: 1.06M]
  ------------------
30261|  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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30262|  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 (30262:42): [True: 65.3k, False: 1.00M]
  ------------------
30263|  1.06M|                            ? JOP_MAKE_BRACKET_TUPLE
30264|  1.06M|                            : JOP_MAKE_TUPLE);
30265|  1.06M|        }
30266|    356|        case JANET_ARRAY: {
  ------------------
  |  Branch (30266:9): [True: 356, False: 2.70M]
  ------------------
30267|    356|            int32_t i;
30268|    356|            JanetArray *array = janet_unwrap_array(x);
  ------------------
  |  |  855|    356|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
30269|  3.73k|            for (i = 0; i < array->count; i++)
  ------------------
  |  Branch (30269:25): [True: 3.37k, False: 356]
  ------------------
30270|  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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30271|    356|            return qq_slots(opts, slots, JOP_MAKE_ARRAY);
30272|  1.06M|        }
30273|    114|        case JANET_TABLE:
  ------------------
  |  Branch (30273:9): [True: 114, False: 2.71M]
  ------------------
30274|  10.8k|        case JANET_STRUCT: {
  ------------------
  |  Branch (30274:9): [True: 10.7k, False: 2.69M]
  ------------------
30275|  10.8k|            const JanetKV *kv = NULL, *kvs = NULL;
30276|  10.8k|            int32_t len, cap = 0;
30277|  10.8k|            janet_dictionary_view(x, &kvs, &len, &cap);
30278|  12.6k|            while ((kv = janet_dictionary_next(kvs, cap, kv))) {
  ------------------
  |  Branch (30278:20): [True: 1.82k, False: 10.8k]
  ------------------
30279|  1.82k|                JanetSlot key = quasiquote(subopts, kv->key, depth - 1, level);
30280|  1.82k|                JanetSlot value =  quasiquote(subopts, kv->value, depth - 1, level);
30281|  1.82k|                key.flags &= ~JANET_SLOT_SPLICED;
  ------------------
  |  |  991|  1.82k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
30282|  1.82k|                value.flags &= ~JANET_SLOT_SPLICED;
  ------------------
  |  |  991|  1.82k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
30283|  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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30284|  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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30285|  1.82k|            }
30286|  10.8k|            return qq_slots(opts, slots,
30287|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30288|    114|        }
30289|  2.71M|    }
30290|  2.71M|}
janet.c:qq_slots:
30223|  1.07M|static JanetSlot qq_slots(JanetFopts opts, JanetSlot *slots, int makeop) {
30224|  1.07M|    JanetSlot target = janetc_gettarget(opts);
30225|  1.07M|    janetc_pushslots(opts.compiler, slots);
30226|  1.07M|    janetc_freeslots(opts.compiler, slots);
30227|  1.07M|    janetc_emit_s(opts.compiler, makeop, target, 1);
30228|  1.07M|    return target;
30229|  1.07M|}
janet.c:janetc_quote:
30200|  29.0k|static JanetSlot janetc_quote(JanetFopts opts, int32_t argn, const Janet *argv) {
30201|  29.0k|    if (argn != 1) {
  ------------------
  |  Branch (30201:9): [True: 1, False: 29.0k]
  ------------------
30202|      1|        janetc_cerror(opts.compiler, "expected 1 argument to quote");
30203|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30204|      1|    }
30205|  29.0k|    return janetc_cslot(argv[0]);
30206|  29.0k|}
janet.c:janetc_varset:
30434|  1.88k|static JanetSlot janetc_varset(JanetFopts opts, int32_t argn, const Janet *argv) {
30435|  1.88k|    if (argn != 2) {
  ------------------
  |  Branch (30435:9): [True: 0, False: 1.88k]
  ------------------
30436|      0|        janetc_cerror(opts.compiler, "expected 2 arguments to set");
30437|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30438|      0|    }
30439|  1.88k|    JanetFopts subopts = janetc_fopts_default(opts.compiler);
30440|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30441|       |        /* Normal var - (set a 1) */
30442|  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))
  ------------------
30443|  1.86k|        JanetSlot dest = janetc_resolve(opts.compiler, sym);
30444|  1.86k|        if (!(dest.flags & JANET_SLOT_MUTABLE)) {
  ------------------
  |  |  985|  1.86k|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
  |  Branch (30444:13): [True: 1, False: 1.86k]
  ------------------
30445|      1|            janetc_cerror(opts.compiler, "cannot set constant");
30446|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30447|      1|        }
30448|  1.86k|        subopts.flags = JANET_FOPTS_HINT;
  ------------------
  |  | 1092|  1.86k|#define JANET_FOPTS_HINT 0x20000
  ------------------
30449|  1.86k|        subopts.hint = dest;
30450|  1.86k|        JanetSlot ret = janetc_value(subopts, argv[1]);
30451|  1.86k|        janetc_copy(opts.compiler, dest, ret);
30452|  1.86k|        return ret;
30453|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30454|       |        /* Set a field (setf behavior) - (set (tab :key) 2) */
30455|     18|        const Janet *tup = janet_unwrap_tuple(argv[0]);
  ------------------
  |  |  853|     18|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
30456|       |        /* Tuple must have 2 elements */
30457|     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 (30457:13): [True: 0, False: 18]
  ------------------
30458|      0|            janetc_cerror(opts.compiler, "expected 2 element tuple for l-value to set");
30459|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30460|      0|        }
30461|     18|        JanetSlot ds = janetc_value(subopts, tup[0]);
30462|     18|        JanetSlot key = janetc_value(subopts, tup[1]);
30463|       |        /* Can't be tail position because we will emit a PUT instruction afterwards */
30464|       |        /* Also can't drop either */
30465|     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
  ------------------
30466|     18|        JanetSlot rvalue = janetc_value(opts, argv[1]);
30467|       |        /* Emit the PUT instruction */
30468|     18|        janetc_emit_sss(opts.compiler, JOP_PUT, ds, key, rvalue, 0);
30469|     18|        return rvalue;
30470|     18|    } else {
30471|       |        /* Error */
30472|      0|        janetc_cerror(opts.compiler, "expected symbol or tuple for l-value to set");
30473|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30474|      0|    }
30475|  1.88k|}
janet.c:janetc_splice:
30208|  4.86k|static JanetSlot janetc_splice(JanetFopts opts, int32_t argn, const Janet *argv) {
30209|  4.86k|    JanetSlot ret;
30210|  4.86k|    if (!(opts.flags & JANET_FOPTS_ACCEPT_SPLICE)) {
  ------------------
  |  | 1094|  4.86k|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
  |  Branch (30210:9): [True: 35, False: 4.83k]
  ------------------
30211|     35|        janetc_cerror(opts.compiler, "splice can only be used in function parameters and data constructors, it has no effect here");
30212|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30213|     35|    }
30214|  4.83k|    if (argn != 1) {
  ------------------
  |  Branch (30214:9): [True: 3, False: 4.83k]
  ------------------
30215|      3|        janetc_cerror(opts.compiler, "expected 1 argument to splice");
30216|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30217|      3|    }
30218|  4.83k|    ret = janetc_value(opts, argv[0]);
30219|  4.83k|    ret.flags |= JANET_SLOT_SPLICED;
  ------------------
  |  |  991|  4.83k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
30220|  4.83k|    return ret;
30221|  4.83k|}
janet.c:janetc_unquote:
30300|     50|static JanetSlot janetc_unquote(JanetFopts opts, int32_t argn, const Janet *argv) {
30301|     50|    (void) argn;
30302|     50|    (void) argv;
30303|     50|    janetc_cerror(opts.compiler, "cannot use unquote here");
30304|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30305|     50|}
janet.c:janetc_var:
30653|  1.44k|static JanetSlot janetc_var(JanetFopts opts, int32_t argn, const Janet *argv) {
30654|  1.44k|    JanetCompiler *c = opts.compiler;
30655|  1.44k|    JanetTable *attr_table = handleattr(c, "var", argn, argv);
30656|  1.44k|    if (c->result.status == JANET_COMPILE_ERROR) {
  ------------------
  |  Branch (30656:9): [True: 24, False: 1.42k]
  ------------------
30657|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30658|     24|    }
30659|  1.42k|    check_metadata_lint(c, attr_table);
30660|  1.42k|    SlotHeadPair *into = NULL;
30661|  1.42k|    into = dohead_destructure(c, into, opts, argv[0], argv[argn - 1]);
30662|  1.42k|    if (c->result.status == JANET_COMPILE_ERROR) {
  ------------------
  |  Branch (30662:9): [True: 0, False: 1.42k]
  ------------------
30663|      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]
  |  |  ------------------
  ------------------
30664|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30665|      0|    }
30666|  1.42k|    JanetSlot ret;
30667|  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]
  |  |  ------------------
  ------------------
30668|  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 (30668:25): [True: 1.42k, False: 1.42k]
  ------------------
30669|  1.42k|        destructure(c, into[i].lhs, into[i].rhs, varleaf, attr_table);
30670|  1.42k|        ret = into[i].rhs;
30671|  1.42k|    }
30672|       |    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]
  |  |  ------------------
  ------------------
30673|  1.42k|    return ret;
30674|  1.42k|}
janet.c:varleaf:
30609|  16.6k|    JanetTable *reftab) {
30610|  16.6k|    if (c->scope->flags & JANET_SCOPE_TOP) {
  ------------------
  |  | 1005|  16.6k|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (30610:9): [True: 3.04k, False: 13.6k]
  ------------------
30611|       |        /* Global var, generate var */
30612|  3.04k|        JanetSlot refslot;
30613|  3.04k|        JanetTable *entry = janet_table_clone(reftab);
30614|       |
30615|  3.04k|        int is_redef = c->is_redef;
30616|       |
30617|  3.04k|        JanetArray *ref;
30618|  3.04k|        JanetBinding old_binding;
30619|  3.04k|        if (is_redef && (old_binding = janet_resolve_ext(c->env, sym),
  ------------------
  |  Branch (30619:13): [True: 0, False: 3.04k]
  |  Branch (30619:25): [True: 0, False: 0]
  ------------------
30620|      0|                         old_binding.type == JANET_BINDING_VAR)) {
30621|      0|            ref = janet_unwrap_array(old_binding.value);
  ------------------
  |  |  855|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
30622|  3.04k|        } else {
30623|  3.04k|            ref = janet_array(1);
30624|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30625|  3.04k|        }
30626|       |
30627|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30628|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30629|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30630|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30631|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30632|  3.04k|        janetc_emit_ssu(c, JOP_PUT_INDEX, refslot, s, 0, 0);
30633|  3.04k|        return 1;
30634|  13.6k|    } else {
30635|  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 (30635:25): [True: 13.6k, False: 0]
  |  Branch (30635:35): [True: 84, False: 13.5k]
  ------------------
30636|  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 (30636:25): [True: 13.6k, False: 0]
  |  Branch (30636:35): [True: 84, False: 13.5k]
  ------------------
30637|  13.6k|        uint32_t def_flags = 0;
30638|  13.6k|        if (no_unused) def_flags |= JANET_DEFFLAG_NO_UNUSED;
  ------------------
  |  | 1127|      0|#define JANET_DEFFLAG_NO_UNUSED 2
  ------------------
  |  Branch (30638:13): [True: 0, False: 13.6k]
  ------------------
30639|  13.6k|        if (no_shadow) def_flags |= JANET_DEFFLAG_NO_SHADOWCHECK;
  ------------------
  |  | 1126|      0|#define JANET_DEFFLAG_NO_SHADOWCHECK 1
  ------------------
  |  Branch (30639:13): [True: 0, False: 13.6k]
  ------------------
30640|  13.6k|        return namelocal(c, sym, JANET_SLOT_MUTABLE, s, def_flags);
  ------------------
  |  |  985|  13.6k|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
30641|  13.6k|    }
30642|  16.6k|}
janet.c:janetc_while:
31002|  1.72k|static JanetSlot janetc_while(JanetFopts opts, int32_t argn, const Janet *argv) {
31003|  1.72k|    JanetCompiler *c = opts.compiler;
31004|  1.72k|    JanetSlot cond;
31005|  1.72k|    JanetFopts subopts = janetc_fopts_default(c);
31006|  1.72k|    JanetScope tempscope;
31007|  1.72k|    int32_t labelwt, labeld, labeljt, labelc, i;
31008|  1.72k|    int infinite = 0;
31009|  1.72k|    int is_nil_form = 0;
31010|  1.72k|    int is_notnil_form = 0;
31011|  1.72k|    uint8_t ifjmp = JOP_JUMP_IF;
31012|  1.72k|    uint8_t ifnjmp = JOP_JUMP_IF_NOT;
31013|       |
31014|  1.72k|    if (argn < 1) {
  ------------------
  |  Branch (31014:9): [True: 0, False: 1.72k]
  ------------------
31015|      0|        janetc_cerror(c, "expected at least 1 argument to while");
31016|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31017|      0|    }
31018|       |
31019|  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]
  |  |  ------------------
  ------------------
31020|       |
31021|  1.72k|    janetc_scope(&tempscope, c, JANET_SCOPE_WHILE, "while");
  ------------------
  |  | 1008|  1.72k|#define JANET_SCOPE_WHILE 32
  ------------------
31022|       |
31023|       |    /* Check for `(= nil _)` or `(not= nil _)` in condition, and if so, use the
31024|       |     * jmpnl or jmpnn instructions. This let's us implement `(each ...)`
31025|       |     * more efficiently. */
31026|  1.72k|    Janet condform = argv[0];
31027|  1.72k|    if (janetc_check_nil_form(condform, &condform, JANET_FUN_EQ)) {
  ------------------
  |  |  962|  1.72k|#define JANET_FUN_EQ 24
  ------------------
  |  Branch (31027:9): [True: 0, False: 1.72k]
  ------------------
31028|      0|        is_nil_form = 1;
31029|      0|        ifjmp = JOP_JUMP_IF_NIL;
31030|      0|        ifnjmp = JOP_JUMP_IF_NOT_NIL;
31031|      0|    }
31032|  1.72k|    if (janetc_check_nil_form(condform, &condform, JANET_FUN_NEQ)) {
  ------------------
  |  |  963|  1.72k|#define JANET_FUN_NEQ 25
  ------------------
  |  Branch (31032:9): [True: 1.24k, False: 476]
  ------------------
31033|  1.24k|        is_notnil_form = 1;
31034|  1.24k|        ifjmp = JOP_JUMP_IF_NOT_NIL;
31035|  1.24k|        ifnjmp = JOP_JUMP_IF_NIL;
31036|  1.24k|    }
31037|       |
31038|       |    /* Compile condition */
31039|  1.72k|    cond = janetc_value(subopts, condform);
31040|       |
31041|       |    /* Check for constant condition */
31042|  1.72k|    if (cond.flags & JANET_SLOT_CONSTANT) {
  ------------------
  |  |  983|  1.72k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (31042:9): [True: 236, False: 1.48k]
  ------------------
31043|       |        /* Loop never executes */
31044|    236|        int never_executes = is_nil_form
  ------------------
  |  Branch (31044:30): [True: 0, False: 236]
  ------------------
31045|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31046|    236|                             : is_notnil_form
  ------------------
  |  Branch (31046:32): [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|                             : !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]
  |  |  ------------------
  ------------------
31049|    236|        if (never_executes) {
  ------------------
  |  Branch (31049:13): [True: 25, False: 211]
  ------------------
31050|     25|            janetc_popscope(c);
31051|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31052|     25|        }
31053|       |        /* Infinite loop */
31054|    211|        infinite = 1;
31055|    211|    }
31056|       |
31057|       |    /* Infinite loop does not need to check condition */
31058|  1.69k|    labelc = infinite
  ------------------
  |  Branch (31058:14): [True: 211, False: 1.48k]
  ------------------
31059|  1.69k|             ? 0
31060|  1.69k|             : janetc_emit_si(c, ifnjmp, cond, 0, 0);
31061|       |
31062|       |    /* Compile body */
31063|  48.6k|    for (i = 1; i < argn; i++) {
  ------------------
  |  Branch (31063:17): [True: 46.9k, False: 1.69k]
  ------------------
31064|  46.9k|        subopts.flags = JANET_FOPTS_DROP;
  ------------------
  |  | 1093|  46.9k|#define JANET_FOPTS_DROP 0x40000
  ------------------
31065|  46.9k|        janetc_freeslot(c, janetc_value(subopts, argv[i]));
31066|  46.9k|    }
31067|       |
31068|       |    /* Check if closure created in while scope. If so,
31069|       |     * recompile in a function scope. */
31070|  1.69k|    if (tempscope.flags & JANET_SCOPE_CLOSURE) {
  ------------------
  |  | 1007|  1.69k|#define JANET_SCOPE_CLOSURE 16
  ------------------
  |  Branch (31070:9): [True: 1.04k, False: 659]
  ------------------
31071|  1.04k|        subopts = janetc_fopts_default(c);
31072|  1.04k|        tempscope.flags |= JANET_SCOPE_UNUSED;
  ------------------
  |  | 1006|  1.04k|#define JANET_SCOPE_UNUSED 8
  ------------------
31073|  1.04k|        janetc_popscope(c);
31074|  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 (31074:13): [True: 1.03k, False: 3]
  ------------------
31075|  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 (31075:13): [True: 1.03k, False: 3]
  ------------------
31076|       |
31077|  1.04k|        janetc_scope(&tempscope, c, JANET_SCOPE_FUNCTION, "while-iife");
  ------------------
  |  | 1003|  1.04k|#define JANET_SCOPE_FUNCTION 1
  ------------------
31078|       |
31079|       |        /* Recompile in the function scope */
31080|  1.04k|        cond = janetc_value(subopts, condform);
31081|  1.04k|        if (!(cond.flags & JANET_SLOT_CONSTANT)) {
  ------------------
  |  |  983|  1.04k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (31081:13): [True: 971, False: 69]
  ------------------
31082|       |            /* If not an infinite loop, return nil when condition false */
31083|    971|            janetc_emit_si(c, ifjmp, cond, 2, 0);
31084|    971|            janetc_emit(c, JOP_RETURN_NIL);
31085|    971|        }
31086|  42.7k|        for (i = 1; i < argn; i++) {
  ------------------
  |  Branch (31086:21): [True: 41.7k, False: 1.04k]
  ------------------
31087|  41.7k|            subopts.flags = JANET_FOPTS_DROP;
  ------------------
  |  | 1093|  41.7k|#define JANET_FOPTS_DROP 0x40000
  ------------------
31088|  41.7k|            janetc_freeslot(c, janetc_value(subopts, argv[i]));
31089|  41.7k|        }
31090|       |        /* But now add tail recursion */
31091|  1.04k|        int32_t tempself = janetc_regalloc_temp(&tempscope.ra, JANETC_REGTEMP_0);
31092|  1.04k|        janetc_emit(c, JOP_LOAD_SELF | ((uint32_t) tempself << 8));
31093|  1.04k|        janetc_emit(c, JOP_TAILCALL | ((uint32_t) tempself << 8));
31094|  1.04k|        janetc_regalloc_freetemp(&c->scope->ra, tempself, JANETC_REGTEMP_0);
31095|       |        /* Compile function */
31096|  1.04k|        JanetFuncDef *def = janetc_pop_funcdef(c);
31097|  1.04k|        def->name = janet_cstring("while");
31098|  1.04k|        janet_def_addflags(def);
31099|  1.04k|        int32_t defindex = janetc_addfuncdef(c, def);
31100|       |        /* And then load the closure and call it. */
31101|  1.04k|        int32_t cloreg = janetc_regalloc_temp(&c->scope->ra, JANETC_REGTEMP_0);
31102|  1.04k|        janetc_emit(c, JOP_CLOSURE | ((uint32_t) cloreg << 8) | ((uint32_t) defindex << 16));
31103|  1.04k|        janetc_emit(c, JOP_CALL | ((uint32_t) cloreg << 8) | ((uint32_t) cloreg << 16));
31104|  1.04k|        janetc_regalloc_freetemp(&c->scope->ra, cloreg, JANETC_REGTEMP_0);
31105|  1.04k|        c->scope->flags |= JANET_SCOPE_CLOSURE;
  ------------------
  |  | 1007|  1.04k|#define JANET_SCOPE_CLOSURE 16
  ------------------
31106|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31107|  1.04k|    }
31108|       |
31109|       |    /* Compile jump to :whiletop */
31110|    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]
  |  |  ------------------
  ------------------
31111|    659|    janetc_emit(c, JOP_JUMP);
31112|       |
31113|       |    /* Calculate jumps */
31114|    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]
  |  |  ------------------
  ------------------
31115|    659|    if (!infinite) {
  ------------------
  |  Branch (31115:9): [True: 469, False: 190]
  ------------------
31116|    469|        check_16bit_jump(c, labelc, labeld);
31117|    469|        c->buffer[labelc] |= (uint32_t)(labeld - labelc) << 16;
31118|    469|    }
31119|       |
31120|    659|    check_24bit_jump(c, labeljt, labelwt);
31121|    659|    c->buffer[labeljt] |= (uint32_t)(labelwt - labeljt) << 8;
31122|       |
31123|       |    /* Calculate breaks */
31124|  5.25M|    for (int32_t i = labelwt; i < labeld; i++) {
  ------------------
  |  Branch (31124:31): [True: 5.25M, False: 659]
  ------------------
31125|  5.25M|        if (c->buffer[i] == (0x80 | JOP_JUMP)) {
  ------------------
  |  Branch (31125:13): [True: 6, False: 5.25M]
  ------------------
31126|      6|            check_24bit_jump(c, i, labeld);
31127|      6|            c->buffer[i] = JOP_JUMP | ((uint32_t) (labeld - i) << 8);
31128|      6|        }
31129|  5.25M|    }
31130|       |
31131|       |    /* Pop scope and return nil slot */
31132|    659|    janetc_popscope(c);
31133|       |
31134|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31135|  1.69k|}
janet.c:findsetup:
31763|  12.9k|static void findsetup(int32_t argc, Janet *argv, struct kmp_state *s, int32_t extra) {
31764|  12.9k|    janet_arity(argc, 2, 3 + extra);
31765|  12.9k|    JanetByteView pat = janet_getbytes(argv, 0);
31766|  12.9k|    JanetByteView text = janet_getbytes(argv, 1);
31767|  12.9k|    int32_t start = 0;
31768|  12.9k|    if (argc >= 3) {
  ------------------
  |  Branch (31768:9): [True: 7, False: 12.8k]
  ------------------
31769|      7|        start = janet_getinteger(argv, 2);
31770|      7|        if (start < 0) janet_panic("expected non-negative start index");
  ------------------
  |  Branch (31770:13): [True: 2, False: 5]
  ------------------
31771|      7|    }
31772|  12.8k|    kmp_init(s, text.bytes, text.len, pat.bytes, pat.len);
31773|  12.8k|    s->i = start;
31774|  12.8k|}
janet.c:kmp_init:
31573|  18.5k|    const uint8_t *pat, int32_t patlen) {
31574|  18.5k|    if (patlen == 0) {
  ------------------
  |  Branch (31574:9): [True: 1, False: 18.5k]
  ------------------
31575|      1|        janet_panic("expected non-empty pattern");
31576|      1|    }
31577|  18.5k|    int32_t *lookup = janet_calloc(patlen, sizeof(int32_t));
  ------------------
  |  | 2399|  18.5k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
31578|  18.5k|    if (!lookup) {
  ------------------
  |  Branch (31578:9): [True: 0, False: 18.5k]
  ------------------
31579|      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]
  |  |  ------------------
  ------------------
31580|      0|    }
31581|  18.5k|    s->lookup = lookup;
31582|  18.5k|    s->i = 0;
31583|  18.5k|    s->j = 0;
31584|  18.5k|    s->text = text;
31585|  18.5k|    s->pat = pat;
31586|  18.5k|    s->textlen = textlen;
31587|  18.5k|    s->patlen = patlen;
31588|       |    /* Init state machine */
31589|  18.5k|    {
31590|  18.5k|        int32_t i, j;
31591|   896k|        for (i = 1, j = 0; i < patlen; i++) {
  ------------------
  |  Branch (31591:28): [True: 877k, False: 18.5k]
  ------------------
31592|   896k|            while (j && pat[j] != pat[i]) j = lookup[j - 1];
  ------------------
  |  Branch (31592:20): [True: 29.2k, False: 867k]
  |  Branch (31592:25): [True: 18.4k, False: 10.7k]
  ------------------
31593|   877k|            if (pat[j] == pat[i]) j++;
  ------------------
  |  Branch (31593:17): [True: 18.5k, False: 859k]
  ------------------
31594|   877k|            lookup[i] = j;
31595|   877k|        }
31596|  18.5k|    }
31597|  18.5k|}
janet.c:kmp_next:
31608|  18.7k|static int32_t kmp_next(struct kmp_state *state) {
31609|  18.7k|    int32_t i = state->i;
31610|  18.7k|    int32_t j = state->j;
31611|  18.7k|    int32_t textlen = state->textlen;
31612|  18.7k|    int32_t patlen = state->patlen;
31613|  18.7k|    const uint8_t *text = state->text;
31614|  18.7k|    const uint8_t *pat = state->pat;
31615|  18.7k|    int32_t *lookup = state->lookup;
31616|   181k|    while (i < textlen) {
  ------------------
  |  Branch (31616:12): [True: 163k, False: 18.4k]
  ------------------
31617|   163k|        if (text[i] == pat[j]) {
  ------------------
  |  Branch (31617:13): [True: 2.47k, False: 160k]
  ------------------
31618|  2.47k|            if (j == patlen - 1) {
  ------------------
  |  Branch (31618:17): [True: 351, False: 2.12k]
  ------------------
31619|    351|                state->i = i + 1;
31620|    351|                state->j = lookup[j];
31621|    351|                return i - j;
31622|  2.12k|            } else {
31623|  2.12k|                i++;
31624|  2.12k|                j++;
31625|  2.12k|            }
31626|   160k|        } else {
31627|   160k|            if (j > 0) {
  ------------------
  |  Branch (31627:17): [True: 1.78k, False: 158k]
  ------------------
31628|  1.78k|                j = lookup[j - 1];
31629|   158k|            } else {
31630|   158k|                i++;
31631|   158k|            }
31632|   160k|        }
31633|   163k|    }
31634|  18.4k|    return -1;
31635|  18.7k|}
janet.c:kmp_deinit:
31599|  18.5k|static void kmp_deinit(struct kmp_state *state) {
31600|  18.5k|    janet_free(state->lookup);
  ------------------
  |  | 2402|  18.5k|#define janet_free(X) free((X))
  ------------------
31601|  18.5k|}
janet.c:replacesetup:
31837|  5.67k|static void replacesetup(int32_t argc, Janet *argv, struct replace_state *s) {
31838|  5.67k|    janet_arity(argc, 3, 4);
31839|  5.67k|    JanetByteView pat = janet_getbytes(argv, 0);
31840|  5.67k|    Janet subst = argv[1];
31841|  5.67k|    JanetByteView text = janet_getbytes(argv, 2);
31842|  5.67k|    int32_t start = 0;
31843|  5.67k|    if (argc == 4) {
  ------------------
  |  Branch (31843:9): [True: 4, False: 5.67k]
  ------------------
31844|      4|        start = janet_getinteger(argv, 3);
31845|      4|        if (start < 0) janet_panic("expected non-negative start index");
  ------------------
  |  Branch (31845:13): [True: 0, False: 4]
  ------------------
31846|      4|    }
31847|  5.67k|    kmp_init(&s->kmp, text.bytes, text.len, pat.bytes, pat.len);
31848|  5.67k|    s->kmp.i = start;
31849|  5.67k|    s->subst = subst;
31850|  5.67k|}
janet.c:kmp_seti:
31603|    227|static void kmp_seti(struct kmp_state *state, int32_t i) {
31604|    227|    state->i = i;
31605|    227|    state->j = 0;
31606|    227|}
janet.c:trim_help_args:
32059|    144|static void trim_help_args(int32_t argc, Janet *argv, JanetByteView *str, JanetByteView *set) {
32060|    144|    janet_arity(argc, 1, 2);
32061|    144|    *str = janet_getbytes(argv, 0);
32062|    144|    if (argc >= 2) {
  ------------------
  |  Branch (32062:9): [True: 82, False: 62]
  ------------------
32063|     82|        *set = janet_getbytes(argv, 1);
32064|     82|    } else {
32065|     62|        set->bytes = (const uint8_t *)(" \t\r\n\v\f");
32066|     62|        set->len = 6;
32067|     62|    }
32068|    144|}
janet.c:trim_help_leftedge:
32045|     90|static int32_t trim_help_leftedge(JanetByteView str, JanetByteView set) {
32046|    658|    for (int32_t i = 0; i < str.len; i++)
  ------------------
  |  Branch (32046:25): [True: 644, False: 14]
  ------------------
32047|    644|        if (!trim_help_checkset(set, str.bytes[i]))
  ------------------
  |  Branch (32047:13): [True: 76, False: 568]
  ------------------
32048|     76|            return i;
32049|     14|    return str.len;
32050|     90|}
janet.c:trim_help_checkset:
32038|  2.36k|static int trim_help_checkset(JanetByteView set, uint8_t x) {
32039|   113k|    for (int32_t j = 0; j < set.len; j++)
  ------------------
  |  Branch (32039:25): [True: 113k, False: 174]
  ------------------
32040|   113k|        if (set.bytes[j] == x)
  ------------------
  |  Branch (32040:13): [True: 2.19k, False: 110k]
  ------------------
32041|  2.19k|            return 1;
32042|    174|    return 0;
32043|  2.36k|}
janet.c:trim_help_rightedge:
32052|    106|static int32_t trim_help_rightedge(JanetByteView str, JanetByteView set) {
32053|  1.73k|    for (int32_t i = str.len - 1; i >= 0; i--)
  ------------------
  |  Branch (32053:35): [True: 1.72k, False: 8]
  ------------------
32054|  1.72k|        if (!trim_help_checkset(set, str.bytes[i]))
  ------------------
  |  Branch (32054:13): [True: 98, False: 1.62k]
  ------------------
32055|     98|            return i + 1;
32056|      8|    return 0;
32057|    106|}
janet.c:bignat_zero:
32215|   526k|static void bignat_zero(struct BigNat *x) {
32216|   526k|    x->first_digit = 0;
32217|   526k|    x->n = 0;
32218|   526k|    x->cap = 0;
32219|       |    x->digits = NULL;
32220|   526k|}
janet.c:bignat_muladd:
32247|   297k|static void bignat_muladd(struct BigNat *mant, uint32_t factor, uint32_t term) {
32248|   297k|    int32_t i;
32249|   297k|    uint64_t carry = ((uint64_t) mant->first_digit) * factor + term;
32250|   297k|    mant->first_digit = carry % BIGNAT_BASE;
  ------------------
  |  |32204|   297k|#define BIGNAT_BASE 0x80000000U
  ------------------
32251|   297k|    carry /= BIGNAT_BASE;
  ------------------
  |  |32204|   297k|#define BIGNAT_BASE 0x80000000U
  ------------------
32252|  2.45M|    for (i = 0; i < mant->n; i++) {
  ------------------
  |  Branch (32252:17): [True: 2.15M, False: 297k]
  ------------------
32253|  2.15M|        carry += ((uint64_t) mant->digits[i]) * factor;
32254|  2.15M|        mant->digits[i] = carry % BIGNAT_BASE;
  ------------------
  |  |32204|  2.15M|#define BIGNAT_BASE 0x80000000U
  ------------------
32255|  2.15M|        carry /= BIGNAT_BASE;
  ------------------
  |  |32204|  2.15M|#define BIGNAT_BASE 0x80000000U
  ------------------
32256|  2.15M|    }
32257|   297k|    if (carry) bignat_append(mant, (uint32_t) carry);
  ------------------
  |  Branch (32257:9): [True: 42.9k, False: 254k]
  ------------------
32258|   297k|}
janet.c:bignat_append:
32240|  42.9k|static void bignat_append(struct BigNat *mant, uint32_t dig) {
32241|  42.9k|    bignat_extra(mant, 1)[0] = dig;
32242|  42.9k|}
janet.c:bignat_extra:
32223|  45.6k|static uint32_t *bignat_extra(struct BigNat *mant, int32_t n) {
32224|  45.6k|    int32_t oldn = mant->n;
32225|  45.6k|    int32_t newn = oldn + n;
32226|  45.6k|    if (mant->cap < newn) {
  ------------------
  |  Branch (32226:9): [True: 13.6k, False: 31.9k]
  ------------------
32227|  13.6k|        int32_t newcap = 2 * newn;
32228|  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))
  ------------------
32229|  13.6k|        if (NULL == mem) {
  ------------------
  |  Branch (32229:13): [True: 0, False: 13.6k]
  ------------------
32230|      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]
  |  |  ------------------
  ------------------
32231|      0|        }
32232|  13.6k|        mant->cap = newcap;
32233|  13.6k|        mant->digits = mem;
32234|  13.6k|    }
32235|  45.6k|    mant->n = newn;
32236|  45.6k|    return mant->digits + oldn;
32237|  45.6k|}
janet.c:convert:
32343|  54.1k|    int32_t exponent) {
32344|       |
32345|  54.1k|    int32_t exponent2 = 0;
32346|       |
32347|       |    /* Approximate exponent in base 2 of mant and exponent. This should get us a good estimate of the final size of the
32348|       |     * number, within * 2^32 or so. */
32349|  54.1k|    int64_t mant_exp2_approx = mant->n * 32 + 16;
32350|  54.1k|    int64_t exp_exp2_approx = (int64_t)(floor(log2(base) * exponent));
32351|  54.1k|    int64_t exp2_approx = mant_exp2_approx + exp_exp2_approx;
32352|       |
32353|       |    /* Short circuit zero, huge, and small numbers. We use the exponent range of valid IEEE754 doubles (-1022, 1023)
32354|       |     * with a healthy buffer to allow for inaccuracies in the approximation and denormailzed numbers. */
32355|  54.1k|    if (mant->n == 0 && mant->first_digit == 0)
  ------------------
  |  Branch (32355:9): [True: 51.1k, False: 2.97k]
  |  Branch (32355:25): [True: 12.4k, False: 38.6k]
  ------------------
32356|  12.4k|        return negative ? -0.0 : 0.0;
  ------------------
  |  Branch (32356:16): [True: 562, False: 11.8k]
  ------------------
32357|  41.6k|    if (exp2_approx > 1176)
  ------------------
  |  Branch (32357:9): [True: 307, False: 41.3k]
  ------------------
32358|    307|        return negative ? -INFINITY : INFINITY;
  ------------------
  |  Branch (32358:16): [True: 70, False: 237]
  ------------------
32359|  41.3k|    if (exp2_approx < -1175)
  ------------------
  |  Branch (32359:9): [True: 1.18k, False: 40.1k]
  ------------------
32360|  1.18k|        return negative ? -0.0 : 0.0;
  ------------------
  |  Branch (32360:16): [True: 1.16k, False: 25]
  ------------------
32361|       |
32362|       |    /* Final value is X = mant * base ^ exponent * 2 ^ exponent2
32363|       |     * Get exponent to zero while holding X constant. */
32364|       |
32365|       |    /* Positive exponents are simple */
32366|   108k|    for (; exponent > 3; exponent -= 4) bignat_muladd(mant, base * base * base * base, 0);
  ------------------
  |  Branch (32366:12): [True: 68.5k, False: 40.1k]
  ------------------
32367|  42.1k|    for (; exponent > 1; exponent -= 2) bignat_muladd(mant, base * base, 0);
  ------------------
  |  Branch (32367:12): [True: 1.94k, False: 40.1k]
  ------------------
32368|  42.1k|    for (; exponent > 0; exponent -= 1) bignat_muladd(mant, base, 0);
  ------------------
  |  Branch (32368:12): [True: 2.00k, False: 40.1k]
  ------------------
32369|       |
32370|       |    /* Negative exponents are tricky - we don't want to loose bits
32371|       |     * from integer division, so we need to premultiply. */
32372|  40.1k|    if (exponent < 0) {
  ------------------
  |  Branch (32372:9): [True: 2.66k, False: 37.5k]
  ------------------
32373|  2.66k|        int32_t shamt = 5 - exponent / 4;
32374|  2.66k|        bignat_lshift_n(mant, shamt);
32375|  2.66k|        exponent2 -= shamt * BIGNAT_NBIT;
  ------------------
  |  |32203|  2.66k|#define BIGNAT_NBIT 31
  ------------------
32376|  8.53k|        for (; exponent < -3; exponent += 4) bignat_div(mant, base * base * base * base);
  ------------------
  |  Branch (32376:16): [True: 5.87k, False: 2.66k]
  ------------------
32377|  3.73k|        for (; exponent < -1; exponent += 2) bignat_div(mant, base * base);
  ------------------
  |  Branch (32377:16): [True: 1.07k, False: 2.66k]
  ------------------
32378|  4.13k|        for (; exponent <  0; exponent += 1) bignat_div(mant, base);
  ------------------
  |  Branch (32378:16): [True: 1.47k, False: 2.66k]
  ------------------
32379|  2.66k|    }
32380|       |
32381|  40.1k|    return negative
  ------------------
  |  Branch (32381:12): [True: 2.86k, False: 37.3k]
  ------------------
32382|  40.1k|           ? -bignat_extract(mant, exponent2)
32383|  40.1k|           : bignat_extract(mant, exponent2);
32384|  41.3k|}
janet.c:bignat_lshift_n:
32279|  2.66k|static void bignat_lshift_n(struct BigNat *mant, int n) {
32280|  2.66k|    if (!n) return;
  ------------------
  |  Branch (32280:9): [True: 0, False: 2.66k]
  ------------------
32281|  2.66k|    int32_t oldn = mant->n;
32282|  2.66k|    bignat_extra(mant, n);
32283|  2.66k|    memmove(mant->digits + n, mant->digits, sizeof(uint32_t) * oldn);
32284|  2.66k|    memset(mant->digits, 0, sizeof(uint32_t) * (n - 1));
32285|  2.66k|    mant->digits[n - 1] = mant->first_digit;
32286|  2.66k|    mant->first_digit = 0;
32287|  2.66k|}
janet.c:bignat_div:
32261|  8.42k|static void bignat_div(struct BigNat *mant, uint32_t divisor) {
32262|  8.42k|    int32_t i;
32263|  8.42k|    uint32_t quotient, remainder;
32264|  8.42k|    uint64_t dividend;
32265|  8.42k|    remainder = 0, quotient = 0;
32266|   965k|    for (i = mant->n - 1; i >= 0; i--) {
  ------------------
  |  Branch (32266:27): [True: 956k, False: 8.42k]
  ------------------
32267|   956k|        dividend = ((uint64_t)remainder * BIGNAT_BASE) + mant->digits[i];
  ------------------
  |  |32204|   956k|#define BIGNAT_BASE 0x80000000U
  ------------------
32268|   956k|        if (i < mant->n - 1) mant->digits[i + 1] = quotient;
  ------------------
  |  Branch (32268:13): [True: 948k, False: 8.42k]
  ------------------
32269|   956k|        quotient = (uint32_t)(dividend / divisor);
32270|   956k|        remainder = (uint32_t)(dividend % divisor);
32271|   956k|        mant->digits[i] = remainder;
32272|   956k|    }
32273|  8.42k|    dividend = ((uint64_t)remainder * BIGNAT_BASE) + mant->first_digit;
  ------------------
  |  |32204|  8.42k|#define BIGNAT_BASE 0x80000000U
  ------------------
32274|  8.42k|    if (mant->n && mant->digits[mant->n - 1] == 0) mant->n--;
  ------------------
  |  Branch (32274:9): [True: 8.42k, False: 0]
  |  Branch (32274:20): [True: 3.66k, False: 4.75k]
  ------------------
32275|  8.42k|    mant->first_digit = (uint32_t)(dividend / divisor);
32276|  8.42k|}
janet.c:bignat_extract:
32304|  40.1k|static double bignat_extract(struct BigNat *mant, int32_t exponent2) {
32305|  40.1k|    uint64_t top53;
32306|  40.1k|    int32_t n = mant->n;
32307|       |    /* Get most significant 53 bits from mant. Bit 52 (0 indexed) should
32308|       |     * always be 1. This is essentially a large right shift on mant.*/
32309|  40.1k|    if (n) {
  ------------------
  |  Branch (32309:9): [True: 7.36k, False: 32.8k]
  ------------------
32310|       |        /* Two or more digits */
32311|  7.36k|        uint64_t d1 = mant->digits[n - 1]; /* MSD (non-zero) */
32312|  7.36k|        uint64_t d2 = (n == 1) ? mant->first_digit : mant->digits[n - 2];
  ------------------
  |  Branch (32312:23): [True: 1.93k, False: 5.42k]
  ------------------
32313|  7.36k|        uint64_t d3 = (n > 2) ? mant->digits[n - 3] : (n == 2) ? mant->first_digit : 0;
  ------------------
  |  Branch (32313:23): [True: 4.55k, False: 2.80k]
  |  Branch (32313:55): [True: 871, False: 1.93k]
  ------------------
32314|  7.36k|        int lz = clz((uint32_t) d1);
  ------------------
  |  |32290|  7.36k|#define clz(x) __builtin_clz(x)
  ------------------
32315|  7.36k|        int nbits = 32 - lz;
32316|       |        /* First get 54 bits */
32317|  7.36k|        top53 = (d2 << (54 - BIGNAT_NBIT)) + (d3 >> (2 * BIGNAT_NBIT - 54));
  ------------------
  |  |32203|  7.36k|#define BIGNAT_NBIT 31
  ------------------
                      top53 = (d2 << (54 - BIGNAT_NBIT)) + (d3 >> (2 * BIGNAT_NBIT - 54));
  ------------------
  |  |32203|  7.36k|#define BIGNAT_NBIT 31
  ------------------
32318|  7.36k|        top53 >>= nbits;
32319|  7.36k|        top53 |= (d1 << (54 - nbits));
32320|       |        /* Rounding based on lowest bit of 54 */
32321|  7.36k|        if (top53 & 1) top53++;
  ------------------
  |  Branch (32321:13): [True: 2.66k, False: 4.69k]
  ------------------
32322|  7.36k|        top53 >>= 1;
32323|  7.36k|        if (top53 > 0x1FffffFFFFffffUL) {
  ------------------
  |  Branch (32323:13): [True: 200, False: 7.16k]
  ------------------
32324|    200|            top53 >>= 1;
32325|    200|            exponent2++;
32326|    200|        }
32327|       |        /* Correct exponent - to correct for large right shift to mantissa. */
32328|  7.36k|        exponent2 += (nbits - 53) + BIGNAT_NBIT * n;
  ------------------
  |  |32203|  7.36k|#define BIGNAT_NBIT 31
  ------------------
32329|  32.8k|    } else {
32330|       |        /* One digit */
32331|  32.8k|        top53 = mant->first_digit;
32332|  32.8k|    }
32333|  40.1k|    return ldexp((double)top53, exponent2);
32334|  40.1k|}
janet.c:scan_uint64:
32544|  6.73k|    int *neg) {
32545|  6.73k|    const uint8_t *end = str + len;
32546|  6.73k|    int seenadigit = 0;
32547|  6.73k|    int base = 10;
32548|  6.73k|    *neg = 0;
32549|  6.73k|    *out = 0;
32550|  6.73k|    uint64_t accum = 0;
32551|  6.73k|    if (len > JANET_NUMBER_LENGTH_RIDICULOUS) return 0;
  ------------------
  |  |32188|  6.73k|#define JANET_NUMBER_LENGTH_RIDICULOUS 0xFFFF
  ------------------
  |  Branch (32551:9): [True: 1, False: 6.73k]
  ------------------
32552|       |    /* Get sign */
32553|  6.73k|    if (str >= end) return 0;
  ------------------
  |  Branch (32553:9): [True: 4, False: 6.72k]
  ------------------
32554|  6.72k|    if (*str == '-') {
  ------------------
  |  Branch (32554:9): [True: 1.82k, False: 4.90k]
  ------------------
32555|  1.82k|        *neg = 1;
32556|  1.82k|        str++;
32557|  4.90k|    } else if (*str == '+') {
  ------------------
  |  Branch (32557:16): [True: 23, False: 4.88k]
  ------------------
32558|     23|        str++;
32559|     23|    }
32560|       |    /* Check for leading 0x or digit digit r */
32561|  6.72k|    if (str + 1 < end && str[0] == '0' && str[1] == 'x') {
  ------------------
  |  Branch (32561:9): [True: 3.73k, False: 2.98k]
  |  Branch (32561:26): [True: 1.62k, False: 2.11k]
  |  Branch (32561:43): [True: 9, False: 1.61k]
  ------------------
32562|      9|        base = 16;
32563|      9|        str += 2;
32564|  6.71k|    } else if (str + 1 < end  &&
  ------------------
  |  Branch (32564:16): [True: 3.73k, False: 2.98k]
  ------------------
32565|  3.73k|               str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (32565:16): [True: 2.80k, False: 930]
  |  Branch (32565:33): [True: 2.77k, False: 28]
  ------------------
32566|  2.77k|               str[1] == 'r') {
  ------------------
  |  Branch (32566:16): [True: 0, False: 2.77k]
  ------------------
32567|      0|        base = str[0] - '0';
32568|      0|        str += 2;
32569|  6.71k|    } else if (str + 2 < end  &&
  ------------------
  |  Branch (32569:16): [True: 3.18k, False: 3.53k]
  ------------------
32570|  3.18k|               str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (32570:16): [True: 2.73k, False: 453]
  |  Branch (32570:33): [True: 2.71k, False: 24]
  ------------------
32571|  2.71k|               str[1] >= '0' && str[1] <= '9' &&
  ------------------
  |  Branch (32571:16): [True: 2.70k, False: 2]
  |  Branch (32571:33): [True: 2.66k, False: 40]
  ------------------
32572|  2.66k|               str[2] == 'r') {
  ------------------
  |  Branch (32572:16): [True: 10, False: 2.65k]
  ------------------
32573|     10|        base = 10 * (str[0] - '0') + (str[1] - '0');
32574|     10|        if (base < 2 || base > 36) return 0;
  ------------------
  |  Branch (32574:13): [True: 0, False: 10]
  |  Branch (32574:25): [True: 0, False: 10]
  ------------------
32575|     10|        str += 3;
32576|     10|    }
32577|       |
32578|       |    /* Skip leading zeros */
32579|  10.5k|    while (str < end && *str == '0') {
  ------------------
  |  Branch (32579:12): [True: 9.41k, False: 1.14k]
  |  Branch (32579:25): [True: 3.82k, False: 5.58k]
  ------------------
32580|  3.82k|        seenadigit = 1;
32581|  3.82k|        str++;
32582|  3.82k|    }
32583|       |    /* Parse significant digits */
32584|  18.5k|    while (str < end) {
  ------------------
  |  Branch (32584:12): [True: 13.0k, False: 5.49k]
  ------------------
32585|  13.0k|        if (*str == '_') {
  ------------------
  |  Branch (32585:13): [True: 620, False: 12.4k]
  ------------------
32586|    620|            if (!seenadigit) return 0;
  ------------------
  |  Branch (32586:17): [True: 1, False: 619]
  ------------------
32587|  12.4k|        } else {
32588|  12.4k|            int digit = digit_lookup[*str & 0x7F];
32589|  12.4k|            if (*str > 127 || digit >= base) return 0;
  ------------------
  |  Branch (32589:17): [True: 5, False: 12.4k]
  |  Branch (32589:31): [True: 1.20k, False: 11.2k]
  ------------------
32590|  11.2k|            if (accum > (UINT64_MAX - digit) / base) return 0;
  ------------------
  |  Branch (32590:17): [True: 15, False: 11.2k]
  ------------------
32591|  11.2k|            accum = accum * base + digit;
32592|  11.2k|            seenadigit = 1;
32593|  11.2k|        }
32594|  11.8k|        str++;
32595|  11.8k|    }
32596|       |
32597|  5.49k|    if (!seenadigit) return 0;
  ------------------
  |  Branch (32597:9): [True: 571, False: 4.92k]
  ------------------
32598|  4.92k|    *out = accum;
32599|  4.92k|    return 1;
32600|  5.49k|}
janet.c:janet_symcache_findmem:
33082|   229M|    int *success) {
33083|   229M|    uint32_t bounds[4];
33084|   229M|    uint32_t i, j, index;
33085|   229M|    const uint8_t **firstEmpty = NULL;
33086|       |
33087|       |    /* We will search two ranges - index to the end,
33088|       |     * and 0 to the index. */
33089|   229M|    index = (uint32_t)hash & (janet_vm.cache_capacity - 1);
33090|   229M|    bounds[0] = index;
33091|   229M|    bounds[1] = janet_vm.cache_capacity;
33092|   229M|    bounds[2] = 0;
33093|   229M|    bounds[3] = index;
33094|  18.4E|    for (j = 0; j < 4; j += 2)
  ------------------
  |  Branch (33094:17): [True: 229M, False: 18.4E]
  ------------------
33095|   272M|        for (i = bounds[j]; i < bounds[j + 1]; ++i) {
  ------------------
  |  Branch (33095:29): [True: 272M, False: 18.4E]
  ------------------
33096|   272M|            const uint8_t *test = janet_vm.cache[i];
33097|       |            /* Check empty spots */
33098|   272M|            if (NULL == test) {
  ------------------
  |  Branch (33098:17): [True: 46.6M, False: 225M]
  ------------------
33099|  46.6M|                if (NULL == firstEmpty)
  ------------------
  |  Branch (33099:21): [True: 46.5M, False: 132k]
  ------------------
33100|  46.5M|                    firstEmpty = janet_vm.cache + i;
33101|  46.6M|                goto notfound;
33102|  46.6M|            }
33103|       |            /* Check for marked deleted */
33104|   225M|            if (JANET_SYMCACHE_DELETED == test) {
  ------------------
  |  Branch (33104:17): [True: 376k, False: 224M]
  ------------------
33105|   376k|                if (firstEmpty == NULL)
  ------------------
  |  Branch (33105:21): [True: 236k, False: 139k]
  ------------------
33106|   236k|                    firstEmpty = janet_vm.cache + i;
33107|   376k|                continue;
33108|   376k|            }
33109|   224M|            if (janet_string_equalconst(test, str, len, hash)) {
  ------------------
  |  Branch (33109:17): [True: 182M, False: 42.2M]
  ------------------
33110|       |                /* Replace first deleted */
33111|   182M|                *success = 1;
33112|   182M|                if (firstEmpty != NULL) {
  ------------------
  |  Branch (33112:21): [True: 104k, False: 182M]
  ------------------
33113|   104k|                    *firstEmpty = test;
33114|   104k|                    janet_vm.cache[i] = JANET_SYMCACHE_DELETED;
33115|   104k|                    return firstEmpty;
33116|   104k|                }
33117|   182M|                return janet_vm.cache + i;
33118|   182M|            }
33119|   224M|        }
33120|  18.4E|notfound:
33121|  46.6M|    *success = 0;
33122|  46.6M|    janet_assert(firstEmpty != NULL, "symcache failed to get memory");
  ------------------
  |  |  386|  46.6M|#define janet_assert(c, m) do { \
  |  |  387|  46.6M|    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.6M]
  |  |  ------------------
  |  |  388|  46.6M|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 46.6M]
  |  |  ------------------
  ------------------
33123|  46.6M|    return firstEmpty;
33124|  46.6M|}
janet.c:janet_symcache_put:
33160|  21.6M|static void janet_symcache_put(const uint8_t *x, const uint8_t **bucket) {
33161|  21.6M|    if ((janet_vm.cache_count + janet_vm.cache_deleted) * 2 > janet_vm.cache_capacity) {
  ------------------
  |  Branch (33161:9): [True: 17.8k, False: 21.6M]
  ------------------
33162|  17.8k|        int status;
33163|  17.8k|        janet_cache_resize(janet_tablen((2 * janet_vm.cache_count + 1)));
33164|  17.8k|        bucket = janet_symcache_find(x, &status);
  ------------------
  |  |33127|  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)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33165|  17.8k|    }
33166|       |    /* Add x to the cache */
33167|  21.6M|    janet_vm.cache_count++;
33168|  21.6M|    *bucket = x;
33169|  21.6M|}
janet.c:janet_cache_resize:
33130|  17.8k|static void janet_cache_resize(uint32_t newCapacity) {
33131|  17.8k|    uint32_t i, oldCapacity;
33132|  17.8k|    const uint8_t **oldCache = janet_vm.cache;
33133|  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))
  ------------------
33134|  17.8k|    if (newCache == NULL) {
  ------------------
  |  Branch (33134:9): [True: 0, False: 17.8k]
  ------------------
33135|      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]
  |  |  ------------------
  ------------------
33136|      0|    }
33137|  17.8k|    oldCapacity = janet_vm.cache_capacity;
33138|  17.8k|    janet_vm.cache = newCache;
33139|  17.8k|    janet_vm.cache_capacity = newCapacity;
33140|  17.8k|    janet_vm.cache_deleted = 0;
33141|       |    /* Add all of the old cache entries back */
33142|  51.3M|    for (i = 0; i < oldCapacity; ++i) {
  ------------------
  |  Branch (33142:17): [True: 51.3M, False: 17.8k]
  ------------------
33143|  51.3M|        int status;
33144|  51.3M|        const uint8_t **bucket;
33145|  51.3M|        const uint8_t *x = oldCache[i];
33146|  51.3M|        if (x != NULL && x != JANET_SYMCACHE_DELETED) {
  ------------------
  |  Branch (33146:13): [True: 25.5M, False: 25.7M]
  |  Branch (33146:26): [True: 25.0M, False: 526k]
  ------------------
33147|  25.0M|            bucket = janet_symcache_find(x, &status);
  ------------------
  |  |33127|  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)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33148|  25.0M|            if (status || bucket == NULL) {
  ------------------
  |  Branch (33148:17): [True: 18.4E, False: 25.0M]
  |  Branch (33148:27): [True: 18.4E, False: 25.0M]
  ------------------
33149|       |                /* there was a problem with the algorithm. */
33150|      0|                break;
33151|      0|            }
33152|  25.0M|            *bucket = x;
33153|  25.0M|        }
33154|  51.3M|    }
33155|       |    /* Free the old cache */
33156|  17.8k|    janet_free((void *)oldCache);
  ------------------
  |  | 2402|  17.8k|#define janet_free(X) free((X))
  ------------------
33157|  17.8k|}
janet.c:inc_gensym:
33206|  1.51M|static void inc_gensym(void) {
33207|  1.53M|    for (int i = sizeof(janet_vm.gensym_counter) - 2; i; i--) {
  ------------------
  |  Branch (33207:55): [True: 1.53M, False: 0]
  ------------------
33208|  1.53M|        if (janet_vm.gensym_counter[i] == '9') {
  ------------------
  |  Branch (33208:13): [True: 25.5k, False: 1.50M]
  ------------------
33209|  25.5k|            janet_vm.gensym_counter[i] = 'a';
33210|  25.5k|            break;
33211|  1.50M|        } else if (janet_vm.gensym_counter[i] == 'z') {
  ------------------
  |  Branch (33211:20): [True: 24.3k, False: 1.48M]
  ------------------
33212|  24.3k|            janet_vm.gensym_counter[i] = 'A';
33213|  24.3k|            break;
33214|  1.48M|        } else if (janet_vm.gensym_counter[i] == 'Z') {
  ------------------
  |  Branch (33214:20): [True: 22.8k, False: 1.46M]
  ------------------
33215|  22.8k|            janet_vm.gensym_counter[i] = '0';
33216|  1.46M|        } else {
33217|  1.46M|            janet_vm.gensym_counter[i]++;
33218|  1.46M|            break;
33219|  1.46M|        }
33220|  1.53M|    }
33221|  1.51M|}
janet.c:janet_table_init_impl:
33301|  5.79M|static JanetTable *janet_table_init_impl(JanetTable *table, int32_t capacity, int stackalloc) {
33302|  5.79M|    JanetKV *data;
33303|  5.79M|    capacity = janet_tablen(capacity);
33304|  5.79M|    if (stackalloc) table->gc.flags = JANET_TABLE_FLAG_STACK;
  ------------------
  |  |33287|  18.7k|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
  |  Branch (33304:9): [True: 18.7k, False: 5.77M]
  ------------------
33305|  5.79M|    if (capacity) {
  ------------------
  |  Branch (33305:9): [True: 5.79M, False: 17]
  ------------------
33306|  5.79M|        if (stackalloc) {
  ------------------
  |  Branch (33306:13): [True: 18.7k, False: 5.77M]
  ------------------
33307|  18.7k|            data = janet_memalloc_empty_local(capacity);
33308|  5.77M|        } else {
33309|  5.77M|            data = (JanetKV *) janet_memalloc_empty(capacity);
33310|  5.77M|            if (NULL == data) {
  ------------------
  |  Branch (33310:17): [True: 0, False: 5.77M]
  ------------------
33311|      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]
  |  |  ------------------
  ------------------
33312|      0|            }
33313|  5.77M|        }
33314|  5.79M|        table->data = data;
33315|  5.79M|        table->capacity = capacity;
33316|  5.79M|    } else {
33317|     17|        table->data = NULL;
33318|     17|        table->capacity = 0;
33319|     17|    }
33320|  5.79M|    table->count = 0;
33321|  5.79M|    table->deleted = 0;
33322|       |    table->proto = NULL;
33323|  5.79M|    return table;
33324|  5.79M|}
janet.c:janet_memalloc_empty_local:
33289|  53.8k|static void *janet_memalloc_empty_local(int32_t count) {
33290|  53.8k|    int32_t i;
33291|  53.8k|    void *mem = janet_smalloc((size_t) count * sizeof(JanetKV));
33292|  53.8k|    JanetKV *mmem = (JanetKV *)mem;
33293|  16.5M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (33293:17): [True: 16.5M, False: 53.8k]
  ------------------
33294|  16.5M|        JanetKV *kv = mmem + i;
33295|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33296|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33297|  16.5M|    }
33298|  53.8k|    return mem;
33299|  53.8k|}
janet.c:janet_table_rehash:
33374|  4.56M|static void janet_table_rehash(JanetTable *t, int32_t size) {
33375|  4.56M|    JanetKV *olddata = t->data;
33376|  4.56M|    JanetKV *newdata;
33377|  4.56M|    int islocal = t->gc.flags & JANET_TABLE_FLAG_STACK;
  ------------------
  |  |33287|  4.56M|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
33378|  4.56M|    if (islocal) {
  ------------------
  |  Branch (33378:9): [True: 35.1k, False: 4.53M]
  ------------------
33379|  35.1k|        newdata = (JanetKV *) janet_memalloc_empty_local(size);
33380|  4.53M|    } else {
33381|  4.53M|        newdata = (JanetKV *) janet_memalloc_empty(size);
33382|  4.53M|        if (NULL == newdata) {
  ------------------
  |  Branch (33382:13): [True: 0, False: 4.53M]
  ------------------
33383|      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]
  |  |  ------------------
  ------------------
33384|      0|        }
33385|  4.53M|    }
33386|  4.56M|    int32_t oldcapacity = t->capacity;
33387|  4.56M|    t->data = newdata;
33388|  4.56M|    t->capacity = size;
33389|  4.56M|    t->deleted = 0;
33390|  63.5M|    for (int32_t i = 0; i < oldcapacity; i++) {
  ------------------
  |  Branch (33390:25): [True: 59.0M, False: 4.56M]
  ------------------
33391|  59.0M|        JanetKV *kv = olddata + i;
33392|  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 (33392:13): [True: 29.1M, False: 29.8M]
  ------------------
33393|  29.1M|            JanetKV *newkv = janet_table_find(t, kv->key);
33394|  29.1M|            *newkv = *kv;
33395|  29.1M|        }
33396|  59.0M|    }
33397|  4.56M|    if (islocal) {
  ------------------
  |  Branch (33397:9): [True: 35.1k, False: 4.53M]
  ------------------
33398|  35.1k|        janet_sfree(olddata);
33399|  4.53M|    } else {
33400|  4.53M|        janet_free(olddata);
  ------------------
  |  | 2402|  4.53M|#define janet_free(X) free((X))
  ------------------
33401|  4.53M|    }
33402|  4.56M|}
janet.c:janet_table_mergekv:
33528|     27|static void janet_table_mergekv(JanetTable *table, const JanetKV *kvs, int32_t cap) {
33529|     27|    int32_t i;
33530|    186|    for (i = 0; i < cap; i++) {
  ------------------
  |  Branch (33530:17): [True: 159, False: 27]
  ------------------
33531|    159|        const JanetKV *kv = kvs + i;
33532|    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 (33532:13): [True: 38, False: 121]
  ------------------
33533|     38|            janet_table_put(table, kv->key, kv->value);
33534|     38|        }
33535|    159|    }
33536|     27|}
janet.c:janet_registry_sort:
34351|  1.26k|static void janet_registry_sort(void) {
34352|   443k|    for (size_t i = 1; i < janet_vm.registry_count; i++) {
  ------------------
  |  Branch (34352:24): [True: 442k, False: 1.26k]
  ------------------
34353|   442k|        JanetCFunRegistry reg = janet_vm.registry[i];
34354|   442k|        size_t j;
34355|  31.1M|        for (j = i; j > 0; j--) {
  ------------------
  |  Branch (34355:21): [True: 31.1M, False: 3.78k]
  ------------------
34356|  31.1M|            if ((void *)(janet_vm.registry[j - 1].cfun) < (void *)(reg.cfun)) break;
  ------------------
  |  Branch (34356:17): [True: 438k, False: 30.7M]
  ------------------
34357|  30.7M|            janet_vm.registry[j] = janet_vm.registry[j - 1];
34358|  30.7M|        }
34359|   442k|        janet_vm.registry[j] = reg;
34360|   442k|    }
34361|  1.26k|    janet_vm.registry_dirty = 0;
34362|  1.26k|}
janet.c:janet_check_pointer_align:
34452|  2.58M|static void janet_check_pointer_align(void *p) {
34453|  2.58M|    (void) p;
34454|       |#if defined(JANET_NANBOX_64) && JANET_NANBOX_64_POINTER_SHIFT != 0
34455|       |    union {
34456|       |        void *p;
34457|       |        uintptr_t u;
34458|       |    } un;
34459|       |    un.p = p;
34460|       |    janet_assert(!(un.u & (uintptr_t) ((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)),
34461|       |                 "unaligned pointer wrap - cfunction pointers and abstract types must be aligned with this nanboxing configuration.");
34462|       |#endif
34463|  2.58M|}
janet.c:to_byte_view:
34627|      3|static JanetByteView to_byte_view(Janet value) {
34628|      3|    JanetByteView result;
34629|      3|    if (!janet_bytes_view(value, &result.bytes, &result.len)) {
  ------------------
  |  Branch (34629:9): [True: 3, False: 0]
  ------------------
34630|      3|        JanetString str = janet_to_string(value);
34631|      3|        result.bytes = str;
34632|       |        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)))
  |  |  ------------------
  ------------------
34633|      3|    }
34634|      3|    return result;
34635|      3|}
janet.c:memoize_byte_view:
34616|    383|static JanetByteView memoize_byte_view(Janet *value) {
34617|    383|    JanetByteView result;
34618|    383|    if (!janet_bytes_view(*value, &result.bytes, &result.len)) {
  ------------------
  |  Branch (34618:9): [True: 31, False: 352]
  ------------------
34619|     31|        JanetString str = janet_to_string(*value);
34620|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34621|     31|        result.bytes = str;
34622|       |        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)))
  |  |  ------------------
  ------------------
34623|     31|    }
34624|    383|    return result;
34625|    383|}
janet.c:janet_compare_abstract:
35315|  9.09k|static int janet_compare_abstract(JanetAbstract xx, JanetAbstract yy) {
35316|  9.09k|    if (xx == yy) return 0;
  ------------------
  |  Branch (35316:9): [True: 5.58k, False: 3.51k]
  ------------------
35317|  3.51k|    const JanetAbstractType *xt = janet_abstract_type(xx);
  ------------------
  |  | 1889|  3.51k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|  3.51k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35318|  3.51k|    const JanetAbstractType *yt = janet_abstract_type(yy);
  ------------------
  |  | 1889|  3.51k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|  3.51k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35319|  3.51k|    if (xt != yt) {
  ------------------
  |  Branch (35319:9): [True: 849, False: 2.66k]
  ------------------
35320|    849|        return xt > yt ? 1 : -1;
  ------------------
  |  Branch (35320:16): [True: 673, False: 176]
  ------------------
35321|    849|    }
35322|  2.66k|    if (xt->compare == NULL) {
  ------------------
  |  Branch (35322:9): [True: 102, False: 2.56k]
  ------------------
35323|    102|        return xx > yy ? 1 : -1;
  ------------------
  |  Branch (35323:16): [True: 25, False: 77]
  ------------------
35324|    102|    }
35325|  2.56k|    return xt->compare(xx, yy);
35326|  2.66k|}
janet.c:push_traversal_node:
35113|   328k|static void push_traversal_node(void *lhs, void *rhs, int32_t index2) {
35114|   328k|    JanetTraversalNode node;
35115|   328k|    node.self = (JanetGCObject *) lhs;
35116|   328k|    node.other = (JanetGCObject *) rhs;
35117|   328k|    node.index = 0;
35118|   328k|    node.index2 = index2;
35119|   328k|    int is_new = janet_vm.traversal_base == NULL;
35120|   328k|    if (is_new || (janet_vm.traversal + 1 >= janet_vm.traversal_top)) {
  ------------------
  |  Branch (35120:9): [True: 855, False: 327k]
  |  Branch (35120:19): [True: 25, False: 327k]
  ------------------
35121|    880|        size_t oldsize = is_new ? 0 : (janet_vm.traversal - janet_vm.traversal_base);
  ------------------
  |  Branch (35121:26): [True: 855, False: 25]
  ------------------
35122|    880|        size_t newsize = 2 * oldsize + 1;
35123|    880|        if (newsize < 128) {
  ------------------
  |  Branch (35123:13): [True: 855, False: 25]
  ------------------
35124|    855|            newsize = 128;
35125|    855|        }
35126|    880|        JanetTraversalNode *tn = janet_realloc(janet_vm.traversal_base, newsize * sizeof(JanetTraversalNode));
  ------------------
  |  | 2396|    880|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
35127|    880|        if (tn == NULL) {
  ------------------
  |  Branch (35127:13): [True: 0, False: 880]
  ------------------
35128|      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]
  |  |  ------------------
  ------------------
35129|      0|        }
35130|    880|        janet_vm.traversal_base = tn;
35131|    880|        janet_vm.traversal_top = janet_vm.traversal_base + newsize;
35132|    880|        janet_vm.traversal = janet_vm.traversal_base + oldsize;
35133|    880|    }
35134|   328k|    *(++janet_vm.traversal) = node;
35135|   328k|}
janet.c:traversal_next:
35145|   150M|static int traversal_next(Janet *x, Janet *y) {
35146|   150M|    JanetTraversalNode *t = janet_vm.traversal;
35147|   150M|    while (t && t > janet_vm.traversal_base) {
  ------------------
  |  Branch (35147:12): [True: 15.6M, False: 134M]
  |  Branch (35147:17): [True: 1.00M, False: 14.6M]
  ------------------
35148|  1.00M|        JanetGCObject *self = t->self;
35149|  1.00M|        JanetTupleHead *tself = (JanetTupleHead *)self;
35150|  1.00M|        JanetStructHead *sself = (JanetStructHead *)self;
35151|  1.00M|        JanetGCObject *other = t->other;
35152|  1.00M|        JanetTupleHead *tother = (JanetTupleHead *)other;
35153|  1.00M|        JanetStructHead *sother = (JanetStructHead *)other;
35154|  1.00M|        if ((self->flags & JANET_MEM_TYPEBITS) == JANET_MEMORY_TUPLE) {
  ------------------
  |  |  624|  1.00M|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
  |  Branch (35154:13): [True: 944k, False: 62.7k]
  ------------------
35155|       |            /* Node is a tuple at index t->index */
35156|   944k|            if (t->index < tself->length && t->index < tother->length) {
  ------------------
  |  Branch (35156:17): [True: 636k, False: 307k]
  |  Branch (35156:45): [True: 636k, False: 27]
  ------------------
35157|   636k|                int32_t index = t->index++;
35158|   636k|                *x = tself->data[index];
35159|   636k|                *y = tother->data[index];
35160|   636k|                janet_vm.traversal = t;
35161|   636k|                return 0;
35162|   636k|            }
35163|   307k|            if (t->index2 && tself->length != tother->length) {
  ------------------
  |  Branch (35163:17): [True: 28.9k, False: 278k]
  |  Branch (35163:30): [True: 145, False: 28.7k]
  ------------------
35164|    145|                return tself->length > tother->length ? 3 : 1;
  ------------------
  |  Branch (35164:24): [True: 27, False: 118]
  ------------------
35165|    145|            }
35166|   307k|        } else {
35167|       |            /* Node is a struct at index t->index: if t->index2 is true, we should return the values. */
35168|  62.7k|            if (t->index2) {
  ------------------
  |  Branch (35168:17): [True: 28.3k, False: 34.3k]
  ------------------
35169|  28.3k|                t->index2 = 0;
35170|  28.3k|                int32_t index = t->index++;
35171|  28.3k|                *x = sself->data[index].value;
35172|  28.3k|                *y = sother->data[index].value;
35173|  28.3k|                janet_vm.traversal = t;
35174|  28.3k|                return 0;
35175|  28.3k|            }
35176|  34.3k|            for (int32_t i = t->index; i < sself->capacity; i++) {
  ------------------
  |  Branch (35176:40): [True: 28.3k, False: 5.95k]
  ------------------
35177|  28.3k|                t->index2 = 1;
35178|  28.3k|                *x = sself->data[t->index].key;
35179|  28.3k|                *y = sother->data[t->index].key;
35180|  28.3k|                janet_vm.traversal = t;
35181|  28.3k|                return 0;
35182|  28.3k|            }
35183|       |            /* Traverse prototype */
35184|  5.95k|            JanetStruct sproto = sself->proto;
35185|  5.95k|            JanetStruct oproto = sother->proto;
35186|  5.95k|            if (sproto && !oproto) return 3;
  ------------------
  |  Branch (35186:17): [True: 0, False: 5.95k]
  |  Branch (35186:27): [True: 0, False: 0]
  ------------------
35187|  5.95k|            if (!sproto && oproto) return 1;
  ------------------
  |  Branch (35187:17): [True: 5.95k, False: 0]
  |  Branch (35187:28): [True: 0, False: 5.95k]
  ------------------
35188|  5.95k|            if (oproto && sproto) {
  ------------------
  |  Branch (35188:17): [True: 0, False: 5.95k]
  |  Branch (35188:27): [True: 0, False: 0]
  ------------------
35189|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35190|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35191|      0|                janet_vm.traversal = t - 1;
35192|      0|                return 0;
35193|      0|            }
35194|  5.95k|        }
35195|   313k|        t--;
35196|   313k|    }
35197|   149M|    janet_vm.traversal = t;
35198|   149M|    return 2;
35199|   150M|}
janet.c:murmur64:
35378|   165M|static uint64_t murmur64(uint64_t h) {
35379|   165M|    h ^= h >> 33;
35380|   165M|    h *= 0xff51afd7ed558ccdUL;
35381|   165M|    h ^= h >> 33;
35382|   165M|    h *= 0xc4ceb9fe1a85ec53UL;
35383|   165M|    h ^= h >> 33;
35384|   165M|    return h;
35385|   165M|}
janet.c:getter_checkint:
35521|  97.8M|static int32_t getter_checkint(JanetType type, Janet key, int32_t max) {
35522|  97.8M|    if (!janet_checkint(key)) goto bad;
  ------------------
  |  Branch (35522:9): [True: 6, False: 97.8M]
  ------------------
35523|  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)
  |  |  ------------------
  ------------------
35524|  97.8M|    if (ret < 0) goto bad;
  ------------------
  |  Branch (35524:9): [True: 2, False: 97.8M]
  ------------------
35525|  97.8M|    if (ret >= max) goto bad;
  ------------------
  |  Branch (35525:9): [True: 45, False: 97.8M]
  ------------------
35526|  97.8M|    return ret;
35527|     53|bad:
35528|     53|    janet_panicf("expected integer key for %s in range [0, %d), got %v", janet_type_names[type], max, key);
35529|  97.8M|}
janet.c:run_vm:
36305|   388k|static JanetSignal run_vm(JanetFiber *fiber, Janet in) {
36306|       |
36307|       |    /* opcode -> label lookup if using clang/GCC */
36308|   388k|#ifdef JANET_USE_COMPUTED_GOTOS
36309|   388k|    static void *op_lookup[255] = {
36310|   388k|        &&label_JOP_NOOP,
36311|   388k|        &&label_JOP_ERROR,
36312|   388k|        &&label_JOP_TYPECHECK,
36313|   388k|        &&label_JOP_RETURN,
36314|   388k|        &&label_JOP_RETURN_NIL,
36315|   388k|        &&label_JOP_ADD_IMMEDIATE,
36316|   388k|        &&label_JOP_ADD,
36317|   388k|        &&label_JOP_SUBTRACT_IMMEDIATE,
36318|   388k|        &&label_JOP_SUBTRACT,
36319|   388k|        &&label_JOP_MULTIPLY_IMMEDIATE,
36320|   388k|        &&label_JOP_MULTIPLY,
36321|   388k|        &&label_JOP_DIVIDE_IMMEDIATE,
36322|   388k|        &&label_JOP_DIVIDE,
36323|   388k|        &&label_JOP_DIVIDE_FLOOR,
36324|   388k|        &&label_JOP_MODULO,
36325|   388k|        &&label_JOP_REMAINDER,
36326|   388k|        &&label_JOP_BAND,
36327|   388k|        &&label_JOP_BOR,
36328|   388k|        &&label_JOP_BXOR,
36329|   388k|        &&label_JOP_BNOT,
36330|   388k|        &&label_JOP_SHIFT_LEFT,
36331|   388k|        &&label_JOP_SHIFT_LEFT_IMMEDIATE,
36332|   388k|        &&label_JOP_SHIFT_RIGHT,
36333|   388k|        &&label_JOP_SHIFT_RIGHT_IMMEDIATE,
36334|   388k|        &&label_JOP_SHIFT_RIGHT_UNSIGNED,
36335|   388k|        &&label_JOP_SHIFT_RIGHT_UNSIGNED_IMMEDIATE,
36336|   388k|        &&label_JOP_MOVE_FAR,
36337|   388k|        &&label_JOP_MOVE_NEAR,
36338|   388k|        &&label_JOP_JUMP,
36339|   388k|        &&label_JOP_JUMP_IF,
36340|   388k|        &&label_JOP_JUMP_IF_NOT,
36341|   388k|        &&label_JOP_JUMP_IF_NIL,
36342|   388k|        &&label_JOP_JUMP_IF_NOT_NIL,
36343|   388k|        &&label_JOP_GREATER_THAN,
36344|   388k|        &&label_JOP_GREATER_THAN_IMMEDIATE,
36345|   388k|        &&label_JOP_LESS_THAN,
36346|   388k|        &&label_JOP_LESS_THAN_IMMEDIATE,
36347|   388k|        &&label_JOP_EQUALS,
36348|   388k|        &&label_JOP_EQUALS_IMMEDIATE,
36349|   388k|        &&label_JOP_COMPARE,
36350|   388k|        &&label_JOP_LOAD_NIL,
36351|   388k|        &&label_JOP_LOAD_TRUE,
36352|   388k|        &&label_JOP_LOAD_FALSE,
36353|   388k|        &&label_JOP_LOAD_INTEGER,
36354|   388k|        &&label_JOP_LOAD_CONSTANT,
36355|   388k|        &&label_JOP_LOAD_UPVALUE,
36356|   388k|        &&label_JOP_LOAD_SELF,
36357|   388k|        &&label_JOP_SET_UPVALUE,
36358|   388k|        &&label_JOP_CLOSURE,
36359|   388k|        &&label_JOP_PUSH,
36360|   388k|        &&label_JOP_PUSH_2,
36361|   388k|        &&label_JOP_PUSH_3,
36362|   388k|        &&label_JOP_PUSH_ARRAY,
36363|   388k|        &&label_JOP_CALL,
36364|   388k|        &&label_JOP_TAILCALL,
36365|   388k|        &&label_JOP_RESUME,
36366|   388k|        &&label_JOP_SIGNAL,
36367|   388k|        &&label_JOP_PROPAGATE,
36368|   388k|        &&label_JOP_IN,
36369|   388k|        &&label_JOP_GET,
36370|   388k|        &&label_JOP_PUT,
36371|   388k|        &&label_JOP_GET_INDEX,
36372|   388k|        &&label_JOP_PUT_INDEX,
36373|   388k|        &&label_JOP_LENGTH,
36374|   388k|        &&label_JOP_MAKE_ARRAY,
36375|   388k|        &&label_JOP_MAKE_BUFFER,
36376|   388k|        &&label_JOP_MAKE_STRING,
36377|   388k|        &&label_JOP_MAKE_STRUCT,
36378|   388k|        &&label_JOP_MAKE_TABLE,
36379|   388k|        &&label_JOP_MAKE_TUPLE,
36380|   388k|        &&label_JOP_MAKE_BRACKET_TUPLE,
36381|   388k|        &&label_JOP_GREATER_THAN_EQUAL,
36382|   388k|        &&label_JOP_LESS_THAN_EQUAL,
36383|   388k|        &&label_JOP_NEXT,
36384|   388k|        &&label_JOP_NOT_EQUALS,
36385|   388k|        &&label_JOP_NOT_EQUALS_IMMEDIATE,
36386|   388k|        &&label_JOP_CANCEL,
36387|   388k|        &&label_unknown_op,
36388|   388k|        &&label_unknown_op,
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|    };
36566|   388k|#endif
36567|       |
36568|       |    /* Interpreter state */
36569|   388k|    register Janet *stack;
36570|   388k|    register uint32_t *pc;
36571|   388k|    register JanetFunction *func;
36572|       |
36573|   388k|    if (fiber->flags & JANET_FIBER_RESUME_SIGNAL) {
  ------------------
  |  |  780|   388k|#define JANET_FIBER_RESUME_SIGNAL 0x400000
  ------------------
  |  Branch (36573:9): [True: 0, False: 388k]
  ------------------
36574|      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
  ------------------
36575|      0|        fiber->gc.flags &= ~JANET_FIBER_STATUS_MASK;
  ------------------
  |  |  779|      0|#define JANET_FIBER_STATUS_MASK 0x3F0000
  ------------------
36576|      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
  ------------------
36577|      0|        janet_vm.return_reg[0] = in;
36578|      0|        return sig;
36579|      0|    }
36580|       |
36581|   388k|    vm_restore();
  ------------------
  |  |36029|   388k|#define vm_restore() do { \
  |  |36030|   388k|    stack = fiber->data + fiber->frame; \
  |  |36031|   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
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36032|   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
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36033|   388k|} while (0)
  |  |  ------------------
  |  |  |  Branch (36033:10): [Folded, False: 388k]
  |  |  ------------------
  ------------------
36582|       |
36583|   388k|    if (fiber->flags & JANET_FIBER_DID_LONGJUMP) {
  ------------------
  |  |  786|   388k|#define JANET_FIBER_DID_LONGJUMP     0x8000000
  ------------------
  |  Branch (36583:9): [True: 46, False: 388k]
  ------------------
36584|     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 (36584:13): [True: 46, False: 0]
  ------------------
36585|       |            /* Inside a c function */
36586|     46|            janet_fiber_popframe(fiber);
36587|     46|            vm_restore();
  ------------------
  |  |36029|     46|#define vm_restore() do { \
  |  |36030|     46|    stack = fiber->data + fiber->frame; \
  |  |36031|     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
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36032|     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
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36033|     46|} while (0)
  |  |  ------------------
  |  |  |  Branch (36033:10): [Folded, False: 46]
  |  |  ------------------
  ------------------
36588|     46|        }
36589|       |        /* Check if we were at a tail call instruction. If so, do implicit return */
36590|     46|        if ((*pc & 0xFF) == JOP_TAILCALL) {
  ------------------
  |  Branch (36590:13): [True: 40, False: 6]
  ------------------
36591|       |            /* Tail call resume */
36592|     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
  ------------------
36593|     40|            janet_fiber_popframe(fiber);
36594|     40|            if (entrance_frame) {
  ------------------
  |  Branch (36594:17): [True: 40, False: 0]
  ------------------
36595|     40|                fiber->flags &= ~JANET_FIBER_FLAG_MASK;
  ------------------
  |  |  787|     40|#define JANET_FIBER_FLAG_MASK        0xF000000
  ------------------
36596|     40|                vm_return(JANET_SIGNAL_OK, in);
  ------------------
  |  |36034|     40|#define vm_return(sig, val) do { \
  |  |36035|     40|    janet_vm.return_reg[0] = (val); \
  |  |36036|     40|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36028|     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 (36028:70): [Folded, False: 40]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36037|     40|    return (sig); \
  |  |36038|     40|} while (0)
  |  |  ------------------
  |  |  |  Branch (36038:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
36597|     40|            }
36598|      0|            vm_restore();
  ------------------
  |  |36029|      0|#define vm_restore() do { \
  |  |36030|      0|    stack = fiber->data + fiber->frame; \
  |  |36031|      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
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36032|      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
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36033|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36033:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
36599|      0|        }
36600|     46|    }
36601|       |
36602|   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;
  ------------------
  |  |35994|      6|#define A ((*pc >> 8)  & 0xFF)
  ------------------
  |  Branch (36602:9): [True: 6, False: 388k]
  ------------------
36603|   388k|    if (!(fiber->flags & JANET_FIBER_RESUME_NO_SKIP)) pc++;
  ------------------
  |  |  785|   388k|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  ------------------
  |  Branch (36603:9): [True: 6, False: 388k]
  ------------------
36604|       |
36605|   388k|    uint8_t first_opcode = *pc & ((fiber->flags & JANET_FIBER_BREAKPOINT) ? 0x7F : 0xFF);
  ------------------
  |  |  783|   388k|#define JANET_FIBER_BREAKPOINT       0x1000000
  ------------------
  |  Branch (36605:35): [True: 0, False: 388k]
  ------------------
36606|       |
36607|   388k|    fiber->flags &= ~JANET_FIBER_FLAG_MASK;
  ------------------
  |  |  787|   388k|#define JANET_FIBER_FLAG_MASK        0xF000000
  ------------------
36608|       |
36609|       |    /* Main interpreter loop. Semantically is a switch on
36610|       |     * (*pc & 0xFF) inside of an infinite loop. */
36611|   388k|    VM_START();
  ------------------
  |  |36013|   388k|#define VM_START() { goto *op_lookup[first_opcode];
  ------------------
36612|       |
36613|   388k|    VM_DEFAULT();
  ------------------
  |  |36016|      0|#define VM_DEFAULT() label_unknown_op:
  ------------------
36614|      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
  ------------------
36615|      0|    vm_return(JANET_SIGNAL_DEBUG, janet_wrap_nil());
  ------------------
  |  |36034|      0|#define vm_return(sig, val) do { \
  |  |36035|      0|    janet_vm.return_reg[0] = (val); \
  |  |36036|      0|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36037|      0|    return (sig); \
  |  |36038|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36038:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
36616|       |
36617|      0|    VM_OP(JOP_NOOP)
  ------------------
  |  |36015|      0|#define VM_OP(op) label_##op :
  ------------------
36618|      0|    vm_pcnext();
  ------------------
  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36619|       |
36620|    120|    VM_OP(JOP_ERROR)
  ------------------
  |  |36015|    120|#define VM_OP(op) label_##op :
  ------------------
36621|    120|    vm_return(JANET_SIGNAL_ERROR, stack[A]);
  ------------------
  |  |36034|    120|#define vm_return(sig, val) do { \
  |  |36035|    120|    janet_vm.return_reg[0] = (val); \
  |  |36036|    120|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36028|    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 (36028:70): [Folded, False: 120]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36037|    120|    return (sig); \
  |  |36038|    120|} while (0)
  |  |  ------------------
  |  |  |  Branch (36038:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
36622|       |
36623|      0|    VM_OP(JOP_TYPECHECK)
  ------------------
  |  |36015|      0|#define VM_OP(op) label_##op :
  ------------------
36624|      0|    vm_assert_types(stack[A], E);
  ------------------
  |  |36060|      0|#define vm_assert_types(X, TS) do { \
  |  |36061|      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 (36061:9): [True: 0, False: 0]
  |  |  ------------------
  |  |36062|      0|        vm_commit(); \
  |  |  ------------------
  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36063|      0|        janet_panicf("expected %T, got %v", (TS), (X)); \
  |  |36064|      0|    } \
  |  |36065|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36065:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (36624:5): [True: 0, False: 0]
  ------------------
36625|      0|    vm_pcnext();
  ------------------
  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36626|       |
36627|  94.9M|    VM_OP(JOP_RETURN) {
  ------------------
  |  |36015|  94.9M|#define VM_OP(op) label_##op :
  ------------------
36628|  94.9M|        Janet retval = stack[D];
  ------------------
  |  |35997|  94.9M|#define D (*pc >> 8)
  ------------------
36629|  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
  ------------------
36630|  94.9M|        janet_fiber_popframe(fiber);
36631|  94.9M|        if (entrance_frame) vm_return_no_restore(JANET_SIGNAL_OK, retval);
  ------------------
  |  |36039|   383k|#define vm_return_no_restore(sig, val) do { \
  |  |36040|   383k|    janet_vm.return_reg[0] = (val); \
  |  |36041|   383k|    return (sig); \
  |  |36042|   383k|} while (0)
  |  |  ------------------
  |  |  |  Branch (36042:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (36631:13): [True: 383k, False: 94.5M]
  ------------------
36632|  94.5M|        vm_restore();
  ------------------
  |  |36029|  94.5M|#define vm_restore() do { \
  |  |36030|  94.5M|    stack = fiber->data + fiber->frame; \
  |  |36031|  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
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36032|  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
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36033|  94.5M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36033:10): [Folded, False: 94.5M]
  |  |  ------------------
  ------------------
36633|  94.5M|        stack[A] = retval;
  ------------------
  |  |35994|  94.5M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36634|  94.5M|        vm_checkgc_pcnext();
  ------------------
  |  |36049|  94.5M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|  94.5M|#define maybe_collect() do {\
  |  |  |  |36046|  94.5M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 64.7M, False: 29.7M]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 94.5M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|  94.5M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|  94.5M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36635|  94.5M|    }
36636|       |
36637|   106k|    VM_OP(JOP_RETURN_NIL) {
  ------------------
  |  |36015|   106k|#define VM_OP(op) label_##op :
  ------------------
36638|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36639|   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
  ------------------
36640|   106k|        janet_fiber_popframe(fiber);
36641|   106k|        if (entrance_frame) vm_return_no_restore(JANET_SIGNAL_OK, retval);
  ------------------
  |  |36039|    263|#define vm_return_no_restore(sig, val) do { \
  |  |36040|    263|    janet_vm.return_reg[0] = (val); \
  |  |36041|    263|    return (sig); \
  |  |36042|    263|} while (0)
  |  |  ------------------
  |  |  |  Branch (36042:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (36641:13): [True: 263, False: 106k]
  ------------------
36642|   106k|        vm_restore();
  ------------------
  |  |36029|   106k|#define vm_restore() do { \
  |  |36030|   106k|    stack = fiber->data + fiber->frame; \
  |  |36031|   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
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36032|   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
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36033|   106k|} while (0)
  |  |  ------------------
  |  |  |  Branch (36033:10): [Folded, False: 106k]
  |  |  ------------------
  ------------------
36643|   106k|        stack[A] = retval;
  ------------------
  |  |35994|   106k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36644|   106k|        vm_checkgc_pcnext();
  ------------------
  |  |36049|   106k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|   106k|#define maybe_collect() do {\
  |  |  |  |36046|   106k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 11.5k, False: 94.7k]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 106k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|   106k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|   106k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36645|   106k|    }
36646|       |
36647|  36.8M|    VM_OP(JOP_ADD_IMMEDIATE)
  ------------------
  |  |36015|  36.8M|#define VM_OP(op) label_##op :
  ------------------
36648|  36.8M|    vm_binop_immediate(+);
  ------------------
  |  |36079|  36.8M|    {\
  |  |36080|  36.8M|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35995|  36.8M|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36081|  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 (36081:13): [True: 37, False: 36.8M]
  |  |  ------------------
  |  |36082|     37|            vm_commit();\
  |  |  ------------------
  |  |  |  |36028|     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 (36028:70): [Folded, False: 37]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36083|     37|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  ------------------
  |  |  |  |  830|     37|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36084|     37|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |36085|     37|            stack = fiber->data + fiber->frame;\
  |  |36086|     37|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35994|     37|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36087|     37|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36049|     37|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36045|     37|#define maybe_collect() do {\
  |  |  |  |  |  |36046|     37|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 37]
  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 37]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|     37|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|     37|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36088|  36.8M|        } else {\
  |  |36089|  36.8M|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|  36.8M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36090|  36.8M|            stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |35994|  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)
  |  |  ------------------
  |  |36091|  36.8M|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36048|  36.8M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|  36.8M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36092|  36.8M|        }\
  |  |36093|  36.8M|    }
  ------------------
36649|       |
36650|  36.8M|    VM_OP(JOP_ADD)
  ------------------
  |  |36015|   647k|#define VM_OP(op) label_##op :
  ------------------
36651|   647k|    vm_binop(+);
  ------------------
  |  |36131|   647k|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  ------------------
  |  |  |  |36115|   647k|    {\
  |  |  |  |36116|   647k|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35995|   647k|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36117|   647k|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|   647k|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36118|   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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36119|   647k|            double x1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|   647k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36120|   647k|            double x2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|   647k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36121|   647k|            stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|   647k|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |36131|   647k|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  830|   647k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36122|   647k|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|   647k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|   647k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36123|   647k|        } else {\
  |  |  |  |36124|    128|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|    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 (36028:70): [Folded, False: 128]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36125|    128|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36126|    128|            stack = fiber->data + fiber->frame;\
  |  |  |  |36127|    128|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|    128|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36128|    128|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36049|    128|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36045|    128|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36046|    128|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 128]
  |  |  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 128]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36048|    128|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36017|    128|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36129|    128|        }\
  |  |  |  |36130|   647k|    }
  |  |  ------------------
  ------------------
36652|       |
36653|   647k|    VM_OP(JOP_SUBTRACT_IMMEDIATE)
  ------------------
  |  |36015|   518k|#define VM_OP(op) label_##op :
  ------------------
36654|   518k|    vm_binop_immediate(-);
  ------------------
  |  |36079|   518k|    {\
  |  |36080|   518k|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35995|   518k|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36081|   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 (36081:13): [True: 3.30k, False: 515k]
  |  |  ------------------
  |  |36082|  3.30k|            vm_commit();\
  |  |  ------------------
  |  |  |  |36028|  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 (36028:70): [Folded, False: 3.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36083|  3.30k|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  ------------------
  |  |  |  |  830|  3.30k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36084|  3.30k|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |36085|  3.30k|            stack = fiber->data + fiber->frame;\
  |  |36086|  3.30k|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35994|  3.30k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36087|  3.30k|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36049|  3.30k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36045|  3.30k|#define maybe_collect() do {\
  |  |  |  |  |  |36046|  3.30k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 3.30k]
  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 3.30k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|  3.30k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|  3.30k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36088|   515k|        } else {\
  |  |36089|   515k|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|   515k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36090|   515k|            stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |35994|   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)
  |  |  ------------------
  |  |36091|   515k|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36048|   515k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|   515k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36092|   515k|        }\
  |  |36093|   518k|    }
  ------------------
36655|       |
36656|   518k|    VM_OP(JOP_SUBTRACT)
  ------------------
  |  |36015|  24.9k|#define VM_OP(op) label_##op :
  ------------------
36657|  24.9k|    vm_binop(-);
  ------------------
  |  |36131|  24.9k|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  ------------------
  |  |  |  |36115|  24.9k|    {\
  |  |  |  |36116|  24.9k|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35995|  24.9k|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36117|  24.9k|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|  24.9k|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36118|  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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36119|  24.7k|            double x1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|  24.7k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36120|  24.7k|            double x2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|  24.7k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36121|  24.7k|            stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|  24.7k|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |36131|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36122|  24.7k|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|  24.7k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|  24.7k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36123|  24.7k|        } else {\
  |  |  |  |36124|    244|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|    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 (36028:70): [Folded, False: 244]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36125|    244|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36126|    244|            stack = fiber->data + fiber->frame;\
  |  |  |  |36127|    244|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|    244|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36128|    244|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36049|    244|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36045|    244|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36046|    244|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 244]
  |  |  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 244]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36048|    244|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36017|    244|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36129|    244|        }\
  |  |  |  |36130|  24.9k|    }
  |  |  ------------------
  ------------------
36658|       |
36659|  24.9k|    VM_OP(JOP_MULTIPLY_IMMEDIATE)
  ------------------
  |  |36015|     94|#define VM_OP(op) label_##op :
  ------------------
36660|     94|    vm_binop_immediate(*);
  ------------------
  |  |36079|     94|    {\
  |  |36080|     94|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35995|     94|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36081|     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 (36081:13): [True: 9, False: 85]
  |  |  ------------------
  |  |36082|      9|            vm_commit();\
  |  |  ------------------
  |  |  |  |36028|      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 (36028:70): [Folded, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36083|      9|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  ------------------
  |  |  |  |  830|      9|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36084|      9|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |36085|      9|            stack = fiber->data + fiber->frame;\
  |  |36086|      9|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35994|      9|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36087|      9|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36049|      9|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36045|      9|#define maybe_collect() do {\
  |  |  |  |  |  |36046|      9|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 9]
  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|      9|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|      9|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36088|     85|        } else {\
  |  |36089|     85|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|     85|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36090|     85|            stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |35994|     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)
  |  |  ------------------
  |  |36091|     85|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36048|     85|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|     85|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36092|     85|        }\
  |  |36093|     94|    }
  ------------------
36661|       |
36662|  2.23k|    VM_OP(JOP_MULTIPLY)
  ------------------
  |  |36015|  2.23k|#define VM_OP(op) label_##op :
  ------------------
36663|  2.23k|    vm_binop(*);
  ------------------
  |  |36131|  2.23k|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  ------------------
  |  |  |  |36115|  2.23k|    {\
  |  |  |  |36116|  2.23k|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35995|  2.23k|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36117|  2.23k|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|  2.23k|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36118|  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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36119|  2.12k|            double x1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|  2.12k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36120|  2.12k|            double x2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|  2.12k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36121|  2.12k|            stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|  2.12k|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |36131|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36122|  2.12k|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|  2.12k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|  2.12k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36123|  2.12k|        } else {\
  |  |  |  |36124|    109|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|    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 (36028:70): [Folded, False: 109]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36125|    109|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36126|    109|            stack = fiber->data + fiber->frame;\
  |  |  |  |36127|    109|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|    109|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36128|    109|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36049|    109|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36045|    109|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36046|    109|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 109]
  |  |  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 109]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36048|    109|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36017|    109|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36129|    109|        }\
  |  |  |  |36130|  2.23k|    }
  |  |  ------------------
  ------------------
36664|       |
36665|  2.23k|    VM_OP(JOP_DIVIDE_IMMEDIATE)
  ------------------
  |  |36015|    166|#define VM_OP(op) label_##op :
  ------------------
36666|    166|    vm_binop_immediate( /);
  ------------------
  |  |36079|    166|    {\
  |  |36080|    166|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35995|    166|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36081|    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 (36081:13): [True: 50, False: 116]
  |  |  ------------------
  |  |36082|     50|            vm_commit();\
  |  |  ------------------
  |  |  |  |36028|     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 (36028:70): [Folded, False: 50]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36083|     50|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  ------------------
  |  |  |  |  830|     50|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36084|     50|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |36085|     50|            stack = fiber->data + fiber->frame;\
  |  |36086|     50|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35994|     50|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36087|     50|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36049|     50|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36045|     50|#define maybe_collect() do {\
  |  |  |  |  |  |36046|     50|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 50]
  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 50]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|     50|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|     50|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36088|    116|        } else {\
  |  |36089|    116|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|    116|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36090|    116|            stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |35994|    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)
  |  |  ------------------
  |  |36091|    116|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36048|    116|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|    116|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36092|    116|        }\
  |  |36093|    166|    }
  ------------------
36667|       |
36668|    166|    VM_OP(JOP_DIVIDE)
  ------------------
  |  |36015|    161|#define VM_OP(op) label_##op :
  ------------------
36669|    161|    vm_binop( /);
  ------------------
  |  |36131|    161|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  ------------------
  |  |  |  |36115|    161|    {\
  |  |  |  |36116|    161|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35995|    161|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36117|    161|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|    161|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36118|    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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36119|     38|            double x1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|     38|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36120|     38|            double x2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|     38|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36121|     38|            stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|     38|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |36131|     38|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  830|     38|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36122|     38|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|     38|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|     38|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36123|    123|        } else {\
  |  |  |  |36124|    123|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|    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 (36028:70): [Folded, False: 123]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36125|    123|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36126|    123|            stack = fiber->data + fiber->frame;\
  |  |  |  |36127|    123|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|    123|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36128|    123|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36049|    123|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36045|    123|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36046|    123|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 123]
  |  |  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 123]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36048|    123|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36017|    123|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36129|    123|        }\
  |  |  |  |36130|    161|    }
  |  |  ------------------
  ------------------
36670|       |
36671|  18.2k|    VM_OP(JOP_DIVIDE_FLOOR) {
  ------------------
  |  |36015|  18.2k|#define VM_OP(op) label_##op :
  ------------------
36672|  18.2k|        Janet op1 = stack[B];
  ------------------
  |  |35995|  18.2k|#define B ((*pc >> 16) & 0xFF)
  ------------------
36673|  18.2k|        Janet op2 = stack[C];
  ------------------
  |  |35996|  18.2k|#define C (*pc >> 24)
  ------------------
36674|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36675|  18.2k|            double x1 = janet_unwrap_number(op1);
  ------------------
  |  |  834|  18.2k|#define janet_unwrap_number(x) ((x).number)
  ------------------
36676|  18.2k|            double x2 = janet_unwrap_number(op2);
  ------------------
  |  |  834|  18.2k|#define janet_unwrap_number(x) ((x).number)
  ------------------
36677|  18.2k|            stack[A] = janet_wrap_number(floor(x1 / x2));
  ------------------
  |  |35994|  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)
  ------------------
36678|  18.2k|            vm_pcnext();
  ------------------
  |  |36048|  18.2k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|  18.2k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36679|  18.2k|        } else {
36680|      0|            vm_commit();
  ------------------
  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  ------------------
  ------------------
36681|      0|            Janet a = janet_binop_call("div", "rdiv", op1, op2);
36682|      0|            stack = fiber->data + fiber->frame;
36683|      0|            stack[A] = a;
  ------------------
  |  |35994|      0|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36684|      0|            vm_checkgc_pcnext();
  ------------------
  |  |36049|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|      0|#define maybe_collect() do {\
  |  |  |  |36046|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 0, False: 0]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36685|      0|        }
36686|  18.2k|    }
36687|       |
36688|  18.2k|    VM_OP(JOP_MODULO) {
  ------------------
  |  |36015|    305|#define VM_OP(op) label_##op :
  ------------------
36689|    305|        Janet op1 = stack[B];
  ------------------
  |  |35995|    305|#define B ((*pc >> 16) & 0xFF)
  ------------------
36690|    305|        Janet op2 = stack[C];
  ------------------
  |  |35996|    305|#define C (*pc >> 24)
  ------------------
36691|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36692|    182|            double x1 = janet_unwrap_number(op1);
  ------------------
  |  |  834|    182|#define janet_unwrap_number(x) ((x).number)
  ------------------
36693|    182|            double x2 = janet_unwrap_number(op2);
  ------------------
  |  |  834|    182|#define janet_unwrap_number(x) ((x).number)
  ------------------
36694|    182|            if (x2 == 0) {
  ------------------
  |  Branch (36694:17): [True: 27, False: 155]
  ------------------
36695|     27|                stack[A] = janet_wrap_number(x1);
  ------------------
  |  |35994|     27|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                              stack[A] = janet_wrap_number(x1);
  ------------------
  |  |  830|     27|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
36696|    155|            } else {
36697|    155|                double intres = x2 * floor(x1 / x2);
36698|    155|                stack[A] = janet_wrap_number(x1 - intres);
  ------------------
  |  |35994|    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)
  ------------------
36699|    155|            }
36700|    182|            vm_pcnext();
  ------------------
  |  |36048|    182|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|    182|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36701|    182|        } else {
36702|    123|            vm_commit();
  ------------------
  |  |36028|    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 (36028:70): [Folded, False: 123]
  |  |  ------------------
  ------------------
36703|    123|            Janet a = janet_binop_call("mod", "rmod", op1, op2);
36704|    123|            stack = fiber->data + fiber->frame;
36705|    123|            stack[A] = a;
  ------------------
  |  |35994|    123|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36706|    123|            vm_checkgc_pcnext();
  ------------------
  |  |36049|    123|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|    123|#define maybe_collect() do {\
  |  |  |  |36046|    123|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 0, False: 123]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 123]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|    123|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|    123|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36707|    123|        }
36708|    305|    }
36709|       |
36710|    463|    VM_OP(JOP_REMAINDER) {
  ------------------
  |  |36015|    463|#define VM_OP(op) label_##op :
  ------------------
36711|    463|        Janet op1 = stack[B];
  ------------------
  |  |35995|    463|#define B ((*pc >> 16) & 0xFF)
  ------------------
36712|    463|        Janet op2 = stack[C];
  ------------------
  |  |35996|    463|#define C (*pc >> 24)
  ------------------
36713|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36714|     63|            double x1 = janet_unwrap_number(op1);
  ------------------
  |  |  834|     63|#define janet_unwrap_number(x) ((x).number)
  ------------------
36715|     63|            double x2 = janet_unwrap_number(op2);
  ------------------
  |  |  834|     63|#define janet_unwrap_number(x) ((x).number)
  ------------------
36716|     63|            stack[A] = janet_wrap_number(fmod(x1, x2));
  ------------------
  |  |35994|     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)
  ------------------
36717|     63|            vm_pcnext();
  ------------------
  |  |36048|     63|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|     63|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36718|    400|        } else {
36719|    400|            vm_commit();
  ------------------
  |  |36028|    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 (36028:70): [Folded, False: 400]
  |  |  ------------------
  ------------------
36720|    400|            Janet a = janet_binop_call("%", "r%", op1, op2);
36721|    400|            stack = fiber->data + fiber->frame;
36722|    400|            stack[A] = a;
  ------------------
  |  |35994|    400|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36723|    400|            vm_checkgc_pcnext();
  ------------------
  |  |36049|    400|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|    400|#define maybe_collect() do {\
  |  |  |  |36046|    400|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 0, False: 400]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 400]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|    400|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|    400|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36724|    400|        }
36725|    463|    }
36726|       |
36727|    463|    VM_OP(JOP_BAND)
  ------------------
  |  |36015|      0|#define VM_OP(op) label_##op :
  ------------------
36728|      0|    vm_bitop(&);
  ------------------
  |  |36153|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |36133|      0|    {\
  |  |  |  |36134|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35995|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36135|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36136|      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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36137|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36138|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36139|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36153|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36140|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36141|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36142|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |36143|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|      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)
  |  |  |  |  ------------------
  |  |  |  |36144|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36145|      0|        } else {\
  |  |  |  |36146|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36147|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36148|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36149|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36150|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36049|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36045|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36046|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36151|      0|        }\
  |  |  |  |36152|      0|    }
  |  |  ------------------
  ------------------
36729|       |
36730|    166|    VM_OP(JOP_BOR)
  ------------------
  |  |36015|    166|#define VM_OP(op) label_##op :
  ------------------
36731|    166|    vm_bitop( |);
  ------------------
  |  |36153|    166|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |36133|    166|    {\
  |  |  |  |36134|    166|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35995|    166|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36135|    166|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|    166|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36136|    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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36137|     38|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|     38|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36138|     38|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|     38|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36139|     38|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36153|     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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36140|     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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36141|     36|            type1 x1 = (type1) y1;\
  |  |  |  |36142|     35|            int32_t x2 = (int32_t) y2;\
  |  |  |  |36143|     35|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|     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)
  |  |  |  |  ------------------
  |  |  |  |36144|     35|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|     35|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|     35|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36145|    128|        } else {\
  |  |  |  |36146|    128|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|    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 (36028:70): [Folded, False: 128]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36147|    128|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36148|    128|            stack = fiber->data + fiber->frame;\
  |  |  |  |36149|    128|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|    128|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36150|    128|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36049|    128|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36045|    128|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36046|    128|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 128]
  |  |  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 128]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36048|    128|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36017|    128|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36151|    128|        }\
  |  |  |  |36152|    166|    }
  |  |  ------------------
  ------------------
36732|       |
36733|    163|    VM_OP(JOP_BXOR)
  ------------------
  |  |36015|      0|#define VM_OP(op) label_##op :
  ------------------
36734|      0|    vm_bitop(^);
  ------------------
  |  |36153|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |36133|      0|    {\
  |  |  |  |36134|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35995|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36135|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36136|      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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36137|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36138|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36139|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36153|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36140|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36141|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36142|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |36143|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|      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)
  |  |  |  |  ------------------
  |  |  |  |36144|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36145|      0|        } else {\
  |  |  |  |36146|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36147|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36148|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36149|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36150|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36049|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36045|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36046|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36151|      0|        }\
  |  |  |  |36152|      0|    }
  |  |  ------------------
  ------------------
36735|       |
36736|      0|    VM_OP(JOP_BNOT) {
  ------------------
  |  |36015|      0|#define VM_OP(op) label_##op :
  ------------------
36737|      0|        Janet op = stack[E];
  ------------------
  |  |35998|      0|#define E (*pc >> 16)
  ------------------
36738|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36739|      0|            stack[A] = janet_wrap_integer(~janet_unwrap_integer(op));
  ------------------
  |  |35994|      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)
  |  |  ------------------
  ------------------
36740|      0|            vm_pcnext();
  ------------------
  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36741|      0|        } else {
36742|      0|            vm_commit();
  ------------------
  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  ------------------
  ------------------
36743|      0|            Janet a = janet_unary_call("~", op);
36744|      0|            stack = fiber->data + fiber->frame;
36745|      0|            stack[A] = a;
  ------------------
  |  |35994|      0|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36746|      0|            vm_checkgc_pcnext();
  ------------------
  |  |36049|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|      0|#define maybe_collect() do {\
  |  |  |  |36046|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 0, False: 0]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36747|      0|        }
36748|      0|    }
36749|       |
36750|      0|    VM_OP(JOP_SHIFT_RIGHT_UNSIGNED)
  ------------------
  |  |36015|      0|#define VM_OP(op) label_##op :
  ------------------
36751|      0|    vm_bitopu( >>);
  ------------------
  |  |36154|      0|#define vm_bitopu(op) _vm_bitop(op, uint32_t, janet_checkuintrange, "32-bit unsigned integers")
  |  |  ------------------
  |  |  |  |36133|      0|    {\
  |  |  |  |36134|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35995|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36135|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36136|      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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36137|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36138|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36139|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36154|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36140|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36141|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36142|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |36143|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|      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)
  |  |  |  |  ------------------
  |  |  |  |36144|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36145|      0|        } else {\
  |  |  |  |36146|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36147|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36148|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36149|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36150|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36049|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36045|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36046|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36151|      0|        }\
  |  |  |  |36152|      0|    }
  |  |  ------------------
  ------------------
36752|       |
36753|      0|    VM_OP(JOP_SHIFT_RIGHT_UNSIGNED_IMMEDIATE)
  ------------------
  |  |36015|      0|#define VM_OP(op) label_##op :
  ------------------
36754|      0|    vm_bitopu_immediate( >>);
  ------------------
  |  |36113|      0|#define vm_bitopu_immediate(op) _vm_bitop_immediate(op, uint32_t, janet_checkuintrange, "32-bit unsigned integers");
  |  |  ------------------
  |  |  |  |36095|      0|    {\
  |  |  |  |36096|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35995|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36097|      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 (36097:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |36098|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36099|      0|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |36100|      0|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |  |  |36101|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36102|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36103|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36049|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36045|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36046|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36104|      0|        } else {\
  |  |  |  |36105|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36106|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36107|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36108|      0|            stack[A] = janet_wrap_number((type1) (x1 op CS));\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|      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)
  |  |  |  |  ------------------
  |  |  |  |36109|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36110|      0|        }\
  |  |  |  |36111|      0|    }
  |  |  ------------------
  ------------------
36755|       |
36756|      0|    VM_OP(JOP_SHIFT_RIGHT)
  ------------------
  |  |36015|      0|#define VM_OP(op) label_##op :
  ------------------
36757|      0|    vm_bitop( >>);
  ------------------
  |  |36153|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |36133|      0|    {\
  |  |  |  |36134|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35995|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36135|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36136|      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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36137|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36138|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36139|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36153|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36140|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36141|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36142|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |36143|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|      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)
  |  |  |  |  ------------------
  |  |  |  |36144|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36145|      0|        } else {\
  |  |  |  |36146|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36147|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36148|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36149|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36150|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36049|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36045|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36046|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36151|      0|        }\
  |  |  |  |36152|      0|    }
  |  |  ------------------
  ------------------
36758|       |
36759|      0|    VM_OP(JOP_SHIFT_RIGHT_IMMEDIATE)
  ------------------
  |  |36015|      0|#define VM_OP(op) label_##op :
  ------------------
36760|      0|    vm_bitop_immediate( >>);
  ------------------
  |  |36112|      0|#define vm_bitop_immediate(op) _vm_bitop_immediate(op, int32_t, janet_checkintrange, "32-bit signed integers");
  |  |  ------------------
  |  |  |  |36095|      0|    {\
  |  |  |  |36096|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35995|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36097|      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 (36097:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |36098|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36099|      0|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |36100|      0|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |  |  |36101|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36102|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36103|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36049|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36045|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36046|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36104|      0|        } else {\
  |  |  |  |36105|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36106|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36112|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36107|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36108|      0|            stack[A] = janet_wrap_number((type1) (x1 op CS));\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|      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)
  |  |  |  |  ------------------
  |  |  |  |36109|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36110|      0|        }\
  |  |  |  |36111|      0|    }
  |  |  ------------------
  ------------------
36761|       |
36762|      0|    VM_OP(JOP_SHIFT_LEFT)
  ------------------
  |  |36015|      0|#define VM_OP(op) label_##op :
  ------------------
36763|      0|    vm_bitop( <<);
  ------------------
  |  |36153|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |36133|      0|    {\
  |  |  |  |36134|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35995|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36135|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36136|      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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36137|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36138|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36139|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36153|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36140|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36141|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36142|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |36143|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|      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)
  |  |  |  |  ------------------
  |  |  |  |36144|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36145|      0|        } else {\
  |  |  |  |36146|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36147|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36148|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36149|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36150|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36049|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36045|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36046|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36151|      0|        }\
  |  |  |  |36152|      0|    }
  |  |  ------------------
  ------------------
36764|       |
36765|      0|    VM_OP(JOP_SHIFT_LEFT_IMMEDIATE)
  ------------------
  |  |36015|      0|#define VM_OP(op) label_##op :
  ------------------
36766|      0|    vm_bitop_immediate( <<);
  ------------------
  |  |36112|      0|#define vm_bitop_immediate(op) _vm_bitop_immediate(op, int32_t, janet_checkintrange, "32-bit signed integers");
  |  |  ------------------
  |  |  |  |36095|      0|    {\
  |  |  |  |36096|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35995|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36097|      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 (36097:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |36098|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36099|      0|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |36100|      0|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |  |  |36101|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36102|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36103|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36049|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36045|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36046|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36104|      0|        } else {\
  |  |  |  |36105|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36106|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36112|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36107|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36108|      0|            stack[A] = janet_wrap_number((type1) (x1 op CS));\
  |  |  |  |  ------------------
  |  |  |  |  |  |35994|      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)
  |  |  |  |  ------------------
  |  |  |  |36109|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36110|      0|        }\
  |  |  |  |36111|      0|    }
  |  |  ------------------
  ------------------
36767|       |
36768|   567M|    VM_OP(JOP_MOVE_NEAR)
  ------------------
  |  |36015|   567M|#define VM_OP(op) label_##op :
  ------------------
36769|   567M|    stack[A] = stack[E];
  ------------------
  |  |35994|   567M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  stack[A] = stack[E];
  ------------------
  |  |35998|   567M|#define E (*pc >> 16)
  ------------------
36770|   567M|    vm_pcnext();
  ------------------
  |  |36048|   567M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|   567M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36771|       |
36772|   567M|    VM_OP(JOP_MOVE_FAR)
  ------------------
  |  |36015|   107k|#define VM_OP(op) label_##op :
  ------------------
36773|   107k|    stack[E] = stack[A];
  ------------------
  |  |35998|   107k|#define E (*pc >> 16)
  ------------------
                  stack[E] = stack[A];
  ------------------
  |  |35994|   107k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36774|   107k|    vm_pcnext();
  ------------------
  |  |36048|   107k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|   107k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36775|       |
36776|   121M|    VM_OP(JOP_JUMP)
  ------------------
  |  |36015|   121M|#define VM_OP(op) label_##op :
  ------------------
36777|   121M|    vm_maybe_auto_suspend(DS <= 0);
  ------------------
  |  |36069|   121M|#define vm_maybe_auto_suspend(COND) do { \
  |  |36070|   121M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36070:9): [True: 61.9M, False: 59.5M]
  |  |  |  Branch (36070:19): [True: 0, False: 61.9M]
  |  |  ------------------
  |  |36071|      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
  |  |  ------------------
  |  |36072|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36034|      0|#define vm_return(sig, val) do { \
  |  |  |  |36035|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36036|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36037|      0|    return (sig); \
  |  |  |  |36038|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36038:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36073|      0|    } \
  |  |36074|   121M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36074:10): [Folded, False: 121M]
  |  |  ------------------
  ------------------
36778|   121M|    pc += DS;
  ------------------
  |  |36002|   121M|#define DS (*((int32_t *)pc) >> 8)
  ------------------
36779|   121M|    vm_next();
  ------------------
  |  |36017|   121M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
36780|       |
36781|   121M|    VM_OP(JOP_JUMP_IF)
  ------------------
  |  |36015|   125k|#define VM_OP(op) label_##op :
  ------------------
36782|   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]
  |  |  ------------------
  ------------------
36783|   102k|        vm_maybe_auto_suspend(ES <= 0);
  ------------------
  |  |36069|   102k|#define vm_maybe_auto_suspend(COND) do { \
  |  |36070|   102k|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36070:9): [True: 0, False: 102k]
  |  |  |  Branch (36070:19): [True: 0, False: 0]
  |  |  ------------------
  |  |36071|      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
  |  |  ------------------
  |  |36072|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36034|      0|#define vm_return(sig, val) do { \
  |  |  |  |36035|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36036|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36037|      0|    return (sig); \
  |  |  |  |36038|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36038:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36073|      0|    } \
  |  |36074|   102k|} while (0)
  |  |  ------------------
  |  |  |  Branch (36074:10): [Folded, False: 102k]
  |  |  ------------------
  ------------------
36784|   102k|        pc += ES;
  ------------------
  |  |36003|   102k|#define ES (*((int32_t *)pc) >> 16)
  ------------------
36785|   102k|    } else {
36786|  23.4k|        pc++;
36787|  23.4k|    }
36788|   125k|    vm_next();
  ------------------
  |  |36017|   125k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
36789|       |
36790|   414M|    VM_OP(JOP_JUMP_IF_NOT)
  ------------------
  |  |36015|   414M|#define VM_OP(op) label_##op :
  ------------------
36791|   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]
  |  |  ------------------
  ------------------
36792|   156M|        pc++;
36793|   257M|    } else {
36794|   257M|        vm_maybe_auto_suspend(ES <= 0);
  ------------------
  |  |36069|   257M|#define vm_maybe_auto_suspend(COND) do { \
  |  |36070|   257M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36070:9): [True: 264, False: 257M]
  |  |  |  Branch (36070:19): [True: 0, False: 264]
  |  |  ------------------
  |  |36071|      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
  |  |  ------------------
  |  |36072|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36034|      0|#define vm_return(sig, val) do { \
  |  |  |  |36035|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36036|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36037|      0|    return (sig); \
  |  |  |  |36038|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36038:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36073|      0|    } \
  |  |36074|   257M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36074:10): [Folded, False: 257M]
  |  |  ------------------
  ------------------
36795|   257M|        pc += ES;
  ------------------
  |  |36003|   257M|#define ES (*((int32_t *)pc) >> 16)
  ------------------
36796|   257M|    }
36797|   414M|    vm_next();
  ------------------
  |  |36017|   414M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
36798|       |
36799|   414M|    VM_OP(JOP_JUMP_IF_NIL)
  ------------------
  |  |36015|  36.7M|#define VM_OP(op) label_##op :
  ------------------
36800|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36801|  12.0M|        vm_maybe_auto_suspend(ES <= 0);
  ------------------
  |  |36069|  12.0M|#define vm_maybe_auto_suspend(COND) do { \
  |  |36070|  12.0M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36070:9): [True: 0, False: 12.0M]
  |  |  |  Branch (36070:19): [True: 0, False: 0]
  |  |  ------------------
  |  |36071|      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
  |  |  ------------------
  |  |36072|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36034|      0|#define vm_return(sig, val) do { \
  |  |  |  |36035|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36036|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36037|      0|    return (sig); \
  |  |  |  |36038|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36038:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36073|      0|    } \
  |  |36074|  12.0M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36074:10): [Folded, False: 12.0M]
  |  |  ------------------
  ------------------
36802|  12.0M|        pc += ES;
  ------------------
  |  |36003|  12.0M|#define ES (*((int32_t *)pc) >> 16)
  ------------------
36803|  24.7M|    } else {
36804|  24.7M|        pc++;
36805|  24.7M|    }
36806|  36.7M|    vm_next();
  ------------------
  |  |36017|  36.7M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
36807|       |
36808|  36.7M|    VM_OP(JOP_JUMP_IF_NOT_NIL)
  ------------------
  |  |36015|  1.37M|#define VM_OP(op) label_##op :
  ------------------
36809|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36810|   834k|        pc++;
36811|   834k|    } else {
36812|   544k|        vm_maybe_auto_suspend(ES <= 0);
  ------------------
  |  |36069|   544k|#define vm_maybe_auto_suspend(COND) do { \
  |  |36070|   544k|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36070:9): [True: 0, False: 544k]
  |  |  |  Branch (36070:19): [True: 0, False: 0]
  |  |  ------------------
  |  |36071|      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
  |  |  ------------------
  |  |36072|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36034|      0|#define vm_return(sig, val) do { \
  |  |  |  |36035|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36036|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36037|      0|    return (sig); \
  |  |  |  |36038|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36038:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36073|      0|    } \
  |  |36074|   544k|} while (0)
  |  |  ------------------
  |  |  |  Branch (36074:10): [Folded, False: 544k]
  |  |  ------------------
  ------------------
36813|   544k|        pc += ES;
  ------------------
  |  |36003|   544k|#define ES (*((int32_t *)pc) >> 16)
  ------------------
36814|   544k|    }
36815|  1.37M|    vm_next();
  ------------------
  |  |36017|  1.37M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
36816|       |
36817|  47.5M|    VM_OP(JOP_LESS_THAN)
  ------------------
  |  |36015|  47.5M|#define VM_OP(op) label_##op :
  ------------------
36818|  47.5M|    vm_compop( <);
  ------------------
  |  |36156|  47.5M|    {\
  |  |36157|  47.5M|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35995|  47.5M|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36158|  47.5M|        Janet op2 = stack[C];\
  |  |  ------------------
  |  |  |  |35996|  47.5M|#define C (*pc >> 24)
  |  |  ------------------
  |  |36159|  47.5M|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  801|  95.1M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:5): [True: 47.3M, False: 207k]
  |  |  |  |  |  Branch (801:6): [True: 47.5M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  802|  95.1M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|  47.5M|    (!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.1M|        : 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36160|  47.3M|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|  47.3M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36161|  47.3M|            double x2 = janet_unwrap_number(op2);\
  |  |  ------------------
  |  |  |  |  834|  47.3M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36162|  47.3M|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |35994|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36163|  47.3M|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36048|  47.3M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|  47.3M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36164|  47.3M|        } else {\
  |  |36165|   207k|            vm_commit();\
  |  |  ------------------
  |  |  |  |36028|   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 (36028:70): [Folded, False: 207k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36166|   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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36167|   207k|            stack = fiber->data + fiber->frame;\
  |  |36168|   207k|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35994|   207k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36169|   207k|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36049|   207k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36045|   207k|#define maybe_collect() do {\
  |  |  |  |  |  |36046|   207k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 207k]
  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 207k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|   207k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|   207k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36170|   207k|        }\
  |  |36171|  47.5M|    }
  ------------------
36819|       |
36820|  47.5M|    VM_OP(JOP_LESS_THAN_EQUAL)
  ------------------
  |  |36015|   106k|#define VM_OP(op) label_##op :
  ------------------
36821|   106k|    vm_compop( <=);
  ------------------
  |  |36156|   106k|    {\
  |  |36157|   106k|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35995|   106k|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36158|   106k|        Janet op2 = stack[C];\
  |  |  ------------------
  |  |  |  |35996|   106k|#define C (*pc >> 24)
  |  |  ------------------
  |  |36159|   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.8k]
  |  |  |  |  |  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.8k]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 44.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36160|  61.2k|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|  61.2k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36161|  61.2k|            double x2 = janet_unwrap_number(op2);\
  |  |  ------------------
  |  |  |  |  834|  61.2k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36162|  61.2k|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |35994|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36163|  61.2k|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36048|  61.2k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|  61.2k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36164|  61.2k|        } else {\
  |  |36165|  44.8k|            vm_commit();\
  |  |  ------------------
  |  |  |  |36028|  44.8k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|  44.8k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|  44.8k|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36028:70): [Folded, False: 44.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36166|  44.8k|            Janet a = janet_wrap_boolean(janet_compare(op1, op2) op 0);\
  |  |  ------------------
  |  |  |  |  829|  44.8k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  817|  44.8k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  44.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  44.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36167|  44.8k|            stack = fiber->data + fiber->frame;\
  |  |36168|  44.8k|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35994|  44.8k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36169|  44.8k|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36049|  44.8k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36045|  44.8k|#define maybe_collect() do {\
  |  |  |  |  |  |36046|  44.8k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 44.8k]
  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 44.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|  44.8k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|  44.8k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36170|  44.8k|        }\
  |  |36171|   106k|    }
  ------------------
36822|       |
36823|   106k|    VM_OP(JOP_LESS_THAN_IMMEDIATE)
  ------------------
  |  |36015|    166|#define VM_OP(op) label_##op :
  ------------------
36824|    166|    vm_compop_imm( <);
  ------------------
  |  |36173|    166|    {\
  |  |36174|    166|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35995|    166|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36175|    166|        if (janet_checktype(op1, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  801|    166|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:5): [True: 51, False: 115]
  |  |  |  |  |  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: 51, False: 115]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 115]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36176|     51|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|     51|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36177|     51|            double x2 = (double) CS; \
  |  |  ------------------
  |  |  |  |36001|     51|#define CS (*((int32_t *)pc) >> 24)
  |  |  ------------------
  |  |36178|     51|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |35994|     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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36179|     51|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36048|     51|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|     51|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36180|    115|        } else {\
  |  |36181|    115|            vm_commit();\
  |  |  ------------------
  |  |  |  |36028|    115|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|    115|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|    115|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36028:70): [Folded, False: 115]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36182|    115|            Janet a = janet_wrap_boolean(janet_compare(op1, janet_wrap_integer(CS)) op 0);\
  |  |  ------------------
  |  |  |  |  829|    115|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  817|    115|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|    115|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|    115|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36183|    115|            stack = fiber->data + fiber->frame;\
  |  |36184|    115|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35994|    115|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36185|    115|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36049|    115|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36045|    115|#define maybe_collect() do {\
  |  |  |  |  |  |36046|    115|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 115]
  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 115]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|    115|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|    115|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36186|    115|        }\
  |  |36187|    166|    }
  ------------------
36825|       |
36826|   675k|    VM_OP(JOP_GREATER_THAN)
  ------------------
  |  |36015|   675k|#define VM_OP(op) label_##op :
  ------------------
36827|   675k|    vm_compop( >);
  ------------------
  |  |36156|   675k|    {\
  |  |36157|   675k|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35995|   675k|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36158|   675k|        Janet op2 = stack[C];\
  |  |  ------------------
  |  |  |  |35996|   675k|#define C (*pc >> 24)
  |  |  ------------------
  |  |36159|   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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36160|   675k|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|   675k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36161|   675k|            double x2 = janet_unwrap_number(op2);\
  |  |  ------------------
  |  |  |  |  834|   675k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36162|   675k|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |35994|   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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36163|   675k|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36048|   675k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|   675k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36164|   675k|        } else {\
  |  |36165|    756|            vm_commit();\
  |  |  ------------------
  |  |  |  |36028|    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 (36028:70): [Folded, False: 756]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36166|    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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36167|    756|            stack = fiber->data + fiber->frame;\
  |  |36168|    756|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35994|    756|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36169|    756|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36049|    756|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36045|    756|#define maybe_collect() do {\
  |  |  |  |  |  |36046|    756|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 756]
  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 756]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|    756|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|    756|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36170|    756|        }\
  |  |36171|   675k|    }
  ------------------
36828|       |
36829|   675k|    VM_OP(JOP_GREATER_THAN_EQUAL)
  ------------------
  |  |36015|  55.9k|#define VM_OP(op) label_##op :
  ------------------
36830|  55.9k|    vm_compop( >=);
  ------------------
  |  |36156|  55.9k|    {\
  |  |36157|  55.9k|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35995|  55.9k|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36158|  55.9k|        Janet op2 = stack[C];\
  |  |  ------------------
  |  |  |  |35996|  55.9k|#define C (*pc >> 24)
  |  |  ------------------
  |  |36159|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36160|  52.6k|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|  52.6k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36161|  52.6k|            double x2 = janet_unwrap_number(op2);\
  |  |  ------------------
  |  |  |  |  834|  52.6k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36162|  52.6k|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |35994|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36163|  52.6k|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36048|  52.6k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|  52.6k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36164|  52.6k|        } else {\
  |  |36165|  3.32k|            vm_commit();\
  |  |  ------------------
  |  |  |  |36028|  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 (36028:70): [Folded, False: 3.32k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36166|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36167|  3.32k|            stack = fiber->data + fiber->frame;\
  |  |36168|  3.32k|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35994|  3.32k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36169|  3.32k|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36049|  3.32k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36045|  3.32k|#define maybe_collect() do {\
  |  |  |  |  |  |36046|  3.32k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 3.32k]
  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 3.32k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|  3.32k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|  3.32k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36170|  3.32k|        }\
  |  |36171|  55.9k|    }
  ------------------
36831|       |
36832|   145k|    VM_OP(JOP_GREATER_THAN_IMMEDIATE)
  ------------------
  |  |36015|   145k|#define VM_OP(op) label_##op :
  ------------------
36833|   145k|    vm_compop_imm( >);
  ------------------
  |  |36173|   145k|    {\
  |  |36174|   145k|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35995|   145k|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36175|   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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36176|   145k|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|   145k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36177|   145k|            double x2 = (double) CS; \
  |  |  ------------------
  |  |  |  |36001|   145k|#define CS (*((int32_t *)pc) >> 24)
  |  |  ------------------
  |  |36178|   145k|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |35994|   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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36179|   145k|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36048|   145k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|   145k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36180|   145k|        } else {\
  |  |36181|     44|            vm_commit();\
  |  |  ------------------
  |  |  |  |36028|     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 (36028:70): [Folded, False: 44]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36182|     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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36183|     44|            stack = fiber->data + fiber->frame;\
  |  |36184|     44|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35994|     44|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36185|     44|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36049|     44|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36045|     44|#define maybe_collect() do {\
  |  |  |  |  |  |36046|     44|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36046:9): [True: 0, False: 44]
  |  |  |  |  |  |  |  Branch (36046:85): [Folded, False: 44]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36048|     44|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36017|     44|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36186|     44|        }\
  |  |36187|   145k|    }
  ------------------
36834|       |
36835|   216M|    VM_OP(JOP_EQUALS)
  ------------------
  |  |36015|   216M|#define VM_OP(op) label_##op :
  ------------------
36836|   216M|    stack[A] = janet_wrap_boolean(janet_equals(stack[B], stack[C]));
  ------------------
  |  |35994|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36837|   216M|    vm_pcnext();
  ------------------
  |  |36048|   216M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|   216M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36838|       |
36839|   216M|    VM_OP(JOP_EQUALS_IMMEDIATE)
  ------------------
  |  |36015|  12.1M|#define VM_OP(op) label_##op :
  ------------------
36840|  12.1M|    stack[A] = janet_wrap_boolean(janet_checktype(stack[B], JANET_NUMBER) && (janet_unwrap_number(stack[B]) == (double) CS));
  ------------------
  |  |35994|  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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36841|  12.1M|    vm_pcnext();
  ------------------
  |  |36048|  12.1M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|  12.1M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36842|       |
36843|  64.1M|    VM_OP(JOP_NOT_EQUALS)
  ------------------
  |  |36015|  64.1M|#define VM_OP(op) label_##op :
  ------------------
36844|  64.1M|    stack[A] = janet_wrap_boolean(!janet_equals(stack[B], stack[C]));
  ------------------
  |  |35994|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36845|  64.1M|    vm_pcnext();
  ------------------
  |  |36048|  64.1M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|  64.1M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36846|       |
36847|  64.1M|    VM_OP(JOP_NOT_EQUALS_IMMEDIATE)
  ------------------
  |  |36015|  65.7k|#define VM_OP(op) label_##op :
  ------------------
36848|  65.7k|    stack[A] = janet_wrap_boolean(!janet_checktype(stack[B], JANET_NUMBER) || (janet_unwrap_number(stack[B]) != (double) CS));
  ------------------
  |  |35994|  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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36849|  65.7k|    vm_pcnext();
  ------------------
  |  |36048|  65.7k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|  65.7k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36850|       |
36851|  65.7k|    VM_OP(JOP_COMPARE) {
  ------------------
  |  |36015|    100|#define VM_OP(op) label_##op :
  ------------------
36852|    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)
  |  |  ------------------
  ------------------
36853|    100|        stack = fiber->data + fiber->frame;
36854|    100|        stack[A] = a;
  ------------------
  |  |35994|    100|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36855|    100|    }
36856|    100|    vm_pcnext();
  ------------------
  |  |36048|    100|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|    100|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36857|       |
36858|  42.6M|    VM_OP(JOP_NEXT)
  ------------------
  |  |36015|  42.6M|#define VM_OP(op) label_##op :
  ------------------
36859|  42.6M|    vm_commit();
  ------------------
  |  |36028|  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 (36028:70): [Folded, False: 42.6M]
  |  |  ------------------
  ------------------
36860|  42.6M|    {
36861|  42.6M|        Janet temp = janet_next_impl(stack[B], stack[C], 1);
  ------------------
  |  |35995|  42.6M|#define B ((*pc >> 16) & 0xFF)
  ------------------
                      Janet temp = janet_next_impl(stack[B], stack[C], 1);
  ------------------
  |  |35996|  42.6M|#define C (*pc >> 24)
  ------------------
36862|  42.6M|        vm_restore();
  ------------------
  |  |36029|  42.6M|#define vm_restore() do { \
  |  |36030|  42.6M|    stack = fiber->data + fiber->frame; \
  |  |36031|  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
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36032|  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
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36033|  42.6M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36033:10): [Folded, False: 42.6M]
  |  |  ------------------
  ------------------
36863|  42.6M|        stack[A] = temp;
  ------------------
  |  |35994|  42.6M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36864|  42.6M|    }
36865|  42.6M|    vm_pcnext();
  ------------------
  |  |36048|  42.6M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|  42.6M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36866|       |
36867|  42.6M|    VM_OP(JOP_LOAD_NIL)
  ------------------
  |  |36015|  23.7M|#define VM_OP(op) label_##op :
  ------------------
36868|  23.7M|    stack[D] = janet_wrap_nil();
  ------------------
  |  |35997|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36869|  23.7M|    vm_pcnext();
  ------------------
  |  |36048|  23.7M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|  23.7M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36870|       |
36871|  23.7M|    VM_OP(JOP_LOAD_TRUE)
  ------------------
  |  |36015|   302k|#define VM_OP(op) label_##op :
  ------------------
36872|   302k|    stack[D] = janet_wrap_true();
  ------------------
  |  |35997|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36873|   302k|    vm_pcnext();
  ------------------
  |  |36048|   302k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|   302k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36874|       |
36875|  11.2M|    VM_OP(JOP_LOAD_FALSE)
  ------------------
  |  |36015|  11.2M|#define VM_OP(op) label_##op :
  ------------------
36876|  11.2M|    stack[D] = janet_wrap_false();
  ------------------
  |  |35997|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36877|  11.2M|    vm_pcnext();
  ------------------
  |  |36048|  11.2M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|  11.2M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36878|       |
36879|  32.2M|    VM_OP(JOP_LOAD_INTEGER)
  ------------------
  |  |36015|  32.2M|#define VM_OP(op) label_##op :
  ------------------
36880|  32.2M|    stack[A] = janet_wrap_integer(ES);
  ------------------
  |  |35994|  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)
  |  |  ------------------
  ------------------
36881|  32.2M|    vm_pcnext();
  ------------------
  |  |36048|  32.2M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|  32.2M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36882|       |
36883|   684M|    VM_OP(JOP_LOAD_CONSTANT) {
  ------------------
  |  |36015|   684M|#define VM_OP(op) label_##op :
  ------------------
36884|   684M|        int32_t cindex = (int32_t)E;
  ------------------
  |  |35998|   684M|#define E (*pc >> 16)
  ------------------
36885|   684M|        vm_assert(cindex < func->def->constants_length, "invalid constant");
  ------------------
  |  |36053|   684M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36052|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36052:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36053:36): [True: 0, False: 684M]
  |  |  |  Branch (36053:69): [Folded, False: 684M]
  |  |  ------------------
  ------------------
36886|   684M|        stack[A] = func->def->constants[cindex];
  ------------------
  |  |35994|   684M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36887|   684M|        vm_pcnext();
  ------------------
  |  |36048|   684M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|   684M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36888|   684M|    }
36889|       |
36890|  57.8M|    VM_OP(JOP_LOAD_SELF)
  ------------------
  |  |36015|  57.8M|#define VM_OP(op) label_##op :
  ------------------
36891|  57.8M|    stack[D] = janet_wrap_function(func);
  ------------------
  |  |35997|  57.8M|#define D (*pc >> 8)
  ------------------
                  stack[D] = janet_wrap_function(func);
  ------------------
  |  |  847|  57.8M|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  820|  57.8M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  57.8M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  57.8M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36892|  57.8M|    vm_pcnext();
  ------------------
  |  |36048|  57.8M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|  57.8M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36893|       |
36894|  57.8M|    VM_OP(JOP_LOAD_UPVALUE) {
  ------------------
  |  |36015|  51.3M|#define VM_OP(op) label_##op :
  ------------------
36895|  51.3M|        int32_t eindex = B;
  ------------------
  |  |35995|  51.3M|#define B ((*pc >> 16) & 0xFF)
  ------------------
36896|  51.3M|        int32_t vindex = C;
  ------------------
  |  |35996|  51.3M|#define C (*pc >> 24)
  ------------------
36897|  51.3M|        JanetFuncEnv *env;
36898|  51.3M|        vm_assert(func->def->environments_length > eindex, "invalid upvalue environment");
  ------------------
  |  |36053|  51.3M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36052|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36052:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36053:36): [True: 0, False: 51.3M]
  |  |  |  Branch (36053:69): [Folded, False: 51.3M]
  |  |  ------------------
  ------------------
36899|  51.3M|        env = func->envs[eindex];
36900|  51.3M|        vm_assert(env->length > vindex, "invalid upvalue index");
  ------------------
  |  |36053|  51.3M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36052|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36052:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36053:36): [True: 0, False: 51.3M]
  |  |  |  Branch (36053:69): [Folded, False: 51.3M]
  |  |  ------------------
  ------------------
36901|  51.3M|        vm_assert(janet_env_valid(env), "invalid upvalue environment");
  ------------------
  |  |36053|  51.3M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36052|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36052:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36053:36): [True: 0, False: 51.3M]
  |  |  |  Branch (36053:69): [Folded, False: 51.3M]
  |  |  ------------------
  ------------------
36902|  51.3M|        if (env->offset > 0) {
  ------------------
  |  Branch (36902:13): [True: 51.1M, False: 227k]
  ------------------
36903|       |            /* On stack */
36904|  51.1M|            stack[A] = env->as.fiber->data[env->offset + vindex];
  ------------------
  |  |35994|  51.1M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36905|  51.1M|        } else {
36906|       |            /* Off stack */
36907|   227k|            stack[A] = env->as.values[vindex];
  ------------------
  |  |35994|   227k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36908|   227k|        }
36909|  51.3M|        vm_pcnext();
  ------------------
  |  |36048|  51.3M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|  51.3M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36910|  51.3M|    }
36911|       |
36912|   176k|    VM_OP(JOP_SET_UPVALUE) {
  ------------------
  |  |36015|   176k|#define VM_OP(op) label_##op :
  ------------------
36913|   176k|        int32_t eindex = B;
  ------------------
  |  |35995|   176k|#define B ((*pc >> 16) & 0xFF)
  ------------------
36914|   176k|        int32_t vindex = C;
  ------------------
  |  |35996|   176k|#define C (*pc >> 24)
  ------------------
36915|   176k|        JanetFuncEnv *env;
36916|   176k|        vm_assert(func->def->environments_length > eindex, "invalid upvalue environment");
  ------------------
  |  |36053|   176k|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36052|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36052:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36053:36): [True: 0, False: 176k]
  |  |  |  Branch (36053:69): [Folded, False: 176k]
  |  |  ------------------
  ------------------
36917|   176k|        env = func->envs[eindex];
36918|   176k|        vm_assert(env->length > vindex, "invalid upvalue index");
  ------------------
  |  |36053|   176k|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36052|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36052:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36053:36): [True: 0, False: 176k]
  |  |  |  Branch (36053:69): [Folded, False: 176k]
  |  |  ------------------
  ------------------
36919|   176k|        vm_assert(janet_env_valid(env), "invalid upvalue environment");
  ------------------
  |  |36053|   176k|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36052|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36052:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36053:36): [True: 0, False: 176k]
  |  |  |  Branch (36053:69): [Folded, False: 176k]
  |  |  ------------------
  ------------------
36920|   176k|        if (env->offset > 0) {
  ------------------
  |  Branch (36920:13): [True: 176k, False: 0]
  ------------------
36921|   176k|            env->as.fiber->data[env->offset + vindex] = stack[A];
  ------------------
  |  |35994|   176k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36922|   176k|        } else {
36923|      0|            env->as.values[vindex] = stack[A];
  ------------------
  |  |35994|      0|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36924|      0|        }
36925|   176k|        vm_pcnext();
  ------------------
  |  |36048|   176k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|   176k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36926|   176k|    }
36927|       |
36928|  85.4M|    VM_OP(JOP_CLOSURE) {
  ------------------
  |  |36015|  85.4M|#define VM_OP(op) label_##op :
  ------------------
36929|  85.4M|        JanetFuncDef *fd;
36930|  85.4M|        JanetFunction *fn;
36931|  85.4M|        int32_t elen;
36932|  85.4M|        int32_t defindex = (int32_t)E;
  ------------------
  |  |35998|  85.4M|#define E (*pc >> 16)
  ------------------
36933|  85.4M|        vm_assert(defindex < func->def->defs_length, "invalid funcdef");
  ------------------
  |  |36053|  85.4M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36052|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36052:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36053:36): [True: 0, False: 85.4M]
  |  |  |  Branch (36053:69): [Folded, False: 85.4M]
  |  |  ------------------
  ------------------
36934|  85.4M|        fd = func->def->defs[defindex];
36935|  85.4M|        elen = fd->environments_length;
36936|  85.4M|        fn = janet_gcalloc(JANET_MEMORY_FUNCTION, sizeof(JanetFunction) + ((size_t) elen * sizeof(JanetFuncEnv *)));
36937|  85.4M|        fn->def = fd;
36938|  85.4M|        {
36939|  85.4M|            int32_t i;
36940|   169M|            for (i = 0; i < elen; ++i) {
  ------------------
  |  Branch (36940:25): [True: 84.3M, False: 85.4M]
  ------------------
36941|  84.3M|                int32_t inherit = fd->environments[i];
36942|  84.3M|                if (inherit == -1 || inherit >= func->def->environments_length) {
  ------------------
  |  Branch (36942:21): [True: 84.1M, False: 193k]
  |  Branch (36942:38): [True: 0, False: 193k]
  ------------------
36943|  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
  |  |  ------------------
  ------------------
36944|  84.1M|                    if (!frame->env) {
  ------------------
  |  Branch (36944:25): [True: 11.1M, False: 72.9M]
  ------------------
36945|       |                        /* Lazy capture of current stack frame */
36946|  11.1M|                        JanetFuncEnv *env = janet_gcalloc(JANET_MEMORY_FUNCENV, sizeof(JanetFuncEnv));
36947|  11.1M|                        env->offset = fiber->frame;
36948|  11.1M|                        env->as.fiber = fiber;
36949|  11.1M|                        env->length = func->def->slotcount;
36950|  11.1M|                        frame->env = env;
36951|  11.1M|                    }
36952|  84.1M|                    fn->envs[i] = frame->env;
36953|  84.1M|                } else {
36954|   193k|                    fn->envs[i] = func->envs[inherit];
36955|   193k|                }
36956|  84.3M|            }
36957|  85.4M|        }
36958|  85.4M|        stack[A] = janet_wrap_function(fn);
  ------------------
  |  |35994|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36959|  85.4M|        vm_checkgc_pcnext();
  ------------------
  |  |36049|  85.4M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|  85.4M|#define maybe_collect() do {\
  |  |  |  |36046|  85.4M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 56.3M, False: 29.1M]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 85.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|  85.4M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|  85.4M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36960|  85.4M|    }
36961|       |
36962|   270M|    VM_OP(JOP_PUSH)
  ------------------
  |  |36015|   270M|#define VM_OP(op) label_##op :
  ------------------
36963|   270M|    janet_fiber_push(fiber, stack[D]);
  ------------------
  |  |35997|   270M|#define D (*pc >> 8)
  ------------------
36964|   270M|    stack = fiber->data + fiber->frame;
36965|   270M|    vm_checkgc_pcnext();
  ------------------
  |  |36049|   270M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|   270M|#define maybe_collect() do {\
  |  |  |  |36046|   270M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 184M, False: 85.3M]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 270M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|   270M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|   270M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36966|       |
36967|   270M|    VM_OP(JOP_PUSH_2)
  ------------------
  |  |36015|   128M|#define VM_OP(op) label_##op :
  ------------------
36968|   128M|    janet_fiber_push2(fiber, stack[A], stack[E]);
  ------------------
  |  |35994|   128M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  janet_fiber_push2(fiber, stack[A], stack[E]);
  ------------------
  |  |35998|   128M|#define E (*pc >> 16)
  ------------------
36969|   128M|    stack = fiber->data + fiber->frame;
36970|   128M|    vm_checkgc_pcnext();
  ------------------
  |  |36049|   128M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|   128M|#define maybe_collect() do {\
  |  |  |  |36046|   128M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 86.8M, False: 41.6M]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 128M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|   128M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|   128M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36971|       |
36972|   128M|    VM_OP(JOP_PUSH_3)
  ------------------
  |  |36015|  79.2M|#define VM_OP(op) label_##op :
  ------------------
36973|  79.2M|    janet_fiber_push3(fiber, stack[A], stack[B], stack[C]);
  ------------------
  |  |35994|  79.2M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  janet_fiber_push3(fiber, stack[A], stack[B], stack[C]);
  ------------------
  |  |35995|  79.2M|#define B ((*pc >> 16) & 0xFF)
  ------------------
                  janet_fiber_push3(fiber, stack[A], stack[B], stack[C]);
  ------------------
  |  |35996|  79.2M|#define C (*pc >> 24)
  ------------------
36974|  79.2M|    stack = fiber->data + fiber->frame;
36975|  79.2M|    vm_checkgc_pcnext();
  ------------------
  |  |36049|  79.2M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|  79.2M|#define maybe_collect() do {\
  |  |  |  |36046|  79.2M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 52.1M, False: 27.0M]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 79.2M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|  79.2M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|  79.2M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36976|       |
36977|  79.2M|    VM_OP(JOP_PUSH_ARRAY) {
  ------------------
  |  |36015|  21.5M|#define VM_OP(op) label_##op :
  ------------------
36978|  21.5M|        const Janet *vals;
36979|  21.5M|        int32_t len;
36980|  21.5M|        if (janet_indexed_view(stack[D], &vals, &len)) {
  ------------------
  |  |35997|  21.5M|#define D (*pc >> 8)
  ------------------
  |  Branch (36980:13): [True: 21.5M, False: 43]
  ------------------
36981|  21.5M|            janet_fiber_pushn(fiber, vals, len);
36982|  21.5M|        } else {
36983|     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]);
  ------------------
  |  |35997|     43|#define D (*pc >> 8)
  ------------------
36984|     43|        }
36985|  21.5M|    }
36986|  21.5M|    stack = fiber->data + fiber->frame;
36987|  21.5M|    vm_checkgc_pcnext();
  ------------------
  |  |36049|  21.5M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|  21.5M|#define maybe_collect() do {\
  |  |  |  |36046|  21.5M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 14.3M, False: 7.18M]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 21.5M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|  21.5M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|  21.5M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36988|       |
36989|   343M|    VM_OP(JOP_CALL) {
  ------------------
  |  |36015|   343M|#define VM_OP(op) label_##op :
  ------------------
36990|   343M|        vm_maybe_auto_suspend(1);
  ------------------
  |  |36069|   343M|#define vm_maybe_auto_suspend(COND) do { \
  |  |36070|   343M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36070:9): [True: 343M, Folded]
  |  |  |  Branch (36070:19): [True: 0, False: 343M]
  |  |  ------------------
  |  |36071|      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
  |  |  ------------------
  |  |36072|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36034|      0|#define vm_return(sig, val) do { \
  |  |  |  |36035|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36036|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36037|      0|    return (sig); \
  |  |  |  |36038|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36038:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36073|      0|    } \
  |  |36074|   343M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36074:10): [Folded, False: 343M]
  |  |  ------------------
  ------------------
36991|   343M|        Janet callee = stack[E];
  ------------------
  |  |35998|   343M|#define E (*pc >> 16)
  ------------------
36992|   343M|        if (fiber->stacktop > fiber->maxstack) {
  ------------------
  |  Branch (36992:13): [True: 0, False: 343M]
  ------------------
36993|      0|            vm_throw("stack overflow");
  ------------------
  |  |36052|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  ------------------
  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36052:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
36994|      0|        }
36995|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36996|   313k|            vm_commit();
  ------------------
  |  |36028|   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 (36028:70): [Folded, False: 313k]
  |  |  ------------------
  ------------------
36997|   313k|            callee = resolve_method(callee, fiber);
36998|   313k|        }
36999|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37000|   107M|            func = janet_unwrap_function(callee);
  ------------------
  |  |  863|   107M|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
37001|   107M|            if (func->gc.flags & JANET_FUNCFLAG_TRACE) {
  ------------------
  |  | 1155|   107M|#define JANET_FUNCFLAG_TRACE (1 << 16)
  ------------------
  |  Branch (37001:17): [True: 0, False: 107M]
  ------------------
37002|      0|                vm_do_trace(func, fiber->stacktop - fiber->stackstart, fiber->data + fiber->stackstart);
  ------------------
  |  |36192|      0|#define vm_do_trace(func, argc, argv) do { \
  |  |36193|      0|    JanetFunction* _func = (func);\
  |  |36194|      0|    if (_func->def->name) {\
  |  |  ------------------
  |  |  |  Branch (36194:9): [True: 0, False: 0]
  |  |  ------------------
  |  |36195|      0|        janet_eprintf("trace (%S", _func->def->name);\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36196|      0|    } else {\
  |  |36197|      0|        janet_eprintf("trace (%p", janet_wrap_function(_func));\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36198|      0|    }\
  |  |36199|      0|    int32_t _argc = (argc);\
  |  |36200|      0|    for (int32_t i = 0; i < _argc; i++) {\
  |  |  ------------------
  |  |  |  Branch (36200:25): [True: 0, False: 0]
  |  |  ------------------
  |  |36201|      0|        janet_eprintf(" %p", (argv)[i]);\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36202|      0|    }\
  |  |36203|      0|    janet_eprintf(")\n");\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36204|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36204:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37003|      0|            }
37004|   107M|            vm_commit();
  ------------------
  |  |36028|   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 (36028:70): [Folded, False: 107M]
  |  |  ------------------
  ------------------
37005|   107M|            if (janet_fiber_funcframe(fiber, func)) {
  ------------------
  |  Branch (37005:17): [True: 12, False: 107M]
  ------------------
37006|     12|                int32_t n = fiber->stacktop - fiber->stackstart;
37007|     12|                janet_panicf("%v called with %d argument%s, expected %d",
37008|     12|                             callee, n, n == 1 ? "" : "s", func->def->arity);
  ------------------
  |  Branch (37008:41): [True: 6, False: 6]
  ------------------
37009|     12|            }
37010|   107M|            stack = fiber->data + fiber->frame;
37011|   107M|            pc = func->def->bytecode;
37012|   107M|            vm_checkgc_next();
  ------------------
  |  |36047|   107M|#define vm_checkgc_next() maybe_collect(); vm_next()
  |  |  ------------------
  |  |  |  |36045|   107M|#define maybe_collect() do {\
  |  |  |  |36046|   107M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 72.8M, False: 34.3M]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 107M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_next() maybe_collect(); vm_next()
  |  |  ------------------
  |  |  |  |36017|   107M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37013|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37014|   235M|            vm_commit();
  ------------------
  |  |36028|   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 (36028:70): [Folded, False: 235M]
  |  |  ------------------
  ------------------
37015|   235M|            int32_t argc = fiber->stacktop - fiber->stackstart;
37016|   235M|            janet_fiber_cframe(fiber, janet_unwrap_cfunction(callee));
  ------------------
  |  |  864|   235M|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
37017|   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))
  ------------------
37018|   235M|            janet_fiber_popframe(fiber);
37019|   235M|            stack = fiber->data + fiber->frame;
37020|   235M|            stack[A] = ret;
  ------------------
  |  |35994|   235M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37021|   235M|            vm_checkgc_pcnext();
  ------------------
  |  |36049|   235M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|   235M|#define maybe_collect() do {\
  |  |  |  |36046|   235M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 159M, False: 75.9M]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 235M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|   235M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|   235M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37022|   235M|        } else {
37023|   864k|            vm_commit();
  ------------------
  |  |36028|   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 (36028:70): [Folded, False: 864k]
  |  |  ------------------
  ------------------
37024|   864k|            stack[A] = call_nonfn(fiber, callee);
  ------------------
  |  |35994|   864k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37025|   864k|            vm_pcnext();
  ------------------
  |  |36048|   864k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|   864k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37026|   864k|        }
37027|   343M|    }
37028|       |
37029|   343M|    VM_OP(JOP_TAILCALL) {
  ------------------
  |  |36015|  53.9M|#define VM_OP(op) label_##op :
  ------------------
37030|  53.9M|        vm_maybe_auto_suspend(1);
  ------------------
  |  |36069|  53.9M|#define vm_maybe_auto_suspend(COND) do { \
  |  |36070|  53.9M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36070:9): [True: 53.9M, Folded]
  |  |  |  Branch (36070:19): [True: 0, False: 53.9M]
  |  |  ------------------
  |  |36071|      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
  |  |  ------------------
  |  |36072|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36034|      0|#define vm_return(sig, val) do { \
  |  |  |  |36035|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36036|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36037|      0|    return (sig); \
  |  |  |  |36038|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36038:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36073|      0|    } \
  |  |36074|  53.9M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36074:10): [Folded, False: 53.9M]
  |  |  ------------------
  ------------------
37031|  53.9M|        Janet callee = stack[D];
  ------------------
  |  |35997|  53.9M|#define D (*pc >> 8)
  ------------------
37032|  53.9M|        if (fiber->stacktop > fiber->maxstack) {
  ------------------
  |  Branch (37032:13): [True: 0, False: 53.9M]
  ------------------
37033|      0|            vm_throw("stack overflow");
  ------------------
  |  |36052|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  ------------------
  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36052:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
37034|      0|        }
37035|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37036|     10|            vm_commit();
  ------------------
  |  |36028|     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 (36028:70): [Folded, False: 10]
  |  |  ------------------
  ------------------
37037|     10|            callee = resolve_method(callee, fiber);
37038|     10|        }
37039|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37040|  41.4M|            func = janet_unwrap_function(callee);
  ------------------
  |  |  863|  41.4M|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
37041|  41.4M|            if (func->gc.flags & JANET_FUNCFLAG_TRACE) {
  ------------------
  |  | 1155|  41.4M|#define JANET_FUNCFLAG_TRACE (1 << 16)
  ------------------
  |  Branch (37041:17): [True: 0, False: 41.4M]
  ------------------
37042|      0|                vm_do_trace(func, fiber->stacktop - fiber->stackstart, fiber->data + fiber->stackstart);
  ------------------
  |  |36192|      0|#define vm_do_trace(func, argc, argv) do { \
  |  |36193|      0|    JanetFunction* _func = (func);\
  |  |36194|      0|    if (_func->def->name) {\
  |  |  ------------------
  |  |  |  Branch (36194:9): [True: 0, False: 0]
  |  |  ------------------
  |  |36195|      0|        janet_eprintf("trace (%S", _func->def->name);\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36196|      0|    } else {\
  |  |36197|      0|        janet_eprintf("trace (%p", janet_wrap_function(_func));\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36198|      0|    }\
  |  |36199|      0|    int32_t _argc = (argc);\
  |  |36200|      0|    for (int32_t i = 0; i < _argc; i++) {\
  |  |  ------------------
  |  |  |  Branch (36200:25): [True: 0, False: 0]
  |  |  ------------------
  |  |36201|      0|        janet_eprintf(" %p", (argv)[i]);\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36202|      0|    }\
  |  |36203|      0|    janet_eprintf(")\n");\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36204|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36204:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37043|      0|            }
37044|  41.4M|            if (janet_fiber_funcframe_tail(fiber, func)) {
  ------------------
  |  Branch (37044:17): [True: 8, False: 41.4M]
  ------------------
37045|      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
  |  |  ------------------
  ------------------
37046|      8|                int32_t n = fiber->stacktop - fiber->stackstart;
37047|      8|                janet_panicf("%v called with %d argument%s, expected %d",
37048|      8|                             callee, n, n == 1 ? "" : "s", func->def->arity);
  ------------------
  |  Branch (37048:41): [True: 0, False: 8]
  ------------------
37049|      8|            }
37050|  41.4M|            stack = fiber->data + fiber->frame;
37051|  41.4M|            pc = func->def->bytecode;
37052|  41.4M|            vm_checkgc_next();
  ------------------
  |  |36047|  41.4M|#define vm_checkgc_next() maybe_collect(); vm_next()
  |  |  ------------------
  |  |  |  |36045|  41.4M|#define maybe_collect() do {\
  |  |  |  |36046|  41.4M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 29.8M, False: 11.5M]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 41.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_next() maybe_collect(); vm_next()
  |  |  ------------------
  |  |  |  |36017|  41.4M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37053|  41.4M|        } else {
37054|  12.5M|            Janet retreg;
37055|  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
  ------------------
37056|  12.5M|            vm_commit();
  ------------------
  |  |36028|  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 (36028:70): [Folded, False: 12.5M]
  |  |  ------------------
  ------------------
37057|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37058|  12.5M|                int32_t argc = fiber->stacktop - fiber->stackstart;
37059|  12.5M|                janet_fiber_cframe(fiber, janet_unwrap_cfunction(callee));
  ------------------
  |  |  864|  12.5M|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
37060|  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))
  ------------------
37061|  12.5M|                janet_fiber_popframe(fiber);
37062|  12.5M|            } else {
37063|    484|                retreg = call_nonfn(fiber, callee);
37064|    484|            }
37065|  12.5M|            janet_fiber_popframe(fiber);
37066|  12.5M|            if (entrance_frame) {
  ------------------
  |  Branch (37066:17): [True: 410, False: 12.5M]
  ------------------
37067|    410|                vm_return_no_restore(JANET_SIGNAL_OK, retreg);
  ------------------
  |  |36039|    410|#define vm_return_no_restore(sig, val) do { \
  |  |36040|    410|    janet_vm.return_reg[0] = (val); \
  |  |36041|    410|    return (sig); \
  |  |36042|    410|} while (0)
  |  |  ------------------
  |  |  |  Branch (36042:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37068|    410|            }
37069|  12.5M|            vm_restore();
  ------------------
  |  |36029|  12.5M|#define vm_restore() do { \
  |  |36030|  12.5M|    stack = fiber->data + fiber->frame; \
  |  |36031|  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
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36032|  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
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36033|  12.5M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36033:10): [Folded, False: 12.5M]
  |  |  ------------------
  ------------------
37070|  12.5M|            stack[A] = retreg;
  ------------------
  |  |35994|  12.5M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37071|  12.5M|            vm_checkgc_pcnext();
  ------------------
  |  |36049|  12.5M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|  12.5M|#define maybe_collect() do {\
  |  |  |  |36046|  12.5M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 8.28M, False: 4.26M]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 12.5M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|  12.5M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|  12.5M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37072|  12.5M|        }
37073|  53.9M|    }
37074|       |
37075|  53.9M|    VM_OP(JOP_RESUME) {
  ------------------
  |  |36015|    111|#define VM_OP(op) label_##op :
  ------------------
37076|    111|        Janet retreg;
37077|    111|        vm_maybe_auto_suspend(1);
  ------------------
  |  |36069|    111|#define vm_maybe_auto_suspend(COND) do { \
  |  |36070|    111|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36070:9): [True: 111, Folded]
  |  |  |  Branch (36070:19): [True: 0, False: 111]
  |  |  ------------------
  |  |36071|      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
  |  |  ------------------
  |  |36072|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36034|      0|#define vm_return(sig, val) do { \
  |  |  |  |36035|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36036|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36037|      0|    return (sig); \
  |  |  |  |36038|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36038:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36073|      0|    } \
  |  |36074|    111|} while (0)
  |  |  ------------------
  |  |  |  Branch (36074:10): [Folded, False: 111]
  |  |  ------------------
  ------------------
37078|    111|        vm_assert_type(stack[B], JANET_FIBER);
  ------------------
  |  |36054|    111|#define vm_assert_type(X, T) do { \
  |  |36055|    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 (36055:9): [True: 0, False: 111]
  |  |  ------------------
  |  |36056|      0|        vm_commit(); \
  |  |  ------------------
  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36057|      0|        janet_panicf("expected %T, got %v", (1 << (T)), (X)); \
  |  |36058|      0|    } \
  |  |36059|    111|} while (0)
  |  |  ------------------
  |  |  |  Branch (36059:10): [Folded, False: 111]
  |  |  ------------------
  ------------------
37079|    111|        JanetFiber *child = janet_unwrap_fiber(stack[B]);
  ------------------
  |  |  854|    111|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
37080|    111|        if (janet_check_can_resume(child, &retreg, 0)) {
  ------------------
  |  Branch (37080:13): [True: 0, False: 111]
  ------------------
37081|      0|            vm_commit();
  ------------------
  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  ------------------
  ------------------
37082|      0|            janet_panicv(retreg);
37083|      0|        }
37084|    111|        fiber->child = child;
37085|    111|        JanetSignal sig = janet_continue_no_check(child, stack[C], &retreg);
  ------------------
  |  |35996|    111|#define C (*pc >> 24)
  ------------------
37086|    111|        stack = fiber->data + fiber->frame;
37087|    111|        if (sig != JANET_SIGNAL_OK && !(child->flags & (1 << sig))) {
  ------------------
  |  Branch (37087:13): [True: 77, False: 34]
  |  Branch (37087:39): [True: 38, False: 39]
  ------------------
37088|     38|            vm_return(sig, retreg);
  ------------------
  |  |36034|     38|#define vm_return(sig, val) do { \
  |  |36035|     38|    janet_vm.return_reg[0] = (val); \
  |  |36036|     38|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36028|     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 (36028:70): [Folded, False: 38]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36037|     38|    return (sig); \
  |  |36038|     38|} while (0)
  |  |  ------------------
  |  |  |  Branch (36038:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37089|     38|        }
37090|     73|        fiber->child = NULL;
37091|     73|        stack[A] = retreg;
  ------------------
  |  |35994|     73|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37092|     73|        vm_checkgc_pcnext();
  ------------------
  |  |36049|     73|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|     73|#define maybe_collect() do {\
  |  |  |  |36046|     73|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 0, False: 73]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 73]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|     73|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|     73|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37093|     73|    }
37094|       |
37095|      1|    VM_OP(JOP_SIGNAL) {
  ------------------
  |  |36015|      1|#define VM_OP(op) label_##op :
  ------------------
37096|      1|        int32_t s = C;
  ------------------
  |  |35996|      1|#define C (*pc >> 24)
  ------------------
37097|      1|        if (s > JANET_SIGNAL_USER9) s = JANET_SIGNAL_USER9;
  ------------------
  |  Branch (37097:13): [True: 0, False: 1]
  ------------------
37098|      1|        if (s < 0) s = 0;
  ------------------
  |  Branch (37098:13): [True: 0, False: 1]
  ------------------
37099|      1|        vm_return(s, stack[B]);
  ------------------
  |  |36034|      1|#define vm_return(sig, val) do { \
  |  |36035|      1|    janet_vm.return_reg[0] = (val); \
  |  |36036|      1|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36028|      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 (36028:70): [Folded, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36037|      1|    return (sig); \
  |  |36038|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (36038:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37100|      1|    }
37101|       |
37102|     13|    VM_OP(JOP_PROPAGATE) {
  ------------------
  |  |36015|     13|#define VM_OP(op) label_##op :
  ------------------
37103|     13|        Janet fv = stack[C];
  ------------------
  |  |35996|     13|#define C (*pc >> 24)
  ------------------
37104|     13|        vm_assert_type(fv, JANET_FIBER);
  ------------------
  |  |36054|     13|#define vm_assert_type(X, T) do { \
  |  |36055|     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 (36055:9): [True: 0, False: 13]
  |  |  ------------------
  |  |36056|      0|        vm_commit(); \
  |  |  ------------------
  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36057|      0|        janet_panicf("expected %T, got %v", (1 << (T)), (X)); \
  |  |36058|      0|    } \
  |  |36059|     13|} while (0)
  |  |  ------------------
  |  |  |  Branch (36059:10): [Folded, False: 13]
  |  |  ------------------
  ------------------
37105|     13|        JanetFiber *f = janet_unwrap_fiber(fv);
  ------------------
  |  |  854|     13|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
37106|     13|        JanetFiberStatus sub_status = janet_fiber_status(f);
37107|     13|        if (sub_status > JANET_STATUS_USER9) {
  ------------------
  |  Branch (37107:13): [True: 0, False: 13]
  ------------------
37108|      0|            vm_commit();
  ------------------
  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  ------------------
  ------------------
37109|      0|            janet_panicf("cannot propagate from fiber with status :%s",
37110|      0|                         janet_status_names[sub_status]);
37111|      0|        }
37112|     13|        fiber->child = f;
37113|     13|        vm_return((int) sub_status, stack[B]);
  ------------------
  |  |36034|     13|#define vm_return(sig, val) do { \
  |  |36035|     13|    janet_vm.return_reg[0] = (val); \
  |  |36036|     13|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36028|     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 (36028:70): [Folded, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36037|     13|    return (sig); \
  |  |36038|     13|} while (0)
  |  |  ------------------
  |  |  |  Branch (36038:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37114|     13|    }
37115|       |
37116|      0|    VM_OP(JOP_CANCEL) {
  ------------------
  |  |36015|      0|#define VM_OP(op) label_##op :
  ------------------
37117|      0|        Janet retreg;
37118|      0|        vm_assert_type(stack[B], JANET_FIBER);
  ------------------
  |  |36054|      0|#define vm_assert_type(X, T) do { \
  |  |36055|      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 (36055:9): [True: 0, False: 0]
  |  |  ------------------
  |  |36056|      0|        vm_commit(); \
  |  |  ------------------
  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36057|      0|        janet_panicf("expected %T, got %v", (1 << (T)), (X)); \
  |  |36058|      0|    } \
  |  |36059|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36059:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37119|      0|        JanetFiber *child = janet_unwrap_fiber(stack[B]);
  ------------------
  |  |  854|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
37120|      0|        if (janet_check_can_resume(child, &retreg, 1)) {
  ------------------
  |  Branch (37120:13): [True: 0, False: 0]
  ------------------
37121|      0|            vm_commit();
  ------------------
  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  ------------------
  ------------------
37122|      0|            janet_panicv(retreg);
37123|      0|        }
37124|      0|        fiber->child = child;
37125|      0|        JanetSignal sig = janet_continue_signal(child, stack[C], &retreg, JANET_SIGNAL_ERROR);
  ------------------
  |  |35996|      0|#define C (*pc >> 24)
  ------------------
37126|      0|        if (sig != JANET_SIGNAL_OK && !(child->flags & (1 << sig))) {
  ------------------
  |  Branch (37126:13): [True: 0, False: 0]
  |  Branch (37126:39): [True: 0, False: 0]
  ------------------
37127|      0|            vm_return(sig, retreg);
  ------------------
  |  |36034|      0|#define vm_return(sig, val) do { \
  |  |36035|      0|    janet_vm.return_reg[0] = (val); \
  |  |36036|      0|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36028|      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 (36028:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36037|      0|    return (sig); \
  |  |36038|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36038:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37128|      0|        }
37129|      0|        fiber->child = NULL;
37130|      0|        stack = fiber->data + fiber->frame;
37131|      0|        stack[A] = retreg;
  ------------------
  |  |35994|      0|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37132|      0|        vm_checkgc_pcnext();
  ------------------
  |  |36049|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|      0|#define maybe_collect() do {\
  |  |  |  |36046|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 0, False: 0]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37133|      0|    }
37134|       |
37135|   647k|    VM_OP(JOP_PUT)
  ------------------
  |  |36015|   647k|#define VM_OP(op) label_##op :
  ------------------
37136|   647k|    vm_commit();
  ------------------
  |  |36028|   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 (36028:70): [Folded, False: 647k]
  |  |  ------------------
  ------------------
37137|   647k|    fiber->flags |= JANET_FIBER_RESUME_NO_USEVAL;
  ------------------
  |  |  784|   647k|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
37138|   647k|    janet_put(stack[A], stack[B], stack[C]);
  ------------------
  |  |35994|   647k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  janet_put(stack[A], stack[B], stack[C]);
  ------------------
  |  |35995|   647k|#define B ((*pc >> 16) & 0xFF)
  ------------------
                  janet_put(stack[A], stack[B], stack[C]);
  ------------------
  |  |35996|   647k|#define C (*pc >> 24)
  ------------------
37139|   647k|    stack = fiber->data + fiber->frame;
37140|   647k|    fiber->flags &= ~JANET_FIBER_RESUME_NO_USEVAL;
  ------------------
  |  |  784|   647k|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
37141|   647k|    vm_checkgc_pcnext();
  ------------------
  |  |36049|   647k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|   647k|#define maybe_collect() do {\
  |  |  |  |36046|   647k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 220k, False: 427k]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 647k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|   647k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|   647k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37142|       |
37143|   647k|    VM_OP(JOP_PUT_INDEX)
  ------------------
  |  |36015|     17|#define VM_OP(op) label_##op :
  ------------------
37144|     17|    vm_commit();
  ------------------
  |  |36028|     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 (36028:70): [Folded, False: 17]
  |  |  ------------------
  ------------------
37145|     17|    fiber->flags |= JANET_FIBER_RESUME_NO_USEVAL;
  ------------------
  |  |  784|     17|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
37146|     17|    janet_putindex(stack[A], C, stack[B]);
  ------------------
  |  |35994|     17|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  janet_putindex(stack[A], C, stack[B]);
  ------------------
  |  |35996|     17|#define C (*pc >> 24)
  ------------------
                  janet_putindex(stack[A], C, stack[B]);
  ------------------
  |  |35995|     17|#define B ((*pc >> 16) & 0xFF)
  ------------------
37147|     17|    stack = fiber->data + fiber->frame;
37148|     17|    fiber->flags &= ~JANET_FIBER_RESUME_NO_USEVAL;
  ------------------
  |  |  784|     17|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
37149|     17|    vm_checkgc_pcnext();
  ------------------
  |  |36049|     17|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|     17|#define maybe_collect() do {\
  |  |  |  |36046|     17|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 0, False: 17]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|     17|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|     17|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37150|       |
37151|   109M|    VM_OP(JOP_IN)
  ------------------
  |  |36015|   109M|#define VM_OP(op) label_##op :
  ------------------
37152|   109M|    vm_commit();
  ------------------
  |  |36028|   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 (36028:70): [Folded, False: 109M]
  |  |  ------------------
  ------------------
37153|   109M|    {
37154|   109M|        Janet a = janet_in(stack[B], stack[C]);
  ------------------
  |  |35995|   109M|#define B ((*pc >> 16) & 0xFF)
  ------------------
                      Janet a = janet_in(stack[B], stack[C]);
  ------------------
  |  |35996|   109M|#define C (*pc >> 24)
  ------------------
37155|   109M|        stack = fiber->data + fiber->frame;
37156|   109M|        stack[A] = a;
  ------------------
  |  |35994|   109M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37157|   109M|    }
37158|   109M|    vm_pcnext();
  ------------------
  |  |36048|   109M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|   109M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37159|       |
37160|   109M|    VM_OP(JOP_GET)
  ------------------
  |  |36015|  13.5M|#define VM_OP(op) label_##op :
  ------------------
37161|  13.5M|    vm_commit();
  ------------------
  |  |36028|  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 (36028:70): [Folded, False: 13.5M]
  |  |  ------------------
  ------------------
37162|  13.5M|    {
37163|  13.5M|        Janet a = janet_get(stack[B], stack[C]);
  ------------------
  |  |35995|  13.5M|#define B ((*pc >> 16) & 0xFF)
  ------------------
                      Janet a = janet_get(stack[B], stack[C]);
  ------------------
  |  |35996|  13.5M|#define C (*pc >> 24)
  ------------------
37164|  13.5M|        stack = fiber->data + fiber->frame;
37165|  13.5M|        stack[A] = a;
  ------------------
  |  |35994|  13.5M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37166|  13.5M|    }
37167|  13.5M|    vm_pcnext();
  ------------------
  |  |36048|  13.5M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|  13.5M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37168|       |
37169|  13.5M|    VM_OP(JOP_GET_INDEX)
  ------------------
  |  |36015|   373k|#define VM_OP(op) label_##op :
  ------------------
37170|   373k|    vm_commit();
  ------------------
  |  |36028|   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 (36028:70): [Folded, False: 373k]
  |  |  ------------------
  ------------------
37171|   373k|    {
37172|   373k|        Janet a = janet_getindex(stack[B], C);
  ------------------
  |  |35995|   373k|#define B ((*pc >> 16) & 0xFF)
  ------------------
                      Janet a = janet_getindex(stack[B], C);
  ------------------
  |  |35996|   373k|#define C (*pc >> 24)
  ------------------
37173|   373k|        stack = fiber->data + fiber->frame;
37174|   373k|        stack[A] = a;
  ------------------
  |  |35994|   373k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37175|   373k|    }
37176|   373k|    vm_pcnext();
  ------------------
  |  |36048|   373k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|   373k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37177|       |
37178|  44.7M|    VM_OP(JOP_LENGTH)
  ------------------
  |  |36015|  44.7M|#define VM_OP(op) label_##op :
  ------------------
37179|  44.7M|    vm_commit();
  ------------------
  |  |36028|  44.7M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|  44.7M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|  44.7M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36028:70): [Folded, False: 44.7M]
  |  |  ------------------
  ------------------
37180|  44.7M|    {
37181|  44.7M|        Janet a = janet_lengthv(stack[E]);
  ------------------
  |  |35998|  44.7M|#define E (*pc >> 16)
  ------------------
37182|  44.7M|        stack = fiber->data + fiber->frame;
37183|  44.7M|        stack[A] = a;
  ------------------
  |  |35994|  44.7M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37184|  44.7M|    }
37185|  44.7M|    vm_pcnext();
  ------------------
  |  |36048|  44.7M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36017|  44.7M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37186|       |
37187|  44.7M|    VM_OP(JOP_MAKE_ARRAY) {
  ------------------
  |  |36015|  12.6M|#define VM_OP(op) label_##op :
  ------------------
37188|  12.6M|        int32_t count = fiber->stacktop - fiber->stackstart;
37189|  12.6M|        Janet *mem = fiber->data + fiber->stackstart;
37190|  12.6M|        stack[D] = janet_wrap_array(janet_array_n(mem, count));
  ------------------
  |  |35997|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37191|  12.6M|        fiber->stacktop = fiber->stackstart;
37192|  12.6M|        vm_checkgc_pcnext();
  ------------------
  |  |36049|  12.6M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|  12.6M|#define maybe_collect() do {\
  |  |  |  |36046|  12.6M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 8.09M, False: 4.51M]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 12.6M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|  12.6M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|  12.6M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37193|  12.6M|    }
37194|       |
37195|  12.6M|    VM_OP(JOP_MAKE_TUPLE)
  ------------------
  |  |36015|  2.06M|#define VM_OP(op) label_##op :
  ------------------
37196|       |    /* fallthrough */
37197|  2.64M|    VM_OP(JOP_MAKE_BRACKET_TUPLE) {
  ------------------
  |  |36015|  2.64M|#define VM_OP(op) label_##op :
  ------------------
37198|  2.64M|        int32_t count = fiber->stacktop - fiber->stackstart;
37199|  2.64M|        Janet *mem = fiber->data + fiber->stackstart;
37200|  2.64M|        const Janet *tup = janet_tuple_n(mem, count);
37201|  2.64M|        if (opcode == JOP_MAKE_BRACKET_TUPLE)
  ------------------
  |  |36018|  2.64M|#define opcode (*pc & 0xFF)
  ------------------
  |  Branch (37201:13): [True: 572k, False: 2.06M]
  ------------------
37202|   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
  ------------------
37203|  2.64M|        stack[D] = janet_wrap_tuple(tup);
  ------------------
  |  |35997|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37204|  2.64M|        fiber->stacktop = fiber->stackstart;
37205|  2.64M|        vm_checkgc_pcnext();
  ------------------
  |  |36049|  2.64M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|  2.64M|#define maybe_collect() do {\
  |  |  |  |36046|  2.64M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 523k, False: 2.11M]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 2.64M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|  2.64M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|  2.64M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37206|  2.64M|    }
37207|       |
37208|  2.64M|    VM_OP(JOP_MAKE_TABLE) {
  ------------------
  |  |36015|   234k|#define VM_OP(op) label_##op :
  ------------------
37209|   234k|        int32_t count = fiber->stacktop - fiber->stackstart;
37210|   234k|        Janet *mem = fiber->data + fiber->stackstart;
37211|   234k|        if (count & 1) {
  ------------------
  |  Branch (37211:13): [True: 1, False: 234k]
  ------------------
37212|      1|            vm_commit();
  ------------------
  |  |36028|      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 (36028:70): [Folded, False: 1]
  |  |  ------------------
  ------------------
37213|      1|            janet_panicf("expected even number of arguments to table constructor, got %d", count);
37214|      1|        }
37215|   234k|        JanetTable *table = janet_table(count / 2);
37216|   245k|        for (int32_t i = 0; i < count; i += 2)
  ------------------
  |  Branch (37216:29): [True: 10.2k, False: 234k]
  ------------------
37217|  10.2k|            janet_table_put(table, mem[i], mem[i + 1]);
37218|   234k|        stack[D] = janet_wrap_table(table);
  ------------------
  |  |35997|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37219|   234k|        fiber->stacktop = fiber->stackstart;
37220|   234k|        vm_checkgc_pcnext();
  ------------------
  |  |36049|   234k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|   234k|#define maybe_collect() do {\
  |  |  |  |36046|   234k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 40.7k, False: 194k]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 234k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|   234k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|   234k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37221|   234k|    }
37222|       |
37223|  10.4M|    VM_OP(JOP_MAKE_STRUCT) {
  ------------------
  |  |36015|  10.4M|#define VM_OP(op) label_##op :
  ------------------
37224|  10.4M|        int32_t count = fiber->stacktop - fiber->stackstart;
37225|  10.4M|        Janet *mem = fiber->data + fiber->stackstart;
37226|  10.4M|        if (count & 1) {
  ------------------
  |  Branch (37226:13): [True: 1, False: 10.4M]
  ------------------
37227|      1|            vm_commit();
  ------------------
  |  |36028|      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 (36028:70): [Folded, False: 1]
  |  |  ------------------
  ------------------
37228|      1|            janet_panicf("expected even number of arguments to struct constructor, got %d", count);
37229|      1|        }
37230|  10.4M|        JanetKV *st = janet_struct_begin(count / 2);
37231|   124M|        for (int32_t i = 0; i < count; i += 2)
  ------------------
  |  Branch (37231:29): [True: 113M, False: 10.4M]
  ------------------
37232|   113M|            janet_struct_put(st, mem[i], mem[i + 1]);
37233|  10.4M|        stack[D] = janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |35997|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37234|  10.4M|        fiber->stacktop = fiber->stackstart;
37235|  10.4M|        vm_checkgc_pcnext();
  ------------------
  |  |36049|  10.4M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|  10.4M|#define maybe_collect() do {\
  |  |  |  |36046|  10.4M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 6.98M, False: 3.43M]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 10.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|  10.4M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|  10.4M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37236|  10.4M|    }
37237|       |
37238|      0|    VM_OP(JOP_MAKE_STRING) {
  ------------------
  |  |36015|      0|#define VM_OP(op) label_##op :
  ------------------
37239|      0|        int32_t count = fiber->stacktop - fiber->stackstart;
37240|      0|        Janet *mem = fiber->data + fiber->stackstart;
37241|      0|        JanetBuffer buffer;
37242|      0|        janet_buffer_init(&buffer, 10 * count);
37243|      0|        for (int32_t i = 0; i < count; i++)
  ------------------
  |  Branch (37243:29): [True: 0, False: 0]
  ------------------
37244|      0|            janet_to_string_b(&buffer, mem[i]);
37245|      0|        stack[D] = janet_stringv(buffer.data, buffer.count);
  ------------------
  |  |35997|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37246|      0|        janet_buffer_deinit(&buffer);
37247|      0|        fiber->stacktop = fiber->stackstart;
37248|      0|        vm_checkgc_pcnext();
  ------------------
  |  |36049|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|      0|#define maybe_collect() do {\
  |  |  |  |36046|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 0, False: 0]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37249|      0|    }
37250|       |
37251|   102k|    VM_OP(JOP_MAKE_BUFFER) {
  ------------------
  |  |36015|   102k|#define VM_OP(op) label_##op :
  ------------------
37252|   102k|        int32_t count = fiber->stacktop - fiber->stackstart;
37253|   102k|        Janet *mem = fiber->data + fiber->stackstart;
37254|   102k|        JanetBuffer *buffer = janet_buffer(10 * count);
37255|   205k|        for (int32_t i = 0; i < count; i++)
  ------------------
  |  Branch (37255:29): [True: 102k, False: 102k]
  ------------------
37256|   102k|            janet_to_string_b(buffer, mem[i]);
37257|   102k|        stack[D] = janet_wrap_buffer(buffer);
  ------------------
  |  |35997|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37258|   102k|        fiber->stacktop = fiber->stackstart;
37259|   102k|        vm_checkgc_pcnext();
  ------------------
  |  |36049|   102k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36045|   102k|#define maybe_collect() do {\
  |  |  |  |36046|   102k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36046:9): [True: 3, False: 102k]
  |  |  |  |  |  Branch (36046:85): [Folded, False: 102k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36048|   102k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36017|   102k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37260|   102k|    }
37261|       |
37262|   102k|    VM_END()
  ------------------
  |  |36014|   102k|#define VM_END() }
  ------------------
37263|   102k|}
janet.c:janet_binop_call:
36282|  1.25k|static Janet janet_binop_call(const char *lmethod, const char *rmethod, Janet lhs, Janet rhs) {
36283|  1.25k|    Janet lm = janet_method_lookup(lhs, lmethod);
36284|  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36285|       |        /* Invert order for rmethod */
36286|    294|        Janet lr = janet_method_lookup(rhs, rmethod);
36287|    294|        Janet argv[2] = { rhs, lhs };
36288|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36289|    193|            janet_panicf("could not find method :%s for %v or :%s for %v",
36290|    193|                         lmethod, lhs,
36291|    193|                         rmethod, rhs);
36292|    193|        }
36293|    101|        return janet_method_invoke(lr, 2, argv);
36294|    961|    } else {
36295|    961|        Janet argv[2] = { lhs, rhs };
36296|    961|        return janet_method_invoke(lm, 2, argv);
36297|    961|    }
36298|  1.25k|}
janet.c:resolve_method:
36257|   313k|static Janet resolve_method(Janet name, JanetFiber *fiber) {
36258|   313k|    int32_t argc = fiber->stacktop - fiber->stackstart;
36259|   313k|    if (argc < 1) janet_panicf("method call (%v) takes at least 1 argument, got 0", name);
  ------------------
  |  Branch (36259:9): [True: 7, False: 313k]
  ------------------
36260|   313k|    Janet callee = method_to_fun(name, fiber->data[fiber->stackstart]);
36261|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36262|     20|        janet_panicf("unknown method %v invoked on %v", name, fiber->data[fiber->stackstart]);
36263|   313k|    return callee;
36264|   313k|}
janet.c:method_to_fun:
36252|   318k|static Janet method_to_fun(Janet method, Janet obj) {
36253|   318k|    return janet_get(obj, method);
36254|   318k|}
janet.c:call_nonfn:
36245|   864k|static Janet call_nonfn(JanetFiber *fiber, Janet callee) {
36246|   864k|    int32_t argc = fiber->stacktop - fiber->stackstart;
36247|   864k|    fiber->stacktop = fiber->stackstart;
36248|   864k|    return janet_method_invoke(callee, argc, fiber->data + fiber->stacktop);
36249|   864k|}
janet.c:janet_check_can_resume:
37402|   387k|static JanetSignal janet_check_can_resume(JanetFiber *fiber, Janet *out, int is_cancel) {
37403|       |    /* Check conditions */
37404|   387k|    JanetFiberStatus old_status = janet_fiber_status(fiber);
37405|   387k|    if (janet_vm.stackn >= JANET_RECURSION_GUARD) {
  ------------------
  |  |  291|   387k|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (37405:9): [True: 0, False: 387k]
  ------------------
37406|      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]
  |  |  ------------------
  ------------------
37407|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37408|      0|        return JANET_SIGNAL_ERROR;
37409|      0|    }
37410|       |    /* If a "task" fiber is trying to be used as a normal fiber, detect that. See bug #920.
37411|       |     * Fibers must be marked as root fibers manually, or by the ev scheduler. */
37412|   387k|    if (janet_vm.fiber != NULL && (fiber->gc.flags & JANET_FIBER_FLAG_ROOT)) {
  ------------------
  |  |  791|    114|#define JANET_FIBER_FLAG_ROOT 0x40000
  ------------------
  |  Branch (37412:9): [True: 114, False: 387k]
  |  Branch (37412:35): [True: 0, False: 114]
  ------------------
37413|      0|#ifdef JANET_EV
37414|      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]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37415|      0|                              ? "cannot cancel root fiber, use ev/cancel"
37416|      0|                              : "cannot resume root fiber, use ev/go");
37417|       |#else
37418|       |        *out = janet_cstringv(is_cancel
37419|       |                              ? "cannot cancel root fiber"
37420|       |                              : "cannot resume root fiber");
37421|       |#endif
37422|      0|        return JANET_SIGNAL_ERROR;
37423|      0|    }
37424|   387k|    if (old_status == JANET_STATUS_ALIVE ||
  ------------------
  |  Branch (37424:9): [True: 0, False: 387k]
  ------------------
37425|   387k|            old_status == JANET_STATUS_DEAD ||
  ------------------
  |  Branch (37425:13): [True: 0, False: 387k]
  ------------------
37426|   387k|            (old_status >= JANET_STATUS_USER0 && old_status <= JANET_STATUS_USER4) ||
  ------------------
  |  Branch (37426:14): [True: 387k, False: 0]
  |  Branch (37426:50): [True: 0, False: 387k]
  ------------------
37427|   387k|            old_status == JANET_STATUS_ERROR) {
  ------------------
  |  Branch (37427:13): [True: 0, False: 387k]
  ------------------
37428|      0|        const uint8_t *str = janet_formatc("cannot resume fiber with status :%s",
37429|      0|                                           janet_status_names[old_status]);
37430|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37431|      0|        return JANET_SIGNAL_ERROR;
37432|      0|    }
37433|   387k|    return JANET_SIGNAL_OK;
37434|   387k|}
janet.c:janet_continue_no_check:
37457|   387k|static JanetSignal janet_continue_no_check(JanetFiber *fiber, Janet in, Janet *out) {
37458|       |
37459|   387k|    JanetFiberStatus old_status = janet_fiber_status(fiber);
37460|       |
37461|   387k|#ifdef JANET_EV
37462|   387k|    janet_fiber_did_resume(fiber);
37463|   387k|#endif
37464|       |
37465|       |    /* Clear last value */
37466|   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37467|       |
37468|       |    /* Continue child fiber if it exists */
37469|   387k|    if (fiber->child) {
  ------------------
  |  Branch (37469:9): [True: 0, False: 387k]
  ------------------
37470|      0|        if (janet_vm.root_fiber == NULL) janet_vm.root_fiber = fiber;
  ------------------
  |  Branch (37470:13): [True: 0, False: 0]
  ------------------
37471|      0|        JanetFiber *child = fiber->child;
37472|      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
  |  |  ------------------
  ------------------
37473|      0|        janet_vm.stackn++;
37474|      0|        JanetSignal sig = janet_continue(child, in, &in);
37475|      0|        janet_vm.stackn--;
37476|      0|        if (janet_vm.root_fiber == fiber) janet_vm.root_fiber = NULL;
  ------------------
  |  Branch (37476:13): [True: 0, False: 0]
  ------------------
37477|      0|        if (sig != JANET_SIGNAL_OK && !(child->flags & (1 << sig))) {
  ------------------
  |  Branch (37477:13): [True: 0, False: 0]
  |  Branch (37477:39): [True: 0, False: 0]
  ------------------
37478|      0|            *out = in;
37479|      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]
  |  |  ------------------
  ------------------
37480|      0|            fiber->last_value = child->last_value;
37481|      0|            return sig;
37482|      0|        }
37483|       |        /* Check if we need any special handling for certain opcodes */
37484|      0|        switch (instr & 0x7F) {
37485|      0|            default:
  ------------------
  |  Branch (37485:13): [True: 0, False: 0]
  ------------------
37486|      0|                break;
37487|      0|            case JOP_NEXT: {
  ------------------
  |  Branch (37487:13): [True: 0, False: 0]
  ------------------
37488|      0|                if (sig == JANET_SIGNAL_OK ||
  ------------------
  |  Branch (37488:21): [True: 0, False: 0]
  ------------------
37489|      0|                        sig == JANET_SIGNAL_ERROR ||
  ------------------
  |  Branch (37489:25): [True: 0, False: 0]
  ------------------
37490|      0|                        sig == JANET_SIGNAL_USER0 ||
  ------------------
  |  Branch (37490:25): [True: 0, False: 0]
  ------------------
37491|      0|                        sig == JANET_SIGNAL_USER1 ||
  ------------------
  |  Branch (37491:25): [True: 0, False: 0]
  ------------------
37492|      0|                        sig == JANET_SIGNAL_USER2 ||
  ------------------
  |  Branch (37492:25): [True: 0, False: 0]
  ------------------
37493|      0|                        sig == JANET_SIGNAL_USER3 ||
  ------------------
  |  Branch (37493:25): [True: 0, False: 0]
  ------------------
37494|      0|                        sig == JANET_SIGNAL_USER4) {
  ------------------
  |  Branch (37494:25): [True: 0, False: 0]
  ------------------
37495|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37496|      0|                } else {
37497|      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)
  |  |  ------------------
  ------------------
37498|      0|                }
37499|      0|                break;
37500|      0|            }
37501|      0|        }
37502|      0|        fiber->child = NULL;
37503|      0|    }
37504|       |
37505|       |    /* Handle new fibers being resumed with a non-nil value */
37506|   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 (37506:9): [True: 387k, False: 46]
  |  Branch (37506:43): [True: 185, False: 387k]
  ------------------
37507|    185|        Janet *stack = fiber->data + fiber->frame;
37508|    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
  |  |  ------------------
  ------------------
37509|    185|        if (func) {
  ------------------
  |  Branch (37509:13): [True: 185, False: 0]
  ------------------
37510|    185|            if (func->def->arity > 0) {
  ------------------
  |  Branch (37510:17): [True: 2, False: 183]
  ------------------
37511|      2|                stack[0] = in;
37512|    183|            } else if (func->def->flags & JANET_FUNCDEF_FLAG_VARARG) {
  ------------------
  |  | 1088|    183|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
  |  Branch (37512:24): [True: 41, False: 142]
  ------------------
37513|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37514|     41|            }
37515|    185|        }
37516|    185|    }
37517|       |
37518|       |    /* If this is a nested continue (root_fiber already set), root the fiber
37519|       |     * so it survives GC. janet_collect only marks root_fiber, so without
37520|       |     * this a nested fiber (e.g., from janet_pcall in a C function) would be
37521|       |     * invisible to GC and could be collected while actively running. */
37522|   387k|    int fiber_rooted = (janet_vm.root_fiber != NULL);
37523|   387k|    if (fiber_rooted) {
  ------------------
  |  Branch (37523:9): [True: 114, False: 387k]
  ------------------
37524|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37525|    114|    }
37526|       |
37527|       |    /* Save global state */
37528|   387k|    JanetTryState tstate;
37529|   387k|    JanetSignal sig = janet_try(&tstate);
  ------------------
  |  | 1971|   387k|#define janet_try(state) (janet_try_init(state), (JanetSignal) setjmp((state)->buf))
  ------------------
37530|   387k|    if (!sig) {
  ------------------
  |  Branch (37530:9): [True: 387k, False: 0]
  ------------------
37531|       |        /* Normal setup */
37532|   387k|        if (janet_vm.root_fiber == NULL) janet_vm.root_fiber = fiber;
  ------------------
  |  Branch (37532:13): [True: 387k, False: 114]
  ------------------
37533|   387k|        janet_vm.fiber = fiber;
37534|   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]
  |  |  ------------------
  ------------------
37535|   387k|        sig = run_vm(fiber, in);
37536|   387k|    }
37537|       |
37538|       |    /* Restore */
37539|   387k|    if (janet_vm.root_fiber == fiber) janet_vm.root_fiber = NULL;
  ------------------
  |  Branch (37539:9): [True: 387k, False: 114]
  ------------------
37540|   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]
  |  |  ------------------
  ------------------
37541|   387k|    janet_restore(&tstate);
37542|   387k|    if (fiber_rooted) {
  ------------------
  |  Branch (37542:9): [True: 114, False: 387k]
  ------------------
37543|    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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37544|    114|    }
37545|   387k|    fiber->last_value = tstate.payload;
37546|   387k|    *out = tstate.payload;
37547|       |
37548|   387k|    return sig;
37549|   387k|}
janet.c:janet_method_lookup:
36267|  4.95k|static Janet janet_method_lookup(Janet x, const char *name) {
36268|  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36269|  4.95k|}
janet.c:janet_method_invoke:
36207|   869k|static Janet janet_method_invoke(Janet method, int32_t argc, Janet *argv) {
36208|   869k|    switch (janet_type(method)) {
  ------------------
  |  |  790|   869k|    (isnan((x).number) \
  |  |  791|   869k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   869k|        : JANET_NUMBER)
  ------------------
  |  Branch (36208:13): [True: 869k, False: 27]
  ------------------
36209|  4.44k|        case JANET_CFUNCTION:
  ------------------
  |  Branch (36209:9): [True: 4.44k, False: 864k]
  ------------------
36210|  4.44k|            return (janet_unwrap_cfunction(method))(argc, argv);
  ------------------
  |  |  864|  4.44k|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
36211|      0|        case JANET_FUNCTION: {
  ------------------
  |  Branch (36211:9): [True: 0, False: 869k]
  ------------------
36212|      0|            JanetFunction *fun = janet_unwrap_function(method);
  ------------------
  |  |  863|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
36213|      0|            return janet_call(fun, argc, argv);
36214|      0|        }
36215|   408k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (36215:9): [True: 408k, False: 460k]
  ------------------
36216|   408k|            JanetAbstract abst = janet_unwrap_abstract(method);
  ------------------
  |  |  861|   408k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
36217|   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)))
  |  |  ------------------
  ------------------
36218|   408k|            if (NULL != at->call) {
  ------------------
  |  Branch (36218:17): [True: 0, False: 408k]
  ------------------
36219|      0|                return at->call(abst, argc, argv);
36220|      0|            }
36221|   408k|        }
36222|       |        /* fallthrough */
36223|   408k|        case JANET_STRING:
  ------------------
  |  Branch (36223:9): [True: 2, False: 869k]
  ------------------
36224|   408k|        case JANET_BUFFER:
  ------------------
  |  Branch (36224:9): [True: 16, False: 869k]
  ------------------
36225|   661k|        case JANET_TABLE:
  ------------------
  |  Branch (36225:9): [True: 253k, False: 616k]
  ------------------
36226|   661k|        case JANET_STRUCT:
  ------------------
  |  Branch (36226:9): [True: 2, False: 869k]
  ------------------
36227|   701k|        case JANET_ARRAY:
  ------------------
  |  Branch (36227:9): [True: 39.9k, False: 829k]
  ------------------
36228|   864k|        case JANET_TUPLE: {
  ------------------
  |  Branch (36228:9): [True: 163k, False: 705k]
  ------------------
36229|   864k|            if (argc != 1) {
  ------------------
  |  Branch (36229:17): [True: 24, False: 864k]
  ------------------
36230|     24|                janet_panicf("%v called with %d arguments, possibly expected 1", method, argc);
36231|     24|            }
36232|   864k|            return janet_in(method, argv[0]);
36233|   864k|        }
36234|     45|        default: {
  ------------------
  |  Branch (36234:9): [True: 45, False: 869k]
  ------------------
36235|     45|            if (argc != 1) {
  ------------------
  |  Branch (36235:17): [True: 17, False: 28]
  ------------------
36236|     17|                janet_panicf("%v called with %d arguments, possibly expected 1", method, argc);
36237|     17|            }
36238|     28|            return janet_in(argv[0], method);
36239|     45|        }
36240|   869k|    }
36241|   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|}

