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

    EXPECT(if_token, If);

    auto cond_result = expr(input, pos);
    if (cond_result.is_error())
        return cond_result;
    auto cond_expr = cond_result.ok();

    EXPECT(then_token, Then);

    auto true_result = expr(input, pos);
    if (true_result.is_error())
        return true_result;
    auto true_expr = true_result.ok();

    EXPECT(else_token, Else);

    auto false_result = expr(input, pos);
    if (false_result.is_error())
        return false_result;
    auto false_expr = false_result.ok();

    return expr_result_t::ok(make<ast::if_expr_t>(
                cond_expr, true_expr, false_expr));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdx), %rdx
leaq 0x1f0(%rsp), %r12
movq %r12, %rdi
movl $0x3, %ecx
callq 0x1c56e
cmpb $0x0, 0x30(%r12)
je 0x21c3e
leaq 0x1f0(%rsp), %rdi
callq 0x24814
movups (%rax), %xmm0
leaq 0x160(%rsp), %rdi
movaps %xmm0, -0x10(%rdi)
leaq 0x170(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
callq 0xac68
movq 0x168(%rsp), %rax
addq 0x158(%rsp), %rax
movq %rax, (%r14)
leaq 0xa8(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2120b
movb 0xd8(%rsp), %al
testb %al, %al
je 0x21c5b
leaq 0xa8(%rsp), %rdi
callq 0x24dac
movq (%rax), %rcx
movq %rcx, 0x28(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x21cc7
movq 0x40383(%rip), %rcx     # 0x61fb0
cmpb $0x0, (%rcx)
je 0x21cc3
incl 0x8(%rax)
jmp 0x21cc7
leaq 0x1f0(%rsp), %rdi
callq 0x247ba
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24d5e
jmp 0x22071
movb %al, 0x30(%rbx)
leaq 0xc8(%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 0x21c90
movq %rdx, 0x10(%rbx)
movq 0xc8(%rsp), %rcx
movq %rcx, 0x20(%rbx)
jmp 0x21c96
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0xc0(%rsp), %rcx
movq %rcx, 0x18(%rbx)
movq %rax, 0xb8(%rsp)
movq $0x0, 0xc0(%rsp)
movb $0x0, 0xc8(%rsp)
jmp 0x22047
lock
incl 0x8(%rax)
movq (%r14), %rdx
leaq 0x1b8(%rsp), %rdi
movq %r15, %rsi
movl $0x5, %ecx
callq 0x1c56e
cmpb $0x0, 0x1e8(%rsp)
je 0x21d8f
leaq 0x1b8(%rsp), %rdi
callq 0x24814
movups (%rax), %xmm0
leaq 0x130(%rsp), %rdi
movaps %xmm0, -0x10(%rdi)
leaq 0x140(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
callq 0xac68
movq 0x138(%rsp), %rax
addq 0x128(%rsp), %rax
movq %rax, (%r14)
leaq 0x70(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2120b
movb 0xa0(%rsp), %al
testb %al, %al
je 0x21dac
leaq 0x70(%rsp), %rdi
callq 0x24dac
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x21e18
movq 0x40232(%rip), %rcx     # 0x61fb0
cmpb $0x0, (%rcx)
je 0x21e14
incl 0x8(%rax)
jmp 0x21e18
leaq 0x1b8(%rsp), %rdi
callq 0x247ba
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24d5e
jmp 0x22017
movb %al, 0x30(%rbx)
leaq 0x90(%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 0x21de1
movq %rdx, 0x10(%rbx)
movq 0x90(%rsp), %rcx
movq %rcx, 0x20(%rbx)
jmp 0x21de7
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x88(%rsp), %rcx
movq %rcx, 0x18(%rbx)
movq %rax, 0x80(%rsp)
movq $0x0, 0x88(%rsp)
movb $0x0, 0x90(%rsp)
jmp 0x21ff0
lock
incl 0x8(%rax)
movq (%r14), %rdx
leaq 0x180(%rsp), %rdi
movq %r15, %rsi
movl $0x4, %ecx
callq 0x1c56e
cmpb $0x0, 0x1b0(%rsp)
je 0x21ed6
leaq 0x180(%rsp), %rdi
callq 0x24814
movups (%rax), %xmm0
leaq 0x100(%rsp), %rdi
movaps %xmm0, -0x10(%rdi)
leaq 0x110(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
callq 0xac68
movq 0x108(%rsp), %rax
addq 0xf8(%rsp), %rax
movq %rax, (%r14)
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2120b
movb 0x68(%rsp), %al
testb %al, %al
je 0x21ef3
leaq 0x38(%rsp), %rdi
callq 0x24dac
movq (%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x21f4a
movq 0x400e4(%rip), %rcx     # 0x61fb0
cmpb $0x0, (%rcx)
je 0x21f46
incl 0x8(%rax)
jmp 0x21f4a
leaq 0x180(%rsp), %rdi
callq 0x247ba
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24d5e
jmp 0x21fc0
movb %al, 0x30(%rbx)
leaq 0x58(%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 0x21f22
movq %rdx, 0x10(%rbx)
movq 0x58(%rsp), %rcx
movq %rcx, 0x20(%rbx)
jmp 0x21f28
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x50(%rsp), %rcx
movq %rcx, 0x18(%rbx)
movq %rax, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
movb $0x0, 0x58(%rsp)
jmp 0x21f99
lock
incl 0x8(%rax)
leaq 0xe8(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0xe0(%rsp), %rsi
leaq 0x7(%rsp), %rdx
leaq 0x28(%rsp), %rcx
leaq 0x18(%rsp), %r8
leaq 0x8(%rsp), %r9
callq 0x25b8e
movb $0x1, 0x30(%rbx)
movaps 0xe0(%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x21f99
callq 0xa946
leaq 0x38(%rsp), %rdi
callq 0x19f1e
movq 0x100(%rsp), %rdi
cmpq %rbp, %rdi
je 0x21fc0
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x1a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21fe1
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x92e0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x21ff0
callq 0xa946
leaq 0x70(%rsp), %rdi
callq 0x19f1e
movq 0x130(%rsp), %rdi
cmpq %r13, %rdi
je 0x22017
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x1d8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x22038
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x92e0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x22047
callq 0xa946
leaq 0xa8(%rsp), %rdi
callq 0x19f1e
movq 0x160(%rsp), %rdi
cmpq %r12, %rdi
je 0x22071
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x210(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x22092
movq 0x210(%rsp), %rsi
incq %rsi
callq 0x92e0
movq %rbx, %rax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x220be
callq 0xa946
jmp 0x220be
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x19f1e
jmp 0x220cd
movq %rax, %rbx
movq 0x100(%rsp), %rdi
cmpq %rbp, %rdi
je 0x220f1
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x220f1
jmp 0x220ee
movq %rax, %rbx
leaq 0x1a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x22117
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x22117
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2212b
callq 0xa946
jmp 0x2212b
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x19f1e
jmp 0x2213a
movq %rax, %rbx
movq 0x130(%rsp), %rdi
cmpq %r13, %rdi
je 0x2215e
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x2215e
jmp 0x2215b
movq %rax, %rbx
leaq 0x1d8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x22184
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x22184
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x22198
callq 0xa946
jmp 0x22198
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x19f1e
jmp 0x221aa
movq %rax, %rbx
movq 0x160(%rsp), %rdi
cmpq %r12, %rdi
je 0x221ce
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x221ce
jmp 0x221cb
movq %rax, %rbx
leaq 0x210(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x221ef
movq 0x210(%rsp), %rsi
incq %rsi
callq 0x92e0
movq %rbx, %rdi
callq 0x94e0