LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/util.c
// Function: janet_cfuns_prefix
void janet_cfuns_prefix(JanetTable *env, const char *regprefix, const JanetReg *cfuns) {
    NameBuf nb;
    if (env) namebuf_init(&nb, regprefix);
    while (cfuns->name) {
        Janet fun = janet_wrap_cfunction(cfuns->cfun);
        if (env) janet_def(env, namebuf_name(&nb, cfuns->name), fun, cfuns->documentation);
        janet_registry_put(cfuns->cfun, cfuns->name, regprefix, NULL, 0);
        cfuns++;
    }
    if (env) namebuf_deinit(&nb);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
testq %rdi, %rdi
je 0x4537b
leaq -0x38(%rbp), %rdi
movq %r15, %rsi
callq 0x45402
movabsq $-0x1800000000000, %r12 # imm = 0xFFFE800000000000
cmpq $0x0, (%rbx)
je 0x453d7
movq 0x8(%rbx), %rdi
movq %r12, %rsi
callq 0x4b3ab
testq %r14, %r14
je 0x453bd
movq %rax, %r13
movq (%rbx), %rsi
leaq -0x38(%rbp), %rdi
callq 0x45482
movq 0x10(%rbx), %rcx
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x44f49
movq (%rbx), %rsi
movq 0x8(%rbx), %rdi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x4504f
addq $0x18, %rbx
jmp 0x45385
testq %r14, %r14
je 0x453f3
movq -0x38(%rbp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x298c1
addq $0x18, %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/util.c
// Function: namebuf_init
static void namebuf_init(NameBuf *namebuf, const char *prefix) {
    size_t plen = strlen(prefix);
    namebuf->plen = plen;
    namebuf->buf = janet_smalloc(namebuf->plen + 256);
    if (NULL == namebuf->buf) {
        JANET_OUT_OF_MEMORY;
    }
    memcpy(namebuf->buf, prefix, plen);
    namebuf->buf[plen] = '/';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x12310
movq %rax, %r15
movq %rax, 0x8(%rbx)
leaq 0x100(%rax), %rdi
callq 0x29673
movq %rax, (%rbx)
testq %rax, %rax
je 0x45456
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x12670
movq (%rbx), %rax
movb $0x2f, (%rax,%r15)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x3ab93(%rip), %rax     # 0x7fff0
movq (%rax), %rdi
leaq 0x7b9d(%rip), %rsi      # 0x4d004
leaq 0x221e9(%rip), %rdx     # 0x67657
movl $0x1fb, %ecx            # imm = 0x1FB
xorl %eax, %eax
callq 0x125e0
pushq $0x1
popq %rdi
callq 0x12a60
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/util.c
// Function: namebuf_name
static char *namebuf_name(NameBuf *namebuf, const char *suffix) {
    size_t slen = strlen(suffix);
    namebuf->buf = janet_srealloc(namebuf->buf, namebuf->plen + 2 + slen);
    if (NULL == namebuf->buf) {
        JANET_OUT_OF_MEMORY;
    }
    memcpy(namebuf->buf + namebuf->plen + 1, suffix, slen);
    namebuf->buf[namebuf->plen + 1 + slen] = '\0';
    return (char *)(namebuf->buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x12310
movq %rax, %r14
movq (%rbx), %rdi
movq 0x8(%rbx), %rax
leaq (%r14,%rax), %rsi
addq $0x2, %rsi
callq 0x297c9
movq %rax, (%rbx)
testq %rax, %rax
je 0x454ea
movq 0x8(%rbx), %rcx
leaq (%rax,%rcx), %rdi
incq %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x12670
movq (%rbx), %rax
addq 0x8(%rbx), %rax
movb $0x0, 0x1(%r14,%rax)
movq (%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x3aaff(%rip), %rax     # 0x7fff0
movq (%rax), %rdi
leaq 0x7b09(%rip), %rsi      # 0x4d004
leaq 0x22155(%rip), %rdx     # 0x67657
movl $0x209, %ecx            # imm = 0x209
xorl %eax, %eax
callq 0x125e0
pushq $0x1
popq %rdi
callq 0x12a60
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/util.c
// Function: janet_cfuns_ext_prefix
void janet_cfuns_ext_prefix(JanetTable *env, const char *regprefix, const JanetRegExt *cfuns) {
    NameBuf nb;
    if (env) namebuf_init(&nb, regprefix);
    while (cfuns->name) {
        Janet fun = janet_wrap_cfunction(cfuns->cfun);
        if (env) janet_def_sm(env, namebuf_name(&nb, cfuns->name), fun, cfuns->documentation, cfuns->source_file, cfuns->source_line);
        janet_registry_put(cfuns->cfun, cfuns->name, regprefix, cfuns->source_file, cfuns->source_line);
        cfuns++;
    }
    if (env) namebuf_deinit(&nb);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
testq %rdi, %rdi
je 0x45541
leaq -0x38(%rbp), %rdi
movq %r15, %rsi
callq 0x45402
movabsq $-0x1800000000000, %r12 # imm = 0xFFFE800000000000
cmpq $0x0, (%rbx)
je 0x455a8
movq 0x8(%rbx), %rdi
movq %r12, %rsi
callq 0x4b3ab
testq %r14, %r14
je 0x4558b
movq %rax, %r13
movq (%rbx), %rsi
leaq -0x38(%rbp), %rdi
callq 0x45482
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %r8
movl 0x20(%rbx), %r9d
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x44d5e
movq (%rbx), %rsi
movq 0x8(%rbx), %rdi
movq 0x18(%rbx), %rcx
movl 0x20(%rbx), %r8d
movq %r15, %rdx
callq 0x4504f
addq $0x28, %rbx
jmp 0x4554b
testq %r14, %r14
je 0x455c4
movq -0x38(%rbp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x298c1
addq $0x18, %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/util.c
// Function: janet_register_abstract_type
void janet_register_abstract_type(const JanetAbstractType *at) {
    Janet sym = janet_csymbolv(at->name);
    Janet check = janet_table_get(janet_vm.abstract_registry, sym);
    if (!janet_checktype(check, JANET_NIL) && at != janet_unwrap_pointer(check)) {
        janet_panicf("cannot register abstract type %s, "
                     "a type with the same name exists", at->name);
    }
    janet_table_put(janet_vm.abstract_registry, sym, janet_wrap_pointer((void *) at));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x439c6
movabsq $-0x5800000000000, %rsi # imm = 0xFFFA800000000000
movq %rax, %rdi
callq 0x4b366
movq %rax, %r14
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq %rax, %r15
movq 0x68(%rax), %rdi
movq %r14, %rsi
callq 0x43c35
movq %rax, %rcx
shrq $0x2f, %rcx
cmpl $0x1fff1, %ecx          # imm = 0x1FFF1
je 0x45652
movq %rax, %rdi
callq 0x4b1f1
cmpq %rbx, %rax
jne 0x45680
movabsq $-0x800000000000, %rsi  # imm = 0xFFFF800000000000
movq 0x68(%r15), %r15
movq %rbx, %rdi
callq 0x4b3ab
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x43e19
movq (%rbx), %rsi
leaq 0x21fdd(%rip), %rdi     # 0x67667
xorl %eax, %eax
callq 0x176c9
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/util.c
// Function: janet_get_abstract_type
const JanetAbstractType *janet_get_abstract_type(Janet key) {
    Janet wrapped = janet_table_get(janet_vm.abstract_registry, key);
    if (janet_checktype(wrapped, JANET_NIL)) {
        return NULL;
    }
    return (JanetAbstractType *)(janet_unwrap_pointer(wrapped));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq 0x68(%rax), %rdi
movq %rbx, %rsi
callq 0x43c35
movq %rax, %rcx
shrq $0x2f, %rcx
cmpl $0x1fff1, %ecx          # imm = 0x1FFF1
jne 0x456ce
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4b1f1
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/util.c
// Function: janet_text_substitution
JanetByteView janet_text_substitution(
    Janet *subst,
    const uint8_t *bytes,
    uint32_t len,
    JanetArray *extra_argv) {
    int32_t extra_argc = extra_argv == NULL ? 0 : extra_argv->count;
    JanetType type = janet_type(*subst);
    switch (type) {
        case JANET_FUNCTION:
        case JANET_CFUNCTION: {
            int32_t argc = 1 + extra_argc;
            Janet *argv = janet_tuple_begin(argc);
            argv[0] = janet_stringv(bytes, len);
            for (int32_t i = 0; i < extra_argc; i++) {
                argv[i + 1] = extra_argv->data[i];
            }
            janet_tuple_end(argv);
            if (type == JANET_FUNCTION) {
                return to_byte_view(janet_call(janet_unwrap_function(*subst), argc, argv));
            } else {
                return to_byte_view(janet_unwrap_cfunction(*subst)(argc, argv));
            }
        }
        default:
            return memoize_byte_view(subst);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movl %edx, %r13d
movq %rsi, %r15
movq %rdi, %rbx
testq %rcx, %rcx
je 0x45a14
movl 0x10(%r14), %r12d
jmp 0x45a17
xorl %r12d, %r12d
movsd (%rbx), %xmm0
ucomisd %xmm0, %xmm0
movq %xmm0, %rdi
jp 0x45a7c
leaq -0x48(%rbp), %r14
leaq -0x50(%rbp), %rsi
movq %r14, %rdx
callq 0x45cd2
testl %eax, %eax
je 0x45a40
movq -0x50(%rbp), %r15
jmp 0x45a67
movq (%rbx), %rdi
callq 0x3b7f1
movq %rax, %r15
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
movq %rax, %rdi
callq 0x4b366
movq %rax, (%rbx)
movq %r15, %r14
addq $-0x8, %r14
movl (%r14), %edx
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, %rax
shrq $0x2f, %rax
movq %rax, -0x38(%rbp)
andl $0xe, %eax
cmpl $0xc, %eax
jne 0x45a26
movq -0x38(%rbp), %rax
andl $0xf, %eax
movq %rax, -0x38(%rbp)
leal 0x1(%r12), %edi
movl %edi, -0x2c(%rbp)
callq 0x44648
movq %rax, -0x40(%rbp)
movq %r15, %rdi
movl %r13d, %esi
callq 0x41116
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
movq %rax, %rdi
callq 0x4b366
movq -0x40(%rbp), %rcx
movq %rcx, %r15
movq %rax, (%rcx)
xorl %eax, %eax
testl %r12d, %r12d
cmovlel %eax, %r12d
cmpq %rax, %r12
je 0x45af2
movq 0x18(%r14), %rcx
movq (%rcx,%rax,8), %rcx
movq %rcx, 0x8(%r15,%rax,8)
incq %rax
jmp 0x45adb
movq %r15, %rdi
callq 0x44674
movq (%rbx), %rdi
callq 0x4b1f1
cmpl $0xc, -0x38(%rbp)
jne 0x45b18
movq %rax, %rdi
movl -0x2c(%rbp), %esi
movq %r15, %rdx
callq 0x47bff
jmp 0x45b20
movl -0x2c(%rbp), %edi
movq %r15, %rsi
callq *%rax
movq %rax, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x45b33
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/util.c
// Function: to_byte_view
static JanetByteView to_byte_view(Janet value) {
    JanetByteView result;
    if (!janet_bytes_view(value, &result.bytes, &result.len)) {
        JanetString str = janet_to_string(value);
        result.bytes = str;
        result.len = janet_string_length(str);
    }
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq -0x18(%rbp), %rbx
leaq -0x20(%rbp), %rsi
movq %rbx, %rdx
callq 0x45cd2
testl %eax, %eax
je 0x45b5b
movq -0x20(%rbp), %rax
jmp 0x45b6a
movq %r14, %rdi
callq 0x3b7f1
movq %rax, %rbx
addq $-0x8, %rbx
movl (%rbx), %edx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/util.c
// Function: janet_resolve
JanetBindingType janet_resolve(JanetTable *env, const uint8_t *sym, Janet *out) {
    JanetBinding binding = janet_resolve_ext(env, sym);
    if (binding.type == JANET_BINDING_DYNAMIC_DEF || binding.type == JANET_BINDING_DYNAMIC_MACRO) {
        *out = janet_array_peek(janet_unwrap_array(binding.value));
    } else {
        *out = binding.value;
    }
    return binding.type;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %rdx
movq %rdi, %rsi
leaq -0x30(%rbp), %r15
movq %r15, %rdi
callq 0x45b75
movl (%r15), %r14d
movl %r14d, %ecx
andl $-0x2, %ecx
movq 0x8(%r15), %rax
cmpl $0x4, %ecx
jne 0x45bf6
movq %rax, %rdi
callq 0x4b1f1
movq %rax, %rdi
callq 0x13253
movq %rax, (%rbx)
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/util.c
// Function: janet_resolve_core
Janet janet_resolve_core(const char *name) {
    JanetTable *env = janet_core_env(NULL);
    Janet out = janet_wrap_nil();
    janet_resolve(env, janet_csymbol(name), &out);
    return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %edi, %edi
callq 0x1dd58
movq %rax, %r14
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x4b313
leaq -0x20(%rbp), %r15
movq %rax, (%r15)
movq %rbx, %rdi
callq 0x439c6
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x45bb2
movq (%r15), %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/util.c
// Function: janet_indexed_view
int janet_indexed_view(Janet seq, const Janet **data, int32_t *len) {
    if (janet_checktype(seq, JANET_ARRAY)) {
        *data = janet_unwrap_array(seq)->data;
        *len = janet_unwrap_array(seq)->count;
        return 1;
    } else if (janet_checktype(seq, JANET_TUPLE)) {
        *data = janet_unwrap_tuple(seq);
        *len = janet_tuple_length(janet_unwrap_tuple(seq));
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movabsq $-0x800000000000, %rcx  # imm = 0xFFFF800000000000
andq %rdi, %rcx
movabsq $-0x4000000000000, %rax # imm = 0xFFFC000000000000
cmpq %rax, %rcx
je 0x45ca9
xorl %eax, %eax
movabsq $-0x4800000000000, %rdx # imm = 0xFFFB800000000000
cmpq %rdx, %rcx
jne 0x45cc9
movq %r14, %rdi
callq 0x4b1f1
movq 0x18(%rax), %rax
pushq $0x10
jmp 0x45cb3
movq %r14, %rdi
callq 0x4b1f1
pushq $-0x10
popq %r12
movq %rax, (%r15)
movq %r14, %rdi
callq 0x4b1f1
movl (%rax,%r12), %eax
movl %eax, (%rbx)
pushq $0x1
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/util.c
// Function: janet_bytes_view
int janet_bytes_view(Janet str, const uint8_t **data, int32_t *len) {
    JanetType t = janet_type(str);
    if (t == JANET_STRING || t == JANET_SYMBOL || t == JANET_KEYWORD) {
        *data = janet_unwrap_string(str);
        *len = janet_string_length(janet_unwrap_string(str));
        return 1;
    } else if (t == JANET_BUFFER) {
        *data = janet_unwrap_buffer(str)->data;
        *len = janet_unwrap_buffer(str)->count;
        return 1;
    } else if (t == JANET_ABSTRACT) {
        void *abst = janet_unwrap_abstract(str);
        const JanetAbstractType *atype = janet_abstract_type(abst);
        if (NULL == atype->bytes) {
            return 0;
        }
        JanetByteView view = atype->bytes(abst, janet_abstract_size(abst));
        *data = view.bytes;
        *len = view.len;
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r15
movq %rdi, %xmm0
movq %rdi, %rax
shrq $0x2f, %rax
andl $0xf, %eax
xorl %r12d, %r12d
ucomisd %xmm0, %xmm0
cmovnpl %r12d, %eax
movq %rsi, %r14
movl %eax, %ecx
andl $-0x2, %ecx
cmpl $0x4, %ecx
setne %cl
cmpl $0x6, %eax
setne %dl
testb %cl, %dl
jne 0x45d2d
movq %r15, %rdi
callq 0x4b1f1
movq %rax, (%r14)
movq %r15, %rdi
callq 0x4b1f1
movl -0x8(%rax), %edx
jmp 0x45d74
cmpl $0xe, %eax
je 0x45d53
cmpl $0xb, %eax
jne 0x45d7a
movq %r15, %rdi
callq 0x4b1f1
movq 0x18(%rax), %rax
movq %rax, (%r14)
movq %r15, %rdi
callq 0x4b1f1
movl 0x10(%rax), %edx
jmp 0x45d74
movq %r15, %rdi
callq 0x4b1f1
movq -0x10(%rax), %rcx
movq 0x68(%rcx), %rcx
testq %rcx, %rcx
je 0x45d7a
movq -0x8(%rax), %rsi
movq %rax, %rdi
callq *%rcx
movq %rax, (%r14)
movl %edx, (%rbx)
pushq $0x1
popq %r12
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/util.c
// Function: janet_dictionary_view
int janet_dictionary_view(Janet tab, const JanetKV **data, int32_t *len, int32_t *cap) {
    if (janet_checktype(tab, JANET_TABLE)) {
        *data = janet_unwrap_table(tab)->data;
        *cap = janet_unwrap_table(tab)->capacity;
        *len = janet_unwrap_table(tab)->count;
        return 1;
    } else if (janet_checktype(tab, JANET_STRUCT)) {
        *data = janet_unwrap_struct(tab);
        *cap = janet_struct_capacity(janet_unwrap_struct(tab));
        *len = janet_struct_length(janet_unwrap_struct(tab));
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rsi, %r12
movq %rdi, %r15
movabsq $-0x800000000000, %rcx  # imm = 0xFFFF800000000000
andq %rdi, %rcx
movabsq $-0x3000000000000, %rax # imm = 0xFFFD000000000000
cmpq %rax, %rcx
je 0x45de2
xorl %eax, %eax
movabsq $-0x3800000000000, %rsi # imm = 0xFFFC800000000000
cmpq %rsi, %rcx
jne 0x45e1c
movq %rdx, -0x30(%rbp)
movq %r15, %rdi
callq 0x4b1f1
movq 0x20(%rax), %rax
pushq $0x10
popq %r13
pushq $0x14
jmp 0x45df4
movq %rdx, -0x30(%rbp)
movq %r15, %rdi
callq 0x4b1f1
pushq $-0x18
popq %r13
pushq $-0x10
popq %rbx
movq %rax, (%r12)
movq %r15, %rdi
callq 0x4b1f1
movl (%rax,%rbx), %eax
movl %eax, (%r14)
movq %r15, %rdi
callq 0x4b1f1
movl (%rax,%r13), %eax
movq -0x30(%rbp), %rcx
movl %eax, (%rcx)
pushq $0x1
popq %rax
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/util.c
// Function: janet_get_core_table
JanetTable *janet_get_core_table(const char *name) {
    JanetTable *env = janet_core_env(NULL);
    Janet out = janet_wrap_nil();
    JanetBindingType bt = janet_resolve(env, janet_csymbol(name), &out);
    if (bt == JANET_BINDING_NONE) return NULL;
    if (!janet_checktype(out, JANET_TABLE)) return NULL;
    return janet_unwrap_table(out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %edi, %edi
callq 0x1dd58
movq %rax, %r14
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x4b313
leaq -0x20(%rbp), %r15
movq %rax, (%r15)
movq %rbx, %rdi
callq 0x439c6
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x45bb2
testl %eax, %eax
je 0x46192
movq -0x20(%rbp), %rdi
movq %rdi, %rax
shrq $0x2f, %rax
cmpl $0x1fff9, %eax          # imm = 0x1FFF9
jne 0x46192
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4b1f1
xorl %eax, %eax
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/util.c
// Function: janet_sorted_keys
int32_t janet_sorted_keys(const JanetKV *dict, int32_t cap, int32_t *index_buffer) {

    /* First, put populated indices into index_buffer */
    int32_t next_index = 0;
    for (int32_t i = 0; i < cap; i++) {
        if (!janet_checktype(dict[i].key, JANET_NIL)) {
            index_buffer[next_index++] = i;
        }
    }

    /* Next, sort those (simple insertion sort here for now) */
    for (int32_t i = 1; i < next_index; i++) {
        int32_t index_to_insert = index_buffer[i];
        Janet lhs = dict[index_to_insert].key;
        for (int32_t j = i - 1; j >= 0; j--) {
            index_buffer[j + 1] = index_buffer[j];
            Janet rhs = dict[index_buffer[j]].key;
            if (janet_compare(lhs, rhs) >= 0) {
                index_buffer[j + 1] = index_to_insert;
                break;
            } else if (j == 0) {
                index_buffer[0] = index_to_insert;
            }
        }
    }

    /* Return number of indices found */
    return next_index;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, %r14
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
movq %rdi, %rcx
movl $0x0, -0x2c(%rbp)
movslq -0x2c(%rbp), %rdi
cmpq %rax, %rsi
je 0x461f1
movq (%rcx), %rdx
shrq $0x2f, %rdx
cmpl $0x1fff1, %edx          # imm = 0x1FFF1
je 0x461e8
leal 0x1(%rdi), %edx
movl %edx, -0x2c(%rbp)
movl %eax, (%rbx,%rdi,4)
incq %rax
addq $0x10, %rcx
jmp 0x461c7
pushq $0x1
popq %r15
movq %rdi, -0x38(%rbp)
cmpq %rdi, %r15
jge 0x46252
movslq (%rbx,%r15,4), %r13
movq %r13, %rax
shlq $0x4, %rax
movq (%r14,%rax), %r12
movq %r15, -0x40(%rbp)
testq %r15, %r15
jle 0x46245
movslq -0x4(%rbx,%r15,4), %rax
movl %eax, (%rbx,%r15,4)
shlq $0x4, %rax
movq (%r14,%rax), %rsi
movq %r12, %rdi
callq 0x46cba
testl %eax, %eax
jns 0x46241
cmpq $0x1, %r15
jne 0x4623c
movl %r13d, (%rbx)
decq %r15
jmp 0x46211
movl %r13d, (%rbx,%r15,4)
movq -0x40(%rbp), %r15
incq %r15
movq -0x38(%rbp), %rdi
jmp 0x461f9
movl -0x2c(%rbp), %eax
addq $0x18, %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/util.c
// Function: janet_cryptorand
int janet_cryptorand(uint8_t *out, size_t n) {
#ifndef JANET_NO_CRYPTORAND
#ifdef JANET_WINDOWS
    for (size_t i = 0; i < n; i += sizeof(unsigned int)) {
        unsigned int v;
        if (rand_s(&v))
            return -1;
        for (int32_t j = 0; (j < (int32_t) sizeof(unsigned int)) && (i + j < n); j++) {
            out[i + j] = v & 0xff;
            v = v >> 8;
        }
    }
    return 0;
#elif defined(JANET_BSD) || defined(MAC_OS_X_VERSION_10_7)
    arc4random_buf(out, n);
    return 0;
#else
    /* We should be able to call getrandom on linux, but it doesn't seem
       to be uniformly supported on linux distros.
       On Mac, arc4random_buf wasn't available on until 10.7.
       In these cases, use this fallback path for now... */
    int rc;
    int randfd;
    RETRY_EINTR(randfd, open("/dev/urandom", O_RDONLY | O_CLOEXEC));
    if (randfd < 0)
        return -1;
    while (n > 0) {
        ssize_t nread;
        RETRY_EINTR(nread, read(randfd, out, n));
        if (nread <= 0) {
            RETRY_EINTR(rc, close(randfd));
            return -1;
        }
        out += nread;
        n -= nread;
    }
    RETRY_EINTR(rc, close(randfd));
    return 0;
#endif
#else
    (void) out;
    (void) n;
    return -1;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r12
leaq 0x213e1(%rip), %r13     # 0x676b0
pushq $-0x1
popq %rbx
movq %r13, %rdi
movl $0x80000, %esi          # imm = 0x80000
xorl %eax, %eax
callq 0x128f0
testl %eax, %eax
jns 0x462f1
callq 0x12120
cmpl $0x4, (%rax)
je 0x462d2
jmp 0x46338
movl %eax, %r14d
testq %r15, %r15
je 0x46349
movl %r14d, %edi
movq %r12, %rsi
movq %r15, %rdx
callq 0x12520
testq %rax, %rax
jns 0x46318
callq 0x12120
cmpl $0x4, (%rax)
je 0x462f9
jmp 0x4632c
je 0x4632c
addq %rax, %r12
subq %rax, %r15
jmp 0x462f4
callq 0x12120
cmpl $0x4, (%rax)
jne 0x46338
movl %r14d, %edi
callq 0x12460
testl %eax, %eax
js 0x46322
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
movl %r14d, %edi
callq 0x12460
testl %eax, %eax
jns 0x46338
callq 0x12120
cmpl $0x4, (%rax)
je 0x4634b
jmp 0x46338
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/util.c
// Function: get_processed_name
char *get_processed_name(const char *name) {
    if (name[0] == '.') return (char *) name;
    const char *c;
    for (c = name; *c; c++) {
        if (*c == '/') return (char *) name;
    }
    size_t l = (size_t)(c - name);
    char *ret = janet_malloc(l + 3);
    if (NULL == ret) {
        JANET_OUT_OF_MEMORY;
    }
    ret[0] = '.';
    ret[1] = '/';
    memcpy(ret + 2, name, l + 1);
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb (%rdi), %al
cmpb $0x2e, %al
je 0x463ba
pushq $0x1
popq %r14
testb %al, %al
je 0x4638f
movzbl %al, %eax
cmpl $0x2f, %eax
je 0x463ba
movb (%rbx,%r14), %al
incq %r14
jmp 0x4637a
leaq 0x2(%r14), %rdi
callq 0x12760
testq %rax, %rax
je 0x463c8
movq %rax, %r15
movw $0x2f2e, (%rax)         # imm = 0x2F2E
movq %rax, %rdi
addq $0x2, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x12670
movq %r15, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x39c21(%rip), %rax     # 0x7fff0
movq (%rax), %rdi
leaq 0x6c2b(%rip), %rsi      # 0x4d004
leaq 0x21277(%rip), %rdx     # 0x67657
movl $0x41a, %ecx            # imm = 0x41A
xorl %eax, %eax
callq 0x125e0
pushq $0x1
popq %rdi
callq 0x12a60
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/value.c
// Function: janet_compare_abstract
static int janet_compare_abstract(JanetAbstract xx, JanetAbstract yy) {
    if (xx == yy) return 0;
    const JanetAbstractType *xt = janet_abstract_type(xx);
    const JanetAbstractType *yt = janet_abstract_type(yy);
    if (xt != yt) {
        return xt > yt ? 1 : -1;
    }
    if (xt->compare == NULL) {
        return xx > yy ? 1 : -1;
    }
    return xt->compare(xx, yy);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpq %rsi, %rdi
je 0x468d9
movq -0x10(%rdi), %rcx
movq -0x10(%rsi), %rdx
cmpq %rdx, %rcx
je 0x468dd
xorl %eax, %eax
cmpq %rcx, %rdx
adcl $-0x1, %eax
orl $0x1, %eax
jmp 0x468db
xorl %eax, %eax
popq %rbp
retq
movq 0x40(%rcx), %rax
testq %rax, %rax
je 0x468e9
popq %rbp
jmpq *%rax
xorl %eax, %eax
cmpq %rdi, %rsi
jmp 0x468d1
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/value.c
// Function: push_traversal_node
static void push_traversal_node(void *lhs, void *rhs, int32_t index2) {
    JanetTraversalNode node;
    node.self = (JanetGCObject *) lhs;
    node.other = (JanetGCObject *) rhs;
    node.index = 0;
    node.index2 = index2;
    int is_new = janet_vm.traversal_base == NULL;
    if (is_new || (janet_vm.traversal + 1 >= janet_vm.traversal_top)) {
        size_t oldsize = is_new ? 0 : (janet_vm.traversal - janet_vm.traversal_base);
        size_t newsize = 2 * oldsize + 1;
        if (newsize < 128) {
            newsize = 128;
        }
        JanetTraversalNode *tn = janet_realloc(janet_vm.traversal_base, newsize * sizeof(JanetTraversalNode));
        if (tn == NULL) {
            JANET_OUT_OF_MEMORY;
        }
        janet_vm.traversal_base = tn;
        janet_vm.traversal_top = janet_vm.traversal_base + newsize;
        janet_vm.traversal = janet_vm.traversal_base + oldsize;
    }
    *(++janet_vm.traversal) = node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq %rax, %r12
movq 0x118(%rax), %rdi
testq %rdi, %rdi
je 0x4694e
movq 0x108(%r12), %rax
leaq 0x18(%rax), %rcx
cmpq 0x110(%r12), %rcx
jb 0x469a1
movl %ebx, -0x2c(%rbp)
subq %rdi, %rax
pushq $0x18
popq %rcx
cqto
idivq %rcx
movq %rax, %r13
jmp 0x46954
movl %ebx, -0x2c(%rbp)
xorl %r13d, %r13d
leaq (,%r13,2), %rax
leaq 0x1(,%r13,2), %rcx
movl $0x80, %edx
cmpq %rdx, %rax
cmovbq %rdx, %rcx
imulq $0x18, %rcx, %rbx
movq %rbx, %rsi
callq 0x12840
testq %rax, %rax
je 0x469cb
movq %rax, %rcx
movq %rax, 0x118(%r12)
addq %rax, %rbx
movq %rbx, 0x110(%r12)
imulq $0x18, %r13, %rax
addq %rcx, %rax
movl -0x2c(%rbp), %ebx
leaq 0x18(%rax), %rcx
movq %rcx, 0x108(%r12)
movq %r15, 0x18(%rax)
movq %r14, 0x20(%rax)
andl $0x0, 0x28(%rax)
movl %ebx, 0x2c(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3961e(%rip), %rax     # 0x7fff0
movq (%rax), %rdi
leaq 0x6628(%rip), %rsi      # 0x4d004
leaq 0x2101c(%rip), %rdx     # 0x679ff
pushq $0x31
popq %rcx
xorl %eax, %eax
callq 0x125e0
pushq $0x1
popq %rdi
callq 0x12a60
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/value.c
// Function: getter_checkint
static int32_t getter_checkint(JanetType type, Janet key, int32_t max) {
    if (!janet_checkint(key)) goto bad;
    int32_t ret = janet_unwrap_integer(key);
    if (ret < 0) goto bad;
    if (ret >= max) goto bad;
    return ret;
bad:
    janet_panicf("expected integer key for %s in range [0, %d), got %v", janet_type_names[type], max, key);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %rbx
movl %edi, %r15d
movq %rsi, %rdi
callq 0x45e2b
testl %eax, %eax
je 0x470fe
movq %rbx, %xmm0
cvttsd2si %xmm0, %eax
testl %eax, %eax
js 0x470fe
cmpl %r14d, %eax
jge 0x470fe
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %r15d, %eax
leaq 0x38308(%rip), %rcx     # 0x7f410
movq (%rcx,%rax,8), %rsi
leaq 0x208fd(%rip), %rdi     # 0x67a10
movl %r14d, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x176c9
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/value.c
// Function: janet_length
int32_t janet_length(Janet x) {
    switch (janet_type(x)) {
        default:
            janet_panicf("expected %T, got %v", JANET_TFLAG_LENGTHABLE, x);
        case JANET_STRING:
        case JANET_SYMBOL:
        case JANET_KEYWORD:
            return janet_string_length(janet_unwrap_string(x));
        case JANET_ARRAY:
            return janet_unwrap_array(x)->count;
        case JANET_BUFFER:
            return janet_unwrap_buffer(x)->count;
        case JANET_TUPLE:
            return janet_tuple_length(janet_unwrap_tuple(x));
        case JANET_STRUCT:
            return janet_struct_length(janet_unwrap_struct(x));
        case JANET_TABLE:
            return janet_unwrap_table(x)->count;
        case JANET_ABSTRACT: {
            void *abst = janet_unwrap_abstract(x);
            const JanetAbstractType *type = janet_abstract_type(abst);
            if (type->length != NULL) {
                size_t len = type->length(abst, janet_abstract_size(abst));
                if (len > INT32_MAX) {
                    janet_panicf("invalid integer length %u", len);
                }
                return (int32_t)(len);
            }
            Janet argv[1] = { x };
            Janet len = janet_mcall("length", 1, argv);
            if (!janet_checkint(len))
                janet_panicf("invalid integer length %v", len);
            return janet_unwrap_integer(len);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rdi, %xmm0
movq %rdi, %rcx
shrq $0x2f, %rcx
andl $0xf, %ecx
xorl %eax, %eax
ucomisd %xmm0, %xmm0
cmovpl %ecx, %eax
addl $-0x4, %eax
cmpl $0xa, %eax
ja 0x475a7
leaq 0x20334(%rip), %rcx     # 0x67834
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0x4b1f1
movl 0x10(%rax), %eax
jmp 0x475a0
movq %rbx, %rdi
callq 0x4b1f1
movl -0x8(%rax), %eax
jmp 0x475a0
movq %rbx, %rdi
callq 0x4b1f1
movl -0x10(%rax), %eax
jmp 0x475a0
movq %rbx, %rdi
callq 0x4b1f1
movq -0x10(%rax), %rcx
movq 0x60(%rcx), %rcx
testq %rcx, %rcx
je 0x47572
movq -0x8(%rax), %rsi
movq %rax, %rdi
callq *%rcx
testq $-0x80000000, %rax      # imm = 0x80000000
je 0x475a0
leaq 0x20414(%rip), %rdi     # 0x67974
movq %rax, %rsi
jmp 0x475c7
movq %rbx, %rdi
callq 0x4b1f1
movl -0x18(%rax), %eax
jmp 0x475a0
leaq -0x10(%rbp), %rdx
movq %rbx, (%rdx)
leaq 0x1ca3a(%rip), %rdi     # 0x63fba
pushq $0x1
popq %rsi
callq 0x4aca2
movq %rax, %rbx
movq %rax, %rdi
callq 0x45e2b
testl %eax, %eax
je 0x475bd
movq %rbx, %xmm0
cvttsd2si %xmm0, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x8b39(%rip), %rdi      # 0x500e7
movl $0xff0, %esi            # imm = 0xFF0
movq %rbx, %rdx
xorl %eax, %eax
callq 0x176c9
leaq 0x203ca(%rip), %rdi     # 0x6798e
movq %rbx, %rsi
xorl %eax, %eax
callq 0x176c9
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/value.c
// Function: janet_lengthv
Janet janet_lengthv(Janet x) {
    switch (janet_type(x)) {
        default:
            janet_panicf("expected %T, got %v", JANET_TFLAG_LENGTHABLE, x);
        case JANET_STRING:
        case JANET_SYMBOL:
        case JANET_KEYWORD:
            return janet_wrap_integer(janet_string_length(janet_unwrap_string(x)));
        case JANET_ARRAY:
            return janet_wrap_integer(janet_unwrap_array(x)->count);
        case JANET_BUFFER:
            return janet_wrap_integer(janet_unwrap_buffer(x)->count);
        case JANET_TUPLE:
            return janet_wrap_integer(janet_tuple_length(janet_unwrap_tuple(x)));
        case JANET_STRUCT:
            return janet_wrap_integer(janet_struct_length(janet_unwrap_struct(x)));
        case JANET_TABLE:
            return janet_wrap_integer(janet_unwrap_table(x)->count);
        case JANET_ABSTRACT: {
            void *abst = janet_unwrap_abstract(x);
            const JanetAbstractType *type = janet_abstract_type(abst);
            if (type->length != NULL) {
                size_t len = type->length(abst, janet_abstract_size(abst));
                /* If len is always less then double, we can never overflow */
#ifdef JANET_32
                return janet_wrap_number(len);
#else
                if (len < (size_t) JANET_INTMAX_INT64) {
                    return janet_wrap_number((double) len);
                } else {
                    janet_panicf("integer length %u too large", len);
                }
#endif
            }
            Janet argv[1] = { x };
            return janet_mcall("length", 1, argv);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rdi, %xmm0
movq %rdi, %rcx
shrq $0x2f, %rcx
andl $0xf, %ecx
xorl %eax, %eax
ucomisd %xmm0, %xmm0
cmovpl %ecx, %eax
addl $-0x4, %eax
cmpl $0xa, %eax
ja 0x4769b
leaq 0x2025e(%rip), %rcx     # 0x67860
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0x4b1f1
cvtsi2sdl 0x10(%rax), %xmm0
jmp 0x47673
movq %rbx, %rdi
callq 0x4b1f1
cvtsi2sdl -0x8(%rax), %xmm0
jmp 0x47673
movq %rbx, %rdi
callq 0x4b1f1
cvtsi2sdl -0x10(%rax), %xmm0
jmp 0x47673
movq %rbx, %rdi
callq 0x4b1f1
movq -0x10(%rax), %rcx
movq 0x60(%rcx), %rcx
testq %rcx, %rcx
je 0x4767e
movq -0x8(%rax), %rsi
movq %rax, %rdi
callq *%rcx
movq %rax, %rcx
shrq $0x35, %rcx
jne 0x476b1
cvtsi2sd %rax, %xmm0
jmp 0x47673
movq %rbx, %rdi
callq 0x4b1f1
cvtsi2sdl -0x18(%rax), %xmm0
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4b471
leaq -0x10(%rbp), %rdx
movq %rbx, (%rdx)
leaq 0x1c92e(%rip), %rdi     # 0x63fba
pushq $0x1
popq %rsi
callq 0x4aca2
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x8a45(%rip), %rdi      # 0x500e7
movl $0xff0, %esi            # imm = 0xFF0
movq %rbx, %rdx
xorl %eax, %eax
callq 0x176c9
leaq 0x202f0(%rip), %rdi     # 0x679a8
movq %rax, %rsi
xorl %eax, %eax
callq 0x176c9
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/vector.c
// Function: janet_v_grow
void *janet_v_grow(void *v, int32_t increment, int32_t itemsize) {
    int32_t dbl_cur = (NULL != v) ? 2 * janet_v__cap(v) : 0;
    int32_t min_needed = janet_v_count(v) + increment;
    int32_t m = dbl_cur > min_needed ? dbl_cur : min_needed;
    size_t newsize = ((size_t) itemsize) * m + sizeof(int32_t) * 2;
    int32_t *p = (int32_t *) janet_srealloc(v ? janet_v__raw(v) : 0, newsize);
    if (!v) p[1] = 0;
    p[0] = m;
    return p + 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x479b6
movl -0x8(%rbx), %eax
movl -0x4(%rbx), %r14d
addl %eax, %eax
jmp 0x479bb
xorl %eax, %eax
xorl %r14d, %r14d
addl %esi, %r14d
cmpl %r14d, %eax
cmovgl %eax, %r14d
movslq %edx, %rax
movslq %r14d, %rsi
imulq %rax, %rsi
addq $0x8, %rsi
leaq -0x8(%rbx), %rdi
testq %rbx, %rbx
cmoveq %rbx, %rdi
callq 0x297c9
testq %rbx, %rbx
jne 0x479ec
andl $0x0, 0x4(%rax)
movl %r14d, (%rax)
addq $0x8, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/vector.c
// Function: janet_v_flattenmem
void *janet_v_flattenmem(void *v, int32_t itemsize) {
    char *p;
    if (NULL == v) return NULL;
    size_t size = (size_t) itemsize * janet_v__cnt(v);
    p = janet_malloc(size);
    if (NULL != p) {
        safe_memcpy(p, v, size);
        return p;
    } else {
        JANET_OUT_OF_MEMORY;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x47a35
movq %rdi, %rbx
movslq %esi, %rax
movslq -0x4(%rdi), %r15
imulq %rax, %r15
movq %r15, %rdi
callq 0x12760
testq %rax, %rax
je 0x47a46
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x44ae2
jmp 0x47a38
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x385a3(%rip), %rax     # 0x7fff0
movq (%rax), %rdi
leaq 0x55ad(%rip), %rsi      # 0x4d004
leaq 0x1ffe7(%rip), %rdx     # 0x67a45
pushq $0x33
popq %rcx
xorl %eax, %eax
callq 0x125e0
pushq $0x1
popq %rdi
callq 0x12a60
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/vm.c
// Function: janet_continue
JanetSignal janet_continue(JanetFiber *fiber, Janet in, Janet *out) {
    /* Check conditions */
    JanetSignal tmp_signal = janet_check_can_resume(fiber, out, 0);
    if (tmp_signal) return tmp_signal;
    return janet_continue_no_check(fiber, in, out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rsi
xorl %edx, %edx
callq 0x4a847
testl %eax, %eax
je 0x47be7
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4a911
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/vm.c
// Function: vm_do_trace
static void vm_do_trace(JanetFunction *func, int32_t argc, const Janet *argv) {
    if (func->def->name) {
        janet_eprintf("trace (%S", func->def->name);
    } else {
        janet_eprintf("trace (%p", janet_wrap_function(func));
    }
    for (int32_t i = 0; i < argc; i++) {
        janet_eprintf(" %p", argv[i]);
    }
    janet_eprintf(")\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
movq 0x10(%rdi), %rax
movq 0x48(%rax), %rcx
movq 0x38192(%rip), %rax     # 0x7fff0
movq (%rax), %r15
testq %rcx, %rcx
je 0x47e79
leaq 0xebb1(%rip), %rdi      # 0x56a1e
leaq 0x1fdb0(%rip), %rdx     # 0x67c24
movq %r15, %rsi
jmp 0x47e9c
movabsq $-0x2000000000000, %rsi # imm = 0xFFFE000000000000
callq 0x4b3ab
leaq 0xeb8f(%rip), %rdi      # 0x56a1e
leaq 0x1fd98(%rip), %rdx     # 0x67c2e
movq %r15, %rsi
movq %rax, %rcx
xorl %eax, %eax
callq 0x2c621
xorl %eax, %eax
testl %r14d, %r14d
cmovlel %eax, %r14d
leaq 0xeb6b(%rip), %r15      # 0x56a1e
leaq 0x13db0(%rip), %r12     # 0x5bc6a
xorl %r13d, %r13d
movq 0x3812c(%rip), %rax     # 0x7fff0
movq (%rax), %rsi
cmpq %r13, %r14
je 0x47ee2
movq (%rbx,%r13,8), %rcx
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2c621
incq %r13
jmp 0x47ebd
leaq 0xeb35(%rip), %rdi      # 0x56a1e
leaq 0x1fd48(%rip), %rdx     # 0x67c38
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2c621
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/vm.c
// Function: janet_check_can_resume
static JanetSignal janet_check_can_resume(JanetFiber *fiber, Janet *out, int is_cancel) {
    /* Check conditions */
    JanetFiberStatus old_status = janet_fiber_status(fiber);
    if (janet_vm.stackn >= JANET_RECURSION_GUARD) {
        janet_fiber_set_status(fiber, JANET_STATUS_ERROR);
        *out = janet_cstringv("C stack recursed too deeply");
        return JANET_SIGNAL_ERROR;
    }
    /* If a "task" fiber is trying to be used as a normal fiber, detect that. See bug #920.
     * Fibers must be marked as root fibers manually, or by the ev scheduler. */
    if (janet_vm.fiber != NULL && (fiber->gc.flags & JANET_FIBER_FLAG_ROOT)) {
#ifdef JANET_EV
        *out = janet_cstringv(is_cancel
                              ? "cannot cancel root fiber, use ev/cancel"
                              : "cannot resume root fiber, use ev/go");
#else
        *out = janet_cstringv(is_cancel
                              ? "cannot cancel root fiber"
                              : "cannot resume root fiber");
#endif
        return JANET_SIGNAL_ERROR;
    }
    if (old_status == JANET_STATUS_ALIVE ||
            old_status == JANET_STATUS_DEAD ||
            (old_status >= JANET_STATUS_USER0 && old_status <= JANET_STATUS_USER4) ||
            old_status == JANET_STATUS_ERROR) {
        const uint8_t *str = janet_formatc("cannot resume fiber with status :%s",
                                           janet_status_names[old_status]);
        *out = janet_wrap_string(str);
        return JANET_SIGNAL_ERROR;
    }
    return JANET_SIGNAL_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r15
callq 0x27553
movl %eax, %r14d
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
cmpl $0x400, 0x18(%rax)      # imm = 0x400
jl 0x4a897
movl $0xffc0ffff, %eax       # imm = 0xFFC0FFFF
andl 0x10(%r15), %eax
orl $0x10000, %eax          # imm = 0x10000
movl %eax, 0x10(%r15)
leaq 0x1d261(%rip), %rdi     # 0x67af6
jmp 0x4a8eb
cmpq $0x0, 0x20(%rax)
je 0x4a8a5
testb $0x4, 0x2(%r15)
jne 0x4a8d6
xorl %eax, %eax
cmpl $0xf, %r14d
ja 0x4a908
movl $0x81f3, %ecx           # imm = 0x81F3
btl %r14d, %ecx
jae 0x4a908
movl %r14d, %eax
leaq 0x34c3e(%rip), %rcx     # 0x7f500
movq (%rcx,%rax,8), %rsi
leaq 0x1d5ff(%rip), %rdi     # 0x67ecc
xorl %eax, %eax
callq 0x3c0ed
jmp 0x4a8f0
testl %r12d, %r12d
leaq 0x1d5c8(%rip), %rax     # 0x67ea8
leaq 0x1d599(%rip), %rdi     # 0x67e80
cmoveq %rax, %rdi
callq 0x411ea
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
movq %rax, %rdi
callq 0x4b366
movq %rax, (%rbx)
pushq $0x1
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/vm.c
// Function: janet_continue_signal
JanetSignal janet_continue_signal(JanetFiber *fiber, Janet in, Janet *out, JanetSignal sig) {
    JanetSignal tmp_signal = janet_check_can_resume(fiber, out, sig != JANET_SIGNAL_OK);
    if (tmp_signal) return tmp_signal;
    if (sig != JANET_SIGNAL_OK) {
        JanetFiber *child = fiber;
        while (child->child) child = child->child;
        child->gc.flags &= ~JANET_FIBER_STATUS_MASK;
        child->gc.flags |= sig << JANET_FIBER_STATUS_OFFSET;
        child->flags |= JANET_FIBER_RESUME_SIGNAL;
    }
    return janet_continue_no_check(fiber, in, out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r12d
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %edx, %edx
testl %ecx, %ecx
setne %dl
movq %rbx, %rsi
callq 0x4a847
testl %eax, %eax
je 0x4abc0
pushq $0x1
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testl %r12d, %r12d
je 0x4abe9
movq %r15, %rcx
movq %rcx, %rax
movq 0x38(%rcx), %rcx
testq %rcx, %rcx
jne 0x4abc8
movl $0xffc0ffff, %ecx       # imm = 0xFFC0FFFF
andl (%rax), %ecx
shll $0x10, %r12d
orl %ecx, %r12d
movl %r12d, (%rax)
orb $0x40, 0x12(%rax)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4a911
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/vm.c
// Function: janet_pcall
JanetSignal janet_pcall(
    JanetFunction *fun,
    int32_t argc,
    const Janet *argv,
    Janet *out,
    JanetFiber **f) {
    JanetFiber *fiber;
    if (f && *f) {
        fiber = janet_fiber_reset(*f, fun, argc, argv);
    } else {
        fiber = janet_fiber(fun, 64, argc, argv);
    }
    if (f) *f = fiber;
    if (NULL == fiber) {
        *out = janet_cstringv("arity mismatch");
        return JANET_SIGNAL_ERROR;
    }
    return janet_continue(fiber, janet_wrap_nil(), out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %rbx
movq %rdx, %rcx
movl %esi, %edx
movq %rdi, %rax
testq %r8, %r8
je 0x4ac31
movq (%r14), %rdi
testq %rdi, %rdi
je 0x4ac31
movq %rax, %rsi
callq 0x26ed4
movq %rax, %r15
jmp 0x4ac44
pushq $0x40
popq %rsi
movq %rax, %rdi
callq 0x271c9
movq %rax, %r15
testq %r14, %r14
je 0x4ac47
movq %r15, (%r14)
testq %r15, %r15
je 0x4ac73
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x4b313
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x47bb8
leaq 0x1cf27(%rip), %rdi     # 0x67ba1
callq 0x411ea
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
movq %rax, %rdi
callq 0x4b366
movq %rax, (%rbx)
pushq $0x1
popq %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/vm.c
// Function: janet_mcall
Janet janet_mcall(const char *name, int32_t argc, Janet *argv) {
    /* At least 1 argument */
    if (argc < 1) {
        janet_panicf("method :%s expected at least 1 argument", name);
    }
    /* Find method */
    Janet method = janet_method_lookup(argv[0], name);
    if (janet_checktype(method, JANET_NIL)) {
        janet_panicf("could not find method :%s for %v", name, argv[0]);
    }
    /* Invoke method */
    return janet_method_invoke(method, argc, argv);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
jle 0x4ace8
movq %rdx, %r14
movl %esi, %r15d
movq (%rdx), %rdi
movq %rbx, %rsi
callq 0x4ad0d
movq %rax, %rcx
shrq $0x2f, %rcx
cmpl $0x1fff1, %ecx          # imm = 0x1FFF1
je 0x4acf9
movq %rax, %rdi
movl %r15d, %esi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4ad41
leaq 0x1cec1(%rip), %rdi     # 0x67bb0
movq %rbx, %rsi
xorl %eax, %eax
callq 0x176c9
movq (%r14), %rdx
leaq 0x1ced5(%rip), %rdi     # 0x67bd8
movq %rbx, %rsi
xorl %eax, %eax
callq 0x176c9
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/vm.c
// Function: janet_method_invoke
static Janet janet_method_invoke(Janet method, int32_t argc, Janet *argv) {
    switch (janet_type(method)) {
        case JANET_CFUNCTION:
            return (janet_unwrap_cfunction(method))(argc, argv);
        case JANET_FUNCTION: {
            JanetFunction *fun = janet_unwrap_function(method);
            return janet_call(fun, argc, argv);
        }
        case JANET_ABSTRACT: {
            JanetAbstract abst = janet_unwrap_abstract(method);
            const JanetAbstractType *at = janet_abstract_type(abst);
            if (NULL != at->call) {
                return at->call(abst, argc, argv);
            }
        }
        /* fallthrough */
        case JANET_STRING:
        case JANET_BUFFER:
        case JANET_TABLE:
        case JANET_STRUCT:
        case JANET_ARRAY:
        case JANET_TUPLE: {
            if (argc != 1) {
                janet_panicf("%v called with %d arguments, possibly expected 1", method, argc);
            }
            return janet_in(method, argv[0]);
        }
        default: {
            if (argc != 1) {
                janet_panicf("%v called with %d arguments, possibly expected 1", method, argc);
            }
            return janet_in(argv[0], method);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r15
movq %rdi, %xmm0
movq %rdi, %rcx
shrq $0x2f, %rcx
andl $0xf, %ecx
xorl %eax, %eax
ucomisd %xmm0, %xmm0
cmovpl %ecx, %eax
addl $-0x4, %eax
cmpl $0xa, %eax
ja 0x4ae06
leaq 0x1ccda(%rip), %rcx     # 0x67a58
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x1, %ebx
jne 0x4ae13
movq (%r14), %rsi
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x46ef3
movq %r15, %rdi
callq 0x4b1f1
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x47bff
movq %r15, %rdi
callq 0x4b1f1
movl %ebx, %edi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movq %r15, %rdi
callq 0x4b1f1
movq -0x10(%rax), %rcx
movq 0x58(%rcx), %rcx
testq %rcx, %rcx
je 0x4ad87
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rcx
cmpl $0x1, %ebx
jne 0x4ae13
movq (%r14), %rdi
movq %r15, %rsi
jmp 0x4ad96
leaq 0x1d0d6(%rip), %rdi     # 0x67ef0
movq %r15, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x176c9