// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x288, %rsp            # imm = 0x288
movq %rdi, %r14
pushq $0x20
popq %rdi
callq 0x3200
movq %rax, %rbx
movl $0x9, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
leaq 0x418d(%rip), %rsi      # 0xa4e3
leaq -0x120(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x7692
leaq -0x2a0(%rbp), %rdi
leaq -0x120(%rbp), %rcx
movq %r14, %rsi
movl $0x10e, %edx            # imm = 0x10E
callq 0x5cb2
leaq -0x298(%rbp), %rdi
callq 0x3110
leaq -0x120(%rbp), %rdi
callq 0x3110
movq %r14, %rdi
callq 0x5ebc
leaq 0x413b(%rip), %rsi      # 0xa4e3
leaq -0x100(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x7692
leaq -0x270(%rbp), %rdi
leaq -0x100(%rbp), %rcx
movq %r14, %rsi
movl $0x10a, %edx            # imm = 0x10A
callq 0x5cb2
leaq -0x268(%rbp), %rdi
callq 0x3110
leaq -0x100(%rbp), %rdi
callq 0x3110
movq %r14, %rdi
movl $0xffffd8f1, %esi       # imm = 0xFFFFD8F1
callq 0x666e
movq %rax, 0x8(%rbx)
leaq 0x40e0(%rip), %rsi      # 0xa4e3
leaq -0xe0(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x7692
leaq -0x240(%rbp), %rdi
leaq -0xe0(%rbp), %rcx
movq %r14, %rsi
movl $0x10b, %edx            # imm = 0x10B
callq 0x5cb2
leaq -0x238(%rbp), %rdi
callq 0x3110
leaq -0xe0(%rbp), %rdi
callq 0x3110
movq %r14, %rdi
callq 0x5ebc
leaq 0x408e(%rip), %rsi      # 0xa4e3
leaq -0xc0(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x7692
leaq -0x210(%rbp), %rdi
leaq -0xc0(%rbp), %rcx
movq %r14, %rsi
movl $0x10c, %edx            # imm = 0x10C
callq 0x5cb2
movq %rbx, %r15
addq $0x10, %r15
leaq -0x208(%rbp), %rdi
callq 0x3110
leaq -0xc0(%rbp), %rdi
callq 0x3110
movq %r14, %rdi
callq 0x6898
movq %rax, (%r15)
leaq 0x4032(%rip), %rsi      # 0xa4e3
leaq -0xa0(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x7692
leaq -0x1e0(%rbp), %rdi
leaq -0xa0(%rbp), %rcx
movq %r14, %rsi
movl $0x10d, %edx            # imm = 0x10D
callq 0x5cb2
leaq -0x1d8(%rbp), %rdi
callq 0x3110
leaq -0xa0(%rbp), %rdi
callq 0x3110
movq %r14, %rdi
callq 0x5ebc
movq %r14, %rdi
movl $0x10f, %esi            # imm = 0x10F
callq 0x5c4e
testb %al, %al
je 0x65e8
leaq 0x3fcb(%rip), %rsi      # 0xa4e3
leaq -0x80(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x7692
leaq -0x1b0(%rbp), %rdi
leaq -0x80(%rbp), %rcx
movq %r14, %rsi
movl $0x10f, %edx            # imm = 0x10F
callq 0x5cb2
leaq -0x1a8(%rbp), %rdi
callq 0x3110
leaq -0x80(%rbp), %rdi
callq 0x3110
movq %r14, %rdi
callq 0x5ebc
leaq 0x3f82(%rip), %rsi      # 0xa4e3
leaq -0x60(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x7692
leaq -0x180(%rbp), %rdi
leaq -0x60(%rbp), %rcx
movq %r14, %rsi
movl $0x10c, %edx            # imm = 0x10C
callq 0x5cb2
leaq -0x178(%rbp), %rdi
callq 0x3110
leaq -0x60(%rbp), %rdi
callq 0x3110
movq %r14, %rdi
callq 0x6898
movq %rax, 0x18(%rbx)
leaq 0x3f35(%rip), %rsi      # 0xa4e3
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x7692
leaq -0x150(%rbp), %rdi
leaq -0x40(%rbp), %rcx
movq %r14, %rsi
movl $0x10d, %edx            # imm = 0x10D
callq 0x5cb2
leaq -0x148(%rbp), %rdi
callq 0x3110
leaq -0x40(%rbp), %rdi
callq 0x3110
movq %rbx, %rax
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
jmp 0x665c
jmp 0x6663
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
jmp 0x665c
jmp 0x6663
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
jmp 0x665c
jmp 0x6663
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
jmp 0x665c
jmp 0x6663
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
jmp 0x665c
jmp 0x6663
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
jmp 0x665c
jmp 0x6663
movq %rax, %rbx
leaq -0x100(%rbp), %rdi
jmp 0x665c
jmp 0x6663
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
callq 0x3110
jmp 0x6666
movq %rax, %rbx
movq %rbx, %rdi
callq 0x3370