// File: fondoger[P]C0-Compiler/src/grammar.cpp
// Function: pFunctionCallStatement(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static void pFunctionCallStatement(const std::string &id)
{
    TabEntry entry;
    if (!tabFind(id, entry)) {
        error(ERR_UNDEFINED_IDENTIFIER);
        return;
    }
    if (entry.itype != IT_FUNCTION) {
        error(ERR_NOT_A_FUNCTION);
        return;
    }
    const std::vector<DataType> &params = tabGetParams(id);
    if (g_sym == LPARENT) {
        pArgumentsList(params);
    } else if (params.size() != 0) {
        error(ERR_EXPECT_ARGUMENTS);
        return;
    }
    genMidCode(CALL, id, std::to_string(params.size()), NONE);
    // as we don't call about return value, so we don't 
    // need to copy return value from $RET to some varaible
    test2(Symset({SEMICOLON}), Symset({}));
    readSymbol();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x2f100
testb $0x1, %al
jne 0x1f0ac
leaq -0x41(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x3570
movq -0x130(%rbp), %rdx
leaq 0x16502(%rip), %rsi     # 0x35550
leaq -0x40(%rbp), %rdi
callq 0x3440
jmp 0x1f059
leaq -0x40(%rbp), %rdi
callq 0x18620
jmp 0x1f064
leaq -0x40(%rbp), %rdi
callq 0x35e8
leaq -0x41(%rbp), %rdi
callq 0x3370
jmp 0x1f362
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x1f09e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x35e8
leaq -0x41(%rbp), %rdi
callq 0x3370
jmp 0x1f36b
cmpl $0x2, -0x18(%rbp)
je 0x1f12e
leaq -0x79(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x3570
movq -0x138(%rbp), %rdx
leaq 0x164a2(%rip), %rsi     # 0x35572
leaq -0x78(%rbp), %rdi
callq 0x3440
jmp 0x1f0db
leaq -0x78(%rbp), %rdi
callq 0x18620
jmp 0x1f0e6
leaq -0x78(%rbp), %rdi
callq 0x35e8
leaq -0x79(%rbp), %rdi
callq 0x3370
jmp 0x1f362
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x1f120
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x35e8
leaq -0x79(%rbp), %rdi
callq 0x3370
jmp 0x1f36b
movq -0x8(%rbp), %rdi
callq 0x2f030
movq %rax, -0x88(%rbp)
leaq 0x2c56b(%rip), %rax     # 0x4b6b0
cmpl $0x1d, (%rax)
jne 0x1f15b
movq -0x88(%rbp), %rdi
callq 0x20ff0
jmp 0x1f204
movq -0x88(%rbp), %rdi
callq 0x22bf0
cmpq $0x0, %rax
je 0x1f202
leaq -0xa9(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x3570
movq -0x140(%rbp), %rdx
leaq 0x1653b(%rip), %rsi     # 0x356cd
leaq -0xa8(%rbp), %rdi
callq 0x3440
jmp 0x1f1a0
leaq -0xa8(%rbp), %rdi
callq 0x18620
jmp 0x1f1ae
leaq -0xa8(%rbp), %rdi
callq 0x35e8
leaq -0xa9(%rbp), %rdi
callq 0x3370
jmp 0x1f362
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x1f1f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x35e8
leaq -0xa9(%rbp), %rdi
callq 0x3370
jmp 0x1f36b
jmp 0x1f204
movl $0xa, -0xb0(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x88(%rbp), %rdi
callq 0x22bf0
movq %rax, %rsi
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x22c10
movq -0x150(%rbp), %rsi
movq -0x148(%rbp), %rdx
leaq 0x27db0(%rip), %rcx     # 0x47000
leaq -0xb0(%rbp), %rdi
callq 0x26340
jmp 0x1f25e
leaq -0xd0(%rbp), %rdi
callq 0x35e8
movl $0x26, -0xec(%rbp)
leaq -0xec(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq $0x1, -0xe0(%rbp)
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
leaq -0xd8(%rbp), %rdi
callq 0x227f0
leaq -0x108(%rbp), %rdi
callq 0x228b0
movq -0x108(%rbp), %rsi
movq -0x100(%rbp), %rdx
leaq -0xf8(%rbp), %rdi
callq 0x227f0
movq -0xd8(%rbp), %rdi
movq -0xf8(%rbp), %rsi
callq 0x18170
movl $0x26, -0x124(%rbp)
leaq -0x124(%rbp), %rax
movq %rax, -0x120(%rbp)
movq $0x1, -0x118(%rbp)
movq -0x120(%rbp), %rsi
movq -0x118(%rbp), %rdx
leaq -0x110(%rbp), %rdi
callq 0x227f0
leaq 0x2c38c(%rip), %rax     # 0x4b6b0
movl (%rax), %esi
leaq -0x110(%rbp), %rdi
callq 0x18b40
xorb $-0x1, %al
testb $0x1, %al
jne 0x1f33a
jmp 0x1f35b
callq 0x2e050
jmp 0x1f362
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x35e8
jmp 0x1f36b
jmp 0x1f35d
callq 0x2e050
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x3560
nopw %cs:(%rax,%rax)