// File: /workspace/github_cpp_makefile_star2_O2/richardposner[P]BioNetFit2/src/code/Evaluate.cpp
// Function: evaluateResults(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::map<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<int>, std::allocator<std::pair<int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, float, float)
float evaluateResults(string inputFile1, string inputFile2, map<int,string> constraints, string outname, float iteration1, float iteration2) {
  ifstream simResult1;
  ifstream simResult2;
  ofstream outFile;
  /*
  if(argc != 4){
     cout << endl << endl;
     cout << "Usage: ./evaluate_results result_file1.txt result_file2.txt constraint_file.cons";
     cout << endl << endl;
     return 1;
  }
*/
  outFile.open(outname, ios_base::app);
  simResult1.open (inputFile1);
  simResult2.open (inputFile2);

  int count = 0;
  vector<string> constraintValue1;
  vector<string> constraintValue2;
  vector<string> constraintOp;
  vector<string> variableNames1;
  vector<string> variableValues1;
  vector<string> variableNames2;
  vector<string> variableValues2;


  string constraintItem;


  map< string, map <int, double> > namesValues1;
  map< string, map <int, double> > namesValues2;

  string possibleConstraints("<>=!");
  size_t pos = 0;
  size_t newpos;
  size_t newpos2;

  string line;

  string tmpStr;

//just to test if the constraing function works
//int test = constraintFunction(0, "=", 0);
//cout << "test result is: " << test << endl; //the result should be 1

  //tests if input files exist
  if (!simResult1.is_open()){cout << "Error! Can't find simulation result file 1.\n"; return 1;}
  if (!simResult2.is_open()){cout << "Error! Can't find simulation result file 2.\n"; return 1;}

  //reads test constraints file
//  cout << "Reading constraints file..." << endl;


  for(auto it = constraints.begin(); it!=constraints.end(); ++it){
      //parse constraints using a logical expression parser
      //continue here
      //constraintValue1[0] = line.substr(0, line.find(constraints));
	  	  line = it->second;
        newpos = line.find_first_of(possibleConstraints, pos);
        constraintValue1.push_back(line.substr(pos, newpos));

        newpos2 = line.find_last_of(possibleConstraints);
        constraintValue2.push_back(line.substr(newpos2+1));

        //cout << "newpos " << newpos << " newpos2 " << newpos2 << endl;

        if(newpos == newpos2){
	constraintOp.push_back(line.substr(newpos,1));

        }else{constraintOp.push_back(line.substr(newpos,newpos2-newpos+1));}



        count++;


  }



  cout << "Done reading constraints file." << endl;







  //get variable/collumn names
  //cout << "Reading Result File 1..." << endl;
  getline (simResult1,line);
  variableNames1 = splitResults(line, ' ');

  if(variableNames1.size() <= 1){
	  variableNames1 = splitResults(line, '\t');
	  if(variableNames1.size() <= 1){
		cout << "Can't split result table, are you using space or tab as delimiter?" << endl;
		return 1;

	  }

  }

  for (unsigned int i = 0; i < variableNames1.size(); i++){
      if (variableNames1[i].empty() || variableNames1[i]=="#"){
         //cout << "Found empty string at " << i << endl;
         variableNames1.erase(variableNames1.begin()+i);
         i--;
      }
   }

/*
  //debug
  for(int i = 0; i < variableNames.size(); i++){
      cout << i << ": !!!!" << variableNames[i] << "@@@@" << endl;

  }
*/

  //get variable values
  count = 0;
  while ( getline (simResult1,line) ){

      //cout << line << '\n';

      variableValues1 =  splitResults(line, ' ');

      if(variableValues1.size() <= 1){
    	  variableValues1 = splitResults(line, '\t');
    	  if(variableValues1.size() <= 1){
    		cout << "Can't split result table, are you using space or tab as delimiter?" << endl;
    		return 1;

    	  }

      }

      for(unsigned int i = 0; i < variableValues1.size(); i++){
          if (variableValues1[i].empty()){
             //cout << "Found empty string at " << i << endl;
             variableValues1.erase(variableValues1.begin()+i);
             i--;
          }

       }

       //start making the map here
       //make a map with the variable names (string) vs their index (int), pointing to values (double)
       //example map[variableNames[i]][count] = variableValues[i];
       for(unsigned int i = 0; i < variableNames1.size(); i++){

          if(variableNames1[i] != "Iteration" || variableNames1[i] != "iteration" || variableNames1[i] != "time" || variableNames1[i] != "Time"){
             tmpStr = static_cast<string>(variableValues1[i]);
             namesValues1[variableNames1[i]][count] = atof(tmpStr.c_str());
             //cout << "tmpStr: " << tmpStr << endl;
             //cout << "name: " << variableNames[i] << "; value at " << count << ": " << namesValues[variableNames[i]][count]  << endl;
          }


       }


  count++;

  }


  //cout << "FOUND LINES IN THE RESULT FILE: " << count << endl;

  simResult1.close();


  //cout << "Done reading Result File 1." << endl;








  //get variable/collumn names
  //cout << "Reading Result File 2..." << endl;
  getline (simResult2,line);
  variableNames2 = splitResults(line, ' ');

  if(variableNames2.size() <= 1){
	  variableNames2 = splitResults(line, '\t');
	  if(variableNames2.size() <= 1){
		cout << "Can't split result table, are you using space or tab as delimiter?" << endl;
		return 1;

	  }

  }

  for (unsigned int i = 0; i < variableNames2.size(); i++){
      if (variableNames2[i].empty() || variableNames2[i]=="#"){
         //cout << "Found empty string at " << i << endl;
         variableNames2.erase(variableNames2.begin()+i);
         i--;
      }
   }

/*//debug
  for(int i = 0; i < variableNames.size(); i++){
      cout << i << ": !!!!" << variableNames[i] << "@@@@" << endl;

  }
*/
  //get variable values
  count = 0;
  while ( getline (simResult2,line) ){

      //cout << line << '\n';

      variableValues2 =  splitResults(line, ' ');

      if(variableValues2.size() <= 1){
    	  variableValues2 = splitResults(line, '\t');
    	  if(variableValues2.size() <= 1){
    		cout << "Can't split result table, are you using space or tab as delimiter?" << endl;
    		return 1;

    	  }

      }

      for(unsigned int i = 0; i < variableValues2.size(); i++){
          if (variableValues2[i].empty()){
             //cout << "Found empty string at " << i << endl;
             variableValues2.erase(variableValues2.begin()+i);
             i--;
          }

       }

       //start making the map here
       //make a map with the variable names (string) vs their index (int), pointing to values (double)
       //example map[variableNames[i]][count] = variableValues[i];

      for(unsigned int i = 0; i < variableNames2.size(); i++){

          if(variableNames2[i] != "Iteration" || variableNames2[i] != "iteration"){

             tmpStr = static_cast<string>(variableValues2[i]);
             namesValues2[variableNames2[i]][count] = atof(tmpStr.c_str());
            //cout << "tmpStr: " << tmpStr << endl;
            // cout << "name: " << variableNames[i] << "; value at " << count << ": " << namesValues[variableNames[i]][count]  << endl;
          }


      }


  count++;

  }


  simResult2.close();


  //cout << "Done reading Result File 2." << endl;

float constraintDist;
float result;
float constraintDistC = 0;
//added new model checking method
float fulfilledConstrants = 0;
int first = 0;
vector<string> consList;
//Now test if the constraints are fulfilled
 //And return a list of iterations or time points and whether they were fulfilled
 //cout << "Time" << "\t" << "Constraint" << "\t" << "Result(0=FALSE;1=TRUE)" << endl;
 //outFile << "Time" << "\t" << "Constraint" << "\t" << "Result(0=FALSE;1=TRUE)" << endl; //old mode
	outFile << "Time" << "\t" << "Constraints_fulfilled" << endl;
 for(unsigned int i = 0; i < constraintValue1.size(); i++){
     //constraintFunction(0, "=", 0);
     //cout << "@@@" << constraintValue1[i] << "@@@map size" << namesValues1[constraintValue1[i]].size() << endl;
 //    cout << constraintValue1[i] << "\t" <<  constraintOp[i] << "\t" << constraintValue2[i] << endl;
     cout << "Starting test for constraint: " << constraintValue1[i] << " " <<  constraintOp[i] << " " << constraintValue2[i] << " Iteration1 " << iteration1 << " Iteration2 " << iteration2 << endl;

     for (unsigned int j = 0; j < namesValues1[variableNames1[i]].size(); j++){
    	 //Raquel: added this if to check only the last time point
         //if(j==namesValues1[variableNames1[i]].size()-1){
    	 //if found the desired time point

    	 for(unsigned int k = 0; k < namesValues2[variableNames2[i]].size(); k++){
    		 //if we reach the correct time point/iteration specified by the user

    		 if(namesValues1[variableNames1[0]][j] == iteration1 && namesValues2[variableNames2[0]][k] == iteration2){
        	 	 cout << "FOUND TIME POINT 1= " << iteration1 << " TIME POINT2= " << iteration2 << endl;
        	 	 cout << "MODEL 1 " << inputFile1 << endl;
        	 	 cout << "MODEL 2 " << inputFile2 << endl;
        	 	cout << "Original constraint: " << constraintValue1[i] << " " << constraintOp[i] << " " << constraintValue2[i] << endl;

        	 	 //cout << "FOUND LAST TIME POINT j= " << j << " value " << namesValues1[variableNames1[0]][j] << endl;
        	 	 //cout << namesValues[constraintValue1[i]][j] << " " << constraintOp[i] << " " << namesValues[constraintValue2[i]][j];

        	 	 //if both constraint values belong to observables (are not explicit numbers)
        	 	 if(constraintValue1[i].find_first_not_of("-01234567890.") != string::npos && constraintValue2[i].find_first_not_of("-01234567890.") != string::npos){

        		 	 result = constraintFunction(namesValues1[constraintValue1[i]][j], constraintOp[i], namesValues2[constraintValue2[i]][j]);
            	 	 cout << "Constraint values: " << namesValues1[constraintValue1[i]][j] << " " << constraintOp[i] << " " << namesValues2[constraintValue2[i]][j] << endl;
            	 	 // (expected_value/(constraint_diff+expected_value))
            	 	 if(result==0){
            	 		 constraintDist = sqrt( pow( ( namesValues2[constraintValue2[i]][j]-namesValues1[constraintValue1[i]][j] ), 2) );
            	 		 result=( namesValues2[constraintValue2[i]][j] / (constraintDist + namesValues2[constraintValue2[i]][j]) );

            	 	 }


        	 	 }else if(constraintValue1[i].find_first_not_of("-01234567890.") != string::npos && constraintValue2[i].find_first_not_of("-01234567890.") == string::npos){

        	 		 result = constraintFunction(namesValues1[constraintValue1[i]][j], constraintOp[i], atof(constraintValue2[i].c_str()));
            	 	 cout << "Constraint values: " << namesValues1[constraintValue1[i]][j] << " " << constraintOp[i] << " " << atof(constraintValue2[i].c_str()) << endl;
            	 	 if(result==0){
            	 		 constraintDist = sqrt( pow( ( atof(constraintValue2[i].c_str())-namesValues1[constraintValue1[i]][j] ), 2) );
            	 		 result=( atof(constraintValue2[i].c_str()) / (constraintDist + atof(constraintValue2[i].c_str()) ) );

            	 	 }
        	 	 }else if(constraintValue1[i].find_first_not_of("-01234567890.") == string::npos && constraintValue2[i].find_first_not_of("-01234567890.") != string::npos){

        		 	 result = constraintFunction(atof(constraintValue1[i].c_str()), constraintOp[i], namesValues2[constraintValue2[i]][j]);
            	 	 cout << "Constraint values: " << atof(constraintValue1[i].c_str()) << " " << constraintOp[i] << " " << namesValues2[constraintValue2[i]][j] << endl;

            	 	 if(result==0){
            	 		 constraintDist = sqrt( pow( ( namesValues2[constraintValue2[i]][j]-atof(constraintValue1[i].c_str()) ), 2) );
            	 		 result=( namesValues2[constraintValue2[i]][j] / (constraintDist + namesValues2[constraintValue2[i]][j]) );

            	 	 }
        	 	 }else if(constraintValue1[i].find_first_not_of("-01234567890.") == string::npos && constraintValue2[i].find_first_not_of("-01234567890.") == string::npos){

        		 	 cout << "ERROR can't find any constraint value in the observable list!!!" << endl;
        		 	 cout << "constraint value 1: " << constraintValue1[i] << "constraint value 2: " << constraintValue2[i] << endl;

        	 	 }

        	 	 cout << "RESULT=" << result << endl;
        	 //cout << " = " << result << "; iteration = " << j << " constraints = " << constraintValue1[i] << constraintOp[i] << constraintValue2[i] << endl;

        	 	 if(result<=1 && result>0){

        	 		 fulfilledConstrants+=result;

        	 		 if(result<1){
        	 		    constraintDistC+=constraintDist*0.05;
        	 		 }

        	 		 if(result==1){
            	 		 consList.push_back(constraintValue1[i]+constraintOp[i]+constraintValue2[i]);
            	 		 //outFile << constraintValue1[i]<< constraintOp[i] << constraintValue2[i]<< " " << ;

        	 		 }
        	 		 result = 0;
        	 		 constraintDist = 0;
        	 	 }else{
        	 		 cout << "ERROR invalid constraint result: " << result << endl;
        	 		 result = 0;
        	 		 constraintDist=0;
        	 	 }
        	 	 if( (variableNames1[0]=="time" || variableNames1[0]=="Time") && first==0){
        	 		 //cout << namesValues1[variableNames1[0]][j] << "\t";
        	 		 outFile << namesValues1[variableNames1[0]][j] << "\t";
        	 		 first = 1;
        	 	 }else{
        	 		 if(first==0){
        	 			 outFile << j+1 << "\t";
        		 	 	 first = 1;
        	 		 }
        	 		 //cout << j+1 << "\t";

        	 	 }
        	 	 cout << constraintValue1[i] << constraintOp[i] << constraintValue2[i] << "\t";
        	 	 cout << result <<endl; //old mode
        	 	 outFile << constraintValue1[i] << constraintOp[i] << constraintValue2[i] << "\t"; //old mode
        	 	 outFile << result << endl; //old mode




         	 }


    	 }

     }




 }

 outFile << fulfilledConstrants << "\t";

 for (unsigned int i = 0; i<consList.size(); i++){

	 outFile << consList[i] << "\t";


 }
 	 outFile << constraintDistC << endl;

 	consList.clear();


 outFile.close();


//namesValues[variableNames[i]][count]

  return fulfilledConstrants;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x8f8, %rsp            # imm = 0x8F8
movss %xmm1, 0x68(%rsp)
movss %xmm0, 0x6c(%rsp)
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, 0x180(%rsp)
movq %rdi, 0x188(%rsp)
leaq 0x6f0(%rsp), %rdi
callq 0x28b30
leaq 0x4e8(%rsp), %rdi
callq 0x28b30
leaq 0x2e8(%rsp), %rdi
callq 0x29240
leaq 0x2e8(%rsp), %rdi
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x28490
leaq 0x6f0(%rsp), %rdi
pushq $0x8
popq %rdx
movq 0x188(%rsp), %rsi
callq 0x288d0
leaq 0x4e8(%rsp), %rdi
pushq $0x8
popq %rdx
movq 0x180(%rsp), %rsi
callq 0x288d0
andl $0x0, 0x10(%rsp)
andq $0x0, 0x50(%rsp)
xorps %xmm0, %xmm0
andq $0x0, 0x30(%rsp)
movaps %xmm0, 0x40(%rsp)
andq $0x0, 0xc0(%rsp)
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0xa0(%rsp)
movaps %xmm0, 0xb0(%rsp)
andq $0x0, 0x120(%rsp)
movaps %xmm0, 0x90(%rsp)
andq $0x0, 0xe0(%rsp)
movaps %xmm0, 0x110(%rsp)
andq $0x0, 0x100(%rsp)
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0xf0(%rsp)
leaq 0x2b8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x1e8(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x1b8(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x74710(%rip), %rsi     # 0xdbeb3
leaq 0x248(%rsp), %rdi
leaq 0x158(%rsp), %rdx
callq 0x33402
leaq 0x168(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq 0x238(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
xorl %edx, %edx
movb %dl, (%rax)
movb %dl, (%rcx)
leaq 0x768(%rsp), %rdi
callq 0x28200
testb %al, %al
je 0x6792b
leaq 0x560(%rsp), %rdi
callq 0x28200
testb %al, %al
je 0x67934
movq %r14, %rax
movq 0x18(%r14), %r13
addq $0x8, %rax
movq %rax, 0x8(%rsp)
leaq 0x158(%rsp), %rbp
leaq 0x248(%rsp), %r12
leaq 0x70(%rsp), %r15
cmpq 0x8(%rsp), %r13
je 0x67a37
leaq 0x28(%r13), %rsi
movq %rbp, %rdi
callq 0x28570
movq %rbp, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x28930
movq %rax, %rbx
movq %r15, %rdi
movq %rbp, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x28a90
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x5ec8c
movq %r15, %rdi
callq 0x295a0
movq %rbp, %rdi
movq %r12, %rsi
pushq $-0x1
popq %rdx
callq 0x29090
movq %rax, %r12
leaq 0x1(%rax), %rdx
movq %r15, %rdi
movq %rbp, %rsi
pushq $-0x1
popq %rcx
callq 0x28a90
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x5ec8c
movq %r15, %rdi
callq 0x295a0
subq %rbx, %r12
jne 0x678e3
movq %r15, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
pushq $0x1
popq %rcx
callq 0x28a90
leaq 0x248(%rsp), %r12
leaq 0xb0(%rsp), %rdi
movq %r15, %rsi
callq 0x5ec8c
jmp 0x6790f
incq %r12
movq %r15, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0x28a90
leaq 0xb0(%rsp), %rdi
movq %r15, %rsi
callq 0x5ec8c
leaq 0x248(%rsp), %r12
movq %r15, %rdi
callq 0x295a0
incl 0x10(%rsp)
movq %r13, %rdi
callq 0x28700
movq %rax, %r13
jmp 0x6782f
leaq 0x74586(%rip), %rsi     # 0xdbeb8
jmp 0x6793b
leaq 0x745aa(%rip), %rsi     # 0xdbee5
movq 0xfe656(%rip), %rdi     # 0x165f98
callq 0x289f0
movss 0x74549(%rip), %xmm0    # 0xdbe98
movss %xmm0, 0x14(%rsp)
leaq 0x228(%rsp), %rdi
callq 0x295a0
leaq 0x158(%rsp), %rdi
callq 0x295a0
leaq 0x248(%rsp), %rdi
callq 0x295a0
leaq 0x1b0(%rsp), %rdi
callq 0x69144
leaq 0x1e0(%rsp), %rdi
callq 0x69144
leaq 0x2a8(%rsp), %rdi
callq 0x295a0
leaq 0xf0(%rsp), %rdi
callq 0x3355a
leaq 0xd0(%rsp), %rdi
callq 0x3355a
leaq 0x110(%rsp), %rdi
callq 0x3355a
leaq 0x90(%rsp), %rdi
callq 0x3355a
leaq 0xb0(%rsp), %rdi
callq 0x3355a
leaq 0x20(%rsp), %rdi
callq 0x3355a
leaq 0x40(%rsp), %rdi
callq 0x3355a
leaq 0x2e8(%rsp), %rdi
callq 0x28f10
leaq 0x4e8(%rsp), %rdi
callq 0x28230
leaq 0x6f0(%rsp), %rdi
callq 0x28230
movss 0x14(%rsp), %xmm0
addq $0x8f8, %rsp            # imm = 0x8F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xfe55a(%rip), %rdi     # 0x165f98
leaq 0x744cd(%rip), %rsi     # 0xdbf12
callq 0x289f0
movq %rax, %rdi
callq 0x284a0
leaq 0x6f0(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0x28180
leaq 0x70(%rsp), %rdi
leaq 0x158(%rsp), %rsi
pushq $0x20
popq %rdx
callq 0x67468
leaq 0x90(%rsp), %rbx
leaq 0x70(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6230a
movq %r14, %rdi
callq 0x3355a
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
movq %rax, %rcx
subq %rsi, %rcx
cmpq $0x21, %rcx
jae 0x67afb
leaq 0x70(%rsp), %rdi
leaq 0x158(%rsp), %rsi
pushq $0x9
popq %rdx
callq 0x67468
leaq 0x90(%rsp), %rbx
leaq 0x70(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6230a
movq %r14, %rdi
callq 0x3355a
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
movq %rax, %rcx
subq %rsi, %rcx
cmpq $0x21, %rcx
jb 0x67e35
xorl %ebp, %ebp
leaq 0x90(%rsp), %rbx
leaq 0x6e587(%rip), %r14     # 0xd6093
movl %ebp, %r15d
subq %rsi, %rax
sarq $0x5, %rax
cmpq %r15, %rax
jbe 0x67b62
shlq $0x5, %r15
cmpq $0x0, 0x8(%rsi,%r15)
je 0x67b41
addq %r15, %rsi
movq %rsi, %rdi
movq %r14, %rsi
callq 0x3357b
testb %al, %al
je 0x67b4e
movq 0x90(%rsp), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x6908a
decl %ebp
incl %ebp
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rax
jmp 0x67b0c
xorl %eax, %eax
leaq 0x158(%rsp), %r12
leaq 0x70(%rsp), %r15
leaq 0x743fc(%rip), %r13     # 0xdbf74
leaq 0x1e0(%rsp), %rbx
leaq 0x10(%rsp), %r14
movl %eax, 0x10(%rsp)
leaq 0x6f0(%rsp), %rdi
movq %r12, %rsi
callq 0x28180
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x67d83
movq %r15, %rdi
movq %r12, %rsi
pushq $0x20
popq %rdx
callq 0x67468
leaq 0x110(%rsp), %rdi
movq %r15, %rsi
callq 0x6230a
movq %r15, %rdi
callq 0x3355a
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rax
movq %rax, %rcx
subq %rsi, %rcx
cmpq $0x21, %rcx
jae 0x67c33
movq %r15, %rdi
movq %r12, %rsi
pushq $0x9
popq %rdx
callq 0x67468
leaq 0x110(%rsp), %rdi
movq %r15, %rsi
callq 0x6230a
movq %r15, %rdi
callq 0x3355a
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rax
movq %rax, %rcx
subq %rsi, %rcx
cmpq $0x21, %rcx
jb 0x67e35
xorl %ebp, %ebp
movl %ebp, %ecx
movq %rax, %rdx
subq %rsi, %rdx
sarq $0x5, %rdx
cmpq %rcx, %rdx
jbe 0x67c78
shlq $0x5, %rcx
cmpq $0x0, 0x8(%rsi,%rcx)
jne 0x67c74
addq %rcx, %rsi
leaq 0x110(%rsp), %rdi
callq 0x6908a
decl %ebp
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rax
incl %ebp
jmp 0x67c35
xorl %ebp, %ebp
movl %ebp, %ebp
movq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq %rbp, %rax
jbe 0x67d70
movq %rbp, %r12
shlq $0x5, %r12
addq %r12, %rdi
movq %r13, %rsi
callq 0x33990
testb %al, %al
jne 0x67d03
movq 0x90(%rsp), %rdi
addq %r12, %rdi
leaq 0x6f650(%rip), %rsi     # 0xd7314
callq 0x33990
testb %al, %al
jne 0x67d03
movq 0x90(%rsp), %rdi
addq %r12, %rdi
leaq 0x67aeb(%rip), %rsi     # 0xcf7ca
callq 0x33990
testb %al, %al
jne 0x67d03
movq 0x90(%rsp), %rdi
addq %r12, %rdi
leaq 0x74284(%rip), %rsi     # 0xdbf7e
callq 0x33990
testb %al, %al
je 0x67d69
movq 0x110(%rsp), %rsi
addq %r12, %rsi
movq %r15, %rdi
callq 0x28dd0
leaq 0x228(%rsp), %rdi
movq %r15, %rsi
callq 0x28c40
movq %r15, %rdi
callq 0x295a0
movq 0x228(%rsp), %rdi
callq 0x28c70
movsd %xmm0, 0x8(%rsp)
addq 0x90(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x69090
movq %rax, %rdi
movq %r14, %rsi
callq 0x690f6
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
incl %ebp
jmp 0x67c7a
movl 0x10(%rsp), %eax
incl %eax
leaq 0x158(%rsp), %r12
jmp 0x67b85
leaq 0x6f0(%rsp), %rdi
callq 0x281c0
leaq 0x4e8(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0x28180
leaq 0x70(%rsp), %rdi
leaq 0x158(%rsp), %rsi
pushq $0x20
popq %rdx
callq 0x67468
leaq 0xd0(%rsp), %rbx
leaq 0x70(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6230a
movq %r14, %rdi
callq 0x3355a
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
movq %rax, %rcx
subq %rsi, %rcx
cmpq $0x21, %rcx
jae 0x67e55
leaq 0x70(%rsp), %rdi
leaq 0x158(%rsp), %rsi
pushq $0x9
popq %rdx
callq 0x67468
leaq 0xd0(%rsp), %rbx
leaq 0x70(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6230a
movq %r14, %rdi
callq 0x3355a
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
movq %rax, %rcx
subq %rsi, %rcx
cmpq $0x21, %rcx
jae 0x67e55
movq 0xfe15c(%rip), %rdi     # 0x165f98
leaq 0x740ee(%rip), %rsi     # 0xdbf31
callq 0x289f0
movq %rax, %rdi
callq 0x284a0
jmp 0x67947
xorl %ebp, %ebp
leaq 0xd0(%rsp), %rbx
leaq 0x6e22d(%rip), %r14     # 0xd6093
movl %ebp, %r15d
subq %rsi, %rax
sarq $0x5, %rax
cmpq %r15, %rax
jbe 0x67ebc
shlq $0x5, %r15
cmpq $0x0, 0x8(%rsi,%r15)
je 0x67e9b
addq %r15, %rsi
movq %rsi, %rdi
movq %r14, %rsi
callq 0x3357b
testb %al, %al
je 0x67ea8
movq 0xd0(%rsp), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x6908a
decl %ebp
incl %ebp
movq 0xd0(%rsp), %rsi
movq 0xd8(%rsp), %rax
jmp 0x67e66
xorl %eax, %eax
leaq 0x158(%rsp), %r12
leaq 0x70(%rsp), %r15
leaq 0x740a2(%rip), %r13     # 0xdbf74
leaq 0x1b0(%rsp), %rbx
leaq 0x10(%rsp), %r14
movl %eax, 0x10(%rsp)
leaq 0x4e8(%rsp), %rdi
movq %r12, %rsi
callq 0x28180
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x680a7
movq %r15, %rdi
movq %r12, %rsi
pushq $0x20
popq %rdx
callq 0x67468
leaq 0xf0(%rsp), %rdi
movq %r15, %rsi
callq 0x6230a
movq %r15, %rdi
callq 0x3355a
movq 0xf0(%rsp), %rsi
movq 0xf8(%rsp), %rax
movq %rax, %rcx
subq %rsi, %rcx
cmpq $0x21, %rcx
jae 0x67f8d
movq %r15, %rdi
movq %r12, %rsi
pushq $0x9
popq %rdx
callq 0x67468
leaq 0xf0(%rsp), %rdi
movq %r15, %rsi
callq 0x6230a
movq %r15, %rdi
callq 0x3355a
movq 0xf0(%rsp), %rsi
movq 0xf8(%rsp), %rax
movq %rax, %rcx
subq %rsi, %rcx
cmpq $0x20, %rcx
jbe 0x67e35
xorl %ebp, %ebp
movl %ebp, %ecx
movq %rax, %rdx
subq %rsi, %rdx
sarq $0x5, %rdx
cmpq %rcx, %rdx
jbe 0x67fd2
shlq $0x5, %rcx
cmpq $0x0, 0x8(%rsi,%rcx)
jne 0x67fce
addq %rcx, %rsi
leaq 0xf0(%rsp), %rdi
callq 0x6908a
decl %ebp
movq 0xf0(%rsp), %rsi
movq 0xf8(%rsp), %rax
incl %ebp
jmp 0x67f8f
xorl %ebp, %ebp
movl %ebp, %ebp
movq 0xd0(%rsp), %rdi
movq 0xd8(%rsp), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq %rbp, %rax
jbe 0x68094
movq %rbp, %r12
shlq $0x5, %r12
addq %r12, %rdi
movq %r13, %rsi
callq 0x33990
testb %al, %al
jne 0x68027
movq 0xd0(%rsp), %rdi
addq %r12, %rdi
leaq 0x6f2f6(%rip), %rsi     # 0xd7314
callq 0x33990
testb %al, %al
je 0x6808d
movq 0xf0(%rsp), %rsi
addq %r12, %rsi
movq %r15, %rdi
callq 0x28dd0
leaq 0x228(%rsp), %rdi
movq %r15, %rsi
callq 0x28c40
movq %r15, %rdi
callq 0x295a0
movq 0x228(%rsp), %rdi
callq 0x28c70
movsd %xmm0, 0x8(%rsp)
addq 0xd0(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x69090
movq %rax, %rdi
movq %r14, %rsi
callq 0x690f6
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
incl %ebp
jmp 0x67fd4
movl 0x10(%rsp), %eax
incl %eax
leaq 0x158(%rsp), %r12
jmp 0x67edf
leaq 0x4e8(%rsp), %rdi
callq 0x281c0
xorps %xmm0, %xmm0
movaps %xmm0, 0x190(%rsp)
andq $0x0, 0x1a0(%rsp)
leaq 0x73eaf(%rip), %rsi     # 0xdbf7e
leaq 0x2e8(%rsp), %rdi
callq 0x289f0
leaq 0x6cb1d(%rip), %rsi     # 0xd4c00
movq %rax, %rdi
callq 0x289f0
leaq 0x73e91(%rip), %rsi     # 0xdbf83
movq %rax, %rdi
callq 0x289f0
movq %rax, %rdi
callq 0x284a0
cvtss2sd 0x6c(%rsp), %xmm0
movsd %xmm0, 0x220(%rsp)
cvtss2sd 0x68(%rsp), %xmm0
movsd %xmm0, 0x218(%rsp)
movq $0x0, 0xe8(%rsp)
leaq 0x70(%rsp), %rbp
xorps %xmm0, %xmm0
movss %xmm0, 0x64(%rsp)
movss %xmm0, 0x14(%rsp)
xorl %ebx, %ebx
movl %ebx, %ebx
movq 0x48(%rsp), %rax
subq 0x40(%rsp), %rax
sarq $0x5, %rax
cmpq %rbx, %rax
jbe 0x68de8
movq 0xfde36(%rip), %rdi     # 0x165f98
leaq 0x73e30(%rip), %rsi     # 0xdbf99
callq 0x289f0
movq %rbx, %r12
shlq $0x5, %r12
movq 0x40(%rsp), %rsi
addq %r12, %rsi
movq %rax, %rdi
callq 0x28910
movq %rax, %rdi
leaq 0x7747e(%rip), %rsi     # 0xdf60d
callq 0x289f0
movq 0xb0(%rsp), %rsi
addq %r12, %rsi
movq %rax, %rdi
callq 0x28910
movq %rax, %rdi
leaq 0x7745c(%rip), %rsi     # 0xdf60d
callq 0x289f0
movq 0x20(%rsp), %rsi
addq %r12, %rsi
movq %rax, %rdi
callq 0x28910
movq %rax, %rdi
leaq 0x73de8(%rip), %rsi     # 0xdbfb8
callq 0x289f0
movq %rax, %rdi
movss 0x6c(%rsp), %xmm0
callq 0x28780
movq %rax, %rdi
leaq 0x73dd8(%rip), %rsi     # 0xdbfc5
callq 0x289f0
movq %rax, %rdi
movss 0x68(%rsp), %xmm0
callq 0x28780
movq %rax, %rdi
callq 0x284a0
movq %rbx, 0x210(%rsp)
xorl %ebx, %ebx
movq 0x90(%rsp), %rsi
addq %r12, %rsi
leaq 0x1e0(%rsp), %rdi
callq 0x69090
movl %ebx, %ecx
cmpq %rcx, 0x28(%rax)
jbe 0x68dd9
leal 0x1(%rbx), %eax
movq %rax, 0x178(%rsp)
xorl %r15d, %r15d
movq 0xd0(%rsp), %rsi
addq %r12, %rsi
leaq 0x1b0(%rsp), %rdi
callq 0x69090
movl %r15d, %ecx
cmpq %rcx, 0x28(%rax)
jbe 0x68dcc
movq 0x90(%rsp), %rsi
leaq 0x1e0(%rsp), %rdi
callq 0x69090
movl %ebx, 0x70(%rsp)
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5a0c0
movsd (%rax), %xmm0
ucomisd 0x220(%rsp), %xmm0
jne 0x68d51
jp 0x68d51
movq 0xd0(%rsp), %rsi
leaq 0x1b0(%rsp), %rdi
callq 0x69090
movl %r15d, 0x138(%rsp)
movq %rax, %rdi
leaq 0x138(%rsp), %rsi
callq 0x5a0c0
movsd (%rax), %xmm0
ucomisd 0x218(%rsp), %xmm0
jne 0x68d51
jp 0x68d51
movq 0xfdca5(%rip), %rdi     # 0x165f98
leaq 0x73cd8(%rip), %rsi     # 0xdbfd2
callq 0x289f0
movq %rax, %rdi
movss 0x6c(%rsp), %xmm0
callq 0x28780
movq %rax, %rdi
leaq 0x73cd0(%rip), %rsi     # 0xdbfe7
callq 0x289f0
movq %rax, %rdi
movss 0x68(%rsp), %xmm0
callq 0x28780
movq %rax, %rdi
callq 0x284a0
movq 0xfdc5f(%rip), %rdi     # 0x165f98
leaq 0x73cb6(%rip), %rsi     # 0xdbff6
callq 0x289f0
movq %rax, %rdi
movq 0x188(%rsp), %rsi
callq 0x28910
movq %rax, %rdi
callq 0x284a0
movq 0xfdc34(%rip), %rdi     # 0x165f98
leaq 0x73c94(%rip), %rsi     # 0xdbfff
callq 0x289f0
movq %rax, %rdi
movq 0x180(%rsp), %rsi
callq 0x28910
movq %rax, %rdi
callq 0x284a0
movq 0xfdc09(%rip), %rdi     # 0x165f98
leaq 0x73c72(%rip), %rsi     # 0xdc008
callq 0x289f0
movq 0x40(%rsp), %rsi
addq %r12, %rsi
movq %rax, %rdi
callq 0x28910
movq %rax, %rdi
leaq 0x77258(%rip), %rsi     # 0xdf60d
callq 0x289f0
movq 0xb0(%rsp), %rsi
addq %r12, %rsi
movq %rax, %rdi
callq 0x28910
movq %rax, %rdi
leaq 0x77236(%rip), %rsi     # 0xdf60d
callq 0x289f0
movq 0x20(%rsp), %rsi
addq %r12, %rsi
movq %rax, %rdi
callq 0x28910
movq %rax, %rdi
callq 0x284a0
movq 0x40(%rsp), %rdi
addq %r12, %rdi
leaq 0x73c1b(%rip), %r14     # 0xdc01e
movq %r14, %rsi
xorl %edx, %edx
callq 0x285e0
cmpq $-0x1, %rax
je 0x6865f
movq 0x20(%rsp), %rdi
addq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x285e0
cmpq $-0x1, %rax
je 0x6865f
movq 0x40(%rsp), %rsi
addq %r12, %rsi
leaq 0x1e0(%rsp), %rdi
callq 0x69090
movl %ebx, 0x70(%rsp)
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5a0c0
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0xb0(%rsp), %rsi
addq %r12, %rsi
leaq 0x288(%rsp), %rdi
callq 0x28dd0
movq 0x20(%rsp), %rsi
addq %r12, %rsi
leaq 0x1b0(%rsp), %rdi
callq 0x69090
movl %ebx, 0x138(%rsp)
movq %rax, %rdi
leaq 0x138(%rsp), %rsi
callq 0x5a0c0
movsd (%rax), %xmm1
movsd 0x8(%rsp), %xmm0
leaq 0x288(%rsp), %r13
movq %r13, %rdi
callq 0x67531
movl %eax, %r14d
movq %r13, %rdi
callq 0x295a0
movq 0xfdac7(%rip), %rdi     # 0x165f98
leaq 0x73b54(%rip), %rsi     # 0xdc02c
callq 0x289f0
movq %rax, %r13
movq 0x40(%rsp), %rsi
addq %r12, %rsi
leaq 0x1e0(%rsp), %rdi
callq 0x69090
movl %ebx, 0x70(%rsp)
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5a0c0
movsd (%rax), %xmm0
movq %r13, %rdi
callq 0x290f0
movq %rax, %rdi
leaq 0x770f3(%rip), %rsi     # 0xdf60d
callq 0x289f0
movq 0xb0(%rsp), %rsi
addq %r12, %rsi
movq %rax, %rdi
callq 0x28910
movq %rax, %rdi
leaq 0x770d1(%rip), %rsi     # 0xdf60d
callq 0x289f0
movq %rax, %r13
movq 0x20(%rsp), %rsi
addq %r12, %rsi
leaq 0x1b0(%rsp), %rdi
callq 0x69090
movl %ebx, 0x138(%rsp)
movq %rax, %rdi
leaq 0x138(%rsp), %rsi
callq 0x5a0c0
movsd (%rax), %xmm0
movq %r13, %rdi
callq 0x290f0
movq %rax, %rdi
callq 0x284a0
testl %r14d, %r14d
jne 0x68a0d
movq 0x20(%rsp), %rsi
addq %r12, %rsi
leaq 0x1b0(%rsp), %rdi
callq 0x69090
movl %ebx, 0x70(%rsp)
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5a0c0
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x40(%rsp), %rsi
addq %r12, %rsi
leaq 0x1e0(%rsp), %rdi
callq 0x69090
movl %ebx, 0x138(%rsp)
movq %rax, %rdi
leaq 0x138(%rsp), %rsi
callq 0x5a0c0
movsd 0x8(%rsp), %xmm0
subsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x20(%rsp), %rsi
addq %r12, %rsi
leaq 0x1b0(%rsp), %rdi
callq 0x69090
movl %ebx, 0x70(%rsp)
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5a0c0
movsd (%rax), %xmm0
movsd %xmm0, 0x130(%rsp)
movq 0x20(%rsp), %rsi
addq %r12, %rsi
leaq 0x1b0(%rsp), %rdi
callq 0x69090
movl %ebx, 0x138(%rsp)
movq %rax, %rdi
leaq 0x138(%rsp), %rsi
callq 0x5a0c0
movsd 0x8(%rsp), %xmm0
jmp 0x688cd
movq 0x40(%rsp), %rdi
addq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x285e0
cmpq $-0x1, %rax
je 0x68693
movq 0x20(%rsp), %rdi
addq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x285e0
cmpq $-0x1, %rax
je 0x688fd
movq 0x40(%rsp), %rdi
addq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x285e0
cmpq $-0x1, %rax
je 0x686f4
movq 0x40(%rsp), %rdi
addq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x285e0
xorps %xmm0, %xmm0
movss %xmm0, 0x18(%rsp)
cmpq $-0x1, %rax
jne 0x68a97
movq 0x20(%rsp), %rdi
addq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x285e0
cmpq $-0x1, %rax
je 0x68d59
xorps %xmm0, %xmm0
jmp 0x68a97
movq 0x20(%rsp), %rdi
addq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x285e0
cmpq $-0x1, %rax
je 0x686ab
movq 0x40(%rsp), %rax
movq (%rax,%r12), %rdi
callq 0x28c70
movsd %xmm0, 0x8(%rsp)
movq 0xb0(%rsp), %rsi
addq %r12, %rsi
leaq 0x268(%rsp), %rdi
callq 0x28dd0
movq 0x20(%rsp), %rsi
addq %r12, %rsi
leaq 0x1b0(%rsp), %rdi
callq 0x69090
movl %ebx, 0x70(%rsp)
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5a0c0
movsd (%rax), %xmm1
movsd 0x8(%rsp), %xmm0
leaq 0x268(%rsp), %r13
movq %r13, %rdi
callq 0x67531
movl %eax, %r14d
movq %r13, %rdi
callq 0x295a0
movq 0xfd810(%rip), %rdi     # 0x165f98
leaq 0x7389d(%rip), %rsi     # 0xdc02c
callq 0x289f0
movq %rax, %r13
movq 0x40(%rsp), %rax
movq (%rax,%r12), %rdi
callq 0x28c70
movq %r13, %rdi
callq 0x290f0
movq %rax, %rdi
leaq 0x76e56(%rip), %rsi     # 0xdf60d
callq 0x289f0
movq 0xb0(%rsp), %rsi
addq %r12, %rsi
movq %rax, %rdi
callq 0x28910
movq %rax, %rdi
leaq 0x76e34(%rip), %rsi     # 0xdf60d
callq 0x289f0
movq %rax, %r13
movq 0x20(%rsp), %rsi
addq %r12, %rsi
leaq 0x1b0(%rsp), %rdi
callq 0x69090
movl %ebx, 0x70(%rsp)
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5a0c0
movsd (%rax), %xmm0
movq %r13, %rdi
callq 0x290f0
movq %rax, %rdi
callq 0x284a0
testl %r14d, %r14d
jne 0x68a0d
movq 0x20(%rsp), %rsi
addq %r12, %rsi
leaq 0x1b0(%rsp), %rdi
callq 0x69090
movl %ebx, 0x70(%rsp)
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5a0c0
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x40(%rsp), %rax
movq (%rax,%r12), %rdi
callq 0x28c70
movsd %xmm0, 0x18(%rsp)
movq 0x20(%rsp), %rsi
addq %r12, %rsi
leaq 0x1b0(%rsp), %rdi
callq 0x69090
movl %ebx, 0x70(%rsp)
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5a0c0
movsd (%rax), %xmm0
movsd %xmm0, 0x130(%rsp)
movq 0x20(%rsp), %rsi
addq %r12, %rsi
leaq 0x1b0(%rsp), %rdi
callq 0x69090
movl %ebx, 0x138(%rsp)
movq %rax, %rdi
leaq 0x138(%rsp), %rsi
callq 0x5a0c0
movsd 0x8(%rsp), %xmm0
subsd 0x18(%rsp), %xmm0
mulsd %xmm0, %xmm0
sqrtsd %xmm0, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x18(%rsp)
cvtss2sd %xmm0, %xmm0
addsd (%rax), %xmm0
movsd 0x130(%rsp), %xmm1
divsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm0
jmp 0x68a97
movq 0x40(%rsp), %rsi
addq %r12, %rsi
leaq 0x1e0(%rsp), %rdi
callq 0x69090
movl %ebx, 0x70(%rsp)
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5a0c0
leaq 0x2c8(%rsp), %r13
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0xb0(%rsp), %rsi
addq %r12, %rsi
movq %r13, %rdi
callq 0x28dd0
movq 0x20(%rsp), %rax
movq (%rax,%r12), %rdi
callq 0x28c70
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
movq %r13, %rdi
callq 0x67531
movl %eax, %r14d
movq %r13, %rdi
callq 0x295a0
movq 0xfd621(%rip), %rdi     # 0x165f98
leaq 0x736ae(%rip), %rsi     # 0xdc02c
callq 0x289f0
movq %rax, %r13
movq 0x40(%rsp), %rsi
addq %r12, %rsi
leaq 0x1e0(%rsp), %rdi
callq 0x69090
movl %ebx, 0x70(%rsp)
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5a0c0
movsd (%rax), %xmm0
movq %r13, %rdi
callq 0x290f0
movq %rax, %rdi
leaq 0x76c4d(%rip), %rsi     # 0xdf60d
callq 0x289f0
movq 0xb0(%rsp), %rsi
addq %r12, %rsi
movq %rax, %rdi
callq 0x28910
movq %rax, %rdi
leaq 0x76c2b(%rip), %rsi     # 0xdf60d
callq 0x289f0
movq %rax, %r13
movq 0x20(%rsp), %rax
movq (%rax,%r12), %rdi
callq 0x28c70
movq %r13, %rdi
callq 0x290f0
movq %rax, %rdi
callq 0x284a0
testl %r14d, %r14d
je 0x68a23
cvtsi2ss %r14d, %xmm0
movss %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x18(%rsp)
jmp 0x68a9d
movq 0x20(%rsp), %rax
movq (%rax,%r12), %rdi
callq 0x28c70
movsd %xmm0, 0x8(%rsp)
movq 0x40(%rsp), %rsi
addq %r12, %rsi
leaq 0x1e0(%rsp), %rdi
callq 0x69090
movl %ebx, 0x70(%rsp)
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5a0c0
movsd 0x8(%rsp), %xmm0
subsd (%rax), %xmm0
mulsd %xmm0, %xmm0
sqrtsd %xmm0, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq (%rax,%r12), %rdi
callq 0x28c70
cvtss2sd 0x18(%rsp), %xmm1
addsd %xmm0, %xmm1
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x8(%rsp)
movq 0xfd4f4(%rip), %rdi     # 0x165f98
leaq 0x735ff(%rip), %rsi     # 0xdc0aa
callq 0x289f0
movq %rax, %rdi
movss 0x8(%rsp), %xmm0
callq 0x28780
movq %rax, %rdi
callq 0x284a0
movss 0x733ca(%rip), %xmm0    # 0xdbe98
movss 0x8(%rsp), %xmm1
ucomiss %xmm1, %xmm0
jb 0x68ba2
ucomiss 0x733b8(%rip), %xmm1    # 0xdbe9c
jbe 0x68ba2
movss 0x733a6(%rip), %xmm0    # 0xdbe98
ucomiss %xmm1, %xmm0
jbe 0x68b19
cvtss2sd 0x18(%rsp), %xmm0
cvtss2sd 0x64(%rsp), %xmm1
mulsd 0x73395(%rip), %xmm0    # 0xdbea0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x64(%rsp)
movq %rbp, %r14
movss 0x14(%rsp), %xmm0
movss 0x8(%rsp), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x14(%rsp)
ucomiss 0x7335f(%rip), %xmm1    # 0xdbe98
jne 0x68bcb
jp 0x68bcb
movq 0x40(%rsp), %rsi
addq %r12, %rsi
movq 0xb0(%rsp), %rdx
addq %r12, %rdx
leaq 0x138(%rsp), %r13
movq %r13, %rdi
callq 0x34fc8
movq 0x20(%rsp), %rdx
addq %r12, %rdx
movq %r14, %rdi
movq %r13, %rsi
callq 0x334ce
leaq 0x190(%rsp), %rdi
movq %r14, %rsi
callq 0x5ec8c
movq %r14, %rdi
callq 0x295a0
leaq 0x138(%rsp), %rdi
callq 0x295a0
jmp 0x68bcb
movq 0xfd3ef(%rip), %rdi     # 0x165f98
leaq 0x73502(%rip), %rsi     # 0xdc0b2
callq 0x289f0
movq %rax, %rdi
movss 0x8(%rsp), %xmm0
callq 0x28780
movq %rax, %rdi
callq 0x284a0
movq 0x90(%rsp), %rdi
leaq 0x66bf0(%rip), %rsi     # 0xcf7ca
callq 0x3357b
testb %al, %al
je 0x68bf3
cmpl $0x0, 0xe8(%rsp)
jne 0x68c8a
jmp 0x68c16
movq 0x90(%rsp), %rdi
leaq 0x7337c(%rip), %rsi     # 0xdbf7e
callq 0x3357b
cmpl $0x0, 0xe8(%rsp)
sete %cl
testb %cl, %al
je 0x68c5c
movq 0x90(%rsp), %rsi
leaq 0x1e0(%rsp), %rdi
callq 0x69090
movl %ebx, 0x70(%rsp)
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5a0c0
movsd (%rax), %xmm0
leaq 0x2e8(%rsp), %rdi
callq 0x290f0
movq %rax, %rdi
leaq 0x6bfab(%rip), %rsi     # 0xd4c00
callq 0x289f0
jmp 0x68c8a
cmpl $0x0, 0xe8(%rsp)
jne 0x68c8a
leaq 0x2e8(%rsp), %rdi
movq 0x178(%rsp), %rsi
callq 0x286e0
movq %rax, %rdi
leaq 0x6bf7b(%rip), %rsi     # 0xd4c00
callq 0x289f0
movq 0x40(%rsp), %rsi
addq %r12, %rsi
movq 0xfd2ff(%rip), %rdi     # 0x165f98
callq 0x28910
movq 0xb0(%rsp), %rsi
addq %r12, %rsi
movq %rax, %rdi
callq 0x28910
movq 0x20(%rsp), %rsi
addq %r12, %rsi
movq %rax, %rdi
callq 0x28910
movq %rax, %rdi
leaq 0x6bf35(%rip), %rsi     # 0xd4c00
callq 0x289f0
xorps %xmm0, %xmm0
movq 0xfd2be(%rip), %rdi     # 0x165f98
callq 0x290f0
movq %rax, %rdi
callq 0x284a0
movq 0x40(%rsp), %rsi
addq %r12, %rsi
leaq 0x2e8(%rsp), %rdi
callq 0x28910
movq 0xb0(%rsp), %rsi
addq %r12, %rsi
movq %rax, %rdi
callq 0x28910
movq 0x20(%rsp), %rsi
addq %r12, %rsi
movq %rax, %rdi
callq 0x28910
movq %rax, %rdi
leaq 0x6bed7(%rip), %rsi     # 0xd4c00
callq 0x289f0
xorps %xmm0, %xmm0
leaq 0x2e8(%rsp), %rdi
callq 0x290f0
movq %rax, %rdi
callq 0x284a0
pushq $0x1
popq %rax
movq %rax, 0xe8(%rsp)
incl %r15d
jmp 0x68244
movq 0xfd238(%rip), %rdi     # 0x165f98
leaq 0x732d9(%rip), %rsi     # 0xdc040
callq 0x289f0
movq %rax, %rdi
callq 0x284a0
movq 0xfd21d(%rip), %rdi     # 0x165f98
leaq 0x732fe(%rip), %rsi     # 0xdc080
callq 0x289f0
movq 0x40(%rsp), %rsi
addq %r12, %rsi
movq %rax, %rdi
callq 0x28910
movq %rax, %rdi
leaq 0x732f4(%rip), %rsi     # 0xdc095
callq 0x289f0
movq 0x20(%rsp), %rsi
addq %r12, %rsi
movq %rax, %rdi
callq 0x28910
movq %rax, %rdi
callq 0x284a0
xorps %xmm0, %xmm0
movss %xmm0, 0x8(%rsp)
jmp 0x68a9d
movq 0x178(%rsp), %rbx
jmp 0x68212
movq 0x210(%rsp), %rbx
incl %ebx
jmp 0x68142
leaq 0x2e8(%rsp), %rdi
movss 0x14(%rsp), %xmm0
callq 0x28780
leaq 0x6bdfe(%rip), %rsi     # 0xd4c00
movq %rax, %rdi
callq 0x289f0
xorl %r15d, %r15d
leaq 0x2e8(%rsp), %rbx
leaq 0x6bde4(%rip), %r14     # 0xd4c00
movl %r15d, %r15d
movq 0x190(%rsp), %rsi
movq 0x198(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %r15, %rax
jbe 0x68e5d
movq %r15, %rax
shlq $0x5, %rax
addq %rax, %rsi
movq %rbx, %rdi
callq 0x28910
movq %rax, %rdi
movq %r14, %rsi
callq 0x289f0
incl %r15d
jmp 0x68e1c
leaq 0x2e8(%rsp), %rdi
movss 0x64(%rsp), %xmm0
callq 0x28780
movq %rax, %rdi
callq 0x284a0
leaq 0x190(%rsp), %rdi
callq 0x3376e
leaq 0x2e8(%rsp), %rdi
callq 0x28e60
leaq 0x190(%rsp), %rdi
callq 0x3355a
jmp 0x67955
jmp 0x68f94
jmp 0x68f94
jmp 0x68f94
jmp 0x68f94
jmp 0x68fa7
jmp 0x68f94
movq %rax, %rbx
jmp 0x68fde
movq %rax, %rbx
jmp 0x69067
movq %rax, %rbx
jmp 0x69074
jmp 0x68f94
jmp 0x68f94
jmp 0x68f94
jmp 0x68f94
jmp 0x68f94
jmp 0x68fa7
movq %rax, %rbx
jmp 0x6905a
jmp 0x68f94
jmp 0x68f94
jmp 0x68f1f
jmp 0x68f1f
jmp 0x68f94
jmp 0x68f94
jmp 0x68f94
jmp 0x68f94
jmp 0x68f1f
jmp 0x68f94
jmp 0x68f94
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x295a0
jmp 0x68fb7
jmp 0x68fa7
jmp 0x68fa7
jmp 0x68fa7
jmp 0x68f94
jmp 0x68fa7
jmp 0x68fa7
jmp 0x68fa7
jmp 0x68f94
jmp 0x68f94
jmp 0x68f45
movq %rax, %rbx
leaq 0x268(%rsp), %rdi
jmp 0x68f8d
jmp 0x68fa7
jmp 0x68fa7
jmp 0x68f94
jmp 0x68f94
jmp 0x68fa7
jmp 0x68fa7
jmp 0x68fa7
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x295a0
jmp 0x68f72
movq %rax, %rbx
leaq 0x138(%rsp), %rdi
jmp 0x68f8d
jmp 0x68fa7
jmp 0x68fa7
jmp 0x68f82
movq %rax, %rbx
leaq 0x288(%rsp), %rdi
callq 0x295a0
jmp 0x68faa
movq %rax, %rbx
jmp 0x68fb7
jmp 0x68fa7
jmp 0x68fa7
jmp 0x68fa7
jmp 0x68fa7
jmp 0x68fa7
jmp 0x68fa7
jmp 0x68fa7
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x3355a
leaq 0x228(%rsp), %rdi
callq 0x295a0
leaq 0x158(%rsp), %rdi
callq 0x295a0
leaq 0x248(%rsp), %rdi
callq 0x295a0
leaq 0x1b0(%rsp), %rdi
callq 0x69144
leaq 0x1e0(%rsp), %rdi
callq 0x69144
leaq 0x2a8(%rsp), %rdi
callq 0x295a0
leaq 0xf0(%rsp), %rdi
callq 0x3355a
leaq 0xd0(%rsp), %rdi
callq 0x3355a
leaq 0x110(%rsp), %rdi
callq 0x3355a
leaq 0x90(%rsp), %rdi
callq 0x3355a
leaq 0xb0(%rsp), %rdi
callq 0x3355a
leaq 0x20(%rsp), %rdi
callq 0x3355a
leaq 0x40(%rsp), %rdi
callq 0x3355a
leaq 0x2e8(%rsp), %rdi
callq 0x28f10
leaq 0x4e8(%rsp), %rdi
callq 0x28230
leaq 0x6f0(%rsp), %rdi
callq 0x28230
movq %rbx, %rdi
callq 0x292f0
nop