// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/compile.c
// Function: janetc_value
JanetSlot janetc_value(JanetFopts opts, Janet x) {
    JanetSlot ret;
    JanetCompiler *c = opts.compiler;
    JanetSourceMapping last_mapping = c->current_mapping;
    c->recursion_guard--;

    /* Guard against previous errors and unbounded recursion */
    if (c->result.status == JANET_COMPILE_ERROR) return janetc_cslot(janet_wrap_nil());
    if (c->recursion_guard <= 0) {
        janetc_cerror(c, "recursed too deeply");
        return janetc_cslot(janet_wrap_nil());
    }

    /* Macro expand. Also gets possible special form and
     * refines source mapping cursor if possible. */
    const JanetSpecial *spec = NULL;
    int macroi = JANET_MAX_MACRO_EXPAND;
    while (macroi &&
            c->result.status != JANET_COMPILE_ERROR &&
            macroexpand1(c, x, &x, &spec))
        macroi--;
    if (macroi == 0) {
        janetc_cerror(c, "recursed too deeply in macro expansion");
        return janetc_cslot(janet_wrap_nil());
    }

    /* Special forms */
    if (spec) {
        const Janet *tup = janet_unwrap_tuple(x);
        ret = spec->compile(opts, janet_tuple_length(tup) - 1, tup + 1);
    } else {
        switch (janet_type(x)) {
            case JANET_TUPLE: {
                JanetFopts subopts = janetc_fopts_default(c);
                const Janet *tup = janet_unwrap_tuple(x);
                /* Empty tuple is tuple literal */
                if (janet_tuple_length(tup) == 0) {
                    ret = janetc_cslot(janet_wrap_tuple(janet_tuple_n(NULL, 0)));
                } else if (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR) { /* [] tuples are not function call */
                    ret = janetc_tuple(opts, x);
                } else {
                    JanetSlot head = janetc_value(subopts, tup[0]);
                    subopts.flags = JANET_FUNCTION | JANET_CFUNCTION;
                    ret = janetc_call(opts, janetc_toslots(c, tup + 1, janet_tuple_length(tup) - 1), head);
                    janetc_freeslot(c, head);
                }
                ret.flags &= ~JANET_SLOT_SPLICED;
            }
            break;
            case JANET_SYMBOL:
                ret = janetc_resolve(c, janet_unwrap_symbol(x));
                break;
            case JANET_ARRAY:
                ret = janetc_array(opts, x);
                break;
            case JANET_STRUCT:
                ret = janetc_tablector(opts, x, JOP_MAKE_STRUCT);
                break;
            case JANET_TABLE:
                ret = janetc_tablector(opts, x, JOP_MAKE_TABLE);
                break;
            case JANET_BUFFER:
                ret = janetc_bufferctor(opts, x);
                break;
            default:
                ret = janetc_cslot(x);
                break;
        }
    }

    if (c->result.status == JANET_COMPILE_ERROR)
        return janetc_cslot(janet_wrap_nil());
    if (opts.flags & JANET_FOPTS_TAIL)
        ret = janetc_return(c, ret);
    if (opts.flags & JANET_FOPTS_HINT) {
        janetc_copy(c, opts.hint, ret);
        ret = opts.hint;
    }
    c->current_mapping = last_mapping;
    c->recursion_guard++;
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdi, %r12
movq 0x10(%rbp), %r14
movq 0x50(%r14), %rdx
movl 0x58(%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x58(%r14)
cmpl $0x1, 0x48(%r14)
je 0x1cf12
cmpl $0x2, %eax
jge 0x1ca4b
leaq 0x4c86d(%rip), %rdi     # 0x692b3
jmp 0x1cefa
movq %rdx, -0x98(%rbp)
leaq 0x10(%rbp), %r13
movabsq $-0x800000000000, %rdx  # imm = 0xFFFF800000000000
movl $0xffffff38, %ebx       # imm = 0xFFFFFF38
movabsq $-0x4000000000000, %rcx # imm = 0xFFFC000000000000
movq $0x0, -0xb0(%rbp)
cmpl $0x1, 0x48(%r14)
je 0x1cdf7
movq %rsi, %rax
andq %rdx, %rax
movb $0x1, %r15b
cmpq %rcx, %rax
jne 0x1cb3d
movq %rsi, -0x30(%rbp)
movq %rsi, %rdi
callq 0x4f838
cmpl $0x0, -0x10(%rax)
je 0x1cb11
movq %rax, %r13
movl -0x8(%rax), %eax
testl %eax, %eax
js 0x1cabf
movl %eax, 0x50(%r14)
movl -0x4(%r13), %eax
movl %eax, 0x54(%r14)
testb $0x1, -0x1e(%r13)
movq -0x30(%rbp), %rsi
movabsq $-0x800000000000, %rdx  # imm = 0xFFFF800000000000
jne 0x1cb2f
movq (%r13), %rdi
movq %rdi, %rax
andq %rdx, %rax
movabsq $-0x5800000000000, %rcx # imm = 0xFFFA800000000000
cmpq %rcx, %rax
jne 0x1cb2f
movq %r12, -0x58(%rbp)
callq 0x4f838
movq %rax, %r12
movq %rax, %rdi
callq 0x419c3
testq %rax, %rax
je 0x1cb53
movq %rax, -0xb0(%rbp)
movq -0x58(%rbp), %r12
leaq 0x10(%rbp), %r13
movq -0x30(%rbp), %rsi
movabsq $-0x4000000000000, %rcx # imm = 0xFFFC000000000000
movabsq $-0x800000000000, %rdx  # imm = 0xFFFF800000000000
jmp 0x1cb3d
leaq 0x10(%rbp), %r13
movabsq $-0x4000000000000, %rcx # imm = 0xFFFC000000000000
testb %r15b, %r15b
jne 0x1cdf7
incl %ebx
jne 0x1ca7a
jmp 0x1cef3
movq 0x18(%r14), %rdi
movq %r12, %rsi
leaq -0x90(%rbp), %rdx
callq 0x4a198
cmpl $0x5, %eax
je 0x1cb70
cmpl $0x3, %eax
jne 0x1cb0d
movq -0x90(%rbp), %rdi
movq %rdi, %rax
movabsq $-0x800000000000, %rdx  # imm = 0xFFFF800000000000
andq %rdx, %rax
movabsq $-0x2000000000000, %rcx # imm = 0xFFFE000000000000
cmpq %rcx, %rax
jne 0x1cd1a
callq 0x4f838
movl -0x10(%r13), %ecx
movq %rcx, -0xa0(%rbp)
leal -0x1(%rcx), %r12d
addq $0x8, %r13
movq %rax, -0x60(%rbp)
movq %rax, %rdi
movl $0x40, %esi
movl %r12d, %edx
movq %r13, %rcx
callq 0x29abc
testq %rax, %rax
je 0x1cd2b
movq %rax, %r13
movq 0x18(%r14), %rax
movq %rax, 0x28(%r13)
callq 0x2bf94
movl %eax, -0x60(%rbp)
leaq 0x38b34(%rip), %rdi     # 0x55720
callq 0x47cd3
movq %rax, %rdi
movabsq $-0x5000000000000, %r15 # imm = 0xFFFB000000000000
movq %r15, %rsi
callq 0x4f9ad
movq 0x18(%r14), %rdi
movq %rax, -0xa0(%rbp)
movq %rax, %rsi
movq -0x30(%rbp), %rdx
callq 0x481b3
leaq 0x38b07(%rip), %rdi     # 0x5572b
callq 0x47cd3
movq %rax, %rdi
movq %r15, %rsi
callq 0x4f9ad
movq %rax, %r15
movq 0x60(%r14), %rdi
testq %rdi, %rdi
je 0x1cc61
movq 0x18(%r14), %r12
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
callq 0x4f9f2
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x481b3
movq %r15, -0xb8(%rbp)
movabsq $-0x77fffffffffff, %r15 # imm = 0xFFF8800000000001
movq %r15, %rdi
callq 0x4f95a
movq %r13, %rdi
movq %rax, %rsi
leaq -0x50(%rbp), %rdx
callq 0x4c28d
movl %eax, -0xa4(%rbp)
movq 0x18(%r14), %r12
movq %r15, %rdi
callq 0x4f95a
movq %r12, %rdi
movq -0xa0(%rbp), %rsi
movq %rax, %rdx
callq 0x481b3
movq 0x18(%r14), %r12
movq %r15, %rdi
callq 0x4f95a
movq %r12, %rdi
movq -0xb8(%rbp), %rsi
movq %rax, %rdx
callq 0x481b3
movl -0x60(%rbp), %edi
callq 0x2bfbb
movq -0x50(%rbp), %rsi
cmpl $0x0, -0xa4(%rbp)
setne %r15b
je 0x1cd73
leaq 0x38a48(%rip), %rdi     # 0x55737
xorl %eax, %eax
callq 0x3fd86
movq %r13, 0x38(%r14)
cmpl $0x1, 0x48(%r14)
movq -0x58(%rbp), %r12
je 0x1cb11
movl $0x1, 0x48(%r14)
movq %rax, 0x30(%r14)
jmp 0x1cb11
movq -0x58(%rbp), %r12
leaq 0x10(%rbp), %r13
movq -0x30(%rbp), %rsi
jmp 0x1cb33
movq -0xa0(%rbp), %rcx
movl %r12d, %r13d
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x64(%rax), %esi
movl 0x68(%rax), %r9d
testl %esi, %esi
js 0x1cd80
movl $0x0, %eax
cmpl %esi, %ecx
movq -0x58(%rbp), %r12
movl %r13d, %r8d
jg 0x1cd89
leaq 0x3895c(%rip), %rdi     # 0x556bb
movl %r8d, %edx
xorl %eax, %eax
movl %r9d, -0x60(%rbp)
callq 0x3fd86
movl -0x60(%rbp), %r9d
jmp 0x1cd86
movq -0x58(%rbp), %r12
leaq 0x10(%rbp), %r13
jmp 0x1cb19
xorl %eax, %eax
movq -0x58(%rbp), %r12
movl %r13d, %r8d
testl %r9d, %r9d
movabsq $-0x4000000000000, %rcx # imm = 0xFFFC000000000000
movabsq $-0x800000000000, %rdx  # imm = 0xFFFF800000000000
js 0x1cdcf
cmpl %r9d, %r8d
jle 0x1cdcf
leaq 0x38940(%rip), %rdi     # 0x556ee
movl %r9d, %esi
movl %r8d, %edx
xorl %eax, %eax
callq 0x3fd86
movabsq $-0x800000000000, %rdx  # imm = 0xFFFF800000000000
movabsq $-0x4000000000000, %rcx # imm = 0xFFFC000000000000
movq $0x0, 0x38(%r14)
cmpl $0x1, 0x48(%r14)
movq -0x30(%rbp), %rsi
je 0x1cdee
movl $0x1, 0x48(%r14)
movq %rax, 0x30(%r14)
leaq 0x10(%rbp), %r13
jmp 0x1cb3d
movq -0xb0(%rbp), %rax
testq %rax, %rax
movq -0x98(%rbp), %rbx
je 0x1cf6b
movq %rsi, %rdi
movq %rax, %r15
callq 0x4f838
movl -0x10(%rax), %esi
decl %esi
leaq 0x8(%rax), %rdx
movq 0x20(%r13), %rax
movq %rax, 0x20(%rsp)
movupd (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
leaq -0x50(%rbp), %rdi
callq *0x8(%r15)
cmpl $0x1, 0x48(%r14)
je 0x1cf12
testb $0x1, 0x22(%r13)
je 0x1ce8f
movq -0x40(%rbp), %rax
movq %rax, 0x10(%rsp)
movaps -0x50(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq -0x90(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1c819
movq 0x10(%r15), %rax
movq %rax, -0x40(%rbp)
movupd (%r15), %xmm0
movapd %xmm0, -0x50(%rbp)
testb $0x2, 0x22(%r13)
je 0x1ced5
movq -0x40(%rbp), %rax
movq %rax, 0x28(%rsp)
movaps -0x50(%rbp), %xmm0
movups %xmm0, 0x18(%rsp)
movq 0x18(%r13), %rax
movq %rax, 0x10(%rsp)
movups 0x8(%r13), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
callq 0x21b57
movq 0x18(%r13), %rax
movq %rax, -0x40(%rbp)
movupd 0x8(%r13), %xmm0
movapd %xmm0, -0x50(%rbp)
movq %rbx, 0x50(%r14)
incl 0x58(%r14)
movq -0x40(%rbp), %rax
movq %rax, 0x10(%r12)
movapd -0x50(%rbp), %xmm0
movupd %xmm0, (%r12)
jmp 0x1cf56
leaq 0x386c8(%rip), %rdi     # 0x555c2
callq 0x4516c
cmpl $0x1, 0x48(%r14)
je 0x1cf12
movl $0x1, 0x48(%r14)
movq %rax, 0x30(%r14)
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x4f95a
movq %rax, %xmm0
movq %rax, %rcx
shrq $0x2f, %rcx
andb $0xf, %cl
movl $0x10000, %edx          # imm = 0x10000
btsl %ecx, %edx
ucomisd %xmm0, %xmm0
movl $0x10001, %ecx          # imm = 0x10001
cmovpl %edx, %ecx
movl %ecx, 0x10(%r12)
movq $-0x1, 0x8(%r12)
movq %rax, (%r12)
movq %r12, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %xmm0
movq %rsi, %rax
shrq $0x2f, %rax
andl $0xf, %eax
xorl %ecx, %ecx
ucomisd %xmm0, %xmm0
cmovpl %eax, %ecx
addl $-0x5, %ecx
cmpl $0x6, %ecx
ja 0x1d13c
leaq 0x383ae(%rip), %rdx     # 0x55344
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq %rsi, %rdi
callq 0x4f838
leaq -0x90(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x1c2a5
movq 0x10(%r15), %rax
movq %rax, -0x40(%rbp)
movupd (%r15), %xmm0
movapd %xmm0, -0x50(%rbp)
jmp 0x1ce48
movq %r14, -0x90(%rbp)
movl $0x0, -0x70(%rbp)
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
movq %rsi, %r13
callq 0x4f95a
movq %rax, %xmm0
movq %rax, -0x88(%rbp)
shrq $0x2f, %rax
andb $0xf, %al
movl $0x10000, %ebx          # imm = 0x10000
movl $0x10000, %ecx          # imm = 0x10000
btsl %eax, %ecx
ucomisd %xmm0, %xmm0
movl $0x10001, %r15d         # imm = 0x10001
cmovnpl %r15d, %ecx
movq $-0x1, -0x80(%rbp)
movl %ecx, -0x78(%rbp)
movq %r13, -0x30(%rbp)
movq %r13, %rdi
callq 0x4f838
cmpl $0x0, -0x10(%rax)
je 0x1d244
movq %rax, %r13
testb $0x1, -0x1e(%rax)
jne 0x1d292
movq (%r13), %rsi
movq -0x70(%rbp), %rax
movq %rax, 0x20(%rsp)
movups -0x90(%rbp), %xmm0
movups -0x80(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq -0xd0(%rbp), %r15
movq %r15, %rdi
callq 0x1ca05
movl $0xd, -0x70(%rbp)
movq %r13, %rsi
addq $0x8, %rsi
movl -0x10(%r13), %edx
decl %edx
movq %r14, %rdi
callq 0x1c901
movq 0x10(%r15), %rcx
movq %rcx, 0x38(%rsp)
movups (%r15), %xmm0
movups %xmm0, 0x28(%rsp)
leaq 0x10(%rbp), %r13
movq 0x20(%r13), %rcx
movq %rcx, 0x20(%rsp)
movupd (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
leaq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x1d898
testb $0xb, 0x12(%r15)
movq -0x98(%rbp), %rbx
jne 0x1d2c8
cmpl $0x0, -0xc4(%rbp)
jns 0x1d2c8
movl -0xc8(%rbp), %esi
movq (%r14), %rdi
addq $0x30, %rdi
callq 0x4123c
jmp 0x1d2c8
movq 0x20(%r13), %rax
movq %rax, 0x20(%rsp)
movupd (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
leaq -0x50(%rbp), %rdi
callq 0x1dcb3
jmp 0x1ce48
movl $0x10000, %ecx          # imm = 0x10000
btsl %eax, %ecx
ucomisd %xmm0, %xmm0
movl $0x10001, %eax          # imm = 0x10001
cmovpl %ecx, %eax
movq %rsi, -0x50(%rbp)
movq $-0x1, -0x48(%rbp)
movl %eax, -0x40(%rbp)
jmp 0x1ce48
movq 0x20(%r13), %rax
movq %rax, 0x20(%rsp)
movupd (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
leaq -0x50(%rbp), %rdi
callq 0x1dc54
jmp 0x1ce48
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movaps %xmm0, -0x90(%rbp)
movq 0x20(%r13), %rax
movq %rax, -0x70(%rbp)
movaps %xmm1, -0x80(%rbp)
movq -0x90(%rbp), %rdi
callq 0x1d2d1
movq -0x70(%rbp), %rcx
movq %rcx, 0x20(%rsp)
movapd -0x90(%rbp), %xmm0
movaps -0x80(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
leaq -0x50(%rbp), %rdi
movq %rax, %rsi
movl $0x44, %edx
jmp 0x1d23a
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movaps %xmm0, -0x90(%rbp)
movq 0x20(%r13), %rax
movq %rax, -0x70(%rbp)
movaps %xmm1, -0x80(%rbp)
movq -0x90(%rbp), %rdi
callq 0x1d2d1
movq -0x70(%rbp), %rcx
movq %rcx, 0x20(%rsp)
movapd -0x90(%rbp), %xmm0
movaps -0x80(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
leaq -0x50(%rbp), %rdi
movq %rax, %rsi
movl $0x43, %edx
callq 0x1e6b1
jmp 0x1ce48
xorl %edi, %edi
xorl %esi, %esi
callq 0x48a9f
movq %rax, %rdi
movabsq $-0x4000000000000, %rsi # imm = 0xFFFC000000000000
callq 0x4f9ad
movq %rax, %xmm0
movq %rax, -0x50(%rbp)
shrq $0x2f, %rax
andb $0xf, %al
btsl %eax, %ebx
ucomisd %xmm0, %xmm0
cmovpl %ebx, %r15d
movq $-0x1, -0x48(%rbp)
movl %r15d, -0x40(%rbp)
movq -0x98(%rbp), %rbx
leaq 0x10(%rbp), %r13
jmp 0x1d2c8
leaq 0x10(%rbp), %r13
movq 0x20(%r13), %rax
movq %rax, 0x20(%rsp)
movupd (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
leaq -0x50(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x1d83a
movq -0x98(%rbp), %rbx
andb $-0x2, -0x3d(%rbp)
jmp 0x1ce48