// File: /workspace/github_cpp_makefile_star2_O1/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 $0x238, %rsp            # imm = 0x238
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdx), %rdx
leaq 0x200(%rsp), %r12
movq %r12, %rdi
movl $0x3, %ecx
callq 0x1c868
cmpb $0x0, 0x30(%r12)
je 0x21d11
leaq 0x200(%rsp), %rdi
callq 0x2494c
movups (%rax), %xmm0
leaq 0x170(%rsp), %rdi
movaps %xmm0, -0x10(%rdi)
leaq 0x180(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
callq 0xad30
movq 0x178(%rsp), %rax
addq 0x168(%rsp), %rax
movq %rax, (%r14)
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x21367
movb 0xf8(%rsp), %al
testb %al, %al
je 0x21d2e
leaq 0xc8(%rsp), %rdi
callq 0x24ee2
movq (%rax), %rcx
movq %rcx, 0x48(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x50(%rsp)
testq %rax, %rax
je 0x21d9a
movq 0x412b0(%rip), %rcx     # 0x62fb0
cmpb $0x0, (%rcx)
je 0x21d96
incl 0x8(%rax)
jmp 0x21d9a
leaq 0x200(%rsp), %rdi
callq 0x248f2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24e94
jmp 0x22136
movb %al, 0x30(%rbx)
leaq 0xe8(%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 0x21d63
movq %rdx, 0x10(%rbx)
movq 0xe8(%rsp), %rcx
movq %rcx, 0x20(%rbx)
jmp 0x21d69
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0xe0(%rsp), %rcx
movq %rcx, 0x18(%rbx)
movq %rax, 0xd8(%rsp)
movq $0x0, 0xe0(%rsp)
movb $0x0, 0xe8(%rsp)
jmp 0x2210c
lock
incl 0x8(%rax)
movq (%r14), %rdx
leaq 0x1c8(%rsp), %rdi
movq %r15, %rsi
movl $0x5, %ecx
callq 0x1c868
cmpb $0x0, 0x1f8(%rsp)
je 0x21e68
leaq 0x1c8(%rsp), %rdi
callq 0x2494c
movups (%rax), %xmm0
leaq 0x140(%rsp), %rdi
movaps %xmm0, -0x10(%rdi)
leaq 0x150(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
callq 0xad30
movq 0x148(%rsp), %rax
addq 0x138(%rsp), %rax
movq %rax, (%r14)
leaq 0x90(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x21367
movb 0xc0(%rsp), %al
testb %al, %al
je 0x21e85
leaq 0x90(%rsp), %rdi
callq 0x24ee2
movq (%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0x21ef1
movq 0x41159(%rip), %rcx     # 0x62fb0
cmpb $0x0, (%rcx)
je 0x21eed
incl 0x8(%rax)
jmp 0x21ef1
leaq 0x1c8(%rsp), %rdi
callq 0x248f2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24e94
jmp 0x220f0
movb %al, 0x30(%rbx)
leaq 0xb0(%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 0x21eba
movq %rdx, 0x10(%rbx)
movq 0xb0(%rsp), %rcx
movq %rcx, 0x20(%rbx)
jmp 0x21ec0
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0xa8(%rsp), %rcx
movq %rcx, 0x18(%rbx)
movq %rax, 0xa0(%rsp)
movq $0x0, 0xa8(%rsp)
movb $0x0, 0xb0(%rsp)
jmp 0x220c6
lock
incl 0x8(%rax)
movq (%r14), %rdx
leaq 0x190(%rsp), %rdi
movq %r15, %rsi
movl $0x4, %ecx
callq 0x1c868
cmpb $0x0, 0x1c0(%rsp)
je 0x21fb2
leaq 0x190(%rsp), %rdi
callq 0x2494c
movups (%rax), %xmm0
leaq 0x110(%rsp), %rdi
movaps %xmm0, -0x10(%rdi)
leaq 0x120(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
callq 0xad30
movq 0x118(%rsp), %rax
addq 0x108(%rsp), %rax
movq %rax, (%r14)
leaq 0x58(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x21367
movb 0x88(%rsp), %al
testb %al, %al
je 0x21fcf
leaq 0x58(%rsp), %rdi
callq 0x24ee2
movq (%rax), %rcx
movq %rcx, 0x28(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x22026
movq 0x41008(%rip), %rcx     # 0x62fb0
cmpb $0x0, (%rcx)
je 0x22022
incl 0x8(%rax)
jmp 0x22026
leaq 0x190(%rsp), %rdi
callq 0x248f2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24e94
jmp 0x220aa
movb %al, 0x30(%rbx)
leaq 0x78(%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 0x21ffe
movq %rdx, 0x10(%rbx)
movq 0x78(%rsp), %rcx
movq %rcx, 0x20(%rbx)
jmp 0x22004
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x70(%rsp), %rcx
movq %rcx, 0x18(%rbx)
movq %rax, 0x68(%rsp)
movq $0x0, 0x70(%rsp)
movb $0x0, 0x78(%rsp)
jmp 0x22083
lock
incl 0x8(%rax)
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x48(%rsp), %rcx
leaq 0x38(%rsp), %r8
leaq 0x28(%rsp), %r9
callq 0x25ce2
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 0x22074
callq 0xaa12
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x22083
callq 0xaa12
leaq 0x58(%rsp), %rdi
callq 0x1a10e
movq 0x110(%rsp), %rdi
cmpq %rbp, %rdi
je 0x220aa
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x190(%rsp), %rdi
callq 0x28218
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x220c6
callq 0xaa12
leaq 0x90(%rsp), %rdi
callq 0x1a10e
movq 0x140(%rsp), %rdi
cmpq %r13, %rdi
je 0x220f0
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x1c8(%rsp), %rdi
callq 0x28218
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x2210c
callq 0xaa12
leaq 0xc8(%rsp), %rdi
callq 0x1a10e
movq 0x170(%rsp), %rdi
cmpq %r12, %rdi
je 0x22136
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x200(%rsp), %rdi
callq 0x28218
movq %rbx, %rax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x2216f
callq 0xaa12
jmp 0x2216f
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x1a10e
jmp 0x2217e
movq %rax, %rbx
movq 0x110(%rsp), %rdi
cmpq %rbp, %rdi
je 0x221a2
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x221a2
jmp 0x2219f
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x28218
jmp 0x221b4
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x221c8
callq 0xaa12
jmp 0x221c8
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x1a10e
jmp 0x221da
movq %rax, %rbx
movq 0x140(%rsp), %rdi
cmpq %r13, %rdi
je 0x221fe
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x221fe
jmp 0x221fb
movq %rax, %rbx
leaq 0x1c8(%rsp), %rdi
callq 0x28218
jmp 0x22210
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x22224
callq 0xaa12
jmp 0x22224
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x1a10e
jmp 0x22236
movq %rax, %rbx
movq 0x170(%rsp), %rdi
cmpq %r12, %rdi
je 0x2225a
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x2225a
jmp 0x22257
movq %rax, %rbx
leaq 0x200(%rsp), %rdi
callq 0x28218
movq %rbx, %rdi
callq 0x94e0