// File: 0x0584[P]scmin-plus/src/repl/parser.cpp
// Function: parse_quote(std::queue<token, std::deque<token, std::allocator<token>>>&, bool)
sexpr_t parse_quote(queue<token>& q, bool quasi) {
    string sy;

    switch (tok.type) {
    case token::tok_unquote:    sy = "unquote"; break;
    case token::tok_unquote_sp: sy = "unquote-splicing"; break;
    case token::tok_quote:      sy = "quote"; break;
    case token::tok_quasi:      sy = "quasiquote"; break;
    default: break;
    }
    if (q.pop(); q.size() == 0 || tok.type == token::tok_r_paren) {
        cerr << "parsing error: quotes are mal formed!" << endl;
        return nullptr;
    }
    sexpr_t e = parse_tokens(q, quasi);
    if (not e or e->isnil())
        return e;
    return cons(symb(sy), cons(e, nil()));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0xa0(%rbp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, -0x98(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x33d0
movq -0x10(%rbp), %rdi
callq 0x1b7a0
movq %rax, -0x90(%rbp)
jmp 0x19ee6
movq -0x90(%rbp), %rax
movl 0x7c(%rax), %eax
addl $-0x4, %eax
movl %eax, %ecx
movq %rcx, -0xa8(%rbp)
subl $0x3, %eax
ja 0x19f79
movq -0xa8(%rbp), %rax
leaq 0x7919(%rip), %rcx      # 0x21828
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1a16f
leaq 0x7402(%rip), %rsi      # 0x21332
leaq -0x38(%rbp), %rdi
callq 0x33c0
jmp 0x19f3b
jmp 0x19f7b
leaq 0x73f6(%rip), %rsi      # 0x2133a
leaq -0x38(%rbp), %rdi
callq 0x33c0
jmp 0x19f4f
jmp 0x19f7b
leaq 0x79dd(%rip), %rsi      # 0x21935
leaq -0x38(%rbp), %rdi
callq 0x33c0
jmp 0x19f63
jmp 0x19f7b
leaq 0x79c4(%rip), %rsi      # 0x21930
leaq -0x38(%rbp), %rdi
callq 0x33c0
jmp 0x19f77
jmp 0x19f7b
jmp 0x19f7b
movq -0x10(%rbp), %rdi
callq 0x1b7c0
jmp 0x19f86
movq -0x10(%rbp), %rdi
callq 0x1b7e0
movq %rax, -0xb0(%rbp)
jmp 0x19f98
movq -0xb0(%rbp), %rax
cmpq $0x0, %rax
je 0x19fc4
movq -0x10(%rbp), %rdi
callq 0x1b7a0
movq %rax, -0xb8(%rbp)
jmp 0x19fb7
movq -0xb8(%rbp), %rax
cmpl $0x1, 0x7c(%rax)
jne 0x1a011
movq 0x14025(%rip), %rdi     # 0x2dff0
leaq 0x7866(%rip), %rsi      # 0x21838
callq 0x32c0
movq %rax, -0xc0(%rbp)
jmp 0x19fe0
movq -0xc0(%rbp), %rdi
movq 0x13fa2(%rip), %rsi     # 0x2df90
callq 0x32f0
jmp 0x19ff5
movq -0xa0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4570
movl $0x1, -0x48(%rbp)
jmp 0x1a156
movq -0x10(%rbp), %rsi
movzbl -0x11(%rbp), %edx
andl $0x1, %edx
leaq -0x58(%rbp), %rdi
callq 0x1a190
jmp 0x1a027
leaq -0x58(%rbp), %rdi
callq 0xb5c0
testb $0x1, %al
jne 0x1a036
jmp 0x1a05b
leaq -0x58(%rbp), %rdi
callq 0x4400
movq %rax, %rdi
callq 0x7270
movb %al, -0xc1(%rbp)
jmp 0x1a04f
movb -0xc1(%rbp), %al
testb $0x1, %al
jne 0x1a05b
jmp 0x1a088
movq -0xa0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xa6f0
movl $0x1, -0x48(%rbp)
jmp 0x1a140
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1a14b
leaq -0x68(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x7920
jmp 0x1a097
leaq -0x88(%rbp), %rdi
callq 0x78f0
jmp 0x1a0a5
leaq -0x78(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x88(%rbp), %rdx
callq 0x7a40
jmp 0x1a0bb
movq -0xa0(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq -0x78(%rbp), %rdx
callq 0x7a40
jmp 0x1a0d1
leaq -0x78(%rbp), %rdi
callq 0x4450
leaq -0x88(%rbp), %rdi
callq 0x4450
leaq -0x68(%rbp), %rdi
callq 0x4450
movl $0x1, -0x48(%rbp)
jmp 0x1a140
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1a135
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1a129
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x4450
leaq -0x88(%rbp), %rdi
callq 0x4450
leaq -0x68(%rbp), %rdi
callq 0x4450
jmp 0x1a14b
leaq -0x58(%rbp), %rdi
callq 0x4450
jmp 0x1a156
leaq -0x58(%rbp), %rdi
callq 0x4450
jmp 0x1a16f
leaq -0x38(%rbp), %rdi
callq 0x31d0
movq -0x98(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x31d0
movq -0x40(%rbp), %rdi
callq 0x34f0
nopw %cs:(%rax,%rax)