// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/specials.c
// Function: defleaf
static int defleaf(
    JanetCompiler *c,
    const uint8_t *sym,
    JanetSlot s,
    JanetTable *tab) {
    if (c->scope->flags & JANET_SCOPE_TOP) {
        JanetTable *entry = janet_table_clone(tab);
        janet_table_put(entry, janet_ckeywordv("source-map"),
                        janet_wrap_tuple(janetc_make_sourcemap(c)));

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

        if (is_redef) {
            JanetBinding binding = janet_resolve_ext(c->env, sym);
            JanetArray *ref;
            if (binding.type == JANET_BINDING_DYNAMIC_DEF || binding.type == JANET_BINDING_DYNAMIC_MACRO) {
                ref = janet_unwrap_array(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));
            JanetSlot refslot = janetc_cslot(janet_wrap_array(ref));
            janetc_emit_ssu(c, JOP_PUT_INDEX, refslot, s, 0, 0);
        } else {
            JanetSlot valsym = janetc_cslot(janet_ckeywordv("value"));
            JanetSlot tabslot = janetc_cslot(janet_wrap_table(entry));
            janetc_emit_sss(c, JOP_PUT, tabslot, valsym, s, 0);
        }

        /* Add env entry to env */
        janet_table_put(c->env, janet_wrap_symbol(sym), janet_wrap_table(entry));
    }
    return namelocal(c, sym, 0, s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
leaq 0x10(%rbp), %rax
movq %rax, -0x130(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x6c(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x633af
movq -0x18(%rbp), %rdi
callq 0x69c50
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x138(%rbp)
leaq 0x32fae(%rip), %rdi     # 0x95e75
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x633f0
movq %rax, %rdi
movabsq $-0x4000000000000, %rsi # imm = 0xFFFC000000000000
callq 0x7b550
movq -0x138(%rbp), %rdi
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x697e0
leaq 0x32f64(%rip), %rdi     # 0x95e80
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0x38(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x62f3f
jmp 0x62fa7
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x69420
movq %rax, -0x48(%rbp)
movsd -0x48(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x139(%rbp)
jne 0x62f72
jmp 0x630b5
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x69420
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rcx
shrq $0x2f, %rcx
andq $0xf, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x139(%rbp)
je 0x630b5
jmp 0x62fe5
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x69420
movq %rax, -0x58(%rbp)
movabsq $-0x800000000000, %rcx  # imm = 0xFFFF800000000000
andq -0x58(%rbp), %rcx
xorl %eax, %eax
movabsq $-0x7800000000000, %rdx # imm = 0xFFF8800000000000
cmpq %rdx, %rcx
movb %al, -0x139(%rbp)
je 0x630b5
xorl %eax, %eax
testb $0x1, %al
jne 0x62fed
jmp 0x63045
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x69420
movq %rax, -0x60(%rbp)
movsd -0x60(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x63014
jmp 0x6307f
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x69420
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rcx
shrq $0x2f, %rcx
andq $0xf, %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, -0x13a(%rbp)
je 0x6307f
jmp 0x630a9
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x69420
movq %rax, -0x70(%rbp)
movabsq $-0x800000000000, %rcx  # imm = 0xFFFF800000000000
andq -0x70(%rbp), %rcx
movb $0x1, %al
movabsq $-0x7000000000000, %rdx # imm = 0xFFF9000000000000
cmpq %rdx, %rcx
movb %al, -0x13a(%rbp)
jne 0x630a9
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x69420
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
setne %al
movb %al, -0x13a(%rbp)
movb -0x13a(%rbp), %al
movb %al, -0x139(%rbp)
movb -0x139(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x630fb
movq -0x20(%rbp), %rax
movq %rax, -0x148(%rbp)
movabsq $-0x6ffffffffffff, %rdi # imm = 0xFFF9000000000001
callq 0x7b460
movq -0x148(%rbp), %rdi
movq %rax, -0x80(%rbp)
movq -0x38(%rbp), %rsi
movq -0x80(%rbp), %rdx
callq 0x697e0
cmpl $0x0, -0x3c(%rbp)
je 0x6327b
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x10(%rbp), %rdx
leaq -0x98(%rbp), %rdi
callq 0x6cf90
cmpl $0x4, -0x98(%rbp)
je 0x6312f
cmpl $0x5, -0x98(%rbp)
jne 0x63144
movq -0x90(%rbp), %rdi
callq 0x7b260
movq %rax, -0xa0(%rbp)
jmp 0x6318c
movl $0x1, %edi
callq 0x13180
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x150(%rbp)
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x7b460
movq -0x150(%rbp), %rdi
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rsi
callq 0x13510
movq -0x20(%rbp), %rax
movq %rax, -0x158(%rbp)
leaq 0x32269(%rip), %rdi     # 0x95407
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0xb0(%rbp)
movq -0xa0(%rbp), %rdi
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
callq 0x7b610
movq -0x158(%rbp), %rdi
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
callq 0x697e0
movq -0xa0(%rbp), %rdi
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
callq 0x7b610
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
callq 0x1ff40
movq -0x130(%rbp), %rax
movq -0x8(%rbp), %rdi
movl $0x3e, %esi
leaq -0xd0(%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
jmp 0x63352
leaq 0x2c4aa(%rip), %rdi     # 0x8f72c
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rsi
leaq -0xf0(%rbp), %rdi
callq 0x1ff40
movq -0x20(%rbp), %rdi
movabsq $-0x3800000000000, %rsi # imm = 0xFFFC800000000000
callq 0x7b610
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rsi
leaq -0x110(%rbp), %rdi
callq 0x1ff40
movq -0x130(%rbp), %rax
movq -0x8(%rbp), %rdi
movl $0x3c, %esi
leaq -0x110(%rbp), %r8
leaq -0xf0(%rbp), %rcx
xorl %edx, %edx
movq (%r8), %r9
movq %r9, (%rsp)
movq 0x8(%r8), %r9
movq %r9, 0x8(%rsp)
movq 0x10(%r8), %r8
movq %r8, 0x10(%rsp)
movq (%rcx), %r8
movq %r8, 0x18(%rsp)
movq 0x8(%rcx), %r8
movq %r8, 0x20(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x28(%rsp)
movq (%rax), %rcx
movq %rcx, 0x30(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x40(%rsp)
callq 0x2a2c0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x160(%rbp)
movq -0x10(%rbp), %rdi
movabsq $-0x5800000000000, %rsi # imm = 0xFFFA800000000000
callq 0x7b550
movq %rax, -0x120(%rbp)
movq -0x20(%rbp), %rdi
movabsq $-0x3800000000000, %rsi # imm = 0xFFFC800000000000
callq 0x7b610
movq -0x160(%rbp), %rdi
movq %rax, -0x128(%rbp)
movq -0x120(%rbp), %rsi
movq -0x128(%rbp), %rdx
callq 0x697e0
movq -0x130(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x634d0
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
nopw (%rax,%rax)