// File: /workspace/github_cpp_makefile_star2_O3/0x0584[P]scmin-plus/src/repl/parser.cpp
// Function: parse_lambda(std::queue<token, std::deque<token, std::allocator<token>>>&, std::shared_ptr<sexpr>&)
sexpr_t parse_lambda(queue<token>& q, sexpr_t& e) {
    if (q.pop(); e or tok.type != token::tok_l_paren) {
        cerr << "lambda args is mal-formatted" << endl;
        return nullptr;
    }
    auto args = parse_tokens(q);
    if (tok.type != token::tok_l_paren) {
        cerr << "lambda body is mal-formatted" << endl;
        return nullptr;
    }
    auto body = parse_tokens(q);
    if (tok.type != token::tok_r_paren) {
        cerr << "lambda is mal-formatted" << endl;
        return nullptr;
    }
    return (e = lambda(args, body));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x1110a
cmpq $0x0, (%r14)
jne 0xfb5d
movq 0x10(%r15), %rax
cmpl $0x0, 0x7c(%rax)
je 0xfbb3
movq 0xa484(%rip), %r14      # 0x19fe8
leaq 0x3d33(%rip), %rsi      # 0x1389e
movl $0x1c, %edx
movq %r14, %rdi
callq 0x3210
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xf87e
movq 0x10(%r15), %rax
cmpl $0x0, 0x7c(%rax)
je 0xfc1c
movq 0xa416(%rip), %r14      # 0x19fe8
leaq 0x3ce2(%rip), %rsi      # 0x138bb
movl $0x1c, %edx
movq %r14, %rdi
callq 0x3210
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0xa3e4(%rip), %rdi      # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0xfcfb
leaq -0x40(%rbp), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xf87e
movq 0x10(%r15), %rax
cmpl $0x1, 0x7c(%rax)
jne 0xfc8d
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x520d
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, -0x30(%rbp)
movq %rcx, (%r14)
movq 0x8(%r14), %rdi
movq %rax, 0x8(%r14)
testq %rdi, %rdi
je 0xfc70
callq 0x4104
movq (%r14), %rcx
movq 0x8(%r14), %rax
movq %rcx, (%rbx)
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0xfcdf
movq 0xa2fd(%rip), %rcx      # 0x19f80
cmpb $0x0, (%rcx)
je 0xfcdb
incl 0x8(%rax)
jmp 0xfcdf
movq 0xa354(%rip), %r14      # 0x19fe8
leaq 0x3c3d(%rip), %rsi      # 0x138d8
movl $0x17, %edx
movq %r14, %rdi
callq 0x3210
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0xa322(%rip), %rdi      # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0xfced
lock
incl 0x8(%rax)
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0xfced
callq 0x4104
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xfcfb
callq 0x4104
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0xfba5
callq 0x4104
jmp 0xfba5
jmp 0xfd16
jmp 0xfd29
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xfd2c
callq 0x4104
jmp 0xfd2c
movq %rax, %rbx
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0xfd3a
callq 0x4104
movq %rbx, %rdi
callq 0x3310