// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/util.c
// Function: janet_binding_from_entry
JanetBinding janet_binding_from_entry(Janet entry) {
    JanetTable *entry_table;
    JanetBinding binding = {
        JANET_BINDING_NONE,
        janet_wrap_nil(),
        JANET_BINDING_DEP_NONE
    };

    /* Check environment for entry */
    if (!janet_checktype(entry, JANET_TABLE))
        return binding;
    entry_table = janet_unwrap_table(entry);

    /* deprecation check */
    Janet deprecate = janet_table_get(entry_table, janet_ckeywordv("deprecated"));
    if (janet_checktype(deprecate, JANET_KEYWORD)) {
        JanetKeyword depkw = janet_unwrap_keyword(deprecate);
        if (!janet_cstrcmp(depkw, "relaxed")) {
            binding.deprecation = JANET_BINDING_DEP_RELAXED;
        } else if (!janet_cstrcmp(depkw, "normal")) {
            binding.deprecation = JANET_BINDING_DEP_NORMAL;
        } else if (!janet_cstrcmp(depkw, "strict")) {
            binding.deprecation = JANET_BINDING_DEP_STRICT;
        }
    } else if (!janet_checktype(deprecate, JANET_NIL)) {
        binding.deprecation = JANET_BINDING_DEP_NORMAL;
    }

    int macro = janet_truthy(janet_table_get(entry_table, janet_ckeywordv("macro")));
    Janet value = janet_table_get(entry_table, janet_ckeywordv("value"));
    Janet ref = janet_table_get(entry_table, janet_ckeywordv("ref"));
    int ref_is_valid = janet_checktype(ref, JANET_ARRAY);
    int redef = ref_is_valid && janet_truthy(janet_table_get(entry_table, janet_ckeywordv("redef")));

    if (macro) {
        binding.value = redef ? ref : value;
        binding.type = redef ? JANET_BINDING_DYNAMIC_MACRO : JANET_BINDING_MACRO;
        return binding;
    }

    if (ref_is_valid) {
        binding.value = ref;
        binding.type = redef ? JANET_BINDING_DYNAMIC_DEF : JANET_BINDING_VAR;
    } else {
        binding.value = value;
        binding.type = JANET_BINDING_DEF;
    }

    return binding;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rdi, -0x140(%rbp)
movq %rdi, %rax
movq %rax, -0x148(%rbp)
movq %rsi, -0x8(%rbp)
movl $0x0, (%rdi)
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x7b460
movq -0x140(%rbp), %rdi
movq %rax, 0x8(%rdi)
movl $0x0, 0x10(%rdi)
xorl %eax, %eax
testb $0x1, %al
jne 0x6c38f
jmp 0x6c3b5
movsd -0x8(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x6c3a1
jmp 0x6c3d7
movq -0x8(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x6c3d7
jmp 0x6c3d2
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x8(%rbp), %rax
movabsq $-0x3800000000000, %rcx # imm = 0xFFFC800000000000
cmpq %rcx, %rax
je 0x6c3d7
jmp 0x6ccef
movq -0x8(%rbp), %rdi
callq 0x7b260
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x150(%rbp)
leaq 0x151b5(%rip), %rdi     # 0x815ab
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x150(%rbp), %rdi
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
callq 0x69420
movq %rax, -0x18(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x6c42d
jmp 0x6c456
movsd -0x18(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x6c43f
jmp 0x6c477
movq -0x18(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x6c477
jmp 0x6c4f7
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x18(%rbp), %rax
movabsq $-0x5000000000000, %rcx # imm = 0xFFFB000000000000
cmpq %rcx, %rax
jne 0x6c4f7
movq -0x18(%rbp), %rdi
callq 0x7b260
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x151ea(%rip), %rsi     # 0x81679
callq 0x6b2b0
cmpl $0x0, %eax
jne 0x6c4a9
movq -0x140(%rbp), %rax
movl $0x1, 0x10(%rax)
jmp 0x6c4f5
movq -0x28(%rbp), %rdi
leaq 0x151cd(%rip), %rsi     # 0x81681
callq 0x6b2b0
cmpl $0x0, %eax
jne 0x6c4ce
movq -0x140(%rbp), %rax
movl $0x2, 0x10(%rax)
jmp 0x6c4f3
movq -0x28(%rbp), %rdi
leaq 0x151af(%rip), %rsi     # 0x81688
callq 0x6b2b0
cmpl $0x0, %eax
jne 0x6c4f1
movq -0x140(%rbp), %rax
movl $0x3, 0x10(%rax)
jmp 0x6c4f3
jmp 0x6c4f5
jmp 0x6c552
xorl %eax, %eax
testb $0x1, %al
jne 0x6c4ff
jmp 0x6c525
movsd -0x18(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x6c511
jmp 0x6c550
movq -0x18(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x6c550
jmp 0x6c542
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x18(%rbp), %rax
movabsq $-0x7800000000000, %rcx # imm = 0xFFF8800000000000
cmpq %rcx, %rax
je 0x6c550
movq -0x140(%rbp), %rax
movl $0x2, 0x10(%rax)
jmp 0x6c552
xorl %eax, %eax
testb $0x1, %al
jne 0x6c55d
jmp 0x6c61d
movq -0x10(%rbp), %rax
movq %rax, -0x160(%rbp)
leaq 0x2c50b(%rip), %rdi     # 0x98a7a
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x160(%rbp), %rdi
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rsi
callq 0x69420
movq %rax, -0x40(%rbp)
movsd -0x40(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x151(%rbp)
jne 0x6c5bc
jmp 0x6c828
movq -0x10(%rbp), %rax
movq %rax, -0x168(%rbp)
leaq 0x2c4ac(%rip), %rdi     # 0x98a7a
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x168(%rbp), %rdi
movq %rax, -0x48(%rbp)
movq -0x48(%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, -0x151(%rbp)
je 0x6c828
jmp 0x6c687
movq -0x10(%rbp), %rax
movq %rax, -0x170(%rbp)
leaq 0x2c44b(%rip), %rdi     # 0x98a7a
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x170(%rbp), %rdi
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rsi
callq 0x69420
movq %rax, -0x60(%rbp)
movabsq $-0x800000000000, %rcx  # imm = 0xFFFF800000000000
andq -0x60(%rbp), %rcx
xorl %eax, %eax
movabsq $-0x7800000000000, %rdx # imm = 0xFFF8800000000000
cmpq %rdx, %rcx
movb %al, -0x151(%rbp)
je 0x6c828
xorl %eax, %eax
testb $0x1, %al
jne 0x6c692
jmp 0x6c748
movq -0x10(%rbp), %rax
movq %rax, -0x178(%rbp)
leaq 0x2c3d6(%rip), %rdi     # 0x98a7a
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x178(%rbp), %rdi
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rsi
callq 0x69420
movq %rax, -0x70(%rbp)
movsd -0x70(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x6c6e8
jmp 0x6c7ba
movq -0x10(%rbp), %rax
movq %rax, -0x188(%rbp)
leaq 0x2c380(%rip), %rdi     # 0x98a7a
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x188(%rbp), %rdi
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rsi
callq 0x69420
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rcx
shrq $0x2f, %rcx
andq $0xf, %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, -0x179(%rbp)
je 0x6c7ba
jmp 0x6c81c
movq -0x10(%rbp), %rax
movq %rax, -0x190(%rbp)
leaq 0x2c320(%rip), %rdi     # 0x98a7a
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x190(%rbp), %rdi
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rsi
callq 0x69420
movq %rax, -0x90(%rbp)
movabsq $-0x800000000000, %rcx  # imm = 0xFFFF800000000000
andq -0x90(%rbp), %rcx
movb $0x1, %al
movabsq $-0x7000000000000, %rdx # imm = 0xFFF9000000000000
cmpq %rdx, %rcx
movb %al, -0x179(%rbp)
jne 0x6c81c
movq -0x10(%rbp), %rax
movq %rax, -0x198(%rbp)
leaq 0x2c2ae(%rip), %rdi     # 0x98a7a
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x198(%rbp), %rdi
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rsi
callq 0x69420
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
setne %al
movb %al, -0x179(%rbp)
movb -0x179(%rbp), %al
movb %al, -0x151(%rbp)
movb -0x151(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1b0(%rbp)
leaq 0x22ee4(%rip), %rdi     # 0x8f72c
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x1b0(%rbp), %rdi
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rsi
callq 0x69420
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1a8(%rbp)
leaq 0x28b75(%rip), %rdi     # 0x95407
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x1a8(%rbp), %rdi
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rsi
callq 0x69420
movq %rax, -0xb8(%rbp)
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0xb8(%rbp), %rax
movabsq $-0x4800000000000, %rcx # imm = 0xFFFB800000000000
cmpq %rcx, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xc4(%rbp)
xorl %eax, %eax
cmpl $0x0, -0xc4(%rbp)
movb %al, -0x199(%rbp)
je 0x6cc29
xorl %eax, %eax
testb $0x1, %al
jne 0x6c916
jmp 0x6c9ee
movq -0x10(%rbp), %rax
movq %rax, -0x1c0(%rbp)
leaq 0x29558(%rip), %rdi     # 0x95e80
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x1c0(%rbp), %rdi
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rsi
callq 0x69420
movq %rax, -0xd8(%rbp)
movsd -0xd8(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x1b1(%rbp)
jne 0x6c981
jmp 0x6cc1d
movq -0x10(%rbp), %rax
movq %rax, -0x1c8(%rbp)
leaq 0x294ed(%rip), %rdi     # 0x95e80
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x1c8(%rbp), %rdi
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rsi
callq 0x69420
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rcx
shrq $0x2f, %rcx
andq $0xf, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x1b1(%rbp)
je 0x6cc1d
jmp 0x6ca64
movq -0x10(%rbp), %rax
movq %rax, -0x1d0(%rbp)
leaq 0x29480(%rip), %rdi     # 0x95e80
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x1d0(%rbp), %rdi
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rsi
callq 0x69420
movq %rax, -0xf8(%rbp)
movabsq $-0x800000000000, %rcx  # imm = 0xFFFF800000000000
andq -0xf8(%rbp), %rcx
xorl %eax, %eax
movabsq $-0x7800000000000, %rdx # imm = 0xFFF8800000000000
cmpq %rdx, %rcx
movb %al, -0x1b1(%rbp)
je 0x6cc1d
xorl %eax, %eax
testb $0x1, %al
jne 0x6ca6f
jmp 0x6cb3d
movq -0x10(%rbp), %rax
movq %rax, -0x1d8(%rbp)
leaq 0x293ff(%rip), %rdi     # 0x95e80
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x1d8(%rbp), %rdi
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rsi
callq 0x69420
movq %rax, -0x108(%rbp)
movsd -0x108(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x6cad1
jmp 0x6cbaf
movq -0x10(%rbp), %rax
movq %rax, -0x1e8(%rbp)
leaq 0x2939d(%rip), %rdi     # 0x95e80
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x1e8(%rbp), %rdi
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rsi
callq 0x69420
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rcx
shrq $0x2f, %rcx
andq $0xf, %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, -0x1d9(%rbp)
je 0x6cbaf
jmp 0x6cc11
movq -0x10(%rbp), %rax
movq %rax, -0x1f0(%rbp)
leaq 0x29331(%rip), %rdi     # 0x95e80
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x1f0(%rbp), %rdi
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rsi
callq 0x69420
movq %rax, -0x128(%rbp)
movabsq $-0x800000000000, %rcx  # imm = 0xFFFF800000000000
andq -0x128(%rbp), %rcx
movb $0x1, %al
movabsq $-0x7000000000000, %rdx # imm = 0xFFF9000000000000
cmpq %rdx, %rcx
movb %al, -0x1d9(%rbp)
jne 0x6cc11
movq -0x10(%rbp), %rax
movq %rax, -0x1f8(%rbp)
leaq 0x292bf(%rip), %rdi     # 0x95e80
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x1f8(%rbp), %rdi
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rsi
callq 0x69420
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
setne %al
movb %al, -0x1d9(%rbp)
movb -0x1d9(%rbp), %al
movb %al, -0x1b1(%rbp)
movb -0x1b1(%rbp), %al
movb %al, -0x199(%rbp)
movb -0x199(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xc8(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x6cca0
movq -0x140(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x200(%rbp)
cmpl $0x0, -0xc8(%rbp)
je 0x6cc6e
movq -0x200(%rbp), %rax
movq -0xb8(%rbp), %rcx
movq %rcx, (%rax)
jmp 0x6cc7f
movq -0x200(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq %rcx, (%rax)
movq -0x140(%rbp), %rax
movl -0xc8(%rbp), %esi
movl $0x3, %ecx
movl $0x5, %edx
cmpl $0x0, %esi
cmovnel %edx, %ecx
movl %ecx, (%rax)
jmp 0x6ccef
cmpl $0x0, -0xc4(%rbp)
je 0x6ccd5
movq -0x140(%rbp), %rax
movq -0xb8(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0xc8(%rbp), %esi
movl $0x2, %ecx
movl $0x4, %edx
cmpl $0x0, %esi
cmovnel %edx, %ecx
movl %ecx, (%rax)
jmp 0x6cced
movq -0x140(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x1, (%rax)
jmp 0x6ccef
movq -0x148(%rbp), %rax
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
nop