LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: janet_thread_body
static void *janet_thread_body(void *ptr) {
    JanetEVThreadInit *init = (JanetEVThreadInit *)ptr;
    JanetEVGenericMessage msg = init->msg;
    JanetThreadedSubroutine subr = init->subr;
    JanetThreadedCallback cb = init->cb;
    int fd = init->write_pipe;
    janet_free(init);
    JanetSelfPipeEvent response;
    memset(&response, 0, sizeof(response));
    response.msg = subr(msg);
    response.cb = cb;
    /* handle a bit of back pressure before giving up. */
    int tries = 4;
    while (tries > 0) {
        int status;
        do {
            status = write(fd, &response, sizeof(response));
        } while (status == -1 && errno == EINTR);
        if (status > 0) break;
        sleep(1);
        tries--;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movl 0x30(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rdi
callq 0x120b0
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x12420
leaq -0x90(%rbp), %rdi
leaq -0x30(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq *-0x38(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x4, -0x94(%rbp)
cmpl $0x0, -0x94(%rbp)
jle 0x2f3a1
jmp 0x2f338
movl -0x44(%rbp), %edi
leaq -0x70(%rbp), %rsi
movl $0x28, %edx
callq 0x12250
movl %eax, -0x98(%rbp)
xorl %eax, %eax
cmpl $-0x1, -0x98(%rbp)
movb %al, -0x99(%rbp)
jne 0x2f371
callq 0x12120
cmpl $0x4, (%rax)
sete %al
movb %al, -0x99(%rbp)
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0x2f338
cmpl $0x0, -0x98(%rbp)
jle 0x2f386
jmp 0x2f3a1
movl $0x1, %edi
callq 0x12b90
movl -0x94(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0x2f32d
xorl %eax, %eax
addq $0xc0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: janet_ev_threaded_await
JANET_NO_RETURN
void janet_ev_threaded_await(JanetThreadedSubroutine fp, int tag, int argi, void *argp) {
    JanetEVGenericMessage arguments;
    memset(&arguments, 0, sizeof(arguments));
    arguments.tag = tag;
    arguments.argi = argi;
    arguments.argp = argp;
    arguments.fiber = janet_root_fiber();
    janet_gcroot(janet_wrap_fiber(arguments.fiber));
    janet_ev_threaded_call(fp, arguments, janet_ev_default_threaded_callback);
    janet_await();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x12420
movl -0xc(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0x371d0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movabsq $-0x6800000000000, %rsi # imm = 0xFFF9800000000000
callq 0x7b610
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x39200
movq -0x8(%rbp), %rdi
leaq -0x38(%rbp), %rax
leaq -0x2c2(%rip), %rsi      # 0x2f3b0
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x2f130
callq 0x2a9d0
nop
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: janet_stream_flags
void janet_stream_flags(JanetStream *stream, uint32_t flags) {
    if (stream->flags & JANET_STREAM_CLOSED) {
        janet_panic("stream is closed");
    }
    if ((stream->flags & flags) != flags) {
        const char *rmsg = "", *wmsg = "", *amsg = "", *dmsg = "", *smsg = "stream";
        if (flags & JANET_STREAM_READABLE) rmsg = "readable ";
        if (flags & JANET_STREAM_WRITABLE) wmsg = "writable ";
        if (flags & JANET_STREAM_ACCEPTABLE) amsg = "server ";
        if (flags & JANET_STREAM_UDPSERVER) dmsg = "datagram ";
        if (flags & JANET_STREAM_SOCKET) smsg = "socket";
        janet_panicf("bad stream, expected %s%s%s%s%s", rmsg, wmsg, amsg, dmsg, smsg);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2f6ca
leaq 0x582f6(%rip), %rdi     # 0x879bb
callq 0x1ad60
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl -0xc(%rbp), %eax
cmpl -0xc(%rbp), %eax
je 0x2f7ac
leaq 0x69da1(%rip), %rax     # 0x99485
movq %rax, -0x18(%rbp)
leaq 0x69d96(%rip), %rax     # 0x99485
movq %rax, -0x20(%rbp)
leaq 0x69d8b(%rip), %rax     # 0x99485
movq %rax, -0x28(%rbp)
leaq 0x69d80(%rip), %rax     # 0x99485
movq %rax, -0x30(%rbp)
leaq 0x583ad(%rip), %rax     # 0x87abd
movq %rax, -0x38(%rbp)
movl -0xc(%rbp), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x2f72c
leaq 0x582a4(%rip), %rax     # 0x879cc
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x2f744
leaq 0x58296(%rip), %rax     # 0x879d6
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x2f75c
leaq 0x58288(%rip), %rax     # 0x879e0
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
je 0x2f774
leaq 0x58278(%rip), %rax     # 0x879e8
movq %rax, -0x30(%rbp)
movl -0xc(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x2f78a
leaq 0x5826c(%rip), %rax     # 0x879f2
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
leaq 0x58254(%rip), %rdi     # 0x879f9
movb $0x0, %al
callq 0x1ac40
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: janet_ev_read_generic
static JANET_NO_RETURN void janet_ev_read_generic(JanetStream *stream, JanetBuffer *buf, int32_t nbytes, int is_chunked, JanetReadMode mode, int flags) {
    StateRead *state = janet_malloc(sizeof(StateRead));
    state->is_chunk = is_chunked;
    state->buf = buf;
    state->bytes_left = nbytes;
    state->bytes_read = 0;
    state->mode = mode;
#ifdef JANET_WINDOWS
    state->flags = (DWORD) flags;
#else
    state->flags = flags;
#endif
    janet_async_start(stream, JANET_ASYNC_LISTEN_READ, ev_callback_read, state);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl %r9d, -0x20(%rbp)
movl $0x20, %edi
callq 0x12770
movq %rax, -0x28(%rbp)
movl -0x18(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x8(%rax)
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl -0x20(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rcx
movl $0x1, %esi
leaq -0x53e(%rip), %rdx      # 0x2f800
callq 0x2a980
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: janet_ev_write_generic
static JANET_NO_RETURN void janet_ev_write_generic(JanetStream *stream, void *buf, void *dest_abst, JanetWriteMode mode, int is_buffer, int flags) {
    StateWrite *state = janet_malloc(sizeof(StateWrite));
    state->is_buffer = is_buffer;
    state->src.buf = buf;
    state->dest_abst = dest_abst;
    state->mode = mode;
#ifdef JANET_WINDOWS
    state->flags = (DWORD) flags;
#else
    state->flags = flags;
    state->start = 0;
#endif
    janet_async_start(stream, JANET_ASYNC_LISTEN_WRITE, ev_callback_write, state);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movl $0x20, %edi
callq 0x12770
movq %rax, -0x30(%rbp)
movl -0x20(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movl -0x1c(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x14(%rax)
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rcx
movl $0x2, %esi
leaq -0x4e1(%rip), %rdx      # 0x2fe40
callq 0x2a980
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: janet_sleep_await
JANET_NO_RETURN void janet_sleep_await(double sec) {
    JanetTimeout to;
    to.when = ts_delta(ts_now(), sec);
    to.fiber = janet_vm.root_fiber;
    to.is_error = 0;
    to.sched_id = to.fiber->sched_id;
    to.curr_fiber = NULL;
    to.has_worker = 0;
    add_timeout(to);
    janet_await();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movsd %xmm0, -0x8(%rbp)
callq 0x2bc70
movq %rax, %rdi
movsd -0x8(%rbp), %xmm0
callq 0x2bbb0
movq %rax, -0x38(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x30(%rbp), %rax
movl 0x48(%rax), %eax
movl %eax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x18(%rbp)
movups -0x38(%rbp), %xmm0
movups -0x28(%rbp), %xmm1
movups -0x18(%rbp), %xmm2
movq %rsp, %rax
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x2bd00
callq 0x2a9d0
nop
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: janet_timeout_body
static void *janet_timeout_body(void *ptr) {
#ifdef JANET_ANDROID
    struct sigaction action;
    memset(&action, 0, sizeof(action));
    sigemptyset(&action.sa_mask);
    action.sa_flags = 0;
    action.sa_handler = &janet_timeout_stop;
    sigaction(SIGUSR1, &action, NULL);
#endif
    JanetThreadedTimeout tto = *(JanetThreadedTimeout *)ptr;
    janet_free(ptr);
    struct timespec ts;
    ts.tv_sec = (time_t) tto.sec;
    ts.tv_nsec = (tto.sec <= UINT32_MAX)
                 ? (long)((tto.sec - ((uint32_t)tto.sec)) * 1000000000)
                 : 0;
    nanosleep(&ts, &ts);
    janet_interpreter_interrupt(tto.vm);
    JanetEVGenericMessage msg = {0};
    janet_ev_post_event(tto.vm, janet_timeout_cb, msg);
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x18(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x120b0
cvttsd2si -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movsd 0x54833(%rip), %xmm0    # 0x85fa8
ucomisd -0x20(%rbp), %xmm0
jb 0x317a8
movsd -0x20(%rbp), %xmm0
cvttsd2si %xmm0, %rax
movl %eax, %eax
cvtsi2sd %rax, %xmm1
subsd %xmm1, %xmm0
movsd 0x54817(%rip), %xmm1    # 0x85fb0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, -0x58(%rbp)
jmp 0x317b0
xorl %eax, %eax
movq %rax, -0x58(%rbp)
jmp 0x317b0
movq -0x58(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x30(%rbp), %rsi
movq %rsi, %rdi
callq 0x123b0
movq -0x18(%rbp), %rdi
callq 0x64750
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x12420
movq -0x18(%rbp), %rdi
leaq 0x11e8(%rip), %rsi      # 0x329d0
leaq -0x50(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x2d6d0
xorl %eax, %eax
addq $0x80, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: get_file_for_stream
static JanetFile *get_file_for_stream(JanetStream *stream) {
    int32_t flags = 0;
    char fmt[4] = {0};
    int index = 0;
    if (stream->flags & JANET_STREAM_READABLE) {
        flags |= JANET_FILE_READ;
        janet_sandbox_assert(JANET_SANDBOX_FS_READ);
        fmt[index++] = 'r';
    }
    if (stream->flags & JANET_STREAM_WRITABLE) {
        flags |= JANET_FILE_WRITE;
        janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
        int currindex = index;
        fmt[index++] = (currindex == 0) ? 'w' : '+';
    }
    if (index == 0) return NULL;
    /* duplicate handle when converting stream to file */
#ifdef JANET_WINDOWS
    int htype = 0;
    if (fmt[0] == 'r' && fmt[1] == '+') {
        htype = _O_RDWR;
    } else if (fmt[0] == 'r') {
        htype = _O_RDONLY;
    } else if (fmt[0] == 'w') {
        htype = _O_WRONLY;
    }
    int fd = _open_osfhandle((intptr_t) stream->handle, htype);
    if (fd < 0) return NULL;
    int fd_dup = _dup(fd);
    if (fd_dup < 0) return NULL;
    FILE *f = _fdopen(fd_dup, fmt);
    if (NULL == f) {
        _close(fd_dup);
        return NULL;
    }
#else
    int fd_dup = dup(stream->handle);
    if (fd_dup < 0) return NULL;
    FILE *f = fdopen(fd_dup, fmt);
    if (NULL == f) {
        close(fd_dup);
        return NULL;
    }
#endif
    return janet_makejfile(f, flags);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0x12420
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x31fc0
movl -0x14(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x14(%rbp)
movl $0x40, %edi
callq 0x7ab10
movl -0x1c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x1c(%rbp)
cltq
movb $0x72, -0x18(%rbp,%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x32010
movl -0x14(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x14(%rbp)
movl $0x20, %edi
callq 0x7ab10
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %edx
movl $0x2b, %eax
movl $0x77, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movb %al, %cl
movl -0x1c(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x1c(%rbp)
cltq
movb %cl, -0x18(%rbp,%rax)
cmpl $0x0, -0x1c(%rbp)
jne 0x32020
movq $0x0, -0x8(%rbp)
jmp 0x32078
movq -0x10(%rbp), %rax
movl (%rax), %edi
callq 0x123e0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0x3203e
movq $0x0, -0x8(%rbp)
jmp 0x32078
movl -0x24(%rbp), %edi
leaq -0x18(%rbp), %rsi
callq 0x12850
movq %rax, -0x30(%rbp)
xorl %eax, %eax
cmpq -0x30(%rbp), %rax
jne 0x32068
movl -0x24(%rbp), %edi
callq 0x12470
movq $0x0, -0x8(%rbp)
jmp 0x32078
movq -0x30(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x3fd20
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: janet_q_push_head
static int janet_q_push_head(JanetQueue *q, void *item, size_t itemsize) {
    if (janet_q_maybe_resize(q, itemsize)) return 1;
    int32_t newhead = q->head - 1;
    if (newhead < 0) {
        newhead += q->capacity;
    }
    memcpy((char *) q->data + itemsize * newhead, item, itemsize);
    q->head = newhead;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x323c0
cmpl $0x0, %eax
je 0x322bf
movl $0x1, -0x4(%rbp)
jmp 0x32313
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
subl $0x1, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0x322de
movq -0x10(%rbp), %rax
movl (%rax), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq %rcx, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x12680
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: janet_q_push
static int janet_q_push(JanetQueue *q, void *item, size_t itemsize) {
    if (janet_q_maybe_resize(q, itemsize)) return 1;
    memcpy((char *) q->data + itemsize * q->tail, item, itemsize);
    q->tail = q->tail + 1 < q->capacity ? q->tail + 1 : 0;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x323c0
cmpl $0x0, %eax
je 0x3234f
movl $0x1, -0x4(%rbp)
jmp 0x323b0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0x8(%rcx), %rcx
imulq %rcx, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x12680
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x32398
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3239f
xorl %eax, %eax
movl %eax, -0x24(%rbp)
jmp 0x3239f
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: janet_q_maybe_resize
static int janet_q_maybe_resize(JanetQueue *q, size_t itemsize) {
    int32_t count = janet_q_count(q);
    /* Resize if needed */
    if (count + 1 >= q->capacity) {
        if (count + 1 >= JANET_MAX_Q_CAPACITY) return 1;
        int32_t newcap = (count + 2) * 2;
        if (newcap > JANET_MAX_Q_CAPACITY) newcap = JANET_MAX_Q_CAPACITY;
        q->data = janet_realloc(q->data, itemsize * newcap);
        if (NULL == q->data) {
            JANET_OUT_OF_MEMORY;
        }
        if (q->head > q->tail) {
            /* Two segments, fix 2nd seg. */
            int32_t newhead = q->head + (newcap - q->capacity);
            size_t seg1 = (size_t)(q->capacity - q->head);
            if (seg1 > 0) {
                memmove((char *) q->data + (newhead * itemsize),
                        (char *) q->data + (q->head * itemsize),
                        seg1 * itemsize);
            }
            q->head = newhead;
        }
        q->capacity = newcap;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2c870
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jl 0x3250e
movl -0x1c(%rbp), %eax
addl $0x1, %eax
cmpl $0x7ffffff, %eax        # imm = 0x7FFFFFF
jl 0x32407
movl $0x1, -0x4(%rbp)
jmp 0x32515
movl -0x1c(%rbp), %eax
addl $0x2, %eax
shll %eax
movl %eax, -0x20(%rbp)
cmpl $0x7ffffff, -0x20(%rbp) # imm = 0x7FFFFFF
jle 0x32422
movl $0x7ffffff, -0x20(%rbp) # imm = 0x7FFFFFF
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
movslq -0x20(%rbp), %rax
imulq %rax, %rsi
callq 0x12840
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq 0x10(%rcx), %rax
jne 0x32482
jmp 0x32454
movq 0x7db95(%rip), %rax     # 0xafff0
movq (%rax), %rdi
leaq 0x4bb9f(%rip), %rsi     # 0x7e004
leaq 0x5540c(%rip), %rdx     # 0x87878
movl $0x96, %ecx
movb $0x0, %al
callq 0x125f0
movl $0x1, %edi
callq 0x12a70
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jle 0x32505
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rdx
subl (%rdx), %ecx
addl %ecx, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
subl 0x4(%rcx), %eax
cltq
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jbe 0x324fb
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movslq -0x24(%rbp), %rax
imulq -0x18(%rbp), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movslq 0x4(%rax), %rax
imulq -0x18(%rbp), %rax
addq %rax, %rsi
movq -0x30(%rbp), %rdx
imulq -0x18(%rbp), %rdx
callq 0x12930
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: janet_chan_pack
static int janet_chan_pack(JanetChannel *chan, Janet *x) {
    if (!janet_chan_is_threaded(chan)) return 0;
    switch (janet_type(*x)) {
        default: {
            JanetBuffer *buf = janet_malloc(sizeof(JanetBuffer));
            if (NULL == buf) {
                JANET_OUT_OF_MEMORY;
            }
            janet_buffer_init(buf, 10);
            janet_marshal(buf, *x, NULL, JANET_MARSHAL_UNSAFE);
            *x = janet_wrap_buffer(buf);
            return 0;
        }
        case JANET_NIL:
        case JANET_NUMBER:
        case JANET_POINTER:
        case JANET_BOOLEAN:
        case JANET_CFUNCTION:
            return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x32520
cmpl $0x0, %eax
jne 0x3259a
movl $0x0, -0x4(%rbp)
jmp 0x326a1
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x325af
jmp 0x325c3
movq -0x18(%rbp), %rax
movq (%rax), %rax
shrq $0x2f, %rax
andq $0xf, %rax
movl %eax, -0x2c(%rbp)
jmp 0x325ca
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
jmp 0x325ca
movl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
subl $0x3, %eax
jb 0x3269a
jmp 0x325db
movl -0x30(%rbp), %eax
subl $0xd, %eax
je 0x3269a
jmp 0x325e9
movl -0x30(%rbp), %eax
subl $0xf, %eax
je 0x3269a
jmp 0x325f7
movl $0x20, %edi
callq 0x12770
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq -0x20(%rbp), %rax
jne 0x3263d
jmp 0x3260f
movq 0x7d9da(%rip), %rax     # 0xafff0
movq (%rax), %rdi
leaq 0x4b9e4(%rip), %rsi     # 0x7e004
leaq 0x55251(%rip), %rdx     # 0x87878
movl $0x2ed, %ecx            # imm = 0x2ED
movb $0x0, %al
callq 0x125f0
movl $0x1, %edi
callq 0x12a70
movq -0x20(%rbp), %rdi
movl $0xa, %esi
callq 0x182e0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x20000, %ecx          # imm = 0x20000
callq 0x41780
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
movabsq $-0x2800000000000, %rsi # imm = 0xFFFD800000000000
callq 0x7b610
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x326a1
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: janet_chan_unpack
static int janet_chan_unpack(JanetChannel *chan, Janet *x, int is_cleanup) {
    if (!janet_chan_is_threaded(chan)) return 0;
    switch (janet_type(*x)) {
        default:
            return 1;
        case JANET_BUFFER: {
            JanetBuffer *buf = janet_unwrap_buffer(*x);
            int flags = is_cleanup ? (JANET_MARSHAL_UNSAFE | JANET_MARSHAL_DECREF) : JANET_MARSHAL_UNSAFE;
            *x = janet_unmarshal(buf->data, buf->count, flags, NULL, NULL);
            janet_buffer_deinit(buf);
            janet_free(buf);
            return 0;
        }
        case JANET_NIL:
        case JANET_NUMBER:
        case JANET_POINTER:
        case JANET_BOOLEAN:
        case JANET_CFUNCTION:
            return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x32520
cmpl $0x0, %eax
jne 0x326dd
movl $0x0, -0x4(%rbp)
jmp 0x327d2
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x326f2
jmp 0x32706
movq -0x18(%rbp), %rax
movq (%rax), %rax
shrq $0x2f, %rax
andq $0xf, %rax
movl %eax, -0x3c(%rbp)
jmp 0x3270d
xorl %eax, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3270d
movl -0x3c(%rbp), %eax
movl %eax, -0x40(%rbp)
subl $0x3, %eax
jb 0x327cb
jmp 0x3271e
movl -0x40(%rbp), %eax
subl $0xb, %eax
je 0x32750
jmp 0x32728
movl -0x40(%rbp), %eax
subl $0xd, %eax
je 0x327cb
jmp 0x32736
movl -0x40(%rbp), %eax
subl $0xf, %eax
je 0x327cb
jmp 0x32744
movl $0x1, -0x4(%rbp)
jmp 0x327d2
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x7b260
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %edx
movl $0x20000, %eax          # imm = 0x20000
movl $0x60000, %ecx          # imm = 0x60000
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rax
movslq 0x10(%rax), %rsi
movl -0x2c(%rbp), %edx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x436f0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rdi
callq 0x18460
movq -0x28(%rbp), %rdi
callq 0x120b0
movl $0x0, -0x4(%rbp)
jmp 0x327d2
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: janet_chan_deinit
static void janet_chan_deinit(JanetChannel *chan) {
    if (janet_chan_is_threaded(chan)) {
        Janet item;
        janet_chan_lock(chan);
        janet_q_deinit(&chan->read_pending);
        janet_q_deinit(&chan->write_pending);
        while (!janet_q_pop(&chan->items, &item, sizeof(item))) {
            janet_chan_unpack(chan, &item, 1);
        }
        janet_q_deinit(&chan->items);
        janet_chan_unlock(chan);
    } else {
        janet_q_deinit(&chan->read_pending);
        janet_q_deinit(&chan->write_pending);
        janet_q_deinit(&chan->items);
    }
    janet_os_mutex_deinit((JanetOSMutex *) &chan->lock);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x32520
cmpl $0x0, %eax
je 0x32865
movq -0x8(%rbp), %rdi
callq 0x2c6f0
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x2bb00
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
callq 0x2bb00
movq -0x8(%rbp), %rdi
leaq -0x10(%rbp), %rsi
movl $0x8, %edx
callq 0x2d630
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x3283d
jmp 0x32851
movq -0x8(%rbp), %rdi
leaq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x326b0
jmp 0x3281d
movq -0x8(%rbp), %rdi
callq 0x2bb00
movq -0x8(%rbp), %rdi
callq 0x2c720
jmp 0x32888
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x2bb00
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
callq 0x2bb00
movq -0x8(%rbp), %rdi
callq 0x2bb00
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x12ff0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: janet_chanat_mark_fq
static void janet_chanat_mark_fq(JanetQueue *fq) {
    JanetChannelPending *pending = fq->data;
    if (fq->head <= fq->tail) {
        for (int32_t i = fq->head; i < fq->tail; i++)
            janet_mark(janet_wrap_fiber(pending[i].fiber));
    } else {
        for (int32_t i = fq->head; i < fq->capacity; i++)
            janet_mark(janet_wrap_fiber(pending[i].fiber));
        for (int32_t i = 0; i < fq->tail; i++)
            janet_mark(janet_wrap_fiber(pending[i].fiber));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jg 0x3291d
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x32918
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movabsq $-0x6800000000000, %rsi # imm = 0xFFF9800000000000
callq 0x7b610
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x38b90
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x328d2
jmp 0x329bb
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x3296c
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movabsq $-0x6800000000000, %rsi # imm = 0xFFF9800000000000
callq 0x7b610
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x38b90
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x32927
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x329b9
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movabsq $-0x6800000000000, %rsi # imm = 0xFFF9800000000000
callq 0x7b610
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x38b90
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x32973
jmp 0x329bb
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ffi.c
// Function: signature_mark
int signature_mark(void *p, size_t s) {
    (void) s;
    JanetFFISignature *sig = p;
    for (uint32_t i = 0; i < sig->arg_count; i++) {
        JanetFFIType t = sig->args[i].type;
        if (t.prim == JANET_FFI_TYPE_STRUCT) {
            janet_mark(janet_wrap_abstract(t.st));
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x32a6f
movq -0x18(%rbp), %rax
addq $0x38, %rax
movl -0x1c(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
cmpl $0xe, -0x28(%rbp)
jne 0x32a62
movq -0x30(%rbp), %rdi
movabsq $-0x1000000000000, %rsi # imm = 0xFFFF000000000000
callq 0x7b610
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x38b90
jmp 0x32a64
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x32a0f
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ffi.c
// Function: struct_mark
int struct_mark(void *p, size_t s) {
    (void) s;
    JanetFFIStruct *st = p;
    for (uint32_t i = 0; i < st->field_count; i++) {
        JanetFFIType t = st->fields[i].type;
        if (t.prim == JANET_FFI_TYPE_STRUCT) {
            janet_mark(janet_wrap_abstract(t.st));
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x32aff
movq -0x18(%rbp), %rax
addq $0x10, %rax
movl -0x1c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
cmpl $0xe, -0x28(%rbp)
jne 0x32af2
movq -0x30(%rbp), %rdi
movabsq $-0x1000000000000, %rsi # imm = 0xFFFF000000000000
callq 0x7b610
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x38b90
jmp 0x32af4
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x32a9f
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ffi.c
// Function: janet_ffijit_gc
static int janet_ffijit_gc(void *p, size_t s) {
    (void) s;
    JanetFFIJittedFn *fn = p;
    if (fn->function_pointer == NULL) return 0;
#ifdef JANET_FFI_JIT
#ifdef JANET_WINDOWS
    VirtualFree(fn->function_pointer, fn->size, MEM_RELEASE);
#else
    munmap(fn->function_pointer, fn->size);
#endif
#endif
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x32b3b
movl $0x0, -0x4(%rbp)
jmp 0x32b56
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x12860
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ffi.c
// Function: janet_ffijit_getbytes
static JanetByteView janet_ffijit_getbytes(void *p, size_t s) {
    (void) s;
    JanetFFIJittedFn *fn = p;
    JanetByteView bytes;
    bytes.bytes = fn->function_pointer;
    bytes.len = (int32_t) fn->size;
    return bytes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %edx
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ffi.c
// Function: janet_ffi_trampoline
void janet_ffi_trampoline(void *ctx, void *userdata) {
    if (NULL == userdata) {
        /* Userdata not set. */
        janet_eprintf("no userdata found for janet callback");
        return;
    }
    Janet context = janet_wrap_pointer(ctx);
    JanetFunction *fun = userdata;
    janet_call(fun, 1, &context);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
jne 0x32bf9
movq 0x7d411(%rip), %rax     # 0xafff0
movq (%rax), %rsi
leaq 0x54e45(%rip), %rdi     # 0x87a2e
leaq 0x563da(%rip), %rdx     # 0x88fca
movb $0x0, %al
callq 0x3fa20
jmp 0x32c2e
movq -0x8(%rbp), %rdi
movabsq $-0x800000000000, %rsi  # imm = 0xFFFF800000000000
callq 0x7b610
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl $0x1, %esi
leaq -0x18(%rbp), %rdx
callq 0x70ae0
movq %rax, -0x28(%rbp)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ffi.c
// Function: type_size
static size_t type_size(JanetFFIType t) {
    size_t count = t.array_count < 0 ? 1 : (size_t) t.array_count;
    if (t.prim == JANET_FFI_TYPE_STRUCT) {
        return t.st->size * count;
    } else {
        return janet_ffi_type_info[t.prim].size * count;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x3307d
movl $0x1, %eax
movq %rax, -0x28(%rbp)
jmp 0x33085
movslq -0xc(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0xe, -0x10(%rbp)
jne 0x330a4
movq -0x18(%rbp), %rax
movl (%rax), %eax
imulq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x330c3
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x55e20(%rip), %rax     # 0x88ed0
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
imulq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ffi.c
// Function: type_align
static size_t type_align(JanetFFIType t) {
    if (t.prim == JANET_FFI_TYPE_STRUCT) {
        return t.st->align;
    } else {
        return janet_ffi_type_info[t.prim].align;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0xe, -0x10(%rbp)
jne 0x3332f
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movq %rax, -0x8(%rbp)
jmp 0x3334a
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x55b95(%rip), %rax     # 0x88ed0
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ffi.c
// Function: decode_ffi_cc
static JanetFFICallingConvention decode_ffi_cc(const uint8_t *name) {
    if (!janet_cstrcmp(name, "none")) return JANET_FFI_CC_NONE;
#ifdef JANET_FFI_WIN64_ENABLED
    if (!janet_cstrcmp(name, "win64")) return JANET_FFI_CC_WIN_64;
#endif
#ifdef JANET_FFI_SYSV64_ENABLED
    if (!janet_cstrcmp(name, "sysv64")) return JANET_FFI_CC_SYSV_64;
#endif
#ifdef JANET_FFI_AAPCS64_ENABLED
    if (!janet_cstrcmp(name, "aapcs64")) return JANET_FFI_CC_AAPCS64;
#endif
    if (!janet_cstrcmp(name, "default")) return JANET_FFI_CC_DEFAULT;
    janet_panicf("unknown calling convention %s", name);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x55504(%rip), %rsi     # 0x890db
callq 0x6b2b0
cmpl $0x0, %eax
jne 0x33bea
movl $0x0, -0x4(%rbp)
jmp 0x33c38
movq -0x10(%rbp), %rdi
leaq 0x554df(%rip), %rsi     # 0x890d4
callq 0x6b2b0
cmpl $0x0, %eax
jne 0x33c08
movl $0x1, -0x4(%rbp)
jmp 0x33c38
movq -0x10(%rbp), %rdi
leaq 0x556a1(%rip), %rsi     # 0x892b4
callq 0x6b2b0
cmpl $0x0, %eax
jne 0x33c26
movl $0x1, -0x4(%rbp)
jmp 0x33c38
movq -0x10(%rbp), %rsi
leaq 0x5568b(%rip), %rdi     # 0x892bc
movb $0x0, %al
callq 0x1ac40
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ffi.c
// Function: void_mapping
static JanetFFIMapping void_mapping(void) {
    JanetFFIMapping m;
    m.type = prim_type(JANET_FFI_TYPE_VOID);
    m.spec = JANET_SYSV64_NO_CLASS;
    m.offset = 0;
    return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x20(%rbp)
movq %rdi, -0x18(%rbp)
xorl %edi, %edi
callq 0x35590
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, (%rdi)
movq -0x8(%rbp), %rcx
movq %rcx, 0x8(%rdi)
movl $0x7, 0x10(%rdi)
movl $0x0, 0x14(%rdi)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ffi.c
// Function: janet_ffi_get_callable_pointer
static void *janet_ffi_get_callable_pointer(const Janet *argv, int32_t n) {
    switch (janet_type(argv[n])) {
        default:
            break;
        case JANET_POINTER:
            return janet_unwrap_pointer(argv[n]);
        case JANET_ABSTRACT:
            if (!janet_checkabstract(argv[n], &janet_type_ffijit)) break;
            return ((JanetFFIJittedFn *)janet_unwrap_abstract(argv[n]))->function_pointer;
    }
    janet_panicf("bad slot #%d, expected ffi callable pointer type, got %v", n, argv[n]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x33ec9
jmp 0x33ee2
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x2f, %rax
andq $0xf, %rax
movl %eax, -0x18(%rbp)
jmp 0x33ee9
xorl %eax, %eax
movl %eax, -0x18(%rbp)
jmp 0x33ee9
movl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
subl $0xe, %eax
je 0x33f19
jmp 0x33ef6
movl -0x1c(%rbp), %eax
subl $0xf, %eax
je 0x33f02
jmp 0x33f00
jmp 0x33f53
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x7b260
movq %rax, -0x8(%rbp)
jmp 0x33f70
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x78484(%rip), %rsi     # 0xac3b0
callq 0x1c640
cmpq $0x0, %rax
jne 0x33f39
jmp 0x33f53
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x7b260
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x33f70
movl -0x14(%rbp), %esi
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x55388(%rip), %rdi     # 0x892f1
movb $0x0, %al
callq 0x1ac40
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ffi.c
// Function: prim_type
static JanetFFIType prim_type(JanetFFIPrimType pt) {
    JanetFFIType t;
    t.prim = pt;
    t.st = NULL;
    t.array_count = -1;
    return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ffi.c
// Function: janet_ffi_getpointer
static void *janet_ffi_getpointer(const Janet *argv, int32_t n) {
    switch (janet_type(argv[n])) {
        default:
            janet_panicf("bad slot #%d, expected ffi pointer convertible type, got %v", n, argv[n]);
        case JANET_POINTER:
        case JANET_STRING:
        case JANET_KEYWORD:
        case JANET_SYMBOL:
        case JANET_CFUNCTION:
            return janet_unwrap_pointer(argv[n]);
        case JANET_ABSTRACT:
            return (void *) janet_getbytes(argv, n).bytes;
        case JANET_BUFFER:
            return janet_unwrap_buffer(argv[n])->data;
        case JANET_FUNCTION:
            /* Users may pass in a function. Any function passed is almost certainly
             * being used as a callback, so we add it to the root set. */
            janet_gcroot(argv[n]);
            return janet_unwrap_pointer(argv[n]);
        case JANET_NIL:
            return NULL;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x35d79
jmp 0x35d92
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x2f, %rax
andq $0xf, %rax
movl %eax, -0x2c(%rbp)
jmp 0x35d99
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
jmp 0x35d99
movl -0x2c(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0xe, %eax
ja 0x35dbd
movq -0x38(%rbp), %rax
leaq 0x521d0(%rip), %rcx     # 0x87f84
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x14(%rbp), %esi
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x535db(%rip), %rdi     # 0x893ae
movb $0x0, %al
callq 0x1ac40
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x7b260
movq %rax, -0x8(%rbp)
jmp 0x35e59
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x1c4d0
movq %rax, -0x28(%rbp)
movl %edx, -0x20(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x35e59
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x7b260
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x35e59
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x39200
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x7b260
movq %rax, -0x8(%rbp)
jmp 0x35e59
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/fiber.c
// Function: janet_fiber_reset
JanetFiber *janet_fiber_reset(JanetFiber *fiber, JanetFunction *callee, int32_t argc, const Janet *argv) {
    int32_t newstacktop;
    fiber_reset(fiber);
    if (argc) {
        newstacktop = fiber->stacktop + argc;
        if (newstacktop >= fiber->capacity) {
            janet_fiber_setcapacity(fiber, 2 * newstacktop);
        }
        if (argv) {
            memcpy(fiber->data + fiber->stacktop, argv, argc * sizeof(Janet));
        } else {
            /* If argv not given, fill with nil */
            for (int32_t i = 0; i < argc; i++) {
                fiber->data[fiber->stacktop + i] = janet_wrap_nil();
            }
        }
        fiber->stacktop = newstacktop;
    }
    /* Don't panic on failure since we use this to implement janet_pcall */
    if (janet_fiber_funcframe(fiber, callee)) return NULL;
    janet_fiber_frame(fiber)->flags |= JANET_STACKFRAME_ENTRANCE;
#ifdef JANET_EV
    fiber->supervisor_channel = NULL;
#endif
    return fiber;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x35fb0
cmpl $0x0, -0x1c(%rbp)
je 0x35f5a
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jl 0x35ec1
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
shll %esi
callq 0x360a0
cmpq $0x0, -0x28(%rbp)
je 0x35ef2
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rax
movslq 0x1c(%rax), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x28(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
shlq $0x3, %rdx
callq 0x12680
jmp 0x35f50
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x35f4e
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
addl -0x30(%rbp), %eax
cltq
movq %rax, -0x48(%rbp)
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x7b460
movq -0x48(%rbp), %rcx
movq %rax, %rdx
movq -0x40(%rbp), %rax
movq %rdx, -0x38(%rbp)
movq -0x38(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x35ef9
jmp 0x35f50
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x36160
cmpl $0x0, %eax
je 0x35f76
movq $0x0, -0x8(%rbp)
jmp 0x35fa5
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x14(%rcx), %rcx
movl -0x4(%rax,%rcx,8), %edx
orl $0x2, %edx
movl %edx, -0x4(%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/fiber.c
// Function: fiber_reset
static void fiber_reset(JanetFiber *fiber) {
    fiber->maxstack = JANET_STACK_MAX;
    fiber->frame = 0;
    fiber->stackstart = JANET_FRAME_SIZE;
    fiber->stacktop = JANET_FRAME_SIZE;
    fiber->child = NULL;
    fiber->flags = JANET_FIBER_MASK_YIELD | JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
    fiber->env = NULL;
    fiber->last_value = janet_wrap_nil();
#ifdef JANET_EV
    fiber->sched_id = 0;
    fiber->ev_callback = NULL;
    fiber->ev_state = NULL;
    fiber->ev_stream = NULL;
    fiber->supervisor_channel = NULL;
#endif
    janet_fiber_set_status(fiber, JANET_STATUS_NEW);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x7fffffff, 0x24(%rax) # imm = 0x7FFFFFFF
movq -0x8(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x8(%rbp), %rax
movl $0x4, 0x18(%rax)
movq -0x8(%rbp), %rax
movl $0x4, 0x1c(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x8(%rbp), %rax
movl $0x6000008, 0x10(%rax)  # imm = 0x6000008
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x7b460
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x48(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0xffc0ffff, %ecx       # imm = 0xFFC0FFFF
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
orl $0xe0000, %ecx          # imm = 0xE0000
movl %ecx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)