// File: /workspace/github_cpp_makefile_star2_O2/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 $0x2048, %rsp           # imm = 0x2048
movq %rdi, %r14
leaq 0x11b26(%rip), %rsi     # 0x1d227
leaq 0xa0(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0xd770
leaq 0xa0(%rsp), %rdi
callq 0xa70a
leaq 0xa0(%rsp), %rdi
callq 0x8478
pushq $0x22
popq %rsi
movq %r14, %rdi
callq 0xaeb8
xorl %r12d, %r12d
leaq 0x21e23(%rip), %rbp     # 0x2d568
leaq 0xc0(%rsp), %r15
leaq 0xe0(%rsp), %rbx
movq 0x8(%r14), %rdi
callq 0x119f0
cmpl $0x3, %eax
je 0xb775
movq 0x8(%r14), %rdi
callq 0x119f0
cmpl $0x5, %eax
jne 0xb8b5
movq %r14, %rdi
callq 0xacee
movq %rax, 0x18(%rsp)
movq 0x8(%r14), %rdi
callq 0x119f0
cmpl $0x18, %eax
jne 0xb872
movq (%rbp), %r13
movq 0x8(%r14), %rsi
movq %r15, %rdi
callq 0x119f4
movq %r13, %rdi
movq %r15, %rsi
callq 0x1bc3c
movl %eax, %r13d
movq %r15, %rdi
callq 0x8478
cmpl $-0x1, %r13d
je 0xb7ca
testl %r13d, %r13d
js 0xb82b
jmp 0xb909
movq %r12, 0x10(%rsp)
movq (%rbp), %r13
pushq $0x48
popq %rdi
callq 0x8250
movq %rax, %rbp
movq 0x8(%r14), %rsi
movq %rbx, %r12
movq %rbx, %rdi
callq 0x119f4
movb $0x1, %r15b
movq %rbp, %rdi
movq %r12, %rsi
pushq $0x3
popq %rdx
callq 0x13aa4
xorl %r15d, %r15d
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1bbfc
movl %eax, %r13d
movq %rbx, %rdi
callq 0x8478
leaq 0xc0(%rsp), %r15
leaq 0x21d42(%rip), %rbp     # 0x2d568
movq 0x10(%rsp), %r12
movq (%rbp), %rdi
movl %r13d, %esi
callq 0x1bcc6
movq %rax, %rdi
xorl %esi, %esi
callq 0x13b1c
movq (%rbp), %rdi
movl %r13d, %esi
callq 0x1bcc6
leaq 0x21a08(%rip), %rcx     # 0x2d25c
movl (%rcx), %esi
movq %rax, %rdi
callq 0x13b54
movq (%rbp), %rdi
movl %r13d, %esi
callq 0x1bcc6
movq %rax, %rdi
callq 0x13b58
movq %r14, %rdi
pushq $0x18
popq %rsi
callq 0xaeb8
movl $0xfc0, %edi            # imm = 0xFC0
callq 0x8250
movq %rax, %r13
movq %rax, %rdi
leaq 0x18(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x132ec
movq %r13, 0x100(%rsp,%r12,8)
incq %r12
movq %r14, %rdi
pushq $0x27
popq %rsi
callq 0xaeb8
jmp 0xb755
leaq 0x11a0d(%rip), %rsi     # 0x1d2c9
leaq 0x60(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0xd770
leaq 0x60(%rsp), %rdi
callq 0xa70a
leaq 0x60(%rsp), %rdi
callq 0x8478
xorl %r15d, %r15d
movq 0x8(%r14), %rdi
callq 0x119f0
cmpl $0x23, %eax
je 0xb9f2
movq %r14, %rdi
callq 0xbd96
movq %rax, 0x10a0(%rsp,%r15,8)
incq %r15
jmp 0xb8e2
movq (%r14), %rbx
leaq 0x11927(%rip), %rsi     # 0x1d23a
leaq 0x80(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0xd770
leaq 0x80(%rsp), %rsi
movq %rbx, %rdi
callq 0x11393
leaq 0x80(%rsp), %rdi
callq 0x8478
pushq $0x1
popq %rdi
callq 0x82c0
movq %r12, %rbx
movq %rdx, %r13
movq %rax, %r12
leaq 0x60(%rsp), %rdi
callq 0x8478
jmp 0xb968
movq %r12, %rbx
movq %rdx, %r13
movq %rax, %r12
xorl %r15d, %r15d
jmp 0xb9d8
movq %rax, %r12
leaq 0xa0(%rsp), %rdi
jmp 0xb9c5
jmp 0xb989
movq %rax, %r12
leaq 0x80(%rsp), %rdi
jmp 0xb9c5
movq %rax, %r12
jmp 0xbad2
movq %rax, %r12
jmp 0xb9af
movq %rax, %r12
leaq 0xe0(%rsp), %rdi
callq 0x8478
testb %r15b, %r15b
je 0xbad2
pushq $0x48
popq %rsi
movq %rbp, %rdi
jmp 0xbacd
movq %rax, %r12
leaq 0xc0(%rsp), %rdi
callq 0x8478
jmp 0xbad2
movq %r12, %rbx
movq %rdx, %r13
movq %rax, %r12
cmpl $0x1, %r13d
jne 0xbad2
movq %r12, %rdi
callq 0x80e0
callq 0x83b0
movq %rbx, %r12
pushq $0x23
popq %rsi
movq %r14, %rdi
callq 0xaeb8
leaq 0x118c5(%rip), %rsi     # 0x1d2c9
leaq 0x40(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0xd770
leaq 0x40(%rsp), %rdi
callq 0xa888
leaq 0x40(%rsp), %rdi
callq 0x8478
leaq 0x117f9(%rip), %rsi     # 0x1d227
leaq 0x20(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0xd770
leaq 0x20(%rsp), %rdi
callq 0xa888
leaq 0x20(%rsp), %rdi
callq 0x8478
movl $0x1f60, %edi           # imm = 0x1F60
callq 0x8250
movq %rax, %r14
leaq 0x100(%rsp), %rsi
leaq 0x10a0(%rsp), %rcx
movq %rax, %rdi
movl %r12d, %edx
movl %r15d, %r8d
callq 0x19ea4
movq %r14, %rax
addq $0x2048, %rsp           # imm = 0x2048
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
movl $0x1f60, %esi           # imm = 0x1F60
movq %r14, %rdi
jmp 0xbacd
movq %rax, %r12
leaq 0x20(%rsp), %rdi
jmp 0xb9c5
jmp 0xb989
movq %rax, %r12
leaq 0x40(%rsp), %rdi
jmp 0xb9c5
jmp 0xb989
movq %rax, %r12
movl $0xfc0, %esi            # imm = 0xFC0
movq %r13, %rdi
callq 0x8260
movq %r12, %rdi
callq 0x8400