// File: /workspace/github_cpp_makefile_star2_O3/martinda3[P]Compiler/src/TCparser.cpp
// Function: toyc::TCparser::FormalParamList(toyc::ASdefinition**)
int TCparser::FormalParamList(ASdefinition* list[]) // DONE
	{
		// FormalParamList --> Type ID { COMMA Type ID }
		enteringDEBUG("Formal Param List");
        int loc;
		AStype* operand[1];
		operand[0] = Type();
        if (buff->getTokenType() == ID)
        {
            loc = symTable->find(buff->getLexeme());
            if (loc == -1) loc = symTable->add(new TCsymbol(buff->getLexeme(),NO_TYPE));
            else if (loc > -1)
            {
                reportSEMANTIC_ERROR(scanner,"Cannot redeclare a variable formal");
                exit(EXIT_FAILURE);
            }
            symTable->getSym(loc)->setType(VAR);
            symTable->getSym(loc)->setOffset(_nextOffset);
            symTable->getSym(loc)->getNextOffset();

        }
		accept(ID);
		int i = 0;
		list[i] = new ASvarDef(operand, 1);
		i++;
		while (buff->getTokenType() == COMMA)
		{
			enteringDEBUG("Formal Param List Additional");
			accept(COMMA);
			operand[0] = Type();
            if (buff->getTokenType() == ID)
            {
                loc = symTable->find(buff->getLexeme());
                if (loc == -1) loc = symTable->add(new TCsymbol(buff->getLexeme(),NO_TYPE));
                else if (loc > -1)
                {
                    reportSEMANTIC_ERROR(scanner,"Cannot redeclare a variable additional formal");
                    exit(EXIT_FAILURE);
                }
                symTable->getSym(loc)->setType(VAR);
                symTable->getSym(loc)->setOffset(_nextOffset);
                symTable->getSym(loc)->getNextOffset();
            }
			accept(ID);
			int i = 0;
			list[i] = new ASvarDef(operand, 1);
			i++;
			exitingDEBUG("Formal Param List Additional");
		}
		exitingDEBUG("Formal Param List");
		return i;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
leaq 0x128(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1d7da(%rip), %rsi     # 0x2a1be
leaq 0x1d7e4(%rip), %rdx     # 0x2a1cf
leaq 0x118(%rsp), %r14
movq %r14, %rdi
callq 0xfc2a
movq %r14, %rdi
callq 0xbaaa
movq 0x118(%rsp), %rdi
cmpq %r15, %rdi
je 0xca20
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x8260
movq %rbx, %rdi
callq 0xc2ea
movq %rax, 0x8(%rsp)
movq 0x8(%rbx), %rdi
callq 0x17fcc
cmpl $0x18, %eax
jne 0xcb8f
leaq 0x2db2a(%rip), %r12     # 0x3a570
movq (%r12), %r14
movq 0x8(%rbx), %rsi
leaq 0x138(%rsp), %r15
movq %r15, %rdi
callq 0x17fd0
movq %r14, %rdi
movq %r15, %rsi
callq 0x28e6e
movl %eax, %ebp
leaq 0x148(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xca8c
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x8260
cmpl $-0x1, %ebp
je 0xcae0
testl %ebp, %ebp
js 0xcb4b
movq (%rbx), %rbx
leaq 0xe8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1d721(%rip), %rsi     # 0x2a1d0
leaq 0x1d73c(%rip), %rdx     # 0x2a1f2
leaq 0xd8(%rsp), %rdi
callq 0xfc2a
leaq 0xd8(%rsp), %rsi
movq %rbx, %rdi
callq 0x174db
leaq 0xd8(%rsp), %rdi
jmp 0xce9d
movq (%r12), %r14
movl $0x48, %edi
callq 0x8250
movq %rax, %r15
movq 0x8(%rbx), %rsi
leaq 0xf8(%rsp), %rdi
callq 0x17fd0
movb $0x1, %r13b
leaq 0xf8(%rsp), %rsi
movq %r15, %rdi
movl $0x3, %edx
callq 0x1bdd6
xorl %r13d, %r13d
movq %r14, %rdi
movq %r15, %rsi
callq 0x28e2c
movl %eax, %ebp
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcb4b
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x8260
movq (%r12), %rdi
movl %ebp, %esi
callq 0x28f44
movq %rax, %rdi
xorl %esi, %esi
callq 0x1be6a
movq (%r12), %rdi
movl %ebp, %esi
callq 0x28f44
leaq 0x2d6f2(%rip), %rcx     # 0x3a264
movl (%rcx), %esi
movq %rax, %rdi
callq 0x1bec0
movq (%r12), %rdi
movl %ebp, %esi
callq 0x28f44
movq %rax, %rdi
callq 0x1bec4
movq %rbx, %rdi
movl $0x18, %esi
callq 0xc54c
movl $0xfc0, %edi            # imm = 0xFC0
callq 0x8250
movq %rax, %r14
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
movl $0x1, %edx
callq 0x1aed8
movq 0x10(%rsp), %rax
movq %r14, (%rax)
movq 0x8(%rbx), %rdi
callq 0x17fcc
cmpl $0x26, %eax
jne 0xce02
leaq 0x48(%rsp), %r13
leaq 0x28(%rsp), %rbp
leaq 0x1d60d(%rip), %r14     # 0x2a1f3
leaq 0x38(%rsp), %r12
movq %r13, 0x38(%rsp)
movq %r12, %rdi
movq %r14, %rsi
leaq 0x1d612(%rip), %rdx     # 0x2a20f
callq 0xfc2a
movq %r12, %r15
movq %r12, %rdi
callq 0xbaaa
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0xcc24
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x8260
movq %rbx, %rdi
movl $0x26, %esi
callq 0xc54c
movq %rbx, %rdi
callq 0xc2ea
movq %rax, 0x8(%rsp)
movq 0x8(%rbx), %rdi
callq 0x17fcc
cmpl $0x18, %eax
jne 0xcd77
leaq 0x2d919(%rip), %rax     # 0x3a570
movq (%rax), %r14
movq 0x8(%rbx), %rsi
leaq 0x98(%rsp), %r12
movq %r12, %rdi
callq 0x17fd0
movq %r14, %rdi
movq %r12, %rsi
callq 0x28e6e
movl %eax, %r14d
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0xcca1
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x8260
cmpl $-0x1, %r14d
je 0xccb1
testl %r14d, %r14d
js 0xcd29
jmp 0xce5b
leaq 0x2d8b8(%rip), %rax     # 0x3a570
movq (%rax), %r14
movl $0x48, %edi
callq 0x8250
movq %rax, %r12
movq 0x8(%rbx), %rsi
leaq 0x78(%rsp), %rbp
movq %rbp, %rdi
callq 0x17fd0
movb $0x1, %r13b
movq %r12, %rdi
movq %rbp, %rsi
movl $0x3, %edx
callq 0x1bdd6
xorl %r13d, %r13d
movq %r14, %rdi
movq %r12, %rsi
callq 0x28e2c
movl %eax, %r14d
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0xcd1f
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x8260
leaq 0x48(%rsp), %r13
leaq 0x28(%rsp), %rbp
leaq 0x2d840(%rip), %r12     # 0x3a570
movq (%r12), %rdi
movl %r14d, %esi
callq 0x28f44
movq %rax, %rdi
xorl %esi, %esi
callq 0x1be6a
movq (%r12), %rdi
movl %r14d, %esi
callq 0x28f44
leaq 0x2d50b(%rip), %rcx     # 0x3a264
movl (%rcx), %esi
movq %rax, %rdi
callq 0x1bec0
movq (%r12), %rdi
movl %r14d, %esi
callq 0x28f44
movq %rax, %rdi
callq 0x1bec4
movq %rbx, %rdi
movl $0x18, %esi
callq 0xc54c
movl $0xfc0, %edi            # imm = 0xFC0
callq 0x8250
movq %rax, %r14
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
movl $0x1, %edx
callq 0x1aed8
movq 0x10(%rsp), %rax
movq %r14, (%rax)
movq %rbp, 0x18(%rsp)
leaq 0x18(%rsp), %r12
movq %r12, %rdi
leaq 0x1d434(%rip), %r14     # 0x2a1f3
movq %r14, %rsi
leaq 0x1d446(%rip), %rdx     # 0x2a20f
callq 0xfc2a
movq %r12, %rdi
callq 0xbd0c
movq 0x18(%rsp), %rdi
cmpq %rbp, %rdi
je 0xcded
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8260
movq 0x8(%rbx), %rdi
callq 0x17fcc
cmpl $0x26, %eax
movq %r15, %r12
je 0xcbeb
leaq 0x68(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1d3ac(%rip), %rsi     # 0x2a1be
leaq 0x1d3b6(%rip), %rdx     # 0x2a1cf
leaq 0x58(%rsp), %rdi
callq 0xfc2a
leaq 0x58(%rsp), %rdi
callq 0xbd0c
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0xce44
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8260
movl $0x1, %eax
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rbx
leaq 0xc8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1d39f(%rip), %rsi     # 0x2a210
leaq 0x1d3c5(%rip), %rdx     # 0x2a23d
leaq 0xb8(%rsp), %rdi
callq 0xfc2a
leaq 0xb8(%rsp), %rsi
movq %rbx, %rdi
callq 0x174db
leaq 0xb8(%rsp), %rdi
callq 0x8488
movl $0x1, %edi
callq 0x82e0
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
cmpq %r14, %rdi
je 0xd03c
movq 0xe8(%rsp), %rsi
jmp 0xd034
jmp 0xd01d
movq %rax, %rbx
jmp 0xcf04
movq %rax, %rbx
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcefb
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x8260
testb %r13b, %r13b
je 0xd03c
movl $0x48, %esi
movq %r15, %rdi
jmp 0xd037
movq %rax, %rbx
leaq 0x148(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd03c
movq 0x148(%rsp), %rsi
jmp 0xd034
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0xd03c
movq 0x68(%rsp), %rsi
jmp 0xd034
jmp 0xd01d
jmp 0xcffa
movq %rax, %rbx
movq 0x118(%rsp), %rdi
cmpq %r15, %rdi
je 0xd03c
movq 0x128(%rsp), %rsi
jmp 0xd034
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
cmpq %r14, %rdi
je 0xd03c
movq 0xc8(%rsp), %rsi
jmp 0xd034
jmp 0xd01d
movq %rax, %rbx
jmp 0xcfce
movq %rax, %rbx
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0xcfc9
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x8260
testb %r13b, %r13b
je 0xd03c
movl $0x48, %esi
movq %r12, %rdi
jmp 0xd037
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0xd03c
movq 0xa8(%rsp), %rsi
jmp 0xd034
movq %rax, %rbx
movl $0xfc0, %esi            # imm = 0xFC0
movq %r14, %rdi
jmp 0xd037
jmp 0xd01d
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %rbp, %rdi
je 0xd03c
movq 0x28(%rsp), %rsi
jmp 0xd034
movq %rax, %rbx
jmp 0xd03c
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0xd03c
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x8260
movq %rbx, %rdi
callq 0x8420