// File: /workspace/github_cpp_makefile_star2_O1/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, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdx), %rdx
leaq 0x288(%rsp), %r12
movq %r12, %rdi
movl $0x1, %ecx
callq 0x1c868
cmpb $0x0, 0x30(%r12)
je 0x215da
leaq 0x288(%rsp), %rdi
callq 0x2494c
movups (%rax), %xmm0
leaq 0x1c0(%rsp), %rdi
movaps %xmm0, -0x10(%rdi)
leaq 0x1d0(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
callq 0xad30
movq 0x1c8(%rsp), %rdx
addq 0x1b8(%rsp), %rdx
movq %rdx, (%r14)
leaq 0x250(%rsp), %rdi
movq %r15, %rsi
movl $0xa, %ecx
callq 0x1c868
cmpb $0x0, 0x280(%rsp)
je 0x215f7
leaq 0x250(%rsp), %rdi
callq 0x2494c
movups (%rax), %xmm0
leaq 0x50(%rsp), %rdi
movaps %xmm0, -0x10(%rdi)
leaq 0x60(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
callq 0xad30
movq 0x58(%rsp), %rdx
movq 0x48(%rsp), %rax
addq %rdx, %rax
movq %rax, (%r14)
leaq 0x80(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x50(%rsp), %rsi
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0xad30
leaq 0x2c0(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x20554
cmpb $0x0, 0x310(%rsp)
je 0x21614
leaq 0x2c0(%rsp), %rdi
callq 0x24f3c
movq %rax, %r12
leaq 0x130(%rsp), %rdi
movq %rax, %rsi
callq 0xcede
leaq 0x148(%rsp), %rdi
leaq 0x158(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x18(%r12), %rsi
movq 0x20(%r12), %rdx
addq %rsi, %rdx
callq 0xad30
movl 0x38(%r12), %eax
movl %eax, 0x168(%rsp)
movq 0x40(%r12), %rax
movq %rax, 0x170(%rsp)
movq 0x48(%r12), %rax
movq %rax, 0x178(%rsp)
testq %rax, %rax
je 0x21635
movq 0x419e0(%rip), %rcx     # 0x62fb0
cmpb $0x0, (%rcx)
je 0x21631
incl 0x8(%rax)
jmp 0x21635
leaq 0x288(%rsp), %rdi
callq 0x248f2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24e94
jmp 0x21a80
leaq 0x250(%rsp), %rdi
callq 0x248f2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24e94
jmp 0x21a56
leaq 0x2c0(%rsp), %rdi
callq 0x28830
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24e94
jmp 0x21a13
lock
incl 0x8(%rax)
movq (%r14), %rdx
leaq 0x218(%rsp), %rdi
movq %r15, %rsi
movl $0xd, %ecx
callq 0x1c868
cmpb $0x0, 0x248(%rsp)
je 0x21704
leaq 0x218(%rsp), %rdi
callq 0x2494c
movups (%rax), %xmm0
leaq 0x190(%rsp), %rdi
movaps %xmm0, -0x10(%rdi)
leaq 0x1a0(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
callq 0xad30
movq 0x198(%rsp), %rax
addq 0x188(%rsp), %rax
movq %rax, (%r14)
leaq 0xf8(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x21367
movb 0x128(%rsp), %al
testb %al, %al
je 0x21721
leaq 0xf8(%rsp), %rdi
callq 0x24ee2
movq (%rax), %rcx
movq %rcx, 0x30(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
testq %rax, %rax
je 0x2178d
movq 0x418bd(%rip), %rcx     # 0x62fb0
cmpb $0x0, (%rcx)
je 0x21789
incl 0x8(%rax)
jmp 0x2178d
leaq 0x218(%rsp), %rdi
callq 0x248f2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24e94
jmp 0x219c2
movb %al, 0x30(%rbx)
leaq 0x118(%rsp), %rax
movups -0x20(%rax), %xmm0
movups %xmm0, (%rbx)
leaq 0x20(%rbx), %rcx
movq %rcx, 0x10(%rbx)
movq -0x10(%rax), %rdx
cmpq %rax, %rdx
je 0x21756
movq %rdx, 0x10(%rbx)
movq 0x118(%rsp), %rcx
movq %rcx, 0x20(%rbx)
jmp 0x2175c
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x110(%rsp), %rcx
movq %rcx, 0x18(%rbx)
movq %rax, 0x108(%rsp)
movq $0x0, 0x110(%rsp)
movb $0x0, 0x118(%rsp)
jmp 0x21998
lock
incl 0x8(%rax)
movq (%r14), %rdx
leaq 0x1e0(%rsp), %rdi
movq %r15, %rsi
movl $0x2, %ecx
callq 0x1c868
cmpb $0x0, 0x210(%rsp)
je 0x2185b
leaq 0x1e0(%rsp), %rdi
callq 0x2494c
movups (%rax), %xmm0
leaq 0xa0(%rsp), %rdi
movaps %xmm0, -0x10(%rdi)
leaq 0xb0(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
callq 0xad30
movq 0xa8(%rsp), %rax
addq 0x98(%rsp), %rax
movq %rax, (%r14)
leaq 0xc0(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x21367
movb 0xf0(%rsp), %al
testb %al, %al
je 0x21878
leaq 0xc0(%rsp), %rdi
callq 0x24ee2
movq (%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x218e1
movq 0x41766(%rip), %rcx     # 0x62fb0
cmpb $0x0, (%rcx)
je 0x218dd
incl 0x8(%rax)
jmp 0x218e1
leaq 0x1e0(%rsp), %rdi
callq 0x248f2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24e94
jmp 0x2197c
movb %al, 0x30(%rbx)
leaq 0xe0(%rsp), %rax
movups -0x20(%rax), %xmm0
movups %xmm0, (%rbx)
leaq 0x20(%rbx), %rcx
movq %rcx, 0x10(%rbx)
movq -0x10(%rax), %rdx
cmpq %rax, %rdx
je 0x218ad
movq %rdx, 0x10(%rbx)
movq 0xe0(%rsp), %rcx
movq %rcx, 0x20(%rbx)
jmp 0x218b3
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0xd8(%rsp), %rcx
movq %rcx, 0x18(%rbx)
movq %rax, 0xd0(%rsp)
movq $0x0, 0xd8(%rsp)
movb $0x0, 0xe0(%rsp)
jmp 0x2194a
lock
incl 0x8(%rax)
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x20(%rsp), %rax
movq %rax, (%rsp)
leaq 0x10(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x70(%rsp), %rcx
leaq 0x130(%rsp), %r8
leaq 0x30(%rsp), %r9
callq 0x2598a
movaps 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x10(%rsp)
movb $0x1, 0x30(%rbx)
movups %xmm0, (%rbx)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2193b
callq 0xaa12
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x2194a
callq 0xaa12
leaq 0xc0(%rsp), %rdi
callq 0x1a10e
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x2197c
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x1e0(%rsp), %rdi
callq 0x28218
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x21998
callq 0xaa12
leaq 0xf8(%rsp), %rdi
callq 0x1a10e
movq 0x190(%rsp), %rdi
cmpq %r12, %rdi
je 0x219c2
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x218(%rsp), %rdi
callq 0x28218
movq 0x178(%rsp), %rdi
testq %rdi, %rdi
je 0x219e1
callq 0xaa12
movq 0x148(%rsp), %rdi
leaq 0x158(%rsp), %rax
cmpq %rax, %rdi
je 0x21a06
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x130(%rsp), %rdi
callq 0xcf76
leaq 0x2c0(%rsp), %rdi
callq 0x284da
movq 0x70(%rsp), %rdi
cmpq %rbp, %rdi
je 0x21a3a
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x92e0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x21a56
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x250(%rsp), %rdi
callq 0x28218
movq 0x1c0(%rsp), %rdi
cmpq %r13, %rdi
je 0x21a80
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x288(%rsp), %rdi
callq 0x28218
movq %rbx, %rax
addq $0x318, %rsp            # imm = 0x318
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x21ab9
callq 0xaa12
jmp 0x21ab9
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x1a10e
jmp 0x21acb
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x21af7
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x21af7
jmp 0x21af4
movq %rax, %rbx
leaq 0x1e0(%rsp), %rdi
callq 0x28218
jmp 0x21b09
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x21b1d
callq 0xaa12
jmp 0x21b1d
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x1a10e
jmp 0x21b2f
movq %rax, %rbx
movq 0x190(%rsp), %rdi
cmpq %r12, %rdi
je 0x21b53
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x21b53
jmp 0x21b50
movq %rax, %rbx
leaq 0x218(%rsp), %rdi
callq 0x28218
jmp 0x21b65
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0x24e60
jmp 0x21b8b
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0xcf76
jmp 0x21b8b
jmp 0x21b88
movq %rax, %rbx
leaq 0x2c0(%rsp), %rdi
callq 0x284da
movq 0x70(%rsp), %rdi
cmpq %rbp, %rdi
je 0x21bbc
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x21bbc
movq %rax, %rbx
jmp 0x21b98
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x21bdf
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x21bdf
jmp 0x21bdc
movq %rax, %rbx
leaq 0x250(%rsp), %rdi
callq 0x28218
movq 0x1c0(%rsp), %rdi
cmpq %r13, %rdi
je 0x21c15
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x21c15
movq %rax, %rbx
jmp 0x21bec
jmp 0x21c12
movq %rax, %rbx
leaq 0x288(%rsp), %rdi
callq 0x28218
movq %rbx, %rdi
callq 0x94e0