// File: /workspace/github_cpp_makefile_star2_O1/martinda3[P]Compiler/src/TCparser.cpp
// Function: toyc::TCparser::CompoundStatement()
ASstatement* TCparser::CompoundStatement() // Need statment and error handling
	{
		// CompoundStatement --> LCURLY { Type ID SEMICOLON } { Statement } RCURLY
		enteringDEBUG("Compound Statement");
        int loc;
		ASdefinition* operand[MAX_STATEMENTS];
		ASstatement* operand2[MAX_STATEMENTS];
		AStype* operand4[1];
		int i1 = 0;
		int i2 = 0;
		accept(LCURLY);
		while (buff->getTokenType() == INT || buff->getTokenType() == CHAR) // { Type ID SEMICOLON }
		{
			operand4[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 compound");
                    exit(EXIT_FAILURE);
                }
                symTable->getSym(loc)->setType(VAR);
                symTable->getSym(loc)->setOffset(_nextOffset);
                symTable->getSym(loc)->getNextOffset();
            }
			accept(ID);
			operand[i1] = new ASvarDef(operand4, 1);
			i1++;
			accept(SEMICOLON);
		}
		try
		{
			enteringDEBUG("Statement");
			while (buff->getTokenType() != RCURLY)
			{
				operand2[i2] = Statement();
				i2++;
			}
		}
		catch (int t) {}
		accept(RCURLY);
		exitingDEBUG("Statement");
		exitingDEBUG("Compound Statement");
		return new ASblockState(operand, i1, operand2, i2);
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2038, %rsp           # imm = 0x2038
movq %rdi, %r14
leaq 0xa0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1d1d2(%rip), %rsi     # 0x2a253
leaq 0x1d1dd(%rip), %rdx     # 0x2a265
leaq 0x90(%rsp), %rdi
callq 0xfc42
leaq 0x90(%rsp), %rdi
callq 0xbac6
movq 0x90(%rsp), %rdi
cmpq %rbx, %rdi
je 0xd0bf
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x8260
movq %r14, %rdi
movl $0x22, %esi
callq 0xc558
leaq 0xe0(%rsp), %r13
xorl %ebx, %ebx
leaq 0x2d493(%rip), %r15     # 0x3a570
leaq 0x8(%rsp), %rbp
movq 0x8(%r14), %rdi
callq 0x179ac
cmpl $0x3, %eax
je 0xd102
movq 0x8(%r14), %rdi
callq 0x179ac
cmpl $0x5, %eax
jne 0xd27f
movq %r14, %rdi
callq 0xc2f6
movq %rax, 0x8(%rsp)
movq 0x8(%r14), %rdi
callq 0x179ac
cmpl $0x18, %eax
jne 0xd238
movq (%r15), %r12
movq 0x8(%r14), %rsi
leaq 0xd0(%rsp), %rbp
movq %rbp, %rdi
callq 0x179b0
movq %r12, %rdi
movq %rbp, %rsi
callq 0x28862
movl %eax, %ebp
movq 0xd0(%rsp), %rdi
cmpq %r13, %rdi
je 0xd162
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x8260
cmpl $-0x1, %ebp
je 0xd174
testl %ebp, %ebp
js 0xd1f2
jmp 0xd2eb
movq %rbx, (%rsp)
movq %r15, %rax
movq %r13, %r15
movq (%rax), %rbp
movl $0x48, %edi
callq 0x8250
movq %rax, %r12
movq 0x8(%r14), %rsi
leaq 0x70(%rsp), %rbx
movq %rbx, %rdi
callq 0x179b0
movb $0x1, %r13b
movq %r12, %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq 0x1b7b2
xorl %r13d, %r13d
movq %rbp, %rdi
movq %r12, %rsi
callq 0x28820
movl %eax, %ebp
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0xd1e4
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x8260
movq %r15, %r13
leaq 0x2d382(%rip), %r15     # 0x3a570
movq (%rsp), %rbx
movq (%r15), %rdi
movl %ebp, %esi
callq 0x28934
movq %rax, %rdi
xorl %esi, %esi
callq 0x1b846
movq (%r15), %rdi
movl %ebp, %esi
callq 0x28934
leaq 0x2d04d(%rip), %rcx     # 0x3a264
movl (%rcx), %esi
movq %rax, %rdi
callq 0x1b89c
movq (%r15), %rdi
movl %ebp, %esi
callq 0x28934
movq %rax, %rdi
callq 0x1b8a0
leaq 0x8(%rsp), %rbp
movq %r14, %rdi
movl $0x18, %esi
callq 0xc558
movl $0xfc0, %edi            # imm = 0xFC0
callq 0x8250
movq %rax, %r12
movq %rax, %rdi
movq %rbp, %rsi
movl $0x1, %edx
callq 0x1a8a0
movq %r12, 0x1090(%rsp,%rbx,8)
incq %rbx
movq %r14, %rdi
movl $0x27, %esi
callq 0xc558
jmp 0xd0e2
leaq 0x60(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x1d066(%rip), %rsi     # 0x2a2f5
leaq 0x1d068(%rip), %rdx     # 0x2a2fe
leaq 0x50(%rsp), %rdi
callq 0xfc42
leaq 0x50(%rsp), %rdi
callq 0xbac6
movq 0x50(%rsp), %rdi
cmpq %rbp, %rdi
je 0xd2c1
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8260
xorl %r12d, %r12d
movq 0x8(%r14), %rdi
callq 0x179ac
cmpl $0x23, %eax
je 0xd43d
movq %r14, %rdi
callq 0xd946
movq %rax, 0xf0(%rsp,%r12,8)
incq %r12
jmp 0xd2c4
movq (%r14), %rbx
leaq 0xc0(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1cf65(%rip), %rsi     # 0x2a266
leaq 0x1cf82(%rip), %rdx     # 0x2a28a
leaq 0xb0(%rsp), %rdi
callq 0xfc42
leaq 0xb0(%rsp), %rsi
movq %rbx, %rdi
callq 0x16ebd
leaq 0xb0(%rsp), %rdi
callq 0x8488
movl $0x1, %edi
callq 0x82e0
movq %rdx, %r13
movq %rax, %r15
movq 0x50(%rsp), %rdi
xorl %r12d, %r12d
cmpq %rbp, %rdi
je 0xd426
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8260
jmp 0xd426
movq %rdx, %r13
movq %rax, %r15
xorl %r12d, %r12d
jmp 0xd426
movq %rax, %r15
movq 0x90(%rsp), %rdi
cmpq %rbx, %rdi
je 0xd562
movq 0xa0(%rsp), %rsi
jmp 0xd418
jmp 0xd3b4
movq %rax, %r15
movq 0xb0(%rsp), %rdi
cmpq %r14, %rdi
je 0xd562
movq 0xc0(%rsp), %rsi
jmp 0xd418
movq %rax, %r15
jmp 0xd562
movq %rax, %r15
movb $0x1, %r13b
jmp 0xd3e9
movq %rax, %r15
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0xd3e9
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x8260
testb %r13b, %r13b
je 0xd562
movl $0x48, %esi
jmp 0xd55a
movq %rax, %r15
movq 0xd0(%rsp), %rdi
cmpq %r13, %rdi
je 0xd562
movq 0xe0(%rsp), %rsi
incq %rsi
jmp 0xd55d
movq %rdx, %r13
movq %rax, %r15
cmpl $0x1, %r13d
jne 0xd562
movq %r15, %rdi
callq 0x80e0
callq 0x83d0
movq %r14, %rdi
movl $0x23, %esi
callq 0xc558
leaq 0x40(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1ce9b(%rip), %rsi     # 0x2a2f5
leaq 0x1ce9d(%rip), %rdx     # 0x2a2fe
leaq 0x30(%rsp), %rdi
callq 0xfc42
leaq 0x30(%rsp), %rdi
callq 0xbd28
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0xd48c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8260
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1cdb7(%rip), %rsi     # 0x2a253
leaq 0x1cdc2(%rip), %rdx     # 0x2a265
leaq 0x10(%rsp), %rdi
callq 0xfc42
leaq 0x10(%rsp), %rdi
callq 0xbd28
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0xd4ce
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8260
movl $0x1f60, %edi           # imm = 0x1F60
callq 0x8250
movq %rax, %r14
leaq 0x1090(%rsp), %rsi
leaq 0xf0(%rsp), %rcx
movq %rax, %rdi
movl %ebx, %edx
movl %r12d, %r8d
callq 0x25584
movq %r14, %rax
addq $0x2038, %rsp           # imm = 0x2038
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movl $0x1f60, %esi           # imm = 0x1F60
movq %r14, %rdi
jmp 0xd55d
movq %rax, %r15
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0xd562
movq 0x20(%rsp), %rsi
jmp 0xd418
jmp 0xd3b4
movq %rax, %r15
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0xd562
movq 0x40(%rsp), %rsi
jmp 0xd418
jmp 0xd3b4
movq %rax, %r15
movl $0xfc0, %esi            # imm = 0xFC0
movq %r12, %rdi
callq 0x8260
movq %r15, %rdi
callq 0x8420