// File: /workspace/github_cpp_makefile_star2_O3/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 0x2196c
cmpq $0x0, 0x18(%r15)
je 0x2196c
leaq 0x162da(%rip), %rsi     # 0x37c39
callq 0x70c0
testl %eax, %eax
je 0x21b95
movq 0x10(%r15), %rdi
movq 0x18(%r15), %rax
movq %rdi, %rcx
orq %rax, %rcx
jne 0x21a63
cmpq $0x0, 0x8(%r15)
je 0x21f33
cmpq $0x0, 0x20(%r15)
je 0x21f33
cmpb $0x0, 0x3d1(%rbx)
jne 0x21f33
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
movq 0x8(%r15), %rcx
movq (%rcx), %rsi
movq 0x8(%rcx), %rdx
movq %rax, %rdi
callq 0x73a0
movq %rax, %r12
leaq 0x16293(%rip), %rsi     # 0x37c7a
movl $0x1, %edx
movq %rax, %rdi
callq 0x73a0
movq 0x220(%rbx), %rsi
movq 0x228(%rbx), %rdx
movq %r12, %rdi
callq 0x73a0
movq %rax, %r12
leaq 0x15a02(%rip), %rsi     # 0x37416
movl $0x1, %edx
movq %rax, %rdi
callq 0x73a0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r12, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
movq 0x20(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x21854
testq %rax, %rax
sete %al
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x21f33
leaq 0x161ca(%rip), %rsi     # 0x37c4b
callq 0x70c0
testl %eax, %eax
jne 0x21f33
movq 0x20(%r15), %rdi
testq %rdi, %rdi
je 0x21f33
cmpb $0x0, 0x3d1(%rbx)
je 0x21dca
movl $0x1, 0x5a8(%rbx)
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0xfdc2
leaq 0x1618a(%rip), %rsi     # 0x37c53
leaq 0x8(%rsp), %rdi
movq %r15, %rdx
callq 0xfef4
movq $0x0, 0x580(%rbx)
leaq 0x588(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x71c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
movq %rax, %r15
leaq 0x15baf(%rip), %rsi     # 0x376d2
movl $0x3, %edx
movq %rax, %rdi
callq 0x73a0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0x73a0
leaq 0x580(%rbx), %rsi
leaq 0x3b8(%rbx), %rdi
callq 0x24666
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
leaq 0x15a6f(%rip), %rsi     # 0x375f2
movl $0x4, %edx
movq %rax, %rdi
callq 0x73a0
jmp 0x21eff
movq 0x20(%r15), %rdi
testq %rdi, %rdi
je 0x2196c
cmpb $0x0, 0x3d1(%rbx)
je 0x21d72
movl $0x1, 0x5a8(%rbx)
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0xfdc2
leaq 0x1606e(%rip), %rsi     # 0x37c3e
leaq 0x8(%rsp), %rdi
movq %r12, %rdx
callq 0xfef4
movq 0x18(%r15), %rax
movq %rax, 0x580(%rbx)
leaq 0x588(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x71c0
movb $0x1, 0x1d1(%rbx)
movq 0x18(%r15), %rax
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0x21c18
movq %r14, %rsi
movq %rbx, %rdx
callq 0xf9a2
movb $0x0, 0x1d1(%rbx)
movslq 0x310(%rbx), %rax
movq (%r14), %rcx
movq -0x18(%rcx), %rdi
addq %r14, %rdi
cmpb $0x66, 0x342(%rax,%rbx)
jne 0x21e1f
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
movq %rax, %r15
leaq 0x15a50(%rip), %rsi     # 0x376b5
movl $0xa, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
movq %r15, %rdi
callq 0x75c0
movq %rax, %r15
leaq 0x15aeb(%rip), %rsi     # 0x37775
movl $0x3, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
incl %esi
movq %r15, %rdi
callq 0x75c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
leaq 0x1591d(%rip), %rsi     # 0x375f2
movl $0x4, %edx
movq %rax, %rdi
callq 0x73a0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
movq %rax, %r15
leaq 0x159d1(%rip), %rsi     # 0x376e4
movl $0x6, %edx
movq %rax, %rdi
callq 0x73a0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0x73a0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
leaq 0x15892(%rip), %rsi     # 0x375f2
movl $0x4, %edx
movq %rax, %rdi
callq 0x73a0
jmp 0x21eb1
movq 0x3b8(%rbx), %rax
movq 0x3c0(%rbx), %rdx
subq %rax, %rdx
je 0x21f33
sarq $0x3, %rdx
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rdx, %rcx
movslq 0x5ac(%rbx), %rdx
cmpq %rdx, %rcx
jbe 0x21f33
movq 0x18(%r15), %rdx
xorl %r12d, %r12d
cmpq %rdx, (%rax,%r12)
je 0x21f3f
addq $0x28, %r12
decq %rcx
jne 0x21db2
jmp 0x21a4d
movq 0x3b8(%rbx), %rax
movq 0x3c0(%rbx), %rdx
subq %rax, %rdx
je 0x21f33
sarq $0x3, %rdx
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rdx, %rcx
movslq 0x5ac(%rbx), %rdx
cmpq %rdx, %rcx
jbe 0x21f33
xorl %r12d, %r12d
cmpq $0x0, (%rax,%r12)
je 0x21f3f
addq $0x28, %r12
decq %rcx
jne 0x21e06
jmp 0x21a4d
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
movq %rax, %r15
leaq 0x15dfe(%rip), %rsi     # 0x37c44
movl $0x6, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
movq %r15, %rdi
callq 0x75c0
movq %rax, %r15
leaq 0x158c6(%rip), %rsi     # 0x37731
movl $0x2, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
incl %esi
movq %r15, %rdi
callq 0x75c0
movq %rax, %r15
leaq 0x157ec(%rip), %rsi     # 0x3767e
movl $0x1, %edx
movq %rax, %rdi
callq 0x73a0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0x73a0
leaq 0x580(%rbx), %rsi
leaq 0x3b8(%rbx), %rdi
callq 0x24666
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
leaq 0x15700(%rip), %rsi     # 0x375f2
movl $0x4, %edx
movq %rax, %rdi
callq 0x73a0
xorl %eax, %eax
movl %eax, 0x564(%rbx)
movl %eax, 0x5a8(%rbx)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21f20
callq 0x72e0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21f33
callq 0x72e0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x7180
movq 0x3b8(%rbx), %rcx
movq 0x8(%rcx,%r12), %rsi
movq 0x10(%rcx,%r12), %rdx
movq %rax, %rdi
callq 0x73a0
leaq 0x154af(%rip), %rsi     # 0x37416
movl $0x1, %edx
movq %rax, %rdi
callq 0x73a0
incl 0x5ac(%rbx)
jmp 0x21a49
jmp 0x21f81
movq %rax, %rbx
jmp 0x21f9e
jmp 0x21f88
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21f9e
callq 0x72e0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21fb1
callq 0x72e0
movq %rbx, %rdi
callq 0x75f0
nop