// File: /workspace/github_cpp_makefile_star2_O1/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 0x106b0
leaq 0x13317(%rip), %rsi     # 0x37665
leaq 0x40(%rsp), %rdi
movq %r12, %rdx
callq 0x107e2
leaq 0x13309(%rip), %rsi     # 0x3766b
leaq 0x20(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x107e2
leaq 0x132f7(%rip), %rsi     # 0x3766f
movq %rsp, %rdi
leaq 0x60(%rsp), %rdx
callq 0x107e2
leaq 0x1396e(%rip), %rsi     # 0x37cfa
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x107e2
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 0x24548
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x24548
cmpq $0x0, 0x10(%r15)
je 0x24548
cmpq $0x0, 0x18(%r15)
jne 0x24548
movb $0x1, 0x1d1(%rbx)
movq %r14, %rsi
movq %rbx, %rdx
callq 0x11e3c
movb $0x0, 0x1d1(%rbx)
cmpb $0x0, 0x21b(%rbx)
jne 0x24834
movslq 0x310(%rbx), %rax
movq (%r14), %rcx
movq -0x18(%rcx), %rdi
addq %r14, %rdi
cmpb $0x66, 0x342(%rax,%rbx)
jne 0x2478d
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
leaq 0x13821(%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 0x1321c(%rip), %rsi     # 0x376b5
movl $0xa, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
incl %esi
movq %r12, %rdi
callq 0x75c0
leaq 0x13203(%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 0x130fa(%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 0x131ae(%rip), %rsi     # 0x376e4
movl $0x6, %edx
movq %rax, %rdi
callq 0x73a0
jmp 0x247e8
testq %rcx, %rcx
sete %dil
xorb $0x1, %sil
orb %dil, %sil
jne 0x246d5
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x246d5
cmpq $0x0, 0x10(%r15)
je 0x246d5
cmpq $0x0, 0x18(%r15)
je 0x246d5
movb $0x1, 0x1d1(%rbx)
movq %r14, %rsi
movq %rbx, %rdx
callq 0x11e3c
movb $0x0, 0x1d1(%rbx)
cmpb $0x0, 0x21b(%rbx)
jne 0x24964
movslq 0x310(%rbx), %rax
movq (%r14), %rcx
movq -0x18(%rcx), %rdi
addq %r14, %rdi
cmpb $0x66, 0x342(%rax,%rbx)
jne 0x248bc
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
leaq 0x13694(%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 0x1308f(%rip), %rsi     # 0x376b5
movl $0xa, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
incl %esi
movq %r12, %rdi
callq 0x75c0
leaq 0x13076(%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 0x12f6d(%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 0x13021(%rip), %rsi     # 0x376e4
movl $0x6, %edx
movq %rax, %rdi
callq 0x73a0
jmp 0x24917
testq %rdx, %rdx
setne %dl
orq %rcx, %rax
sete %al
andb %dl, %al
cmpb $0x1, %al
jne 0x24c3e
cmpq $0x0, 0x8(%r15)
je 0x24c3e
cmpq $0x0, 0x10(%r15)
je 0x24c3e
cmpq $0x0, 0x18(%r15)
jne 0x24c3e
incl 0x564(%rbx)
incl 0x528(%rbx)
leaq 0x4b8(%rbx), %rdi
movq %rsp, %rsi
callq 0xc5f0
leaq 0x528(%rbx), %r12
cmpl $0x1, 0x564(%rbx)
je 0x24744
cmpl $0x0, 0x5a8(%rbx)
je 0x24bb8
movb $0x1, 0x1d1(%rbx)
movq 0x8(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x11e3c
movb $0x0, 0x1d1(%rbx)
movq 0x538(%rbx), %rsi
cmpq 0x540(%rbx), %rsi
je 0x24ad6
movl 0x528(%rbx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x538(%rbx)
jmp 0x24ae5
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
movq %rax, %r12
leaq 0x13490(%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 0x12ea0(%rip), %rsi     # 0x3767b
movl $0x4, %edx
movq %rax, %rdi
callq 0x73a0
movq (%rsp), %rsi
movq 0x8(%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 0x12dcb(%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 0x12ba2(%rip), %rsi     # 0x37416
movl $0x1, %edx
movq %rax, %rdi
callq 0x73a0
movq 0x10(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x21fb0
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
jmp 0x24aac
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
movq %rax, %r12
leaq 0x13361(%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 0x12d71(%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 0x12c9b(%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 0x12a72(%rip), %rsi     # 0x37416
movl $0x1, %edx
movq %rax, %rdi
callq 0x73a0
movq 0x10(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x21fb0
cmpb $0x0, 0x21b(%rbx)
jne 0x24a29
leaq 0x12cb0(%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 0x12bd6(%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 0x129ad(%rip), %rsi     # 0x37416
movl $0x1, %edx
movq %rax, %rdi
callq 0x73a0
movq 0x18(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x21fb0
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 0x12952(%rip), %rsi     # 0x37416
movl $0x1, %edx
movq %rax, %rdi
callq 0x73a0
jmp 0x24c3e
leaq 0x530(%rbx), %rdi
movq %r12, %rdx
callq 0x20a34
incl 0x310(%rbx)
movb $0x1, 0x3d1(%rbx)
movq 0x10(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x21fb0
movq 0x4c0(%rbx), %rax
cmpq 0x4b8(%rbx), %rax
je 0x24b7c
movq 0x538(%rbx), %rax
cmpq 0x530(%rbx), %rax
je 0x24b7c
cmpb $0x1, 0x3d1(%rbx)
jne 0x24b7c
movq %r14, %rdi
callq 0x7180
movq %rax, %r13
leaq 0x12b96(%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 0x12a83(%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 0xc5f0
incl 0x310(%rbx)
movq 0x10(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x21fb0
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 0x24bdc
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 0x127fb(%rip), %rsi     # 0x37416
movl $0x1, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x564(%rbx), %eax
testl %eax, %eax
je 0x24c3a
decl %eax
movl %eax, 0x564(%rbx)
decl (%r12)
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24c54
callq 0x72e0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24c67
callq 0x72e0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24c7a
callq 0x72e0
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24c8d
callq 0x72e0
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24ca0
callq 0x72e0
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x24cde
movq %rax, %rbx
jmp 0x24cf1
movq %rax, %rbx
jmp 0x24d04
movq %rax, %rbx
jmp 0x24d17
movq %rax, %rbx
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24cde
callq 0x72e0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24cf1
callq 0x72e0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24d04
callq 0x72e0
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24d17
callq 0x72e0
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24d2a
callq 0x72e0
movq %rbx, %rdi
callq 0x75f0