// File: /workspace/github_cpp_makefile_star2_O1/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 0x220b8
cmpq $0x0, 0x18(%r15)
je 0x220b8
leaq 0x15b8e(%rip), %rsi     # 0x37c39
callq 0x70c0
testl %eax, %eax
je 0x22213
movq 0x10(%r15), %rdi
movq 0x18(%r15), %rax
movq %rdi, %rcx
orq %rax, %rcx
jne 0x220e3
cmpq $0x0, 0x8(%r15)
je 0x220e3
cmpq $0x0, 0x20(%r15)
je 0x220e3
cmpb $0x0, 0x3d1(%rbx)
je 0x223ee
testq %rax, %rax
sete %al
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x22106
leaq 0x15b4e(%rip), %rsi     # 0x37c4b
callq 0x70c0
testl %eax, %eax
je 0x22112
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
cmpq $0x0, 0x20(%r15)
je 0x22106
cmpb $0x0, 0x3d1(%rbx)
je 0x224ae
movl $0x1, 0x5a8(%rbx)
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x106b0
leaq 0x15b0c(%rip), %rsi     # 0x37c53
leaq 0x8(%rsp), %rdi
movq %r15, %rdx
callq 0x107e2
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 0x15531(%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 0x24d32
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 0x153f1(%rip), %rsi     # 0x375f2
movl $0x4, %edx
movq %rax, %rdi
callq 0x73a0
jmp 0x22638
cmpq $0x0, 0x20(%r15)
je 0x220b8
cmpb $0x0, 0x3d1(%rbx)
je 0x22500
movl $0x1, 0x5a8(%rbx)
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x106b0
leaq 0x159f2(%rip), %rsi     # 0x37c3e
leaq 0x8(%rsp), %rdi
movq %r12, %rdx
callq 0x107e2
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 0x22294
movq %r14, %rsi
movq %rbx, %rdx
callq 0x102a0
movb $0x0, 0x1d1(%rbx)
movslq 0x310(%rbx), %rax
movq (%r14), %rcx
movq -0x18(%rcx), %rdi
addq %r14, %rdi
cmpb $0x66, 0x342(%rax,%rbx)
jne 0x22558
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
movq %rax, %r15
leaq 0x153d4(%rip), %rsi     # 0x376b5
movl $0xa, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
movq %r15, %rdi
callq 0x75c0
movq %rax, %r15
leaq 0x1546f(%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 0x152a1(%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 0x15355(%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 0x15216(%rip), %rsi     # 0x375f2
movl $0x4, %edx
movq %rax, %rdi
callq 0x73a0
jmp 0x225ea
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 0x15848(%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 0x14fb7(%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 0x21fb0
movq 0x3b8(%rbx), %rax
movq 0x3c0(%rbx), %rdx
subq %rax, %rdx
je 0x22106
sarq $0x3, %rdx
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rdx, %rcx
movslq 0x5ac(%rbx), %rdx
cmpq %rdx, %rcx
jbe 0x22106
xorl %r12d, %r12d
cmpq $0x0, (%rax,%r12)
je 0x22675
addq $0x28, %r12
decq %rcx
jne 0x224ea
jmp 0x22494
movq 0x3b8(%rbx), %rax
movq 0x3c0(%rbx), %rdx
subq %rax, %rdx
je 0x22106
sarq $0x3, %rdx
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rdx, %rcx
movslq 0x5ac(%rbx), %rdx
cmpq %rdx, %rcx
jbe 0x22106
movq 0x18(%r15), %rdx
xorl %r12d, %r12d
cmpq %rdx, (%rax,%r12)
je 0x22675
addq $0x28, %r12
decq %rcx
jne 0x22540
jmp 0x22494
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
movq %rax, %r15
leaq 0x156c5(%rip), %rsi     # 0x37c44
movl $0x6, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
movq %r15, %rdi
callq 0x75c0
movq %rax, %r15
leaq 0x1518d(%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 0x150b3(%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 0x24d32
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 0x14fc7(%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 0x22659
callq 0x72e0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x22106
callq 0x72e0
jmp 0x22106
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 0x14d79(%rip), %rsi     # 0x37416
movl $0x1, %edx
movq %rax, %rdi
callq 0x73a0
incl 0x5ac(%rbx)
jmp 0x22494
jmp 0x226b7
movq %rax, %rbx
jmp 0x226d4
jmp 0x226be
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x226d4
callq 0x72e0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x226e7
callq 0x72e0
movq %rbx, %rdi
callq 0x75f0
nop