// File: /workspace/github_cpp_makefile_star2_O2/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, %r13
movq %rdi, %rbx
leaq 0x11f5a(%rip), %rsi     # 0x1d192
leaq 0x98(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xd770
leaq 0x98(%rsp), %rdi
callq 0xa70a
leaq 0x98(%rsp), %rdi
callq 0x8478
movq %rbx, %rdi
callq 0xacee
movq %rax, 0x8(%rsp)
movq 0x8(%rbx), %rdi
callq 0x119f0
cmpl $0x18, %eax
jne 0xb391
leaq 0x222de(%rip), %r12     # 0x2d568
movq (%r12), %r14
movq 0x8(%rbx), %rsi
leaq 0x118(%rsp), %r15
movq %r15, %rdi
callq 0x119f4
movq %r14, %rdi
movq %r15, %rsi
callq 0x1bc3c
movl %eax, %ebp
leaq 0x118(%rsp), %rdi
callq 0x8478
cmpl $-0x1, %ebp
je 0xb2f9
testl %ebp, %ebp
js 0xb34d
movq (%rbx), %rbx
leaq 0x11ed1(%rip), %rsi     # 0x1d1a4
leaq 0x58(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xd770
leaq 0x58(%rsp), %rsi
movq %rbx, %rdi
callq 0x11393
leaq 0x58(%rsp), %rdi
jmp 0xb5f8
movq %r13, 0x10(%rsp)
movq (%r12), %r15
pushq $0x48
popq %rdi
callq 0x8250
movq %rax, %r14
movq 0x8(%rbx), %rsi
leaq 0x78(%rsp), %rdi
callq 0x119f4
movb $0x1, %r13b
leaq 0x78(%rsp), %rsi
pushq $0x3
popq %rdx
movq %r14, %rdi
callq 0x13aa4
xorl %r13d, %r13d
movq %r15, %rdi
movq %r14, %rsi
callq 0x1bbfc
movl %eax, %ebp
leaq 0x78(%rsp), %rdi
callq 0x8478
movq 0x10(%rsp), %r13
movq (%r12), %rdi
movl %ebp, %esi
callq 0x1bcc6
movq %rax, %rdi
xorl %esi, %esi
callq 0x13b1c
movq (%r12), %rdi
movl %ebp, %esi
callq 0x1bcc6
leaq 0x21ee8(%rip), %rcx     # 0x2d25c
movl (%rcx), %esi
movq %rax, %rdi
callq 0x13b54
movq (%r12), %rdi
movl %ebp, %esi
callq 0x1bcc6
movq %rax, %rdi
callq 0x13b58
pushq $0x18
popq %rsi
movq %rbx, %rdi
callq 0xaeb8
movl $0xfc0, %edi            # imm = 0xFC0
callq 0x8250
movq %rax, %r14
leaq 0x8(%rsp), %rsi
pushq $0x1
popq %rdx
movq %rax, %rdi
callq 0x132ec
movq %r14, (%r13)
leaq 0xf8(%rsp), %r14
leaq 0x7(%rsp), %rbp
leaq 0xd8(%rsp), %r12
movq 0x8(%rbx), %rdi
callq 0x119f0
cmpl $0x26, %eax
jne 0xb58e
movq %r14, %rdi
leaq 0x11dd9(%rip), %rsi     # 0x1d1c7
movq %rbp, %rdx
callq 0xd770
movq %r14, %rdi
callq 0xa70a
movq %r14, %rdi
callq 0x8478
movq %rbx, %rdi
pushq $0x26
popq %rsi
callq 0xaeb8
movq %rbx, %rdi
callq 0xacee
movq %rax, 0x8(%rsp)
movq 0x8(%rbx), %rdi
callq 0x119f0
cmpl $0x18, %eax
jne 0xb533
leaq 0x22131(%rip), %rax     # 0x2d568
movq (%rax), %r15
movq 0x8(%rbx), %rsi
movq %r12, %rdi
callq 0x119f4
movq %r15, %rdi
movq %r12, %rsi
callq 0x1bc3c
movl %eax, %r15d
movq %r12, %rdi
callq 0x8478
cmpl $-0x1, %r15d
je 0xb46c
testl %r15d, %r15d
js 0xb4dd
jmp 0xb5cd
movq %r13, %r14
leaq 0x220f2(%rip), %rax     # 0x2d568
movq (%rax), %r15
pushq $0x48
popq %rdi
callq 0x8250
movq %rax, %rbp
movq %rbx, %r12
movq 0x8(%rbx), %rsi
leaq 0xb8(%rsp), %rbx
movq %rbx, %rdi
callq 0x119f4
movb $0x1, %r13b
movq %rbp, %rdi
movq %rbx, %rsi
pushq $0x3
popq %rdx
callq 0x13aa4
xorl %r13d, %r13d
movq %r15, %rdi
movq %rbp, %rsi
callq 0x1bbfc
movl %eax, %r15d
leaq 0xb8(%rsp), %rdi
callq 0x8478
movq %r14, %r13
leaq 0xf8(%rsp), %r14
leaq 0x7(%rsp), %rbp
movq %r12, %rbx
leaq 0x22084(%rip), %r12     # 0x2d568
movq (%r12), %rdi
movl %r15d, %esi
callq 0x1bcc6
movq %rax, %rdi
xorl %esi, %esi
callq 0x13b1c
movq (%r12), %rdi
movl %r15d, %esi
callq 0x1bcc6
leaq 0x21d4f(%rip), %rcx     # 0x2d25c
movl (%rcx), %esi
movq %rax, %rdi
callq 0x13b54
movq (%r12), %rdi
movl %r15d, %esi
callq 0x1bcc6
movq %rax, %rdi
callq 0x13b58
leaq 0xd8(%rsp), %r12
movq %rbx, %rdi
pushq $0x18
popq %rsi
callq 0xaeb8
movl $0xfc0, %edi            # imm = 0xFC0
callq 0x8250
movq %rax, %r15
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x132ec
movq %r15, (%r13)
leaq 0x138(%rsp), %r15
movq %r15, %rdi
leaq 0x11c56(%rip), %rsi     # 0x1d1c7
movq %rbp, %rdx
callq 0xd770
movq %r15, %rdi
callq 0xa888
movq %r15, %rdi
callq 0x8478
jmp 0xb3d2
leaq 0x11bfd(%rip), %rsi     # 0x1d192
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xd770
leaq 0x18(%rsp), %rdi
callq 0xa888
leaq 0x18(%rsp), %rdi
callq 0x8478
pushq $0x1
popq %rax
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rbx
leaq 0x11c0d(%rip), %rsi     # 0x1d1e4
leaq 0x38(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xd770
leaq 0x38(%rsp), %rsi
movq %rbx, %rdi
callq 0x11393
leaq 0x38(%rsp), %rdi
callq 0x8478
pushq $0x1
popq %rdi
callq 0x82c0
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
jmp 0xb6c1
jmp 0xb6c8
movq %rax, %rbx
jmp 0xb632
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x8478
testb %r13b, %r13b
je 0xb6dd
pushq $0x48
popq %rsi
jmp 0xb658
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
jmp 0xb6c1
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
jmp 0xb6c1
jmp 0xb6c8
movq %rax, %rbx
movl $0xfc0, %esi            # imm = 0xFC0
movq %r14, %rdi
jmp 0xb6d8
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
jmp 0xb6c1
jmp 0xb6c8
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0xb6c1
jmp 0xb6c8
movq %rax, %rbx
jmp 0xb692
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x8478
testb %r13b, %r13b
je 0xb6dd
pushq $0x48
popq %rsi
movq %rbp, %rdi
jmp 0xb6d8
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
jmp 0xb6c1
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
jmp 0xb6c1
jmp 0xb6c8
movq %rax, %rbx
leaq 0x138(%rsp), %rdi
callq 0x8478
jmp 0xb6dd
movq %rax, %rbx
jmp 0xb6dd
movq %rax, %rbx
movl $0xfc0, %esi            # imm = 0xFC0
movq %r15, %rdi
callq 0x8260
movq %rbx, %rdi
callq 0x8400
nop