// File: philpoore[P]Math/./src/Parser.cpp
// Function: Parser::parseFunctionCall()
AstFunctionCall* Parser::parseFunctionCall() {
    Token t = expect(TOKEN_IDENT);
    AstFunctionCall* a = new AstFunctionCall(t.source);
    consumeWhiteSpace();

    expect(TOKEN_LPAREN);
    AstExpr* left = parseExpr();
    expect(TOKEN_RPAREN, "Unmatched parentheses");

    a->arg = left;
    return a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x168(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x4500
movq -0x160(%rbp), %rdx
leaq 0xc0cb(%rip), %rsi      # 0x164f3
leaq -0x58(%rbp), %rdi
callq 0xbcf0
jmp 0xa433
movq -0x168(%rbp), %rsi
leaq -0x38(%rbp), %rdi
movl $0x101, %edx            # imm = 0x101
leaq -0x58(%rbp), %rcx
callq 0x8ab0
jmp 0xa44e
leaq -0x58(%rbp), %rdi
callq 0x4200
leaq -0x59(%rbp), %rdi
callq 0x4340
movl $0x30, %edi
callq 0x42f0
movq %rax, -0x170(%rbp)
jmp 0xa473
movb $0x1, -0x99(%rbp)
leaq -0x30(%rbp), %rsi
leaq -0x98(%rbp), %rdi
callq 0x4160
jmp 0xa48c
movq -0x170(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0xd0c0
jmp 0xa4a1
movb $0x0, -0x99(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x4200
movq -0x170(%rbp), %rax
movq -0x168(%rbp), %rdi
movq %rax, -0x78(%rbp)
callq 0x8dc0
jmp 0xa4cd
leaq -0xf1(%rbp), %rdi
movq %rdi, -0x178(%rbp)
callq 0x4500
movq -0x178(%rbp), %rdx
leaq 0xc005(%rip), %rsi      # 0x164f3
leaq -0xf0(%rbp), %rdi
callq 0xbcf0
jmp 0xa4fc
movq -0x168(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
movl $0x10a, %edx            # imm = 0x10A
leaq -0xf0(%rbp), %rcx
callq 0x8ab0
jmp 0xa51d
leaq -0xd0(%rbp), %rdi
callq 0xcb70
leaq -0xf0(%rbp), %rdi
callq 0x4200
leaq -0xf1(%rbp), %rdi
callq 0x4340
movq -0x168(%rbp), %rdi
movl $0xffffd8f1, %esi       # imm = 0xFFFFD8F1
callq 0x9c30
movq %rax, -0x180(%rbp)
jmp 0xa55b
movq -0x180(%rbp), %rax
movq %rax, -0x100(%rbp)
leaq -0x151(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x4500
movq -0x188(%rbp), %rdx
leaq 0xbe76(%rip), %rsi      # 0x16400
leaq -0x150(%rbp), %rdi
callq 0xbcf0
jmp 0xa598
movq -0x168(%rbp), %rsi
leaq -0x130(%rbp), %rdi
movl $0x10b, %edx            # imm = 0x10B
leaq -0x150(%rbp), %rcx
callq 0x8ab0
jmp 0xa5b9
leaq -0x130(%rbp), %rdi
callq 0xcb70
leaq -0x150(%rbp), %rdi
callq 0x4200
leaq -0x151(%rbp), %rdi
callq 0x4340
movq -0x100(%rbp), %rcx
movq -0x78(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x78(%rbp), %rax
movq %rax, -0x190(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xcb70
movq -0x190(%rbp), %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xa633
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x4200
leaq -0x59(%rbp), %rdi
callq 0x4340
jmp 0xa705
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xa6fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xa678
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x4200
testb $0x1, -0x99(%rbp)
jne 0xa683
jmp 0xa694
movq -0x170(%rbp), %rdi
movl $0x30, %esi
callq 0x4300
jmp 0xa6fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xa6bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x4200
leaq -0xf1(%rbp), %rdi
callq 0x4340
jmp 0xa6fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xa6f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x4200
leaq -0x151(%rbp), %rdi
callq 0x4340
leaq -0x38(%rbp), %rdi
callq 0xcb70
movq -0x68(%rbp), %rdi
callq 0x44f0
nop