// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/specials.c
// Function: quasiquote
static JanetSlot quasiquote(JanetFopts opts, Janet x, int depth, int level) {
    if (depth == 0) {
        janetc_cerror(opts.compiler, "quasiquote too deeply nested");
        return janetc_cslot(janet_wrap_nil());
    }
    JanetSlot *slots = NULL;
    JanetFopts subopts = opts;
    subopts.flags &= ~JANET_FOPTS_HINT;
    switch (janet_type(x)) {
        default:
            return janetc_cslot(x);
        case JANET_TUPLE: {
            int32_t i, len;
            const Janet *tup = janet_unwrap_tuple(x);
            len = janet_tuple_length(tup);
            if (len > 1 && janet_checktype(tup[0], JANET_SYMBOL)) {
                const uint8_t *head = janet_unwrap_symbol(tup[0]);
                if (!janet_cstrcmp(head, "unquote")) {
                    if (level == 0) {
                        JanetFopts subopts = janetc_fopts_default(opts.compiler);
                        subopts.flags |= JANET_FOPTS_ACCEPT_SPLICE;
                        return janetc_value(subopts, tup[1]);
                    } else {
                        level--;
                    }
                } else if (!janet_cstrcmp(head, "quasiquote")) {
                    level++;
                }
            }
            for (i = 0; i < len; i++)
                janet_v_push(slots, quasiquote(subopts, tup[i], depth - 1, level));
            return qq_slots(opts, slots, (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR)
                            ? JOP_MAKE_BRACKET_TUPLE
                            : JOP_MAKE_TUPLE);
        }
        case JANET_ARRAY: {
            int32_t i;
            JanetArray *array = janet_unwrap_array(x);
            for (i = 0; i < array->count; i++)
                janet_v_push(slots, quasiquote(subopts, array->data[i], depth - 1, level));
            return qq_slots(opts, slots, JOP_MAKE_ARRAY);
        }
        case JANET_TABLE:
        case JANET_STRUCT: {
            const JanetKV *kv = NULL, *kvs = NULL;
            int32_t len, cap = 0;
            janet_dictionary_view(x, &kvs, &len, &cap);
            while ((kv = janet_dictionary_next(kvs, cap, kv))) {
                JanetSlot key = quasiquote(subopts, kv->key, depth - 1, level);
                JanetSlot value =  quasiquote(subopts, kv->value, depth - 1, level);
                key.flags &= ~JANET_SLOT_SPLICED;
                value.flags &= ~JANET_SLOT_SPLICED;
                janet_v_push(slots, key);
                janet_v_push(slots, value);
            }
            return qq_slots(opts, slots,
                            janet_checktype(x, JANET_TABLE) ? JOP_MAKE_TABLE : JOP_MAKE_STRUCT);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x128(%rbp)
movq %rdi, -0x120(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x118(%rbp)
movq %rsi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x63a22
movq -0x118(%rbp), %rax
movq (%rax), %rdi
leaq 0x3260f(%rip), %rsi     # 0x96004
callq 0x1fff0
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x7b460
movq -0x128(%rbp), %rdi
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rsi
callq 0x1ff40
jmp 0x640a4
movq -0x118(%rbp), %rsi
movq $0x0, -0x20(%rbp)
leaq -0x48(%rbp), %rdi
movl $0x28, %edx
callq 0x12680
movl -0x28(%rbp), %eax
andl $0xfffdffff, %eax       # imm = 0xFFFDFFFF
movl %eax, -0x28(%rbp)
movsd -0x8(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x63a5c
jmp 0x63a70
movq -0x8(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
movl %eax, -0x12c(%rbp)
jmp 0x63a7a
xorl %eax, %eax
movl %eax, -0x12c(%rbp)
jmp 0x63a7a
movl -0x12c(%rbp), %eax
movl %eax, -0x130(%rbp)
subl $0x7, %eax
je 0x63d23
jmp 0x63a91
movl -0x130(%rbp), %eax
subl $0x8, %eax
je 0x63ac7
jmp 0x63a9e
movl -0x130(%rbp), %eax
addl $-0x9, %eax
subl $0x2, %eax
jb 0x63e66
jmp 0x63ab2
movq -0x128(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x1ff40
jmp 0x640a4
movq -0x8(%rbp), %rdi
callq 0x7b260
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl -0x10(%rax), %eax
movl %eax, -0x50(%rbp)
cmpl $0x1, -0x50(%rbp)
jle 0x63bf2
xorl %eax, %eax
testb $0x1, %al
jne 0x63af0
jmp 0x63b1f
movq -0x58(%rbp), %rax
movsd (%rax), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x63b05
jmp 0x63b43
movq -0x58(%rbp), %rax
movq (%rax), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x63b43
jmp 0x63bf2
movq -0x58(%rbp), %rcx
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq (%rcx), %rax
movabsq $-0x5800000000000, %rcx # imm = 0xFFFA800000000000
cmpq %rcx, %rax
jne 0x63bf2
movq -0x58(%rbp), %rax
movq (%rax), %rdi
callq 0x7b260
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
leaq 0x30ecd(%rip), %rsi     # 0x94a2b
callq 0x6b2b0
cmpl $0x0, %eax
jne 0x63bd0
cmpl $0x0, -0x10(%rbp)
jne 0x63bc5
movq -0x118(%rbp), %rax
movq (%rax), %rsi
leaq -0x88(%rbp), %rdi
callq 0x1fed0
movq -0x128(%rbp), %rdi
movl -0x68(%rbp), %eax
orl $0x80000, %eax          # imm = 0x80000
movl %eax, -0x68(%rbp)
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x68(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x88(%rbp), %xmm0
movups -0x78(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x21590
jmp 0x640a4
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x63bf0
movq -0x60(%rbp), %rdi
leaq 0x3241e(%rip), %rsi     # 0x95ff9
callq 0x6b2b0
cmpl $0x0, %eax
jne 0x63bee
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x63bf0
jmp 0x63bf2
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x63cce
cmpq $0x0, -0x20(%rbp)
je 0x63c1f
movq -0x20(%rbp), %rax
movl -0x4(%rax), %eax
addl $0x1, %eax
movq -0x20(%rbp), %rcx
cmpl -0x8(%rcx), %eax
jl 0x63c38
movq -0x20(%rbp), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq 0x70760
movq %rax, -0x20(%rbp)
jmp 0x63c3a
jmp 0x63c3a
movq -0x20(%rbp), %rax
movq -0x20(%rbp), %rdx
movl -0x4(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x4(%rdx)
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x138(%rbp)
movq -0x58(%rbp), %rax
movslq -0x4c(%rbp), %rsi
movl -0xc(%rbp), %edx
subl $0x1, %edx
movl -0x10(%rbp), %ecx
movq (%rax,%rsi,8), %rsi
movq -0x28(%rbp), %rdi
movq %rsp, %rax
movq %rdi, 0x20(%rax)
movups -0x48(%rbp), %xmm0
movups -0x38(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0xa0(%rbp), %rdi
callq 0x639b0
movq -0x138(%rbp), %rax
movq -0xa0(%rbp), %rcx
movq %rcx, (%rax)
movq -0x98(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x90(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x63bf9
movq -0x128(%rbp), %rdi
movq -0x118(%rbp), %rcx
movq -0x20(%rbp), %rsi
movq -0x58(%rbp), %rax
movl -0x20(%rax), %r8d
andl $0x10000, %r8d          # imm = 0x10000
movl $0x45, %edx
movl $0x46, %eax
cmpl $0x0, %r8d
cmovnel %eax, %edx
movq 0x20(%rcx), %r8
movq %rsp, %rax
movq %r8, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x640c0
jmp 0x640a4
movq -0x8(%rbp), %rdi
callq 0x7b260
movq %rax, -0xb0(%rbp)
movl $0x0, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
movq -0xb0(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x63e2c
cmpq $0x0, -0x20(%rbp)
je 0x63d6d
movq -0x20(%rbp), %rax
movl -0x4(%rax), %eax
addl $0x1, %eax
movq -0x20(%rbp), %rcx
cmpl -0x8(%rcx), %eax
jl 0x63d86
movq -0x20(%rbp), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq 0x70760
movq %rax, -0x20(%rbp)
jmp 0x63d88
jmp 0x63d88
movq -0x20(%rbp), %rax
movq -0x20(%rbp), %rdx
movl -0x4(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x4(%rdx)
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x140(%rbp)
movq -0xb0(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0xa4(%rbp), %rsi
movl -0xc(%rbp), %edx
subl $0x1, %edx
movl -0x10(%rbp), %ecx
movq (%rax,%rsi,8), %rsi
movq -0x28(%rbp), %rdi
movq %rsp, %rax
movq %rdi, 0x20(%rax)
movups -0x48(%rbp), %xmm0
movups -0x38(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0xc8(%rbp), %rdi
callq 0x639b0
movq -0x140(%rbp), %rax
movq -0xc8(%rbp), %rcx
movq %rcx, (%rax)
movq -0xc0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xb8(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0x63d3d
movq -0x128(%rbp), %rdi
movq -0x118(%rbp), %rcx
movq -0x20(%rbp), %rsi
movq 0x20(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movl $0x40, %edx
callq 0x640c0
jmp 0x640a4
movq $0x0, -0xd0(%rbp)
movq $0x0, -0xd8(%rbp)
movl $0x0, -0xe0(%rbp)
movq -0x8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
leaq -0xdc(%rbp), %rdx
leaq -0xe0(%rbp), %rcx
callq 0x6d330
movq -0xd8(%rbp), %rdi
movl -0xe0(%rbp), %esi
movq -0xd0(%rbp), %rdx
callq 0x6b1e0
movq %rax, -0xd0(%rbp)
cmpq $0x0, %rax
je 0x6404c
movq -0xd0(%rbp), %rax
movl -0xc(%rbp), %edx
subl $0x1, %edx
movl -0x10(%rbp), %ecx
movq (%rax), %rsi
movq -0x28(%rbp), %rdi
movq %rsp, %rax
movq %rdi, 0x20(%rax)
movups -0x48(%rbp), %xmm0
movups -0x38(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0xf8(%rbp), %rdi
callq 0x639b0
movq -0xd0(%rbp), %rax
movl -0xc(%rbp), %edx
subl $0x1, %edx
movl -0x10(%rbp), %ecx
movq 0x8(%rax), %rsi
movq -0x28(%rbp), %rdi
movq %rsp, %rax
movq %rdi, 0x20(%rax)
movups -0x48(%rbp), %xmm0
movups -0x38(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0x110(%rbp), %rdi
callq 0x639b0
movl -0xe8(%rbp), %eax
andl $0xfeffffff, %eax       # imm = 0xFEFFFFFF
movl %eax, -0xe8(%rbp)
movl -0x100(%rbp), %eax
andl $0xfeffffff, %eax       # imm = 0xFEFFFFFF
movl %eax, -0x100(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x63f7d
movq -0x20(%rbp), %rax
movl -0x4(%rax), %eax
addl $0x1, %eax
movq -0x20(%rbp), %rcx
cmpl -0x8(%rcx), %eax
jl 0x63f96
movq -0x20(%rbp), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq 0x70760
movq %rax, -0x20(%rbp)
jmp 0x63f98
jmp 0x63f98
movq -0x20(%rbp), %rax
movq -0x20(%rbp), %rdx
movl -0x4(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x4(%rdx)
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0xf8(%rbp), %rcx
movq %rcx, (%rax)
movq -0xf0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xe8(%rbp), %rcx
movq %rcx, 0x10(%rax)
cmpq $0x0, -0x20(%rbp)
je 0x63fef
movq -0x20(%rbp), %rax
movl -0x4(%rax), %eax
addl $0x1, %eax
movq -0x20(%rbp), %rcx
cmpl -0x8(%rcx), %eax
jl 0x64008
movq -0x20(%rbp), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq 0x70760
movq %rax, -0x20(%rbp)
jmp 0x6400a
jmp 0x6400a
movq -0x20(%rbp), %rax
movq -0x20(%rbp), %rdx
movl -0x4(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x4(%rdx)
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0x110(%rbp), %rcx
movq %rcx, (%rax)
movq -0x108(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x100(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x63ea4
movq -0x128(%rbp), %rdi
movq -0x118(%rbp), %rcx
movq -0x20(%rbp), %rsi
movabsq $-0x800000000000, %r8   # imm = 0xFFFF800000000000
andq -0x8(%rbp), %r8
movabsq $-0x3800000000000, %r9  # imm = 0xFFFC800000000000
movl $0x43, %edx
movl $0x44, %eax
cmpq %r9, %r8
cmovel %eax, %edx
movq 0x20(%rcx), %r8
movq %rsp, %rax
movq %r8, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x640c0
movq -0x120(%rbp), %rax
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
nopw %cs:(%rax,%rax)