LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/gc.c
// Function: janet_mark_table
static void janet_mark_table(JanetTable *table) {
recur: /* Manual tail recursion */
    if (janet_gc_reachable(table))
        return;
    janet_gc_mark(table);
    enum JanetMemoryType memtype = janet_gc_type(table);
    if (memtype == JANET_MEMORY_TABLE_WEAKK) {
        janet_mark_values(table->data, table->capacity);
    } else if (memtype == JANET_MEMORY_TABLE_WEAKV) {
        janet_mark_keys(table->data, table->capacity);
    } else if (memtype == JANET_MEMORY_TABLE) {
        janet_mark_kvs(table->data, table->capacity);
    }
    /* do nothing for JANET_MEMORY_TABLE_WEAKKV */
    if (table->proto) {
        table = table->proto;
        goto recur;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rbx), %eax
btl $0x8, %eax
jb 0x2b41a
movl %eax, %ecx
orl $0x100, %ecx            # imm = 0x100
movl %ecx, (%rbx)
cmpb $0x5, %al
je 0x2b401
movzbl %al, %eax
cmpl $0xf, %eax
je 0x2b3da
cmpl $0xe, %eax
jne 0x2b40d
movslq 0x14(%rbx), %r14
testq %r14, %r14
jle 0x2b40d
movq 0x20(%rbx), %r15
shlq $0x4, %r14
addq %r15, %r14
movq 0x8(%r15), %rdi
callq 0x2b15b
addq $0x10, %r15
cmpq %r14, %r15
jb 0x2b3c6
jmp 0x2b40d
movslq 0x14(%rbx), %r14
testq %r14, %r14
jle 0x2b40d
movq 0x20(%rbx), %r15
shlq $0x4, %r14
addq %r15, %r14
movq (%r15), %rdi
callq 0x2b15b
addq $0x10, %r15
cmpq %r14, %r15
jb 0x2b3ee
jmp 0x2b40d
movq 0x20(%rbx), %rdi
movl 0x14(%rbx), %esi
callq 0x2c215
movq 0x28(%rbx), %rbx
testq %rbx, %rbx
jne 0x2b38b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/gc.c
// Function: janet_mark_fiber
static void janet_mark_fiber(JanetFiber *fiber) {
    int32_t i, j;
    JanetStackFrame *frame;
recur:
    if (janet_gc_reachable(fiber))
        return;
    janet_gc_mark(fiber);

    janet_mark(fiber->last_value);

    /* Mark values on the argument stack */
    janet_mark_many(fiber->data + fiber->stackstart,
                    fiber->stacktop - fiber->stackstart);

    i = fiber->frame;
    j = fiber->stackstart - JANET_FRAME_SIZE;
    while (i > 0) {
        frame = (JanetStackFrame *)(fiber->data + i - JANET_FRAME_SIZE);
        if (NULL != frame->func)
            janet_mark_function(frame->func);
        if (NULL != frame->env)
            janet_mark_funcenv(frame->env);
        /* Mark all values in the stack frame */
        janet_mark_many(fiber->data + i, j - i);
        j = i - JANET_FRAME_SIZE;
        i = frame->prevframe;
    }

    if (fiber->env)
        janet_mark_table(fiber->env);

#ifdef JANET_EV
    if (fiber->supervisor_channel) {
        janet_mark_abstract(fiber->supervisor_channel);
    }
    if (fiber->ev_stream) {
        janet_mark_abstract(fiber->ev_stream);
    }
    if (fiber->ev_callback) {
        fiber->ev_callback(fiber, JANET_ASYNC_EVENT_MARK);
    }
#endif

    /* Explicit tail recursion */
    if (fiber->child) {
        fiber = fiber->child;
        goto recur;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movl (%r15), %eax
btl $0x8, %eax
jb 0x2b54b
orl $0x100, %eax            # imm = 0x100
movl %eax, (%r15)
movq 0x40(%r15), %rdi
callq 0x2b15b
movq 0x30(%r15), %rax
testq %rax, %rax
je 0x2b485
movslq 0x18(%r15), %rcx
movslq 0x1c(%r15), %rdx
subq %rcx, %rdx
testl %edx, %edx
jle 0x2b485
leaq (%rax,%rcx,8), %rbx
leaq (%rbx,%rdx,8), %r14
movq (%rbx), %rdi
callq 0x2b15b
addq $0x8, %rbx
cmpq %r14, %rbx
jb 0x2b474
movl 0x14(%r15), %eax
testl %eax, %eax
jle 0x2b501
movl 0x18(%r15), %r13d
movq %r15, -0x30(%rbp)
movl %eax, %r14d
movq 0x30(%r15), %r15
movl %eax, %r12d
movq -0x20(%r15,%r12,8), %rdi
testq %rdi, %rdi
je 0x2b4ae
callq 0x2b31d
movq -0x10(%r15,%r12,8), %rdi
testq %rdi, %rdi
je 0x2b4bd
callq 0x2c24c
addl $-0x4, %r13d
subl %r12d, %r13d
testl %r13d, %r13d
jle 0x2b4f1
leaq (,%r12,8), %rbx
movq -0x30(%rbp), %rax
addq 0x30(%rax), %rbx
movslq %r13d, %rax
leaq (%rbx,%rax,8), %r13
movq (%rbx), %rdi
callq 0x2b15b
addq $0x8, %rbx
cmpq %r13, %rbx
jb 0x2b4e0
movl -0x8(%r15,%r12,8), %eax
movl %r14d, %r13d
testl %eax, %eax
movq -0x30(%rbp), %r15
jg 0x2b495
movq 0x28(%r15), %rdi
testq %rdi, %rdi
je 0x2b50f
callq 0x2b37e
movq 0x68(%r15), %rdi
testq %rdi, %rdi
je 0x2b51d
callq 0x2b55a
movq 0x58(%r15), %rdi
testq %rdi, %rdi
je 0x2b52b
callq 0x2b55a
movq 0x50(%r15), %rax
testq %rax, %rax
je 0x2b53e
movq %r15, %rdi
movl $0x1, %esi
callq *%rax
movq 0x38(%r15), %r15
testq %r15, %r15
jne 0x2b436
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/gc.c
// Function: janet_mark_abstract
static void janet_mark_abstract(void *adata) {
#ifdef JANET_EV
    /* Check if abstract type is a threaded abstract type. If it is, marking means
     * updating the threaded_abstract table. */
    if ((janet_abstract_head(adata)->gc.flags & JANET_MEM_TYPEBITS) == JANET_MEMORY_THREADED_ABSTRACT) {
        janet_table_put(&janet_vm.threaded_abstracts, janet_wrap_abstract(adata), janet_wrap_true());
        return;
    }
#endif
    if (janet_gc_reachable(janet_abstract_head(adata)))
        return;
    janet_gc_mark(janet_abstract_head(adata));
    if (janet_abstract_head(adata)->type->gcmark) {
        janet_abstract_head(adata)->type->gcmark(adata, janet_abstract_size(adata));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl -0x20(%rdi), %eax
cmpb $0xd, %al
jne 0x2b5b8
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
leaq 0x268(%rax), %r14
movabsq $-0x1000000000000, %rsi # imm = 0xFFFF000000000000
movq %rbx, %rdi
callq 0x4f9f2
movq %rax, %rbx
movabsq $-0x6ffffffffffff, %rdi # imm = 0xFFF9000000000001
callq 0x4f95a
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x481b3
btl $0x8, %eax
jb 0x2b5e0
orl $0x100, %eax            # imm = 0x100
movl %eax, -0x20(%rbx)
movq -0x10(%rbx), %rax
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x2b5e0
movq -0x8(%rbx), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/gc.c
// Function: janet_gcroot
void janet_gcroot(Janet root) {
    size_t newcount = janet_vm.root_count + 1;
    if (newcount > janet_vm.root_capacity) {
        size_t newcap = 2 * newcount;
        janet_vm.roots = janet_realloc(janet_vm.roots, sizeof(Janet) * newcap);
        if (NULL == janet_vm.roots) {
            JANET_OUT_OF_MEMORY;
        }
        janet_vm.root_capacity = newcap;
    }
    janet_vm.roots[janet_vm.root_count] = root;
    janet_vm.root_count = newcount;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq %rax, %r14
movq 0xc8(%rax), %r15
incq %r15
cmpq 0xd0(%rax), %r15
jbe 0x2b642
movq 0xc0(%r14), %rdi
movq %r15, %rsi
shlq $0x4, %rsi
callq 0x12850
movq %rax, 0xc0(%r14)
testq %rax, %rax
je 0x2b666
leaq (%r15,%r15), %rax
movq %rax, 0xd0(%r14)
movq 0xc0(%r14), %rax
movq 0xc8(%r14), %rcx
movq %rbx, (%rax,%rcx,8)
movq %r15, 0xc8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x13824
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/gc.c
// Function: janet_check_liveref
static int janet_check_liveref(Janet x) {
    switch (janet_type(x)) {
        default:
            return 1;
        case JANET_ARRAY:
        case JANET_TABLE:
        case JANET_FUNCTION:
        case JANET_BUFFER:
        case JANET_FIBER:
            return janet_gc_reachable(janet_unwrap_pointer(x));
        case JANET_STRING:
        case JANET_SYMBOL:
        case JANET_KEYWORD:
            return janet_gc_reachable(janet_string_head(janet_unwrap_string(x)));
        case JANET_ABSTRACT:
            return janet_gc_reachable(janet_abstract_head(janet_unwrap_abstract(x)));
        case JANET_TUPLE:
            return janet_gc_reachable(janet_tuple_head(janet_unwrap_tuple(x)));
        case JANET_STRUCT:
            return janet_gc_reachable(janet_struct_head(janet_unwrap_struct(x)));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %xmm0
movq %rdi, %rcx
shrq $0x2f, %rcx
andl $0xf, %ecx
xorl %eax, %eax
ucomisd %xmm0, %xmm0
cmovpl %ecx, %eax
movl $0x1, %ecx
addl $-0x3, %eax
cmpl $0xb, %eax
ja 0x2ba1d
leaq 0x332d9(%rip), %rdx     # 0x5ecc0
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
callq 0x4f838
jmp 0x2ba16
callq 0x4f838
addq $-0x18, %rax
jmp 0x2ba16
callq 0x4f838
addq $-0x20, %rax
jmp 0x2ba16
callq 0x4f838
addq $-0x28, %rax
movl $0x100, %ecx            # imm = 0x100
andl (%rax), %ecx
movl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/gc.c
// Function: janet_gcalloc
void *janet_gcalloc(enum JanetMemoryType type, size_t size) {
    JanetGCObject *mem;

    /* Make sure everything is inited */
    janet_assert(NULL != janet_vm.cache, "please initialize janet before use");
    mem = janet_malloc(size);

    /* Check for bad malloc */
    if (NULL == mem) {
        JANET_OUT_OF_MEMORY;
    }

    /* Configure block */
    mem->flags = type;

    /* Prepend block to heap list */
    janet_vm.next_collection += size;
    if (type < JANET_MEMORY_TABLE_WEAKK) {
        /* normal heap */
        mem->data.next = janet_vm.blocks;
        janet_vm.blocks = mem;
    } else {
        /* weak heap */
        mem->data.next = janet_vm.weak_blocks;
        janet_vm.weak_blocks = mem;
    }
    janet_vm.block_count++;

    return (void *)mem;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movl %edi, %r14d
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
cmpq $0x0, 0x70(%rax)
je 0x2bb88
movq %rax, %rbx
movq %r15, %rdi
callq 0x12770
testq %rax, %rax
je 0x2bb8d
addq %r15, 0xa8(%rbx)
movl %r14d, (%rax)
xorl %ecx, %ecx
cmpl $0xe, %r14d
setae %cl
movq 0x90(%rbx,%rcx,8), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x90(%rbx,%rcx,8)
incq 0xb0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x138ec
callq 0x138bc
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/gc.c
// Function: janet_collect
void janet_collect(void) {
    uint32_t i;
    if (janet_vm.gc_suspend) return;
    depth = JANET_RECURSION_GUARD;
    janet_vm.gc_mark_phase = 1;
    /* Try to prevent many major collections back to back.
     * A full collection will take O(janet_vm.block_count) time.
     * If we have a large heap, make sure our interval is not too
     * small so we won't make many collections over it. This is just a
     * heuristic for automatically changing the gc interval */
    if (janet_vm.block_count * 8 > janet_vm.gc_interval) {
        janet_vm.gc_interval = janet_vm.block_count * sizeof(JanetGCObject);
    }
    orig_rootcount = janet_vm.root_count;
#ifdef JANET_EV
    janet_ev_mark();
#endif
    janet_mark_fiber(janet_vm.root_fiber);
    for (i = 0; i < orig_rootcount; i++)
        janet_mark(janet_vm.roots[i]);
    while (orig_rootcount < janet_vm.root_count) {
        Janet x = janet_vm.roots[--janet_vm.root_count];
        janet_mark(x);
    }
    janet_vm.gc_mark_phase = 0;
    janet_sweep();
    janet_vm.next_collection = 0;
    janet_free_all_scratch();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
cmpl $0x0, 0xb8(%rax)
je 0x2bbc0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %fs:0x0, %rax
movl $0x400, -0x358(%rax)    # imm = 0x400
movl $0x1, 0xbc(%rbx)
movq 0xb0(%rbx), %rcx
leaq (,%rcx,8), %rdx
cmpq 0xa0(%rbx), %rdx
jbe 0x2bc06
shlq $0x4, %rcx
movq %rcx, 0xa0(%rbx)
movq 0xc8(%rbx), %rcx
leaq -0x350(%rax), %r14
movq %rcx, (%r14)
callq 0x22cfe
movq 0x28(%rbx), %rdi
callq 0x2b425
cmpq $0x0, (%r14)
je 0x2bc6c
movl $0x1, %r15d
xorl %eax, %eax
movq 0xc0(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
callq 0x2b15b
movl %r15d, %eax
incl %r15d
cmpq %rax, (%r14)
ja 0x2bc33
jmp 0x2bc6c
movq 0xc0(%rbx), %rcx
leaq -0x1(%rax), %rdx
movq %rdx, 0xc8(%rbx)
movq -0x8(%rcx,%rax,8), %rdi
callq 0x2b15b
movq 0xc8(%rbx), %rax
cmpq %rax, (%r14)
jb 0x2bc50
movl $0x0, 0xbc(%rbx)
callq 0x2b66b
movq $0x0, 0xa8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2bc9e
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/gc.c
// Function: janet_gcunroot
int janet_gcunroot(Janet root) {
    Janet *vtop = janet_vm.roots + janet_vm.root_count;
    /* Search from top to bottom as access is most likely LIFO */
    for (Janet *v = janet_vm.roots; v < vtop; v++) {
        if (janet_gc_idequals(root, *v)) {
            *v = janet_vm.roots[--janet_vm.root_count];
            return 1;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq 0xc8(%rax), %r13
testq %r13, %r13
setg %r15b
jle 0x2bda1
movq %rax, %rbx
movq 0xc0(%rax), %r12
movq (%r12), %rsi
movq %r14, %rdi
callq 0x2bdb4
testl %eax, %eax
jne 0x2bd7f
leaq (%r12,%r13,8), %r13
addq $0x8, %r12
cmpq %r13, %r12
setb %r15b
jae 0x2bda1
movq (%r12), %rsi
movq %r14, %rdi
callq 0x2bdb4
addq $0x8, %r12
testl %eax, %eax
je 0x2bd5e
addq $-0x8, %r12
movq 0xc0(%rbx), %rax
movq 0xc8(%rbx), %rcx
leaq -0x1(%rcx), %rdx
movq %rdx, 0xc8(%rbx)
movq -0x8(%rax,%rcx,8), %rax
movq %rax, (%r12)
movzbl %r15b, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/gc.c
// Function: janet_gcunrootall
int janet_gcunrootall(Janet root) {
    Janet *vtop = janet_vm.roots + janet_vm.root_count;
    int ret = 0;
    /* Search from top to bottom as access is most likely LIFO */
    for (Janet *v = janet_vm.roots; v < vtop; v++) {
        if (janet_gc_idequals(root, *v)) {
            *v = janet_vm.roots[--janet_vm.root_count];
            vtop--;
            ret = 1;
        }
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq %rax, %r14
movq 0xc8(%rax), %rax
testq %rax, %rax
jle 0x2be9f
movq 0xc0(%r14), %r12
leaq (%r12,%rax,8), %r13
xorl %r15d, %r15d
movq (%r12), %rsi
movq %rbx, %rdi
callq 0x2bdb4
testl %eax, %eax
je 0x2be94
movq 0xc0(%r14), %rax
movq 0xc8(%r14), %rcx
leaq -0x1(%rcx), %rdx
movq %rdx, 0xc8(%r14)
movq -0x8(%rax,%rcx,8), %rax
movq %rax, (%r12)
addq $-0x8, %r13
movl $0x1, %r15d
addq $0x8, %r12
cmpq %r13, %r12
jb 0x2be58
jmp 0x2bea2
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/gc.c
// Function: janet_clear_memory
void janet_clear_memory(void) {
#ifdef JANET_EV
    JanetKV *items = janet_vm.threaded_abstracts.data;
    for (int32_t i = 0; i < janet_vm.threaded_abstracts.capacity; i++) {
        if (janet_checktype(items[i].key, JANET_ABSTRACT)) {
            void *abst = janet_unwrap_abstract(items[i].key);
            if (0 == janet_abstract_decref(abst)) {
                JanetAbstractHead *head = janet_abstract_head(abst);
                if (head->type->gc) {
                    janet_assert(!head->type->gc(head->data, head->size), "finalizer failed");
                }
                janet_free(janet_abstract_head(abst));
            }
        }
    }
#endif
    JanetGCObject *current = janet_vm.blocks;
    while (NULL != current) {
        janet_deinit_block(current);
        JanetGCObject *next = current->data.next;
        janet_free(current);
        current = next;
    }
    janet_vm.blocks = NULL;
    janet_free_all_scratch();
    janet_free(janet_vm.scratch_mem);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq %rax, %rbx
cmpl $0x0, 0x27c(%rax)
jle 0x2bf43
movq 0x288(%rbx), %r15
xorl %r12d, %r12d
movq (%r15), %rdi
movq %rdi, %rax
shrq $0x2f, %rax
cmpl $0x1fffe, %eax          # imm = 0x1FFFE
jne 0x2bf30
callq 0x4f838
movq %rax, %r14
movq %rax, %rdi
callq 0x14691
testl %eax, %eax
jne 0x2bf30
movq -0x10(%r14), %rax
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x2bf24
movq -0x8(%r14), %rsi
movq %r14, %rdi
callq *%rax
testl %eax, %eax
jne 0x2bf8f
addq $-0x20, %r14
movq %r14, %rdi
callq 0x120b0
incq %r12
movslq 0x27c(%rbx), %rax
addq $0x10, %r15
cmpq %rax, %r12
jl 0x2bee5
movq 0x90(%rbx), %r14
testq %r14, %r14
je 0x2bf6b
movq %r14, %rdi
callq 0x2ba21
movq 0x8(%r14), %r15
movq %r14, %rdi
callq 0x120b0
movq %r15, %r14
testq %r15, %r15
jne 0x2bf4f
movq $0x0, 0x90(%rbx)
callq 0x2bc9e
movq 0xd8(%rbx), %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x120b0
callq 0x13920
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/gc.c
// Function: janet_smalloc
void *janet_smalloc(size_t size) {
    JanetScratch *s = janet_malloc(sizeof(JanetScratch) + size);
    if (NULL == s) {
        JANET_OUT_OF_MEMORY;
    }
    s->finalize = NULL;
    if (janet_vm.scratch_len == janet_vm.scratch_cap) {
        size_t newcap = 2 * janet_vm.scratch_cap + 2;
        JanetScratch **newmem = (JanetScratch **) janet_realloc(janet_vm.scratch_mem, newcap * sizeof(JanetScratch));
        if (NULL == newmem) {
            JANET_OUT_OF_MEMORY;
        }
        janet_vm.scratch_cap = newcap;
        janet_vm.scratch_mem = newmem;
    }
    janet_vm.scratch_mem[janet_vm.scratch_len++] = s;
    return (char *)(s->mem);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
addq $0x8, %rdi
callq 0x12770
testq %rax, %rax
je 0x2c08b
movq %rax, %rbx
movq $0x0, (%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq %rax, %r14
movq 0xe0(%rax), %r15
cmpq %r15, 0xe8(%rax)
jne 0x2c05c
leaq (%r15,%r15), %rax
movq 0xd8(%r14), %rdi
leaq 0x10(,%rax,8), %rsi
callq 0x12850
testq %rax, %rax
je 0x2c090
leaq 0x2(,%r15,2), %rcx
movq %rcx, 0xe0(%r14)
movq %rax, 0xd8(%r14)
movq 0xd8(%r14), %rax
movq 0xe8(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0xe8(%r14)
movq %rbx, (%rax,%rcx,8)
addq $0x8, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x13984
callq 0x13954
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/gc.c
// Function: janet_scalloc
void *janet_scalloc(size_t nmemb, size_t size) {
    if (nmemb && size > SIZE_MAX / nmemb) {
        JANET_OUT_OF_MEMORY;
    }
    size_t n = nmemb * size;
    void *p = janet_smalloc(n);
    memset(p, 0, n);
    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rdi, %rdi
je 0x2c0ab
movq %rdi, %rax
mulq %rbx
jo 0x2c0ca
imulq %rdi, %rbx
movq %rbx, %rdi
callq 0x2bfe0
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x12410
callq 0x139b4
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/gc.c
// Function: janet_srealloc
void *janet_srealloc(void *mem, size_t size) {
    if (NULL == mem) return janet_smalloc(size);
    JanetScratch *s = janet_mem2scratch(mem);
    if (janet_vm.scratch_len) {
        for (size_t i = janet_vm.scratch_len - 1; ; i--) {
            if (janet_vm.scratch_mem[i] == s) {
                JanetScratch *news = janet_realloc(s, size + sizeof(JanetScratch));
                if (NULL == news) {
                    JANET_OUT_OF_MEMORY;
                }
                janet_vm.scratch_mem[i] = news;
                return (char *)(news->mem);
            }
            if (i == 0) break;
        }
    }
    JANET_EXIT("invalid janet_srealloc");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
testq %rdi, %rdi
je 0x2c126
movq %rdi, %rbx
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq 0xe8(%rax), %r12
testq %r12, %r12
je 0x2c173
movq %rax, %r15
addq $-0x8, %rbx
movq 0xd8(%rax), %rcx
movq -0x8(%rcx,%r12,8), %r13
decq %r12
cmpq %rbx, %r13
je 0x2c13c
testq %r12, %r12
jne 0x2c112
jmp 0x2c15f
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2bfe0
addq $0x8, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x12850
testq %rax, %rax
je 0x2c178
movq 0xd8(%r15), %rcx
movq %rax, (%rcx,%r12,8)
addq $0x8, %rax
cmpq %rbx, %r13
jne 0x2c173
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x13a14
callq 0x139e4
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/gc.c
// Function: janet_sfree
void janet_sfree(void *mem) {
    if (NULL == mem) return;
    JanetScratch *s = janet_mem2scratch(mem);
    if (janet_vm.scratch_len) {
        for (size_t i = janet_vm.scratch_len - 1; ; i--) {
            if (janet_vm.scratch_mem[i] == s) {
                janet_vm.scratch_mem[i] = janet_vm.scratch_mem[--janet_vm.scratch_len];
                free_one_scratch(s);
                return;
            }
            if (i == 0) break;
        }
    }
    JANET_EXIT("invalid janet_sfree");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2c205
movq %rdi, %rbx
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq 0xe8(%rax), %rcx
testq %rcx, %rcx
je 0x2c210
leaq -0x8(%rbx), %r14
movq 0xd8(%rax), %rdx
movq %rcx, %rsi
movq -0x8(%rdx,%rsi,8), %r15
decq %rsi
cmpq %r14, %r15
je 0x2c1d7
testq %rsi, %rsi
jne 0x2c1c3
jmp 0x2c200
leaq -0x1(%rcx), %rdi
movq %rdi, 0xe8(%rax)
movq -0x8(%rdx,%rcx,8), %rax
movq %rax, (%rdx,%rsi,8)
movq (%r14), %rax
testq %rax, %rax
je 0x2c1f8
movq %rbx, %rdi
callq *%rax
movq %r14, %rdi
callq 0x120b0
cmpq %r14, %r15
jne 0x2c210
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x13a48
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/gc.c
// Function: janet_mark_kvs
static void janet_mark_kvs(const JanetKV *kvs, int32_t n) {
    const JanetKV *end = kvs + n;
    while (kvs < end) {
        janet_mark(kvs->key);
        janet_mark(kvs->value);
        kvs++;
    }
}

// Assembly:
testl %esi, %esi
jle 0x2c24b
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq %esi, %r14
shlq $0x4, %r14
addq %rdi, %r14
movq (%rbx), %rdi
callq 0x2b15b
movq 0x8(%rbx), %rdi
callq 0x2b15b
addq $0x10, %rbx
cmpq %r14, %rbx
jb 0x2c22d
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/gc.c
// Function: janet_mark_funcenv
static void janet_mark_funcenv(JanetFuncEnv *env) {
    if (janet_gc_reachable(env))
        return;
    janet_gc_mark(env);
    /* If closure env references a dead fiber, we can just copy out the stack frame we need so
     * we don't need to keep around the whole dead fiber. */
    janet_env_maybe_detach(env);
    if (env->offset > 0) {
        /* On stack */
        janet_mark_fiber(env->as.fiber);
    } else {
        /* Not on stack */
        janet_mark_many(env->as.values, env->length);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl (%rdi), %eax
btl $0x8, %eax
jb 0x2c2a4
movq %rdi, %r14
orl $0x100, %eax            # imm = 0x100
movl %eax, (%rdi)
callq 0x29df5
cmpl $0x0, 0x1c(%r14)
movq 0x10(%r14), %rbx
jle 0x2c281
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2b425
testq %rbx, %rbx
je 0x2c2a4
movslq 0x18(%r14), %rax
testq %rax, %rax
jle 0x2c2a4
leaq (%rbx,%rax,8), %r14
movq (%rbx), %rdi
callq 0x2b15b
addq $0x8, %rbx
cmpq %r14, %rbx
jb 0x2c293
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/gc.c
// Function: janet_mark_funcdef
static void janet_mark_funcdef(JanetFuncDef *def) {
    int32_t i;
    if (janet_gc_reachable(def))
        return;
    janet_gc_mark(def);
    janet_mark_many(def->constants, def->constants_length);
    for (i = 0; i < def->defs_length; ++i) {
        janet_mark_funcdef(def->defs[i]);
    }
    if (def->source)
        janet_mark_string(def->source);
    if (def->name)
        janet_mark_string(def->name);
    if (def->symbolmap) {
        for (int i = 0; i < def->symbolmap_length; i++) {
            janet_mark_string(def->symbolmap[i].symbol);
        }
    }

}

// Assembly:
movl (%rdi), %eax
btl $0x8, %eax
jb 0x2c367
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
orl $0x100, %eax            # imm = 0x100
movl %eax, (%rdi)
movq 0x18(%rdi), %r14
testq %r14, %r14
je 0x2c2f0
movslq 0x6c(%rbx), %rax
testq %rax, %rax
jle 0x2c2f0
leaq (%r14,%rax,8), %r15
movq (%r14), %rdi
callq 0x2b15b
addq $0x8, %r14
cmpq %r15, %r14
jb 0x2c2df
cmpl $0x0, 0x78(%rbx)
jle 0x2c312
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2c2a9
incq %r14
movslq 0x78(%rbx), %rax
cmpq %rax, %r14
jl 0x2c2f9
movq 0x40(%rbx), %rax
testq %rax, %rax
je 0x2c31f
orb $0x1, -0x17(%rax)
movq 0x48(%rbx), %rax
testq %rax, %rax
je 0x2c32c
orb $0x1, -0x17(%rax)
movq 0x50(%rbx), %rax
testq %rax, %rax
je 0x2c35d
movslq 0x7c(%rbx), %rcx
testq %rcx, %rcx
jle 0x2c35d
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
movq 0x10(%rax,%rdx), %rsi
orl $0x100, -0x18(%rsi)     # imm = 0x100
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0x2c348
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/inttypes.c
// Function: janet_unwrap_s64
int64_t janet_unwrap_s64(Janet x) {
    switch (janet_type(x)) {
        default:
            break;
        case JANET_NUMBER : {
            double d = janet_unwrap_number(x);
            if (!janet_checkint64range(d)) break;
            return (int64_t) d;
        }
        case JANET_STRING: {
            int64_t value;
            const uint8_t *str = janet_unwrap_string(x);
            if (janet_scan_int64(str, janet_string_length(str), &value))
                return value;
            break;
        }
        case JANET_ABSTRACT: {
            void *abst = janet_unwrap_abstract(x);
            if (janet_abstract_type(abst) == &janet_s64_type ||
                    (janet_abstract_type(abst) == &janet_u64_type))
                return *(int64_t *)abst;
            break;
        }
    }
    janet_panicf("can not convert %t %q to 64 bit signed integer", x, x);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rdi, %xmm0
movq %rdi, %rcx
shrq $0x2f, %rcx
andl $0xf, %ecx
xorl %eax, %eax
ucomisd %xmm0, %xmm0
cmovpl %ecx, %eax
cmpl $0xe, %eax
je 0x2c59c
cmpl $0x4, %eax
je 0x2c57b
testl %eax, %eax
jne 0x2c5da
movapd 0x32852(%rip), %xmm1    # 0x5eda0
andpd %xmm0, %xmm1
movb $0x1, %cl
movsd 0x32854(%rip), %xmm2    # 0x5edb0
ucomisd %xmm1, %xmm2
jb 0x2c5d6
cvttsd2si %xmm0, %rax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2c5d6
jp 0x2c5d6
xorl %ecx, %ecx
jmp 0x2c5d6
movq %rbx, %rdi
callq 0x4f838
movl -0x8(%rax), %esi
leaq -0x10(%rbp), %rdx
movq %rax, %rdi
callq 0x46a96
testl %eax, %eax
je 0x2c5da
movq -0x10(%rbp), %rax
jmp 0x2c5cf
movq %rbx, %rdi
callq 0x4f838
movq %rax, %rcx
movq -0x10(%rax), %rax
cmpq 0x59a1e(%rip), %rax     # 0x85fd0
sete %sil
cmpq 0x59a0b(%rip), %rax     # 0x85fc8
sete %dl
orb %sil, %dl
cmpb $0x1, %dl
jne 0x2c5cb
movq (%rcx), %rax
testb %dl, %dl
je 0x2c5da
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
testb %cl, %cl
je 0x2c5cf
leaq 0x32801(%rip), %rdi     # 0x5ede2
movq %rbx, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1917b
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/inttypes.c
// Function: janet_unwrap_u64
uint64_t janet_unwrap_u64(Janet x) {
    switch (janet_type(x)) {
        default:
            break;
        case JANET_NUMBER : {
            double d = janet_unwrap_number(x);
            if (!janet_checkuint64range(d)) break;
            return (uint64_t) d;
        }
        case JANET_STRING: {
            uint64_t value;
            const uint8_t *str = janet_unwrap_string(x);
            if (janet_scan_uint64(str, janet_string_length(str), &value))
                return value;
            break;
        }
        case JANET_ABSTRACT: {
            void *abst = janet_unwrap_abstract(x);
            if (janet_abstract_type(abst) == &janet_s64_type ||
                    (janet_abstract_type(abst) == &janet_u64_type))
                return *(uint64_t *)abst;
            break;
        }
    }
    janet_panicf("can not convert %t %q to a 64 bit unsigned integer", x, x);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rdi, %xmm0
movq %rdi, %rcx
shrq $0x2f, %rcx
andl $0xf, %ecx
xorl %eax, %eax
ucomisd %xmm0, %xmm0
cmovpl %ecx, %eax
cmpl $0xe, %eax
je 0x2c6b8
cmpl $0x4, %eax
je 0x2c697
testl %eax, %eax
jne 0x2c6f6
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movb $0x1, %cl
jb 0x2c6f2
movsd 0x32773(%rip), %xmm1    # 0x5edb0
ucomisd %xmm0, %xmm1
jb 0x2c6f2
cvttsd2si %xmm0, %rdx
movq %rdx, %rsi
movapd %xmm0, %xmm1
subsd 0x28a3d(%rip), %xmm1    # 0x55098
sarq $0x3f, %rsi
cvttsd2si %xmm1, %rax
andq %rsi, %rax
orq %rdx, %rax
movq %rax, %xmm1
punpckldq 0x291c9(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x291d1(%rip), %xmm1    # 0x55850
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jne 0x2c6f2
jp 0x2c6f2
xorl %ecx, %ecx
jmp 0x2c6f2
movq %rbx, %rdi
callq 0x4f838
movl -0x8(%rax), %esi
leaq -0x10(%rbp), %rdx
movq %rax, %rdi
callq 0x46caa
testl %eax, %eax
je 0x2c6f6
movq -0x10(%rbp), %rax
jmp 0x2c6eb
movq %rbx, %rdi
callq 0x4f838
movq %rax, %rcx
movq -0x10(%rax), %rax
cmpq 0x59902(%rip), %rax     # 0x85fd0
sete %sil
cmpq 0x598ef(%rip), %rax     # 0x85fc8
sete %dl
orb %sil, %dl
cmpb $0x1, %dl
jne 0x2c6e7
movq (%rcx), %rax
testb %dl, %dl
je 0x2c6f6
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
testb %cl, %cl
je 0x2c6eb
leaq 0x32714(%rip), %rdi     # 0x5ee11
movq %rbx, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1917b
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/inttypes.c
// Function: janet_lib_inttypes
void janet_lib_inttypes(JanetTable *env) {
    JanetRegExt it_cfuns[] = {
        JANET_CORE_REG("int/s64", cfun_it_s64_new),
        JANET_CORE_REG("int/u64", cfun_it_u64_new),
        JANET_CORE_REG("int/to-number", cfun_to_number),
        JANET_CORE_REG("int/to-bytes", cfun_to_bytes),
        JANET_REG_END
    };
    janet_core_cfuns_ext(env, NULL, it_cfuns);
    janet_register_abstract_type(&janet_s64_type);
    janet_register_abstract_type(&janet_u64_type);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x55a20(%rip), %rsi     # 0x82520
leaq -0xe0(%rbp), %r14
movl $0xc8, %edx
movq %r14, %rdi
callq 0x12680
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x498ba
leaq 0x55918(%rip), %rdi     # 0x82440
callq 0x49b93
leaq 0x5597c(%rip), %rdi     # 0x824b0
callq 0x49b93
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/inttypes.c
// Function: cfun_it_s64_divf
static Janet cfun_it_s64_divf(int32_t argc, Janet *argv) {
    janet_fixarity(argc, 2);
    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
    int64_t op1 = janet_unwrap_s64(argv[0]);
    int64_t op2 = janet_unwrap_s64(argv[1]);
    if (op2 == 0) janet_panic("division by zero");
    int64_t x = op1 / op2;
    *box = x - (((op1 ^ op2) < 0) && (x * op2 != op1));
    return janet_wrap_abstract(box);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movl $0x2, %esi
callq 0x192b3
leaq 0x55590(%rip), %rdi     # 0x82440
movl $0x8, %esi
callq 0x144d2
movq %rax, %rbx
movq (%r15), %rdi
callq 0x2c513
movq %rax, %r14
movq 0x8(%r15), %rdi
callq 0x2c513
testq %rax, %rax
je 0x2cf1b
movq %rax, %rcx
movq %r14, %rax
cqto
idivq %rcx
movq %rax, %rdx
imulq %rcx, %rdx
xorq %r14, %rcx
sets %cl
cmpq %r14, %rdx
setne %dl
andb %cl, %dl
movzbl %dl, %ecx
subq %rcx, %rax
movq %rax, (%rbx)
movabsq $-0x1000000000000, %rsi # imm = 0xFFFF000000000000
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4f9f2
leaq 0x32092(%rip), %rdi     # 0x5efb4
callq 0x19263
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/inttypes.c
// Function: cfun_it_s64_mod
static Janet cfun_it_s64_mod(int32_t argc, Janet *argv) {
    janet_fixarity(argc, 2);
    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
    int64_t op1 = janet_unwrap_s64(argv[0]);
    int64_t op2 = janet_unwrap_s64(argv[1]);
    if (op2 == 0) {
        *box = op1;
    } else {
        int64_t x = op1 % op2;
        *box = (((op1 ^ op2) < 0) && (x != 0)) ? x + op2 : x;
    }
    return janet_wrap_abstract(box);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movl $0x2, %esi
callq 0x192b3
leaq 0x55469(%rip), %rdi     # 0x82440
movl $0x8, %esi
callq 0x144d2
movq %rax, %rbx
movq (%r15), %rdi
callq 0x2c513
movq %rax, %r14
movq 0x8(%r15), %rdi
callq 0x2c513
testq %rax, %rax
je 0x2d01c
movq %rax, %rcx
movq %r14, %rax
cqto
idivq %rcx
xorq %rcx, %r14
testq %rdx, %rdx
cmoveq %rdx, %rcx
sarq $0x3f, %r14
andq %rcx, %r14
addq %rdx, %r14
movq %r14, (%rbx)
movabsq $-0x1000000000000, %rsi # imm = 0xFFFF000000000000
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4f9f2
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/io.c
// Function: janet_file_close
int janet_file_close(JanetFile *file) {
    int ret = 0;
    if (!(file->flags & (JANET_FILE_NOT_CLOSEABLE | JANET_FILE_CLOSED))) {
        ret = fclose(file->file);
        file->flags |= JANET_FILE_CLOSED;
        file->file = NULL; /* NULL dereference is easier to debug then other problems */
        return ret;
    }
    return 0;
}

// Assembly:
testb $0x30, 0x8(%rdi)
je 0x2e89a
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x122b0
orb $0x20, 0x8(%rbx)
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/io.c
// Function: io_file_marshal
static void io_file_marshal(void *p, JanetMarshalContext *ctx) {
    JanetFile *iof = (JanetFile *)p;
    if (ctx->flags & JANET_MARSHAL_UNSAFE) {
        janet_marshal_abstract(ctx, p);
#ifdef JANET_WINDOWS
        janet_marshal_int(ctx, _fileno(iof->file));
#else
        janet_marshal_int(ctx, fileno(iof->file));
#endif
        janet_marshal_int(ctx, iof->flags);
    } else {
        janet_panic("cannot marshal file in safe mode");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testb $0x2, 0x12(%rsi)
je 0x2e185
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x304eb
movq (%r14), %rdi
callq 0x12700
movq %rbx, %rdi
movl %eax, %esi
callq 0x2fa6f
movl 0x8(%r14), %esi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2fa6f
leaq 0x314d3(%rip), %rdi     # 0x5f65f
callq 0x19263
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/io.c
// Function: io_file_unmarshal
static void *io_file_unmarshal(JanetMarshalContext *ctx) {
    if (ctx->flags & JANET_MARSHAL_UNSAFE) {
        JanetFile *iof = janet_unmarshal_abstract(ctx, sizeof(JanetFile));
        int32_t fd = janet_unmarshal_int(ctx);
        int32_t flags = janet_unmarshal_int(ctx);
        char fmt[4] = {0};
        int index = 0;
        if (flags & JANET_FILE_READ) fmt[index++] = 'r';
        if (flags & JANET_FILE_APPEND) {
            fmt[index++] = 'a';
        } else if (flags & JANET_FILE_WRITE) {
            fmt[index++] = 'w';
        }
#ifdef JANET_WINDOWS
        iof->file = _fdopen(fd, fmt);
#else
        iof->file = fdopen(fd, fmt);
#endif
        if (iof->file == NULL) {
            iof->flags = JANET_FILE_CLOSED;
        } else {
            iof->flags = flags;
        }
        return iof;
    } else {
        janet_panic("cannot unmarshal file in safe mode");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testb $0x2, 0x12(%rdi)
je 0x2e225
movq %rdi, %r14
movl $0x10, %esi
callq 0x31543
movq %rax, %rbx
movq %r14, %rdi
callq 0x30606
movl %eax, %r15d
movq %r14, %rdi
callq 0x30606
movl %eax, %r14d
movl $0x0, -0x1c(%rbp)
testb $0x2, %r14b
jne 0x2e1de
leaq -0x1c(%rbp), %rax
jmp 0x2e1e6
leaq -0x1b(%rbp), %rax
movb $0x72, -0x1(%rax)
movb $0x61, %cl
testb $0x4, %r14b
jne 0x2e1f6
movb $0x77, %cl
testb $0x1, %r14b
je 0x2e1f8
movb %cl, (%rax)
leaq -0x1c(%rbp), %rsi
movl %r15d, %edi
callq 0x12860
movq %rax, (%rbx)
testq %rax, %rax
movl $0x20, %eax
cmovel %eax, %r14d
movl %r14d, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x31454(%rip), %rdi     # 0x5f680
callq 0x19263
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/io.c
// Function: read_chunk
static void read_chunk(JanetFile *iof, JanetBuffer *buffer, int32_t nBytesMax) {
    if (!(iof->flags & (JANET_FILE_READ | JANET_FILE_UPDATE)))
        janet_panic("file is not readable");
    janet_buffer_extra(buffer, nBytesMax);
    size_t ntoread = nBytesMax;
    size_t nread = fread((char *)(buffer->data + buffer->count), 1, ntoread, iof->file);
    if (nread != ntoread && ferror(iof->file))
        janet_panic("could not read file");
    buffer->count += (int32_t) nread;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testb $0xa, 0x8(%rdi)
je 0x2e737
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movl %edx, %esi
callq 0x17843
movl %r15d, %r12d
movslq 0x10(%rbx), %rdi
addq 0x18(%rbx), %rdi
movq (%r14), %rcx
movl $0x1, %esi
movq %r12, %rdx
callq 0x121d0
movq %rax, %r15
cmpq %r12, %rax
je 0x2e72a
movq (%r14), %rdi
callq 0x121a0
testl %eax, %eax
jne 0x2e743
addl %r15d, 0x10(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30ef8(%rip), %rdi     # 0x5f636
callq 0x19263
leaq 0x30f01(%rip), %rdi     # 0x5f64b
callq 0x19263
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/io.c
// Function: io_assert_writeable
static void io_assert_writeable(JanetFile *iof) {
    if (iof->flags & JANET_FILE_CLOSED)
        janet_panic("file is closed");
    if (!(iof->flags & (JANET_FILE_WRITE | JANET_FILE_APPEND | JANET_FILE_UPDATE)))
        janet_panic("file is not writeable");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x8(%rdi), %eax
testb $0x20, %al
jne 0x2e879
testb $0xd, %al
je 0x2e885
popq %rbp
retq
leaq 0x30b44(%rip), %rdi     # 0x5f3c4
callq 0x19263
leaq 0x30b6b(%rip), %rdi     # 0x5f3f7
callq 0x19263
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/io.c
// Function: janet_dynfile
FILE *janet_dynfile(const char *name, FILE *def) {
    Janet x = janet_dyn(name);
    if (!janet_checktype(x, JANET_ABSTRACT)) return def;
    void *abstract = janet_unwrap_abstract(x);
    if (janet_abstract_type(abstract) != &janet_file_type) return def;
    JanetFile *iofile = abstract;
    return iofile->file;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq 0x19f23
movq %rax, %rcx
shrq $0x2f, %rcx
cmpl $0x1fffe, %ecx          # imm = 0x1FFFE
jne 0x2ead0
movq %rax, %rdi
callq 0x4f838
movq -0x10(%rax), %rcx
cmpq 0x574c5(%rip), %rcx     # 0x85f90
jne 0x2ead0
movq (%rax), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/io.c
// Function: janet_flusher
static void janet_flusher(const char *name, FILE *dflt_file) {
    Janet x = janet_dyn(name);
    switch (janet_type(x)) {
        default:
            break;
        case JANET_NIL:
            fflush(dflt_file);
            break;
        case JANET_ABSTRACT: {
            void *abstract = janet_unwrap_abstract(x);
            if (janet_abstract_type(abstract) != &janet_file_type) break;
            JanetFile *iofile = abstract;
            fflush(iofile->file);
            break;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq 0x19f23
movq %rax, %xmm0
movq %rax, %rdx
shrq $0x2f, %rdx
andl $0xf, %edx
xorl %ecx, %ecx
ucomisd %xmm0, %xmm0
cmovpl %edx, %ecx
cmpl $0x1, %ecx
je 0x2f301
cmpl $0xe, %ecx
jne 0x2f2f7
movq %rax, %rdi
callq 0x4f838
movq -0x10(%rax), %rcx
cmpq 0x56c9b(%rip), %rcx     # 0x85f90
je 0x2f2fe
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq (%rax), %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x12780
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/io.c
// Function: makef
static void *makef(FILE *f, int32_t flags) {
    JanetFile *iof = (JanetFile *) janet_abstract(&janet_file_type, sizeof(JanetFile));
    iof->file = f;
    iof->flags = flags;
#ifndef JANET_WINDOWS
    /* While we would like fopen to set cloexec by default (like O_CLOEXEC) with the e flag, that is
     * not standard. */
    if (!(flags & JANET_FILE_NOT_CLOSEABLE))
        fcntl(fileno(f), F_SETFD, FD_CLOEXEC);
#endif
    return iof;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %r14
leaq 0x53090(%rip), %rdi     # 0x825f0
movl $0x10, %esi
callq 0x144d2
movq %rax, %rbx
movq %r14, (%rax)
movl %r15d, 0x8(%rax)
testb $0x10, %r15b
jne 0x2f595
movq %r14, %rdi
callq 0x12700
movl %eax, %edi
movl $0x2, %esi
movl $0x1, %edx
xorl %eax, %eax
callq 0x12920
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/marsh.c
// Function: janet_env_lookup_into
void janet_env_lookup_into(JanetTable *renv, JanetTable *env, const char *prefix, int recurse) {
    while (env) {
        for (int32_t i = 0; i < env->capacity; i++) {
            if (janet_checktype(env->data[i].key, JANET_SYMBOL)) {
                if (prefix) {
                    int32_t prelen = (int32_t) strlen(prefix);
                    const uint8_t *oldsym = janet_unwrap_symbol(env->data[i].key);
                    int32_t oldlen = janet_string_length(oldsym);
                    uint8_t *symbuf = janet_smalloc(prelen + oldlen);
                    safe_memcpy(symbuf, prefix, prelen);
                    safe_memcpy(symbuf + prelen, oldsym, oldlen);
                    Janet s = janet_symbolv(symbuf, prelen + oldlen);
                    janet_sfree(symbuf);
                    janet_table_put(renv, s, entry_getval(env->data[i].value));
                } else {
                    janet_table_put(renv,
                                    env->data[i].key,
                                    entry_getval(env->data[i].value));
                }
            }
        }
        env = recurse ? env->proto : NULL;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, -0x2c(%rbp)
movq %rdi, -0x38(%rbp)
testq %rsi, %rsi
je 0x2f89c
movq %rdx, %r12
movabsq $-0x800000000000, %rdx  # imm = 0xFFFF800000000000
movq %r12, -0x48(%rbp)
cmpl $0x0, 0x14(%rsi)
jle 0x2f885
xorl %r14d, %r14d
xorl %r13d, %r13d
movq %rsi, -0x40(%rbp)
movq 0x20(%rsi), %r15
movq (%r15,%r14), %rbx
movq %rbx, %rax
andq %rdx, %rax
movabsq $-0x5800000000000, %rcx # imm = 0xFFFA800000000000
cmpq %rcx, %rax
jne 0x2f871
testq %r12, %r12
je 0x2f849
movq %r12, %rdi
callq 0x12310
movq %rax, %r15
movq %rbx, %rdi
callq 0x4f838
movq %rax, %rbx
movslq -0x8(%rax), %rax
movq %rax, -0x50(%rbp)
movslq %r15d, %r15
leaq (%rax,%r15), %rdi
movq %rdi, -0x58(%rbp)
callq 0x2bfe0
movq %rax, %r12
movq %rax, %rdi
movq -0x48(%rbp), %rsi
movq %r15, %rdx
callq 0x49017
addq %r12, %r15
movq %r15, %rdi
movq %rbx, %rsi
movq -0x50(%rbp), %rdx
callq 0x49017
movq %r12, %rdi
movq -0x58(%rbp), %rsi
callq 0x47b16
movq %rax, %rdi
movabsq $-0x5800000000000, %rsi # imm = 0xFFFA800000000000
callq 0x4f9ad
movq %rax, %rbx
movq %r12, %rdi
movq -0x48(%rbp), %r12
callq 0x2c187
movq -0x40(%rbp), %r15
movq 0x20(%r15), %rax
movq 0x8(%rax,%r14), %rdi
callq 0x2f8ab
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x481b3
movq %r15, %rsi
jmp 0x2f867
movq 0x8(%r15,%r14), %rdi
callq 0x2f8ab
movq (%r15,%r14), %rsi
movq -0x38(%rbp), %rdi
movq %rax, %rdx
callq 0x481b3
movq -0x40(%rbp), %rsi
movabsq $-0x800000000000, %rdx  # imm = 0xFFFF800000000000
incq %r13
movslq 0x14(%rsi), %rax
addq $0x10, %r14
cmpq %rax, %r13
jl 0x2f77a
cmpl $0x0, -0x2c(%rbp)
je 0x2f891
movq 0x28(%rsi), %rsi
jmp 0x2f893
xorl %esi, %esi
testq %rsi, %rsi
jne 0x2f766
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/marsh.c
// Function: entry_getval
static Janet entry_getval(Janet env_entry) {
    if (janet_checktype(env_entry, JANET_TABLE)) {
        JanetTable *entry = janet_unwrap_table(env_entry);
        Janet checkval = janet_table_get(entry, janet_ckeywordv("value"));
        if (janet_checktype(checkval, JANET_NIL)) {
            checkval = janet_table_get(entry, janet_ckeywordv("ref"));
        }
        return checkval;
    } else if (janet_checktype(env_entry, JANET_STRUCT)) {
        const JanetKV *entry = janet_unwrap_struct(env_entry);
        Janet checkval = janet_struct_get(entry, janet_ckeywordv("value"));
        if (janet_checktype(checkval, JANET_NIL)) {
            checkval = janet_struct_get(entry, janet_ckeywordv("ref"));
        }
        return checkval;
    } else {
        return janet_wrap_nil();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movabsq $-0x800000000000, %r12  # imm = 0xFFFF800000000000
movabsq $-0x7800000000000, %rbx # imm = 0xFFF8800000000000
movq %rdi, %rax
andq %r12, %rax
movabsq $-0x3000000000000, %rcx # imm = 0xFFFD000000000000
cmpq %rcx, %rax
je 0x2f95c
movabsq $-0x3800000000000, %rcx # imm = 0xFFFC800000000000
cmpq %rcx, %rax
jne 0x2f9cb
movabsq $-0x5000000000000, %r14 # imm = 0xFFFB000000000000
callq 0x4f838
movq %rax, %r15
leaq 0x2e6fb(%rip), %rdi     # 0x5e006
callq 0x47cd3
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %r15, %rdi
movq %rax, %rsi
callq 0x47f51
andq %rax, %r12
cmpq %rbx, %r12
jne 0x2f9c2
leaq 0x3979e(%rip), %rdi     # 0x690d7
callq 0x47cd3
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %r15, %rdi
movq %rax, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x47f51
movabsq $-0x5000000000000, %r14 # imm = 0xFFFB000000000000
callq 0x4f838
movq %rax, %r15
leaq 0x2e691(%rip), %rdi     # 0x5e006
callq 0x47cd3
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %r15, %rdi
movq %rax, %rsi
callq 0x47388
andq %rax, %r12
cmpq %rbx, %r12
jne 0x2f9c2
leaq 0x39738(%rip), %rdi     # 0x690d7
callq 0x47cd3
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %r15, %rdi
movq %rax, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x47388
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
incq %rbx
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4f95a
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/marsh.c
// Function: pushint
static void pushint(MarshalState *st, int32_t x) {
    if (x >= 0 && x < 128) {
        janet_buffer_push_u8(st->buf, x);
    } else if (x <= 8191 && x >= -8192) {
        uint8_t intbuf[2];
        intbuf[0] = ((x >> 8) & 0x3F) | 0x80;
        intbuf[1] = x & 0xFF;
        janet_buffer_push_bytes(st->buf, intbuf, 2);
    } else {
        uint8_t intbuf[5];
        intbuf[0] = LB_INTEGER;
        intbuf[1] = (x >> 24) & 0xFF;
        intbuf[2] = (x >> 16) & 0xFF;
        intbuf[3] = (x >> 8) & 0xFF;
        intbuf[4] = x & 0xFF;
        janet_buffer_push_bytes(st->buf, intbuf, 5);
    }
}

// Assembly:
movl %esi, %eax
cmpl $0x7f, %esi
ja 0x2fa8b
movq (%rdi), %rdi
movzbl %al, %esi
jmp 0x179a7
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leal 0x2000(%rax), %ecx
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x2fabf
movl %eax, %ecx
shrl $0x8, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
leaq -0x2(%rbp), %rsi
movb %cl, (%rsi)
movb %al, 0x1(%rsi)
movq (%rdi), %rdi
movl $0x2, %edx
jmp 0x2fae4
leaq -0x7(%rbp), %rsi
movb $-0x33, (%rsi)
movl %eax, %ecx
shrl $0x18, %ecx
movb %cl, 0x1(%rsi)
movl %eax, %ecx
shrl $0x10, %ecx
movb %cl, 0x2(%rsi)
movb %ah, -0x4(%rbp)
movb %al, 0x4(%rsi)
movq (%rdi), %rdi
movl $0x5, %edx
callq 0x17925
addq $0x10, %rsp
popq %rbp
retq