LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/emit.c
// Function: janetc_copy
void janetc_copy(
    JanetCompiler *c,
    JanetSlot dest,
    JanetSlot src) {
    if (dest.flags & JANET_SLOT_CONSTANT) {
        janetc_cerror(c, "cannot write to constant");
        return;
    }
    if (janetc_sequal(dest, src)) return;
    /* If dest is a near register */
    if (dest.envindex < 0 && dest.index >= 0 && dest.index <= 0xFF) {
        janetc_movenear(c, dest.index, src);
        return;
    }
    /* If src is a near register */
    if (src.envindex < 0 && src.index >= 0 && src.index <= 0xFF) {
        janetc_moveback(c, dest, src.index);
        return;
    }
    /* Process: src -> near -> dest */
    int32_t nearreg = janetc_allocnear(c, JANETC_REGTEMP_3);
    janetc_movenear(c, nearreg, src);
    janetc_moveback(c, dest, nearreg);
    /* Cleanup */
    janetc_regalloc_freetemp(&c->scope->ra, nearreg, JANETC_REGTEMP_3);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
leaq 0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq %rdi, -0x8(%rbp)
movl 0x10(%rax), %eax
andl $0x10000, %eax          # imm = 0x10000
cmpl $0x0, %eax
je 0x295de
movq -0x8(%rbp), %rdi
leaq 0x5c96a(%rip), %rsi     # 0x85f3e
callq 0x1fff0
jmp 0x29748
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0x29510
cmpl $0x0, %eax
je 0x29628
jmp 0x29748
movq -0x18(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jge 0x2967b
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jl 0x2967b
movq -0x18(%rbp), %rax
cmpl $0xff, 0x8(%rax)
jg 0x2967b
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rdi
movl 0x8(%rcx), %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29750
jmp 0x29748
movq -0x20(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jge 0x296cb
movq -0x20(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jl 0x296cb
movq -0x20(%rbp), %rax
cmpl $0xff, 0x8(%rax)
jg 0x296cb
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rdi
movl 0x8(%rcx), %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29860
jmp 0x29748
movq -0x8(%rbp), %rdi
movl $0x3, %esi
callq 0x293e0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29750
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29860
movq -0x8(%rbp), %rax
movq (%rax), %rdi
addq $0x30, %rdi
movl -0xc(%rbp), %esi
movl $0x3, %edx
callq 0x5e250
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/emit.c
// Function: janetc_movenear
static void janetc_movenear(JanetCompiler *c,
                            int32_t dest,
                            JanetSlot src) {
    if (src.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF)) {
        janetc_loadconst(c, src.constant, dest);
        /* If we also are a reference, deref the one element array */
        if (src.flags & JANET_SLOT_REF) {
            janetc_emit(c,
                        (dest << 16) |
                        (dest << 8) |
                        JOP_GET_INDEX);
        }
    } else if (src.envindex >= 0) {
        janetc_emit(c,
                    ((uint32_t)(src.index) << 24) |
                    ((uint32_t)(src.envindex) << 16) |
                    ((uint32_t)(dest) << 8) |
                    JOP_LOAD_UPVALUE);
    } else if (src.index != dest) {
        janet_assert(src.index >= 0, "bad slot");
        janetc_emit(c,
                    ((uint32_t)(src.index) << 16) |
                    ((uint32_t)(dest) << 8) |
                    JOP_MOVE_NEAR);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl 0x10(%rax), %eax
andl $0x90000, %eax          # imm = 0x90000
cmpl $0x0, %eax
je 0x297b7
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
movq (%rax), %rsi
callq 0x2a480
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x80000, %eax          # imm = 0x80000
cmpl $0x0, %eax
je 0x297b2
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
shll $0x10, %esi
movl -0xc(%rbp), %eax
shll $0x8, %eax
orl %eax, %esi
orl $0x3d, %esi
callq 0x29410
jmp 0x29857
movq -0x18(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jl 0x297e9
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rdi
movl 0x8(%rax), %esi
shll $0x18, %esi
movl 0xc(%rax), %eax
shll $0x10, %eax
orl %eax, %esi
movl -0xc(%rbp), %eax
shll $0x8, %eax
orl %eax, %esi
orl $0x2d, %esi
callq 0x29410
jmp 0x29855
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
cmpl -0xc(%rbp), %eax
je 0x29853
jmp 0x297f7
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jge 0x29833
jmp 0x29803
movq 0x867e6(%rip), %rax     # 0xafff0
movq (%rax), %rdi
leaq 0x57800(%rip), %rsi     # 0x81014
movl $0x85, %edx
leaq 0x5c747(%rip), %rcx     # 0x85f67
leaq 0x5c750(%rip), %r8      # 0x85f77
movb $0x0, %al
callq 0x125f0
callq 0x12100
jmp 0x29835
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rdi
movl 0x8(%rax), %esi
shll $0x10, %esi
movl -0xc(%rbp), %eax
shll $0x8, %eax
orl %eax, %esi
orl $0x1b, %esi
callq 0x29410
jmp 0x29855
jmp 0x29857
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/emit.c
// Function: janetc_moveback
static void janetc_moveback(JanetCompiler *c,
                            JanetSlot dest,
                            int32_t src) {
    if (dest.flags & JANET_SLOT_REF) {
        int32_t refreg = janetc_regalloc_temp(&c->scope->ra, JANETC_REGTEMP_5);
        janetc_loadconst(c, dest.constant, refreg);
        janetc_emit(c,
                    (src << 16) |
                    (refreg << 8) |
                    JOP_PUT_INDEX);
        janetc_regalloc_freetemp(&c->scope->ra, refreg, JANETC_REGTEMP_5);
    } else if (dest.envindex >= 0) {
        janetc_emit(c,
                    ((uint32_t)(dest.index) << 24) |
                    ((uint32_t)(dest.envindex) << 16) |
                    ((uint32_t)(src) << 8) |
                    JOP_SET_UPVALUE);
    } else if (dest.index != src) {
        janet_assert(dest.index >= 0, "bad slot");
        janetc_emit(c,
                    ((uint32_t)(dest.index) << 16) |
                    ((uint32_t)(src) << 8) |
                    JOP_MOVE_FAR);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl 0x10(%rax), %eax
andl $0x80000, %eax          # imm = 0x80000
cmpl $0x0, %eax
je 0x298e8
movq -0x8(%rbp), %rax
movq (%rax), %rdi
addq $0x30, %rdi
movl $0x5, %esi
callq 0x5e180
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %edx
movq (%rax), %rsi
callq 0x2a480
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
shll $0x10, %esi
movl -0x10(%rbp), %eax
shll $0x8, %eax
orl %eax, %esi
orl $0x3e, %esi
callq 0x29410
movq -0x8(%rbp), %rax
movq (%rax), %rdi
addq $0x30, %rdi
movl -0x10(%rbp), %esi
movl $0x5, %edx
callq 0x5e250
jmp 0x29988
movq -0x18(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jl 0x2991a
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rdi
movl 0x8(%rax), %esi
shll $0x18, %esi
movl 0xc(%rax), %eax
shll $0x10, %eax
orl %eax, %esi
movl -0xc(%rbp), %eax
shll $0x8, %eax
orl %eax, %esi
orl $0x2f, %esi
callq 0x29410
jmp 0x29986
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
cmpl -0xc(%rbp), %eax
je 0x29984
jmp 0x29928
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jge 0x29964
jmp 0x29934
movq 0x866b5(%rip), %rax     # 0xafff0
movq (%rax), %rdi
leaq 0x576cf(%rip), %rsi     # 0x81014
movl $0xa0, %edx
leaq 0x5c616(%rip), %rcx     # 0x85f67
leaq 0x5c61f(%rip), %r8      # 0x85f77
movb $0x0, %al
callq 0x125f0
callq 0x12100
jmp 0x29966
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rdi
movl 0x8(%rax), %esi
shll $0x10, %esi
movl -0xc(%rbp), %eax
shll $0x8, %eax
orl %eax, %esi
orl $0x1a, %esi
callq 0x29410
jmp 0x29986
jmp 0x29988
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/emit.c
// Function: janetc_emit_s
int32_t janetc_emit_s(JanetCompiler *c, uint8_t op, JanetSlot s, int wr) {
    int32_t reg = janetc_regfar(c, s, JANETC_REGTEMP_0);
    int32_t label = janet_v_count(c->buffer);
    janetc_emit(c, op | (reg << 8));
    if (wr)
        janetc_moveback(c, s, reg);
    janetc_free_regnear(c, s, reg, JANETC_REGTEMP_0);
    return label;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %cl
leaq 0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29a80
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x299ef
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x4(%rax), %eax
movl %eax, -0x24(%rbp)
jmp 0x299f6
xorl %eax, %eax
movl %eax, -0x24(%rbp)
jmp 0x299f6
movl -0x24(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x9(%rbp), %esi
movl -0x14(%rbp), %eax
shll $0x8, %eax
orl %eax, %esi
callq 0x29410
cmpl $0x0, -0x10(%rbp)
je 0x29a40
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29860
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29b80
movl -0x18(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/emit.c
// Function: janetc_regfar
static int32_t janetc_regfar(JanetCompiler *c, JanetSlot s, JanetcRegisterTemp tag) {
    /* check if already near register */
    if (s.envindex < 0 && s.index >= 0) {
        return s.index;
    }
    int32_t reg;
    int32_t nearreg = janetc_regalloc_temp(&c->scope->ra, tag);
    janetc_movenear(c, nearreg, s);
    if (nearreg >= 0xF0) {
        reg = janetc_allocfar(c);
        janetc_emit(c, JOP_MOVE_FAR | (nearreg << 8) | (reg << 16));
        janetc_regalloc_freetemp(&c->scope->ra, nearreg, tag);
    } else {
        reg = nearreg;
        janetc_regalloc_freetemp(&c->scope->ra, nearreg, tag);
        janetc_regalloc_touch(&c->scope->ra, reg);
    }
    return reg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, 0xc(%rax)
jge 0x29ab6
movq -0x28(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jl 0x29ab6
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x29b73
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0x30, %rdi
movl -0x14(%rbp), %esi
callq 0x5e180
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29750
cmpl $0xf0, -0x1c(%rbp)
jl 0x29b3e
movq -0x10(%rbp), %rdi
callq 0x29390
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
shll $0x8, %esi
orl $0x1a, %esi
movl -0x18(%rbp), %eax
shll $0x10, %eax
orl %eax, %esi
callq 0x29410
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0x30, %rdi
movl -0x1c(%rbp), %esi
movl -0x14(%rbp), %edx
callq 0x5e250
jmp 0x29b6d
movl -0x1c(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0x30, %rdi
movl -0x1c(%rbp), %esi
movl -0x14(%rbp), %edx
callq 0x5e250
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0x30, %rdi
movl -0x18(%rbp), %esi
callq 0x5ded0
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/emit.c
// Function: janetc_free_regnear
static void janetc_free_regnear(JanetCompiler *c, JanetSlot s, int32_t reg, JanetcRegisterTemp tag) {
    if (reg != s.index ||
            s.envindex >= 0 ||
            s.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF)) {
        /* We need to free the temporary slot */
        janetc_regalloc_freetemp(&c->scope->ra, reg, tag);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x10(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x8(%rcx), %eax
jne 0x29bbd
movq -0x18(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jge 0x29bbd
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x90000, %eax          # imm = 0x90000
cmpl $0x0, %eax
je 0x29bd3
movq -0x8(%rbp), %rax
movq (%rax), %rdi
addq $0x30, %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x5e250
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/emit.c
// Function: janetc_emit_sl
int32_t janetc_emit_sl(JanetCompiler *c, uint8_t op, JanetSlot s, int32_t label) {
    int32_t current = janet_v_count(c->buffer) - 1;
    int32_t jump = label - current;
    if (jump < INT16_MIN || jump > INT16_MAX) {
        janetc_cerror(c, "jump is too far");
    }
    return emit1s(c, op, s, jump, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
leaq 0x10(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x29c18
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x4(%rax), %eax
movl %eax, -0x24(%rbp)
jmp 0x29c1f
xorl %eax, %eax
movl %eax, -0x24(%rbp)
jmp 0x29c1f
movl -0x24(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
subl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
cmpl $0xffff8000, -0x18(%rbp) # imm = 0xFFFF8000
jl 0x29c43
cmpl $0x7fff, -0x18(%rbp)    # imm = 0x7FFF
jle 0x29c53
movq -0x8(%rbp), %rdi
leaq 0x5c309(%rip), %rsi     # 0x85f57
callq 0x1fff0
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rdi
movb -0x9(%rbp), %sil
movl -0x18(%rbp), %edx
xorl %ecx, %ecx
movzbl %sil, %esi
movq (%rax), %r8
movq %r8, (%rsp)
movq 0x8(%rax), %r8
movq %r8, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29c90
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/emit.c
// Function: emit1s
static int32_t emit1s(JanetCompiler *c, uint8_t op, JanetSlot s, int32_t rest, int wr) {
    int32_t reg = janetc_regnear(c, s, JANETC_REGTEMP_0);
    int32_t label = janet_v_count(c->buffer);
    janetc_emit(c, op | (reg << 8) | ((uint32_t)rest << 16));
    if (wr)
        janetc_moveback(c, s, reg);
    janetc_free_regnear(c, s, reg, JANETC_REGTEMP_0);
    return label;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq %rdi, -0x8(%rbp)
movb %sil, -0x9(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29ff0
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x29cf0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x4(%rax), %eax
movl %eax, -0x2c(%rbp)
jmp 0x29cf7
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
jmp 0x29cf7
movl -0x2c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x9(%rbp), %esi
movl -0x18(%rbp), %eax
shll $0x8, %eax
orl %eax, %esi
movl -0x10(%rbp), %eax
shll $0x10, %eax
orl %eax, %esi
callq 0x29410
cmpl $0x0, -0x14(%rbp)
je 0x29d49
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29860
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29b80
movl -0x1c(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/emit.c
// Function: janetc_emit_ss
int32_t janetc_emit_ss(JanetCompiler *c, uint8_t op, JanetSlot s1, JanetSlot s2, int wr) {
    int32_t reg1 = janetc_regnear(c, s1, JANETC_REGTEMP_0);
    int32_t reg2 = janetc_regfar(c, s2, JANETC_REGTEMP_1);
    int32_t label = janet_v_count(c->buffer);
    janetc_emit(c, op | (reg1 << 8) | (reg2 << 16));
    janetc_free_regnear(c, s2, reg2, JANETC_REGTEMP_1);
    if (wr)
        janetc_moveback(c, s1, reg1);
    janetc_free_regnear(c, s1, reg1, JANETC_REGTEMP_0);
    return label;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %sil, %cl
leaq 0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29ff0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29a80
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x29f27
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x4(%rax), %eax
movl %eax, -0x34(%rbp)
jmp 0x29f2e
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0x29f2e
movl -0x34(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x9(%rbp), %esi
movl -0x14(%rbp), %eax
shll $0x8, %eax
orl %eax, %esi
movl -0x18(%rbp), %eax
shll $0x10, %eax
orl %eax, %esi
callq 0x29410
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
movl $0x1, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29b80
cmpl $0x0, -0x10(%rbp)
je 0x29fae
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29860
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29b80
movl -0x1c(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/emit.c
// Function: janetc_regnear
static int32_t janetc_regnear(JanetCompiler *c, JanetSlot s, JanetcRegisterTemp tag) {
    /* check if already near register */
    if (s.envindex < 0 && s.index >= 0 && s.index <= 0xFF) {
        return s.index;
    }
    int32_t reg = janetc_regalloc_temp(&c->scope->ra, tag);
    janetc_movenear(c, reg, s);
    return reg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, 0xc(%rax)
jge 0x2a030
movq -0x20(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jl 0x2a030
movq -0x20(%rbp), %rax
cmpl $0xff, 0x8(%rax)
jg 0x2a030
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x2a077
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0x30, %rdi
movl -0x14(%rbp), %esi
callq 0x5e180
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29750
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/emit.c
// Function: emit2s
static int32_t emit2s(JanetCompiler *c, uint8_t op, JanetSlot s1, JanetSlot s2, int32_t rest, int wr) {
    int32_t reg1 = janetc_regnear(c, s1, JANETC_REGTEMP_0);
    int32_t reg2 = janetc_regnear(c, s2, JANETC_REGTEMP_1);
    int32_t label = janet_v_count(c->buffer);
    janetc_emit(c, op | (reg1 << 8) | (reg2 << 16) | ((uint32_t)rest << 24));
    janetc_free_regnear(c, s2, reg2, JANETC_REGTEMP_1);
    if (wr)
        janetc_moveback(c, s1, reg1);
    janetc_free_regnear(c, s1, reg1, JANETC_REGTEMP_0);
    return label;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
leaq 0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq %rdi, -0x8(%rbp)
movb %sil, -0x9(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29ff0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29ff0
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2a188
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x4(%rax), %eax
movl %eax, -0x34(%rbp)
jmp 0x2a18f
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0x2a18f
movl -0x34(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x9(%rbp), %esi
movl -0x18(%rbp), %eax
shll $0x8, %eax
orl %eax, %esi
movl -0x1c(%rbp), %eax
shll $0x10, %eax
orl %eax, %esi
movl -0x10(%rbp), %eax
shll $0x18, %eax
orl %eax, %esi
callq 0x29410
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl $0x1, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29b80
cmpl $0x0, -0x14(%rbp)
je 0x2a217
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29860
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29b80
movl -0x20(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/emit.c
// Function: janetc_emit_sss
int32_t janetc_emit_sss(JanetCompiler *c, uint8_t op, JanetSlot s1, JanetSlot s2, JanetSlot s3, int wr) {
    int32_t reg1 = janetc_regnear(c, s1, JANETC_REGTEMP_0);
    int32_t reg2 = janetc_regnear(c, s2, JANETC_REGTEMP_1);
    int32_t reg3 = janetc_regnear(c, s3, JANETC_REGTEMP_2);
    int32_t label = janet_v_count(c->buffer);
    janetc_emit(c, op | (reg1 << 8) | (reg2 << 16) | ((uint32_t)reg3 << 24));
    janetc_free_regnear(c, s2, reg2, JANETC_REGTEMP_1);
    janetc_free_regnear(c, s3, reg3, JANETC_REGTEMP_2);
    if (wr)
        janetc_moveback(c, s1, reg1);
    janetc_free_regnear(c, s1, reg1, JANETC_REGTEMP_0);
    return label;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %sil, %cl
leaq 0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29ff0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29ff0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2, %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29ff0
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2a38f
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x4(%rax), %eax
movl %eax, -0x3c(%rbp)
jmp 0x2a396
xorl %eax, %eax
movl %eax, -0x3c(%rbp)
jmp 0x2a396
movl -0x3c(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x9(%rbp), %esi
movl -0x14(%rbp), %eax
shll $0x8, %eax
orl %eax, %esi
movl -0x18(%rbp), %eax
shll $0x10, %eax
orl %eax, %esi
movl -0x1c(%rbp), %eax
shll $0x18, %eax
orl %eax, %esi
callq 0x29410
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
movl $0x1, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29b80
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl $0x2, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29b80
cmpl $0x0, -0x10(%rbp)
je 0x2a44c
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29860
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29b80
movl -0x20(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/emit.c
// Function: janetc_loadconst
static void janetc_loadconst(JanetCompiler *c, Janet k, int32_t reg) {
    switch (janet_type(k)) {
        case JANET_NIL:
            janetc_emit(c, (reg << 8) | JOP_LOAD_NIL);
            break;
        case JANET_BOOLEAN:
            janetc_emit(c, (reg << 8) |
                        (janet_unwrap_boolean(k) ? JOP_LOAD_TRUE : JOP_LOAD_FALSE));
            break;
        case JANET_NUMBER: {
            double dval = janet_unwrap_number(k);
            if (dval < INT16_MIN || dval > INT16_MAX)
                goto do_constant;
            int32_t i = (int32_t) dval;
            if (dval != i)
                goto do_constant;
            uint32_t iu = (uint32_t)i;
            janetc_emit(c,
                        (iu << 16) |
                        (reg << 8) |
                        JOP_LOAD_INTEGER);
            break;
        }
        default:
        do_constant: {
                int32_t cindex = janetc_const(c, k);
                janetc_emit(c,
                            (cindex << 16) |
                            (reg << 8) |
                            JOP_LOAD_CONSTANT);
                break;
            }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rsi, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movsd -0x8(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x2a4a5
jmp 0x2a4b6
movq -0x8(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
movl %eax, -0x30(%rbp)
jmp 0x2a4bd
xorl %eax, %eax
movl %eax, -0x30(%rbp)
jmp 0x2a4bd
movl -0x30(%rbp), %eax
movl %eax, -0x34(%rbp)
testl %eax, %eax
je 0x2a526
jmp 0x2a4c9
movl -0x34(%rbp), %eax
subl $0x1, %eax
je 0x2a4e0
jmp 0x2a4d3
movl -0x34(%rbp), %eax
subl $0x2, %eax
je 0x2a4f7
jmp 0x2a594
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
shll $0x8, %esi
orl $0x28, %esi
callq 0x29410
jmp 0x2a5c0
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
shll $0x8, %esi
movq -0x8(%rbp), %rdx
andq $0x1, %rdx
movl $0x2a, %eax
movl $0x29, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
orl %eax, %esi
callq 0x29410
jmp 0x2a5c0
movsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd 0x5b9d8(%rip), %xmm0    # 0x85f10
ucomisd -0x20(%rbp), %xmm0
ja 0x2a552
movsd -0x20(%rbp), %xmm0
movsd 0x5b9cc(%rip), %xmm1    # 0x85f18
ucomisd %xmm1, %xmm0
jbe 0x2a554
jmp 0x2a596
cvttsd2si -0x20(%rbp), %eax
movl %eax, -0x24(%rbp)
movsd -0x20(%rbp), %xmm0
cvtsi2sdl -0x24(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jne 0x2a570
jp 0x2a570
jmp 0x2a572
jmp 0x2a596
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x28(%rbp), %esi
shll $0x10, %esi
movl -0x14(%rbp), %eax
shll $0x8, %eax
orl %eax, %esi
orl $0x2b, %esi
callq 0x29410
jmp 0x2a5c0
jmp 0x2a596
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x2a5d0
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
shll $0x10, %esi
movl -0x14(%rbp), %eax
shll $0x8, %eax
orl %eax, %esi
orl $0x2c, %esi
callq 0x29410
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/emit.c
// Function: janetc_const
static int32_t janetc_const(JanetCompiler *c, Janet x) {
    JanetScope *scope = c->scope;
    int32_t i, len;
    /* Get the topmost function scope */
    while (scope) {
        if (scope->flags & JANET_SCOPE_FUNCTION)
            break;
        scope = scope->parent;
    }
    /* Check if already added */
    len = janet_v_count(scope->consts);
    for (i = 0; i < len; i++) {
        if (janet_equals(x, scope->consts[i]))
            return i;
    }
    /* Ensure not too many constants. */
    if (len >= 0xFFFF) {
        janetc_cerror(c, "too many constants");
        return 0;
    }
    janet_v_push(scope->consts, x);
    return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2a611
movq -0x20(%rbp), %rax
movl 0x6c(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2a603
jmp 0x2a611
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2a5eb
movq -0x20(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x2a62c
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x4(%rax), %eax
movl %eax, -0x2c(%rbp)
jmp 0x2a633
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2a633
movl -0x2c(%rbp), %eax
movl %eax, -0x28(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0x2a67e
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x24(%rbp), %rcx
movq -0x10(%rbp), %rdi
movq (%rax,%rcx,8), %rsi
callq 0x6e560
cmpl $0x0, %eax
je 0x2a671
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2a718
jmp 0x2a673
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2a640
cmpl $0xffff, -0x28(%rbp)    # imm = 0xFFFF
jl 0x2a6a0
movq -0x18(%rbp), %rdi
leaq 0x5b8ee(%rip), %rsi     # 0x85f80
callq 0x1fff0
movl $0x0, -0x4(%rbp)
jmp 0x2a718
movq -0x20(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x2a6c6
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x4(%rax), %eax
addl $0x1, %eax
movq -0x20(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpl -0x8(%rcx), %eax
jl 0x2a6ea
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x1, %esi
movl $0x8, %edx
callq 0x70760
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x2a6ec
jmp 0x2a6ec
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x18(%rcx), %rdx
movl -0x4(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x4(%rdx)
movslq %ecx, %rcx
movq -0x10(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: janet_async_end
void janet_async_end(JanetFiber *fiber) {
    if (fiber->ev_callback) {
        if (fiber->ev_stream->read_fiber == fiber) {
            fiber->ev_stream->read_fiber = NULL;
        }
        if (fiber->ev_stream->write_fiber == fiber) {
            fiber->ev_stream->write_fiber = NULL;
        }
        fiber->ev_callback(fiber, JANET_ASYNC_EVENT_DEINIT);
        janet_gcunroot(janet_wrap_abstract(fiber->ev_stream));
        fiber->ev_callback = NULL;
        if (!(fiber->flags & JANET_FIBER_EV_FLAG_IN_FLIGHT)) {
            if (fiber->ev_state) {
                janet_free(fiber->ev_state);
                fiber->ev_state = NULL;
            }
            janet_ev_dec_refcount();
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x2a80c
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x10(%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x2a76d
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x18(%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x2a78f
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq *%rax
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
movabsq $-0x1000000000000, %rsi # imm = 0xFFFF000000000000
callq 0x7b610
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3a2c0
movq -0x8(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x2a80a
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x2a805
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x120b0
movq -0x8(%rbp), %rax
movq $0x0, 0x60(%rax)
callq 0x2a820
jmp 0x2a80c
addq $0x10, %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_async_start_fiber
void janet_async_start_fiber(JanetFiber *fiber, JanetStream *stream, JanetAsyncMode mode, JanetEVCallback callback, void *state) {
    janet_assert(!fiber->ev_callback, "double async on fiber");
    if (mode & JANET_ASYNC_LISTEN_READ) {
        stream->read_fiber = fiber;
    }
    if (mode & JANET_ASYNC_LISTEN_WRITE) {
        stream->write_fiber = fiber;
    }
    fiber->ev_callback = callback;
    fiber->ev_stream = stream;
    janet_ev_inc_refcount();
    janet_gcroot(janet_wrap_abstract(stream));
    fiber->ev_state = state;
    callback(fiber, JANET_ASYNC_EVENT_INIT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x2a8b8
jmp 0x2a888
movq 0x85761(%rip), %rax     # 0xafff0
movq (%rax), %rdi
leaq 0x5677b(%rip), %rsi     # 0x81014
movl $0x126, %edx            # imm = 0x126
leaq 0x5cfd3(%rip), %rcx     # 0x87878
leaq 0x5cfda(%rip), %r8      # 0x87886
movb $0x0, %al
callq 0x125f0
callq 0x12100
jmp 0x2a8ba
movl -0x14(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2a8d1
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x14(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x2a8e8
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x58(%rax)
callq 0x2a950
movq -0x10(%rbp), %rdi
movabsq $-0x1000000000000, %rsi # imm = 0xFFFF000000000000
callq 0x7b610
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x39200
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq *%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_stream_ext
JanetStream *janet_stream_ext(JanetHandle handle, uint32_t flags, const JanetMethod *methods, size_t size) {
    janet_assert(size >= sizeof(JanetStream), "bad size");
    JanetStream *stream = janet_abstract(&janet_stream_type, size);
    stream->handle = handle;
    stream->flags = flags;
    stream->read_fiber = NULL;
    stream->write_fiber = NULL;
    if (methods == NULL) methods = ev_default_stream_methods;
    stream->methods = methods;
    stream->index = 0;
    janet_register_stream(stream);
    return stream;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
cmpq $0x28, -0x18(%rbp)
jae 0x2aa6f
jmp 0x2aa3f
movq 0x855aa(%rip), %rax     # 0xafff0
movq (%rax), %rdi
leaq 0x565c4(%rip), %rsi     # 0x81014
movl $0x151, %edx            # imm = 0x151
leaq 0x5ce1c(%rip), %rcx     # 0x87878
leaq 0x5ce39(%rip), %r8      # 0x8789c
movb $0x0, %al
callq 0x125f0
callq 0x12100
jmp 0x2aa71
movq -0x18(%rbp), %rsi
leaq 0x811b4(%rip), %rdi     # 0xabc30
callq 0x12de0
movq %rax, -0x20(%rbp)
movl -0x4(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl -0x8(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x18(%rax)
cmpq $0x0, -0x10(%rbp)
jne 0x2aac2
leaq 0x811e2(%rip), %rax     # 0xabca0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x20(%rbp), %rdi
callq 0x2aaf0
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: janet_stream_close
void janet_stream_close(JanetStream *stream) {
    JanetFiber *rf = stream->read_fiber;
    JanetFiber *wf = stream->write_fiber;
    if (rf && rf->ev_callback) {
        rf->ev_callback(rf, JANET_ASYNC_EVENT_CLOSE);
        stream->read_fiber = NULL;
    }
    if (wf && wf->ev_callback) {
        wf->ev_callback(wf, JANET_ASYNC_EVENT_CLOSE);
        stream->write_fiber = NULL;
    }
    janet_stream_close_impl(stream);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2aba5
movq -0x10(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x2aba5
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x10(%rbp), %rdi
movl $0x3, %esi
callq *%rax
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x2abd6
movq -0x18(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x2abd6
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x18(%rbp), %rdi
movl $0x3, %esi
callq *%rax
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rdi
callq 0x2abf0
addq $0x20, %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_stream_close_impl
static void janet_stream_close_impl(JanetStream *stream) {
    stream->flags |= JANET_STREAM_CLOSED;
    int canclose = !(stream->flags & JANET_STREAM_NOT_CLOSEABLE);
#ifdef JANET_WINDOWS
    if (stream->handle != INVALID_HANDLE_VALUE) {
#ifdef JANET_NET
        if (stream->flags & JANET_STREAM_SOCKET) {
            if (canclose) closesocket((SOCKET) stream->handle);
        } else
#endif
        {
            if (canclose) CloseHandle(stream->handle);
        }
        stream->handle = INVALID_HANDLE_VALUE;
    }
#else
    if (stream->handle != -1) {
        if (canclose) close(stream->handle);
        stream->handle = -1;
#ifdef JANET_EV_POLL
        uint32_t i = stream->index;
        size_t j = janet_vm.stream_count - 1;
        JanetStream *last = janet_vm.streams[j];
        struct pollfd lastfd = janet_vm.fds[j + 1];
        janet_vm.fds[i + 1] = lastfd;
        janet_vm.streams[i] = last;
        last->index = stream->index;
        janet_vm.stream_count--;
#endif
    }
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $-0x1, (%rax)
je 0x2ac49
cmpl $0x0, -0xc(%rbp)
je 0x2ac3f
movq -0x8(%rbp), %rax
movl (%rax), %edi
callq 0x12470
movq -0x8(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: janet_stream_gc
static int janet_stream_gc(void *p, size_t s) {
    (void) s;
    JanetStream *stream = (JanetStream *)p;
    janet_stream_close_impl(stream);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2abf0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: janet_stream_mark
static int janet_stream_mark(void *p, size_t s) {
    (void) s;
    JanetStream *stream = (JanetStream *) p;
    JanetFiber *rf = stream->read_fiber;
    JanetFiber *wf = stream->write_fiber;
    if (rf) {
        janet_mark(janet_wrap_fiber(rf));
    }
    if (wf) {
        janet_mark(janet_wrap_fiber(wf));
    }
    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)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2acd7
movq -0x20(%rbp), %rdi
movabsq $-0x6800000000000, %rsi # imm = 0xFFF9800000000000
callq 0x7b610
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x38b90
cmpq $0x0, -0x28(%rbp)
je 0x2acfe
movq -0x28(%rbp), %rdi
movabsq $-0x6800000000000, %rsi # imm = 0xFFF9800000000000
callq 0x7b610
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x38b90
xorl %eax, %eax
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_stream_getter
static int janet_stream_getter(void *p, Janet key, Janet *out) {
    JanetStream *stream = (JanetStream *)p;
    if (!janet_checktype(key, JANET_KEYWORD)) return 0;
    const JanetMethod *stream_methods = stream->methods;
    return janet_getmethod(janet_unwrap_keyword(key), stream_methods, out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x2ad34
jmp 0x2ad5a
movsd -0x10(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x2ad46
jmp 0x2ad80
movq -0x10(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x2ad80
jmp 0x2ad77
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x10(%rbp), %rax
movabsq $-0x5000000000000, %rcx # imm = 0xFFFB000000000000
cmpq %rcx, %rax
je 0x2ad80
movl $0x0, -0x4(%rbp)
jmp 0x2ada8
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7b260
movq %rax, %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x1ae90
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
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_stream_marshal
static void janet_stream_marshal(void *p, JanetMarshalContext *ctx) {
    JanetStream *s = p;
    if (!(ctx->flags & JANET_MARSHAL_UNSAFE)) {
        janet_panic("can only marshal stream with unsafe flag");
    }
    janet_marshal_abstract(ctx, p);
    janet_marshal_int(ctx, (int32_t) s->flags);
    janet_marshal_ptr(ctx, s->methods);
#ifdef JANET_WINDOWS
    /* TODO - ref counting to avoid situation where a handle is closed or GCed
     * while in transit, and it's value gets reused. DuplicateHandle does not work
     * for network sockets, and in general for winsock it is better to not duplicate
     * unless there is a need to. */
    HANDLE duph = INVALID_HANDLE_VALUE;
    if (s->flags & JANET_STREAM_SOCKET) {
        duph = s->handle;
    } else {
        DuplicateHandle(
            GetCurrentProcess(),
            s->handle,
            GetCurrentProcess(),
            &duph,
            0,
            FALSE,
            DUPLICATE_SAME_ACCESS);
    }
    janet_marshal_int64(ctx, (int64_t)(duph));
#else
    /* Marshal after dup because it is easier than maintaining our own ref counting. */
    int duph = dup(s->handle);
    if (duph < 0) janet_panicf("failed to duplicate stream handle: %V", janet_ev_lasterr());
    janet_marshal_int(ctx, (int32_t)(duph));
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x20000, %eax          # imm = 0x20000
cmpl $0x0, %eax
jne 0x2adf5
leaq 0x5ce1e(%rip), %rdi     # 0x87c0e
callq 0x1ad60
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x41700
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x405a0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x406a0
movq -0x18(%rbp), %rax
movl (%rax), %edi
callq 0x123e0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x2ae52
callq 0x2f7c0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rsi
leaq 0x5cdec(%rip), %rdi     # 0x87c37
movb $0x0, %al
callq 0x1ac40
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x405a0
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_stream_unmarshal
static void *janet_stream_unmarshal(JanetMarshalContext *ctx) {
    if (!(ctx->flags & JANET_MARSHAL_UNSAFE)) {
        janet_panic("can only unmarshal stream with unsafe flag");
    }
    JanetStream *p = janet_unmarshal_abstract(ctx, sizeof(JanetStream));
    /* Can't share listening state and such across threads */
    p->read_fiber = NULL;
    p->write_fiber = NULL;
    p->flags = (uint32_t) janet_unmarshal_int(ctx);
    p->methods =  janet_unmarshal_ptr(ctx);
#ifdef JANET_WINDOWS
    p->handle = (JanetHandle) janet_unmarshal_int64(ctx);
#else
    p->handle = (JanetHandle) janet_unmarshal_int(ctx);
#endif
#ifdef JANET_EV_POLL
    janet_register_stream(p);
#endif
    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x20000, %eax          # imm = 0x20000
cmpl $0x0, %eax
jne 0x2ae99
leaq 0x5cdc9(%rip), %rdi     # 0x87c5d
callq 0x1ad60
movq -0x8(%rbp), %rdi
movl $0x28, %esi
callq 0x43690
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rdi
callq 0x41890
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rdi
callq 0x41bc0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rdi
callq 0x41890
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)