LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/util.c
// Function: janet_dict_find
const JanetKV *janet_dict_find(const JanetKV *buckets, int32_t cap, Janet key) {
    int32_t index = janet_maphash(cap, janet_hash(key));
    int32_t i;
    const JanetKV *first_bucket = NULL;
    /* Higher half */
    for (i = index; i < cap; i++) {
        const JanetKV *kv = buckets + i;
        if (janet_checktype(kv->key, JANET_NIL)) {
            if (janet_checktype(kv->value, JANET_NIL)) {
                return kv;
            } else if (NULL == first_bucket) {
                first_bucket = kv;
            }
        } else if (janet_equals(kv->key, key)) {
            return buckets + i;
        }
    }
    /* Lower half */
    for (i = 0; i < index; i++) {
        const JanetKV *kv = buckets + i;
        if (janet_checktype(kv->key, JANET_NIL)) {
            if (janet_checktype(kv->value, JANET_NIL)) {
                return kv;
            } else if (NULL == first_bucket) {
                first_bucket = kv;
            }
        } else if (janet_equals(kv->key, key)) {
            return buckets + i;
        }
    }
    return first_bucket;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r12d
movq %rdi, %r14
movq %rdx, -0x40(%rbp)
movq %rdx, %rdi
callq 0x4b1e3
leal -0x1(%r12), %ecx
andl %eax, %ecx
subl %ecx, %r12d
movl %ecx, -0x34(%rbp)
jle 0x490e8
movabsq $-0x800000000000, %rbx  # imm = 0xFFFF800000000000
movabsq $-0x7800000000000, %rsi # imm = 0xFFF8800000000000
movslq %ecx, %r13
shlq $0x4, %r13
addq %r14, %r13
movq $0x0, -0x30(%rbp)
movq (%r13), %rdi
movq %rdi, %rax
andq %rbx, %rax
cmpq %rsi, %rax
jne 0x490a6
movq 0x8(%r13), %rax
andq %rbx, %rax
cmpq %rsi, %rax
jne 0x490c4
xorl %eax, %eax
movq %r13, %r15
jmp 0x490d5
movq -0x40(%rbp), %rsi
callq 0x4acce
movabsq $-0x7800000000000, %rsi # imm = 0xFFF8800000000000
testl %eax, %eax
sete %al
cmovneq %r13, %r15
jmp 0x490d5
movq -0x30(%rbp), %rax
testq %rax, %rax
cmoveq %r13, %rax
movq %rax, -0x30(%rbp)
movb $0x1, %al
testb %al, %al
je 0x4916c
addq $0x10, %r13
decl %r12d
jne 0x49084
jmp 0x490f0
movq $0x0, -0x30(%rbp)
movl -0x34(%rbp), %eax
testl %eax, %eax
jle 0x49176
movabsq $-0x800000000000, %r13  # imm = 0xFFFF800000000000
movabsq $-0x7800000000000, %rdx # imm = 0xFFF8800000000000
movl %eax, %r12d
movq %r15, %rbx
movq (%r14), %rdi
movq %rdi, %rax
andq %r13, %rax
cmpq %rdx, %rax
jne 0x49132
movq 0x8(%r14), %rax
andq %r13, %rax
cmpq %rdx, %rax
jne 0x4914c
xorl %eax, %eax
movq %r14, %rbx
jmp 0x4915d
movq -0x40(%rbp), %rsi
movq %rdx, %r15
callq 0x4acce
movq %r15, %rdx
testl %eax, %eax
sete %al
cmovneq %r14, %rbx
jmp 0x4915d
movq -0x30(%rbp), %rax
testq %rax, %rax
cmoveq %r14, %rax
movq %rax, -0x30(%rbp)
movb $0x1, %al
testb %al, %al
je 0x49172
addq $0x10, %r14
decq %r12
jne 0x49111
jmp 0x49176
movq %r15, -0x30(%rbp)
jmp 0x49176
movq %rbx, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/util.c
// Function: janet_dictionary_get
Janet janet_dictionary_get(const JanetKV *data, int32_t cap, Janet key) {
    const JanetKV *kv = janet_dict_find(data, cap, key);
    if (kv && !janet_checktype(kv->key, JANET_NIL)) {
        return kv->value;
    }
    return janet_wrap_nil();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movabsq $-0x7800000000000, %rbx # imm = 0xFFF8800000000000
callq 0x49028
testq %rax, %rax
je 0x491b5
movabsq $-0x800000000000, %rcx  # imm = 0xFFFF800000000000
andq (%rax), %rcx
cmpq %rbx, %rcx
jne 0x491c6
incq %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4f95a
movq 0x8(%rax), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/util.c
// Function: janet_dictionary_next
const JanetKV *janet_dictionary_next(const JanetKV *kvs, int32_t cap, const JanetKV *kv) {
    const JanetKV *end = kvs + cap;
    kv = (kv == NULL) ? kvs : kv + 1;
    while (kv < end) {
        if (!janet_checktype(kv->key, JANET_NIL))
            return kv;
        kv++;
    }
    return NULL;
}

// Assembly:
movslq %esi, %rcx
shlq $0x4, %rcx
addq %rdi, %rcx
leaq 0x10(%rdx), %rax
testq %rdx, %rdx
cmoveq %rdi, %rax
cmpq %rcx, %rax
jae 0x4920b
pushq %rbp
movq %rsp, %rbp
movq (%rax), %rdx
shrq $0x2f, %rdx
cmpl $0x1fff1, %edx          # imm = 0x1FFF1
jne 0x49209
addq $0x10, %rax
cmpq %rcx, %rax
jb 0x491ef
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/util.c
// Function: janet_cstrcmp
int janet_cstrcmp(const uint8_t *str, const char *other) {
    int32_t len = janet_string_length(str);
    int32_t index;
    for (index = 0; index < len; index++) {
        uint8_t c = str[index];
        uint8_t k = ((const uint8_t *)other)[index];
        if (c < k) return -1;
        if (c > k) return 1;
        if (k == '\0') break;
    }
    return (other[index] == '\0') ? 0 : -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl -0x8(%rdi), %r8d
xorl %ecx, %ecx
testl %r8d, %r8d
jle 0x49272
xorl %edx, %edx
movb (%rsi,%rdx), %r11b
cmpb %r11b, (%rdi,%rdx)
jae 0x49236
movl $0x1, %r10d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x49253
movl $0x1, %eax
movl $0x1, %r10d
ja 0x49253
xorl %r10d, %r10d
testb %r11b, %r11b
sete %r10b
addl %r10d, %r10d
movl %r9d, %eax
testl %r10d, %r10d
jne 0x49268
incq %rdx
movl %eax, %r9d
cmpq %rdx, %r8
jne 0x4921f
movl %r8d, %edx
jmp 0x4926e
cmpl $0x2, %r10d
jne 0x4927b
movl %edx, %eax
jmp 0x49274
xorl %eax, %eax
cmpb (%rsi,%rax), %cl
sbbl %ecx, %ecx
movl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/util.c
// Function: janet_strbinsearch
const void *janet_strbinsearch(
    const void *tab,
    size_t tabcount,
    size_t itemsize,
    const uint8_t *key) {
    size_t low = 0;
    size_t hi = tabcount;
    const char *t = (const char *)tab;
    while (low < hi) {
        size_t mid = low + ((hi - low) / 2);
        const char **item = (const char **)(t + mid * itemsize);
        const char *name = *item;
        int comp = janet_cstrcmp(key, name);
        if (comp < 0) {
            hi = mid;
        } else if (comp > 0) {
            low = mid + 1;
        } else {
            return (const void *)item;
        }
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq %rsi, %rbx
movq %rdi, %r15
xorl %r13d, %r13d
movq %rbx, %r12
subq %r13, %r12
jbe 0x492e6
shrq %r12
addq %r13, %r12
movq %r12, %r14
imulq -0x38(%rbp), %r14
movq (%r15,%r14), %rsi
movq -0x40(%rbp), %rdi
callq 0x4920e
movb $0x1, %cl
testl %eax, %eax
js 0x492d2
je 0x492d7
incq %r12
movq %r12, %r13
jmp 0x492e0
movq %r12, %rbx
jmp 0x492e0
addq %r15, %r14
xorl %ecx, %ecx
movq %r14, -0x30(%rbp)
testb %cl, %cl
jne 0x4929f
jmp 0x492ee
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/util.c
// Function: janet_def_sm
void janet_def_sm(JanetTable *env, const char *name, Janet val, const char *doc, const char *source_file, int32_t source_line) {
    JanetTable *subt = janet_table(2);
    janet_table_put(subt, janet_ckeywordv("value"), val);
    janet_add_meta(subt, doc, source_file, source_line);
    janet_table_put(env, janet_csymbolv(name), janet_wrap_table(subt));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r12d
movq %r8, %r13
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, -0x30(%rbp)
movq %rdi, -0x38(%rbp)
movl $0x2, %edi
callq 0x47e96
movq %rax, %r14
leaq 0x14ccc(%rip), %rdi     # 0x5e006
callq 0x47cd3
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
movq %rax, %rdi
callq 0x4f9ad
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x481b3
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movl %r12d, %ecx
callq 0x493bd
movq -0x30(%rbp), %rdi
callq 0x47cd3
movabsq $-0x5800000000000, %rsi # imm = 0xFFFA800000000000
movq %rax, %rdi
callq 0x4f9ad
movq %rax, %rbx
movabsq $-0x3800000000000, %rsi # imm = 0xFFFC800000000000
movq %r14, %rdi
callq 0x4f9f2
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x481b3
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/util.c
// Function: janet_add_meta
static void janet_add_meta(JanetTable *table, const char *doc, const char *source_file, int32_t source_line) {
    if (doc) {
        janet_table_put(table, janet_ckeywordv("doc"), janet_cstringv(doc));
    }
    if (source_file && source_line) {
        Janet triple[3];
        triple[0] = janet_cstringv(source_file);
        triple[1] = janet_wrap_integer(source_line);
        triple[2] = janet_wrap_integer(1);
        Janet value = janet_wrap_tuple(janet_tuple_n(triple, 3));
        janet_table_put(table, janet_ckeywordv("source-map"), value);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r15d
movq %rdx, %r13
movq %rdi, %rbx
movabsq $-0x5000000000000, %r12 # imm = 0xFFFB000000000000
movabsq $-0x6000000000000, %rax # imm = 0xFFFA000000000000
testq %rsi, %rsi
je 0x49449
movq %rsi, %r14
leaq 0x20522(%rip), %rdi     # 0x6991c
callq 0x47cd3
movq %rax, %rdi
movq %r12, %rsi
callq 0x4f9ad
movq %rax, %r12
movq %r14, %rdi
callq 0x4516c
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x4f9ad
movq %rbx, %rdi
movq %r12, %rsi
movabsq $-0x5000000000000, %r12 # imm = 0xFFFB000000000000
movq %rax, %rdx
callq 0x481b3
movabsq $-0x6000000000000, %rax # imm = 0xFFFA000000000000
movq %rbx, -0x30(%rbp)
movq %rax, %rbx
testq %r13, %r13
sete %al
testl %r15d, %r15d
sete %cl
orb %al, %cl
jne 0x494e5
movq %r13, %rdi
callq 0x4516c
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4f9ad
leaq -0x50(%rbp), %r14
movq %rax, (%r14)
cvtsi2sd %r15d, %xmm0
callq 0x4fab8
movq %rax, 0x8(%r14)
movsd 0xbe84(%rip), %xmm0     # 0x55318
callq 0x4fab8
movq %rax, 0x10(%r14)
movq %r14, %rdi
movl $0x3, %esi
callq 0x48a9f
movabsq $-0x4000000000000, %rsi # imm = 0xFFFC000000000000
movq %rax, %rdi
callq 0x4f9ad
movq %rax, %r14
leaq 0x2053f(%rip), %rdi     # 0x69a05
callq 0x47cd3
movq %rax, %rdi
movq %r12, %rsi
callq 0x4f9ad
movq -0x30(%rbp), %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x481b3
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/util.c
// Function: janet_var_sm
void janet_var_sm(JanetTable *env, const char *name, Janet val, const char *doc, const char *source_file, int32_t source_line) {
    JanetArray *array = janet_array(1);
    JanetTable *subt = janet_table(2);
    janet_array_push(array, val);
    janet_table_put(subt, janet_ckeywordv("ref"), janet_wrap_array(array));
    janet_add_meta(subt, doc, source_file, source_line);
    janet_table_put(env, janet_csymbolv(name), janet_wrap_table(subt));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, -0x2c(%rbp)
movq %r8, %r13
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, -0x38(%rbp)
movq %rdi, -0x40(%rbp)
movl $0x1, %edi
callq 0x146a0
movq %rax, %r12
movl $0x2, %edi
callq 0x47e96
movq %rax, %r14
movq %r12, %rdi
movq %r15, %rsi
callq 0x148b3
leaq 0x1fb81(%rip), %rdi     # 0x690d7
callq 0x47cd3
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
movq %rax, %rdi
callq 0x4f9ad
movq %rax, %r15
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
movq %r12, %rdi
callq 0x4f9f2
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x481b3
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movl -0x2c(%rbp), %ecx
callq 0x493bd
movq -0x38(%rbp), %rdi
callq 0x47cd3
movabsq $-0x5800000000000, %rsi # imm = 0xFFFA800000000000
movq %rax, %rdi
callq 0x4f9ad
movq %rax, %rbx
movabsq $-0x3800000000000, %rsi # imm = 0xFFFC800000000000
movq %r14, %rdi
callq 0x4f9f2
movq -0x40(%rbp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x481b3
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/util.c
// Function: janet_registry_put
void janet_registry_put(
    JanetCFunction key,
    const char *name,
    const char *name_prefix,
    const char *source_file,
    int32_t source_line) {
    if (janet_vm.registry_count == janet_vm.registry_cap) {
        size_t newcap = (janet_vm.registry_count + 1) * 2;
        /* Size it nicely with core by default */
        if (newcap < 512) {
            newcap = 512;
        }
        void *newmem = janet_realloc(janet_vm.registry, newcap * sizeof(JanetCFunRegistry));
        if (NULL == newmem) {
            JANET_OUT_OF_MEMORY;
        }
        janet_vm.registry = newmem;
        janet_vm.registry_cap = newcap;
    }
    JanetCFunRegistry value = {
        key,
        name,
        name_prefix,
        source_file,
        source_line
    };
    janet_vm.registry[janet_vm.registry_count++] = value;
    janet_vm.registry_dirty = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %r14d
movq %rcx, -0x38(%rbp)
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq %rax, %r13
movq 0x58(%rax), %rax
cmpq 0x50(%r13), %rax
jne 0x4967e
movl %r14d, -0x2c(%rbp)
leaq 0x2(,%rax,2), %rax
cmpq $0x201, %rax            # imm = 0x201
movl $0x200, %r14d           # imm = 0x200
cmovaeq %rax, %r14
movq 0x48(%r13), %rdi
leaq (,%r14,8), %rax
leaq (%rax,%rax,4), %rsi
callq 0x12850
testq %rax, %rax
je 0x496c5
movq %rax, 0x48(%r13)
movq %r14, 0x50(%r13)
movl -0x2c(%rbp), %r14d
movq 0x48(%r13), %rax
movq 0x58(%r13), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x58(%r13)
leaq (%rcx,%rcx,4), %rcx
movq %rbx, (%rax,%rcx,8)
movq %r12, 0x8(%rax,%rcx,8)
movq %r15, 0x10(%rax,%rcx,8)
movq -0x38(%rbp), %rdx
movq %rdx, 0x18(%rax,%rcx,8)
movl %r14d, 0x20(%rax,%rcx,8)
movl $0x1, 0x60(%r13)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x141b4
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/util.c
// Function: janet_registry_get
JanetCFunRegistry *janet_registry_get(JanetCFunction key) {
    if (janet_vm.registry_dirty) {
        janet_registry_sort();
    }
    for (size_t i = 0; i < janet_vm.registry_count; i++) {
        if (janet_vm.registry[i].cfun == key) {
            return janet_vm.registry + i;
        }
    }
    JanetCFunRegistry *lo = janet_vm.registry;
    JanetCFunRegistry *hi = lo + janet_vm.registry_count;
    while (lo < hi) {
        JanetCFunRegistry *mid = lo + (hi - lo) / 2;
        if (mid->cfun == key) {
            return mid;
        }
        if ((void *)(mid->cfun) > (void *)(key)) {
            hi = mid;
        } else {
            lo = mid + 1;
        }
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
cmpl $0x0, 0x60(%rax)
je 0x4979a
cmpq $0x2, 0x58(%rax)
jb 0x49793
movl $0x1, %ecx
xorl %edx, %edx
movq 0x48(%rax), %rdi
leaq (%rcx,%rcx,4), %r8
movq (%rdi,%r8,8), %rsi
movups 0x18(%rdi,%r8,8), %xmm0
movaps %xmm0, -0x20(%rbp)
movups 0x8(%rdi,%r8,8), %xmm0
movaps %xmm0, -0x30(%rbp)
movq %rdx, %r8
movq %rcx, %rdi
movq 0x48(%rax), %r9
cmpq %rsi, (%r9,%r8)
jb 0x49762
leaq (%r9,%r8), %r10
addq $0x28, %r10
addq %r8, %r9
movq 0x20(%r9), %r11
movq %r11, 0x20(%r10)
movups (%r9), %xmm0
movups 0x10(%r9), %xmm1
movups %xmm1, 0x10(%r10)
movups %xmm0, (%r10)
addq $-0x28, %r8
decq %rdi
jne 0x49728
xorl %edi, %edi
movq 0x48(%rax), %r8
leaq (%rdi,%rdi,4), %rdi
movq %rsi, (%r8,%rdi,8)
movaps -0x30(%rbp), %xmm0
movaps -0x20(%rbp), %xmm1
movups %xmm0, 0x8(%r8,%rdi,8)
movups %xmm1, 0x18(%r8,%rdi,8)
incq %rcx
addq $0x28, %rdx
cmpq 0x58(%rax), %rcx
jb 0x49702
movl $0x0, 0x60(%rax)
movq 0x58(%rax), %rdx
testq %rdx, %rdx
setne %sil
je 0x497d7
movq 0x48(%rax), %rcx
cmpq %rbx, (%rcx)
je 0x497db
leaq -0x1(%rdx), %rdi
xorl %esi, %esi
cmpq %rsi, %rdi
je 0x497d9
leaq 0x28(%rcx), %r8
incq %rsi
cmpq %rbx, 0x28(%rcx)
movq %r8, %rcx
jne 0x497b6
cmpq %rdx, %rsi
setb %sil
movq %r8, %rcx
jmp 0x497db
jmp 0x497db
xorl %esi, %esi
testb %sil, %sil
jne 0x4983b
movq 0x48(%rax), %rsi
leaq (%rdx,%rdx,4), %rax
leaq (%rsi,%rax,8), %rdi
movabsq $0x6666666666666667, %r8 # imm = 0x6666666666666667
cmpq %rdi, %rsi
jae 0x49839
movq %rdi, %rax
subq %rsi, %rax
imulq %r8
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x5, %rdx
addq %rax, %rdx
leaq (%rdx,%rdx,4), %rax
leaq (%rsi,%rax,8), %rdx
cmpq %rbx, (%rdx)
movq %rdi, %r9
cmovaq %rdx, %r9
leaq 0x28(%rsi,%rax,8), %rax
cmovbq %rax, %rsi
cmovneq %r9, %rdi
cmoveq %rdx, %rcx
jne 0x497f6
jmp 0x4983b
xorl %ecx, %ecx
movq %rcx, %rax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/util.c
// Function: janet_cfuns
void janet_cfuns(JanetTable *env, const char *regprefix, const JanetReg *cfuns) {
    while (cfuns->name) {
        Janet fun = janet_wrap_cfunction(cfuns->cfun);
        if (env) janet_def(env, cfuns->name, fun, cfuns->documentation);
        janet_registry_put(cfuns->cfun, cfuns->name, regprefix, NULL, 0);
        cfuns++;
    }
}

// Assembly:
cmpq $0x0, (%rdx)
je 0x498b9
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movabsq $-0x1800000000000, %r12 # imm = 0xFFFE800000000000
movq 0x8(%r14), %rdi
movq %r12, %rsi
callq 0x4f9f2
testq %r15, %r15
je 0x49892
movq (%r14), %rsi
movq 0x10(%r14), %rcx
movq %r15, %rdi
movq %rax, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x49301
movq (%r14), %rsi
movq 0x8(%r14), %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x495fe
cmpq $0x0, 0x18(%r14)
leaq 0x18(%r14), %r14
jne 0x49869
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/util.c
// Function: janet_cfuns_ext
void janet_cfuns_ext(JanetTable *env, const char *regprefix, const JanetRegExt *cfuns) {
    while (cfuns->name) {
        Janet fun = janet_wrap_cfunction(cfuns->cfun);
        if (env) janet_def_sm(env, 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++;
    }
}

// Assembly:
cmpq $0x0, (%rdx)
je 0x49933
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movabsq $-0x1800000000000, %r12 # imm = 0xFFFE800000000000
movq 0x8(%r14), %rdi
movq %r12, %rsi
callq 0x4f9f2
testq %r15, %r15
je 0x49909
movq (%r14), %rsi
movq 0x10(%r14), %rcx
movq 0x18(%r14), %r8
movl 0x20(%r14), %r9d
movq %r15, %rdi
movq %rax, %rdx
callq 0x49301
movq (%r14), %rsi
movq 0x8(%r14), %rdi
movq 0x18(%r14), %rcx
movl 0x20(%r14), %r8d
movq %rbx, %rdx
callq 0x495fe
cmpq $0x0, 0x28(%r14)
leaq 0x28(%r14), %r14
jne 0x498de
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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, %r15
movq %rsi, %r14
movq %rdi, %rbx
testq %rdi, %rdi
je 0x4995f
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x499f1
cmpq $0x0, (%r15)
je 0x499c6
movabsq $-0x1800000000000, %r12 # imm = 0xFFFE800000000000
movq 0x8(%r15), %rdi
movq %r12, %rsi
callq 0x4f9f2
testq %rbx, %rbx
je 0x499a7
movq %rax, %r13
movq (%r15), %rsi
leaq -0x38(%rbp), %rdi
callq 0x49a4a
movq 0x10(%r15), %rcx
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x49301
movq (%r15), %rsi
movq 0x8(%r15), %rdi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x495fe
cmpq $0x0, 0x18(%r15)
leaq 0x18(%r15), %r15
jne 0x4996f
testq %rbx, %rbx
je 0x499e2
movq -0x38(%rbp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2c187
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/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 0x2bfe0
movq %rax, (%rbx)
testq %rax, %rax
je 0x49a45
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x12680
movq (%rbx), %rax
movb $0x2f, (%rax,%r15)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x141e4
// File: /workspace/github_c_makefile_star2_O1/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 0x2c0cf
movq %rax, (%rbx)
testq %rax, %rax
je 0x49ab2
movq 0x8(%rbx), %rcx
leaq (%rax,%rcx), %rdi
incq %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x12680
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
callq 0x14214
// File: /workspace/github_c_makefile_star2_O1/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, %r15
movq %rsi, %r14
movq %rdi, %rbx
testq %rdi, %rdi
je 0x49ae2
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x499f1
cmpq $0x0, (%r15)
je 0x49b4e
movabsq $-0x1800000000000, %r12 # imm = 0xFFFE800000000000
movq 0x8(%r15), %rdi
movq %r12, %rsi
callq 0x4f9f2
testq %rbx, %rbx
je 0x49b2c
movq %rax, %r13
movq (%r15), %rsi
leaq -0x38(%rbp), %rdi
callq 0x49a4a
movq 0x10(%r15), %rcx
movq 0x18(%r15), %r8
movl 0x20(%r15), %r9d
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x49301
movq (%r15), %rsi
movq 0x8(%r15), %rdi
movq 0x18(%r15), %rcx
movl 0x20(%r15), %r8d
movq %r14, %rdx
callq 0x495fe
cmpq $0x0, 0x28(%r15)
leaq 0x28(%r15), %r15
jne 0x49af2
testq %rbx, %rbx
je 0x49b6a
movq -0x38(%rbp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2c187
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/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 0x47cd3
movabsq $-0x5800000000000, %rsi # imm = 0xFFFA800000000000
movq %rax, %rdi
callq 0x4f9ad
movq %rax, %r14
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq %rax, %r15
movq 0x68(%rax), %rdi
movq %r14, %rsi
callq 0x47f51
movq %rax, %rcx
shrq $0x2f, %rcx
cmpl $0x1fff1, %ecx          # imm = 0x1FFF1
je 0x49bf8
movq %rax, %rdi
callq 0x4f838
cmpq %rbx, %rax
jne 0x49c26
movabsq $-0x800000000000, %rsi  # imm = 0xFFFF800000000000
movq 0x68(%r15), %r15
movq %rbx, %rdi
callq 0x4f9f2
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x481b3
movq (%rbx), %rsi
leaq 0x22a37(%rip), %rdi     # 0x6c667
xorl %eax, %eax
callq 0x1917b
// File: /workspace/github_c_makefile_star2_O1/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 0x47f51
movq %rax, %rcx
shrq $0x2f, %rcx
cmpl $0x1fff1, %ecx          # imm = 0x1FFF1
jne 0x49c74
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4f838
// File: /workspace/github_c_makefile_star2_O1/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
movq %rdi, %rbx
xorl %ecx, %ecx
movl $0x0, %r15d
testq %r14, %r14
je 0x49ff8
movl 0x10(%r14), %r15d
movsd (%rbx), %xmm0
ucomisd %xmm0, %xmm0
jp 0x4a10f
movl %ecx, %eax
andl $-0x2, %eax
cmpl $0xc, %eax
jne 0x4a09f
movq %rbx, -0x48(%rbp)
movq %rcx, -0x50(%rbp)
leal 0x1(%r15), %edi
movl %edi, -0x2c(%rbp)
movl %edx, %r13d
movq %rsi, %rbx
callq 0x48a50
movq %rax, %r12
movq %rbx, %rdi
movl %r13d, %esi
callq 0x45094
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
movq %rax, %rdi
callq 0x4f9ad
movq %rax, (%r12)
testl %r15d, %r15d
jle 0x4a075
movl %r15d, %eax
xorl %ecx, %ecx
movq 0x18(%r14), %rdx
movq (%rdx,%rcx,8), %rdx
movq %rdx, 0x8(%r12,%rcx,8)
leaq 0x1(%rcx), %rdx
movq %rdx, %rcx
cmpq %rdx, %rax
jne 0x4a05c
movq %r12, %rdi
callq 0x48a81
movq -0x48(%rbp), %rax
movq (%rax), %rdi
callq 0x4f838
cmpl $0xc, -0x50(%rbp)
jne 0x4a0f4
movq %rax, %rdi
movl -0x2c(%rbp), %esi
movq %r12, %rdx
callq 0x4c2d6
jmp 0x4a0fc
leaq -0x38(%rbp), %rdx
movq (%rbx), %rdi
leaq -0x40(%rbp), %rsi
callq 0x4a2c1
testl %eax, %eax
jne 0x4a0de
movq (%rbx), %rdi
callq 0x3f44a
movq %rax, %r14
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
movq %rax, %rdi
callq 0x4f9ad
movq %rax, (%rbx)
movq %r14, -0x40(%rbp)
movl -0x8(%r14), %eax
movl %eax, -0x38(%rbp)
movq -0x40(%rbp), %rax
movl -0x38(%rbp), %edx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl -0x2c(%rbp), %edi
movq %r12, %rsi
callq *%rax
movq %rax, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4a11e
movq (%rbx), %rcx
shrq $0x2f, %rcx
andl $0xf, %ecx
jmp 0x4a006
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq -0x10(%rbp), %rdx
leaq -0x18(%rbp), %rsi
callq 0x4a2c1
testl %eax, %eax
jne 0x4a14d
movq %rbx, %rdi
callq 0x3f44a
movq %rax, -0x18(%rbp)
movl -0x8(%rax), %eax
movl %eax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movl -0x10(%rbp), %edx
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4a15b
movl (%r15), %r14d
movl %r14d, %ecx
andl $-0x2, %ecx
movq 0x8(%r15), %rax
cmpl $0x4, %ecx
jne 0x4a1dc
movq %rax, %rdi
callq 0x4f838
movq %rax, %rdi
callq 0x14936
movq %rax, (%rbx)
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1feb8
movq %rax, %r14
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x4f95a
leaq -0x20(%rbp), %r15
movq %rax, (%r15)
movq %rbx, %rdi
callq 0x47cd3
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x4a198
movq (%r15), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/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 0x4a293
xorl %eax, %eax
movabsq $-0x4800000000000, %rdx # imm = 0xFFFB800000000000
cmpq %rdx, %rcx
jne 0x4a2b8
movq %r14, %rdi
callq 0x4f838
movq 0x18(%rax), %rax
movl $0x10, %r12d
jmp 0x4a2a2
movq %r14, %rdi
callq 0x4f838
movq $-0x10, %r12
movq %rax, (%r15)
movq %r14, %rdi
callq 0x4f838
movl (%rax,%r12), %eax
movl %eax, (%rbx)
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4a31c
movq %r15, %rdi
callq 0x4f838
movq %rax, (%r14)
movq %r15, %rdi
callq 0x4f838
movl -0x8(%rax), %edx
jmp 0x4a363
cmpl $0xe, %eax
je 0x4a342
cmpl $0xb, %eax
jne 0x4a36b
movq %r15, %rdi
callq 0x4f838
movq 0x18(%rax), %rax
movq %rax, (%r14)
movq %r15, %rdi
callq 0x4f838
movl 0x10(%rax), %edx
jmp 0x4a363
movq %r15, %rdi
callq 0x4f838
movq -0x10(%rax), %rcx
movq 0x68(%rcx), %rcx
testq %rcx, %rcx
je 0x4a36b
movq -0x8(%rax), %rsi
movq %rax, %rdi
callq *%rcx
movq %rax, (%r14)
movl %edx, (%rbx)
movl $0x1, %r12d
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
movabsq $-0x800000000000, %rcx  # imm = 0xFFFF800000000000
andq %rdi, %rcx
movabsq $-0x3000000000000, %rax # imm = 0xFFFD000000000000
cmpq %rax, %rcx
je 0x4a3df
xorl %eax, %eax
movabsq $-0x3800000000000, %rdx # imm = 0xFFFC800000000000
cmpq %rdx, %rcx
jne 0x4a416
movq %r15, %rdi
callq 0x4f838
movq 0x20(%rax), %rax
movq %rax, (%r12)
movq %r15, %rdi
callq 0x4f838
addq $0x14, %rax
movl $0x10, %r12d
jmp 0x4a3fe
movq %r15, %rdi
callq 0x4f838
movq %rax, (%r12)
movq %r15, %rdi
callq 0x4f838
addq $-0x10, %rax
movq $-0x18, %r12
movl (%rax), %eax
movl %eax, (%r14)
movq %r15, %rdi
callq 0x4f838
movl (%rax,%r12), %eax
movl %eax, (%rbx)
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1feb8
movq %rax, %r14
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x4f95a
leaq -0x20(%rbp), %r15
movq %rax, (%r15)
movq %rbx, %rdi
callq 0x47cd3
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x4a198
testl %eax, %eax
je 0x4a78f
movq -0x20(%rbp), %rdi
movq %rdi, %rax
shrq $0x2f, %rax
cmpl $0x1fff9, %eax          # imm = 0x1FFF9
jne 0x4a78f
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4f838
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/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 $0x28, %rsp
movq %rdx, -0x38(%rbp)
movq %rdi, %r14
testl %esi, %esi
jle 0x4a7ec
movl %esi, %eax
xorl %ecx, %ecx
movq %r14, %rdx
xorl %r8d, %r8d
movq -0x38(%rbp), %rdi
movq (%rdx), %rsi
shrq $0x2f, %rsi
cmpl $0x1fff1, %esi          # imm = 0x1FFF1
je 0x4a7de
movslq %r8d, %rsi
incl %r8d
movl %ecx, (%rdi,%rsi,4)
incq %rcx
addq $0x10, %rdx
cmpq %rcx, %rax
jne 0x4a7c6
jmp 0x4a7ef
xorl %r8d, %r8d
movl %r8d, -0x2c(%rbp)
cmpl $0x2, %r8d
jl 0x4a87d
movl -0x2c(%rbp), %eax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
leaq 0x4(%rax), %r13
movl $0x1, %r15d
movq -0x38(%rbp), %rax
movslq (%rax,%r15,4), %rbx
movq %rbx, %rax
shlq $0x4, %rax
movq (%r14,%rax), %r12
movq %r13, -0x50(%rbp)
movq %r15, -0x48(%rbp)
testq %r15, %r15
jle 0x4a868
movslq -0x4(%r13), %rax
movl %eax, (%r13)
shlq $0x4, %rax
movq (%r14,%rax), %rsi
movq %r12, %rdi
callq 0x4b30c
movq %r13, %rcx
testl %eax, %eax
jns 0x4a85b
movq -0x38(%rbp), %rcx
cmpq $0x1, %r15
jne 0x4a85d
movl %ebx, (%rcx)
addq $-0x4, %r13
decq %r15
testl %eax, %eax
js 0x4a82d
movq -0x48(%rbp), %r15
incq %r15
movq -0x50(%rbp), %r13
addq $0x4, %r13
cmpq -0x40(%rbp), %r15
jne 0x4a812
movl -0x2c(%rbp), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/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 %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x21db9(%rip), %r12     # 0x6c6b0
movq %r12, %rdi
movl $0x80000, %esi          # imm = 0x80000
xorl %eax, %eax
callq 0x12900
testl %eax, %eax
jns 0x4a916
callq 0x12120
cmpl $0x4, (%rax)
je 0x4a8f7
jmp 0x4a963
movl %eax, %ebx
testq %r14, %r14
je 0x4a975
movl %ebx, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x12520
movq %rax, %r12
testq %rax, %rax
jns 0x4a93c
callq 0x12120
cmpl $0x4, (%rax)
je 0x4a91d
testq %r12, %r12
jle 0x4a949
addq %r12, %r15
subq %r12, %r14
jmp 0x4a95e
movl %ebx, %edi
callq 0x12460
testl %eax, %eax
jns 0x4a95e
callq 0x12120
cmpl $0x4, (%rax)
je 0x4a949
testq %r12, %r12
jg 0x4a918
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
movl %ebx, %edi
callq 0x12460
testl %eax, %eax
jns 0x4a969
callq 0x12120
cmpl $0x4, (%rax)
je 0x4a978
jmp 0x4a969
// File: /workspace/github_c_makefile_star2_O1/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
cmpb $0x2e, (%rdi)
je 0x4a9e6
movl $0x1, %r14d
movzbl -0x1(%rbx,%r14), %eax
testl %eax, %eax
je 0x4a9bb
cmpl $0x2f, %eax
je 0x4a9e6
incq %r14
jmp 0x4a9a7
leaq 0x2(%r14), %rdi
callq 0x12770
testq %rax, %rax
je 0x4a9f4
movq %rax, %r15
movw $0x2f2e, (%rax)         # imm = 0x2F2E
movq %rax, %rdi
addq $0x2, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x12680
movq %r15, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x14244
// File: /workspace/github_c_makefile_star2_O1/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 0x4af52
movq 0x108(%r12), %rax
leaq 0x18(%rax), %rcx
cmpq 0x110(%r12), %rcx
jb 0x4afbc
movl %ebx, -0x2c(%rbp)
subq %rdi, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r13
jmp 0x4af58
movl %ebx, -0x2c(%rbp)
xorl %r13d, %r13d
leaq (,%r13,2), %rax
leaq 0x1(,%r13,2), %rbx
movl $0x80, %ecx
cmpq %rcx, %rax
cmovbq %rcx, %rbx
leaq (,%rbx,8), %rax
leaq (%rax,%rax,2), %rsi
callq 0x12850
testq %rax, %rax
je 0x4aff1
movq %rax, 0x118(%r12)
leaq (%rbx,%rbx,2), %rcx
leaq (%rax,%rcx,8), %rcx
movq %rcx, 0x110(%r12)
leaq (,%r13,2), %rcx
addq %r13, %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, 0x108(%r12)
movl -0x2c(%rbp), %ebx
movq 0x108(%r12), %rax
leaq 0x18(%rax), %rcx
movq %rcx, 0x108(%r12)
movq %r15, 0x18(%rax)
movq %r14, 0x20(%rax)
movl $0x0, 0x28(%rax)
movl %ebx, 0x2c(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x14274
// File: /workspace/github_c_makefile_star2_O1/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 0x4a41f
testl %eax, %eax
je 0x4b810
movq %rbx, %xmm0
cvttsd2si %xmm0, %eax
testl %eax, %eax
js 0x4b810
cmpl %r14d, %eax
jge 0x4b810
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %r15d, %eax
leaq 0x39bf6(%rip), %rcx     # 0x85410
movq (%rcx,%rax,8), %rsi
leaq 0x211eb(%rip), %rdi     # 0x6ca10
movl %r14d, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1917b