// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/specials.c
// Function: varleaf
static int varleaf(
    JanetCompiler *c,
    const uint8_t *sym,
    JanetSlot s,
    JanetTable *reftab) {
    if (c->scope->flags & JANET_SCOPE_TOP) {
        /* Global var, generate var */
        JanetSlot refslot;
        JanetTable *entry = janet_table_clone(reftab);

        Janet redef_kw = janet_ckeywordv("redef");
        int is_redef = janet_truthy(janet_table_get(c->env, redef_kw));

        JanetArray *ref;
        JanetBinding old_binding;
        if (is_redef && (old_binding = janet_resolve_ext(c->env, sym),
                         old_binding.type == JANET_BINDING_VAR)) {
            ref = janet_unwrap_array(old_binding.value);
        } else {
            ref = janet_array(1);
            janet_array_push(ref, janet_wrap_nil());
        }

        janet_table_put(entry, janet_ckeywordv("ref"), janet_wrap_array(ref));
        janet_table_put(entry, janet_ckeywordv("source-map"),
                        janet_wrap_tuple(janetc_make_sourcemap(c)));
        janet_table_put(c->env, janet_wrap_symbol(sym), janet_wrap_table(entry));
        refslot = janetc_cslot(janet_wrap_array(ref));
        janetc_emit_ssu(c, JOP_PUT_INDEX, refslot, s, 0, 0);
        return 1;
    } else {
        return namelocal(c, sym, JANET_SLOT_MUTABLE, s);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
leaq 0x10(%rbp), %rax
movq %rax, -0x120(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x6c(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x645e1
movq -0x20(%rbp), %rdi
callq 0x69c50
movq %rax, -0x40(%rbp)
leaq 0x31cd4(%rip), %rdi     # 0x95e80
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0x48(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x641cf
jmp 0x64237
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x48(%rbp), %rsi
callq 0x69420
movq %rax, -0x58(%rbp)
movsd -0x58(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x121(%rbp)
jne 0x64202
jmp 0x6434b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x48(%rbp), %rsi
callq 0x69420
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rcx
shrq $0x2f, %rcx
andq $0xf, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x121(%rbp)
je 0x6434b
jmp 0x64275
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x48(%rbp), %rsi
callq 0x69420
movq %rax, -0x68(%rbp)
movabsq $-0x800000000000, %rcx  # imm = 0xFFFF800000000000
andq -0x68(%rbp), %rcx
xorl %eax, %eax
movabsq $-0x7800000000000, %rdx # imm = 0xFFF8800000000000
cmpq %rdx, %rcx
movb %al, -0x121(%rbp)
je 0x6434b
xorl %eax, %eax
testb $0x1, %al
jne 0x6427d
jmp 0x642d5
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x48(%rbp), %rsi
callq 0x69420
movq %rax, -0x70(%rbp)
movsd -0x70(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x642a4
jmp 0x6430f
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x48(%rbp), %rsi
callq 0x69420
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rcx
shrq $0x2f, %rcx
andq $0xf, %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, -0x122(%rbp)
je 0x6430f
jmp 0x6433f
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x48(%rbp), %rsi
callq 0x69420
movq %rax, -0x80(%rbp)
movabsq $-0x800000000000, %rcx  # imm = 0xFFFF800000000000
andq -0x80(%rbp), %rcx
movb $0x1, %al
movabsq $-0x7000000000000, %rdx # imm = 0xFFF9000000000000
cmpq %rdx, %rcx
movb %al, -0x122(%rbp)
jne 0x6433f
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x48(%rbp), %rsi
callq 0x69420
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
setne %al
movb %al, -0x122(%rbp)
movb -0x122(%rbp), %al
movb %al, -0x121(%rbp)
movb -0x121(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
je 0x643bf
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x18(%rbp), %rdx
leaq -0xc0(%rbp), %rdi
callq 0x6cf90
movq -0xc0(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x98(%rbp)
cmpl $0x2, -0xa8(%rbp)
jne 0x643bf
movq -0xa0(%rbp), %rdi
callq 0x7b260
movq %rax, -0x90(%rbp)
jmp 0x64407
movl $0x1, %edi
callq 0x13180
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x130(%rbp)
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x7b460
movq -0x130(%rbp), %rdi
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rsi
callq 0x13510
movq -0x40(%rbp), %rax
movq %rax, -0x148(%rbp)
leaq 0x30fee(%rip), %rdi     # 0x95407
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0xd0(%rbp)
movq -0x90(%rbp), %rdi
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
callq 0x7b610
movq -0x148(%rbp), %rdi
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
callq 0x697e0
movq -0x40(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq 0x319f5(%rip), %rdi     # 0x95e75
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0xe0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x633f0
movq %rax, %rdi
movabsq $-0x4000000000000, %rsi # imm = 0xFFFC000000000000
callq 0x7b550
movq -0x140(%rbp), %rdi
movq %rax, -0xe8(%rbp)
movq -0xe0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
callq 0x697e0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x138(%rbp)
movq -0x18(%rbp), %rdi
movabsq $-0x5800000000000, %rsi # imm = 0xFFFA800000000000
callq 0x7b550
movq %rax, -0xf0(%rbp)
movq -0x40(%rbp), %rdi
movabsq $-0x3800000000000, %rsi # imm = 0xFFFC800000000000
callq 0x7b610
movq -0x138(%rbp), %rdi
movq %rax, -0xf8(%rbp)
movq -0xf0(%rbp), %rsi
movq -0xf8(%rbp), %rdx
callq 0x697e0
movq -0x90(%rbp), %rdi
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
callq 0x7b610
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rsi
leaq -0x110(%rbp), %rdi
callq 0x1ff40
movq -0x120(%rbp), %rax
movq -0x110(%rbp), %rcx
movq %rcx, -0x38(%rbp)
movq -0x108(%rbp), %rcx
movq %rcx, -0x30(%rbp)
movq -0x100(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl $0x3e, %esi
leaq -0x38(%rbp), %rdx
xorl %ecx, %ecx
movq (%rdx), %r8
movq %r8, (%rsp)
movq 0x8(%rdx), %r8
movq %r8, 0x8(%rsp)
movq 0x10(%rdx), %rdx
movq %rdx, 0x10(%rsp)
movq (%rax), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
movl %ecx, %edx
callq 0x2a250
movl $0x1, -0x4(%rbp)
jmp 0x64616
movq -0x120(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x40000, %edx          # imm = 0x40000
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x634d0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)