// File: /workspace/github_cpp_makefile_star2_O2/pfnet-research[P]pml/src/parser.cpp
// Function: parser::let_expr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long&)
expr_result_t let_expr(std::string const& input, size_t& pos) {

    EXPECT(let_token, Let);
    EXPECT(var_token, Ident);
    EXPECT(eq_token, Eq);

    auto init_result = expr(input, pos);
    if (init_result.is_error())
        return init_result;
    auto init = init_result.ok();

    EXPECT(in_token, In);

    auto body_result = expr(input, pos);
    if (body_result.is_error())
        return body_result;
    auto body = body_result.ok();

    return expr_result_t::ok(make<ast::let_expr_t>(
                var_token.lexime, init, body
            ));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r15
movq (%rdx), %rdx
leaq 0x150(%rsp), %rbx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x15bc7
cmpb $0x0, 0x30(%rbx)
je 0x18870
leaq 0x150(%rsp), %rdi
callq 0x1ac66
leaq 0x228(%rsp), %rdi
movq %rax, %rsi
callq 0x1acbe
leaq 0x238(%rsp), %rbx
movq 0x8(%rbx), %rdx
addq -0x8(%rbx), %rdx
movq %rdx, (%r13)
leaq 0x118(%rsp), %rdi
pushq $0xa
popq %rcx
movq %rbp, %rsi
callq 0x15bc7
cmpb $0x0, 0x148(%rsp)
je 0x1888d
leaq 0x118(%rsp), %rdi
callq 0x1ac66
leaq 0x1f8(%rsp), %rdi
movq %rax, %rsi
callq 0x1acbe
leaq 0x208(%rsp), %r14
movq 0x8(%r14), %rdx
addq -0x8(%r14), %rdx
movq %rdx, (%r13)
leaq 0xe0(%rsp), %rdi
pushq $0xd
popq %rcx
movq %rbp, %rsi
callq 0x15bc7
cmpb $0x0, 0x110(%rsp)
je 0x188aa
leaq 0xe0(%rsp), %rdi
callq 0x1ac66
leaq 0x1c8(%rsp), %rdi
movq %rax, %rsi
callq 0x1acbe
leaq 0x1d8(%rsp), %r12
movq 0x8(%r12), %rax
addq -0x8(%r12), %rax
movq %rax, (%r13)
leaq 0xa8(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x18a5b
cmpb $0x0, 0xd8(%rsp)
je 0x188c4
leaq 0xa8(%rsp), %rdi
callq 0x1b196
movq %rsp, %rdi
movq %rax, %rsi
callq 0xbde0
movq (%r13), %rdx
leaq 0x70(%rsp), %rdi
pushq $0x2
popq %rcx
movq %rbp, %rsi
callq 0x15bc7
cmpb $0x0, 0xa0(%rsp)
je 0x188d6
leaq 0x70(%rsp), %rdi
callq 0x1ac66
leaq 0x188(%rsp), %rdi
movq %rax, %rsi
callq 0x1acbe
leaq 0x198(%rsp), %rcx
movq 0x8(%rcx), %rax
addq -0x8(%rcx), %rax
movq %rax, (%r13)
leaq 0x38(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x18a5b
cmpb $0x0, 0x68(%rsp)
je 0x188ed
leaq 0x38(%rsp), %rdi
callq 0x1b196
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %rax, %rsi
callq 0xbde0
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %r14, %rsi
movq %r13, %rcx
callq 0x1ca2d
leaq 0x1c0(%rsp), %rdi
leaq 0x28(%rsp), %r13
andq $0x0, (%rdi)
movb $0x1, 0x30(%r15)
movaps -0x8(%r13), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x8(%r13)
movups %xmm0, (%r15)
andq $0x0, -0x8(%rdi)
callq 0xa248
movq %r13, %rdi
callq 0xa248
leaq 0x18(%rsp), %rdi
callq 0xa248
jmp 0x188fa
leaq 0x150(%rsp), %rdi
callq 0x1ac0e
movq %r15, %rdi
movq %rax, %rsi
callq 0x1b144
jmp 0x18967
leaq 0x118(%rsp), %rdi
callq 0x1ac0e
movq %r15, %rdi
movq %rax, %rsi
callq 0x1b144
jmp 0x18952
leaq 0xe0(%rsp), %rdi
callq 0x1ac0e
movq %r15, %rdi
movq %rax, %rsi
callq 0x1b144
jmp 0x1893d
leaq 0xa8(%rsp), %rsi
movq %r15, %rdi
callq 0x1b172
jmp 0x18928
leaq 0x70(%rsp), %rdi
callq 0x1ac0e
movq %r15, %rdi
movq %rax, %rsi
callq 0x1b144
jmp 0x18911
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0x1b172
leaq 0x38(%rsp), %rdi
callq 0x13e4a
leaq 0x198(%rsp), %rdi
callq 0x9130
leaq 0x80(%rsp), %rdi
callq 0x9130
leaq 0x8(%rsp), %rdi
callq 0xa248
leaq 0xa8(%rsp), %rdi
callq 0x13e4a
movq %r12, %rdi
callq 0x9130
leaq 0xf0(%rsp), %rdi
callq 0x9130
movq %r14, %rdi
callq 0x9130
leaq 0x128(%rsp), %rdi
callq 0x9130
movq %rbx, %rdi
callq 0x9130
leaq 0x160(%rsp), %rdi
callq 0x9130
movq %r15, %rax
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x18(%rsp), %rdi
callq 0xa248
jmp 0x1899d
jmp 0x1899a
movq %rax, %r15
leaq 0x38(%rsp), %rdi
callq 0x13e4a
jmp 0x189ac
movq %rax, %r15
leaq 0x198(%rsp), %rdi
callq 0x9130
jmp 0x189c0
jmp 0x189bd
movq %rax, %r15
leaq 0x80(%rsp), %rdi
callq 0x9130
jmp 0x189d2
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0xa248
jmp 0x189e3
jmp 0x189e0
movq %rax, %r15
leaq 0xa8(%rsp), %rdi
callq 0x13e4a
jmp 0x189f5
movq %rax, %r15
movq %r12, %rdi
callq 0x9130
jmp 0x18a04
jmp 0x18a01
movq %rax, %r15
leaq 0xf0(%rsp), %rdi
callq 0x9130
movq %r14, %rdi
callq 0x9130
jmp 0x18a25
movq %rax, %r15
jmp 0x18a11
jmp 0x18a22
movq %rax, %r15
leaq 0x128(%rsp), %rdi
callq 0x9130
movq %rbx, %rdi
callq 0x9130
jmp 0x18a46
movq %rax, %r15
jmp 0x18a32
jmp 0x18a43
movq %rax, %r15
leaq 0x160(%rsp), %rdi
callq 0x9130
movq %r15, %rdi
callq 0x94d0