// File: /workspace/github_cpp_makefile_star2_O3/pfnet-research[P]pml/src/parser.cpp
// Function: parser::typed_expr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long&)
expr_result_t typed_expr(std::string const& input, size_t& pos) {
    auto expr_result = neg_expr_t(input, pos);
    if (expr_result.is_error())
        return expr_result;

    auto colon_token = next_token(input, pos);
    if (colon_token.kind != token_t::kind_t::Colon)
        return expr_result;
    pos = colon_token.pos + colon_token.lexime.size();

    auto type_result = refinement_type(input, pos);
    if (type_result.is_error())
        return type_result.convert<ptr<ast::expr_t>>();

    auto expr = expr_result.ok();
    auto type = type_result.ok();

    return expr_result_t::ok(make<ast::typed_expr_t>(expr, type));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x2310d
movb 0x30(%r12), %al
testb %al, %al
je 0x23328
movq (%r14), %rdx
leaq 0xa8(%rsp), %rdi
movq %r15, %rsi
callq 0x1ba35
cmpl $0x1c, 0xa8(%rsp)
jne 0x23357
movq 0xc0(%rsp), %rax
addq 0xb0(%rsp), %rax
movq %rax, (%r14)
leaq 0xd8(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x20236
cmpb $0x0, 0x110(%rsp)
je 0x233ce
leaq 0x10(%rsp), %rdi
callq 0x24dac
movq (%rax), %rcx
movq %rcx, 0x50(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x58(%rsp)
testq %rax, %rax
je 0x23416
movq 0x3ec99(%rip), %rcx     # 0x61fb0
cmpb $0x0, (%rcx)
je 0x23412
incl 0x8(%rax)
jmp 0x23416
movb %al, 0x30(%rbx)
leaq 0x30(%rsp), %rax
movaps -0x20(%rax), %xmm0
movups %xmm0, (%rbx)
leaq 0x20(%rbx), %rcx
movq %rcx, 0x10(%rbx)
movq -0x10(%rax), %rdx
cmpq %rax, %rdx
je 0x2337b
movq %rdx, 0x10(%rbx)
movq 0x30(%rsp), %rcx
movq %rcx, 0x20(%rbx)
jmp 0x23381
movb 0x40(%rsp), %al
movb %al, 0x30(%rbx)
cmpb $0x1, %al
jne 0x233a2
movaps 0x10(%rsp), %xmm0
xorl %eax, %eax
movq %rax, 0x18(%rsp)
movups %xmm0, (%rbx)
movq %rax, 0x10(%rsp)
jmp 0x234fd
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x28(%rsp), %rcx
movq %rcx, 0x18(%rbx)
movq %rax, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movb $0x0, 0x30(%rsp)
jmp 0x2351e
leaq 0x30(%rsp), %rax
movaps -0x20(%rax), %xmm0
movups %xmm0, (%rbx)
leaq 0x20(%rbx), %rcx
movq %rcx, 0x10(%rbx)
movq -0x10(%rax), %rdx
cmpq %rax, %rdx
je 0x233eb
movq %rdx, 0x10(%rbx)
movq 0x30(%rsp), %rcx
movq %rcx, 0x20(%rbx)
jmp 0x233f1
leaq 0xd8(%rsp), %rdi
callq 0x2838e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24d5e
jmp 0x234f0
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x28(%rsp), %rcx
movq %rcx, 0x18(%rbx)
movq %rax, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movb $0x0, 0x30(%rsp)
jmp 0x234fd
lock
incl 0x8(%rax)
leaq 0xd8(%rsp), %rdi
callq 0x24cd0
movq %rax, %r14
leaq 0x80(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0xac68
movl 0x20(%r14), %eax
movl %eax, 0x90(%rsp)
movq 0x28(%r14), %rax
movq %rax, 0x98(%rsp)
movq 0x30(%r14), %rax
movq %rax, 0xa0(%rsp)
testq %rax, %rax
je 0x23483
movq 0x3eb3b(%rip), %rcx     # 0x61fb0
cmpb $0x0, (%rcx)
je 0x2347f
incl 0x8(%rax)
jmp 0x23483
lock
incl 0x8(%rax)
leaq 0x68(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x60(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x50(%rsp), %rcx
leaq 0x70(%rsp), %r8
callq 0x261c0
movb $0x1, 0x30(%rbx)
movaps 0x60(%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x234c7
callq 0xa946
movq 0x70(%rsp), %rdi
cmpq %r15, %rdi
je 0x234e1
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x92e0
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x234f0
callq 0xa946
leaq 0xd8(%rsp), %rdi
callq 0x282a8
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2351e
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x10(%rsp), %rdi
callq 0x19f1e
movq %rbx, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x24b24
jmp 0x2354e
jmp 0x2355f
movq %rax, %rbx
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x23562
callq 0xa946
jmp 0x23562
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x282a8
jmp 0x23574
movq %rax, %rbx
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2359a
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x2359a
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x19f1e
movq %rbx, %rdi
callq 0x94e0