// File: 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
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x95c0
movq -0x1b0(%rbp), %rdx
leaq 0x244b6(%rip), %rsi     # 0x331f2
leaq -0x30(%rbp), %rdi
callq 0x13550
jmp 0xed47
leaq -0x30(%rbp), %rdi
callq 0xd790
jmp 0xed52
leaq -0x30(%rbp), %rdi
callq 0x9658
leaq -0x31(%rbp), %rdi
callq 0x93b0
movq -0x1b8(%rbp), %rdi
callq 0xe280
movq %rax, %rcx
movq -0x1b8(%rbp), %rax
movq %rcx, -0x50(%rbp)
movq 0x8(%rax), %rdi
callq 0x1be60
cmpl $0x18, %eax
jne 0xf033
movq -0x1b8(%rbp), %rax
leaq 0x368c2(%rip), %rcx     # 0x45660
movq (%rcx), %rcx
movq %rcx, -0x1d0(%rbp)
movq 0x8(%rax), %rsi
leaq -0x70(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
callq 0x1be70
movq -0x1d0(%rbp), %rdi
movq -0x1c8(%rbp), %rsi
callq 0x31840
movl %eax, -0x1bc(%rbp)
jmp 0xedd7
movl -0x1bc(%rbp), %eax
movl %eax, -0x48(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x9658
cmpl $-0x1, -0x48(%rbp)
jne 0xef20
leaq 0x36866(%rip), %rax     # 0x45660
movq (%rax), %rax
movq %rax, -0x1e0(%rbp)
movl $0x48, %edi
callq 0x9350
movq %rax, %rcx
movq -0x1b8(%rbp), %rax
movq %rcx, -0x1d8(%rbp)
movb $0x1, -0x91(%rbp)
movq 0x8(%rax), %rsi
leaq -0x90(%rbp), %rdi
callq 0x1be70
jmp 0xee38
movq -0x1d8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
movl $0x3, %edx
callq 0x1fe10
jmp 0xee52
movq -0x1d8(%rbp), %rsi
movq -0x1e0(%rbp), %rdi
movb $0x0, -0x91(%rbp)
callq 0x317c0
movl %eax, -0x1e4(%rbp)
jmp 0xee74
movl -0x1e4(%rbp), %eax
movl %eax, -0x48(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x9658
jmp 0xefda
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xeeb1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x9658
leaq -0x31(%rbp), %rdi
callq 0x93b0
jmp 0xf5c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x9658
jmp 0xf5c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xeeff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x9658
testb $0x1, -0x91(%rbp)
jne 0xef0a
jmp 0xef1b
movq -0x1d8(%rbp), %rdi
movl $0x48, %esi
callq 0x9360
jmp 0xf5c8
cmpl $-0x1, -0x48(%rbp)
jle 0xefd8
movq -0x1b8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1f8(%rbp)
leaq -0xb9(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
callq 0x95c0
movq -0x1f0(%rbp), %rdx
leaq 0x242a8(%rip), %rsi     # 0x33204
leaq -0xb8(%rbp), %rdi
callq 0x13550
jmp 0xef6a
movq -0x1f8(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x1b380
jmp 0xef7f
leaq -0xb8(%rbp), %rdi
callq 0x9658
leaq -0xb9(%rbp), %rdi
callq 0x93b0
movl $0x1, %edi
callq 0x9410
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xefc7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x9658
leaq -0xb9(%rbp), %rdi
callq 0x93b0
jmp 0xf5c8
jmp 0xefda
leaq 0x3667f(%rip), %rax     # 0x45660
movq (%rax), %rdi
movl -0x48(%rbp), %esi
callq 0x31930
movq %rax, %rdi
xorl %esi, %esi
callq 0x1ff10
leaq 0x36663(%rip), %rax     # 0x45660
movq (%rax), %rdi
movl -0x48(%rbp), %esi
callq 0x31930
movq %rax, %rdi
leaq 0x3633a(%rip), %rax     # 0x4534c
movl (%rax), %esi
callq 0x1ffd0
leaq 0x36640(%rip), %rax     # 0x45660
movq (%rax), %rdi
movl -0x48(%rbp), %esi
callq 0x31930
movq %rax, %rdi
callq 0x1fff0
movq -0x1b8(%rbp), %rdi
movl $0x18, %esi
callq 0xe670
movl $0x0, -0xc0(%rbp)
movl $0xfc0, %edi            # imm = 0xFC0
callq 0x9350
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x200(%rbp)
leaq -0x50(%rbp), %rsi
movl $0x1, %edx
callq 0x1efb0
jmp 0xf075
movq -0x200(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq -0xc0(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0xc0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc0(%rbp)
movq -0x1b8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1be60
cmpl $0x26, %eax
jne 0xf532
leaq -0xe1(%rbp), %rdi
movq %rdi, -0x208(%rbp)
callq 0x95c0
movq -0x208(%rbp), %rdx
leaq 0x24153(%rip), %rsi     # 0x33227
leaq -0xe0(%rbp), %rdi
callq 0x13550
jmp 0xf0e2
leaq -0xe0(%rbp), %rdi
callq 0xd790
jmp 0xf0f0
leaq -0xe0(%rbp), %rdi
callq 0x9658
leaq -0xe1(%rbp), %rdi
callq 0x93b0
movq -0x1b8(%rbp), %rdi
movl $0x26, %esi
callq 0xe670
movq -0x1b8(%rbp), %rdi
callq 0xe280
movq %rax, %rcx
movq -0x1b8(%rbp), %rax
movq %rcx, -0x50(%rbp)
movq 0x8(%rax), %rdi
callq 0x1be60
cmpl $0x18, %eax
jne 0xf419
movq -0x1b8(%rbp), %rax
leaq 0x3650d(%rip), %rcx     # 0x45660
movq (%rcx), %rcx
movq %rcx, -0x220(%rbp)
movq 0x8(%rax), %rsi
leaq -0x108(%rbp), %rdi
movq %rdi, -0x218(%rbp)
callq 0x1be70
movq -0x220(%rbp), %rdi
movq -0x218(%rbp), %rsi
callq 0x31840
movl %eax, -0x20c(%rbp)
jmp 0xf18f
movl -0x20c(%rbp), %eax
movl %eax, -0x48(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x9658
cmpl $-0x1, -0x48(%rbp)
jne 0xf306
leaq 0x364ab(%rip), %rax     # 0x45660
movq (%rax), %rax
movq %rax, -0x230(%rbp)
movl $0x48, %edi
callq 0x9350
movq %rax, %rcx
movq -0x1b8(%rbp), %rax
movq %rcx, -0x228(%rbp)
movb $0x1, -0x129(%rbp)
movq 0x8(%rax), %rsi
leaq -0x128(%rbp), %rdi
callq 0x1be70
jmp 0xf1f3
movq -0x228(%rbp), %rdi
leaq -0x128(%rbp), %rsi
movl $0x3, %edx
callq 0x1fe10
jmp 0xf20d
movq -0x228(%rbp), %rsi
movq -0x230(%rbp), %rdi
movb $0x0, -0x129(%rbp)
callq 0x317c0
movl %eax, -0x234(%rbp)
jmp 0xf22f
movl -0x234(%rbp), %eax
movl %eax, -0x48(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x9658
jmp 0xf3c0
movq -0x200(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0xfc0, %esi            # imm = 0xFC0
callq 0x9360
jmp 0xf5c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xf291
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x9658
leaq -0xe1(%rbp), %rdi
callq 0x93b0
jmp 0xf5c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x9658
jmp 0xf5c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xf2e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x9658
testb $0x1, -0x129(%rbp)
jne 0xf2f0
jmp 0xf301
movq -0x228(%rbp), %rdi
movl $0x48, %esi
callq 0x9360
jmp 0xf5c8
cmpl $-0x1, -0x48(%rbp)
jle 0xf3be
movq -0x1b8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x248(%rbp)
leaq -0x151(%rbp), %rdi
movq %rdi, -0x240(%rbp)
callq 0x95c0
movq -0x240(%rbp), %rdx
leaq 0x23f02(%rip), %rsi     # 0x33244
leaq -0x150(%rbp), %rdi
callq 0x13550
jmp 0xf350
movq -0x248(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x1b380
jmp 0xf365
leaq -0x150(%rbp), %rdi
callq 0x9658
leaq -0x151(%rbp), %rdi
callq 0x93b0
movl $0x1, %edi
callq 0x9410
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xf3ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x9658
leaq -0x151(%rbp), %rdi
callq 0x93b0
jmp 0xf5c8
jmp 0xf3c0
leaq 0x36299(%rip), %rax     # 0x45660
movq (%rax), %rdi
movl -0x48(%rbp), %esi
callq 0x31930
movq %rax, %rdi
xorl %esi, %esi
callq 0x1ff10
leaq 0x3627d(%rip), %rax     # 0x45660
movq (%rax), %rdi
movl -0x48(%rbp), %esi
callq 0x31930
movq %rax, %rdi
leaq 0x35f54(%rip), %rax     # 0x4534c
movl (%rax), %esi
callq 0x1ffd0
leaq 0x3625a(%rip), %rax     # 0x45660
movq (%rax), %rdi
movl -0x48(%rbp), %esi
callq 0x31930
movq %rax, %rdi
callq 0x1fff0
movq -0x1b8(%rbp), %rdi
movl $0x18, %esi
callq 0xe670
movl $0x0, -0x158(%rbp)
movl $0xfc0, %edi            # imm = 0xFC0
callq 0x9350
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x250(%rbp)
leaq -0x50(%rbp), %rsi
movl $0x1, %edx
callq 0x1efb0
jmp 0xf45b
movq -0x250(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq -0x158(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x158(%rbp), %eax
incl %eax
movl %eax, -0x158(%rbp)
leaq -0x179(%rbp), %rdi
movq %rdi, -0x258(%rbp)
callq 0x95c0
movq -0x258(%rbp), %rdx
leaq 0x23d87(%rip), %rsi     # 0x33227
leaq -0x178(%rbp), %rdi
callq 0x13550
jmp 0xf4ae
leaq -0x178(%rbp), %rdi
callq 0xda50
jmp 0xf4bc
leaq -0x178(%rbp), %rdi
callq 0x9658
leaq -0x179(%rbp), %rdi
callq 0x93b0
jmp 0xf09a
movq -0x250(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0xfc0, %esi            # imm = 0xFC0
callq 0x9360
jmp 0xf5c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xf521
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x178(%rbp), %rdi
callq 0x9658
leaq -0x179(%rbp), %rdi
callq 0x93b0
jmp 0xf5c8
leaq -0x1a1(%rbp), %rdi
movq %rdi, -0x260(%rbp)
callq 0x95c0
movq -0x260(%rbp), %rdx
leaq 0x23c9f(%rip), %rsi     # 0x331f2
leaq -0x1a0(%rbp), %rdi
callq 0x13550
jmp 0xf561
leaq -0x1a0(%rbp), %rdi
callq 0xda50
jmp 0xf56f
leaq -0x1a0(%rbp), %rdi
callq 0x9658
leaq -0x1a1(%rbp), %rdi
callq 0x93b0
movl -0xc0(%rbp), %eax
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xf5bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x9658
leaq -0x1a1(%rbp), %rdi
callq 0x93b0
movq -0x40(%rbp), %rdi
callq 0x95b0
nopw %cs:(%rax,%rax)