// File: /workspace/github_cpp_makefile_star2_O2/gioannides[P]Language_Processors/src/../include/ast/ast_node.hpp
// Function: LabeledStatement::render_asm(std::basic_ofstream<char, std::char_traits<char>>&, Context&)
inline void LabeledStatement::render_asm(std::ofstream& file,Context& contxt) {

		
				
				

			if( LABELED_TYPE != NULL && ConstantExpressionPtr != NULL && *LABELED_TYPE == "case" && StatementPtr != NULL) {
				
				if(!contxt.ReadingSwitch){
					
					if( contxt.Cases.size() != 0 && contxt.VectorSize < contxt.Cases.size()){
						for(int i(0); i < contxt.Cases.size(); i++){

							if(contxt.Cases[i].ConstantTemp == ConstantExpressionPtr){
								file <<  std::endl << contxt.Cases[i].CaseID << ":";
								contxt.VectorSize++;
								break;
							}

						}
						
						
						StatementPtr->render_asm(file,contxt);
					}					
					
					
				}
				else if(contxt.ReadingSwitch){
					
					contxt.inCase = true;
					std::string label_id = labelGen(contxt);	
					std::string CASE = "$CASE" + label_id ;
					
						contxt.SwitchTemp.ConstantTemp = ConstantExpressionPtr;
						contxt.SwitchTemp.CaseID = CASE;

						contxt.rhs_of_expression = true;
						ConstantExpressionPtr->render_asm(file,contxt); //li in register 3
						contxt.rhs_of_expression = false;

						if(contxt.regType[contxt.Regs+1] == 'f'){					
							file << std::endl << "\tc.eq.s\t$f" << contxt.Regs << ",$f" << contxt.Regs+1;
							file << std::endl << "\tnop";
							file << std::endl << "\tbc1t\t" << CASE;
							file << std::endl << "\tnop";
						}
						else{
							file << std::endl << "\tbeq\t$" << contxt.Regs << ",$" << contxt.Regs+1 << "," << CASE;  //beq
						}
						contxt.Cases.push_back(contxt.SwitchTemp);
						file << std::endl << "\tnop";				//nop
					contxt.SwitchControl = 0;
					contxt.inCase = false;
					
					
				}
				
				
			}


			else if( LABELED_TYPE == NULL && ConstantExpressionPtr == NULL && IDENTIFIER != NULL && StatementPtr != NULL && !contxt.ReadingSwitch) {

				
				file << std::endl << *IDENTIFIER << "_" << contxt.funct_id << ":" << std::endl;
				StatementPtr->render_asm(file,contxt);
				
			}
		

			else if( LABELED_TYPE != NULL && ConstantExpressionPtr == NULL && *LABELED_TYPE == "default" && StatementPtr != NULL) {				
				
				if(!contxt.ReadingSwitch){
					
					if( contxt.Cases.size() != 0 && contxt.VectorSize < contxt.Cases.size()){
						for(int i(0); i < contxt.Cases.size(); i++){

							if(contxt.Cases[i].ConstantTemp == NULL){
								file <<  std::endl << contxt.Cases[i].CaseID << ":";
								contxt.VectorSize++;
								break;
							}

						}
						
						
						StatementPtr->render_asm(file,contxt);
					}					
					
					
				}
				else if(contxt.ReadingSwitch){
					
					contxt.inCase = true;
					std::string label_id = labelGen(contxt);	
					std::string DEFAULT = "$DEFAULT" + label_id ;
					
						contxt.SwitchTemp.ConstantTemp = NULL;
						contxt.SwitchTemp.CaseID = DEFAULT;


						file << std::endl << "\tb\t" << DEFAULT;  //beq

						contxt.Cases.push_back(contxt.SwitchTemp);
						file << std::endl << "\tnop";				//nop
					contxt.SwitchControl = 0;
					contxt.inCase = false;
					
				}
					
			}
			

		}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x1ab43
cmpq $0x0, 0x18(%r15)
je 0x1ab43
leaq 0x1323e(%rip), %rsi     # 0x2dc43
callq 0x820e
testb %al, %al
je 0x1ab43
movq 0x20(%r15), %rdi
testq %rdi, %rdi
je 0x1ab43
cmpb $0x0, 0x3d1(%rbx)
je 0x1acbc
movl $0x1, 0x5a8(%rbx)
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0xda27
leaq 0x131fb(%rip), %rsi     # 0x2dc48
leaq 0x8(%rsp), %rdi
movq %r12, %rdx
callq 0xdaa7
movq 0x18(%r15), %rax
movq %rax, 0x580(%rbx)
leaq 0x588(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x71e0
movb $0x1, 0x1d1(%rbx)
movq 0x18(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xd74c
movb $0x0, 0x1d1(%rbx)
movslq 0x310(%rbx), %rax
cmpb $0x66, 0x342(%rax,%rbx)
jne 0x1ad9d
movq %r14, %rdi
callq 0x7190
leaq 0x12c08(%rip), %rsi     # 0x2d6bf
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
movq %rax, %rdi
callq 0x7590
leaq 0x12cab(%rip), %rsi     # 0x2d77f
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
movq %r14, %rdi
callq 0x7190
leaq 0x12b01(%rip), %rsi     # 0x2d5fc
movq %rax, %rdi
callq 0x7310
movq %r14, %rdi
callq 0x7190
leaq 0x12bdc(%rip), %rsi     # 0x2d6ee
movq %rax, %rdi
callq 0x7310
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x72d0
movq %r14, %rdi
callq 0x7190
leaq 0x12ac6(%rip), %rsi     # 0x2d5fc
movq %rax, %rdi
callq 0x7310
jmp 0x1adfd
movq 0x10(%r15), %rdi
movq 0x18(%r15), %rax
movq %rdi, %rcx
orq %rax, %rcx
jne 0x1abdd
cmpq $0x0, 0x8(%r15)
je 0x1ae49
cmpq $0x0, 0x20(%r15)
je 0x1ae49
cmpb $0x0, 0x3d1(%rbx)
jne 0x1ae49
movq %r14, %rdi
callq 0x7190
movq 0x8(%r15), %rsi
movq %rax, %rdi
callq 0x72d0
leaq 0x130ef(%rip), %rsi     # 0x2dc84
movq %rax, %rdi
callq 0x7310
leaq 0x220(%rbx), %rsi
movq %rax, %rdi
callq 0x72d0
leaq 0x12843(%rip), %rsi     # 0x2d3f6
movq %rax, %rdi
callq 0x7310
movq %rax, %rdi
callq 0x7190
movq 0x20(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1a914
testq %rax, %rax
sete %al
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1ae49
leaq 0x1305a(%rip), %rsi     # 0x2dc55
callq 0x820e
testb %al, %al
je 0x1ae49
movq 0x20(%r15), %rdi
testq %rdi, %rdi
je 0x1ae49
cmpb $0x0, 0x3d1(%rbx)
je 0x1ad15
movl $0x1, 0x5a8(%rbx)
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0xda27
leaq 0x1301a(%rip), %rsi     # 0x2dc5d
leaq 0x8(%rsp), %rdi
movq %r15, %rdx
callq 0xdaa7
andq $0x0, 0x580(%rbx)
leaq 0x588(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x71e0
movq %r14, %rdi
callq 0x7190
leaq 0x12a64(%rip), %rsi     # 0x2d6dc
movq %rax, %rdi
callq 0x7310
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x72d0
leaq 0x580(%rbx), %rsi
leaq 0x3b8(%rbx), %rdi
callq 0x1c7c2
movq %r14, %rdi
callq 0x7190
leaq 0x1294d(%rip), %rsi     # 0x2d5fc
movq %rax, %rdi
callq 0x7310
jmp 0x1ae27
movq 0x3b8(%rbx), %rcx
movq 0x3c0(%rbx), %rsi
movq %rsi, %rax
subq %rcx, %rax
pushq $0x28
popq %r8
cqto
idivq %r8
cmpq %rcx, %rsi
je 0x1ae49
movslq 0x5ac(%rbx), %rdx
cmpq %rdx, %rax
jbe 0x1ae49
movq 0x18(%r15), %rdx
incq %rax
pushq $-0x20
popq %rsi
decq %rax
je 0x1abc7
leaq 0x28(%rsi), %r12
cmpq %rdx, 0x20(%rcx,%rsi)
movq %r12, %rsi
jne 0x1acfc
jmp 0x1ad69
movq 0x3b8(%rbx), %rcx
movq 0x3c0(%rbx), %rsi
movq %rsi, %rax
subq %rcx, %rax
pushq $0x28
popq %r8
cqto
idivq %r8
cmpq %rcx, %rsi
je 0x1ae49
movslq 0x5ac(%rbx), %rdx
cmpq %rdx, %rax
jbe 0x1ae49
incq %rax
pushq $-0x20
popq %rdx
decq %rax
je 0x1abc7
leaq 0x28(%rdx), %r12
cmpq $0x0, 0x20(%rcx,%rdx)
movq %r12, %rdx
jne 0x1ad51
movq %r14, %rdi
callq 0x7190
addq 0x3b8(%rbx), %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x72d0
leaq 0x1266c(%rip), %rsi     # 0x2d3f6
movq %rax, %rdi
callq 0x7310
incl 0x5ac(%rbx)
jmp 0x1abc3
movq %r14, %rdi
callq 0x7190
leaq 0x12ea2(%rip), %rsi     # 0x2dc4e
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
movq %rax, %rdi
callq 0x7590
leaq 0x12972(%rip), %rsi     # 0x2d73b
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x128a0(%rip), %rsi     # 0x2d688
movq %rax, %rdi
callq 0x7310
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x72d0
leaq 0x580(%rbx), %rsi
leaq 0x3b8(%rbx), %rdi
callq 0x1c7c2
movq %r14, %rdi
callq 0x7190
leaq 0x127dd(%rip), %rsi     # 0x2d5fc
movq %rax, %rdi
callq 0x7310
andl $0x0, 0x564(%rbx)
andl $0x0, 0x5a8(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x7170
leaq 0x28(%rsp), %rdi
callq 0x7170
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x1ae57
movq %rax, %rbx
jmp 0x1ae6b
jmp 0x1ae5e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7170
leaq 0x28(%rsp), %rdi
callq 0x7170
movq %rbx, %rdi
callq 0x75c0
nop