LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/table.c
// Function: janet_table_init_impl
static JanetTable *janet_table_init_impl(JanetTable *table, int32_t capacity, int stackalloc) {
    JanetKV *data;
    capacity = janet_tablen(capacity);
    if (stackalloc) table->gc.flags = JANET_TABLE_FLAG_STACK;
    if (capacity) {
        if (stackalloc) {
            data = janet_memalloc_empty_local(capacity);
        } else {
            data = (JanetKV *) janet_memalloc_empty(capacity);
            if (NULL == data) {
                JANET_OUT_OF_MEMORY;
            }
        }
        table->data = data;
        table->capacity = capacity;
    } else {
        table->data = NULL;
        table->capacity = 0;
    }
    table->count = 0;
    table->deleted = 0;
    table->proto = NULL;
    return table;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rdi, %rbx
movl %esi, %edi
callq 0x48535
movl %eax, %r14d
testl %r15d, %r15d
je 0x473c0
movl $0x10000, (%rbx)        # imm = 0x10000
testl %r14d, %r14d
je 0x473d7
movl %r14d, %edi
callq 0x47f37
jmp 0x473dc
testl %r14d, %r14d
je 0x473d7
movl %r14d, %edi
callq 0x4ee65
testq %rax, %rax
jne 0x473dc
callq 0x14118
xorl %eax, %eax
xorl %r14d, %r14d
movq %rax, 0x20(%rbx)
movl %r14d, 0x14(%rbx)
xorl %eax, %eax
movl %eax, 0x10(%rbx)
movl %eax, 0x18(%rbx)
movq $0x0, 0x28(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/table.c
// Function: janet_table_deinit
void janet_table_deinit(JanetTable *table) {
    if (table->gc.flags & JANET_TABLE_FLAG_STACK) {
        janet_sfree(table->data);
    } else {
        janet_free(table->data);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testb $0x1, 0x2(%rdi)
movq 0x20(%rdi), %rdi
jne 0x4741f
popq %rbp
jmp 0x120b0
popq %rbp
jmp 0x2bcd9
// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/table.c
// Function: janet_table_get
Janet janet_table_get(JanetTable *t, Janet key) {
    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
        JanetKV *bucket = janet_table_find(t, key);
        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
            return bucket->value;
    }
    return janet_wrap_nil();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movabsq $-0x7800000000000, %rbx # imm = 0xFFF8800000000000
testq %rdi, %rdi
je 0x47548
movq %rsi, %r14
movq %rdi, %r15
movl $0xffffff39, %r13d      # imm = 0xFFFFFF39
movabsq $-0x800000000000, %r12  # imm = 0xFFFF800000000000
movq 0x20(%r15), %rdi
movl 0x14(%r15), %esi
movq %r14, %rdx
callq 0x48578
testq %rax, %rax
je 0x47533
movq (%rax), %rcx
andq %r12, %rcx
cmpq %rbx, %rcx
jne 0x47561
movq 0x28(%r15), %r15
testq %r15, %r15
je 0x47548
leal 0x1(%r13), %eax
testl %r13d, %r13d
movl %eax, %r13d
jne 0x47513
incq %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4ece6
movq 0x8(%rax), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/table.c
// Function: janet_table_get_ex
Janet janet_table_get_ex(JanetTable *t, Janet key, JanetTable **which) {
    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
        JanetKV *bucket = janet_table_find(t, key);
        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
            *which = t;
            return bucket->value;
        }
    }
    return janet_wrap_nil();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, -0x30(%rbp)
movabsq $-0x7800000000000, %r14 # imm = 0xFFF8800000000000
testq %rdi, %rdi
je 0x475dc
movq %rsi, %r12
movq %rdi, %r15
movl $0xffffff39, %ebx       # imm = 0xFFFFFF39
movabsq $-0x800000000000, %r13  # imm = 0xFFFF800000000000
movq 0x20(%r15), %rdi
movl 0x14(%r15), %esi
movq %r12, %rdx
callq 0x48578
testq %rax, %rax
je 0x475ca
movq (%rax), %rcx
andq %r13, %rcx
cmpq %r14, %rcx
jne 0x475f5
movq 0x28(%r15), %r15
testq %r15, %r15
je 0x475dc
leal 0x1(%rbx), %eax
testl %ebx, %ebx
movl %eax, %ebx
jne 0x475aa
incq %r14
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4ece6
movq -0x30(%rbp), %rcx
movq %r15, (%rcx)
movq 0x8(%rax), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/table.c
// Function: janet_table_rawget
Janet janet_table_rawget(JanetTable *t, Janet key) {
    JanetKV *bucket = janet_table_find(t, key);
    if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
        return bucket->value;
    else
        return janet_wrap_nil();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rdx
movabsq $-0x7800000000000, %rbx # imm = 0xFFF8800000000000
movq 0x20(%rdi), %rax
movl 0x14(%rdi), %esi
movq %rax, %rdi
callq 0x48578
testq %rax, %rax
je 0x47648
movabsq $-0x800000000000, %rcx  # imm = 0xFFFF800000000000
andq (%rax), %rcx
cmpq %rbx, %rcx
jne 0x47659
incq %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4ece6
movq 0x8(%rax), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/table.c
// Function: janet_table_remove
Janet janet_table_remove(JanetTable *t, Janet key) {
    JanetKV *bucket = janet_table_find(t, key);
    if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
        Janet ret = bucket->value;
        t->count--;
        t->deleted++;
        bucket->key = janet_wrap_nil();
        bucket->value = janet_wrap_false();
        return ret;
    } else {
        return janet_wrap_nil();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rdx
movq %rdi, %r15
movabsq $-0x77fffffffffff, %r14 # imm = 0xFFF8800000000001
movq 0x20(%rdi), %rdi
movl 0x14(%r15), %esi
callq 0x48578
testq %rax, %rax
je 0x476aa
movq %rax, %rbx
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq (%rbx), %rax
leaq -0x1(%r14), %rcx
cmpq %rcx, %rax
jne 0x476ba
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4ece6
movq 0x8(%rbx), %r12
decl 0x10(%r15)
incl 0x18(%r15)
movq %r14, %rdi
callq 0x4ece6
movq %rax, (%rbx)
movabsq $-0x7000000000000, %rdi # imm = 0xFFF9000000000000
callq 0x4ece6
movq %rax, 0x8(%rbx)
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/table.c
// Function: janet_table_put
void janet_table_put(JanetTable *t, Janet key, Janet value) {
    if (janet_checktype(key, JANET_NIL)) return;
    if (janet_checktype(key, JANET_NUMBER) && isnan(janet_unwrap_number(key))) return;
    if (janet_checktype(value, JANET_NIL)) {
        janet_table_remove(t, key);
    } else {
        JanetKV *bucket = janet_table_find(t, key);
        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
            bucket->value = value;
        } else {
            if (NULL == bucket || 2 * (t->count + t->deleted + 1) > t->capacity) {
                janet_table_rehash(t, janet_tablen(2 * t->count + 2));
            }
            bucket = janet_table_find(t, key);
            if (janet_checktype(bucket->value, JANET_BOOLEAN))
                --t->deleted;
            bucket->key = key;
            bucket->value = value;
            ++t->count;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rax
shrq $0x2f, %rax
cmpl $0x1fff1, %eax          # imm = 0x1FFF1
je 0x47802
movq %rsi, %r15
movq %rsi, %xmm0
ucomisd %xmm0, %xmm0
setp %al
movabsq $0x7800000000000, %rcx  # imm = 0x7800000000000
testq %rcx, %rsi
sete %cl
testb %cl, %al
jne 0x47802
movq %rdx, %rbx
movq %rdi, %r14
movabsq $-0x800000000000, %r12  # imm = 0xFFFF800000000000
movabsq $-0x7800000000000, %r13 # imm = 0xFFF8800000000000
movq %rdx, %rax
andq %r12, %rax
cmpq %r13, %rax
jne 0x47775
movq %r14, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x47664
movq 0x20(%r14), %rdi
movl 0x14(%r14), %esi
movq %r15, %rdx
callq 0x48578
testq %rax, %rax
je 0x477b0
movq (%rax), %rcx
andq %r12, %rcx
cmpq %r13, %rcx
jne 0x477fe
movl 0x10(%r14), %eax
movl 0x14(%r14), %esi
movl 0x18(%r14), %ecx
addl %eax, %ecx
leal 0x2(,%rcx,2), %ecx
cmpl %esi, %ecx
jg 0x477b4
jmp 0x477ce
movl 0x10(%r14), %eax
leal 0x2(,%rax,2), %edi
callq 0x48535
movq %r14, %rdi
movl %eax, %esi
callq 0x47811
movl 0x14(%r14), %esi
movq 0x20(%r14), %rdi
movq %r15, %rdx
callq 0x48578
andq 0x8(%rax), %r12
movabsq $-0x7000000000000, %rcx # imm = 0xFFF9000000000000
cmpq %rcx, %r12
jne 0x477f1
decl 0x18(%r14)
movq %r15, (%rax)
movq %rbx, 0x8(%rax)
incl 0x10(%r14)
jmp 0x47802
movq %rbx, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/table.c
// Function: janet_table_rehash
static void janet_table_rehash(JanetTable *t, int32_t size) {
    JanetKV *olddata = t->data;
    JanetKV *newdata;
    int islocal = t->gc.flags & JANET_TABLE_FLAG_STACK;
    if (islocal) {
        newdata = (JanetKV *) janet_memalloc_empty_local(size);
    } else {
        newdata = (JanetKV *) janet_memalloc_empty(size);
        if (NULL == newdata) {
            JANET_OUT_OF_MEMORY;
        }
    }
    int32_t oldcapacity = t->capacity;
    t->data = newdata;
    t->capacity = size;
    t->deleted = 0;
    for (int32_t i = 0; i < oldcapacity; i++) {
        JanetKV *kv = olddata + i;
        if (!janet_checktype(kv->key, JANET_NIL)) {
            JanetKV *newkv = janet_table_find(t, kv->key);
            *newkv = *kv;
        }
    }
    if (islocal) {
        janet_sfree(olddata);
    } else {
        janet_free(olddata);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %r14
movq 0x20(%rdi), %rbx
movl (%rdi), %eax
btl $0x10, %eax
movl %eax, -0x2c(%rbp)
movl %esi, %edi
jb 0x47845
callq 0x4ee65
testq %rax, %rax
jne 0x4784a
callq 0x14146
callq 0x47f37
movslq 0x14(%r14), %r13
movq %rax, 0x20(%r14)
movl %r15d, 0x14(%r14)
movl $0x0, 0x18(%r14)
testq %r13, %r13
jle 0x4789e
shlq $0x4, %r13
xorl %r15d, %r15d
movq (%rbx,%r15), %rdx
movq %rdx, %rax
shrq $0x2f, %rax
cmpl $0x1fff1, %eax          # imm = 0x1FFF1
je 0x47895
leaq (%rbx,%r15), %r12
movq 0x20(%r14), %rdi
movl 0x14(%r14), %esi
callq 0x48578
movups (%r12), %xmm0
movups %xmm0, (%rax)
addq $0x10, %r15
cmpq %r15, %r13
jne 0x4786a
btl $0x10, -0x2c(%rbp)
jb 0x478bb
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x120b0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2bcd9
// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/table.c
// Function: janet_table_clear
void janet_table_clear(JanetTable *t) {
    int32_t capacity = t->capacity;
    JanetKV *data = t->data;
    janet_memempty(data, capacity);
    t->count = 0;
    t->deleted = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x14(%rdi), %esi
movq 0x20(%rdi), %rdi
callq 0x4eedd
xorl %eax, %eax
movl %eax, 0x10(%rbx)
movl %eax, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/table.c
// Function: janet_table_clone
JanetTable *janet_table_clone(JanetTable *table) {
    JanetTable *newTable = janet_gcalloc(JANET_MEMORY_TABLE, sizeof(JanetTable));
    newTable->count = table->count;
    newTable->capacity = table->capacity;
    newTable->deleted = table->deleted;
    newTable->proto = table->proto;
    newTable->data = janet_malloc(newTable->capacity * sizeof(JanetKV));
    if (NULL == newTable->data) {
        JANET_OUT_OF_MEMORY;
    }
    memcpy(newTable->data, table->data, (size_t) table->capacity * sizeof(JanetKV));
    return newTable;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x30, %esi
movl $0x5, %edi
callq 0x2b686
movq %rax, %r14
movl 0x10(%rbx), %eax
movl %eax, 0x10(%r14)
movslq 0x14(%rbx), %r15
movl %r15d, 0x14(%r14)
movl 0x18(%rbx), %eax
movl %eax, 0x18(%r14)
movq 0x28(%rbx), %rax
movq %rax, 0x28(%r14)
shlq $0x4, %r15
movq %r15, %rdi
callq 0x12760
movq %rax, 0x20(%r14)
testq %rax, %rax
je 0x47964
movq 0x20(%rbx), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x12670
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x14174
// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/table.c
// Function: janet_table_mergekv
static void janet_table_mergekv(JanetTable *table, const JanetKV *kvs, int32_t cap) {
    int32_t i;
    for (i = 0; i < cap; i++) {
        const JanetKV *kv = kvs + i;
        if (!janet_checktype(kv->key, JANET_NIL)) {
            janet_table_put(table, kv->key, kv->value);
        }
    }
}

// Assembly:
testl %edx, %edx
jle 0x479c9
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r15d
shlq $0x4, %r15
xorl %r12d, %r12d
movq (%rbx,%r12), %rsi
movq %rsi, %rax
shrq $0x2f, %rax
cmpl $0x1fff1, %eax          # imm = 0x1FFF1
je 0x479b8
movq 0x8(%rbx,%r12), %rdx
movq %r14, %rdi
callq 0x476f0
addq $0x10, %r12
cmpq %r12, %r15
jne 0x47999
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/table.c
// Function: janet_table_to_struct
const JanetKV *janet_table_to_struct(JanetTable *t) {
    JanetKV *st = janet_struct_begin(t->count);
    JanetKV *kv = t->data;
    JanetKV *end = t->data + t->capacity;
    while (kv < end) {
        if (!janet_checktype(kv->key, JANET_NIL))
            janet_struct_put(st, kv->key, kv->value);
        kv++;
    }
    return janet_struct_end(st);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x10(%rdi), %edi
callq 0x46574
movq %rax, %rbx
movslq 0x14(%r14), %r15
testq %r15, %r15
jle 0x47a26
movq 0x20(%r14), %r14
shlq $0x4, %r15
addq %r14, %r15
movq (%r14), %rsi
movq %rsi, %rax
shrq $0x2f, %rax
cmpl $0x1fff1, %eax          # imm = 0x1FFF1
je 0x47a1d
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x468b5
addq $0x10, %r14
cmpq %r15, %r14
jb 0x47a00
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x468c4
// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/table.c
// Function: janet_table_proto_flatten
JanetTable *janet_table_proto_flatten(JanetTable *t) {
    JanetTable *newTable = janet_table(0);
    while (t) {
        JanetKV *kv = t->data;
        JanetKV *end = t->data + t->capacity;
        while (kv < end) {
            if (!janet_checktype(kv->key, JANET_NIL))
                janet_table_put_no_overwrite(newTable, kv->key, kv->value);
            kv++;
        }
        t = t->proto;
    }
    return newTable;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x30, %esi
movl $0x5, %edi
callq 0x2b686
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4738c
testq %rbx, %rbx
je 0x47b88
movabsq $-0x800000000000, %rdx  # imm = 0xFFFF800000000000
movabsq $-0x7800000000000, %rcx # imm = 0xFFF8800000000000
movq %rbx, -0x30(%rbp)
movslq 0x14(%rbx), %rax
testq %rax, %rax
jle 0x47b77
movq %rax, %rsi
movq -0x30(%rbp), %rax
movq 0x20(%rax), %r13
shlq $0x4, %rsi
addq %r13, %rsi
movq %rsi, -0x40(%rbp)
movq (%r13), %r15
movq %r15, %rax
andq %rdx, %rax
cmpq %rcx, %rax
je 0x47b69
movq %rcx, %rbx
movq %rdx, %r12
movq 0x8(%r13), %rax
movq %rax, -0x38(%rbp)
movq 0x20(%r14), %rdi
movl 0x14(%r14), %esi
movq %r15, %rdx
callq 0x48578
testq %rax, %rax
je 0x47b10
movq (%rax), %rax
movq %r12, %rdx
andq %r12, %rax
movq %rbx, %rcx
cmpq %rbx, %rax
jne 0x47b69
movl 0x10(%r14), %eax
movl 0x14(%r14), %esi
movl 0x18(%r14), %ecx
addl %eax, %ecx
leal 0x2(,%rcx,2), %ecx
cmpl %esi, %ecx
jg 0x47b14
jmp 0x47b2e
movl 0x10(%r14), %eax
leal 0x2(,%rax,2), %edi
callq 0x48535
movq %r14, %rdi
movl %eax, %esi
callq 0x47811
movl 0x14(%r14), %esi
movq 0x20(%r14), %rdi
movq %r15, %rdx
callq 0x48578
movq 0x8(%rax), %rcx
movq %r12, %rdx
andq %r12, %rcx
movabsq $-0x7000000000000, %rsi # imm = 0xFFF9000000000000
cmpq %rsi, %rcx
jne 0x47b57
decl 0x18(%r14)
movq %r15, (%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rax)
incl 0x10(%r14)
movq %rbx, %rcx
addq $0x10, %r13
cmpq -0x40(%rbp), %r13
jb 0x47aae
movq -0x30(%rbp), %rbx
movq 0x28(%rbx), %rbx
testq %rbx, %rbx
jne 0x47a87
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/table.c
// Function: janet_memalloc_empty_local
static void *janet_memalloc_empty_local(int32_t count) {
    int32_t i;
    void *mem = janet_smalloc((size_t) count * sizeof(JanetKV));
    JanetKV *mmem = (JanetKV *)mem;
    for (i = 0; i < count; i++) {
        JanetKV *kv = mmem + i;
        kv->key = janet_wrap_nil();
        kv->value = janet_wrap_nil();
    }
    return mem;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %r15d
movslq %edi, %r14
movq %r14, %rdi
shlq $0x4, %rdi
callq 0x2bb46
movq %rax, %rbx
testl %r14d, %r14d
jle 0x47f92
movabsq $-0x77fffffffffff, %r14 # imm = 0xFFF8800000000001
movl %r15d, %r15d
shlq $0x4, %r15
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x4ece6
movq %rax, (%rbx,%r12)
movq %r14, %rdi
callq 0x4ece6
movq %rax, 0x8(%rbx,%r12)
addq $0x10, %r12
cmpq %r12, %r15
jne 0x47f70
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/tuple.c
// Function: janet_tuple_begin
Janet *janet_tuple_begin(int32_t length) {
    size_t size = sizeof(JanetTupleHead) + ((size_t) length * sizeof(Janet));
    JanetTupleHead *head = janet_gcalloc(JANET_MEMORY_TUPLE, size);
    head->sm_line = -1;
    head->sm_column = -1;
    head->length = length;
    return (Janet *)(head->data);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movslq %edi, %rbx
leaq 0x20(,%rbx,8), %rsi
movl $0x4, %edi
callq 0x2b686
movq $-0x1, 0x18(%rax)
movl %ebx, 0x10(%rax)
addq $0x20, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/util.c
// Function: janet_string_calchash
int32_t janet_string_calchash(const uint8_t *str, int32_t len) {
    if (NULL == str || len == 0) return 5381;
    const uint8_t *end = str + len;
    uint32_t hash = 5381;
    while (str < end)
        hash = (hash << 5) + hash + *str++;
    hash = janet_hash_mix(hash, (uint32_t) len);
    return (int32_t) hash;
}

// Assembly:
testq %rdi, %rdi
sete %al
testl %esi, %esi
sete %cl
orb %al, %cl
movl $0x1505, %eax           # imm = 0x1505
jne 0x48413
testl %esi, %esi
jle 0x483eb
pushq %rbp
movq %rsp, %rbp
movslq %esi, %rax
addq %rdi, %rax
movl $0x1505, %ecx           # imm = 0x1505
movl %ecx, %edx
shll $0x5, %edx
addl %ecx, %edx
movzbl (%rdi), %ecx
incq %rdi
addl %edx, %ecx
cmpq %rax, %rdi
jb 0x483d4
popq %rbp
jmp 0x483f0
movl $0x1505, %ecx           # imm = 0x1505
movl %ecx, %eax
shll $0x6, %eax
addl %eax, %esi
movl %ecx, %eax
shrl $0x2, %eax
movl $0x9e3779b9, %edx       # imm = 0x9E3779B9
addl %edx, %eax
addl %esi, %eax
movl %eax, %esi
shll $0x6, %esi
shrl $0x2, %eax
addl %esi, %eax
addl %edx, %eax
xorl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/util.c
// Function: janet_array_calchash
int32_t janet_array_calchash(const Janet *array, int32_t len) {
    const Janet *end = array + len;
    uint32_t hash = 33;
    while (array < end) {
        hash = janet_hash_mix(hash, janet_hash(*array++));
    }
    return (int32_t) hash;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %esi, %esi
jle 0x4846f
movq %rdi, %rbx
movslq %esi, %rax
leaq (%rdi,%rax,8), %r15
movl $0x21, %r14d
movl $0x9e3779b9, %r12d      # imm = 0x9E3779B9
movq (%rbx), %rdi
addq $0x8, %rbx
callq 0x4a67f
movl %r14d, %ecx
shll $0x6, %ecx
movl %r14d, %edx
shrl $0x2, %edx
addl %ecx, %edx
addl %r12d, %edx
addl %eax, %edx
movl %edx, %eax
shll $0x6, %eax
shrl $0x2, %edx
addl %eax, %edx
addl %r12d, %edx
xorl %edx, %r14d
cmpq %r15, %rbx
jb 0x48439
jmp 0x48475
movl $0x21, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/util.c
// Function: janet_kv_calchash
int32_t janet_kv_calchash(const JanetKV *kvs, int32_t len) {
    const JanetKV *end = kvs + len;
    uint32_t hash = 33;
    while (kvs < end) {
        hash = janet_hash_mix(hash, janet_hash(kvs->key));
        hash = janet_hash_mix(hash, janet_hash(kvs->value));
        kvs++;
    }
    return (int32_t) hash;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %esi, %esi
jle 0x4851d
movq %rdi, %rbx
movslq %esi, %r15
shlq $0x4, %r15
addq %rdi, %r15
movl $0x21, %r14d
movl $0x9e3779b9, %r12d      # imm = 0x9E3779B9
movq (%rbx), %rdi
callq 0x4a67f
movl %r14d, %ecx
shll $0x6, %ecx
movl %r14d, %r13d
shrl $0x2, %r13d
addl %ecx, %r13d
addl %r12d, %r13d
addl %eax, %r13d
movl %r13d, %eax
shll $0x6, %eax
shrl $0x2, %r13d
addl %eax, %r13d
addl %r12d, %r13d
xorl %r14d, %r13d
movq 0x8(%rbx), %rdi
callq 0x4a67f
movl %r13d, %ecx
shll $0x6, %ecx
addl %eax, %ecx
movl %r13d, %r14d
shrl $0x2, %r14d
addl %r12d, %r14d
addl %ecx, %r14d
movl %r14d, %eax
shll $0x6, %eax
shrl $0x2, %r14d
addl %eax, %r14d
addl %r12d, %r14d
xorl %r13d, %r14d
addq $0x10, %rbx
cmpq %r15, %rbx
jb 0x484b0
jmp 0x48523
movl $0x21, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/util.c
// Function: janet_tablen
int32_t janet_tablen(int32_t n) {
    if (n < 0) return 0;
    n |= n >> 1;
    n |= n >> 2;
    n |= n >> 4;
    n |= n >> 8;
    n |= n >> 16;
    return n + 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %edi, %edi
js 0x48563
movl %edi, %eax
shrl %eax
orl %edi, %eax
movl %eax, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x10, %eax
orl %ecx, %eax
incl %eax
jmp 0x48565
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, %r13
movq %rdx, -0x40(%rbp)
movq %rdx, %rdi
callq 0x4a67f
leal -0x1(%r12), %ecx
andl %eax, %ecx
subl %ecx, %r12d
movq %r13, -0x38(%rbp)
movl %ecx, -0x30(%rbp)
jle 0x4860e
movabsq $-0x800000000000, %r15  # imm = 0xFFFF800000000000
movabsq $-0x7800000000000, %r14 # imm = 0xFFF8800000000000
movslq %ecx, %rbx
shlq $0x4, %rbx
addq %r13, %rbx
xorl %r13d, %r13d
movq (%rbx), %rdi
movq %rdi, %rax
andq %r15, %rax
cmpq %r14, %rax
jne 0x485f6
movq 0x8(%rbx), %rax
andq %r15, %rax
cmpq %r14, %rax
je 0x48682
testq %r13, %r13
cmoveq %rbx, %r13
jmp 0x48603
movq -0x40(%rbp), %rsi
callq 0x4a1bd
testl %eax, %eax
jne 0x48682
addq $0x10, %rbx
decl %r12d
jne 0x485cf
jmp 0x48611
xorl %r13d, %r13d
movl -0x30(%rbp), %eax
testl %eax, %eax
jle 0x48697
movabsq $-0x800000000000, %rbx  # imm = 0xFFFF800000000000
movabsq $-0x7800000000000, %rdx # imm = 0xFFF8800000000000
movl %eax, %r14d
xorl %r12d, %r12d
movq -0x38(%rbp), %r15
movq (%r15), %rdi
movq %rdi, %rax
andq %rbx, %rax
cmpq %rdx, %rax
jne 0x48659
movq 0x8(%r15), %rax
andq %rbx, %rax
cmpq %rdx, %rax
je 0x48694
testq %r13, %r13
cmoveq %r15, %r13
jmp 0x48674
movq -0x40(%rbp), %rsi
movq %r13, -0x30(%rbp)
movq %rdx, %r13
callq 0x4a1bd
movq %r13, %rdx
movq -0x30(%rbp), %r13
testl %eax, %eax
jne 0x48687
incq %r12
addq $0x10, %r15
decq %r14
jne 0x48636
jmp 0x48697
movq %rbx, %r13
jmp 0x48697
shlq $0x4, %r12
movq -0x38(%rbp), %r13
addq %r12, %r13
jmp 0x48697
movq %r15, %r13
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x48578
testq %rax, %rax
je 0x486d5
movabsq $-0x800000000000, %rcx  # imm = 0xFFFF800000000000
andq (%rax), %rcx
cmpq %rbx, %rcx
jne 0x486e6
incq %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4ece6
movq 0x8(%rax), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4872b
pushq %rbp
movq %rsp, %rbp
movq (%rax), %rdx
shrq $0x2f, %rdx
cmpl $0x1fff1, %edx          # imm = 0x1FFF1
jne 0x48729
addq $0x10, %rax
cmpq %rcx, %rax
jb 0x4870f
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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), %ecx
xorl %eax, %eax
testl %ecx, %ecx
jle 0x4875c
xorl %edx, %edx
movb (%rsi,%rdx), %r8b
cmpb %r8b, (%rdi,%rdx)
jb 0x48765
ja 0x4876c
testb %r8b, %r8b
je 0x48758
incq %rdx
cmpq %rdx, %rcx
jne 0x4873d
movl %ecx, %edx
movl %edx, %ecx
jmp 0x4875e
xorl %ecx, %ecx
cmpb (%rsi,%rcx), %al
sbbl %eax, %eax
popq %rbp
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x48763
movl $0x1, %eax
jmp 0x48763
// File: /workspace/github_c_makefile_star2_O3/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:
testq %rsi, %rsi
je 0x487e1
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
movl -0x8(%rcx), %r8d
xorl %eax, %eax
xorl %r9d, %r9d
movq %rsi, %r10
subq %r9, %r10
shrq %r10
addq %r9, %r10
movq %r10, %r11
imulq %rdx, %r11
movq (%rdi,%r11), %rbx
xorl %r14d, %r14d
testl %r8d, %r8d
jle 0x487c5
movb (%rbx,%r14), %r15b
cmpb %r15b, (%rcx,%r14)
jb 0x487cc
ja 0x487d6
testb %r15b, %r15b
je 0x487c5
incq %r14
cmpq %r14, %r8
jne 0x487a9
movq %r8, %r14
cmpb $0x0, (%rbx,%r14)
je 0x487e4
movq %r10, %rsi
cmpq %r10, %r9
jb 0x4878d
jmp 0x487ea
movq %r10, %r9
incq %r9
movq %rsi, %r10
jmp 0x487cc
xorl %eax, %eax
retq
addq %r11, %rdi
movq %rdi, %rax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x47425
movq %rax, %r14
leaq 0x147dc(%rip), %rdi     # 0x5d006
callq 0x47261
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
movq %rax, %rdi
callq 0x4ed39
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x476f0
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movl %r12d, %ecx
callq 0x488ad
movq -0x30(%rbp), %rdi
callq 0x47261
movabsq $-0x5800000000000, %rsi # imm = 0xFFFA800000000000
movq %rax, %rdi
callq 0x4ed39
movq %rax, %rbx
movabsq $-0x3800000000000, %rsi # imm = 0xFFFC800000000000
movq %r14, %rdi
callq 0x4ed7e
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 0x476f0
// File: /workspace/github_c_makefile_star2_O3/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 0x48939
movq %rsi, %r14
leaq 0x20012(%rip), %rdi     # 0x688fc
callq 0x47261
movq %rax, %rdi
movq %r12, %rsi
callq 0x4ed39
movq %rax, %r12
movq %r14, %rdi
callq 0x4482c
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x4ed39
movq %rbx, %rdi
movq %r12, %rsi
movabsq $-0x5000000000000, %r12 # imm = 0xFFFB000000000000
movq %rax, %rdx
callq 0x476f0
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 0x489d5
movq %r13, %rdi
callq 0x4482c
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4ed39
leaq -0x50(%rbp), %r14
movq %rax, (%r14)
cvtsi2sd %r15d, %xmm0
callq 0x4ee44
movq %rax, 0x8(%r14)
movsd 0xb994(%rip), %xmm0     # 0x54318
callq 0x4ee44
movq %rax, 0x10(%r14)
movq %r14, %rdi
movl $0x3, %esi
callq 0x47fef
movabsq $-0x4000000000000, %rsi # imm = 0xFFFC000000000000
movq %rax, %rdi
callq 0x4ed39
movq %rax, %r14
leaq 0x2002f(%rip), %rdi     # 0x689e5
callq 0x47261
movq %rax, %rdi
movq %r12, %rsi
callq 0x4ed39
movq -0x30(%rbp), %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x476f0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x14690
movq %rax, %r12
movl $0x2, %edi
callq 0x47425
movq %rax, %r14
movq %r12, %rdi
movq %r15, %rsi
callq 0x148a3
leaq 0x1f671(%rip), %rdi     # 0x680b7
callq 0x47261
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
movq %rax, %rdi
callq 0x4ed39
movq %rax, %r15
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
movq %r12, %rdi
callq 0x4ed7e
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x476f0
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movl -0x2c(%rbp), %ecx
callq 0x488ad
movq -0x38(%rbp), %rdi
callq 0x47261
movabsq $-0x5800000000000, %rsi # imm = 0xFFFA800000000000
movq %rax, %rdi
callq 0x4ed39
movq %rax, %rbx
movabsq $-0x3800000000000, %rsi # imm = 0xFFFC800000000000
movq %r14, %rdi
callq 0x4ed7e
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 0x476f0
// File: /workspace/github_c_makefile_star2_O3/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), %rcx
cmpq 0x50(%rax), %rcx
jne 0x48b74
movl %r14d, -0x2c(%rbp)
leaq 0x2(,%rcx,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 0x12840
testq %rax, %rax
je 0x48bb7
movq %rax, 0x48(%r13)
movq %r14, 0x50(%r13)
movq 0x58(%r13), %rcx
movl -0x2c(%rbp), %r14d
jmp 0x48b78
movq 0x48(%r13), %rax
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 0x141a4
// File: /workspace/github_c_makefile_star2_O3/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)
movq 0x58(%rax), %rsi
je 0x48c92
cmpq $0x2, %rsi
jb 0x48c8b
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, %r9
movq %rcx, %rdi
movq 0x48(%rax), %r8
cmpq %rsi, (%r8,%r9)
jb 0x48c5b
leaq (%r8,%r9), %r10
addq $0x28, %r10
addq %r9, %r8
movq 0x20(%r8), %r11
movq %r11, 0x20(%r10)
movups (%r8), %xmm0
movups 0x10(%r8), %xmm1
movups %xmm1, 0x10(%r10)
movups %xmm0, (%r10)
addq $-0x28, %r9
decq %rdi
jne 0x48c1d
movq 0x48(%rax), %r8
xorl %edi, %edi
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
movq 0x58(%rax), %rsi
addq $0x28, %rdx
cmpq %rsi, %rcx
jb 0x48bf7
movl $0x0, 0x60(%rax)
movq 0x48(%rax), %rcx
testq %rsi, %rsi
je 0x48caf
movq %rcx, %rax
movq %rsi, %rdx
cmpq %rbx, (%rax)
je 0x48cfb
addq $0x28, %rax
decq %rdx
jne 0x48ca1
leaq (%rsi,%rsi,4), %rax
leaq (%rcx,%rax,8), %rsi
movabsq $0x6666666666666667, %rdi # imm = 0x6666666666666667
cmpq %rsi, %rcx
jae 0x48cf9
movq %rsi, %rax
subq %rcx, %rax
imulq %rdi
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x5, %rdx
addq %rax, %rdx
leaq (%rdx,%rdx,4), %rdx
leaq (%rcx,%rdx,8), %rax
cmpq %rbx, (%rax)
leaq 0x28(%rcx,%rdx,8), %rdx
cmovbeq %rdx, %rcx
cmovaq %rax, %rsi
jne 0x48cc1
jmp 0x48cfb
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x48d76
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 0x4ed7e
testq %r15, %r15
je 0x48d4f
movq (%r14), %rsi
movq 0x10(%r14), %rcx
movq %r15, %rdi
movq %rax, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x487f1
movq (%r14), %rsi
movq 0x8(%r14), %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x48aee
cmpq $0x0, 0x18(%r14)
leaq 0x18(%r14), %r14
jne 0x48d26
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x48df0
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 0x4ed7e
testq %r15, %r15
je 0x48dc6
movq (%r14), %rsi
movq 0x10(%r14), %rcx
movq 0x18(%r14), %r8
movl 0x20(%r14), %r9d
movq %r15, %rdi
movq %rax, %rdx
callq 0x487f1
movq (%r14), %rsi
movq 0x8(%r14), %rdi
movq 0x18(%r14), %rcx
movl 0x20(%r14), %r8d
movq %rbx, %rdx
callq 0x48aee
cmpq $0x0, 0x28(%r14)
leaq 0x28(%r14), %r14
jne 0x48d9b
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x48e1c
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x48eae
cmpq $0x0, (%r15)
je 0x48e83
movabsq $-0x1800000000000, %r12 # imm = 0xFFFE800000000000
movq 0x8(%r15), %rdi
movq %r12, %rsi
callq 0x4ed7e
testq %rbx, %rbx
je 0x48e64
movq %rax, %r13
movq (%r15), %rsi
leaq -0x38(%rbp), %rdi
callq 0x48f07
movq 0x10(%r15), %rcx
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x487f1
movq (%r15), %rsi
movq 0x8(%r15), %rdi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x48aee
cmpq $0x0, 0x18(%r15)
leaq 0x18(%r15), %r15
jne 0x48e2c
testq %rbx, %rbx
je 0x48e9f
movq -0x38(%rbp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2bcd9
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2bb46
movq %rax, (%rbx)
testq %rax, %rax
je 0x48f02
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
callq 0x141d4
// File: /workspace/github_c_makefile_star2_O3/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 0x2bc37
movq %rax, (%rbx)
testq %rax, %rax
je 0x48f6f
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
callq 0x14204
// File: /workspace/github_c_makefile_star2_O3/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 0x48f9f
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x48eae
cmpq $0x0, (%r15)
je 0x4900b
movabsq $-0x1800000000000, %r12 # imm = 0xFFFE800000000000
movq 0x8(%r15), %rdi
movq %r12, %rsi
callq 0x4ed7e
testq %rbx, %rbx
je 0x48fe9
movq %rax, %r13
movq (%r15), %rsi
leaq -0x38(%rbp), %rdi
callq 0x48f07
movq 0x10(%r15), %rcx
movq 0x18(%r15), %r8
movl 0x20(%r15), %r9d
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x487f1
movq (%r15), %rsi
movq 0x8(%r15), %rdi
movq 0x18(%r15), %rcx
movl 0x20(%r15), %r8d
movq %r14, %rdx
callq 0x48aee
cmpq $0x0, 0x28(%r15)
leaq 0x28(%r15), %r15
jne 0x48faf
testq %rbx, %rbx
je 0x49027
movq -0x38(%rbp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2bcd9
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x47261
movabsq $-0x5800000000000, %rsi # imm = 0xFFFA800000000000
movq %rax, %rdi
callq 0x4ed39
movq %rax, %r14
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq %rax, %r15
movq 0x68(%rax), %rdi
movq %r14, %rsi
callq 0x474e0
movq %rax, %rcx
shrq $0x2f, %rcx
cmpl $0x1fff1, %ecx          # imm = 0x1FFF1
je 0x490b5
movq %rax, %rdi
callq 0x4ebc4
cmpq %rbx, %rax
jne 0x490e3
movabsq $-0x800000000000, %rsi  # imm = 0xFFFF800000000000
movq 0x68(%r15), %r15
movq %rbx, %rdi
callq 0x4ed7e
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x476f0
movq (%rbx), %rsi
leaq 0x2255a(%rip), %rdi     # 0x6b647
xorl %eax, %eax
callq 0x190bb
// File: /workspace/github_c_makefile_star2_O3/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 0x474e0
movq %rax, %rcx
shrq $0x2f, %rcx
cmpl $0x1fff1, %ecx          # imm = 0x1FFF1
jne 0x49131
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4ebc4