// File: /workspace/github_cpp_makefile_star2_O2/gioannides[P]Language_Processors/src/../include/ast/ast_Expressions.cpp
// Function: PrimaryExpression::render_asm(std::basic_ofstream<char, std::char_traits<char>>&, Context&)
inline void PrimaryExpression::render_asm(std::ofstream& file,Context& contxt)  
{
	/*if(IDENTIFIER!=NULL)
	{
		file << "# id" << *IDENTIFIER << "- f_call" << contxt.is_function_call << "- reading" << contxt.reading << "- function" << contxt.function << "- SizeOf:" << contxt.sizeof_ << "- lhs_of_assignment:" << contxt.lhs_of_assignment << "\n";
	}*/
	if( AssignmentExpressionPtr != NULL && !contxt.reading ) 
	{
		AssignmentExpressionPtr->render_asm(file,contxt);		
	}



	if(CONSTANT != NULL && contxt.reading && contxt.LocalArray){

		contxt.ArraySize.push_back(std::stoi(*CONSTANT));
		
	}


	else if( IDENTIFIER != NULL && !contxt.reading && contxt.function)			//this identifier is involved in expressions
	{
		if(contxt.sizeof_){
			findSize(contxt,*IDENTIFIER);
		}


		if(contxt.Regs>=24 && !contxt.sizeof_)
		{
			std::cout << std::endl << "buy more registers!" << std::endl; 
		}
		int found_0nothing_1local_2globl = 0;	
		int good_index=0;			//this will determine whether the variable wanted is a global or a local
		int i(0), j;				//must initialize the index i outside so it is accessible throughout here
		if(contxt.is_function_call && !contxt.sizeof_)
		{
			for (int i=0; i<contxt.functions_declared.size(); i++)
			{
			//std::cout << "\n\n\n merge!\n\n";
			 	if(contxt.functions_declared[i].name==*IDENTIFIER)
			 	{	//std::cout << "aici;";
				 	contxt.Scopes.push_back(*IDENTIFIER);
				}
			}
			contxt.is_function_call=false;
		}
		else
		{ 
			if(contxt.Variables.size()&&contxt.Scopes.size() && !contxt.sizeof_ && !contxt.enum_constant)
			{
			for(i=contxt.Variables.size()-1; i>=0; i--) {
				for (j=contxt.Scopes.size()-1; j>=0; j--)
				{
					if(contxt.Variables[i].scope == contxt.Scopes[j] && *IDENTIFIER == contxt.Variables[i].id) 
					{
						found_0nothing_1local_2globl = 1;	//means that we found a local variable in the function of that name					
						good_index=i;
						contxt.good_i = good_index;
						i = -1;
						j = -1;
					}
					if(contxt.Variables[good_index].DataType == "unsigned") { //[0] this might cause problems
						contxt.is_unsigned = true;
					}
					if(contxt.Variables[good_index].DataType == "float") {
						contxt.float_ = true;
					}										
				}
			  }
			}
			if(!found_0nothing_1local_2globl && !contxt.sizeof_ && !contxt.enum_constant) {
				for(i=0; i<contxt.Variables.size(); i++) {
					if(contxt.Variables[i].scope == "global" && *IDENTIFIER == contxt.Variables[i].id) {
						found_0nothing_1local_2globl=2;
						good_index = i;
						contxt.good_i = good_index;
						i = contxt.Variables.size();
						if(contxt.Variables[good_index].DataType == "unsigned") {
							contxt.is_unsigned = true;
						}
						if(contxt.Variables[good_index].DataType == "float") {
							contxt.float_ = true;
						}
					}	
				}
		  	} 
			if(found_0nothing_1local_2globl && contxt.nested_arrays)
			{
				
					file << std::endl << "\tli $24, " << contxt.Variables[good_index].word_size;
				
				
				file << std::endl << "\tmul $25,$24,$25";
			}	  		
			if(contxt.lhs_of_assignment && !contxt.sizeof_ && !contxt.enum_constant )
			{
				//file << "# lhs_of_assignment is set\n";
				if(found_0nothing_1local_2globl)
				{
					
					if(contxt.AssignmentOperator != "df" && contxt.AssignmentOperator != "=")
					{
						AssignmentOperator(file,good_index,contxt,found_0nothing_1local_2globl);				
					}
				}
				if(found_0nothing_1local_2globl==1){
					if(!contxt.Variables[good_index].Pointer){
						
						contxt.DataType = contxt.Variables[good_index].DataType;
						
						store_locals(contxt, file, good_index);
						
					}
					else{
						contxt.PointerNotStored = true;
						//std::cout << contxt.Variables[contxt.good_i].PointerLevelsTemp << " " <<  contxt.Variables[contxt.good_i].id << std::endl;
						
					}
				}					
				else if(found_0nothing_1local_2globl==2){
					if(!contxt.Variables[good_index].Pointer){
						
						contxt.DataType = contxt.Variables[good_index].DataType;
						
						store_globals(contxt, file, good_index);
						
					}
					else{
						contxt.PointerNotStored = true;
					}
				}			
				else
				{
						
					//else{
						//file << std::endl << "#VARIABLE : " << *IDENTIFIER << "NOT DECLARED!!!\n";
					//}
				}
			}
			else
			{

			 	if(found_0nothing_1local_2globl==1 && !contxt.sizeof_ && !contxt.enum_constant) 
			 	{
					
					contxt.DataType = contxt.Variables[good_index].DataType;
					
			 		load_locals(contxt, file, good_index);
					
					if(contxt.Cast){
						CastToType(file,contxt,*IDENTIFIER);
					}			
			  	}
     		   		 else if(found_0nothing_1local_2globl==2 && !contxt.sizeof_ && !contxt.enum_constant) 
				{
					
					contxt.DataType = contxt.Variables[good_index].DataType;
					
					load_globals(contxt, file, good_index);
					
					if(contxt.Cast){
						CastToType(file,contxt,*IDENTIFIER);
					}
			
				}		
				else
					
				{	if(!contxt.enum_constant){	
						bool found = false;
						for( int i(0); i < contxt.Enum.size(); i++){
							//std::cout <<  contxt.Enum[i].ScopeID << " " <<  contxt.Enum[i].IDENTIFIER << " " <<  contxt.Enum[i].value << std::endl;
							if(contxt.Enum[i].IDENTIFIER == *IDENTIFIER && contxt.Enum[i].ScopeID == contxt.funct_id){
								file <<  std::endl << "\tli\t$" << contxt.Regs+1 << ", " << contxt.Enum[i].value;
								contxt.regType[contxt.Regs+1]='i';
								found = true;
								break;
							}
						}
						if(!found){
							for( int i(0); i < contxt.Enum.size(); i++){
								if(contxt.Enum[i].IDENTIFIER == *IDENTIFIER && contxt.Enum[i].ScopeID == "global"){
									file <<  std::endl << "\tli\t$" << contxt.Regs+1 << ", " << contxt.Enum[i].value;
									contxt.regType[contxt.Regs+1]='i';
									found = true;
									break;
								}
							}
						}
					}

				}

			}
					
					//}    
						

						if(!contxt.sizeof_){
							//file << std::endl << "#VARIABLE : " << *IDENTIFIER << "NOT DECLARED!!!\n";
						}
				}		
		}	
		
	
	else if( CONSTANT != NULL && !contxt.reading ) 
	{	

	
		
		char tmp2;
		int64_t temp;
		float temp_f;
		bool is_char = false;

		if((*CONSTANT) == "'\\n'"){
			tmp2 = '\n';
			is_char = true;
		}
		else if((*CONSTANT) == "'\\r'"){
			tmp2 = '\r';
			is_char = true;
		}
		else if((*CONSTANT) == "'\\v'"){
			tmp2 = '\v';
			is_char = true;
		}
		else if((*CONSTANT) == "'\\t'"){
			tmp2 = '\t';
			is_char = true;
		}
		else if((*CONSTANT) == "'\\f'"){
			tmp2 = '\f';
			is_char = true;
		}
		else if((*CONSTANT) == "'\\b'"){
			tmp2 = '\b';
			is_char = true;
		}
		else if((*CONSTANT) == "'\\a'"){
			tmp2 = '\a';
			is_char = true;
		}
			
		if(is_char){
			temp = (int)tmp2;
			temp_f = (int)tmp2;
			if(contxt.sizeof_){
				if(contxt.SizeOf < 8){
					contxt.SizeOf = 4;
					return;
				}
			}
		}
			

		if( (*CONSTANT).find_first_of("'")==0 /*&& contxt.variable.word_size == 1*/ && !is_char)
		{
			tmp2 = (*CONSTANT)[1];
			temp = (int)tmp2;
			temp_f = (int)tmp2;
			is_char = true;
			if(contxt.sizeof_){
				contxt.SizeOf = 4;
				return;
			}

		}
		else if(!is_char){
			
			temp_f = (std::stod(*CONSTANT));
		 	temp = (std::stod(*CONSTANT));
			if(contxt.sizeof_){
				if((std::floor(std::stod(*CONSTANT))) != std::stod(*CONSTANT)){
					contxt.SizeOf = 8;
					return;
				}
				else{
					if(contxt.SizeOf < 8){
						contxt.SizeOf = 4;
						return;
					}
				}
			}
		}
		
		if(contxt.function && contxt.UnaryOperators.size() != 0 && contxt.variable.DataType != "float")
		{
			if(contxt.UnaryOperators[contxt.UnaryOperators.size()-1] == '-' && !contxt.function) 
			{			
				temp = (-1) * temp;
				contxt.UnaryOperators.pop_back();
							
			}
			else if(contxt.UnaryOperators[contxt.UnaryOperators.size()-1] == '~'  && !contxt.function) 
			{				
				temp = ~temp;
				contxt.UnaryOperators.pop_back();
							
			}
			else if(contxt.UnaryOperators[contxt.UnaryOperators.size()-1] == '!'  && !contxt.function) 
			{	
				temp = !temp;
				contxt.UnaryOperators.pop_back();									
			}
		}
		if(contxt.enum_constant){
			
			contxt.EnumOperands.push_back(temp);	
			
		}
		
		if(contxt.variable.DataType != "float" && !contxt.enum_constant){			
			contxt.variable.value = temp;
		}
		else if(contxt.variable.DataType == "float" && !contxt.enum_constant){
			contxt.variable.value = temp_f;
		}
		
		if(is_char && contxt.function){		
			file <<  std::endl << "\tli\t$" << contxt.Regs+1 << ", " << temp;
			contxt.regType[contxt.Regs+1]='i';
		}
					

		if(!contxt.reading && contxt.function && !is_char && !contxt.enum_constant) 
		{	if(contxt.is_array) { contxt.DataType = "int"; }
			if(contxt.DataType == "float" || (std::floor(std::stod(*CONSTANT))) != std::stod(*CONSTANT)){
				
				if(contxt.lhs_of_assignment &&!contxt.LocalArray){
					file <<  std::endl << "\tli.s\t$f" << contxt.Regs+2 << ", " << temp_f;
					for(int i(0); i < 2; i++){
						file << std::endl << "\taddu\t$" << contxt.Regs+2 << ",$" << contxt.Regs+2 << ",$" << contxt.Regs+2; //TODO: NEW THING
					}
					file << std::endl << "\tmtc1\t$" << contxt.Regs+2 << ",$f" << contxt.Regs+2;
					contxt.regType[contxt.Regs+2]='f';
				}
				else{

					file <<  std::endl << "\tli.s\t$f" << contxt.Regs+1 << ", " << temp_f; 
					contxt.regType[contxt.Regs+1]='f';
				}
				
			}
			else if(contxt.DataType != "float" || (std::floor(std::stod(*CONSTANT))) == std::stod(*CONSTANT)){
				if(contxt.lhs_of_assignment && !contxt.LocalArray){						//TODO: NEW THING
					int j = 0;
					file <<  std::endl << "\tli\t$" << contxt.Regs+2 << ", " << temp;
					if(contxt.variable.DataType == "char") { j = 0; }
					else if(contxt.variable.DataType == "short") { j = 1; }
					else { j = 2; }
					for(int i(0); i < j; i++){
						file << std::endl << "\taddu\t$" << contxt.Regs+2 << ",$" << contxt.Regs+2 << ",$" << contxt.Regs+2;
					}
					contxt.regType[contxt.Regs+2]='i';
				}
				else{
					file <<  std::endl << "\tli\t$" << contxt.Regs+1 << ", " << temp;
					contxt.regType[contxt.Regs+1]='i';
				}
				
			}
			
		}
		if ((!contxt.reading && !contxt.function && !contxt.enum_constant))
		{
			//file << std::endl << "# this is where you start evaluating " << temp ;
			contxt.eval[contxt.Regs+1]=temp;
			contxt.eval_f[contxt.Regs+1] = temp_f;
		}
		
	}
				
	else if( IDENTIFIER != NULL && contxt.reading && contxt.function && !contxt.sizeof_)
	{	for (int i=0; i<contxt.functions_declared.size(); i++)
		{
			//std::cout << "\n\n\n merge!\n\n";
			 if(contxt.functions_declared[i].name==*IDENTIFIER)
			 {	//std::cout << "aici;";
			 	//contxt.Scopes.push_back(*IDENTIFIER);
			 	if(contxt.max_offset<contxt.functions_declared[i].paramters_size){
					//std::cout <<"\n update max_offset: " << contxt.functions_declared[i].paramters_size << "\n";
					contxt.max_offset=contxt.functions_declared[i].paramters_size;
					break;
				} 	
			//	std::cout << "\n" <<  contxt.functions_declared[i].paramters_size << " " <<  contxt.functions_declared[i].name << "\n"; 
			//	for(int j=0; j<contxt.Scopes.size(); j++)
			//	{
			//		std::cout << contxt.Scopes[j] << " ";
			// 	}
			// 	std::cout << "\n";
			 }
		}
	}

	else if(IDENTIFIER != NULL && !contxt.function && !contxt.function_dec && !contxt.lhs_of_assignment){
			
			contxt.GlobalPointerValue = *IDENTIFIER;

	}

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x146b1
cmpb $0x0, 0x21b(%rbx)
jne 0x146b1
movq %r15, %rsi
movq %rbx, %rdx
callq 0xe864
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x146eb
cmpb $0x1, 0x21b(%rbx)
jne 0x146eb
cmpb $0x1, 0x74(%rbx)
jne 0x146eb
addq $0x78, %rbx
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x1606a
leaq 0x24(%rsp), %rsi
movl %eax, (%rsi)
movq %rbx, %rdi
callq 0x1563e
jmp 0x1543a
movq 0x8(%r14), %rsi
testq %rsi, %rsi
movq %r14, 0x18(%rsp)
je 0x148fa
cmpb $0x0, 0x21b(%rbx)
jne 0x148fa
cmpb $0x1, 0x218(%rbx)
jne 0x148fa
cmpb $0x1, 0x1f8(%rbx)
jne 0x14740
leaq 0x68(%rsp), %r14
movq %r14, %rdi
callq 0x7460
movq %rbx, %rdi
movq %r14, %rsi
callq 0x16086
movq %r14, %rdi
callq 0x7170
cmpl $0x18, 0x310(%rbx)
jl 0x14775
cmpb $0x0, 0x1f8(%rbx)
jne 0x14775
movq 0x2a84f(%rip), %rdi     # 0x3efa8
callq 0x7190
leaq 0x19315(%rip), %rsi     # 0x2da7a
movq %rax, %rdi
callq 0x7310
movq %rax, %rdi
callq 0x7190
cmpb $0x1, 0x4b0(%rbx)
jne 0x1478b
cmpb $0x0, 0x1f8(%rbx)
je 0x14a21
movq %r15, 0x10(%rsp)
movq 0x248(%rbx), %rcx
movq 0x240(%rbx), %rsi
movq %rcx, %rax
subq %rsi, %rax
movl $0xb0, %edi
cqto
idivq %rdi
movl $0x0, %ebp
cmpq %rsi, %rcx
je 0x14adb
movq %rax, %r13
movq 0x468(%rbx), %rax
cmpq 0x460(%rbx), %rax
je 0x14adb
cmpb $0x0, 0x1f8(%rbx)
jne 0x14adb
cmpb $0x0, 0x14d(%rbx)
jne 0x14adb
movl $0x0, 0xc(%rsp)
leaq 0x18d93(%rip), %r12     # 0x2d58f
xorl %ebp, %ebp
decl %r13d
js 0x14ace
movl %ebp, %r14d
movq 0x468(%rbx), %r15
subq 0x460(%rbx), %r15
shrq $0x5, %r15
decl %r15d
js 0x148f2
movslq %r13d, %rax
movq 0x240(%rbx), %rcx
imulq $0xb0, %rax, %rbp
leaq (%rcx,%rbp), %rdi
addq $0x30, %rdi
movl %r15d, %esi
shlq $0x5, %rsi
addq 0x460(%rbx), %rsi
callq 0xcbbb
testb %al, %al
je 0x14892
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x240(%rbx), %rax
leaq (%rax,%rbp), %rsi
addq $0x8, %rsi
callq 0xcbbb
testb %al, %al
je 0x14892
movl %r13d, 0x5b4(%rbx)
pushq $0x1
popq %rax
movl %eax, 0xc(%rsp)
movl %r13d, %eax
pushq $-0x1
popq %rcx
movl %ecx, %r13d
movl %ecx, %r15d
jmp 0x14895
movl %r14d, %eax
movl %eax, %r14d
cltq
movq 0x240(%rbx), %rcx
imulq $0xb0, %rax, %rbp
leaq (%rcx,%rbp), %rdi
addq $0x58, %rdi
leaq 0x18da3(%rip), %rsi     # 0x2d65a
callq 0x820e
testb %al, %al
je 0x148c7
movb $0x1, 0x219(%rbx)
movq 0x240(%rbx), %rax
leaq (%rax,%rbp), %rdi
addq $0x58, %rdi
movq %r12, %rsi
callq 0x820e
testb %al, %al
je 0x1481c
movb $0x1, 0x340(%rbx)
jmp 0x1481c
movl %r14d, %ebp
jmp 0x147fe
testq %rdi, %rdi
je 0x14908
cmpb $0x0, 0x21b(%rbx)
je 0x14970
testq %rsi, %rsi
je 0x1543a
movb 0x218(%rbx), %al
cmpb $0x1, 0x21b(%rbx)
jne 0x14931
testb $0x1, %al
je 0x14931
cmpb $0x0, 0x1f8(%rbx)
je 0x149c1
testb $0x1, %al
jne 0x1543a
cmpb $0x0, 0x13e7c(%rbx)
jne 0x1543a
cmpb $0x0, 0x1d2(%rbx)
jne 0x1543a
addq $0x50, %rbx
movq %rbx, %rdi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x71e0
leaq 0x19132(%rip), %rsi     # 0x2daa9
callq 0x820e
testb %al, %al
je 0x14987
pushq $0xa
jmp 0x14faa
movq 0x10(%r14), %rdi
leaq 0x1911c(%rip), %rsi     # 0x2daae
callq 0x820e
testb %al, %al
je 0x149a2
pushq $0xd
jmp 0x14faa
movq 0x10(%r14), %rdi
leaq 0x19106(%rip), %rsi     # 0x2dab3
callq 0x820e
testb %al, %al
je 0x14a89
pushq $0xb
jmp 0x14faa
pushq $0x8
popq %r14
xorl %r15d, %r15d
pushq $0x48
popq %r12
movq 0x400(%rbx), %rdi
movq 0x408(%rbx), %rax
subq %rdi, %rax
cqto
idivq %r12
cmpq %r15, %rax
jbe 0x1543a
addq %r14, %rdi
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0xcbbb
testb %al, %al
je 0x14a18
movq 0x400(%rbx), %rax
movl -0x8(%rax,%r14), %eax
cmpl %eax, 0x4ac(%rbx)
jl 0x14ac3
incq %r15
addq $0x48, %r14
jmp 0x149cc
leaq 0x460(%rbx), %r14
pushq $0x8
popq %r15
xorl %r12d, %r12d
pushq $0x48
popq %r13
movq 0x400(%rbx), %rdi
movq 0x408(%rbx), %rax
subq %rdi, %rax
cqto
idivq %r13
cmpq %r12, %rax
jbe 0x14a7d
addq %r15, %rdi
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0xcbbb
testb %al, %al
je 0x14a74
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rsi
movq %r14, %rdi
callq 0xab3c
incq %r12
addq $0x48, %r15
jmp 0x14a33
movb $0x0, 0x4b0(%rbx)
jmp 0x1543a
movq 0x10(%r14), %rdi
leaq 0x19024(%rip), %rsi     # 0x2dab8
callq 0x820e
testb %al, %al
je 0x14aa4
pushq $0x9
jmp 0x14faa
movq 0x10(%r14), %rdi
leaq 0x1900e(%rip), %rsi     # 0x2dabd
callq 0x820e
testb %al, %al
je 0x14f78
pushq $0xc
jmp 0x14faa
movl %eax, 0x4ac(%rbx)
jmp 0x1543a
cmpl $0x0, 0xc(%rsp)
je 0x14adb
pushq $0x1
popq %r13
jmp 0x14b00
cmpb $0x0, 0x1f8(%rbx)
je 0x14af1
movq 0x10(%rsp), %r14
xorl %r13d, %r13d
jmp 0x14c0a
cmpb $0x0, 0x14d(%rbx)
movl $0x0, %r13d
je 0x14b0a
movq 0x10(%rsp), %r14
jmp 0x14c0a
movl $0x0, 0xc(%rsp)
movl $0xb0, %r15d
xorl %r13d, %r13d
movslq %r13d, %rcx
movq 0x240(%rbx), %rsi
movq 0x248(%rbx), %rax
subq %rsi, %rax
cqto
idivq %r15
cmpq %rcx, %rax
jbe 0x14c00
imulq $0xb0, %rcx, %r14
leaq (%rsi,%r14), %rdi
addq $0x30, %rdi
leaq 0x18b15(%rip), %rsi     # 0x2d668
callq 0x820e
testb %al, %al
je 0x14bf2
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x240(%rbx), %rax
leaq (%rax,%r14), %rsi
addq $0x8, %rsi
callq 0xcbbb
testb %al, %al
je 0x14bf2
movl %r13d, 0x5b4(%rbx)
movq 0x240(%rbx), %rcx
movq 0x248(%rbx), %rax
subq %rcx, %rax
cqto
idivq %r15
movq %rax, %r12
leaq (%rcx,%r14), %rdi
addq $0x58, %rdi
leaq 0x18aaa(%rip), %rsi     # 0x2d65a
callq 0x820e
testb %al, %al
je 0x14bc0
movb $0x1, 0x219(%rbx)
movq 0x240(%rbx), %rax
leaq (%rax,%r14), %rdi
addq $0x58, %rdi
leaq 0x189b9(%rip), %rsi     # 0x2d58f
callq 0x820e
testb %al, %al
je 0x14be6
movb $0x1, 0x340(%rbx)
pushq $0x2
popq %rax
movl %eax, 0xc(%rsp)
movl %r13d, %ebp
jmp 0x14bf5
movl %r13d, %r12d
incl %r12d
movl %r12d, %r13d
jmp 0x14b1b
movq 0x10(%rsp), %r14
movl 0xc(%rsp), %r13d
movslq %ebp, %r15
testl %r13d, %r13d
je 0x14c62
cmpl $0x0, 0x13e90(%rbx)
je 0x14c62
movq %r14, %rdi
callq 0x7190
leaq 0x18e64(%rip), %rsi     # 0x2da8e
movq %rax, %rdi
callq 0x7310
movq 0x240(%rbx), %rcx
imulq $0xb0, %r15, %rdx
movl (%rcx,%rdx), %esi
movq %rax, %rdi
callq 0x7590
movq %r14, %rdi
callq 0x7190
leaq 0x18e3e(%rip), %rsi     # 0x2da98
movq %rax, %rdi
callq 0x7310
cmpb $0x1, 0x1d2(%rbx)
jne 0x14c81
cmpb $0x0, 0x1f8(%rbx)
jne 0x14c81
cmpb $0x0, 0x14d(%rbx)
je 0x14e68
cmpl $0x2, %r13d
je 0x14d13
cmpl $0x1, %r13d
jne 0x14d29
cmpb $0x0, 0x1f8(%rbx)
jne 0x14d29
cmpb $0x0, 0x14d(%rbx)
jne 0x14d29
movq 0x240(%rbx), %rax
imulq $0xb0, %r15, %rcx
leaq (%rax,%rcx), %rsi
addq $0x58, %rsi
movq %rbx, %rdi
callq 0x71e0
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x17eef
cmpb $0x1, 0x90(%rbx)
jne 0x1543a
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x7460
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x183c0
leaq 0x48(%rsp), %rdi
jmp 0x14f6e
cmpb $0x0, 0x1f8(%rbx)
jne 0x14d29
cmpb $0x0, 0x14d(%rbx)
je 0x14f0b
cmpb $0x0, 0x14d(%rbx)
jne 0x1543a
leaq 0x220(%rbx), %r14
xorl %r12d, %r12d
pushq $0x48
popq %r15
xorl %r13d, %r13d
movq 0xc0(%rbx), %rsi
movq 0xc8(%rbx), %rcx
movq %rcx, %rax
subq %rsi, %rax
cqto
idivq %r15
cmpq %r13, %rax
jbe 0x14d9e
leaq (%rsi,%r12), %rdi
addq $0x20, %rdi
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0xcbbb
testb %al, %al
je 0x14d95
movq 0xc0(%rbx), %rdi
addq %r12, %rdi
movq %r14, %rsi
callq 0xcbbb
testb %al, %al
jne 0x14e06
incq %r13
addq $0x48, %r12
jmp 0x14d47
xorl %r12d, %r12d
leaq 0x188c0(%rip), %r14     # 0x2d668
xorl %r13d, %r13d
subq %rsi, %rcx
movq %rcx, %rax
cqto
idivq %r15
cmpq %r13, %rax
jbe 0x1543a
leaq (%rsi,%r12), %rdi
addq $0x20, %rdi
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0xcbbb
testb %al, %al
je 0x14def
movq 0xc0(%rbx), %rdi
addq %r12, %rdi
movq %r14, %rsi
callq 0x820e
testb %al, %al
jne 0x14e06
incq %r13
movq 0xc0(%rbx), %rsi
movq 0xc8(%rbx), %rcx
addq $0x48, %r12
jmp 0x14dab
movq 0x10(%rsp), %rdi
callq 0x7190
leaq 0x18b2d(%rip), %rsi     # 0x2d944
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x18dd1(%rip), %rsi     # 0x2dc07
movq %rax, %rdi
callq 0x7310
movq 0xc0(%rbx), %rcx
movsd 0x40(%rcx,%r12), %xmm0
movq %rax, %rdi
callq 0x7510
movslq 0x310(%rbx), %rax
movb $0x69, 0x342(%rax,%rbx)
jmp 0x1543a
testl %r13d, %r13d
je 0x1543a
leaq 0x318(%rbx), %r14
leaq 0x161c3(%rip), %rsi     # 0x2b042
movq %r14, %rdi
callq 0x14630
testb %al, %al
movq 0x10(%rsp), %r12
je 0x14eb8
leaq 0x188c6(%rip), %rsi     # 0x2d75d
movq %r14, %rdi
callq 0x14630
testb %al, %al
je 0x14eb8
movq 0x18(%rsp), %rdi
movq %r12, %rsi
movl %ebp, %edx
movq %rbx, %rcx
movl %r13d, %r8d
callq 0x164fe
cmpl $0x2, %r13d
je 0x154f6
cmpl $0x1, %r13d
jne 0x1543a
movq 0x240(%rbx), %rsi
imulq $0xb0, %r15, %rax
cmpb $0x0, 0x9c(%rsi,%rax)
jne 0x1550e
addq %rax, %rsi
addq $0x58, %rsi
movq %rbx, %rdi
callq 0x71e0
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movl %ebp, %edx
callq 0x16fa4
jmp 0x1543a
movq 0x240(%rbx), %rax
imulq $0xb0, %r15, %rcx
leaq (%rax,%rcx), %rsi
addq $0x58, %rsi
movq %rbx, %rdi
callq 0x71e0
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x18e32
cmpb $0x1, 0x90(%rbx)
jne 0x1543a
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x7460
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x183c0
leaq 0x28(%rsp), %rdi
callq 0x7170
jmp 0x1543a
movq 0x10(%r14), %rdi
leaq 0x18b3f(%rip), %rsi     # 0x2dac2
callq 0x820e
testb %al, %al
je 0x14f90
pushq $0x8
jmp 0x14faa
movq 0x10(%r14), %rdi
leaq 0x18b2c(%rip), %rsi     # 0x2dac7
callq 0x820e
testb %al, %al
je 0x15517
pushq $0x7
popq %rax
cvtsi2ss %eax, %xmm0
movss %xmm0, 0xc(%rsp)
movl %eax, %r12d
movb $0x1, %bpl
cmpb $0x1, 0x1f8(%rbx)
jne 0x14fcd
cmpl $0x7, 0x1fc(%rbx)
jle 0x14ff6
movq 0x10(%r14), %rdi
leaq 0x18af2(%rip), %rsi     # 0x2daca
xorl %edx, %edx
callq 0x71b0
testb %bpl, %bpl
jne 0x15005
testq %rax, %rax
jne 0x15005
cmpb $0x1, 0x1f8(%rbx)
jne 0x15081
movl $0x4, 0x1fc(%rbx)
jmp 0x1543a
testb %bpl, %bpl
jne 0x15098
movq 0x10(%r14), %rdi
xorl %esi, %esi
callq 0x194e4
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
movq 0x10(%r14), %rdi
xorl %esi, %esi
callq 0x194e4
cvttsd2si %xmm0, %r12
movb $0x1, %bpl
cmpb $0x1, 0x1f8(%rbx)
jne 0x1509a
movq 0x10(%r14), %rdi
xorl %esi, %esi
callq 0x194e4
callq 0x7560
movsd %xmm0, 0x10(%rsp)
movq 0x10(%r14), %rdi
xorl %esi, %esi
callq 0x194e4
movsd 0x10(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jne 0x15072
jnp 0x150f6
movl $0x8, 0x1fc(%rbx)
jmp 0x1543a
movq 0x10(%r14), %rax
movq (%rax), %rax
movsbq 0x1(%rax), %r12
cvtsi2ss %r12d, %xmm0
movss %xmm0, 0xc(%rsp)
xorl %ebp, %ebp
cmpb $0x1, 0x218(%rbx)
jne 0x15131
movq 0x4d8(%rbx), %rax
cmpq 0x4d0(%rbx), %rax
je 0x15131
leaq 0x2b0(%rbx), %rdi
leaq 0x184ca(%rip), %rsi     # 0x2d58f
callq 0x14630
testb %al, %al
je 0x15131
movq 0x4d8(%rbx), %rax
movzbl -0x1(%rax), %ecx
cmpl $0x21, %ecx
je 0x15113
cmpl $0x7e, %ecx
je 0x15105
cmpl $0x2d, %ecx
jne 0x15131
cmpb $0x0, 0x218(%rbx)
jne 0x15131
negq %r12
jmp 0x15127
cmpl $0x7, 0x1fc(%rbx)
jle 0x14ff6
jmp 0x1509a
cmpb $0x0, 0x218(%rbx)
jne 0x15131
notq %r12
jmp 0x15127
cmpb $0x0, 0x218(%rbx)
jne 0x15131
xorl %ecx, %ecx
testq %r12, %r12
sete %cl
movq %rcx, %r12
decq %rax
movq %rax, 0x4d8(%rbx)
cmpb $0x1, 0x14d(%rbx)
jne 0x1514e
leaq 0x150(%rbx), %rdi
leaq 0x24(%rsp), %rsi
movl %r12d, (%rsi)
callq 0x1563e
leaq 0x2b0(%rbx), %r13
leaq 0x18433(%rip), %rsi     # 0x2d58f
movq %r13, %rdi
callq 0x14630
testb %al, %al
je 0x15171
cmpb $0x0, 0x14d(%rbx)
je 0x15195
leaq 0x18417(%rip), %rsi     # 0x2d58f
movq %r13, %rdi
callq 0x820e
testb %al, %al
je 0x151a2
cmpb $0x0, 0x14d(%rbx)
jne 0x151a2
cvtss2sd 0xc(%rsp), %xmm0
jmp 0x1519a
cvtsi2sd %r12, %xmm0
movsd %xmm0, 0x280(%rbx)
testb %bpl, %bpl
jne 0x15200
cmpb $0x1, 0x218(%rbx)
jne 0x15200
movq %r15, %rdi
callq 0x7190
leaq 0x18785(%rip), %rsi     # 0x2d944
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x18a29(%rip), %rsi     # 0x2dc07
movq %rax, %rdi
callq 0x7310
movq %rax, %rdi
movq %r12, %rsi
callq 0x7300
movslq 0x310(%rbx), %rax
movb $0x69, 0x342(%rax,%rbx)
cmpb $0x0, 0x21b(%rbx)
jne 0x153fa
andb 0x218(%rbx), %bpl
je 0x153fa
cmpb $0x0, 0x14d(%rbx)
jne 0x153fa
cmpb $0x1, 0x13e94(%rbx)
jne 0x1523f
leaq 0x18f5f(%rip), %rsi     # 0x2e196
movq %rbx, %rdi
callq 0x7630
leaq 0x18349(%rip), %rsi     # 0x2d58f
movq %rbx, %rdi
callq 0x820e
testb %al, %al
jne 0x1528a
movq 0x18(%rsp), %r14
movq 0x10(%r14), %rdi
xorl %esi, %esi
callq 0x194e4
callq 0x7560
movsd %xmm0, 0x10(%rsp)
movq 0x10(%r14), %rdi
xorl %esi, %esi
callq 0x194e4
movsd 0x10(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jne 0x1528a
jnp 0x1544c
cmpb $0x1, 0x1d2(%rbx)
jne 0x15299
cmpb $0x0, 0x74(%rbx)
je 0x152e6
movq %r15, %rdi
callq 0x7190
leaq 0x184c6(%rip), %rsi     # 0x2d76e
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x18940(%rip), %rsi     # 0x2dc07
movq %rax, %rdi
callq 0x7310
movq %rax, %rdi
movss 0xc(%rsp), %xmm0
callq 0x7270
movb $0x66, %al
pushq $0x1
jmp 0x153e6
movq %r15, %r13
movq %r15, %rdi
callq 0x7190
leaq 0x18476(%rip), %rsi     # 0x2d76e
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
addl $0x2, %esi
movq %rax, %rdi
callq 0x7590
leaq 0x188ef(%rip), %rsi     # 0x2dc07
movq %rax, %rdi
callq 0x7310
movq %rax, %rdi
movss 0xc(%rsp), %xmm0
callq 0x7270
pushq $0x2
popq %rbp
leaq 0x1850f(%rip), %r14     # 0x2d847
leaq 0x183fc(%rip), %r15     # 0x2d73b
movq %r13, %rdi
callq 0x7190
subl $0x1, %ebp
jb 0x153a2
movq %rax, %rdi
movq %r14, %rsi
callq 0x7310
movl 0x310(%rbx), %esi
addl $0x2, %esi
movq %rax, %rdi
callq 0x7590
movq %rax, %rdi
movq %r15, %rsi
callq 0x7310
movl 0x310(%rbx), %esi
addl $0x2, %esi
movq %rax, %rdi
callq 0x7590
movq %rax, %rdi
movq %r15, %rsi
callq 0x7310
movl 0x310(%rbx), %esi
addl $0x2, %esi
movq %rax, %rdi
callq 0x7590
jmp 0x1533f
leaq 0x18723(%rip), %rsi     # 0x2dacc
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
addl $0x2, %esi
movq %rax, %rdi
callq 0x7590
leaq 0x183b6(%rip), %rsi     # 0x2d77f
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
addl $0x2, %esi
movq %rax, %rdi
callq 0x7590
movb $0x66, %al
pushq $0x2
popq %rbp
movslq 0x310(%rbx), %rcx
movl %ebp, %edx
addq %rcx, %rdx
movb %al, 0x341(%rbx,%rdx)
cmpb $0x0, 0x21b(%rbx)
jne 0x1543a
cmpb $0x0, 0x218(%rbx)
jne 0x1543a
cmpb $0x0, 0x14d(%rbx)
jne 0x1543a
movslq 0x310(%rbx), %rax
movl %r12d, 0x5fc(%rbx,%rax,4)
movslq 0x310(%rbx), %rax
movss 0xc(%rsp), %xmm0
movss %xmm0, 0xa23c(%rbx,%rax,4)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1813c(%rip), %rsi     # 0x2d58f
movq %rbx, %rdi
callq 0x14630
testb %al, %al
jne 0x1549b
movq 0x18(%rsp), %r14
movq 0x10(%r14), %rdi
xorl %esi, %esi
callq 0x194e4
callq 0x7560
movsd %xmm0, 0x10(%rsp)
movq 0x10(%r14), %rdi
xorl %esi, %esi
callq 0x194e4
movsd 0x10(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jne 0x153fa
jp 0x153fa
cmpb $0x1, 0x1d2(%rbx)
jne 0x154ae
cmpb $0x0, 0x74(%rbx)
je 0x1553f
movq %r15, %rdi
callq 0x7190
leaq 0x18487(%rip), %rsi     # 0x2d944
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x1872b(%rip), %rsi     # 0x2dc07
movq %rax, %rdi
callq 0x7310
movq %rax, %rdi
movq %r12, %rsi
callq 0x7300
movb $0x69, %al
jmp 0x152df
movq 0x240(%rbx), %rsi
imulq $0xb0, %r15, %rax
cmpb $0x0, 0x9c(%rsi,%rax)
je 0x1551e
movb $0x1, 0x48(%rbx)
jmp 0x1543a
xorl %ebp, %ebp
jmp 0x14fcd
addq %rax, %rsi
addq $0x58, %rsi
movq %rbx, %rdi
callq 0x71e0
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x17971
jmp 0x1543a
movq %r15, %rdi
callq 0x7190
leaq 0x183f6(%rip), %rsi     # 0x2d944
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
addl $0x2, %esi
movq %rax, %rdi
callq 0x7590
leaq 0x18699(%rip), %rsi     # 0x2dc07
movq %rax, %rdi
callq 0x7310
movq %rax, %rdi
movq %r12, %rsi
callq 0x7300
leaq 0x18026(%rip), %rsi     # 0x2d5ae
movq %r13, %rdi
callq 0x820e
xorl %r14d, %r14d
testb %al, %al
jne 0x155b0
leaq 0x1801b(%rip), %rsi     # 0x2d5b9
movq %r13, %rdi
callq 0x820e
movzbl %al, %eax
pushq $0x2
popq %r14
subl %eax, %r14d
pushq $0x2
popq %rbp
leaq 0x18181(%rip), %r13     # 0x2d73b
subl $0x1, %r14d
jb 0x15622
movq %r15, %rdi
callq 0x7190
movq %rax, %rdi
leaq 0x18275(%rip), %rsi     # 0x2d847
callq 0x7310
movl 0x310(%rbx), %esi
addl $0x2, %esi
movq %rax, %rdi
callq 0x7590
movq %rax, %rdi
movq %r13, %rsi
callq 0x7310
movl 0x310(%rbx), %esi
addl $0x2, %esi
movq %rax, %rdi
callq 0x7590
movq %rax, %rdi
movq %r13, %rsi
callq 0x7310
movl 0x310(%rbx), %esi
addl $0x2, %esi
movq %rax, %rdi
callq 0x7590
jmp 0x155ba
movb $0x69, %al
jmp 0x153e7
jmp 0x1562b
movq %rax, %rbx
movq %r14, %rdi
callq 0x7170
movq %rbx, %rdi
callq 0x75c0