// File: /workspace/github_c_makefile_star2_O3/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 $0xd8, %rsp
movq %rdi, %r14
movabsq $-0x77fffffffffff, %rbx # imm = 0xFFF8800000000001
movq 0x10(%rbp), %r13
movq 0x50(%r13), %rdx
movl 0x58(%r13), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x58(%r13)
cmpl $0x1, 0x48(%r13)
jne 0x1c848
movq %rbx, %rdi
callq 0x4ece6
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(%r14)
movq $-0x1, 0x8(%r14)
movq %rax, (%r14)
movq %r14, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x2, %eax
jge 0x1c86e
leaq 0x4ba3f(%rip), %rdi     # 0x68293
callq 0x4482c
cmpl $0x1, 0x48(%r13)
je 0x1c7f9
movl $0x1, 0x48(%r13)
movq %rax, 0x30(%r13)
jmp 0x1c7f9
movq %rsi, %r12
movq %rdx, -0x38(%rbp)
movq %r14, -0x30(%rbp)
movabsq $-0x800000000000, %r14  # imm = 0xFFFF800000000000
movl $0xffffff38, %ebx       # imm = 0xFFFFFF38
movq %r13, -0x90(%rbp)
cmpl $0x1, 0x48(%r13)
je 0x1cbfd
movq %r12, %rax
andq %r14, %rax
movabsq $-0x4000000000000, %rcx # imm = 0xFFFC000000000000
cmpq %rcx, %rax
jne 0x1cbfd
movq %r12, %rdi
callq 0x4ebc4
cmpl $0x0, -0x10(%rax)
je 0x1cbfd
movq %rax, %r15
movl -0x8(%rax), %eax
testl %eax, %eax
js 0x1c8db
movl %eax, 0x50(%r13)
movl -0x4(%r15), %eax
movl %eax, 0x54(%r13)
testb $0x1, -0x1e(%r15)
jne 0x1cbfd
movq (%r15), %rdi
movq %rdi, %rax
andq %r14, %rax
movabsq $-0x5800000000000, %rcx # imm = 0xFFFA800000000000
cmpq %rcx, %rax
jne 0x1cbfd
movl %ebx, -0x9c(%rbp)
movq %r12, -0x88(%rbp)
callq 0x4ebc4
movq %rax, %r12
movq %rax, %rdi
callq 0x4122b
testq %rax, %rax
jne 0x1cb33
movq 0x18(%r13), %rdi
movq %r12, %rsi
leaq -0x80(%rbp), %rdx
callq 0x49680
cmpl $0x5, %eax
je 0x1c946
cmpl $0x3, %eax
jne 0x1cbf6
movq -0x80(%rbp), %rdi
movq %rdi, %rax
andq %r14, %rax
movabsq $-0x2000000000000, %rcx # imm = 0xFFFE000000000000
cmpq %rcx, %rax
jne 0x1cbf6
callq 0x4ebc4
movq %rax, %rbx
movl -0x10(%r15), %r14d
leal -0x1(%r14), %r13d
addq $0x8, %r15
movq %rax, %rdi
movl $0x40, %esi
movl %r13d, %edx
movq %r15, %rcx
callq 0x295e4
testq %rax, %rax
je 0x1cb74
movq %rax, %r15
movq -0x90(%rbp), %r12
movq 0x18(%r12), %rax
movq %rax, 0x28(%r15)
callq 0x2bafa
movl %eax, -0x98(%rbp)
leaq 0x37d68(%rip), %rdi     # 0x54720
callq 0x47261
movq %rax, %rdi
movabsq $-0x5000000000000, %r14 # imm = 0xFFFB000000000000
movq %r14, %rsi
callq 0x4ed39
movq 0x18(%r12), %rdi
movq %rax, -0xa8(%rbp)
movq %rax, %rsi
movq -0x88(%rbp), %rdx
callq 0x476f0
leaq 0x37d37(%rip), %rdi     # 0x5472b
callq 0x47261
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %rax, %r14
movq 0x60(%r12), %rdi
testq %rdi, %rdi
je 0x1ca33
movq 0x18(%r12), %r13
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
callq 0x4ed7e
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x476f0
movabsq $-0x77fffffffffff, %rbx # imm = 0xFFF8800000000001
movq %rbx, %rdi
callq 0x4ece6
movq %r15, %rdi
movq %rax, %rsi
leaq -0x50(%rbp), %rdx
callq 0x4b6c1
movl %eax, -0x94(%rbp)
movq %r14, %r13
movq 0x18(%r12), %r14
movq %rbx, %rdi
callq 0x4ece6
movq %r14, %rdi
movq -0xa8(%rbp), %rsi
movq %rax, %rdx
callq 0x476f0
movq 0x18(%r12), %rbx
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x4ece6
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x476f0
movl -0x98(%rbp), %edi
callq 0x2bb21
movq -0x50(%rbp), %r12
cmpl $0x0, -0x94(%rbp)
movl -0x9c(%rbp), %ebx
jne 0x1cbc7
incl %ebx
movq -0x90(%rbp), %r13
movabsq $-0x800000000000, %r14  # imm = 0xFFFF800000000000
jne 0x1c88f
leaq 0x37ae2(%rip), %rdi     # 0x545c2
callq 0x4482c
cmpl $0x1, 0x48(%r13)
je 0x1caf8
movl $0x1, 0x48(%r13)
movq %rax, 0x30(%r13)
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x4ece6
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
movq -0x30(%rbp), %r14
jmp 0x1c824
movq %rax, %rbx
movq -0x88(%rbp), %rdi
callq 0x4ebc4
movl -0x10(%rax), %esi
decl %esi
leaq 0x8(%rax), %rdx
leaq 0x10(%rbp), %rcx
movq 0x20(%rcx), %rax
movq %rax, 0x20(%rsp)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq -0x50(%rbp), %rdi
callq *0x8(%rbx)
jmp 0x1cf3b
movq 0x10(%rbx), %rax
movl 0x64(%rax), %esi
movl 0x68(%rax), %ebx
xorl %eax, %eax
testl %esi, %esi
js 0x1cb9a
cmpl %esi, %r14d
jg 0x1cb9a
leaq 0x37b2b(%rip), %rdi     # 0x546bb
movl %r13d, %edx
xorl %eax, %eax
callq 0x3f652
testl %ebx, %ebx
js 0x1cbb6
cmpl %ebx, %r13d
jle 0x1cbb6
leaq 0x37b44(%rip), %rdi     # 0x546ee
movl %ebx, %esi
movl %r13d, %edx
xorl %eax, %eax
callq 0x3f652
movq -0x90(%rbp), %r13
movq $0x0, 0x38(%r13)
jmp 0x1cbe3
leaq 0x37b69(%rip), %rdi     # 0x54737
movq %r12, %rsi
xorl %eax, %eax
callq 0x3f652
movq -0x90(%rbp), %r13
movq %r15, 0x38(%r13)
cmpl $0x1, 0x48(%r13)
je 0x1cbf6
movl $0x1, 0x48(%r13)
movq %rax, 0x30(%r13)
movq -0x88(%rbp), %r12
movq %r12, %xmm0
movq %r12, %rax
shrq $0x2f, %rax
andl $0xf, %eax
xorl %ecx, %ecx
ucomisd %xmm0, %xmm0
cmovpl %eax, %ecx
addl $-0x5, %ecx
cmpl $0x6, %ecx
ja 0x1ce0b
leaq 0x3771c(%rip), %rdx     # 0x54344
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq %r12, %rdi
callq 0x4ebc4
leaq -0x80(%rbp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x1c14e
movq 0x10(%rbx), %rax
movq %rax, -0x40(%rbp)
movupd (%rbx), %xmm0
movapd %xmm0, -0x50(%rbp)
jmp 0x1cf3b
movq %r13, -0x80(%rbp)
movl $0x0, -0x60(%rbp)
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x4ece6
movq %rax, %xmm0
movq %rax, -0x78(%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, %r14d         # imm = 0x10001
cmovnpl %r14d, %ecx
movq $-0x1, -0x70(%rbp)
movl %ecx, -0x68(%rbp)
movq %r12, %rdi
callq 0x4ebc4
cmpl $0x0, -0x10(%rax)
je 0x1d004
movq %rax, %r15
testb $0x1, -0x1e(%rax)
jne 0x1d047
movq (%r15), %rsi
movq -0x60(%rbp), %rax
movq %rax, 0x20(%rsp)
movups -0x80(%rbp), %xmm0
movups -0x70(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq -0xc0(%rbp), %rbx
movq %rbx, %rdi
callq 0x1c7be
movl $0xd, -0x60(%rbp)
movq %r15, %rsi
addq $0x8, %rsi
movl -0x10(%r15), %edx
decl %edx
movq %r13, %rdi
callq 0x1c6b8
movq 0x10(%rbx), %rcx
movq %rcx, 0x38(%rsp)
movups (%rbx), %xmm0
movups %xmm0, 0x28(%rsp)
leaq 0x10(%rbp), %rdx
movq 0x20(%rdx), %rcx
movq %rcx, 0x20(%rsp)
movupd (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
leaq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x1d606
testb $0xb, 0x12(%rbx)
jne 0x1d072
cmpl $0x0, -0xb4(%rbp)
jns 0x1d072
movl -0xb8(%rbp), %esi
movq (%r13), %rdi
addq $0x30, %rdi
callq 0x40ac6
jmp 0x1d072
leaq 0x10(%rbp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movaps %xmm0, -0x80(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0x60(%rbp)
movaps %xmm1, -0x70(%rbp)
movq -0x80(%rbp), %rbx
movq %r12, %rdi
callq 0x4ebc4
movq 0x18(%rax), %rdi
movl 0x10(%rax), %esi
callq 0x44754
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
movq %rax, %rdi
callq 0x4ed39
leaq -0xc0(%rbp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
movl $0x1, %edx
callq 0x1c6b8
movq -0x60(%rbp), %rcx
movq %rcx, 0x20(%rsp)
movapd -0x80(%rbp), %xmm0
movaps -0x70(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
leaq -0x50(%rbp), %rdi
movq %rax, %rsi
movl $0x41, %edx
jmp 0x1cf36
movl $0x10000, %ecx          # imm = 0x10000
btsl %eax, %ecx
ucomisd %xmm0, %xmm0
movl $0x10001, %eax          # imm = 0x10001
cmovpl %ecx, %eax
movq %r12, -0x50(%rbp)
movq $-0x1, -0x48(%rbp)
movl %eax, -0x40(%rbp)
jmp 0x1cf3b
leaq 0x10(%rbp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movaps %xmm0, -0x80(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0x60(%rbp)
movaps %xmm1, -0x70(%rbp)
movq -0x80(%rbp), %rbx
movq %r12, %rdi
callq 0x4ebc4
movq 0x18(%rax), %rsi
movl 0x10(%rax), %edx
movq %rbx, %rdi
callq 0x1c6b8
movq -0x60(%rbp), %rcx
movq %rcx, 0x20(%rsp)
movapd -0x80(%rbp), %xmm0
movaps -0x70(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
leaq -0x50(%rbp), %rdi
movq %rax, %rsi
movl $0x40, %edx
jmp 0x1cf36
leaq 0x10(%rbp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movaps %xmm0, -0x80(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0x60(%rbp)
movaps %xmm1, -0x70(%rbp)
movq -0x80(%rbp), %rdi
movq %r12, %rsi
callq 0x1d083
movq -0x60(%rbp), %rcx
movq %rcx, 0x20(%rsp)
movapd -0x80(%rbp), %xmm0
movaps -0x70(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
leaq -0x50(%rbp), %rdi
movq %rax, %rsi
movl $0x44, %edx
jmp 0x1cf36
leaq 0x10(%rbp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movaps %xmm0, -0x80(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0x60(%rbp)
movaps %xmm1, -0x70(%rbp)
movq -0x80(%rbp), %rdi
movq %r12, %rsi
callq 0x1d083
movq -0x60(%rbp), %rcx
movq %rcx, 0x20(%rsp)
movapd -0x80(%rbp), %xmm0
movaps -0x70(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
leaq -0x50(%rbp), %rdi
movq %rax, %rsi
movl $0x43, %edx
callq 0x1e347
movq -0x30(%rbp), %r14
movq -0x38(%rbp), %r15
cmpl $0x1, 0x48(%r13)
jne 0x1cf59
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
jmp 0x1c7fc
leaq 0x10(%rbp), %rax
movl 0x20(%rax), %eax
btl $0x10, %eax
jae 0x1cf9e
movq -0x40(%rbp), %rax
movq %rax, 0x10(%rsp)
movaps -0x50(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq -0x80(%rbp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1c5c0
movq 0x10(%rbx), %rax
movq %rax, -0x40(%rbp)
movupd (%rbx), %xmm0
movapd %xmm0, -0x50(%rbp)
leaq 0x10(%rbp), %rax
movl 0x20(%rax), %eax
btl $0x11, %eax
jae 0x1cfe5
movq -0x40(%rbp), %rax
movq %rax, 0x28(%rsp)
movaps -0x50(%rbp), %xmm0
movups %xmm0, 0x18(%rsp)
leaq 0x10(%rbp), %rbx
movq 0x18(%rbx), %rax
movq %rax, 0x10(%rsp)
movups 0x8(%rbx), %xmm0
movups %xmm0, (%rsp)
movq %r13, %rdi
callq 0x217fb
movq 0x18(%rbx), %rax
movq %rax, -0x40(%rbp)
movupd 0x8(%rbx), %xmm0
movapd %xmm0, -0x50(%rbp)
movq %r15, 0x50(%r13)
incl 0x58(%r13)
movq -0x40(%rbp), %rax
movq %rax, 0x10(%r14)
movapd -0x50(%rbp), %xmm0
movupd %xmm0, (%r14)
jmp 0x1c833
xorl %edi, %edi
xorl %esi, %esi
callq 0x47fef
movq %rax, %rdi
movabsq $-0x4000000000000, %rsi # imm = 0xFFFC000000000000
callq 0x4ed39
movq %rax, %xmm0
movq %rax, -0x50(%rbp)
shrq $0x2f, %rax
andb $0xf, %al
btsl %eax, %ebx
ucomisd %xmm0, %xmm0
cmovpl %ebx, %r14d
movq $-0x1, -0x48(%rbp)
movl %r14d, -0x40(%rbp)
jmp 0x1d072
leaq 0x10(%rbp), %rcx
movq 0x20(%rcx), %rax
movq %rax, 0x20(%rsp)
movupd (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
leaq -0x50(%rbp), %rdi
movq %r12, %rsi
callq 0x1d5ce
movq -0x30(%rbp), %r14
movq -0x38(%rbp), %r15
andb $-0x2, -0x3d(%rbp)
jmp 0x1cf43