// File: /workspace/github_cpp_makefile_star2_O2/gioannides[P]Language_Processors/src/../include/ast/ast_node_python.cpp
// Function: SelectionStatement::print_py(std::basic_ofstream<char, std::char_traits<char>>&, bool)
inline void SelectionStatement::print_py(std::ofstream& file,bool elseif) { 	//the elseif flag is initially set to false when the program starts for the first time
	
	if( SELECTIVE_IF != NULL && AssignmentExpressionPtr != NULL && StatementPtr != NULL && StatementPtr2 == NULL && SELECTIVE_ELSE == NULL && SELECTIVE_SWITCH == NULL) {
				
								
		if(elseif == false){						//if the elseif flag is on, then this has already been printed as elif, from below, so skip (looked ahead)
			
			for( int i(0); i<counter_py; i++) { file << "\t"; } 	// the elseif flag cannot be ON if this is the first time we execute, so the check here is fine to do
				file << "if(";					//always ident when entering a new scope
				is_Selective = true;
				AssignmentExpressionPtr->print_py(file) ;
				is_Selective = false;
				file << "):" << std::endl;
			
		}
			Indent_Generator(StatementPtr,file,elseif);
	}

	else if (SELECTIVE_IF!=NULL&&AssignmentExpressionPtr!=NULL&&StatementPtr!=NULL&&StatementPtr2!=NULL&&SELECTIVE_ELSE!=NULL&&SELECTIVE_SWITCH==NULL) {


		if(elseif == false) {						//modification of elseif variable has not been made on first entry so is ok (ie. the elseif is still 											//initialized to false)
			for( int i(0); i<counter_py; i++) { file << "\t"; } 
			file << "if(";
			is_Selective = true;
			AssignmentExpressionPtr->print_py(file) ;
			is_Selective = false;
			file << "):" << std::endl;
			Indent_Generator(StatementPtr,file,elseif);  
				
		}

		if(elseif == true) {					//If the elseif was detected from the previous iteration, then the body of it is in the next
									//therefore will be printed here
			
			 Indent_Generator(StatementPtr,file,elseif); 
			 elseif = false;
		}

		if( (StatementPtr2->SelectionStatementPtr != NULL && (StatementPtr2->SelectionStatementPtr)->SELECTIVE_IF) != NULL) { //check for else-if scenario

			elseif = true;
		}

		if(elseif == false) {
		
			for( int i(0); i<counter_py; i++) { file << "\t"; } 
			file << "else:";
			file << std::endl;
			is_Selective = true;
			Indent_Generator(StatementPtr2,file,elseif);
			is_Selective = false;
		}

		else if (elseif == true){

			for( int i(0); i<counter_py; i++) { file << "\t"; }	
			file <<"elif(";
			is_Selective = true;
	       		((StatementPtr2->SelectionStatementPtr)->AssignmentExpressionPtr)->print_py(file) ;
			elseif = true;
			is_Selective = false;
			file << "):" << std::endl;		
			StatementPtr2->print_py(file,elseif); 
					
		}				
				
				
	}
	


}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpq $0x0, 0x20(%rdi)
je 0xb13d
movq %rdi, %r14
cmpq $0x0, 0x8(%rdi)
je 0xb13d
movl %edx, %ebp
movq %rsi, %rbx
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0xafb2
cmpq $0x0, 0x18(%r14)
jne 0xafb2
cmpq $0x0, 0x28(%r14)
jne 0xafb2
cmpq $0x0, 0x30(%r14)
jne 0xafb2
testb %bpl, %bpl
jne 0xb034
xorl %r12d, %r12d
leaq 0x2276d(%rip), %r15     # 0x2d706
cmpl 0x5c584(%rip), %r12d    # 0x67524
jge 0xaff0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7310
incl %r12d
jmp 0xaf99
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0xb13d
cmpq $0x0, 0x18(%r14)
je 0xb13d
cmpq $0x0, 0x28(%r14)
je 0xb13d
cmpq $0x0, 0x30(%r14)
jne 0xb13d
testb %bpl, %bpl
je 0xb048
pushq $0x1
popq %rdx
movq %rbx, %rsi
jmp 0xb0b1
leaq 0x22475(%rip), %rsi     # 0x2d46c
movq %rbx, %rdi
callq 0x7310
movb $0x1, 0x5c524(%rip)     # 0x6752a
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0xb2ce
movb $0x0, 0x5c511(%rip)     # 0x6752a
leaq 0x223d5(%rip), %rsi     # 0x2d3f5
movq %rbx, %rdi
callq 0x7310
movq %rax, %rdi
callq 0x7190
movq 0x10(%r14), %rdi
movzbl %bpl, %edx
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xbb7b
xorl %ebp, %ebp
leaq 0x226b5(%rip), %r15     # 0x2d706
cmpl 0x5c4cd(%rip), %ebp     # 0x67524
jge 0xb068
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7310
incl %ebp
jmp 0xb051
leaq 0x223fd(%rip), %rsi     # 0x2d46c
movq %rbx, %rdi
callq 0x7310
movb $0x1, 0x5c4ac(%rip)     # 0x6752a
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0xb2ce
movb $0x0, 0x5c499(%rip)     # 0x6752a
leaq 0x2235d(%rip), %rsi     # 0x2d3f5
movq %rbx, %rdi
callq 0x7310
movq %rax, %rdi
callq 0x7190
movq 0x10(%r14), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xbb7b
movq 0x18(%r14), %rax
movq 0x30(%rax), %rax
testq %rax, %rax
je 0xb0ea
cmpq $0x0, 0x20(%rax)
je 0xb0ea
xorl %ebp, %ebp
leaq 0x22633(%rip), %r15     # 0x2d706
cmpl 0x5c44b(%rip), %ebp     # 0x67524
jge 0xb146
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7310
incl %ebp
jmp 0xb0d3
xorl %ebp, %ebp
leaq 0x22613(%rip), %r15     # 0x2d706
cmpl 0x5c42b(%rip), %ebp     # 0x67524
jge 0xb10a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7310
incl %ebp
jmp 0xb0f3
leaq 0x22353(%rip), %rsi     # 0x2d464
movq %rbx, %rdi
callq 0x7310
movq %rbx, %rdi
callq 0x7190
movb $0x1, 0x5c402(%rip)     # 0x6752a
movq 0x18(%r14), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xbb7b
movb $0x0, 0x5c3ed(%rip)     # 0x6752a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2231d(%rip), %rsi     # 0x2d46a
movq %rbx, %rdi
callq 0x7310
movb $0x1, 0x5c3ce(%rip)     # 0x6752a
movq 0x18(%r14), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rdi
movq %rbx, %rsi
callq 0xb2ce
movb $0x0, 0x5c3b3(%rip)     # 0x6752a
leaq 0x22277(%rip), %rsi     # 0x2d3f5
movq %rbx, %rdi
callq 0x7310
movq %rax, %rdi
callq 0x7190
movq 0x18(%r14), %rdi
pushq $0x1
popq %rdx
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xaec2
nop