// File: /workspace/github_cpp_makefile_star2_O2/gioannides[P]Language_Processors/src/../include/ast/ast_node.hpp
// Function: SelectionStatement::render_asm(std::basic_ofstream<char, std::char_traits<char>>&, Context&)
inline void SelectionStatement::render_asm(std::ofstream& file, Context& contxt) {
		
			std::string label_id = labelGen(contxt);
			std::string ELSE = "$ELSE" + label_id;
			std::string IF = "$IF" + label_id;
			std::string END = "$END" + label_id;
			std::string SWITCH = "$SWITCH" + label_id;
			

			if( SELECTIVE_IF != NULL && SELECTIVE_SWITCH == NULL && SELECTIVE_ELSE == NULL && AssignmentExpressionPtr != NULL && StatementPtr != NULL && StatementPtr2 == NULL) {
				
				contxt.rhs_of_expression = true;
				AssignmentExpressionPtr->render_asm(file,contxt);
				contxt.rhs_of_expression = false;
				if(!contxt.reading)	{
					if(contxt.regType[contxt.Regs+1] == 'f'){
						file << std::endl << "\tli.s\t$f1,0";
						
						file << std::endl << "\tc.eq.s\t$f" << contxt.Regs+1 << ",$f1";
						file << std::endl << "\tnop";
						file << std::endl << "\tbc1t\t" << END;
						file << std::endl << "\tnop";
					}
					else{
						file << std::endl << "\tbeq\t$" << contxt.Regs+1 <<",$0," << END;
						file << std::endl << "\tnop";
					}
				}
				file << std::endl << IF << ":";
				StatementPtr->render_asm(file,contxt);
			        file << std::endl << END << ":"; 
			}
			
			
			else if( SELECTIVE_IF != NULL && SELECTIVE_SWITCH == NULL && SELECTIVE_ELSE != NULL && AssignmentExpressionPtr != NULL && StatementPtr != NULL && StatementPtr2 != NULL) {
				contxt.rhs_of_expression = true;
				AssignmentExpressionPtr->render_asm(file,contxt);
				contxt.rhs_of_expression = false;
				if(!contxt.reading)	{
					if(contxt.regType[contxt.Regs+1] == 'f'){
						file << std::endl << "\tli.s\t$f1,0";						
						file << std::endl << "\tc.eq.s\t$f" << contxt.Regs+1 << ",$f1";
						file << std::endl << "\tnop";
						file << std::endl << "\tbc1t\t" << ELSE;
						file << std::endl << "\tnop";
					}
					else{
						file << std::endl << "\tbeq\t$" << contxt.Regs+1 <<",$0," << ELSE;
						file << std::endl << "\tnop";
					}
				}
				file << std::endl << IF << ":";
				StatementPtr->render_asm(file,contxt);
				if(!contxt.reading)	{
					file << "\n\tb " << END;
					file << std::endl << "\tnop";
				}
				file << std::endl << ELSE << ":";
				StatementPtr2->render_asm(file,contxt);
				file << std::endl << END << ":"; 
			}
						

			else if( SELECTIVE_IF == NULL && SELECTIVE_SWITCH != NULL && SELECTIVE_ELSE == NULL && AssignmentExpressionPtr != NULL && StatementPtr != NULL && StatementPtr2 == NULL) {					
					
				
							
					
					contxt.SwitchControl++;
					contxt.BreakCounter++;
					contxt.LastScope.push_back(END);

				if( contxt.SwitchControl == 1 || contxt.inCase){

					
					
					contxt.rhs_of_expression = true;
					AssignmentExpressionPtr->render_asm(file,contxt);
					contxt.rhs_of_expression = false;			

					contxt.BreakTracker.push_back(contxt.BreakCounter);
					contxt.Regs++;
					contxt.ReadingSwitch = true;
					
					StatementPtr->render_asm(file,contxt);
					if( contxt.LastScope.size() != 0 && contxt.BreakTracker.size() != 0 && contxt.ReadingSwitch){
						file << std::endl << "\tb\t" << contxt.LastScope[contxt.LastScope.size()-1];		//The label of the loopend
						//contxt.BreakTracker.pop_back();
						file << std::endl << "\tnop";
					}
					contxt.ReadingSwitch = false;
					contxt.Regs--;			

					
					
					
					
					contxt.EndSwitchLoop.push_back(SWITCH);
					contxt.Regs++;
					StatementPtr->render_asm(file,contxt);
					contxt.Regs--;
					
					
					
					
				}
				

				
				contxt.LastScope.pop_back();
				file << std::endl << END << ":";
			
					
					
				if(contxt.SwitchControl!=0){
					contxt.SwitchControl--;
				}
					contxt.BreakCounter--;
					
				
					
			}
			//if(contxt.LastScope.size() > 0 && !contxt.ReadingSwitch && contxt.VectorSize >= contxt.Cases.size() && contxt.VectorSize != 0){
			//	file << std::endl << contxt.LastScope[contxt.LastScope.size()-1] << ":";
			//}
			//contxt.inCase = false;
				
		
		}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0xda27
leaq 0x114cd(%rip), %rsi     # 0x2d66f
leaq 0x60(%rsp), %rdi
movq %r12, %rdx
callq 0xdaa7
leaq 0x114bf(%rip), %rsi     # 0x2d675
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0xdaa7
leaq 0x114ad(%rip), %rsi     # 0x2d679
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0xdaa7
leaq 0x11b24(%rip), %rsi     # 0x2dd04
leaq 0x80(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0xdaa7
movq 0x20(%r15), %rax
movq 0x28(%r15), %rcx
testq %rax, %rax
setne %dil
movq 0x30(%r15), %rdx
testq %rdx, %rdx
sete %sil
andb %dil, %sil
testq %rcx, %rcx
sete %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x1c2f9
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x1c72c
cmpq $0x0, 0x10(%r15)
je 0x1c72c
cmpq $0x0, 0x18(%r15)
jne 0x1c72c
movb $0x1, 0x1d1(%rbx)
movq %r14, %rsi
movq %rbx, %rdx
callq 0xe864
movb $0x0, 0x1d1(%rbx)
cmpb $0x0, 0x21b(%rbx)
jne 0x1c5e0
movslq 0x310(%rbx), %rax
cmpb $0x66, 0x342(%rax,%rbx)
jne 0x1c588
movq %r14, %rdi
callq 0x7190
leaq 0x119f6(%rip), %rsi     # 0x2dc86
movq %rax, %rdi
callq 0x7310
movq %r14, %rdi
callq 0x7190
leaq 0x11418(%rip), %rsi     # 0x2d6bf
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x11404(%rip), %rsi     # 0x2d6ca
movq %rax, %rdi
callq 0x7310
movq %r14, %rdi
callq 0x7190
leaq 0x1131f(%rip), %rsi     # 0x2d5fc
movq %rax, %rdi
callq 0x7310
movq %r14, %rdi
callq 0x7190
leaq 0x113fa(%rip), %rsi     # 0x2d6ee
jmp 0x1c5b6
testq %rcx, %rcx
sete %dil
xorb $0x1, %sil
orb %dil, %sil
je 0x1c4b2
testq %rdx, %rdx
setne %dl
orq %rcx, %rax
sete %al
andb %dl, %al
cmpb $0x1, %al
jne 0x1c72c
cmpq $0x0, 0x8(%r15)
je 0x1c72c
cmpq $0x0, 0x10(%r15)
je 0x1c72c
cmpq $0x0, 0x18(%r15)
jne 0x1c72c
incl 0x564(%rbx)
incl 0x528(%rbx)
leaq 0x4b8(%rbx), %r13
movq %rsp, %rsi
movq %r13, %rdi
callq 0xab3c
leaq 0x528(%rbx), %r12
cmpl $0x1, 0x564(%rbx)
je 0x1c37f
cmpl $0x0, 0x5a8(%rbx)
je 0x1c46d
movb $0x1, 0x1d1(%rbx)
movq 0x8(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xe864
movb $0x0, 0x1d1(%rbx)
leaq 0x530(%rbx), %rdi
movq %r12, %rsi
callq 0xfa9e
incl 0x310(%rbx)
movb $0x1, 0x3d1(%rbx)
movq 0x10(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1a914
movq 0x4c0(%rbx), %rax
cmpq 0x4b8(%rbx), %rax
je 0x1c431
movq 0x538(%rbx), %rax
cmpq 0x530(%rbx), %rax
je 0x1c431
cmpb $0x1, 0x3d1(%rbx)
jne 0x1c431
movq %r14, %rdi
callq 0x7190
leaq 0x112dd(%rip), %rsi     # 0x2d6dc
movq %rax, %rdi
callq 0x7310
movq 0x4c0(%rbx), %rsi
addq $-0x20, %rsi
movq %rax, %rdi
callq 0x72d0
movq %r14, %rdi
callq 0x7190
leaq 0x111d3(%rip), %rsi     # 0x2d5fc
movq %rax, %rdi
callq 0x7310
movb $0x0, 0x3d1(%rbx)
decl 0x310(%rbx)
leaq 0x388(%rbx), %rdi
leaq 0x80(%rsp), %rsi
callq 0xab3c
incl 0x310(%rbx)
movq 0x10(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1a914
decl 0x310(%rbx)
movq %r13, %rdi
callq 0xcbde
movq %r14, %rdi
callq 0x7190
movq %rsp, %rsi
movq %rax, %rdi
callq 0x72d0
leaq 0x10f67(%rip), %rsi     # 0x2d3f6
movq %rax, %rdi
callq 0x7310
movl 0x564(%rbx), %eax
testl %eax, %eax
je 0x1c4a9
decl %eax
movl %eax, 0x564(%rbx)
decl (%r12)
jmp 0x1c72c
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x1c72c
cmpq $0x0, 0x10(%r15)
je 0x1c72c
cmpq $0x0, 0x18(%r15)
je 0x1c72c
movb $0x1, 0x1d1(%rbx)
movq %r14, %rsi
movq %rbx, %rdx
callq 0xe864
movb $0x0, 0x1d1(%rbx)
cmpb $0x0, 0x21b(%rbx)
jne 0x1c667
movslq 0x310(%rbx), %rax
cmpb $0x66, 0x342(%rax,%rbx)
jne 0x1c60d
movq %r14, %rdi
callq 0x7190
leaq 0x11767(%rip), %rsi     # 0x2dc86
movq %rax, %rdi
callq 0x7310
movq %r14, %rdi
callq 0x7190
leaq 0x11189(%rip), %rsi     # 0x2d6bf
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x11175(%rip), %rsi     # 0x2d6ca
movq %rax, %rdi
callq 0x7310
movq %r14, %rdi
callq 0x7190
leaq 0x11090(%rip), %rsi     # 0x2d5fc
movq %rax, %rdi
callq 0x7310
movq %r14, %rdi
callq 0x7190
leaq 0x1116b(%rip), %rsi     # 0x2d6ee
jmp 0x1c63b
movq %r14, %rdi
callq 0x7190
leaq 0x116b7(%rip), %rsi     # 0x2dc4e
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x110cf(%rip), %rsi     # 0x2d685
movq %rax, %rdi
callq 0x7310
movq %rsp, %rsi
movq %rax, %rdi
callq 0x72d0
movq %r14, %rdi
callq 0x7190
leaq 0x11024(%rip), %rsi     # 0x2d5fc
movq %rax, %rdi
callq 0x7310
movq %r14, %rdi
callq 0x7190
leaq 0x40(%rsp), %rsi
movq %rax, %rdi
callq 0x72d0
leaq 0x10dfa(%rip), %rsi     # 0x2d3f6
movq %rax, %rdi
callq 0x7310
addq $0x10, %r15
jmp 0x1c6fc
movq %r14, %rdi
callq 0x7190
leaq 0x11632(%rip), %rsi     # 0x2dc4e
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x1104a(%rip), %rsi     # 0x2d685
movq %rax, %rdi
callq 0x7310
leaq 0x60(%rsp), %rsi
movq %rax, %rdi
callq 0x72d0
movq %r14, %rdi
callq 0x7190
leaq 0x10f9d(%rip), %rsi     # 0x2d5fc
movq %rax, %rdi
callq 0x7310
movq %r14, %rdi
callq 0x7190
leaq 0x40(%rsp), %rsi
movq %rax, %rdi
callq 0x72d0
leaq 0x10d73(%rip), %rsi     # 0x2d3f6
movq %rax, %rdi
callq 0x7310
movq 0x10(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1a914
cmpb $0x0, 0x21b(%rbx)
jne 0x1c6d4
leaq 0x10fe0(%rip), %rsi     # 0x2d68a
movq %r14, %rdi
callq 0x7310
movq %rsp, %rsi
movq %rax, %rdi
callq 0x72d0
movq %r14, %rdi
callq 0x7190
leaq 0x10f30(%rip), %rsi     # 0x2d5fc
movq %rax, %rdi
callq 0x7310
movq %r14, %rdi
callq 0x7190
leaq 0x60(%rsp), %rsi
movq %rax, %rdi
callq 0x72d0
leaq 0x10d06(%rip), %rsi     # 0x2d3f6
movq %rax, %rdi
callq 0x7310
addq $0x18, %r15
movq (%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1a914
movq %r14, %rdi
callq 0x7190
movq %rsp, %rsi
movq %rax, %rdi
callq 0x72d0
leaq 0x10cd2(%rip), %rsi     # 0x2d3f6
movq %rax, %rdi
callq 0x7310
leaq 0x80(%rsp), %rdi
callq 0x7170
movq %rsp, %rdi
callq 0x7170
leaq 0x40(%rsp), %rdi
callq 0x7170
leaq 0x60(%rsp), %rdi
callq 0x7170
leaq 0x20(%rsp), %rdi
callq 0x7170
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x1c794
movq %rax, %rbx
jmp 0x1c79c
movq %rax, %rbx
jmp 0x1c7a6
movq %rax, %rbx
jmp 0x1c7b0
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x7170
movq %rsp, %rdi
callq 0x7170
leaq 0x40(%rsp), %rdi
callq 0x7170
leaq 0x60(%rsp), %rdi
callq 0x7170
leaq 0x20(%rsp), %rdi
callq 0x7170
movq %rbx, %rdi
callq 0x75c0