// File: /workspace/github_cpp_makefile_star2_O1/nikhilYadala[P]Python_to_cpp/Source/src/convert_to_cpp_classes.cpp
// Function: convert_to_cpp_classes(unsigned long, unsigned long, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, class_declaration*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)
void convert_to_cpp_classes(unsigned long int start,
							unsigned long int end,
							std::vector< line_pair >& lines,
							std::string& converted_code,
							class_declaration* final_class,
							std::map< std::string,
							std::string >& variables )
   {

     	// if(start == end)
     	// 	std::cout<<"-------------\n\n\n\n"<<lines[start].first<<"\n\n-----------------"
        std ::vector < std::string > tokens;
        tokens.resize(1);
        break_into_words_(lines[start].first,tokens);//the lines get tokenized,inherited function

        if(tokens[1]=="class")
        {
            final_class->name=tokens[2];


            if(tokens[3]==":")
            	final_class->num_base_func=0;
            else if (tokens[3]=="(")
            {
                 std::vector<std::string>::iterator tokens_itr =tokens.begin()+3;
                 while(*(++tokens_itr)!=")")
                 {  
                 	if(*tokens_itr==",")
                 		continue;  //delimeter for inherited list of functions

                 	(final_class->base_functions).push_back(*tokens_itr);
                 	(final_class->num_base_func)++;//incremented each time a base func is found
                 	//tokens_itr++; //to bypass the commas after each base function

                 }



            }//all the base classes(if any)are noted till here;
        
          }
          /*while(*tokens_itr=="\n")
          	tokens_itr++; //gets rid of all the new lines, infact only one new line char would be there
           */
          	//the above block is now no more required as, tokens no more store '\n'

          /************THE FOLLOWING LINES FILL std::string converted_code *******************/
          	//converted_code.append("{\npublic:\n");

           
             for(unsigned long int i=start;i<=end;)
	            {	
		             tokens.clear();
		              break_into_words_(lines[i].first,tokens);
		              std::vector< std::string >::iterator itr=tokens.begin();

		 if(*itr=="if")
		{

			itr++;
			bool is_not=0;
			if(*itr=="not")
				{
					is_not=1;
					itr++;
				}	
			std::string expr="";
			
			if(is_not)
				expr.append("!");

			while(*itr!=":")
				expr.append(*(itr++));
			
			converted_code.append((size_t)lines[i].second,' ');
			converted_code.append("if(");
			converted_code.append(expr);
			converted_code.append(")\n");
			converted_code.append((size_t)lines[i].second,' ');
			converted_code.append("{\n");
			
			int space_count=lines[i].second,st=i;
			
			while(lines[++i].second>space_count);
				
			std::string snippet;
			convert_to_cpp_classes(st+1,i-1,lines,snippet,final_class,variables);
			converted_code.append(snippet);
			
			converted_code.append((size_t)lines[st].second,' ');
			converted_code.append("}\n");
			//i already incremented while changing lines
			continue;

		}
		
		////NOTE:- Every section puts \n at its end so no need to put one in each section's beginning

		if(*itr=="print")
		{

			itr++;
			converted_code.append((size_t)lines[i].second,' ');
			converted_code.append("std::cout<<");
			int f=1;
			while(itr!=tokens.end())
			{
				if(*itr=="("||*itr==")")
					f=!f;

				if(!f||*itr!=",")
					converted_code.append(*itr);
				itr++;
			}
			converted_code.append(";\n");
			i++;
			continue;
		}


		//handle functionn definition inside the classes
		else if(*itr=="def")
		{
			long int space_count=lines[i].second;
			long int st=i;
			std::vector< std::string >::iterator itr1=tokens.begin();

			while(lines[++i].second>space_count); //upto i-1, we have to consider func
			std::string converted_function;
			function_declaration converted_function_declaration;
			convert_to_cpp(st,i-1,lines,converted_function,&converted_function_declaration,variables);

			//rendering the code for function
			if(converted_function_declaration.return_type == "")
				converted_function_declaration.return_type = "void";
			//the funciton can be a constructor
			if(converted_function_declaration.name=="__init__")
				converted_code.append(final_class->name).append("(");
			else{
			converted_code.append(converted_function_declaration.return_type).append(" ");
			//the funciton can be a constructor
			if(converted_function_declaration.name=="__init__")
				converted_code.append(final_class->name).append("(");
			else
			converted_code.append(converted_function_declaration.name).append("(");
			}
			 for(std::vector< string_pair >::iterator j=converted_function_declaration.args.begin();j!=converted_function_declaration.args.end();++j)
			 {
			 	converted_code.append(j->second).append(" "); //arg datatype
			 	converted_code.append(j->first).append(","); // arg name
			 
			 }
			 if(*(converted_code.end()-1) == ',')
			 	*(converted_code.end()-1)=')';
			 else  converted_code.append(")");
			 
			converted_code.append("\n{\n").append(converted_function).append("\n}\n");
			//i already got incremented while checking for the function block
			continue;

		}//end elif statement for functions inside the class




		else if (*itr!="def")	//variable declaration
		{
			std::string v=*itr;
			std::string expr="";
			bool is_function_call=1;
			if(*(itr+1)=="="){
				is_function_call=0;
				itr=itr+2;	//skip = sign
			}



			if(std::find(tokens.begin(), tokens.end(),"raw_input")!=tokens.end())
			{
				tokens.pop_back();
				itr=itr+3;
				bool f = 0;
				int i = 0;
				expr.append(*(itr+1));
				while(*itr!=":") {
					i++;
					// if(*itr=="(") f=1;
					// if(!f) expr.append(*itr);
					itr++;
					if(i==1000000)
					{
						std::cout<<": missing on line "<<i<<std::endl;
						exit(0);
					}
				}
				itr++;
				variables[v]=map_type_(*itr,i);
				converted_code.append((size_t)lines[i].second*tab_size,' ');			
				converted_code.append(variables[v]);
				if(variables[v]=="artificial_string")
					converted_code.append(" "+v+"(\"\");\n");					
				else converted_code.append(" "+v+";\n"	);

				converted_code.append((size_t)lines[i].second*tab_size,' ');
				converted_code.append("std::cout<<");
				converted_code.append(expr);
				converted_code.append(";\n");
				converted_code.append((size_t)lines[i].second*tab_size,' ');
				converted_code.append("std::cin>>");
				converted_code.append(v);
				converted_code.append(";\n");

				
			}
			//all other function calls and varible declarations and procesing
			else{
					if(is_function_call)
						while(itr!=tokens.end()) expr.append(*itr++);
					else{
							while(*itr!=":" && itr!=tokens.end())
								expr.append(*itr++);
					}
					//if the type is expliciyly mentioned 
					bool type_annotated = 1;
					if(itr == tokens.end())
					{
						type_annotated = 0;
						if(!is_function_call)
							std::cout<<"[ WARNING ] Auto type predicting at line "<<i<<std::endl;
					}

					std::vector< std::string >::iterator itr1 = itr;
					if(type_annotated)	
						itr1 = itr+1;
					

		    		expr = eval_expr_(expr);

					if(!is_function_call)
					{
						bool not_decl = (variables.find(v) != variables.end());
				
							if(!type_annotated)
								variables[v]=expr_type_(expr,variables);
							else{
								std::string t ="";
								while(itr1!=tokens.end()){
									t.append(*itr1);
									itr1++;
								}
								variables[v]=map_type_(t,i);
							}
									
							converted_code.append((size_t)lines[i].second*tab_size,' ');		
							
								if(expr_type_(expr,variables)=="list")
								{
									itr = tokens.begin()+3;
									converted_code.append("std::"+variables[v]+" ").append(v).append(";");
									// std::string::iterator itr3=itr;
									// if(variables.count(*itr3))
									// {
									// 	for(std::vector <int>::iterator it=(*itr3).begin();it!=(*itr3).end();it++)

									// }


									while(*itr!="]")
									{
										if(*itr=="["||*itr==",")
											itr++;
 										else {converted_code.append("\n").append(v).append(".push_back(").append(*itr).append(");");
 											itr++;
 									}
 								    }


                                   }

						 		   if(expr_type_(expr,variables)!="list")
									{	
										if(!not_decl) 
										converted_code.append(variables[v]);	
										converted_code.append(" ");
										converted_code.append(v);
										converted_code.append(" = ");
										converted_code.append(expr);
										converted_code.append(";\n");
									
									}
					}

					
					else{// if it is a function call
						converted_code.append((size_t)lines[i].second*tab_size,' ');
						converted_code.append(expr);
						converted_code.append(";\n");
					}
			}
			i++;
			continue;

		}	



		/***** SOME MORE CASES HAVE TO BE TAKEN CARE OF HERE.*****/
		/***** Variables have to be explicitly taken care off.****/
      
      //At the the end, the closing lines of the classe in c++ is written

    
     }

    //  converted_code.append("\ntalking of this one};\n");
     // the above step to be taken care off in rendering the cpp code
   
 std::cout<<"printing the converted class code\n"<<converted_code <<"haha\n";

     }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %r9, -0x68(%rbp)
movq %r8, -0x90(%rbp)
movq %rcx, %rbx
movq %rdx, -0x30(%rbp)
movq %rsi, -0x140(%rbp)
movq %rdi, -0x40(%rbp)
xorps %xmm0, %xmm0
leaq -0xb0(%rbp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x1, %esi
callq 0x9ab2
movq -0x40(%rbp), %rax
leaq (%rax,%rax,4), %rdi
shlq $0x3, %rdi
movq -0x30(%rbp), %rax
addq (%rax), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x85b2
movq -0xb0(%rbp), %rdi
addq $0x20, %rdi
leaq 0x2b12(%rip), %rsi      # 0xb31b
callq 0x2080
testl %eax, %eax
je 0x981b
movq -0x40(%rbp), %rax
cmpq -0x140(%rbp), %rax
jbe 0x8880
movq 0x67ae(%rip), %rdi      # 0xefd8
leaq 0x2afd(%rip), %rsi      # 0xb32e
movl $0x22, %edx
callq 0x2250
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x678f(%rip), %rdi      # 0xefd8
callq 0x2250
leaq 0x2afc(%rip), %rsi      # 0xb351
movl $0x5, %edx
movq %rax, %rdi
callq 0x2250
leaq -0xb0(%rbp), %rdi
callq 0x4d9c
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x68(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x148(%rbp)
movq -0x90(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x138(%rbp)
movq -0xb0(%rbp), %r14
movq -0xa8(%rbp), %r15
cmpq %r14, %r15
je 0x88d9
movq %r14, %r12
movq (%r12), %rdi
addq $0x10, %r12
cmpq %r12, %rdi
je 0x88c9
callq 0x21c0
addq $0x10, %r12
cmpq %r15, %r12
jne 0x88b7
movq %r14, -0xa8(%rbp)
movq -0x40(%rbp), %rax
leaq (%rax,%rax,4), %r13
leaq (,%r13,8), %rdi
movq -0x30(%rbp), %rax
addq (%rax), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x85b2
movq -0xb0(%rbp), %r12
movq %r12, %rdi
leaq 0x276a(%rip), %rsi      # 0xb077
callq 0x2080
testl %eax, %eax
leaq 0x2754(%rip), %r14      # 0xb06f
je 0x8a73
movq %r12, %rdi
leaq 0x275e(%rip), %rsi      # 0xb089
callq 0x2080
testl %eax, %eax
je 0x8c6e
movq %r12, %rdi
movq %r14, %rsi
callq 0x2080
testl %eax, %eax
je 0x8d2b
movq %r12, %rdi
movq %r14, %rsi
callq 0x2080
testl %eax, %eax
je 0x9042
leaq -0x100(%rbp), %rax
movq %rax, -0x110(%rbp)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq -0x110(%rbp), %rdi
callq 0x4df8
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x88(%rbp), %rdi
leaq 0x2881(%rip), %rdx      # 0xb21e
movq %rdx, %rsi
callq 0x4e92
leaq 0x20(%r12), %rdi
leaq 0x274e(%rip), %rsi      # 0xb0ff
callq 0x2080
xorl %r14d, %r14d
movl %eax, -0xb8(%rbp)
testl %eax, %eax
sete %r15b
movq -0xb0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
leaq 0x272c(%rip), %rdx      # 0xb106
callq 0x5a49
movb %r15b, %r14b
shll $0x6, %r14d
addq %r14, %r12
movq -0xa8(%rbp), %rcx
cmpq %rcx, %rax
je 0x90e5
leaq -0x20(%rcx), %rax
movq %rax, -0xa8(%rbp)
movq -0x20(%rcx), %rdi
addq $-0x10, %rcx
cmpq %rcx, %rdi
je 0x8a16
callq 0x21c0
movq 0x80(%r12), %rsi
movq 0x88(%r12), %rdx
leaq -0x88(%rbp), %rdi
callq 0x2090
leaq -0x50(%rbp), %r13
addq $0x60, %r12
xorl %r15d, %r15d
movl $0x20, %r14d
movq %r12, %rdi
leaq 0x2716(%rip), %rsi      # 0xb163
callq 0x2080
testl %eax, %eax
je 0x8f0b
incl %r15d
addq $0x20, %r12
addq $0x28, %r14
cmpl $0xf4240, %r15d         # imm = 0xF4240
jne 0x8a43
jmp 0x9902
leaq 0x20(%r12), %r14
movq %r14, %rdi
leaq 0x25f8(%rip), %rsi      # 0xb07a
callq 0x2080
movl %eax, %r15d
addq $0x40, %r12
testl %eax, %eax
cmovneq %r14, %r12
leaq -0x100(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq -0x110(%rbp), %rdi
leaq 0x276e(%rip), %rdx      # 0xb21e
movq %rdx, %rsi
callq 0x4e92
testl %r15d, %r15d
jne 0x8ad0
leaq -0x110(%rbp), %rdi
leaq 0x25b3(%rip), %rsi      # 0xb07e
callq 0x23c0
movq %r12, %rdi
leaq 0x2689(%rip), %rsi      # 0xb163
callq 0x2080
testl %eax, %eax
je 0x8b02
leaq 0x20(%r12), %r14
movq (%r12), %rsi
movq 0x8(%r12), %rdx
leaq -0x110(%rbp), %rdi
callq 0x2090
movq %r14, %r12
jmp 0x8ad0
movq -0x30(%rbp), %rax
movq (%rax), %rax
movslq 0x20(%rax,%r13,8), %rcx
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
xorl %edx, %edx
movl $0x20, %r8d
callq 0x23b0
movq %rbx, %rdi
leaq 0x2559(%rip), %rsi      # 0xb085
callq 0x23c0
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
movq %rbx, %rdi
callq 0x2090
movq %rbx, %rdi
leaq 0x25b2(%rip), %rsi      # 0xb103
callq 0x23c0
movq -0x30(%rbp), %rax
movq (%rax), %rax
movslq 0x20(%rax,%r13,8), %rcx
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
xorl %edx, %edx
movl $0x20, %r8d
callq 0x23b0
movq %rbx, %rdi
leaq 0x2793(%rip), %rsi      # 0xb313
callq 0x23c0
movq -0x30(%rbp), %rax
movq (%rax), %rax
leaq (%rax,%r13,8), %rcx
addq $0x48, %rcx
movl -0x28(%rcx), %eax
movq -0x40(%rbp), %r14
incq %r14
leaq 0x28(%rcx), %rdx
cmpl %eax, (%rcx)
movq %rdx, %rcx
jg 0x8b9b
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
movq $0x0, -0x80(%rbp)
movb $0x0, -0x78(%rbp)
movq -0x40(%rbp), %rcx
shlq $0x20, %rcx
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rcx, %r15
leaq (%rcx,%rax), %rdi
sarq $0x20, %rdi
leaq -0x1(%r14), %rsi
movq -0x30(%rbp), %rdx
leaq -0x88(%rbp), %rcx
movq -0x90(%rbp), %r8
movq -0x68(%rbp), %r9
callq 0x8788
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq %rbx, %rdi
callq 0x2090
sarq $0x20, %r15
movq -0x30(%rbp), %rax
movq (%rax), %rax
leaq (%r15,%r15,4), %rcx
movslq 0x20(%rax,%rcx,8), %rcx
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
xorl %edx, %edx
movl $0x20, %r8d
callq 0x23b0
movq %rbx, %rdi
leaq 0x26ea(%rip), %rsi      # 0xb32b
callq 0x23c0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x8c5b
callq 0x21c0
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
jmp 0x90d2
movq -0x30(%rbp), %rax
movq (%rax), %rax
movslq 0x20(%rax,%r13,8), %rcx
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
xorl %edx, %edx
movl $0x20, %r8d
callq 0x23b0
movq %rbx, %rdi
leaq 0x23f7(%rip), %rsi      # 0xb08f
callq 0x23c0
addq $0x20, %r12
cmpq -0xa8(%rbp), %r12
je 0x8d17
movl $0x1, %r14d
movq %r12, %rdi
leaq 0x240f(%rip), %rsi      # 0xb0c9
callq 0x2080
testl %eax, %eax
je 0x8cd6
movq %r12, %rdi
leaq 0x234c(%rip), %rsi      # 0xb019
callq 0x2080
testl %eax, %eax
jne 0x8ce1
xorl %eax, %eax
testl %r14d, %r14d
sete %al
movl %eax, %r14d
testl %r14d, %r14d
je 0x8cf9
movq %r12, %rdi
leaq 0x2383(%rip), %rsi      # 0xb073
callq 0x2080
testl %eax, %eax
je 0x8d0a
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %rbx, %rdi
callq 0x2090
addq $0x20, %r12
cmpq -0xa8(%rbp), %r12
jne 0x8cb0
movq %rbx, %rdi
leaq 0x2406(%rip), %rsi      # 0xb127
callq 0x23c0
jmp 0x9510
movq -0x30(%rbp), %rax
movq (%rax), %rax
leaq (%rax,%r13,8), %rcx
addq $0x48, %rcx
movl -0x28(%rcx), %eax
movq -0x40(%rbp), %r14
incq %r14
leaq 0x28(%rcx), %rdx
cmpl %eax, (%rcx)
movq %rdx, %rcx
jg 0x8d41
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x80(%rbp)
movb %cl, -0x78(%rbp)
leaq -0x100(%rbp), %rax
movq %rax, -0x110(%rbp)
movq %rcx, -0x108(%rbp)
movb %cl, -0x100(%rbp)
leaq -0xe0(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq %rcx, -0xe8(%rbp)
movb %cl, -0xe0(%rbp)
leaq -0xd0(%rbp), %rax
movq %rcx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq -0x1(%r14), %rsi
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq -0x88(%rbp), %rcx
leaq -0x110(%rbp), %r8
movq -0x68(%rbp), %r9
callq 0x2f41
leaq -0xf0(%rbp), %rdi
leaq 0x2443(%rip), %rsi      # 0xb21e
callq 0x2080
testl %eax, %eax
jne 0x8e06
movq -0xe8(%rbp), %rdx
movl $0x4, %r8d
leaq -0xf0(%rbp), %rdi
xorl %esi, %esi
leaq 0x2480(%rip), %rcx      # 0xb281
callq 0x2310
leaq -0x110(%rbp), %rdi
leaq 0x250d(%rip), %rsi      # 0xb321
callq 0x2080
movq -0x138(%rbp), %rcx
movq -0x90(%rbp), %r15
testl %eax, %eax
je 0x8e7f
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
movq %rbx, %rdi
callq 0x2090
movq %rax, %rdi
leaq 0x23e3(%rip), %rsi      # 0xb22e
callq 0x23c0
leaq -0x110(%rbp), %r15
movq %r15, %rdi
leaq 0x24c0(%rip), %rsi      # 0xb321
callq 0x2080
testl %eax, %eax
leaq -0x108(%rbp), %rcx
cmoveq -0x138(%rbp), %rcx
cmoveq -0x90(%rbp), %r15
movq (%r15), %rsi
movq (%rcx), %rdx
movq %rbx, %rdi
callq 0x2090
movq %rax, %rdi
leaq 0x2232(%rip), %rsi      # 0xb0c9
callq 0x23c0
movq -0xd0(%rbp), %r15
cmpq -0xc8(%rbp), %r15
je 0x8eef
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
movq %rbx, %rdi
callq 0x2090
movq %rax, %rdi
leaq 0x2368(%rip), %rsi      # 0xb22e
callq 0x23c0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2090
movq %rax, %rdi
leaq 0x218f(%rip), %rsi      # 0xb073
callq 0x23c0
addq $0x40, %r15
jmp 0x8ea3
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
cmpb $0x2c, -0x1(%rax,%rcx)
jne 0x904b
movb $0x29, -0x1(%rax,%rcx)
jmp 0x905a
leaq -0x180(%rbp), %rax
movq %rax, -0x190(%rbp)
movq 0x20(%r12), %rsi
movq 0x28(%r12), %rdx
addq %rsi, %rdx
leaq -0x190(%rbp), %r12
movq %r12, %rdi
callq 0x4df8
leaq -0x60(%rbp), %rdi
movq %r12, %rsi
movl %r15d, %edx
callq 0x807c
movq -0x68(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x4c30
movq %rax, %rdi
leaq -0x60(%rbp), %rsi
callq 0x2290
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x8f6e
callq 0x21c0
movq -0x190(%rbp), %rdi
leaq -0x180(%rbp), %rax
cmpq %rax, %rdi
je 0x8f86
callq 0x21c0
movq -0x30(%rbp), %rax
movq (%rax), %rax
movslq (%rax,%r14), %rcx
shlq $0x2, %rcx
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
xorl %edx, %edx
movl $0x20, %r8d
callq 0x23b0
movq -0x68(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x4c30
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x2090
movq -0x68(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x4c30
movq %rax, %rdi
leaq 0x203e(%rip), %rsi      # 0xb020
callq 0x2080
testl %eax, %eax
je 0x9256
leaq -0x130(%rbp), %r15
movq %r15, %rdi
leaq 0x222e(%rip), %rsi      # 0xb22e
leaq -0x110(%rbp), %rdx
callq 0x4ba5
movq %r15, %rdi
leaq 0x2111(%rip), %rsi      # 0xb127
callq 0x23c0
movq %r13, -0x60(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x92a9
movq %rdx, -0x60(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x50(%rbp)
jmp 0x92b1
movq -0x40(%rbp), %r14
jmp 0x9517
movq %rbx, %rdi
leaq 0x1fc4(%rip), %rsi      # 0xb019
callq 0x23c0
movq %rbx, %rdi
leaq 0x22ae(%rip), %rsi      # 0xb312
callq 0x23c0
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq %rax, %rdi
callq 0x2090
movq %rax, %rdi
leaq 0x22a4(%rip), %rsi      # 0xb32a
callq 0x23c0
leaq -0xd0(%rbp), %rdi
callq 0x742a
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x90af
callq 0x21c0
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x90c7
callq 0x21c0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x9517
callq 0x21c0
jmp 0x9517
cmpl $0x0, -0xb8(%rbp)
je 0x9133
cmpq -0xa8(%rbp), %r12
je 0x914f
leaq 0x20(%r12), %r14
movq (%r12), %rsi
movq 0x8(%r12), %rdx
leaq -0x88(%rbp), %rdi
callq 0x2090
movq %r14, %r12
jmp 0x90ee
leaq 0x20(%r12), %r14
movq (%r12), %rsi
movq 0x8(%r12), %rdx
leaq -0x88(%rbp), %rdi
callq 0x2090
movq %r14, %r12
movq %r12, %rdi
leaq 0x2026(%rip), %rsi      # 0xb163
callq 0x2080
testl %eax, %eax
je 0x914f
cmpq -0xa8(%rbp), %r12
jne 0x9116
movq -0xa8(%rbp), %r14
cmpl $0x0, -0xb8(%rbp)
jne 0x91b6
cmpq %r14, %r12
jne 0x91b6
movl $0x29, %edx
movq 0x5e68(%rip), %rdi      # 0xefd8
leaq 0x1fbe(%rip), %rsi      # 0xb135
callq 0x2250
movq 0x5e55(%rip), %rdi      # 0xefd8
movq -0x40(%rbp), %rsi
callq 0x2130
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
movq %r14, -0x150(%rbp)
cmpq %r14, %r12
setne -0x31(%rbp)
leaq -0x60(%rbp), %r14
movq %r14, %rdi
leaq -0x88(%rbp), %r15
movq %r15, %rsi
callq 0x81e1
movq %r15, %rdi
movq %r14, %rsi
callq 0x2290
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x91f7
callq 0x21c0
cmpl $0x0, -0xb8(%rbp)
movq -0x150(%rbp), %r14
je 0x92dd
movq -0x30(%rbp), %rax
movq (%rax), %rax
movslq 0x20(%rax,%r13,8), %rcx
shlq $0x2, %rcx
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
xorl %edx, %edx
movl $0x20, %r8d
callq 0x23b0
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq %rbx, %rdi
callq 0x2090
movq %rbx, %rdi
leaq 0x1edb(%rip), %rsi      # 0xb127
callq 0x23c0
jmp 0x94e3
leaq -0x130(%rbp), %r15
movq %r15, %rdi
leaq 0x1fc7(%rip), %rsi      # 0xb22e
leaq -0x110(%rbp), %rdx
callq 0x4ba5
movq %r15, %rdi
leaq 0x1ea6(%rip), %rsi      # 0xb123
callq 0x23c0
movq %r13, -0x60(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x93e3
movq %rdx, -0x60(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x50(%rbp)
jmp 0x93eb
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, -0x58(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq %rbx, %rdi
callq 0x2090
jmp 0x9412
movq -0x68(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x5b3c
movq %rax, -0xb8(%rbp)
cmpq %r14, %r12
je 0x952d
leaq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x60(%rbp), %rdi
leaq 0x1f0e(%rip), %rdx      # 0xb21e
movq %rdx, %rsi
callq 0x4e92
xorl %eax, %eax
movb -0x31(%rbp), %cl
movb %cl, %al
shll $0x5, %eax
addq %rax, %r12
cmpq -0xa8(%rbp), %r12
movq -0x68(%rbp), %r14
je 0x9351
movq (%r12), %rsi
movq 0x8(%r12), %rdx
leaq -0x60(%rbp), %rdi
callq 0x2090
addq $0x20, %r12
cmpq -0xa8(%rbp), %r12
jne 0x9332
leaq -0x160(%rbp), %rax
movq %rax, -0x170(%rbp)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
addq %rsi, %rdx
leaq -0x170(%rbp), %r15
movq %r15, %rdi
callq 0x4df8
leaq -0x130(%rbp), %rdi
movq %r15, %rsi
movq -0x40(%rbp), %rdx
callq 0x807c
movq %r14, %rdi
leaq -0x110(%rbp), %rsi
callq 0x4c30
movq %rax, %rdi
leaq -0x130(%rbp), %rsi
callq 0x2290
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x93c2
callq 0x21c0
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0x955f
callq 0x21c0
jmp 0x955f
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, -0x58(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq %rbx, %rdi
callq 0x2090
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x9420
callq 0x21c0
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x9438
callq 0x21c0
movq -0x30(%rbp), %rax
movq (%rax), %rax
movslq (%rax,%r14), %rcx
shlq $0x2, %rcx
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
xorl %edx, %edx
movl $0x20, %r8d
callq 0x23b0
movq %rbx, %rdi
leaq 0x1c2a(%rip), %rsi      # 0xb08f
callq 0x23c0
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq %rbx, %rdi
callq 0x2090
movq %rbx, %rdi
leaq 0x1ca0(%rip), %rsi      # 0xb127
callq 0x23c0
movq -0x30(%rbp), %rax
movq (%rax), %rax
movslq (%rax,%r14), %rcx
shlq $0x2, %rcx
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
xorl %edx, %edx
movl $0x20, %r8d
callq 0x23b0
movq %rbx, %rdi
leaq 0x1c71(%rip), %rsi      # 0xb12a
callq 0x23c0
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
movq %rbx, %rdi
callq 0x2090
movq %rbx, %rdi
leaq 0x1c49(%rip), %rsi      # 0xb127
callq 0x23c0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x94f8
callq 0x21c0
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x9510
callq 0x21c0
movq -0x40(%rbp), %r14
incq %r14
movq %r14, -0x40(%rbp)
cmpq -0x140(%rbp), %r14
jbe 0x88a1
jmp 0x8823
leaq -0x60(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movq -0x68(%rbp), %r14
movq %r14, %rdx
callq 0x83e3
movq %r14, %rdi
leaq -0x110(%rbp), %rsi
callq 0x4c30
movq %rax, %rdi
leaq -0x60(%rbp), %rsi
callq 0x2290
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x9571
callq 0x21c0
movq -0x30(%rbp), %rax
movq (%rax), %rax
movslq 0x20(%rax,%r13,8), %rcx
shlq $0x2, %rcx
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
xorl %edx, %edx
movl $0x20, %r8d
callq 0x23b0
leaq -0x50(%rbp), %r13
leaq -0x60(%rbp), %r15
movq %r15, %rdi
leaq -0x88(%rbp), %rsi
movq -0x68(%rbp), %r14
movq %r14, %rdx
callq 0x83e3
movq %r15, %rdi
leaq 0x1a5e(%rip), %rsi      # 0xb01b
callq 0x2080
movl %eax, %r15d
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x95d3
callq 0x21c0
testl %r15d, %r15d
je 0x96a5
leaq -0x60(%rbp), %r15
movq %r15, %rdi
leaq -0x88(%rbp), %rsi
movq %r14, %rdx
callq 0x83e3
movq %r15, %rdi
leaq 0x1a1f(%rip), %rsi      # 0xb01b
callq 0x2080
movl %eax, %r15d
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x9612
callq 0x21c0
testl %r15d, %r15d
je 0x94e3
movq -0xb8(%rbp), %rax
cmpq -0x148(%rbp), %rax
jne 0x964a
movq -0x68(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x4c30
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x2090
movq %rbx, %rdi
leaq 0x1bda(%rip), %rsi      # 0xb22e
callq 0x23c0
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
movq %rbx, %rdi
callq 0x2090
movq %rbx, %rdi
leaq 0x1aff(%rip), %rsi      # 0xb178
callq 0x23c0
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq %rbx, %rdi
callq 0x2090
movq %rbx, %rdi
leaq 0x1a8c(%rip), %rsi      # 0xb127
callq 0x23c0
jmp 0x94e3
movq -0xb0(%rbp), %r12
movq %r14, %rdi
leaq -0x110(%rbp), %rsi
callq 0x4c30
leaq -0x130(%rbp), %r15
movq %r15, %rdi
leaq 0x1a93(%rip), %rsi      # 0xb15f
movq %rax, %rdx
callq 0x4ba5
movq %r15, %rdi
leaq 0x1b50(%rip), %rsi      # 0xb22e
callq 0x23c0
movq %r13, -0x60(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9703
movq %rdx, -0x60(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x50(%rbp)
jmp 0x970b
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, -0x58(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq %rbx, %rdi
callq 0x2090
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
movq %rax, %rdi
callq 0x2090
movq %rax, %rdi
leaq 0x1a24(%rip), %rsi      # 0xb176
callq 0x23c0
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x9765
callq 0x21c0
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x977d
callq 0x21c0
addq $0x60, %r12
movq %r12, %rdi
leaq 0x19da(%rip), %rsi      # 0xb165
callq 0x2080
testl %eax, %eax
je 0x95dc
movq %r12, %rdi
leaq 0x19c5(%rip), %rsi      # 0xb167
callq 0x2080
testl %eax, %eax
je 0x9812
movq %r12, %rdi
leaq 0x18be(%rip), %rsi      # 0xb073
callq 0x2080
testl %eax, %eax
je 0x9812
movq %rbx, %rdi
leaq 0x1a55(%rip), %rsi      # 0xb21d
callq 0x23c0
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
movq %rax, %rdi
callq 0x2090
movq %rax, %rdi
leaq 0x197c(%rip), %rsi      # 0xb169
callq 0x23c0
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %rax, %rdi
callq 0x2090
movq %rax, %rdi
leaq 0x1968(%rip), %rsi      # 0xb175
callq 0x23c0
addq $0x20, %r12
jmp 0x9781
movq -0xb0(%rbp), %rsi
addq $0x40, %rsi
movq -0x90(%rbp), %rdi
callq 0x2110
movq -0xb0(%rbp), %rdi
addq $0x60, %rdi
leaq 0x191f(%rip), %rsi      # 0xb163
callq 0x2080
testl %eax, %eax
je 0x98ef
movq -0xb0(%rbp), %rdi
addq $0x60, %rdi
leaq 0x1866(%rip), %rsi      # 0xb0c9
callq 0x2080
testl %eax, %eax
jne 0x8816
movq -0xb0(%rbp), %r14
leaq 0x80(%r14), %rdi
leaq 0x1794(%rip), %rsi      # 0xb019
callq 0x2080
testl %eax, %eax
je 0x8816
movq -0x90(%rbp), %rax
leaq 0x28(%rax), %r15
addq $0xa0, %r14
leaq 0x17c8(%rip), %r13      # 0xb073
leaq -0x20(%r14), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x2080
testl %eax, %eax
je 0x98d3
movq %r15, %rdi
movq %r12, %rsi
callq 0x4cb0
movq -0x90(%rbp), %rax
incl 0x20(%rax)
movq %r14, %rdi
leaq 0x173c(%rip), %rsi      # 0xb019
callq 0x2080
addq $0x20, %r14
testl %eax, %eax
jne 0x98ab
jmp 0x8816
movq -0x90(%rbp), %rax
movl $0x0, 0x20(%rax)
jmp 0x8816
movq 0x56cf(%rip), %rdi      # 0xefd8
leaq 0x1800(%rip), %rsi      # 0xb110
movl $0x12, %edx
callq 0x2250
movq 0x56b7(%rip), %rdi      # 0xefd8
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x2360
movq %rax, %rdi
callq 0x20e0
xorl %edi, %edi
callq 0x2280
jmp 0x99cb
jmp 0x9a1a
jmp 0x9a47
movq %rax, %rbx
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x9969
callq 0x21c0
jmp 0x9969
movq %rax, %rbx
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0x9a1d
callq 0x21c0
jmp 0x9a1d
jmp 0x9a1a
jmp 0x9a47
jmp 0x9a47
jmp 0x9a47
jmp 0x9a47
jmp 0x9a47
jmp 0x99b8
jmp 0x99b8
jmp 0x99cb
jmp 0x9a47
jmp 0x9a47
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x99ce
callq 0x21c0
jmp 0x99ce
movq %rax, %rbx
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
jmp 0x9a25
jmp 0x9a47
jmp 0x9a61
jmp 0x9a47
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x99fa
callq 0x21c0
jmp 0x99fa
movq %rax, %rbx
movq -0x190(%rbp), %rdi
leaq -0x180(%rbp), %rax
jmp 0x9a25
jmp 0x9a47
jmp 0x9a47
jmp 0x9a47
jmp 0x9a47
jmp 0x9a47
jmp 0x9a66
jmp 0x9a61
jmp 0x9a61
movq %rax, %rbx
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x9a4a
callq 0x21c0
jmp 0x9a4a
jmp 0x9a47
jmp 0x9a61
jmp 0x9a61
jmp 0x9a61
jmp 0x9a47
jmp 0x9a61
jmp 0x9a47
jmp 0x9a47
jmp 0x9a79
jmp 0x9a47
jmp 0x9a66
movq %rax, %rbx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x9a69
callq 0x21c0
jmp 0x9a69
movq %rax, %rbx
jmp 0x9a9d
movq %rax, %rbx
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
jmp 0x9a93
movq %rax, %rbx
leaq -0x110(%rbp), %rdi
callq 0x6f78
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x9a9d
callq 0x21c0
leaq -0xb0(%rbp), %rdi
callq 0x4d9c
movq %rbx, %rdi
callq 0x2380
nop