// File: /workspace/github_cpp_makefile_star2_O1/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 0x116f2
cmpq $0x0, (%r14)
jne 0x10149
movq 0x10(%r15), %rax
cmpl $0x0, 0x7c(%rax)
je 0x1019f
movq 0x9e98(%rip), %r14      # 0x19fe8
leaq 0x3747(%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 0xfe61
movq 0x10(%r15), %rax
cmpl $0x0, 0x7c(%rax)
je 0x10208
movq 0x9e2a(%rip), %r14      # 0x19fe8
leaq 0x36f6(%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 0x9df8(%rip), %rdi      # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x102e0
leaq -0x40(%rbp), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xfe61
movq 0x10(%r15), %rax
cmpl $0x1, 0x7c(%rax)
jne 0x10272
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x5279
movaps -0x30(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x30(%rbp)
movq 0x8(%r14), %rdi
movups %xmm0, (%r14)
testq %rdi, %rdi
je 0x1024e
callq 0x4114
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x102c4
movq 0x9d18(%rip), %rcx      # 0x19f80
cmpb $0x0, (%rcx)
je 0x102c0
incl 0x8(%rax)
jmp 0x102c4
movq 0x9d6f(%rip), %r14      # 0x19fe8
leaq 0x3658(%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 0x9d3d(%rip), %rdi      # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x102d2
lock
incl 0x8(%rax)
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0x102d2
callq 0x4114
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x102e0
callq 0x4114
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x10191
callq 0x4114
jmp 0x10191
jmp 0x102fb
jmp 0x1030e
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x10311
callq 0x4114
jmp 0x10311
movq %rax, %rbx
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x1031f
callq 0x4114
movq %rbx, %rdi
callq 0x3310