// File: /workspace/github_cpp_makefile_star2_O1/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 0x42c7(%rip), %rdx      # 0xd4ad
leaq -0x120(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0xb59a
leaq -0x2a0(%rbp), %rdi
movq %r14, %rsi
movl $0x10e, %edx            # imm = 0x10E
movq %r15, %rcx
callq 0x8468
leaq -0x288(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x922e
movq -0x288(%rbp), %rsi
incq %rsi
callq 0x3240
movq -0x120(%rbp), %rdi
cmpq %r12, %rdi
je 0x9249
movq -0x110(%rbp), %rsi
incq %rsi
callq 0x3240
movq %r14, %rdi
callq 0x8970
leaq -0xf0(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x4249(%rip), %rdx      # 0xd4ad
leaq -0x100(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0xb59a
leaq -0x270(%rbp), %rdi
movq %r14, %rsi
movl $0x10a, %edx            # imm = 0x10A
movq %r15, %rcx
callq 0x8468
leaq -0x258(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x92ac
movq -0x258(%rbp), %rsi
incq %rsi
callq 0x3240
movq -0x100(%rbp), %rdi
cmpq %r12, %rdi
je 0x92c7
movq -0xf0(%rbp), %rsi
incq %rsi
callq 0x3240
movq %r14, %rdi
movl $0xffffd8f1, %esi       # imm = 0xFFFFD8F1
callq 0x9644
movq %rax, 0x8(%rbx)
leaq -0xd0(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x41c2(%rip), %rdx      # 0xd4ad
leaq -0xe0(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0xb59a
leaq -0x240(%rbp), %rdi
movq %r14, %rsi
movl $0x10b, %edx            # imm = 0x10B
movq %r15, %rcx
callq 0x8468
leaq -0x228(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9333
movq -0x228(%rbp), %rsi
incq %rsi
callq 0x3240
movq -0xe0(%rbp), %rdi
cmpq %r12, %rdi
je 0x934e
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x3240
movq %r14, %rdi
callq 0x8970
leaq -0xb0(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x4144(%rip), %rdx      # 0xd4ad
leaq -0xc0(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0xb59a
leaq -0x210(%rbp), %rdi
movq %r14, %rsi
movl $0x10c, %edx            # imm = 0x10C
movq %r15, %rcx
callq 0x8468
leaq -0x1f8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93b1
movq -0x1f8(%rbp), %rsi
incq %rsi
callq 0x3240
movq %rbx, %r15
addq $0x10, %r15
movq -0xc0(%rbp), %rdi
cmpq %r12, %rdi
je 0x93d3
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x3240
movq %r14, %rdi
callq 0x99c4
movq %rax, (%r15)
leaq -0x90(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x40bc(%rip), %rdx      # 0xd4ad
leaq -0xa0(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0xb59a
leaq -0x1e0(%rbp), %rdi
movq %r14, %rsi
movl $0x10d, %edx            # imm = 0x10D
movq %r15, %rcx
callq 0x8468
leaq -0x1c8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9439
movq -0x1c8(%rbp), %rsi
incq %rsi
callq 0x3240
movq -0xa0(%rbp), %rdi
cmpq %r12, %rdi
je 0x9454
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x3240
movq %r14, %rdi
callq 0x8970
movq %r14, %rdi
movl $0x10f, %esi            # imm = 0x10F
callq 0x838c
testb %al, %al
je 0x95c3
leaq -0x70(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x402c(%rip), %rdx      # 0xd4ad
leaq -0x80(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0xb59a
leaq -0x1b0(%rbp), %rdi
movq %r14, %rsi
movl $0x10f, %edx            # imm = 0x10F
movq %r15, %rcx
callq 0x8468
leaq -0x198(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x94c6
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x3240
movq -0x80(%rbp), %rdi
cmpq %r12, %rdi
je 0x94db
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x3240
movq %r14, %rdi
callq 0x8970
leaq -0x50(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x3fba(%rip), %rdx      # 0xd4ad
leaq -0x60(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0xb59a
leaq -0x180(%rbp), %rdi
movq %r14, %rsi
movl $0x10c, %edx            # imm = 0x10C
movq %r15, %rcx
callq 0x8468
leaq -0x168(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9538
movq -0x168(%rbp), %rsi
incq %rsi
callq 0x3240
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x954d
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x3240
movq %r14, %rdi
callq 0x99c4
movq %rax, 0x18(%rbx)
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x3f44(%rip), %rdx      # 0xd4ad
leaq -0x40(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0xb59a
leaq -0x150(%rbp), %rdi
movq %r14, %rsi
movl $0x10d, %edx            # imm = 0x10D
movq %r15, %rcx
callq 0x8468
leaq -0x138(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x95ae
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x3240
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x95c3
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 0x962b
movq %rax, %rbx
movq -0x60(%rbp), %rdi
jmp 0x962b
movq %rax, %rbx
movq -0x80(%rbp), %rdi
jmp 0x962b
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
jmp 0x962b
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
jmp 0x962b
movq %rax, %rbx
movq -0xe0(%rbp), %rdi
jmp 0x962b
movq %rax, %rbx
movq -0x100(%rbp), %rdi
jmp 0x962b
movq %rax, %rbx
movq -0x120(%rbp), %rdi
cmpq %r12, %rdi
je 0x963c
movq (%r12), %rsi
incq %rsi
callq 0x3240
movq %rbx, %rdi
callq 0x3370