// File: fondoger[P]C0-Compiler/src/grammar.cpp
// Function: pParametersList(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static void pParametersList(const std::string &id)
{
    int count = 0;

    assert(g_sym == LPARENT);
    while (g_sym != RPARENT) { 
        count++;

        readSymbol(); // g_sym==COMMA or LPARENT
        test2(Symset({INTSY, CHARSY}), Symset({RPARENT}));
        DataType dtype = g_sym == INTSY ? DT_INT: DT_CHAR;

        readSymbol(); // identifier
        test2(Symset({IDENTSY}), Symset({RPARENT}));
        TabEntry entry = { LOCAL, IT_VARIABLE, dtype, -1, -1 };
        tabInsert(g_id, entry);
        tabInsertParam(id, dtype);
        genMidCode(PARA, dtype == DT_INT ? "int" : "char", g_id, NONE);

        readSymbol();
        test3(Symset({COMMA, RPARENT}));
        if (g_sym != COMMA) 
            break;
    }
    if (count == 0) {
        error(ERR_MISSING_PARAMETERS);
    }
    readSymbol();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
leaq 0x30053(%rip), %rax     # 0x4b6b0
cmpl $0x1d, (%rax)
jne 0x1b664
jmp 0x1b683
leaq 0x19dac(%rip), %rdi     # 0x35417
leaq 0x19db6(%rip), %rsi     # 0x35428
movl $0x2a7, %edx            # imm = 0x2A7
leaq 0x19dba(%rip), %rcx     # 0x35438
callq 0x3230
jmp 0x1b685
leaq 0x30024(%rip), %rax     # 0x4b6b0
cmpl $0x1e, (%rax)
je 0x1baba
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
callq 0x2e050
movl $0x2, -0x30(%rbp)
movl $0x3, -0x2c(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x2, -0x20(%rbp)
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x18(%rbp), %rdi
callq 0x227f0
movl $0x1e, -0x4c(%rbp)
leaq -0x4c(%rbp), %rax
movq %rax, -0x48(%rbp)
movq $0x1, -0x40(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x227f0
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x18170
movl $0x2, -0x70(%rbp)
movl $0x3, -0x6c(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0x68(%rbp)
movq $0x2, -0x60(%rbp)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
leaq -0x58(%rbp), %rdi
callq 0x227f0
leaq 0x2ff73(%rip), %rax     # 0x4b6b0
movl (%rax), %esi
leaq -0x58(%rbp), %rdi
callq 0x18b40
xorb $-0x1, %al
testb $0x1, %al
jne 0x1b750
jmp 0x1b75a
callq 0x2e050
jmp 0x1bb60
jmp 0x1b75c
leaq 0x2ff4d(%rip), %rax     # 0x4b6b0
movl (%rax), %edx
movl $0x2, %eax
movl $0x1, %ecx
cmpl $0x2, %edx
cmovel %ecx, %eax
movl %eax, -0x74(%rbp)
callq 0x2e050
movl $0x0, -0x94(%rbp)
leaq -0x94(%rbp), %rax
movq %rax, -0x90(%rbp)
movq $0x1, -0x88(%rbp)
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x227f0
movl $0x1e, -0xb4(%rbp)
leaq -0xb4(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq $0x1, -0xa8(%rbp)
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
callq 0x227f0
movq -0x80(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0x18170
movl $0x0, -0xd4(%rbp)
leaq -0xd4(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq $0x1, -0xc8(%rbp)
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
leaq -0xc0(%rbp), %rdi
callq 0x227f0
leaq 0x2fe68(%rip), %rax     # 0x4b6b0
movl (%rax), %esi
leaq -0xc0(%rbp), %rdi
callq 0x18b40
xorb $-0x1, %al
testb $0x1, %al
jne 0x1b85e
jmp 0x1b868
callq 0x2e050
jmp 0x1bb60
jmp 0x1b86a
movl $0x1, -0xe8(%rbp)
movl $0x1, -0xe4(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0xe0(%rbp)
movl $0xffffffff, -0xdc(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0xd8(%rbp) # imm = 0xFFFFFFFF
leaq 0x2fe16(%rip), %rdi     # 0x4b6b8
leaq -0xe8(%rbp), %rsi
callq 0x2f430
movq -0x8(%rbp), %rdi
leaq -0x74(%rbp), %rsi
callq 0x2ef40
movl $0x6, -0xec(%rbp)
movl -0x74(%rbp), %eax
subl $0x1, %eax
leaq 0x19ed7(%rip), %rcx     # 0x357a9
leaq 0x197da(%rip), %rax     # 0x350b3
cmoveq %rcx, %rax
movq %rax, -0x1c0(%rbp)
leaq -0x111(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x3570
movq -0x1c0(%rbp), %rsi
movq -0x1b8(%rbp), %rdx
leaq -0x110(%rbp), %rdi
callq 0x3440
jmp 0x1b913
leaq 0x2fd9e(%rip), %rdx     # 0x4b6b8
leaq 0x2b6df(%rip), %rcx     # 0x47000
leaq -0xec(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x26340
jmp 0x1b936
leaq -0x110(%rbp), %rdi
callq 0x35e8
leaq -0x111(%rbp), %rdi
callq 0x3370
callq 0x2e050
movl $0x24, -0x148(%rbp)
movl $0x1e, -0x144(%rbp)
leaq -0x148(%rbp), %rax
movq %rax, -0x140(%rbp)
movq $0x2, -0x138(%rbp)
movq -0x140(%rbp), %rsi
movq -0x138(%rbp), %rdx
leaq -0x130(%rbp), %rdi
callq 0x227f0
movl $0x22, -0x168(%rbp)
movl $0x26, -0x164(%rbp)
leaq -0x168(%rbp), %rax
movq %rax, -0x160(%rbp)
movq $0x2, -0x158(%rbp)
movq -0x160(%rbp), %rsi
movq -0x158(%rbp), %rdx
leaq -0x150(%rbp), %rdi
callq 0x227f0
movq -0x130(%rbp), %rdi
movq -0x150(%rbp), %rsi
callq 0x18170
movl $0x24, -0x188(%rbp)
movl $0x1e, -0x184(%rbp)
leaq -0x188(%rbp), %rax
movq %rax, -0x180(%rbp)
movq $0x2, -0x178(%rbp)
movq -0x180(%rbp), %rsi
movq -0x178(%rbp), %rdx
leaq -0x170(%rbp), %rdi
callq 0x227f0
leaq 0x2fc6e(%rip), %rax     # 0x4b6b0
movl (%rax), %esi
leaq -0x170(%rbp), %rdi
callq 0x18b40
xorb $-0x1, %al
testb $0x1, %al
jne 0x1ba58
jmp 0x1baa5
callq 0x2e050
jmp 0x1bb60
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x1ba94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x35e8
leaq -0x111(%rbp), %rdi
callq 0x3370
jmp 0x1bb69
jmp 0x1baa7
leaq 0x2fc02(%rip), %rax     # 0x4b6b0
cmpl $0x24, (%rax)
je 0x1bab5
jmp 0x1baba
jmp 0x1b685
cmpl $0x0, -0xc(%rbp)
jne 0x1bb5b
leaq -0x1a9(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
callq 0x3570
movq -0x1c8(%rbp), %rdx
leaq 0x1997d(%rip), %rsi     # 0x35462
leaq -0x1a8(%rbp), %rdi
callq 0x3440
jmp 0x1baf3
leaq -0x1a8(%rbp), %rdi
callq 0x18620
jmp 0x1bb01
leaq -0x1a8(%rbp), %rdi
callq 0x35e8
leaq -0x1a9(%rbp), %rdi
callq 0x3370
jmp 0x1bb5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x1bb4d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x35e8
leaq -0x1a9(%rbp), %rdi
callq 0x3370
jmp 0x1bb69
callq 0x2e050
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
movq -0x120(%rbp), %rdi
callq 0x3560
nopw %cs:(%rax,%rax)