// File: /workspace/github_cpp_makefile_star2_O1/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 0x1d7ce(%rip), %rsi     # 0x2a1be
leaq 0x1d7d8(%rip), %rdx     # 0x2a1cf
leaq 0x118(%rsp), %r14
movq %r14, %rdi
callq 0xfc42
movq %r14, %rdi
callq 0xbac6
movq 0x118(%rsp), %rdi
cmpq %r15, %rdi
je 0xca2c
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x8260
movq %rbx, %rdi
callq 0xc2f6
movq %rax, 0x8(%rsp)
movq 0x8(%rbx), %rdi
callq 0x179ac
cmpl $0x18, %eax
jne 0xcb9b
leaq 0x2db1e(%rip), %r12     # 0x3a570
movq (%r12), %r14
movq 0x8(%rbx), %rsi
leaq 0x138(%rsp), %r15
movq %r15, %rdi
callq 0x179b0
movq %r14, %rdi
movq %r15, %rsi
callq 0x28862
movl %eax, %ebp
leaq 0x148(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xca98
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x8260
cmpl $-0x1, %ebp
je 0xcaec
testl %ebp, %ebp
js 0xcb57
movq (%rbx), %rbx
leaq 0xe8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1d715(%rip), %rsi     # 0x2a1d0
leaq 0x1d730(%rip), %rdx     # 0x2a1f2
leaq 0xd8(%rsp), %rdi
callq 0xfc42
leaq 0xd8(%rsp), %rsi
movq %rbx, %rdi
callq 0x16ebd
leaq 0xd8(%rsp), %rdi
jmp 0xcea9
movq (%r12), %r14
movl $0x48, %edi
callq 0x8250
movq %rax, %r15
movq 0x8(%rbx), %rsi
leaq 0xf8(%rsp), %rdi
callq 0x179b0
movb $0x1, %r13b
leaq 0xf8(%rsp), %rsi
movq %r15, %rdi
movl $0x3, %edx
callq 0x1b7b2
xorl %r13d, %r13d
movq %r14, %rdi
movq %r15, %rsi
callq 0x28820
movl %eax, %ebp
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcb57
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x8260
movq (%r12), %rdi
movl %ebp, %esi
callq 0x28934
movq %rax, %rdi
xorl %esi, %esi
callq 0x1b846
movq (%r12), %rdi
movl %ebp, %esi
callq 0x28934
leaq 0x2d6e6(%rip), %rcx     # 0x3a264
movl (%rcx), %esi
movq %rax, %rdi
callq 0x1b89c
movq (%r12), %rdi
movl %ebp, %esi
callq 0x28934
movq %rax, %rdi
callq 0x1b8a0
movq %rbx, %rdi
movl $0x18, %esi
callq 0xc558
movl $0xfc0, %edi            # imm = 0xFC0
callq 0x8250
movq %rax, %r14
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
movl $0x1, %edx
callq 0x1a8a0
movq 0x10(%rsp), %rax
movq %r14, (%rax)
movq 0x8(%rbx), %rdi
callq 0x179ac
cmpl $0x26, %eax
jne 0xce0e
leaq 0x48(%rsp), %r13
leaq 0x28(%rsp), %rbp
leaq 0x1d601(%rip), %r14     # 0x2a1f3
leaq 0x38(%rsp), %r12
movq %r13, 0x38(%rsp)
movq %r12, %rdi
movq %r14, %rsi
leaq 0x1d606(%rip), %rdx     # 0x2a20f
callq 0xfc42
movq %r12, %r15
movq %r12, %rdi
callq 0xbac6
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0xcc30
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x8260
movq %rbx, %rdi
movl $0x26, %esi
callq 0xc558
movq %rbx, %rdi
callq 0xc2f6
movq %rax, 0x8(%rsp)
movq 0x8(%rbx), %rdi
callq 0x179ac
cmpl $0x18, %eax
jne 0xcd83
leaq 0x2d90d(%rip), %rax     # 0x3a570
movq (%rax), %r14
movq 0x8(%rbx), %rsi
leaq 0x98(%rsp), %r12
movq %r12, %rdi
callq 0x179b0
movq %r14, %rdi
movq %r12, %rsi
callq 0x28862
movl %eax, %r14d
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0xccad
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x8260
cmpl $-0x1, %r14d
je 0xccbd
testl %r14d, %r14d
js 0xcd35
jmp 0xce67
leaq 0x2d8ac(%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 0x179b0
movb $0x1, %r13b
movq %r12, %rdi
movq %rbp, %rsi
movl $0x3, %edx
callq 0x1b7b2
xorl %r13d, %r13d
movq %r14, %rdi
movq %r12, %rsi
callq 0x28820
movl %eax, %r14d
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0xcd2b
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x8260
leaq 0x48(%rsp), %r13
leaq 0x28(%rsp), %rbp
leaq 0x2d834(%rip), %r12     # 0x3a570
movq (%r12), %rdi
movl %r14d, %esi
callq 0x28934
movq %rax, %rdi
xorl %esi, %esi
callq 0x1b846
movq (%r12), %rdi
movl %r14d, %esi
callq 0x28934
leaq 0x2d4ff(%rip), %rcx     # 0x3a264
movl (%rcx), %esi
movq %rax, %rdi
callq 0x1b89c
movq (%r12), %rdi
movl %r14d, %esi
callq 0x28934
movq %rax, %rdi
callq 0x1b8a0
movq %rbx, %rdi
movl $0x18, %esi
callq 0xc558
movl $0xfc0, %edi            # imm = 0xFC0
callq 0x8250
movq %rax, %r14
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
movl $0x1, %edx
callq 0x1a8a0
movq 0x10(%rsp), %rax
movq %r14, (%rax)
movq %rbp, 0x18(%rsp)
leaq 0x18(%rsp), %r12
movq %r12, %rdi
leaq 0x1d428(%rip), %r14     # 0x2a1f3
movq %r14, %rsi
leaq 0x1d43a(%rip), %rdx     # 0x2a20f
callq 0xfc42
movq %r12, %rdi
callq 0xbd28
movq 0x18(%rsp), %rdi
cmpq %rbp, %rdi
je 0xcdf9
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8260
movq 0x8(%rbx), %rdi
callq 0x179ac
cmpl $0x26, %eax
movq %r15, %r12
je 0xcbf7
leaq 0x68(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1d3a0(%rip), %rsi     # 0x2a1be
leaq 0x1d3aa(%rip), %rdx     # 0x2a1cf
leaq 0x58(%rsp), %rdi
callq 0xfc42
leaq 0x58(%rsp), %rdi
callq 0xbd28
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0xce50
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 0x1d393(%rip), %rsi     # 0x2a210
leaq 0x1d3b9(%rip), %rdx     # 0x2a23d
leaq 0xb8(%rsp), %rdi
callq 0xfc42
leaq 0xb8(%rsp), %rsi
movq %rbx, %rdi
callq 0x16ebd
leaq 0xb8(%rsp), %rdi
callq 0x8488
movl $0x1, %edi
callq 0x82e0
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
cmpq %r14, %rdi
je 0xd051
movq 0xe8(%rsp), %rsi
jmp 0xd049
jmp 0xd032
movq %rax, %rbx
movb $0x1, %r13b
jmp 0xcf0a
movq %rax, %rbx
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcf0a
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x8260
testb %r13b, %r13b
je 0xd051
movl $0x48, %esi
movq %r15, %rdi
jmp 0xd04c
movq %rax, %rbx
leaq 0x148(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd051
movq 0x148(%rsp), %rsi
jmp 0xd049
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0xd051
movq 0x68(%rsp), %rsi
jmp 0xd049
jmp 0xd032
jmp 0xd00f
movq %rax, %rbx
movq 0x118(%rsp), %rdi
cmpq %r15, %rdi
je 0xd051
movq 0x128(%rsp), %rsi
jmp 0xd049
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
cmpq %r14, %rdi
je 0xd051
movq 0xc8(%rsp), %rsi
jmp 0xd049
jmp 0xd032
movq %rax, %rbx
movb $0x1, %r13b
jmp 0xcfde
movq %rax, %rbx
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0xcfde
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x8260
testb %r13b, %r13b
je 0xd051
movl $0x48, %esi
movq %r12, %rdi
jmp 0xd04c
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0xd051
movq 0xa8(%rsp), %rsi
jmp 0xd049
movq %rax, %rbx
movl $0xfc0, %esi            # imm = 0xFC0
movq %r14, %rdi
jmp 0xd04c
jmp 0xd032
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %rbp, %rdi
je 0xd051
movq 0x28(%rsp), %rsi
jmp 0xd049
movq %rax, %rbx
jmp 0xd051
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0xd051
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x8260
movq %rbx, %rdi
callq 0x8420
nop