// File: fondoger[P]C0-Compiler/src/grammar.cpp
// Function: pArgumentsList(std::vector<DataType, std::allocator<DataType>> const&)
static void pArgumentsList(const std::vector<DataType> &params)
{
    std::string temp_var;
    DataType temp_dtype;
    unsigned int args_count = 0;
    std::vector<FourTuple> to_be_pushed;

    assert(g_sym == LPARENT);
    readSymbol();
    while (true) {
        pExpression(temp_var, temp_dtype);
        if (++args_count > params.size()) {
            error(ERR_MORE_ARGUMENTS);
            return;
        }
        // check argument's data type
        if (params[args_count - 1] != temp_dtype) {
            error(ERR_WRONG_TYPE_OF_ARGUMENT);
            return;
        }
        std::string type = (temp_dtype == DT_INT ? "int" : "char");
        startCachingMidCode();
        to_be_pushed.push_back(FourTuple({PUSH, type, temp_var, NONE}));
        pauseCachingMidCode();
        if (g_sym != COMMA) {
            break;
        }
        readSymbol();
    }
    for (const auto &ft: to_be_pushed) {
        genMidCode(ft.op, ft.a, ft.b, ft.res);
    }
    if (args_count < params.size()) {
        error(ERR_LESS_ARGUMENTS);
        return;
    }
    test3(Symset({RPARENT}));
    readSymbol();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movq %rdi, -0x8(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3450
movl $0x0, -0x30(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x22cf0
leaq 0x2a691(%rip), %rax     # 0x4b6b0
cmpl $0x1d, (%rax)
jne 0x21026
jmp 0x21045
leaq 0x143ea(%rip), %rdi     # 0x35417
leaq 0x143f4(%rip), %rsi     # 0x35428
movl $0x27d, %edx            # imm = 0x27D
leaq 0x146b8(%rip), %rcx     # 0x356f8
callq 0x3230
callq 0x2e050
jmp 0x2104c
jmp 0x2104e
jmp 0x21050
leaq -0x28(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x1f630
jmp 0x2105f
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movl %eax, %eax
movq %rax, -0x1e8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x22bf0
movq %rax, %rcx
movq -0x1e8(%rbp), %rax
cmpq %rcx, %rax
jbe 0x21121
leaq -0x79(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
callq 0x3570
movq -0x1f0(%rbp), %rdx
leaq 0x14680(%rip), %rsi     # 0x3572b
leaq -0x78(%rbp), %rdi
callq 0x3440
jmp 0x210b6
leaq -0x78(%rbp), %rdi
callq 0x18620
jmp 0x210c1
leaq -0x78(%rbp), %rdi
callq 0x35e8
leaq -0x79(%rbp), %rdi
callq 0x3370
movl $0x1, -0x80(%rbp)
jmp 0x215ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x21607
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x21113
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 0x21607
movq -0x8(%rbp), %rdi
movl -0x30(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x22d10
movl (%rax), %eax
cmpl -0x2c(%rbp), %eax
je 0x211d7
leaq -0xa1(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x3570
movq -0x1f8(%rbp), %rdx
leaq 0x145de(%rip), %rsi     # 0x3573e
leaq -0xa0(%rbp), %rdi
callq 0x3440
jmp 0x2116e
leaq -0xa0(%rbp), %rdi
callq 0x18620
jmp 0x2117c
leaq -0xa0(%rbp), %rdi
callq 0x35e8
leaq -0xa1(%rbp), %rdi
callq 0x3370
movl $0x1, -0x80(%rbp)
jmp 0x215ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x211c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x35e8
leaq -0xa1(%rbp), %rdi
callq 0x3370
jmp 0x21607
movl -0x2c(%rbp), %eax
subl $0x1, %eax
leaq 0x145c5(%rip), %rcx     # 0x357a9
leaq 0x13ec8(%rip), %rax     # 0x350b3
cmoveq %rcx, %rax
movq %rax, -0x208(%rbp)
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x200(%rbp)
callq 0x3570
movq -0x208(%rbp), %rsi
movq -0x200(%rbp), %rdx
leaq -0xc8(%rbp), %rdi
callq 0x3440
jmp 0x21225
leaq -0xc9(%rbp), %rdi
callq 0x3370
callq 0x27090
jmp 0x21238
movl $0x9, -0x138(%rbp)
leaq -0x130(%rbp), %rdi
movq %rdi, -0x210(%rbp)
leaq -0xc8(%rbp), %rsi
callq 0x3140
jmp 0x2125e
leaq -0x110(%rbp), %rdi
movq %rdi, -0x218(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x3140
jmp 0x21277
leaq -0xf0(%rbp), %rdi
leaq 0x25d7b(%rip), %rsi     # 0x47000
callq 0x3140
jmp 0x2128c
leaq -0x48(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x22d30
jmp 0x2129e
leaq -0x138(%rbp), %rdi
callq 0x22d60
callq 0x270b0
jmp 0x212b1
leaq 0x2a3f8(%rip), %rax     # 0x4b6b0
cmpl $0x24, (%rax)
je 0x21346
movl $0x3, -0x80(%rbp)
jmp 0x21354
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xc9(%rbp), %rdi
callq 0x3370
jmp 0x21607
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x21370
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x2131e
movq -0x218(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
callq 0x35e8
movq -0x210(%rbp), %rdi
callq 0x35e8
jmp 0x21370
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x22d60
jmp 0x21370
callq 0x2e050
jmp 0x2134d
movl $0x0, -0x80(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x35e8
movl -0x80(%rbp), %eax
testl %eax, %eax
je 0x2136b
jmp 0x21369
jmp 0x21381
jmp 0x2104e
leaq -0xc8(%rbp), %rdi
callq 0x35e8
jmp 0x21607
leaq -0x48(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rdi
callq 0x22da0
movq %rax, -0x148(%rbp)
movq -0x140(%rbp), %rdi
callq 0x22dd0
movq %rax, -0x150(%rbp)
leaq -0x148(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x22e00
testb $0x1, %al
jne 0x213cb
jmp 0x21411
leaq -0x148(%rbp), %rdi
callq 0x22e40
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rdi
movq %rdi, %rsi
addq $0x8, %rsi
movq %rdi, %rdx
addq $0x28, %rdx
movq %rdi, %rcx
addq $0x48, %rcx
callq 0x26340
jmp 0x21401
jmp 0x21403
leaq -0x148(%rbp), %rdi
callq 0x22e60
jmp 0x213b2
movl -0x30(%rbp), %eax
movq %rax, -0x220(%rbp)
movq -0x8(%rbp), %rdi
callq 0x22bf0
movq %rax, %rcx
movq -0x220(%rbp), %rax
cmpq %rcx, %rax
jae 0x214cf
leaq -0x179(%rbp), %rdi
movq %rdi, -0x228(%rbp)
callq 0x3570
movq -0x228(%rbp), %rdx
leaq 0x142fd(%rip), %rsi     # 0x35755
leaq -0x178(%rbp), %rdi
callq 0x3440
jmp 0x21466
leaq -0x178(%rbp), %rdi
callq 0x18620
jmp 0x21474
leaq -0x178(%rbp), %rdi
callq 0x35e8
leaq -0x179(%rbp), %rdi
callq 0x3370
movl $0x1, -0x80(%rbp)
jmp 0x215ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x214be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x178(%rbp), %rdi
callq 0x35e8
leaq -0x179(%rbp), %rdi
callq 0x3370
jmp 0x21607
jmp 0x214d1
movl $0x1e, -0x19c(%rbp)
leaq -0x19c(%rbp), %rax
movq %rax, -0x198(%rbp)
movq $0x1, -0x190(%rbp)
movq -0x198(%rbp), %rsi
movq -0x190(%rbp), %rdx
leaq -0x188(%rbp), %rdi
callq 0x227f0
jmp 0x21510
movl $0x22, -0x1c0(%rbp)
movl $0x26, -0x1bc(%rbp)
leaq -0x1c0(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq $0x2, -0x1b0(%rbp)
movq -0x1b8(%rbp), %rsi
movq -0x1b0(%rbp), %rdx
leaq -0x1a8(%rbp), %rdi
callq 0x227f0
jmp 0x21559
movq -0x188(%rbp), %rdi
movq -0x1a8(%rbp), %rsi
callq 0x18170
jmp 0x2156e
movl $0x1e, -0x1dc(%rbp)
leaq -0x1dc(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq $0x1, -0x1d0(%rbp)
movq -0x1d8(%rbp), %rsi
movq -0x1d0(%rbp), %rdx
leaq -0x1c8(%rbp), %rdi
callq 0x227f0
jmp 0x215ad
leaq 0x2a0fc(%rip), %rax     # 0x4b6b0
movl (%rax), %esi
leaq -0x1c8(%rbp), %rdi
callq 0x18b40
xorb $-0x1, %al
testb $0x1, %al
jne 0x215ca
jmp 0x215da
callq 0x2e050
jmp 0x215d1
movl $0x1, -0x80(%rbp)
jmp 0x215ec
jmp 0x215dc
jmp 0x215de
callq 0x2e050
jmp 0x215e5
movl $0x0, -0x80(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x22e80
leaq -0x28(%rbp), %rdi
callq 0x35e8
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
leaq -0x48(%rbp), %rdi
callq 0x22e80
leaq -0x28(%rbp), %rdi
callq 0x35e8
movq -0x50(%rbp), %rdi
callq 0x3560
nopw %cs:(%rax,%rax)