// File: /workspace/github_cpp_makefile_star2_O3/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 0x60(%rsp), %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0xfdc2
leaq 0x139e9(%rip), %rsi     # 0x37665
leaq 0x40(%rsp), %rdi
movq %r12, %rdx
callq 0xfef4
leaq 0x139db(%rip), %rsi     # 0x3766b
leaq 0x20(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0xfef4
leaq 0x139c9(%rip), %rsi     # 0x3766f
movq %rsp, %rdi
leaq 0x60(%rsp), %rdx
callq 0xfef4
leaq 0x14040(%rip), %rsi     # 0x37cfa
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0xfef4
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 0x23e8d
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x24404
cmpq $0x0, 0x10(%r15)
je 0x24404
cmpq $0x0, 0x18(%r15)
jne 0x24404
movq %r15, %r13
addq $0x10, %r13
movb $0x1, 0x1d1(%rbx)
movq %rax, %rcx
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x23d2e
movq 0x8(%rcx), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1a310
movb $0x0, 0x1d1(%rbx)
cmpb $0x0, 0x21b(%rbx)
jne 0x2419d
movslq 0x310(%rbx), %rax
movq (%r14), %rcx
movq -0x18(%rcx), %rdi
addq %r14, %rdi
cmpb $0x66, 0x342(%rax,%rbx)
jne 0x240f6
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
leaq 0x13edc(%rip), %rsi     # 0x37c7c
movl $0xb, %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 0x138d7(%rip), %rsi     # 0x376b5
movl $0xa, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
incl %esi
movq %r15, %rdi
callq 0x75c0
leaq 0x138be(%rip), %rsi     # 0x376c0
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
leaq 0x137b5(%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 0x13869(%rip), %rsi     # 0x376e4
movl $0x6, %edx
movq %rax, %rdi
callq 0x73a0
jmp 0x24151
testq %rcx, %rcx
sete %dil
xorb $0x1, %sil
orb %dil, %sil
je 0x23f69
testq %rdx, %rdx
setne %dl
orq %rcx, %rax
sete %al
andb %dl, %al
cmpb $0x1, %al
jne 0x24404
cmpq $0x0, 0x8(%r15)
je 0x24404
cmpq $0x0, 0x10(%r15)
je 0x24404
cmpq $0x0, 0x18(%r15)
jne 0x24404
incl 0x564(%rbx)
incl 0x528(%rbx)
leaq 0x4b8(%rbx), %rdi
movq %rsp, %rsi
callq 0xbcf4
leaq 0x528(%rbx), %r12
cmpl $0x1, 0x564(%rbx)
je 0x23f10
cmpl $0x0, 0x5a8(%rbx)
je 0x24559
movb $0x1, 0x1d1(%rbx)
movq 0x8(%r15), %rax
movq %rax, %rcx
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x23f1b
movq 0x8(%rcx), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1a310
movb $0x0, 0x1d1(%rbx)
movq 0x538(%rbx), %rsi
cmpq 0x540(%rbx), %rsi
je 0x24477
movl 0x528(%rbx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x538(%rbx)
jmp 0x24486
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x24404
cmpq $0x0, 0x10(%r15)
je 0x24404
cmpq $0x0, 0x18(%r15)
je 0x24404
leaq 0x18(%r15), %r13
movb $0x1, 0x1d1(%rbx)
movq %rax, %rcx
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x23f97
movq 0x8(%rcx), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1a310
movb $0x0, 0x1d1(%rbx)
cmpb $0x0, 0x21b(%rbx)
jne 0x24297
movslq 0x310(%rbx), %rax
movq (%r14), %rcx
movq -0x18(%rcx), %rdi
addq %r14, %rdi
cmpb $0x66, 0x342(%rax,%rbx)
jne 0x241ef
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
leaq 0x13c73(%rip), %rsi     # 0x37c7c
movl $0xb, %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, %r12
leaq 0x1366e(%rip), %rsi     # 0x376b5
movl $0xa, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
incl %esi
movq %r12, %rdi
callq 0x75c0
leaq 0x13655(%rip), %rsi     # 0x376c0
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
leaq 0x1354c(%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, %r12
leaq 0x13600(%rip), %rsi     # 0x376e4
movl $0x6, %edx
movq %rax, %rdi
callq 0x73a0
jmp 0x2424a
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
movq %rax, %r15
leaq 0x13b27(%rip), %rsi     # 0x37c44
movl $0x6, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
incl %esi
movq %r15, %rdi
callq 0x75c0
movq %rax, %r15
leaq 0x13537(%rip), %rsi     # 0x3767b
movl $0x4, %edx
movq %rax, %rdi
callq 0x73a0
movq (%rsp), %rsi
movq 0x8(%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 0x13462(%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 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rax, %rdi
callq 0x73a0
leaq 0x13239(%rip), %rsi     # 0x37416
movl $0x1, %edx
movq %rax, %rdi
callq 0x73a0
jmp 0x243a9
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
movq %rax, %r12
leaq 0x13a2e(%rip), %rsi     # 0x37c44
movl $0x6, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
incl %esi
movq %r12, %rdi
callq 0x75c0
movq %rax, %r12
leaq 0x1343e(%rip), %rsi     # 0x3767b
movl $0x4, %edx
movq %rax, %rdi
callq 0x73a0
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq %r12, %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 0x13368(%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 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rax, %rdi
callq 0x73a0
leaq 0x1313f(%rip), %rsi     # 0x37416
movl $0x1, %edx
movq %rax, %rdi
callq 0x73a0
movq 0x10(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x21854
cmpb $0x0, 0x21b(%rbx)
jne 0x2435c
leaq 0x1337d(%rip), %rsi     # 0x37680
movl $0x4, %edx
movq %r14, %rdi
callq 0x73a0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r14, %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 0x132a3(%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 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq %rax, %rdi
callq 0x73a0
leaq 0x1307a(%rip), %rsi     # 0x37416
movl $0x1, %edx
movq %rax, %rdi
callq 0x73a0
movq (%r13), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x21854
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 (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rax, %rdi
callq 0x73a0
leaq 0x1301f(%rip), %rsi     # 0x37416
movl $0x1, %edx
movq %rax, %rdi
callq 0x73a0
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2441a
callq 0x72e0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2442d
callq 0x72e0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24440
callq 0x72e0
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24453
callq 0x72e0
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24466
callq 0x72e0
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x530(%rbx), %rdi
movq %r12, %rdx
callq 0x202ae
incl 0x310(%rbx)
movb $0x1, 0x3d1(%rbx)
movq 0x10(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x21854
movq 0x4c0(%rbx), %rax
cmpq 0x4b8(%rbx), %rax
je 0x2451d
movq 0x538(%rbx), %rax
cmpq 0x530(%rbx), %rax
je 0x2451d
cmpb $0x1, 0x3d1(%rbx)
jne 0x2451d
movq %r14, %rdi
callq 0x7180
movq %rax, %r13
leaq 0x131f5(%rip), %rsi     # 0x376d2
movl $0x3, %edx
movq %rax, %rdi
callq 0x73a0
movq 0x4c0(%rbx), %rax
movq -0x20(%rax), %rsi
movq -0x18(%rax), %rdx
movq %r13, %rdi
callq 0x73a0
movq %r14, %rdi
callq 0x7180
leaq 0x130e2(%rip), %rsi     # 0x375f2
movl $0x4, %edx
movq %rax, %rdi
callq 0x73a0
movb $0x0, 0x3d1(%rbx)
decl 0x310(%rbx)
leaq 0x388(%rbx), %rdi
leaq 0x80(%rsp), %rsi
callq 0xbcf4
incl 0x310(%rbx)
movq 0x10(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x21854
decl 0x310(%rbx)
movq 0x4c0(%rbx), %rax
leaq -0x20(%rax), %rcx
movq %rcx, 0x4c0(%rbx)
movq -0x20(%rax), %rdi
addq $-0x10, %rax
cmpq %rax, %rdi
je 0x2457d
callq 0x72e0
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 (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rax, %rdi
callq 0x73a0
leaq 0x12e5a(%rip), %rsi     # 0x37416
movl $0x1, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x564(%rbx), %eax
testl %eax, %eax
je 0x245db
decl %eax
movl %eax, 0x564(%rbx)
decl (%r12)
jmp 0x24404
movq %rax, %rbx
jmp 0x24611
movq %rax, %rbx
jmp 0x24624
movq %rax, %rbx
jmp 0x24637
movq %rax, %rbx
jmp 0x2464a
movq %rax, %rbx
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24611
callq 0x72e0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24624
callq 0x72e0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24637
callq 0x72e0
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2464a
callq 0x72e0
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2465d
callq 0x72e0
movq %rbx, %rdi
callq 0x75f0
nop