// File: /workspace/github_cpp_makefile_star2_O3/philpoore[P]Math/./src/Parser.cpp
// Function: Parser::parseIf()
AstIf* Parser::parseIf() {
    AstIf* ast = new AstIf();
    expect(TOKEN_IF);  // if
    consumeWhiteSpace();

    expect(TOKEN_LPAREN);  // if's test expr e.g (10 = 10)
    ast->expr = parseExpr();
    expect(TOKEN_RPAREN);

    consumeWhiteSpace();
    expect(TOKEN_LCURLY);  // if's if_branch
    ast->if_branch = parseBlock();
    expect(TOKEN_RCURLY);
    consumeWhiteSpace();

    if (peekIs(TOKEN_ELSE)) {
        // Else branch.
        expect(TOKEN_ELSE);
        consumeWhiteSpace();
        expect(TOKEN_LCURLY);  // if's else_branch
        ast->else_branch = parseBlock();
        expect(TOKEN_RCURLY);
    }

    return ast;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x280, %rsp            # imm = 0x280
movq %rdi, %r14
movl $0x20, %edi
callq 0x3230
movq %rax, %rbx
movl $0x9, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
leaq -0x110(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x43b9(%rip), %rdx      # 0xd4ad
leaq -0x120(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0xb494
leaq -0x2a0(%rbp), %rdi
movq %r14, %rsi
movl $0x10e, %edx            # imm = 0x10E
movq %r15, %rcx
callq 0x839c
leaq -0x288(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x913c
movq -0x288(%rbp), %rsi
incq %rsi
callq 0x3240
movq -0x120(%rbp), %rdi
cmpq %r12, %rdi
je 0x9157
movq -0x110(%rbp), %rsi
incq %rsi
callq 0x3240
movq %r14, %rdi
callq 0x88a6
leaq -0xf0(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x433b(%rip), %rdx      # 0xd4ad
leaq -0x100(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0xb494
leaq -0x270(%rbp), %rdi
movq %r14, %rsi
movl $0x10a, %edx            # imm = 0x10A
movq %r15, %rcx
callq 0x839c
leaq -0x258(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x91ba
movq -0x258(%rbp), %rsi
incq %rsi
callq 0x3240
movq -0x100(%rbp), %rdi
cmpq %r12, %rdi
je 0x91d5
movq -0xf0(%rbp), %rsi
incq %rsi
callq 0x3240
movq %r14, %rdi
movl $0xffffd8f1, %esi       # imm = 0xFFFFD8F1
callq 0x9552
movq %rax, 0x8(%rbx)
leaq -0xd0(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x42b4(%rip), %rdx      # 0xd4ad
leaq -0xe0(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0xb494
leaq -0x240(%rbp), %rdi
movq %r14, %rsi
movl $0x10b, %edx            # imm = 0x10B
movq %r15, %rcx
callq 0x839c
leaq -0x228(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9241
movq -0x228(%rbp), %rsi
incq %rsi
callq 0x3240
movq -0xe0(%rbp), %rdi
cmpq %r12, %rdi
je 0x925c
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x3240
movq %r14, %rdi
callq 0x88a6
leaq -0xb0(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x4236(%rip), %rdx      # 0xd4ad
leaq -0xc0(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0xb494
leaq -0x210(%rbp), %rdi
movq %r14, %rsi
movl $0x10c, %edx            # imm = 0x10C
movq %r15, %rcx
callq 0x839c
leaq -0x1f8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x92bf
movq -0x1f8(%rbp), %rsi
incq %rsi
callq 0x3240
movq %rbx, %r15
addq $0x10, %r15
movq -0xc0(%rbp), %rdi
cmpq %r12, %rdi
je 0x92e1
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x3240
movq %r14, %rdi
callq 0x98c2
movq %rax, (%r15)
leaq -0x90(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x41ae(%rip), %rdx      # 0xd4ad
leaq -0xa0(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0xb494
leaq -0x1e0(%rbp), %rdi
movq %r14, %rsi
movl $0x10d, %edx            # imm = 0x10D
movq %r15, %rcx
callq 0x839c
leaq -0x1c8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9347
movq -0x1c8(%rbp), %rsi
incq %rsi
callq 0x3240
movq -0xa0(%rbp), %rdi
cmpq %r12, %rdi
je 0x9362
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x3240
movq %r14, %rdi
callq 0x88a6
movq %r14, %rdi
movl $0x10f, %esi            # imm = 0x10F
callq 0x82c0
testb %al, %al
je 0x94d1
leaq -0x70(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x411e(%rip), %rdx      # 0xd4ad
leaq -0x80(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0xb494
leaq -0x1b0(%rbp), %rdi
movq %r14, %rsi
movl $0x10f, %edx            # imm = 0x10F
movq %r15, %rcx
callq 0x839c
leaq -0x198(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93d4
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x3240
movq -0x80(%rbp), %rdi
cmpq %r12, %rdi
je 0x93e9
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x3240
movq %r14, %rdi
callq 0x88a6
leaq -0x50(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x40ac(%rip), %rdx      # 0xd4ad
leaq -0x60(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0xb494
leaq -0x180(%rbp), %rdi
movq %r14, %rsi
movl $0x10c, %edx            # imm = 0x10C
movq %r15, %rcx
callq 0x839c
leaq -0x168(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9446
movq -0x168(%rbp), %rsi
incq %rsi
callq 0x3240
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x945b
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x3240
movq %r14, %rdi
callq 0x98c2
movq %rax, 0x18(%rbx)
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x4036(%rip), %rdx      # 0xd4ad
leaq -0x40(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0xb494
leaq -0x150(%rbp), %rdi
movq %r14, %rsi
movl $0x10d, %edx            # imm = 0x10D
movq %r15, %rcx
callq 0x839c
leaq -0x138(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x94bc
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x3240
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x94d1
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x3240
movq %rbx, %rax
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
jmp 0x9539
movq %rax, %rbx
movq -0x60(%rbp), %rdi
jmp 0x9539
movq %rax, %rbx
movq -0x80(%rbp), %rdi
jmp 0x9539
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
jmp 0x9539
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
jmp 0x9539
movq %rax, %rbx
movq -0xe0(%rbp), %rdi
jmp 0x9539
movq %rax, %rbx
movq -0x100(%rbp), %rdi
jmp 0x9539
movq %rax, %rbx
movq -0x120(%rbp), %rdi
cmpq %r12, %rdi
je 0x954a
movq (%r12), %rsi
incq %rsi
callq 0x3240
movq %rbx, %rdi
callq 0x3370