LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/marsh.c
// Function: janet_unmarshal_abstract_reuse
void janet_unmarshal_abstract_reuse(JanetMarshalContext *ctx, void *p) {
    UnmarshalState *st = (UnmarshalState *)(ctx->u_state);
    if (ctx->at == NULL) {
        janet_panicf("janet_unmarshal_abstract called more than once");
    }
    janet_v_push(st->lookup, janet_wrap_abstract(p));
    ctx->at = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpq $0x0, 0x20(%rdi)
je 0x2ee4a
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %r12
movq 0xc8(%r12), %r15
testq %r15, %r15
je 0x2ee00
movl -0x4(%r15), %eax
leal 0x1(%rax), %ecx
cmpl -0x8(%r15), %ecx
jl 0x2ee1f
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
movq %r15, %rdi
callq 0x4799c
movq %rax, %r15
movq %rax, 0xc8(%r12)
movl -0x4(%rax), %eax
leal 0x1(%rax), %ecx
movl %ecx, -0x4(%r15)
movslq %eax, %r12
movabsq $-0x1000000000000, %rsi # imm = 0xFFFF000000000000
movq %r14, %rdi
callq 0x4b3ab
movq %rax, (%r15,%r12,8)
andq $0x0, 0x20(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2cd7f(%rip), %rdi     # 0x5bbd0
xorl %eax, %eax
callq 0x176c9
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/marsh.c
// Function: janet_unmarshal
Janet janet_unmarshal(
    const uint8_t *bytes,
    size_t len,
    int flags,
    JanetTable *reg,
    const uint8_t **next) {
    UnmarshalState st;
    st.start = bytes;
    st.end = bytes + len;
    st.lookup_defs = NULL;
    st.lookup_envs = NULL;
    st.lookup = NULL;
    st.reg = reg;
    Janet out;
    const uint8_t *nextbytes = unmarshal_one(&st, bytes, &out, flags);
    if (next) *next = nextbytes;
    janet_v_free(st.lookup_defs);
    janet_v_free(st.lookup_envs);
    janet_v_free(st.lookup);
    return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %r8, %rbx
movq %rdi, %rax
leaq -0x108(%rbp), %rdi
movq %rax, 0xe8(%rdi)
addq %rax, %rsi
movq %rsi, 0xf0(%rdi)
andq $0x0, 0xc8(%rdi)
movl %edx, %r8d
xorps %xmm0, %xmm0
movups %xmm0, 0xd8(%rdi)
movq %rcx, 0xd0(%rdi)
leaq -0x10(%rbp), %rdx
movq %rax, %rsi
movl %r8d, %ecx
callq 0x2dc5b
testq %rbx, %rbx
je 0x2eeee
movq %rax, (%rbx)
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0x2ef00
addq $-0x8, %rdi
callq 0x298c1
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x2ef12
addq $-0x8, %rdi
callq 0x298c1
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x2ef24
addq $-0x8, %rdi
callq 0x298c1
movq -0x10(%rbp), %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/marsh.c
// Function: janet_marshal_u32s
static void janet_marshal_u32s(MarshalState *st, const uint32_t *u32s, int32_t n) {
    for (int32_t i = 0; i < n; i++) {
        pushbyte(st, u32s[i] & 0xFF);
        pushbyte(st, (u32s[i] >> 8) & 0xFF);
        pushbyte(st, (u32s[i] >> 16) & 0xFF);
        pushbyte(st, (u32s[i] >> 24) & 0xFF);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
testl %edx, %edx
cmovlel %r12d, %ebx
cmpq %r12, %rbx
je 0x2f643
movzbl (%r14,%r12,4), %esi
movq %r15, %rdi
callq 0x2cd91
movzbl 0x1(%r14,%r12,4), %esi
movq %r15, %rdi
callq 0x2cd91
movzbl 0x2(%r14,%r12,4), %esi
movq %r15, %rdi
callq 0x2cd91
movzbl 0x3(%r14,%r12,4), %esi
movq %r15, %rdi
callq 0x2cd91
incq %r12
jmp 0x2f602
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/marsh.c
// Function: readnat
static int32_t readnat(UnmarshalState *st, const uint8_t **atdata) {
    int32_t ret = readint(st, atdata);
    if (ret < 0) {
        janet_panicf("expected integer >= 0, got %d", ret);
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x2da62
testl %eax, %eax
js 0x2f65b
popq %rbp
retq
leaq 0x2c7cc(%rip), %rdi     # 0x5be2e
movl %eax, %esi
xorl %eax, %eax
callq 0x176c9
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/marsh.c
// Function: janet_unmarshal_u32s
static const uint8_t *janet_unmarshal_u32s(UnmarshalState *st, const uint8_t *data, uint32_t *into, int32_t n) {
    for (int32_t i = 0; i < n; i++) {
        MARSH_EOS(st, data + 3);
        into[i] =
            (uint32_t)(data[0]) |
            ((uint32_t)(data[1]) << 8) |
            ((uint32_t)(data[2]) << 16) |
            ((uint32_t)(data[3]) << 24);
        data += 4;
    }
    return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %ecx
cmpq %rax, %rcx
je 0x2ff21
leaq 0x3(%rsi), %r8
cmpq 0xf0(%rdi), %r8
jae 0x2ff26
movl (%rsi), %r8d
movl %r8d, (%rdx,%rax,4)
addq $0x4, %rsi
incq %rax
jmp 0x2feff
movq %rsi, %rax
popq %rbp
retq
leaq 0x2bc5f(%rip), %rdi     # 0x5bb8c
callq 0x177b1
nop
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/math.c
// Function: janet_rng_marshal
static void janet_rng_marshal(void *p, JanetMarshalContext *ctx) {
    JanetRNG *rng = (JanetRNG *)p;
    janet_marshal_abstract(ctx, p);
    janet_marshal_int(ctx, (int32_t) rng->a);
    janet_marshal_int(ctx, (int32_t) rng->b);
    janet_marshal_int(ctx, (int32_t) rng->c);
    janet_marshal_int(ctx, (int32_t) rng->d);
    janet_marshal_int(ctx, (int32_t) rng->counter);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x2d938
movl (%r14), %esi
movq %rbx, %rdi
callq 0x2ccce
movl 0x4(%r14), %esi
movq %rbx, %rdi
callq 0x2ccce
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x2ccce
movl 0xc(%r14), %esi
movq %rbx, %rdi
callq 0x2ccce
movl 0x10(%r14), %esi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2ccce
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/math.c
// Function: janet_rng_unmarshal
static void *janet_rng_unmarshal(JanetMarshalContext *ctx) {
    JanetRNG *rng = janet_unmarshal_abstract(ctx, sizeof(JanetRNG));
    rng->a = (uint32_t) janet_unmarshal_int(ctx);
    rng->b = (uint32_t) janet_unmarshal_int(ctx);
    rng->c = (uint32_t) janet_unmarshal_int(ctx);
    rng->d = (uint32_t) janet_unmarshal_int(ctx);
    rng->counter = (uint32_t) janet_unmarshal_int(ctx);
    return rng;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x14
popq %rsi
callq 0x2ee58
movq %rax, %r14
movq %rbx, %rdi
callq 0x2da50
movl %eax, (%r14)
movq %rbx, %rdi
callq 0x2da50
movl %eax, 0x4(%r14)
movq %rbx, %rdi
callq 0x2da50
movl %eax, 0x8(%r14)
movq %rbx, %rdi
callq 0x2da50
movl %eax, 0xc(%r14)
movq %rbx, %rdi
callq 0x2da50
movl %eax, 0x10(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/math.c
// Function: janet_rng_seed
void janet_rng_seed(JanetRNG *rng, uint32_t seed) {
    rng->a = seed;
    rng->b = 0x97654321u;
    rng->c = 123871873u;
    rng->d = 0xf23f56c8u;
    rng->counter = 0u;
    /* First several numbers aren't that random. */
    for (int i = 0; i < 16; i++) janet_rng_u32(rng);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, (%rdi)
movaps 0x2bfe3(%rip), %xmm0    # 0x5c040
movups %xmm0, 0x4(%rdi)
pushq $0x10
popq %r14
subl $0x1, %r14d
jb 0x30075
movq %rbx, %rdi
callq 0x3007a
jmp 0x30065
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/math.c
// Function: janet_rng_longseed
void janet_rng_longseed(JanetRNG *rng, const uint8_t *bytes, int32_t len) {
    uint8_t state[16] = {0};
    for (int32_t i = 0; i < len; i++)
        state[i & 0xF] ^= bytes[i];
    rng->a = state[0] + ((uint32_t) state[1] << 8) + ((uint32_t) state[2] << 16) + ((uint32_t) state[3] << 24);
    rng->b = state[4] + ((uint32_t) state[5] << 8) + ((uint32_t) state[6] << 16) + ((uint32_t) state[7] << 24);
    rng->c = state[8] + ((uint32_t) state[9] << 8) + ((uint32_t) state[10] << 16) + ((uint32_t) state[11] << 24);
    rng->d = state[12] + ((uint32_t) state[13] << 8) + ((uint32_t) state[14] << 16) + ((uint32_t) state[15] << 24);
    rng->counter = 0u;
    /* a, b, c, d can't all be 0 */
    if (rng->a == 0) rng->a = 1u;
    for (int i = 0; i < 16; i++) janet_rng_u32(rng);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x20(%rbp)
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
cmpq %rax, %rdx
je 0x300eb
movb (%rsi,%rax), %cl
movl %eax, %edi
andl $0xf, %edi
xorb %cl, -0x20(%rbp,%rdi)
incq %rax
jmp 0x300d5
movl -0x20(%rbp), %eax
movl %eax, (%rbx)
movl -0x1c(%rbp), %ecx
movl %ecx, 0x4(%rbx)
movl -0x18(%rbp), %ecx
movl %ecx, 0x8(%rbx)
movl -0x14(%rbp), %ecx
movl %ecx, 0xc(%rbx)
andl $0x0, 0x10(%rbx)
testl %eax, %eax
jne 0x30110
movl $0x1, (%rbx)
pushq $0x10
popq %r14
subl $0x1, %r14d
jb 0x30124
movq %rbx, %rdi
callq 0x3007a
jmp 0x30114
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/math.c
// Function: janet_rng_double
double janet_rng_double(JanetRNG *rng) {
    uint32_t hi = janet_rng_u32(rng);
    uint32_t lo = janet_rng_u32(rng);
    uint64_t big = (uint64_t)(lo) | (((uint64_t) hi) << 32);
    return ldexp((double)(big >> (64 - 52)), -52);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x3007a
movl %eax, %r14d
movq %rbx, %rdi
callq 0x3007a
movl %eax, %eax
shlq $0x20, %r14
orq %rax, %r14
shrq $0xc, %r14
cvtsi2sd %r14, %xmm0
pushq $-0x34
popq %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x12130
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/math.c
// Function: janet_gcd
static double janet_gcd(double x, double y) {
    if (isnan(x) || isnan(y)) {
#ifdef NAN
        return NAN;
#else
        return 0.0 / 0.0;
#endif
    }
    if (isinf(x) || isinf(y)) return INFINITY;
    while (y != 0) {
        double temp = y;
        y = fmod(x, y);
        x = temp;
    }
    return x;
}

// Assembly:
ucomisd %xmm1, %xmm0
jp 0x30bb7
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
sete %al
movq %xmm1, %rdx
btrq $0x3f, %rdx
cmpq %rcx, %rdx
sete %cl
orb %al, %cl
je 0x30b88
movsd 0x24419(%rip), %xmm0    # 0x54fa0
retq
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
ucomisd 0x1fca0(%rip), %xmm1    # 0x50838
jne 0x30b9c
jnp 0x30bb1
movsd %xmm1, -0x8(%rbp)
callq 0x124c0
movapd %xmm0, %xmm1
movsd -0x8(%rbp), %xmm0
jmp 0x30b90
addq $0x10, %rsp
popq %rbp
retq
movsd 0x2b491(%rip), %xmm0    # 0x5c050
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/net.c
// Function: net_callback_connect
void net_callback_connect(JanetFiber *fiber, JanetAsyncEvent event) {
    JanetStream *stream = fiber->ev_stream;
    switch (event) {
        default:
            break;
#ifndef JANET_WINDOWS
        /* Wait until we have an actual event before checking.
         * Windows doesn't support async connect with this, just try immediately.*/
        case JANET_ASYNC_EVENT_INIT:
#endif
        case JANET_ASYNC_EVENT_DEINIT:
            return;
        case JANET_ASYNC_EVENT_CLOSE:
            janet_cancel(fiber, janet_cstringv("stream closed"));
            janet_async_end(fiber);
            return;
    }
#ifdef JANET_WINDOWS
    int res = 0;
    int size = sizeof(res);
    int r = getsockopt((SOCKET)stream->handle, SOL_SOCKET, SO_ERROR, (char *)&res, &size);
#else
    int res = 0;
    socklen_t size = sizeof res;
    int r = getsockopt(stream->handle, SOL_SOCKET, SO_ERROR, &res, &size);
#endif
    if (r == 0) {
        if (res == 0) {
            janet_schedule(fiber, janet_wrap_abstract(stream));
        } else {
            janet_cancel(fiber, janet_cstringv(janet_strerror(res)));
            stream->flags |= JANET_STREAM_TOCLOSE;
        }
    } else {
        janet_cancel(fiber, janet_ev_lasterr());
        stream->flags |= JANET_STREAM_TOCLOSE;
    }
    janet_async_end(fiber);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
testl %esi, %esi
je 0x30fa2
cmpl $0x2, %esi
je 0x30fa2
movq %rdi, %rbx
cmpl $0x3, %esi
jne 0x30f35
leaq 0x25b06(%rip), %rdi     # 0x56a09
callq 0x411ea
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
movq %rax, %rdi
callq 0x4b366
movq %rbx, %rdi
movq %rax, %rsi
callq 0x209bb
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x203ec
movq 0x58(%rbx), %r14
leaq -0x14(%rbp), %rcx
andl $0x0, (%rcx)
leaq -0x18(%rbp), %r8
movl $0x4, (%r8)
movl (%r14), %edi
pushq $0x1
popq %rsi
pushq $0x4
popq %rdx
callq 0x12560
testl %eax, %eax
je 0x30f64
callq 0x233ac
jmp 0x30f8a
movl -0x14(%rbp), %edi
testl %edi, %edi
je 0x30fab
callq 0x46283
movq %rax, %rdi
callq 0x411ea
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
movq %rax, %rdi
callq 0x4b366
movq %rbx, %rdi
movq %rax, %rsi
callq 0x209bb
orb $0x1, 0x6(%r14)
movq %rbx, %rdi
callq 0x203ec
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movabsq $-0x1000000000000, %rsi # imm = 0xFFFF000000000000
movq %r14, %rdi
callq 0x4b3ab
movq %rbx, %rdi
movq %rax, %rsi
callq 0x209ca
jmp 0x30f9a
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/net.c
// Function: janet_get_sockettype
static int janet_get_sockettype(Janet *argv, int32_t argc, int32_t n) {
    JanetKeyword stype = janet_optkeyword(argv, argc, n, NULL);
    int socktype = SOCK_DGRAM;
    if ((NULL == stype) || !janet_cstrcmp(stype, "stream")) {
        socktype = SOCK_STREAM;
    } else if (janet_cstrcmp(stype, "datagram")) {
        janet_panicf("expected socket type as :stream or :datagram, got %v", argv[n]);
    }
    return socktype;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
pushq $0x2
popq %r14
movl %r14d, %edx
xorl %ecx, %ecx
callq 0x17bf9
pushq $0x1
popq %r15
testq %rax, %rax
je 0x31372
movq %rax, %r12
leaq 0x2575d(%rip), %rsi     # 0x56aad
movq %rax, %rdi
callq 0x44ca9
testl %eax, %eax
je 0x31372
leaq 0x2d41f(%rip), %rsi     # 0x5e782
movq %r12, %rdi
callq 0x44ca9
movl %r14d, %r15d
testl %eax, %eax
jne 0x3137e
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rbx), %rsi
leaq 0x2d402(%rip), %rdi     # 0x5e78b
xorl %eax, %eax
callq 0x176c9
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/net.c
// Function: serverify_socket
static const char *serverify_socket(JSock sfd, int reuse_addr, int reuse_port) {
    /* Set various socket options */
    int enable = 1;
    if (reuse_addr) {
        if (setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, (char *) &enable, sizeof(int)) < 0) {
            return "setsockopt(SO_REUSEADDR) failed";
        }
    }
    if (reuse_port) {
#ifdef SO_REUSEPORT
        if (setsockopt(sfd, SOL_SOCKET, SO_REUSEPORT, &enable, sizeof(int)) < 0) {
            return "setsockopt(SO_REUSEPORT) failed";
        }
#else
        (void) reuse_port;
#endif
    }
    janet_net_socknoblock(sfd);
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %r14d
movl %edi, %ebx
movl $0x1, -0x14(%rbp)
testl %esi, %esi
je 0x31b36
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
leaq -0x14(%rbp), %rcx
pushq $0x4
popq %r8
movl %ebx, %edi
callq 0x121f0
testl %eax, %eax
js 0x31b5f
testl %r14d, %r14d
je 0x31b54
pushq $0x1
popq %rsi
pushq $0xf
popq %rdx
leaq -0x14(%rbp), %rcx
pushq $0x4
popq %r8
movl %ebx, %edi
callq 0x121f0
testl %eax, %eax
js 0x31b68
movl %ebx, %edi
callq 0x310f4
xorl %eax, %eax
jmp 0x31b6f
leaq 0x2cc7e(%rip), %rax     # 0x5e7e4
jmp 0x31b6f
leaq 0x2cc95(%rip), %rax     # 0x5e804
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/net.c
// Function: janet_so_getname
static Janet janet_so_getname(const void *sa_any) {
    const struct sockaddr *sa = sa_any;
    char buffer[SA_ADDRSTRLEN];
    switch (sa->sa_family) {
        default:
            janet_panic("unknown address family");
        case AF_INET: {
            const struct sockaddr_in *sai = sa_any;
            if (!inet_ntop(AF_INET, &(sai->sin_addr), buffer, sizeof(buffer))) {
                janet_panic("unable to decode ipv4 host address");
            }
            Janet pair[2] = {janet_cstringv(buffer), janet_wrap_integer(ntohs(sai->sin_port))};
            return janet_wrap_tuple(janet_tuple_n(pair, 2));
        }
#ifndef JANET_NO_IPV6
        case AF_INET6: {
            const struct sockaddr_in6 *sai6 = sa_any;
            if (!inet_ntop(AF_INET6, &(sai6->sin6_addr), buffer, sizeof(buffer))) {
                janet_panic("unable to decode ipv4 host address");
            }
            Janet pair[2] = {janet_cstringv(buffer), janet_wrap_integer(ntohs(sai6->sin6_port))};
            return janet_wrap_tuple(janet_tuple_n(pair, 2));
        }
#endif
#ifndef JANET_WINDOWS
        case AF_UNIX: {
            const struct sockaddr_un *sun = sa_any;
            Janet pathname;
            if (sun->sun_path[0] == '\0') {
                memcpy(buffer, sun->sun_path, sizeof(sun->sun_path));
                buffer[0] = '@';
                pathname = janet_cstringv(buffer);
            } else {
                pathname = janet_cstringv(sun->sun_path);
            }
            return janet_wrap_tuple(janet_tuple_n(&pathname, 1));
        }
#endif
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
movzwl (%rdi), %eax
cmpl $0x1, %eax
je 0x31ceb
cmpl $0x2, %eax
je 0x31c87
cmpl $0xa, %eax
jne 0x31d65
leaq 0x8(%rbx), %rsi
pushq $0xa
jmp 0x31c8d
leaq 0x4(%rbx), %rsi
pushq $0x2
popq %rdi
leaq -0x90(%rbp), %rdx
pushq $0x6d
popq %rcx
callq 0x12030
testq %rax, %rax
je 0x31d59
leaq -0x90(%rbp), %rdi
callq 0x411ea
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
movq %rax, %rdi
callq 0x4b366
leaq -0x20(%rbp), %r14
movq %rax, (%r14)
movzwl 0x2(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
cvtsi2sd %eax, %xmm0
callq 0x4b471
movq %rax, 0x8(%r14)
pushq $0x2
popq %rsi
movq %r14, %rdi
jmp 0x31d36
movabsq $-0x6000000000000, %r14 # imm = 0xFFFA000000000000
leaq 0x2(%rbx), %rsi
cmpb $0x0, 0x2(%rbx)
je 0x31d04
movq %rsi, %rdi
jmp 0x31d1c
leaq -0x90(%rbp), %rbx
pushq $0x6c
popq %rdx
movq %rbx, %rdi
callq 0x12670
movb $0x40, (%rbx)
movq %rbx, %rdi
callq 0x411ea
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
leaq -0x20(%rbp), %rdi
movq %rax, (%rdi)
pushq $0x1
popq %rsi
callq 0x44692
movabsq $-0x4000000000000, %rsi # imm = 0xFFFC000000000000
movq %rax, %rdi
callq 0x4b366
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x2cadb(%rip), %rdi     # 0x5e83b
callq 0x177b1
leaq 0x2cab8(%rip), %rdi     # 0x5e824
callq 0x177b1
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/net.c
// Function: janet_sched_accept
JANET_NO_RETURN static void janet_sched_accept(JanetStream *stream, JanetFunction *fun) {
    NetStateAccept *state = janet_malloc(sizeof(NetStateAccept));
    memset(state, 0, sizeof(NetStateAccept));
    state->function = fun;
    if (fun) janet_stream_level_triggered(stream);
    janet_async_start(stream, JANET_ASYNC_LISTEN_READ, net_callback_accept, state);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x8
popq %rdi
callq 0x12760
movq %rax, %r14
movq %r15, (%rax)
testq %r15, %r15
je 0x31f0b
movq %rbx, %rdi
callq 0x22e7a
leaq -0xf48(%rip), %rdx      # 0x30fca
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %r14, %rcx
callq 0x20550
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/os.c
// Function: os_proc_wait_impl
static Janet
#endif
os_proc_wait_impl(JanetProc *proc) {
    if (proc->flags & (JANET_PROC_WAITED | JANET_PROC_WAITING)) {
        janet_panicf("cannot wait twice on a process");
    }
#ifdef JANET_EV
    /* Event loop implementation - threaded call */
    proc->flags |= JANET_PROC_WAITING;
    JanetEVGenericMessage targs;
    memset(&targs, 0, sizeof(targs));
    targs.argp = proc;
    targs.fiber = janet_root_fiber();
    targs.argi = (uint32_t) targs.fiber->sched_id;
    janet_gcroot(janet_wrap_abstract(proc));
    janet_gcroot(janet_wrap_fiber(targs.fiber));
    janet_ev_threaded_call(janet_proc_wait_subr, targs, janet_proc_wait_cb);
    janet_await();
#else
    /* Non evented implementation */
    proc->flags |= JANET_PROC_WAITED;
    int status = 0;
#ifdef JANET_WINDOWS
    WaitForSingleObject(proc->pHandle, INFINITE);
    GetExitCodeProcess(proc->pHandle, &status);
    if (!(proc->flags & JANET_PROC_CLOSED)) {
        proc->flags |= JANET_PROC_CLOSED;
        CloseHandle(proc->pHandle);
        CloseHandle(proc->tHandle);
    }
#else
    waitpid(proc->pid, &status, 0);
#endif
    proc->return_code = (int32_t) status;
    return janet_wrap_integer(proc->return_code);
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl (%rdi), %eax
testb $0x6, %al
jne 0x32802
movq %rdi, %rbx
orl $0x4, %eax
movl %eax, (%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, -0x30(%rbp)
andq $0x0, -0x20(%rbp)
movq %rdi, -0x28(%rbp)
callq 0x2799c
movq %rax, %r14
movq %rax, -0x18(%rbp)
movl 0x48(%rax), %eax
movl %eax, -0x2c(%rbp)
movabsq $-0x1000000000000, %rsi # imm = 0xFFFF000000000000
movq %rbx, %rdi
callq 0x4b3ab
movq %rax, %rdi
callq 0x28c2a
movabsq $-0x6800000000000, %rsi # imm = 0xFFF9800000000000
movq %r14, %rdi
callq 0x4b3ab
movq %rax, %rdi
callq 0x28c2a
movaps -0x30(%rbp), %xmm0
movaps -0x20(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0x2b00(%rip), %rdi      # 0x352f1
leaq 0x2bad(%rip), %rsi      # 0x353a5
callq 0x23007
callq 0x20591
leaq 0x2fbdc(%rip), %rdi     # 0x623e5
xorl %eax, %eax
callq 0x176c9
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/os.c
// Function: get_signal_kw
static int get_signal_kw(const Janet *argv, int32_t n) {
    JanetKeyword signal_kw = janet_getkeyword(argv, n);
    const struct keyword_signal *ptr = signal_keywords;
    while (ptr->keyword) {
        if (!janet_cstrcmp(signal_kw, ptr->keyword)) {
            return ptr->signal;
        }
        ptr++;
    }
    janet_panicf("undefined signal %v", argv[n]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
callq 0x17a2c
movq %rax, %r15
leaq 0x4b667(%rip), %r12     # 0x7df68
movq -0x8(%r12), %rsi
testq %rsi, %rsi
je 0x3292a
movq %r15, %rdi
callq 0x44ca9
testl %eax, %eax
je 0x3291d
addq $0x10, %r12
jmp 0x32901
movl (%r12), %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %r14d, %eax
movq (%rbx,%rax,8), %rsi
leaq 0x2fb29(%rip), %rdi     # 0x62461
xorl %eax, %eax
callq 0x176c9
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/os.c
// Function: janet_signal_trampoline
static void janet_signal_trampoline(int sig) {
    /* Do not interact with global janet state here except for janet_ev_post_event, unsafe! */
    JanetEVGenericMessage msg;
    memset(&msg, 0, sizeof(msg));
    msg.tag = sig;
    msg.argi = 1;
    janet_interpreter_interrupt(NULL);
    janet_ev_post_event(&janet_vm, janet_signal_callback, msg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
andq $0x0, -0x8(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, -0x18(%rbp)
movl %edi, -0x20(%rbp)
movl $0x1, -0x1c(%rbp)
xorl %edi, %edi
callq 0x4106c
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movups -0x20(%rbp), %xmm0
movups -0x10(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0x2883(%rip), %rsi      # 0x35489
movq %rax, %rdi
callq 0x22006
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/os.c
// Function: janet_signal_trampoline_no_interrupt
static void janet_signal_trampoline_no_interrupt(int sig) {
    /* Do not interact with global janet state here except for janet_ev_post_event, unsafe! */
    JanetEVGenericMessage msg;
    memset(&msg, 0, sizeof(msg));
    msg.tag = sig;
    janet_ev_post_event(&janet_vm, janet_signal_callback, msg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, -0x20(%rbp)
movaps %xmm0, -0x10(%rbp)
movl %edi, -0x20(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movaps -0x20(%rbp), %xmm0
movaps -0x10(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0x2837(%rip), %rsi      # 0x35489
movq %rax, %rdi
callq 0x22006
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/os.c
// Function: os_shell_subr
static JanetEVGenericMessage os_shell_subr(JanetEVGenericMessage args) {
    int stat = system((const char *) args.argp);
    janet_free(args.argp);
    if (args.argi) {
        args.tag = JANET_EV_TCTAG_INTEGER;
    } else {
        args.tag = JANET_EV_TCTAG_BOOLEAN;
    }
    args.argi = stat;
    return args;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rbp), %r14
movq %r14, %rdi
callq 0x12340
movl %eax, %r15d
movq %r14, %rdi
callq 0x120b0
cmpl $0x0, 0x14(%rbp)
pushq $0x8
popq %rax
pushq $0x1
popq %rcx
cmovel %eax, %ecx
movl %ecx, 0x10(%rbp)
movl %r15d, 0x14(%rbp)
movaps 0x20(%rbp), %xmm0
movups %xmm0, 0x10(%rbx)
movl 0x10(%rbp), %eax
movl %eax, (%rbx)
movl 0x14(%rbp), %eax
movl %eax, 0x4(%rbx)
movq 0x18(%rbp), %rax
movq %rax, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/os.c
// Function: time_to_tm
static struct tm *time_to_tm(const Janet *argv, int32_t argc, int32_t n, struct tm *t_infos) {
    time_t t;
    if (argc > n && !janet_checktype(argv[n], JANET_NIL)) {
        int64_t integer = janet_getinteger64(argv, n);
        t = (time_t) integer;
    } else {
        time(&t);
    }
    struct tm *t_info = NULL;
    if (argc > n + 1 && janet_truthy(argv[n + 1])) {
        /* local time */
#ifdef JANET_WINDOWS
        _tzset();
        localtime_s(t_infos, &t);
        t_info = t_infos;
#else
        tzset();
        t_info = localtime_r(&t, t_infos);
#endif
    } else {
        /* utc time */
#ifdef JANET_WINDOWS
        gmtime_s(t_infos, &t);
        t_info = t_infos;
#else
        t_info = gmtime_r(&t, t_infos);
#endif
    }
    return t_info;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %r14d
movl %esi, %r12d
movq %rdi, %r15
movabsq $-0x800000000000, %r13  # imm = 0xFFFF800000000000
cmpl %edx, %esi
jle 0x33fcd
movl %r14d, %eax
movq (%r15,%rax,8), %rax
andq %r13, %rax
movabsq $-0x7800000000000, %rcx # imm = 0xFFF8800000000000
cmpq %rcx, %rax
jne 0x33fd8
leaq -0x30(%rbp), %rdi
callq 0x126e0
jmp 0x33fe7
movq %r15, %rdi
movl %r14d, %esi
callq 0x180e5
movq %rax, -0x30(%rbp)
incl %r14d
cmpl %r12d, %r14d
jge 0x3401b
movl %r14d, %eax
movq (%r15,%rax,8), %rax
andq %rax, %r13
movabsq $-0x7800000000000, %rcx # imm = 0xFFF8800000000000
cmpq %rcx, %r13
je 0x3401b
movabsq $-0x7000000000000, %rcx # imm = 0xFFF9000000000000
cmpq %rcx, %r13
jne 0x34029
testb $0x1, %al
jne 0x34029
leaq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x123d0
jmp 0x3403a
callq 0x126c0
leaq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x12170
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/os.c
// Function: entry_getint
static timeint_t entry_getint(Janet env_entry, char *field) {
    Janet i;
    if (janet_checktype(env_entry, JANET_TABLE)) {
        JanetTable *entry = janet_unwrap_table(env_entry);
        i = janet_table_get(entry, janet_ckeywordv(field));
    } else if (janet_checktype(env_entry, JANET_STRUCT)) {
        const JanetKV *entry = janet_unwrap_struct(env_entry);
        i = janet_struct_get(entry, janet_ckeywordv(field));
    } else {
        return 0;
    }

    if (janet_checktype(i, JANET_NIL)) {
        return 0;
    }

#ifdef JANET_WINDOWS
    if (!janet_checkint(i)) {
        janet_panicf("bad slot #%s, expected 32 bit signed integer, got %v",
                     field, i);
    }
#else
    if (!janet_checkint64(i)) {
        janet_panicf("bad slot #%s, expected 64 bit signed integer, got %v",
                     field, i);
    }
#endif

    return (timeint_t)janet_unwrap_number(i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movabsq $-0x800000000000, %r15  # imm = 0xFFFF800000000000
movq %rdi, %rax
andq %r15, %rax
movabsq $-0x3000000000000, %rcx # imm = 0xFFFD000000000000
cmpq %rcx, %rax
je 0x34399
movabsq $-0x3800000000000, %rcx # imm = 0xFFFC800000000000
cmpq %rcx, %rax
jne 0x343db
callq 0x4b1f1
movq %rax, %r14
movq %rbx, %rdi
callq 0x439c6
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
movq %rax, %rdi
callq 0x4b366
movq %r14, %rdi
movq %rax, %rsi
callq 0x43c35
jmp 0x343c6
callq 0x4b1f1
movq %rax, %r14
movq %rbx, %rdi
callq 0x439c6
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
movq %rax, %rdi
callq 0x4b366
movq %r14, %rdi
movq %rax, %rsi
callq 0x430d3
movq %rax, %r14
andq %rax, %r15
movabsq $-0x7800000000000, %rax # imm = 0xFFF8800000000000
cmpq %rax, %r15
jne 0x343df
xorl %eax, %eax
jmp 0x343f5
movq %r14, %rdi
callq 0x45ef9
testl %eax, %eax
je 0x34400
movq %r14, %xmm0
cvttsd2si %xmm0, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2e1a4(%rip), %rdi     # 0x625ab
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x176c9
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/os.c
// Function: os_make_permstring
static Janet os_make_permstring(int32_t permissions) {
    uint8_t bytes[9] = {0};
    bytes[0] = (permissions & 0400) ? 'r' : '-';
    bytes[1] = (permissions & 0200) ? 'w' : '-';
    bytes[2] = (permissions & 0100) ? 'x' : '-';
    bytes[3] = (permissions & 0040) ? 'r' : '-';
    bytes[4] = (permissions & 0020) ? 'w' : '-';
    bytes[5] = (permissions & 0010) ? 'x' : '-';
    bytes[6] = (permissions & 0004) ? 'r' : '-';
    bytes[7] = (permissions & 0002) ? 'w' : '-';
    bytes[8] = (permissions & 0001) ? 'x' : '-';
    return janet_stringv(bytes, sizeof(bytes));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
btl $0x8, %edi
pushq $0x2d
popq %rcx
pushq $0x72
popq %rdx
movl %edx, %esi
cmovael %ecx, %esi
leaq -0x9(%rbp), %rax
movb %sil, (%rax)
testb %dil, %dil
pushq $0x77
popq %rsi
movl %esi, %r8d
cmovnsl %ecx, %r8d
movb %r8b, 0x1(%rax)
testb $0x40, %dil
pushq $0x78
popq %r8
movl %r8d, %r9d
cmovel %ecx, %r9d
testb $0x20, %dil
movl %edx, %r10d
cmovel %ecx, %r10d
movb %r9b, 0x2(%rax)
movb %r10b, 0x3(%rax)
testb $0x10, %dil
movl %esi, %r9d
cmovel %ecx, %r9d
movb %r9b, 0x4(%rax)
testb $0x8, %dil
movl %r8d, %r9d
cmovel %ecx, %r9d
movb %r9b, 0x5(%rax)
testb $0x4, %dil
cmovel %ecx, %edx
movb %dl, 0x6(%rax)
testb $0x2, %dil
cmovel %ecx, %esi
movb %sil, 0x7(%rax)
testb $0x1, %dil
cmovel %ecx, %r8d
movb %r8b, 0x8(%rax)
pushq $0x9
popq %rsi
movq %rax, %rdi
callq 0x41116
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
movq %rax, %rdi
callq 0x4b366
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/os.c
// Function: os_get_unix_mode
static int32_t os_get_unix_mode(const Janet *argv, int32_t n) {
    int32_t unix_mode;
    if (janet_checkint(argv[n])) {
        /* Integer mode */
        int32_t x = janet_unwrap_integer(argv[n]);
        if (x < 0 || x > 0777) {
            janet_panicf("bad slot #%d, expected integer in range [0, 8r777], got %v", n, argv[n]);
        }
        unix_mode = x;
    } else {
        /* Bytes mode */
        JanetByteView bytes = janet_getbytes(argv, n);
        if (bytes.len != 9) {
            janet_panicf("bad slot #%d: expected byte sequence of length 9, got %v", n, argv[n]);
        }
        unix_mode = os_parse_permstring(bytes.bytes);
    }
    return unix_mode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %r15d
movq (%rdi,%r15,8), %rdi
callq 0x45e2b
testl %eax, %eax
je 0x34f52
movsd (%r14,%r15,8), %xmm0
cvttsd2si %xmm0, %ecx
cmpl $0x200, %ecx            # imm = 0x200
jb 0x34fc8
movq %xmm0, %rdx
leaq 0x2d6f8(%rip), %rdi     # 0x62645
jmp 0x34fe0
movq %r14, %rdi
movl %ebx, %esi
callq 0x17ea2
cmpl $0x9, %edx
jne 0x34fd5
xorl %ecx, %ecx
cmpb $0x72, (%rax)
sete %cl
shll $0x8, %ecx
cmpb $0x77, 0x1(%rax)
leal 0x80(%rcx), %edx
cmovnel %ecx, %edx
leal 0x40(%rdx), %ecx
cmpb $0x78, 0x2(%rax)
cmovnel %edx, %ecx
leal 0x20(%rcx), %edx
cmpb $0x72, 0x3(%rax)
cmovnel %ecx, %edx
movl %edx, %ecx
orl $0x10, %ecx
cmpb $0x77, 0x4(%rax)
cmovnel %edx, %ecx
movl %ecx, %edx
orl $0x8, %edx
cmpb $0x78, 0x5(%rax)
cmovnel %ecx, %edx
movl %edx, %ecx
orl $0x4, %ecx
cmpb $0x72, 0x6(%rax)
cmovnel %edx, %ecx
movl %ecx, %edx
orl $0x2, %edx
cmpb $0x77, 0x7(%rax)
cmovnel %ecx, %edx
xorl %ecx, %ecx
cmpb $0x78, 0x8(%rax)
sete %cl
orl %edx, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%r14,%r15,8), %rdx
leaq 0x2d6a0(%rip), %rdi     # 0x62680
movl %ebx, %esi
xorl %eax, %eax
callq 0x176c9
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/os.c
// Function: janet_proc_wait_cb
static void janet_proc_wait_cb(JanetEVGenericMessage args) {
    JanetProc *proc = (JanetProc *) args.argp;
    if (NULL != proc) {
        int status = args.tag;
        proc->return_code = (int32_t) status;
        proc->flags |= JANET_PROC_WAITED;
        proc->flags &= ~JANET_PROC_WAITING;
        janet_gcunroot(janet_wrap_abstract(proc));
        janet_gcunroot(janet_wrap_fiber(args.fiber));
        uint32_t sched_id = (uint32_t) args.argi;
        if (janet_fiber_can_resume(args.fiber) && args.fiber->sched_id == sched_id) {
            if ((status != 0) && (proc->flags & JANET_PROC_ERROR_NONZERO)) {
                JanetString s = janet_formatc("command failed with non-zero exit code %d", status);
                janet_cancel(args.fiber, janet_wrap_string(s));
            } else {
                janet_schedule(args.fiber, janet_wrap_integer(status));
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x18(%rbp), %r15
testq %r15, %r15
je 0x3544b
leaq 0x10(%rbp), %r12
movl (%r12), %ebx
movl %ebx, 0x8(%r15)
movl (%r15), %eax
andl $-0x7, %eax
orl $0x2, %eax
movl %eax, (%r15)
movabsq $-0x1000000000000, %rsi # imm = 0xFFFF000000000000
movq %r15, %rdi
callq 0x4b3ab
movq %rax, %rdi
callq 0x293b5
movq 0x18(%r12), %r14
movabsq $-0x6800000000000, %rsi # imm = 0xFFF9800000000000
movq %r14, %rdi
callq 0x4b3ab
movq %rax, %rdi
callq 0x293b5
movl 0x4(%r12), %r12d
movq %r14, %rdi
callq 0x27d86
testl %eax, %eax
je 0x3544b
cmpl %r12d, 0x48(%r14)
jne 0x3544b
testl %ebx, %ebx
je 0x3542f
testb $0x8, (%r15)
jne 0x35454
cvtsi2sd %ebx, %xmm0
callq 0x4b471
movq %r14, %rdi
movq %rax, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x209ca
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2cfdc(%rip), %rdi     # 0x62437
movl %ebx, %esi
xorl %eax, %eax
callq 0x3c0ed
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
movq %rax, %rdi
callq 0x4b366
movq %r14, %rdi
movq %rax, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x209bb
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/os.c
// Function: janet_signal_callback
static void janet_signal_callback(JanetEVGenericMessage msg) {
    int sig = msg.tag;
    if (msg.argi) janet_interpreter_interrupt_handled(NULL);
    Janet handlerv = janet_table_get(&janet_vm.signal_handlers, janet_wrap_integer(sig));
    if (!janet_checktype(handlerv, JANET_FUNCTION)) {
        /* Let another thread/process try to handle this */
        sigset_t set;
        sigemptyset(&set);
        sigaddset(&set, sig);
#ifdef JANET_THREADS
        pthread_sigmask(SIG_BLOCK, &set, NULL);
#else
        sigprocmask(SIG_BLOCK, &set, NULL);
#endif
        raise(sig);
        return;
    }
    JanetFunction *handler = janet_unwrap_function(handlerv);
    JanetFiber *fiber = janet_fiber(handler, 64, 0, NULL);
    janet_schedule_soon(fiber, janet_wrap_nil(), JANET_SIGNAL_OK);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movl 0x10(%rbp), %ebx
cmpl $0x0, 0x14(%rbp)
je 0x354a7
xorl %edi, %edi
callq 0x4109e
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
leaq 0x2c8(%rax), %r14
cvtsi2sd %ebx, %xmm0
callq 0x4b471
movq %r14, %rdi
movq %rax, %rsi
callq 0x43c35
movq %rax, %rcx
shrq $0x2f, %rcx
cmpl $0x1fffc, %ecx          # imm = 0x1FFFC
jne 0x35522
movq %rax, %rdi
callq 0x4b1f1
pushq $0x40
popq %rsi
movq %rax, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x271c9
movq %rax, %rbx
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x4b313
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x209ac
leaq -0x90(%rbp), %r14
movq %r14, %rdi
callq 0x125f0
movq %r14, %rdi
movl %ebx, %esi
callq 0x12bc0
xorl %edi, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x12080
movl %ebx, %edi
callq 0x120a0
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/os.c
// Function: janet_proc_gc
static int janet_proc_gc(void *p, size_t s) {
    (void) s;
    JanetProc *proc = (JanetProc *) p;
#ifdef JANET_WINDOWS
    if (!(proc->flags & JANET_PROC_CLOSED)) {
        if (!(proc->flags & JANET_PROC_ALLOW_ZOMBIE)) {
            TerminateProcess(proc->pHandle, 1);
        }
        CloseHandle(proc->pHandle);
        CloseHandle(proc->tHandle);
    }
#else
    if (!(proc->flags & (JANET_PROC_WAITED | JANET_PROC_ALLOW_ZOMBIE))) {
        /* Kill and wait to prevent zombies */
        kill(proc->pid, SIGKILL);
        int status;
        if (!(proc->flags & JANET_PROC_WAITING)) {
            waitpid(proc->pid, &status, 0);
        }
    }
#endif
    return 0;
}

// Assembly:
testb $-0x7e, (%rdi)
jne 0x3558c
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %edi
pushq $0x9
popq %rsi
callq 0x126d0
testb $0x4, (%rbx)
jne 0x35586
movl 0x4(%rbx), %edi
leaq -0xc(%rbp), %rsi
xorl %edx, %edx
callq 0x12940
addq $0x8, %rsp
popq %rbx
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/os.c
// Function: janet_proc_mark
static int janet_proc_mark(void *p, size_t s) {
    (void) s;
    JanetProc *proc = (JanetProc *)p;
    if (NULL != proc->in) janet_mark(janet_wrap_abstract(proc->in));
    if (NULL != proc->out) janet_mark(janet_wrap_abstract(proc->out));
    if (NULL != proc->err) janet_mark(janet_wrap_abstract(proc->err));
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movabsq $-0x1000000000000, %rbx # imm = 0xFFFF000000000000
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x355bc
movq %rbx, %rsi
callq 0x4b3ab
movq %rax, %rdi
callq 0x28843
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x355d5
movq %rbx, %rsi
callq 0x4b3ab
movq %rax, %rdi
callq 0x28843
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0x355ee
movq %rbx, %rsi
callq 0x4b3ab
movq %rax, %rdi
callq 0x28843
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/os.c
// Function: janet_proc_get
static int janet_proc_get(void *p, Janet key, Janet *out) {
    JanetProc *proc = (JanetProc *)p;
    if (janet_keyeq(key, "in")) {
        *out = (NULL == proc->in) ? janet_wrap_nil() : janet_wrap_abstract(proc->in);
        return 1;
    }
    if (janet_keyeq(key, "out")) {
        *out = (NULL == proc->out) ? janet_wrap_nil() : janet_wrap_abstract(proc->out);
        return 1;
    }
    if (janet_keyeq(key, "err")) {
        *out = (NULL == proc->err) ? janet_wrap_nil() : janet_wrap_abstract(proc->err);
        return 1;
    }
#ifndef JANET_WINDOWS
    if (janet_keyeq(key, "pid")) {
        *out = janet_wrap_number(proc->pid);
        return 1;
    }
#endif
    if ((-1 != proc->return_code) && janet_keyeq(key, "return-code")) {
        *out = janet_wrap_integer(proc->return_code);
        return 1;
    }
    if (!janet_checktype(key, JANET_KEYWORD)) return 0;
    return janet_getmethod(janet_unwrap_keyword(key), proc_methods, out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x1eda3(%rip), %rsi     # 0x543b2
movq %r14, %rdi
callq 0x17922
testl %eax, %eax
je 0x35621
movq 0x10(%r15), %rdi
jmp 0x35651
leaq 0x24f39(%rip), %rsi     # 0x5a561
movq %r14, %rdi
callq 0x17922
testl %eax, %eax
je 0x3563a
movq 0x18(%r15), %rdi
jmp 0x35651
leaq 0x213dd(%rip), %rsi     # 0x56a1e
movq %r14, %rdi
callq 0x17922
testl %eax, %eax
je 0x35687
movq 0x20(%r15), %rdi
testq %rdi, %rdi
je 0x35667
movabsq $-0x1000000000000, %rsi # imm = 0xFFFF000000000000
callq 0x4b3ab
jmp 0x35676
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x4b313
movq %rax, (%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2cd2d(%rip), %rsi     # 0x623bb
movq %r14, %rdi
callq 0x17922
testl %eax, %eax
je 0x356a7
cvtsi2sdl 0x4(%r15), %xmm0
callq 0x4b471
jmp 0x35676
cmpl $-0x1, 0x8(%r15)
je 0x356c9
leaq 0x2ce3e(%rip), %rsi     # 0x624f3
movq %r14, %rdi
callq 0x17922
testl %eax, %eax
je 0x356c9
cvtsi2sdl 0x8(%r15), %xmm0
jmp 0x356a0
movq %r14, %rcx
shrq $0x2f, %rcx
xorl %eax, %eax
cmpl $0x1fff6, %ecx          # imm = 0x1FFF6
jne 0x3567c
movq %r14, %rdi
callq 0x4b1f1
leaq 0x48a47(%rip), %rsi     # 0x7e130
movq %rax, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1785d
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/os.c
// Function: janet_getjstream
static JanetHandle janet_getjstream(Janet *argv, int32_t n, void **orig) {
#ifdef JANET_EV
    JanetStream *stream = janet_checkabstract(argv[n], &janet_stream_type);
    if (stream != NULL) {
        if (stream->flags & JANET_STREAM_CLOSED)
            janet_panic("stream is closed");
        *orig = stream;
        return stream->handle;
    }
#endif
    JanetFile *f = janet_checkabstract(argv[n], &janet_file_type);
    if (f != NULL) {
        if (f->flags & JANET_FILE_CLOSED) {
            janet_panic("file is closed");
        }
        *orig = f;
#ifdef JANET_WINDOWS
        return (HANDLE) _get_osfhandle(_fileno(f->file));
#else
        return fileno(f->file);
#endif
    }
    janet_panicf("expected file|stream, got %v", argv[n]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
leaq 0x45c97(%rip), %rsi     # 0x7b410
callq 0x17f51
testq %rax, %rax
je 0x35793
testb $0x1, 0x4(%rax)
jne 0x357bc
movq %rax, (%rbx)
movl (%rax), %eax
popq %rbx
popq %r14
popq %rbp
retq
movq (%r14), %rdi
leaq 0x46e53(%rip), %rsi     # 0x7c5f0
callq 0x17f51
testq %rax, %rax
je 0x357c8
testb $0x20, 0x8(%rax)
jne 0x357d9
movq %rax, (%rbx)
movq (%rax), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x126f0
leaq 0x211e8(%rip), %rdi     # 0x569ab
callq 0x177b1
movq (%r14), %rsi
leaq 0x2cdbc(%rip), %rdi     # 0x6258e
xorl %eax, %eax
callq 0x176c9
leaq 0x24be4(%rip), %rdi     # 0x5a3c4
callq 0x177b1
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/os.c
// Function: get_stdio_for_handle
static JanetStream *get_stdio_for_handle(JanetHandle handle, void *orig, int iswrite) {
    if (orig == NULL) {
        return janet_stream(handle, iswrite ? JANET_STREAM_WRITABLE : JANET_STREAM_READABLE, NULL);
    } else if (janet_abstract_type(orig) == &janet_file_type) {
        JanetFile *jf = (JanetFile *)orig;
        uint32_t flags = 0;
        if (jf->flags & JANET_FILE_WRITE) {
            flags |= JANET_STREAM_WRITABLE;
        }
        if (jf->flags & JANET_FILE_READ) {
            flags |= JANET_STREAM_READABLE;
        }
        /* duplicate handle when converting file to stream */
#ifdef JANET_WINDOWS
        HANDLE prochandle = GetCurrentProcess();
        HANDLE newHandle = INVALID_HANDLE_VALUE;
        if (!DuplicateHandle(prochandle, handle, prochandle, &newHandle, 0, FALSE, DUPLICATE_SAME_ACCESS)) {
            return NULL;
        }
#else
        int newHandle = dup(handle);
        if (newHandle < 0) {
            return NULL;
        }
#endif
        return janet_stream(newHandle, flags, NULL);
    } else {
        return orig;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x35807
movq -0x10(%rsi), %rax
cmpq 0x4a795(%rip), %rax     # 0x7ff90
je 0x3581a
movq %rsi, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %esi, %esi
testl %edx, %edx
setne %sil
shll $0x9, %esi
addl $0x200, %esi            # imm = 0x200
jmp 0x35869
movl 0x8(%rsi), %ebx
callq 0x123e0
testl %eax, %eax
js 0x35876
andl $0x3, %ebx
rolw $0x8, %bx
movl %ebx, %ecx
shrl $0x4, %ecx
movl $0xf0f, %edx            # imm = 0xF0F
andl %edx, %ecx
andl %edx, %ebx
shll $0x4, %ebx
orl %ecx, %ebx
movl $0x3333, %ecx           # imm = 0x3333
movl %ebx, %edx
andl %ecx, %edx
shrl $0x2, %ebx
andl %ecx, %ebx
leal (%rbx,%rdx,4), %ecx
movl %ecx, %edx
andl $0x5550, %edx           # imm = 0x5550
shrl %ecx
andl $0x5540, %ecx           # imm = 0x5540
leal (%rcx,%rdx,2), %esi
shrl $0x5, %esi
movl %eax, %edi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x20657
xorl %esi, %esi
jmp 0x357fd
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/parse.c
// Function: janet_valid_utf8
int janet_valid_utf8(const uint8_t *str, int32_t len) {
    int32_t i = 0;
    int32_t j;
    while (i < len) {
        int32_t nexti;
        uint8_t c = str[i];

        /* Check the number of bytes in code point */
        if (c < 0x80) nexti = i + 1;
        else if ((c >> 5) == 0x06) nexti = i + 2;
        else if ((c >> 4) == 0x0E) nexti = i + 3;
        else if ((c >> 3) == 0x1E) nexti = i + 4;
        /* Don't allow 5 or 6 byte code points */
        else return 0;

        /* No overflow */
        if (nexti > len) return 0;

        /* Ensure trailing bytes are well formed (10XX XXXX) */
        for (j = i + 1; j < nexti; j++) {
            if ((str[j] >> 6) != 2) return 0;
        }

        /* Check for overlong encoding */
        if ((nexti == i + 2) && str[i] < 0xC2) return 0;
        if ((str[i] == 0xE0) && str[i + 1] < 0xA0) return 0;
        if ((str[i] == 0xF0) && str[i + 1] < 0x90) return 0;

        i = nexti;
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
xorl %edx, %edx
movl $0x1, %ecx
movl $0x2, %r8d
movl $0x3, %r9d
movl $0x4, %r10d
xorl %eax, %eax
cmpl %esi, %edx
jge 0x35b21
movl %edx, %r11d
movzbl (%rdi,%r11), %ebx
movl $0x0, %r14d
movl %ecx, %r15d
testb %bl, %bl
jns 0x35ac0
movl %ebx, %r12d
andl $-0x20, %r12d
movb $0x1, %r14b
movl %r8d, %r15d
cmpl $0xc0, %r12d
je 0x35ac0
movl %ebx, %r15d
andl $-0x10, %r15d
xorl %r14d, %r14d
cmpl $0xe0, %r15d
jne 0x35aad
movl %r9d, %r15d
jmp 0x35ac0
movl %ebx, %r15d
andl $-0x8, %r15d
cmpl $0xf0, %r15d
jne 0x35b2e
movl %r10d, %r15d
addl %r15d, %edx
cmpl %esi, %edx
jg 0x35b23
incq %r11
movl %edx, %r15d
movq %r11, %r12
cmpq %r15, %r12
jae 0x35ae7
movb (%rdi,%r12), %r13b
andb $-0x40, %r13b
incq %r12
negb %r13b
jo 0x35ad0
jmp 0x35b23
cmpb $-0x3e, %bl
setb %r15b
testb %r14b, %r15b
jne 0x35b23
cmpl $0xf0, %ebx
je 0x35b14
cmpl $0xe0, %ebx
jne 0x35a62
cmpb $-0x60, (%rdi,%r11)
jae 0x35a62
jmp 0x35b23
cmpb $-0x71, (%rdi,%r11)
ja 0x35a62
jmp 0x35b23
movl %ecx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x35b23