// File: /workspace/github_cpp_makefile_star2_O2/pfnet-research[P]pml/src/parser.cpp
// Function: parser::letfun_expr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long&)
expr_result_t letfun_expr(std::string const& input, size_t& pos) {
    EXPECT(letfun_token, LetFun);
    EXPECT(ident_token, Ident);
    auto name = ident_token.lexime;
    auto depty_result = dependent_type(input, pos);
    if (depty_result.is_error())
        return depty_result.convert<ptr<ast::expr_t>>();
    auto type = depty_result.ok();

    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::letfun_expr_t>(name, type, init, body));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x318, %rsp            # imm = 0x318
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r15
movq (%rdx), %rdx
leaq 0x168(%rsp), %rbx
pushq $0x1
popq %rcx
movq %rbx, %rdi
callq 0x15bc7
cmpb $0x0, 0x30(%rbx)
je 0x18d89
leaq 0x168(%rsp), %rdi
callq 0x1ac66
leaq 0x2e8(%rsp), %rdi
movq %rax, %rsi
callq 0x1acbe
leaq 0x2f8(%rsp), %rbx
movq 0x8(%rbx), %rdx
addq -0x8(%rbx), %rdx
movq %rdx, (%r13)
leaq 0x130(%rsp), %rdi
pushq $0xa
popq %rcx
movq %rbp, %rsi
callq 0x15bc7
cmpb $0x0, 0x160(%rsp)
je 0x18da6
leaq 0x130(%rsp), %rdi
callq 0x1ac66
leaq 0x2b8(%rsp), %rdi
movq %rax, %rsi
callq 0x1acbe
leaq 0x2c8(%rsp), %r14
movq 0x8(%r14), %rax
addq -0x8(%r14), %rax
movq %rax, (%r13)
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x93a0
leaq 0x1d0(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x18114
cmpb $0x0, 0x220(%rsp)
je 0x18dc3
leaq 0x1d0(%rsp), %rdi
callq 0x1b20a
leaq 0x238(%rsp), %rdi
movq %rax, %rsi
callq 0xc05e
movq (%r13), %rdx
leaq 0xf8(%rsp), %rdi
pushq $0xd
popq %rcx
movq %rbp, %rsi
callq 0x15bc7
cmpb $0x0, 0x128(%rsp)
je 0x18dd8
leaq 0xf8(%rsp), %rdi
callq 0x1ac66
leaq 0x288(%rsp), %rdi
movq %rax, %rsi
callq 0x1acbe
leaq 0x298(%rsp), %r12
movq 0x8(%r12), %rax
addq -0x8(%r12), %rax
movq %rax, (%r13)
leaq 0xc0(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x18a5b
cmpb $0x0, 0xf0(%rsp)
je 0x18df2
leaq 0xc0(%rsp), %rdi
callq 0x1b196
movq %rsp, %rdi
movq %rax, %rsi
callq 0xbde0
movq (%r13), %rdx
leaq 0x88(%rsp), %rdi
pushq $0x2
popq %rcx
movq %rbp, %rsi
callq 0x15bc7
cmpb $0x0, 0xb8(%rsp)
je 0x18e04
leaq 0x88(%rsp), %rdi
callq 0x1ac66
leaq 0x1a0(%rsp), %rdi
movq %rax, %rsi
callq 0x1acbe
leaq 0x1b0(%rsp), %rcx
movq 0x8(%rcx), %rax
addq -0x8(%rcx), %rax
movq %rax, (%r13)
leaq 0x50(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x18a5b
cmpb $0x0, 0x80(%rsp)
je 0x18e1e
leaq 0x50(%rsp), %rdi
callq 0x1b196
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %rax, %rsi
callq 0xbde0
leaq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x238(%rsp), %rdx
movq %rsp, %rcx
movq %r13, %r8
callq 0x1ccf7
leaq 0x230(%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 0x18e2b
leaq 0x168(%rsp), %rdi
callq 0x1ac0e
movq %r15, %rdi
movq %rax, %rsi
callq 0x1b144
jmp 0x18ebc
leaq 0x130(%rsp), %rdi
callq 0x1ac0e
movq %r15, %rdi
movq %rax, %rsi
callq 0x1b144
jmp 0x18ea7
leaq 0x1d0(%rsp), %rsi
movq %r15, %rdi
callq 0x1b1ee
jmp 0x18e88
leaq 0xf8(%rsp), %rdi
callq 0x1ac0e
movq %r15, %rdi
movq %rax, %rsi
callq 0x1b144
jmp 0x18e6e
leaq 0xc0(%rsp), %rsi
movq %r15, %rdi
callq 0x1b172
jmp 0x18e59
leaq 0x88(%rsp), %rdi
callq 0x1ac0e
movq %r15, %rdi
movq %rax, %rsi
callq 0x1b144
jmp 0x18e42
leaq 0x50(%rsp), %rsi
movq %r15, %rdi
callq 0x1b172
leaq 0x50(%rsp), %rdi
callq 0x13e4a
leaq 0x1b0(%rsp), %rdi
callq 0x9130
leaq 0x98(%rsp), %rdi
callq 0x9130
leaq 0x8(%rsp), %rdi
callq 0xa248
leaq 0xc0(%rsp), %rdi
callq 0x13e4a
movq %r12, %rdi
callq 0x9130
leaq 0x108(%rsp), %rdi
callq 0x9130
leaq 0x238(%rsp), %rdi
callq 0xc5c6
leaq 0x1d0(%rsp), %rdi
callq 0x1fef8
leaq 0x30(%rsp), %rdi
callq 0x9130
movq %r14, %rdi
callq 0x9130
leaq 0x140(%rsp), %rdi
callq 0x9130
movq %rbx, %rdi
callq 0x9130
leaq 0x178(%rsp), %rdi
callq 0x9130
movq %r15, %rax
addq $0x318, %rsp            # imm = 0x318
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x18(%rsp), %rdi
callq 0xa248
jmp 0x18ef2
jmp 0x18eef
movq %rax, %r15
leaq 0x50(%rsp), %rdi
callq 0x13e4a
jmp 0x18f01
movq %rax, %r15
leaq 0x1b0(%rsp), %rdi
callq 0x9130
jmp 0x18f15
jmp 0x18f12
movq %rax, %r15
leaq 0x98(%rsp), %rdi
callq 0x9130
jmp 0x18f27
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0xa248
jmp 0x18f38
jmp 0x18f35
movq %rax, %r15
leaq 0xc0(%rsp), %rdi
callq 0x13e4a
jmp 0x18f4a
movq %rax, %r15
movq %r12, %rdi
callq 0x9130
jmp 0x18f59
jmp 0x18f56
movq %rax, %r15
leaq 0x108(%rsp), %rdi
callq 0x9130
leaq 0x238(%rsp), %rdi
callq 0xc5c6
jmp 0x18f7f
movq %rax, %r15
jmp 0x18f66
jmp 0x18f7c
movq %rax, %r15
leaq 0x1d0(%rsp), %rdi
callq 0x1fef8
leaq 0x30(%rsp), %rdi
callq 0x9130
movq %r14, %rdi
callq 0x9130
jmp 0x18faf
movq %rax, %r15
jmp 0x18f8c
movq %rax, %r15
jmp 0x18f96
jmp 0x18fac
movq %rax, %r15
leaq 0x140(%rsp), %rdi
callq 0x9130
movq %rbx, %rdi
callq 0x9130
jmp 0x18fd0
movq %rax, %r15
jmp 0x18fbc
jmp 0x18fcd
movq %rax, %r15
leaq 0x178(%rsp), %rdi
callq 0x9130
movq %r15, %rdi
callq 0x94d0