// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/marsh.c
// Function: entry_getval
static Janet entry_getval(Janet env_entry) {
    if (janet_checktype(env_entry, JANET_TABLE)) {
        JanetTable *entry = janet_unwrap_table(env_entry);
        Janet checkval = janet_table_get(entry, janet_ckeywordv("value"));
        if (janet_checktype(checkval, JANET_NIL)) {
            checkval = janet_table_get(entry, janet_ckeywordv("ref"));
        }
        return checkval;
    } else if (janet_checktype(env_entry, JANET_STRUCT)) {
        const JanetKV *entry = janet_unwrap_struct(env_entry);
        Janet checkval = janet_struct_get(entry, janet_ckeywordv("value"));
        if (janet_checktype(checkval, JANET_NIL)) {
            checkval = janet_struct_get(entry, janet_ckeywordv("ref"));
        }
        return checkval;
    } else {
        return janet_wrap_nil();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x40204
jmp 0x4022d
movsd -0x10(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x40216
jmp 0x4024e
movq -0x10(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x4024e
jmp 0x40329
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x10(%rbp), %rax
movabsq $-0x3800000000000, %rcx # imm = 0xFFFC800000000000
cmpq %rcx, %rax
jne 0x40329
movq -0x10(%rbp), %rdi
callq 0x7b260
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq 0x4f4c2(%rip), %rdi     # 0x8f72c
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x58(%rbp), %rdi
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
callq 0x69420
movq %rax, -0x8(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x4029e
jmp 0x402c4
movsd -0x8(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x402b0
jmp 0x402e1
movq -0x8(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x402e1
jmp 0x40324
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x8(%rbp), %rax
movabsq $-0x7800000000000, %rcx # imm = 0xFFF8800000000000
cmpq %rcx, %rax
jne 0x40324
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq 0x55117(%rip), %rdi     # 0x95407
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x60(%rbp), %rdi
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
callq 0x69420
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x40466
xorl %eax, %eax
testb $0x1, %al
jne 0x40331
jmp 0x4035a
movsd -0x10(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x40343
jmp 0x4037b
movq -0x10(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x4037b
jmp 0x40453
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x10(%rbp), %rax
movabsq $-0x3000000000000, %rcx # imm = 0xFFFD000000000000
cmpq %rcx, %rax
jne 0x40453
movq -0x10(%rbp), %rdi
callq 0x7b260
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq 0x4f395(%rip), %rdi     # 0x8f72c
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x68(%rbp), %rdi
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rsi
callq 0x67ed0
movq %rax, -0x8(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x403cb
jmp 0x403f1
movsd -0x8(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x403dd
jmp 0x4040e
movq -0x8(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x4040e
jmp 0x40451
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x8(%rbp), %rax
movabsq $-0x7800000000000, %rcx # imm = 0xFFF8800000000000
cmpq %rcx, %rax
jne 0x40451
movq -0x38(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq 0x54fea(%rip), %rdi     # 0x95407
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq -0x70(%rbp), %rdi
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rsi
callq 0x67ed0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x40466
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x7b460
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq