// File: /workspace/github_cpp_makefile_star2_O3/Luthaf[P]zeopp/network.cc
// Function: getStructureInformation(char*, char*, ATOM_NETWORK*, bool)
void getStructureInformation(char *filename, char *filenameExtendedOutput, ATOM_NETWORK *atmnet, bool extendedOutput){

 // to speed up calculations, identify atoms on the "surface" of the unit cell 

 vector <int> surfaceIDs;
 vector <bool> surfaceFlag;

 double surface_slab_d = 2.5; // cutoff distance from the surface 

 double a_step = surface_slab_d/atmnet->a;
 double b_step = surface_slab_d/atmnet->b;
 double c_step = surface_slab_d/atmnet->c;

 surfaceFlag.resize(atmnet->atoms.size(), false);

 if(a_step>=1.0 || b_step>=1.0 || c_step>=1.0)
   {//no speed up
   for(unsigned int i = 0; i < atmnet->atoms.size(); i++) 
      {
      surfaceIDs.push_back(i);
      surfaceFlag.at(i) = true;
      };
   cout << "Small unit cell. All(" << atmnet->atoms.size() << ") atoms considered to be on the unit cell surface." << endl;
   }else
   {
   for(unsigned int i = 0; i < atmnet->atoms.size(); i++)
      {
      double a = atmnet->atoms.at(i).a_coord; double b = atmnet->atoms.at(i).b_coord; double c = atmnet->atoms.at(i).c_coord;

      if(a < a_step || a > (1-a_step) || b < b_step || b > (1-b_step) || c < c_step || c > (1-c_step) )
        {
        surfaceIDs.push_back(i); surfaceFlag.at(i) = true;
        };
      };
   cout << "Big unit cell. " << surfaceIDs.size() << " out of " << atmnet->atoms.size() << " atoms considered to be on the unit cell surface. Surface definition = " << surface_slab_d << endl;
   };



 // Define connectivity of atoms in terms of Dijkstra graph
 DIJKSTRA_NETWORK DijkstraAtomNetwork;
 DijkstraAtomNetwork.v_a = atmnet->v_a;  DijkstraAtomNetwork.v_b = atmnet->v_b; DijkstraAtomNetwork.v_c = atmnet->v_c;

 for(unsigned int i = 0; i < atmnet->atoms.size(); i++)
    {
    DijkstraAtomNetwork.nodes.push_back(DIJKSTRA_NODE(i, atmnet->atoms.at(i).x, atmnet->atoms.at(i).y, atmnet->atoms.at(i).z,
                                                           lookupCovRadius(atmnet->atoms.at(i).type), true));
    };
 // now need to update CONN connections for each node

 for(unsigned int i = 0; i < DijkstraAtomNetwork.nodes.size(); i++)
    {
    XYZ atom1(DijkstraAtomNetwork.nodes.at(i).x, DijkstraAtomNetwork.nodes.at(i).y, DijkstraAtomNetwork.nodes.at(i).z);
// CONN(int myFrom, int myTo, double len, double maxR, DELTA_POS deltaP);
// DELTA_POS(int myX = 0, int myY = 0, int myZ = 0);

    for(int x=-1; x<2; x++) // loop over all unit cells
    for(int y=-1; y<2; y++)
    for(int z=-1; z<2; z++)
       {
       if(x==0 && y==0 && z==0)
         { // connectivity inside cell
         for(unsigned int j = i+1; j < DijkstraAtomNetwork.nodes.size(); j++)
            {
            XYZ atom2(DijkstraAtomNetwork.nodes.at(j).x, DijkstraAtomNetwork.nodes.at(j).y, DijkstraAtomNetwork.nodes.at(j).z);
            XYZ va = DijkstraAtomNetwork.v_a; XYZ vb = DijkstraAtomNetwork.v_b; XYZ vc = DijkstraAtomNetwork.v_c;
            atom2 = atom2 + va.scale(x) + vb.scale(y) + vc.scale(z);
            double dist = calcEuclideanDistance(atom1.x, atom1.y, atom1.z, atom2.x, atom2.y, atom2.z);
            if(dist < DijkstraAtomNetwork.nodes.at(i).max_radius + DijkstraAtomNetwork.nodes.at(j).max_radius + 0.4)
               { // connected;
               DijkstraAtomNetwork.nodes.at(i).connections.push_back(CONN(i, j, dist, 0.10, DELTA_POS (x,y,z)));
               DijkstraAtomNetwork.nodes.at(j).connections.push_back(CONN(j, i, dist, 0.10, DELTA_POS (x,y,z)));
               };
            };
         }else
         { // connectivity outside cell
         if(surfaceFlag.at(i) == true) // only investigate if surface atom (other will not have a chance to be connected)
           {
           for(unsigned int k = 0; k < surfaceIDs.size(); k++)
              {
              unsigned int j = surfaceIDs.at(k);

              XYZ atom2(DijkstraAtomNetwork.nodes.at(j).x, DijkstraAtomNetwork.nodes.at(j).y, DijkstraAtomNetwork.nodes.at(j).z);
              XYZ va = DijkstraAtomNetwork.v_a; XYZ vb = DijkstraAtomNetwork.v_b; XYZ vc = DijkstraAtomNetwork.v_c; 
              atom2 = atom2 + va.scale(x) + vb.scale(y) + vc.scale(z);

              double dist = calcEuclideanDistance(atom1.x, atom1.y, atom1.z, atom2.x, atom2.y, atom2.z);
              if(dist < DijkstraAtomNetwork.nodes.at(i).max_radius + DijkstraAtomNetwork.nodes.at(j).max_radius + 0.4)
                 { // connected
                 DijkstraAtomNetwork.nodes.at(i).connections.push_back(CONN(i, j, dist, 0.10, DELTA_POS (x,y,z)));
                 };
              }; // ends loop over k
            }; // ends surfaceFlag.at(i) if

        }; // end loop over cells outside the central cell
       }; //ends loop over supercell (x,y,z)
    };


 // Find frameworks
 vector<bool> accessInfo;
 vector<PORE> structureSegments;
 PORE::findChannelsAndPockets(&DijkstraAtomNetwork, &accessInfo, &structureSegments);

 // Save output
 fstream output;
 output.open(filename, fstream::out);
 int nPockets=0, nChan1D=0, nChan2D=0, nChan3D=0;
 for(unsigned int i = 0; i < structureSegments.size(); i++){
    if(structureSegments[i].dimensionality == 0) nPockets++;
    if(structureSegments[i].dimensionality == 1) nChan1D++;
    if(structureSegments[i].dimensionality == 2) nChan2D++;
    if(structureSegments[i].dimensionality == 3) nChan3D++;
    };
 output << filename << "   "<< atmnet->returnChemicalFormula() << "   " << structureSegments.size() << " segments: " << (structureSegments.size() - nPockets) << " framework(s) (1D/2D/3D " 
        << nChan1D << " " << nChan2D << " " << nChan3D
        << " ) and  "  << nPockets << "  molecule(s). Identified dimensionality of framework(s): ";
 for(unsigned int i = 0; i < structureSegments.size(); i++){
    if(structureSegments[i].dimensionality > 0 ) output << structureSegments[i].dimensionality << " ";
    };
 output << "\n";
 output.close();

 // Save extended output: coordinates with framework and molecule ID


// original function
/*
 if(extendedOutput == true)
   {
   fstream output2;
   output2.open(filenameExtendedOutput, fstream::out);

   for(unsigned int i = 0; i < structureSegments.size(); i++)
      {
      for(unsigned int j = 0; j< structureSegments[i].reverseIDMappings.size(); j++)
         {
         int atomID = structureSegments[i].reverseIDMappings.find(j)->second;
         output2 << atmnet->atoms.at(atomID).type << "    ";
//         output2 << atmnet->atoms.at(atomID).x << "   " << atmnet->atoms.at(atomID).y << "   "
//                 << atmnet->atoms.at(atomID).z << "   " ;
         output2 << structureSegments[i].nodes.at(j).x << "   " << structureSegments[i].nodes.at(j).y << "  "
                 << structureSegments[i].nodes.at(j).z << "   ";
         output2 << atmnet->atoms.at(atomID).a_coord << "   "
                 << atmnet->atoms.at(atomID).b_coord << "   " << atmnet->atoms.at(atomID).c_coord << "   "
                 << structureSegments[i].dimensionality << "   " << i << "   ";
         output2 << structureSegments[i].unitCells.size();
         output2 << "\n";
         };
      };

   output2 << "#Center of mass information(XYZ coords, no atoms, ABC coordinates, and radii)\n";
   for(unsigned int i = 0; i < structureSegments.size(); i++)
      {
      pair <XYZ,double> COM = structureSegments[i].getCenterOfMass();
      Point p(COM.first.x, COM.first.y, COM.first.z);
      Point pabc = atmnet->xyz_to_abc(atmnet->shiftXYZInUC(p));
      output2 << "X    " << COM.first.x << "  " << COM.first.y << "  " << COM.first.z << "      ";
      output2 << structureSegments[i].nodes.size() << "    ";
      output2 << pabc[0] << "  " << pabc[1] << "  " << pabc[2] << "     ";
      output2 << i << "  " << 2.0*(COM.second-1.5) << "\n";   // 1.5 stands for average radii of atoms
                                                              // 2.0 multiplyer to convert to diameters
      };

   output2.close();
   };
*/


/* Analysis of cages ONLY 
 * for Ismael  */
/*
 if(extendedOutput == true)
   {
   fstream output2;
   output2.open(filenameExtendedOutput, fstream::out);

   for(unsigned int i = 0; i < structureSegments.size(); i++)
      {
      if(structureSegments[i].dimensionality == 0)
        {
        vector < pair <int,XYZ> > cageReconstructedCoords = structureSegments[i].getReconstructedPore();
        
        for(unsigned int j = 0; j< structureSegments[i].reverseIDMappings.size(); j++)
           {
           int atomID = structureSegments[i].reverseIDMappings.find((cageReconstructedCoords.at(j).first))->second;
           output2 << atmnet->atoms.at(atomID).type << "    ";
           output2 << atmnet->atoms.at(atomID).x << "   " << atmnet->atoms.at(atomID).y << "   "
                   << atmnet->atoms.at(atomID).z << "   " ;
           output2 << atmnet->atoms.at(atomID).radius << "   ";
           output2 << structureSegments[i].nodes.at(j).x << "   " << structureSegments[i].nodes.at(j).y << "  "
                   << structureSegments[i].nodes.at(j).z << "   ";
*/
/* DEBUG
           output2 << atmnet->atoms.at(atomID).a_coord << "   "
                   << atmnet->atoms.at(atomID).b_coord << "   " << atmnet->atoms.at(atomID).c_coord << "   "
                   << structureSegments[i].dimensionality << "   " << i << "   ";
         output2 << structureSegments[i].unitCells.size();
*/
/*
           output2 << cageReconstructedCoords.at(j).second.x << "  " << cageReconstructedCoords.at(j).second.y << "  "
                   << cageReconstructedCoords.at(j).second.z << "  ";
          output2 << "  " << i << "  ";
          output2 << "\n";
            };
         };
      };


   output2.close();
   };
*/

 /* Alternative version of the above, which saves multiple copies of molecules that cross boundry */
//getReconstructredPoresWithCrossBoundryCopies

 if(extendedOutput == true)
   {
   fstream output2;
   output2.open(filenameExtendedOutput, fstream::out);

   for(unsigned int i = 0; i < structureSegments.size(); i++)
      {
      if(structureSegments[i].dimensionality == 0)
        {
        vector< vector < pair <int,XYZ> > > cagesMultipleCopiesReconstructedCoords = structureSegments[i].getReconstructredPoresWithCrossBoundryCopies();

        vector < pair <int,int> > cageBonds;

        for(unsigned int m = 0; m < cagesMultipleCopiesReconstructedCoords[0].size(); m++)
           for(unsigned int n = m + 1; n < cagesMultipleCopiesReconstructedCoords[0].size(); n++)
              {
              int atomID1 = structureSegments[i].reverseIDMappings.find((cagesMultipleCopiesReconstructedCoords[0].at(m).first))->second;
              int atomID2 = structureSegments[i].reverseIDMappings.find((cagesMultipleCopiesReconstructedCoords[0].at(n).first))->second;

              if(cagesMultipleCopiesReconstructedCoords[0].at(m).second.euclid_dist(cagesMultipleCopiesReconstructedCoords[0].at(n).second)
                     < ( lookupCovRadius(atmnet->atoms.at(atomID1).type) + lookupCovRadius(atmnet->atoms.at(atomID2).type) + 0.45 ))
                     {
                     cageBonds.push_back(pair <int,int> (m,n));
                     //if(i==28) cout << m << "   " << n << endl;
                     };
              };
//        cout << "Molecule: " << i << " Atoms: " << cagesMultipleCopiesReconstructedCoords[0].size() << " Bonds: " << cageBonds.size() << endl;

        for(unsigned int k = 0; k< cagesMultipleCopiesReconstructedCoords.size(); k++)
           {
           /* beging loop over all atoms/to be saved in frmaid format */
/*
           for(unsigned int j = 0; j< structureSegments[i].reverseIDMappings.size(); j++)
              {
              int atomID = structureSegments[i].reverseIDMappings.find((cagesMultipleCopiesReconstructedCoords[k].at(j).first))->second;
              output2 << atmnet->atoms.at(atomID).type << "    ";
              output2 << atmnet->atoms.at(atomID).x << "   " << atmnet->atoms.at(atomID).y << "   "
                      << atmnet->atoms.at(atomID).z << "   " ;
              output2 << atmnet->atoms.at(atomID).radius << "   ";
              output2 << structureSegments[i].nodes.at(j).x << "   " << structureSegments[i].nodes.at(j).y << "  "
                      << structureSegments[i].nodes.at(j).z << "   ";
              output2 << cagesMultipleCopiesReconstructedCoords[k].at(j).second.x << "  " << cagesMultipleCopiesReconstructedCoords[k].at(j).second.y << "  "
                   << cagesMultipleCopiesReconstructedCoords[k].at(j).second.z << "  ";
              output2 << "  " << i << "  " << k << " ";
              output2 << "\n";
              };
 */
           /* ends saving file in frameid format */

           /* beging loop over all atoms in SDF format */

           /* SDF header */
           output2 << i << endl;
           output2 << "Zeomolecule" << endl << endl;
           output2 << "  " << structureSegments[i].reverseIDMappings.size() << " " << cageBonds.size() << " 0     0  0  0  0  0  0999 V2000\n"; 
           for(unsigned int j = 0; j< structureSegments[i].reverseIDMappings.size(); j++)
              {
              int atomID = structureSegments[i].reverseIDMappings.find((cagesMultipleCopiesReconstructedCoords[k].at(j).first))->second;
              output2 << "    ";
              output2 << cagesMultipleCopiesReconstructedCoords[k].at(j).second.x << "  " << cagesMultipleCopiesReconstructedCoords[k].at(j).second.y << "  "
                   << cagesMultipleCopiesReconstructedCoords[k].at(j).second.z << "  ";
              output2 << atmnet->atoms.at(atomID).type << "   0  0  0  0  0  0  0  0  0  0  0  0\n";
              };
           for(unsigned int k = 0; k < cageBonds.size(); k++)
              {
              output2 << cageBonds[k].first << "  " << cageBonds[k].second << " 1 0 0 0 0\n" ;
              };
           output2 << "M  END\n$$$$\n";  
           /* ends saving file in SDF format */

           }; // ends for loop over copies of the segment i (each molecule)
         }; // ends if(structureSegments[i].dimensionality == 0)
      };


   output2.close();
   };




/* Save additional atom statistics */
/*
 if(extendedOutput == true)
   {
   fstream output2;
   output2.open(filenameExtendedOutput, fstream::out);


   int nMetals=0, nCs=0, nHs=0;
   std::map<std::string,int> metalmap;

//  mymap['a']="an element";
   for(unsigned int i=0; i < atmnet->atoms.size(); i++)
      {
      if(atmnet->atoms.at(i).type == "C") nCs++;
      if(atmnet->atoms.at(i).type == "H") nHs++;
      if(isMetal(atmnet->atoms.at(i).type) == true) 
        {
        nMetals++;
        if(metalmap[atmnet->atoms.at(i).type] == 0) metalmap[atmnet->atoms.at(i).type] =1;
         else metalmap[atmnet->atoms.at(i).type] = metalmap[atmnet->atoms.at(i).type] +1;
        };
      };

   output2 << filename << "    nCs: " << nCs << "  nHs: " << nHs << "  nMetals: " << nMetals << " nMetalTypes: " << metalmap.size() << "  ";

   std::map<std::string,int>::iterator it;
   for(it=metalmap.begin(); it!=metalmap.end(); ++it)
      {
      output2 << "  " << (*it).first << " " << (*it).second; 
      };


//   for(auto& x: metalmap) {
//      output2 << "  "  << x.first << " " << x.second;
//      };


   output2 << "\n";
   output2.close();
   };
*/

/* quick fix for Greg */
/*
 cout << "Running experimetnal pruning for Greg, uncomment this routine after use !!!!!!!!!!\n";
 if(extendedOutput == true)
   {
   fstream output2;
   output2.open(filenameExtendedOutput, fstream::out);

   output2 << "Processing: " << filenameExtendedOutput << "\n";
   output2 << "Unit_cell: " << atmnet->a <<"  " <<  atmnet->b <<"  " <<  atmnet->c << "  "
           << atmnet->alpha << "  " << atmnet->beta << "   " << atmnet->gamma << "\n";

   for(unsigned int i = 0; i < structureSegments.size(); i++)
      {
      if(structureSegments[i].dimensionality>2) 
      {
      for(unsigned int j = 0; j< structureSegments[i].reverseIDMappings.size(); j++)
         {
         int atomID = structureSegments[i].reverseIDMappings.find(j)->second;
         output2 << atmnet->atoms.at(atomID).type << "    ";
         output2 << atmnet->atoms.at(atomID).a_coord << "   "
                 << atmnet->atoms.at(atomID).b_coord << "   " << atmnet->atoms.at(atomID).c_coord << "\n";
         };
      };

      };

   output2.close();
   };
*/
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x6f8, %rsp            # imm = 0x6F8
movl %ecx, 0xf8(%rsp)
movq %rsi, 0x208(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
xorl %ecx, %ecx
movq %rcx, 0x70(%rsp)
leaq 0x1e0(%rsp), %rax
movq %rcx, (%rax)
movl %ecx, 0x8(%rax)
movq %rcx, 0x10(%rax)
movl %ecx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movsd 0x1436ee(%rip), %xmm0   # 0x14d050
divsd 0x8(%rdx), %xmm0
movsd %xmm0, (%rsp)
movq %rdi, 0xe8(%rsp)
movq 0x2f8(%rdx), %rsi
subq 0x2f0(%rdx), %rsi
movq %rdx, 0x18(%rsp)
movupd 0x10(%rdx), %xmm0
movapd %xmm0, 0xc0(%rsp)
sarq $0x3, %rsi
movabsq $-0x79435e50d79435e5, %rcx # imm = 0x86BCA1AF286BCA1B
imulq %rcx, %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0xedc8
movsd (%rsp), %xmm0
ucomisd 0x14369a(%rip), %xmm0   # 0x14d058
movq 0x18(%rsp), %rcx
movq 0x2f0(%rcx), %rax
movq 0x2f8(%rcx), %rcx
jae 0x9bee
movapd 0x1436e1(%rip), %xmm1   # 0x14d0c0
divpd 0xc0(%rsp), %xmm1
ucomisd 0x143668(%rip), %xmm1   # 0x14d058
jae 0x9bee
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
ucomisd 0x143652(%rip), %xmm0   # 0x14d058
jae 0x9bee
movapd %xmm1, 0xd0(%rsp)
cmpq %rax, %rcx
je 0x9b35
movsd 0x143632(%rip), %xmm0   # 0x14d058
subsd (%rsp), %xmm0
movsd %xmm0, 0xc0(%rsp)
movapd 0x143694(%rip), %xmm0   # 0x14d0d0
subpd 0xd0(%rsp), %xmm0
movapd %xmm0, 0xb0(%rsp)
movl $0x1, %r13d
xorl %r12d, %r12d
leaq 0x60(%rsp), %rbx
leaq 0x2d8(%rsp), %r14
leaq 0x1e0(%rsp), %r15
imulq $0x98, %r12, %rdx
movsd 0x18(%rax,%rdx), %xmm0
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x9abe
ucomisd 0xc0(%rsp), %xmm0
ja 0x9abe
movupd 0x20(%rax,%rdx), %xmm0
movapd 0xb0(%rsp), %xmm1
cmpltpd %xmm0, %xmm1
cmpltpd 0xd0(%rsp), %xmm0
orpd %xmm1, %xmm0
movmskpd %xmm0, %edx
testb $0x1, %dl
jne 0x9abe
shrb %dl
je 0x9b0e
leal -0x1(%r13), %eax
movl %eax, 0x2d8(%rsp)
movq 0x68(%rsp), %rsi
cmpq 0x70(%rsp), %rsi
je 0x9ae2
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x68(%rsp)
jmp 0x9aed
movq %rbx, %rdi
movq %r14, %rdx
callq 0x14198
movq %r15, %rdi
movq %r12, %rsi
callq 0xee36
orq %rdx, (%rax)
movq 0x18(%rsp), %rcx
movq 0x2f0(%rcx), %rax
movq 0x2f8(%rcx), %rcx
movl %r13d, %r12d
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x79435e50d79435e5, %rsi # imm = 0x86BCA1AF286BCA1B
imulq %rsi, %rdx
incl %r13d
cmpq %r12, %rdx
ja 0x9a6c
movq 0x18b484(%rip), %rdi    # 0x194fc0
leaq 0x143861(%rip), %rsi    # 0x14d3a4
movl $0xf, %edx
callq 0x44e0
movq 0x68(%rsp), %rsi
subq 0x60(%rsp), %rsi
sarq $0x2, %rsi
movq 0x18b45e(%rip), %rdi    # 0x194fc0
callq 0x42b0
movq %rax, %rbx
leaq 0x148093(%rip), %rsi    # 0x151c04
movl $0x8, %edx
movq %rax, %rdi
callq 0x44e0
movq 0x18(%rsp), %rax
movq 0x2f8(%rax), %rsi
subq 0x2f0(%rax), %rsi
sarq $0x3, %rsi
movabsq $-0x79435e50d79435e5, %rax # imm = 0x86BCA1AF286BCA1B
imulq %rax, %rsi
movq %rbx, %rdi
callq 0x42b0
movq %rax, %rbx
leaq 0x1437ff(%rip), %rsi    # 0x14d3b4
movl $0x47, %edx
movq %rax, %rdi
callq 0x44e0
movsd 0x143486(%rip), %xmm0   # 0x14d050
movq %rbx, %rdi
callq 0x46b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4420
jmp 0x9ce3
cmpq %rax, %rcx
je 0x9c6f
xorl %ebx, %ebx
leaq 0x60(%rsp), %r14
leaq 0x2d8(%rsp), %r15
leaq 0x1e0(%rsp), %r12
movl %ebx, 0x2d8(%rsp)
movq 0x68(%rsp), %rsi
cmpq 0x70(%rsp), %rsi
je 0x9c2a
movl %ebx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x68(%rsp)
jmp 0x9c35
movq %r14, %rdi
movq %r15, %rdx
callq 0x14198
movq %r12, %rdi
movq %rbx, %rsi
callq 0xee36
orq %rdx, (%rax)
movq 0x18(%rsp), %rcx
movq 0x2f8(%rcx), %rax
subq 0x2f0(%rcx), %rax
incl %ebx
sarq $0x3, %rax
movabsq $-0x79435e50d79435e5, %rcx # imm = 0x86BCA1AF286BCA1B
imulq %rcx, %rax
cmpq %rbx, %rax
ja 0x9c0a
movq 0x18b34a(%rip), %rdi    # 0x194fc0
leaq 0x1436de(%rip), %rsi    # 0x14d35b
movl $0x15, %edx
callq 0x44e0
movq 0x18(%rsp), %rax
movq 0x2f8(%rax), %rsi
subq 0x2f0(%rax), %rsi
sarq $0x3, %rsi
movabsq $-0x79435e50d79435e5, %rax # imm = 0x86BCA1AF286BCA1B
imulq %rax, %rsi
movq 0x18b30d(%rip), %rdi    # 0x194fc0
callq 0x42b0
movq %rax, %rbx
leaq 0x1436af(%rip), %rsi    # 0x14d371
movl $0x32, %edx
movq %rax, %rdi
callq 0x44e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4420
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42c0
leaq 0x180(%rsp), %rdi
callq 0x50b12
movq 0x18(%rsp), %rcx
movq 0x48(%rcx), %rax
movq %rax, 0x1a8(%rsp)
movups 0x38(%rcx), %xmm0
movups %xmm0, 0x198(%rsp)
movq 0x60(%rcx), %rax
movq %rax, 0x1c0(%rsp)
movups 0x50(%rcx), %xmm0
movups %xmm0, 0x1b0(%rsp)
movq 0x78(%rcx), %rax
movq %rax, 0x1d8(%rsp)
movupd 0x68(%rcx), %xmm0
movupd %xmm0, 0x1c8(%rsp)
movq 0x2f0(%rcx), %rax
cmpq %rax, 0x2f8(%rcx)
je 0x9e7e
xorl %ebx, %ebx
leaq 0x268(%rsp), %r13
leaq 0x258(%rsp), %r14
leaq 0x2d8(%rsp), %r15
leaq 0x180(%rsp), %r12
imulq $0x98, %rbx, %rcx
movsd (%rax,%rcx), %xmm0
movsd %xmm0, (%rsp)
movsd 0x8(%rax,%rcx), %xmm0
movsd %xmm0, 0xc0(%rsp)
movsd 0x10(%rax,%rcx), %xmm0
movsd %xmm0, 0xd0(%rsp)
movq %r13, 0x258(%rsp)
movq 0x40(%rax,%rcx), %rsi
movq 0x48(%rax,%rcx), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0xf3ce
movq %r14, %rdi
callq 0x22046
movapd %xmm0, %xmm3
movq %r15, %rdi
movl %ebx, %esi
movsd (%rsp), %xmm0
movsd 0xc0(%rsp), %xmm1
movq 0xd0(%rsp), %xmm2
movl $0x1, %edx
callq 0x50946
movq %r12, %rdi
movq %r15, %rsi
callq 0x14274
movq 0x2f8(%rsp), %rdi
testq %rdi, %rdi
je 0x9e2e
movq 0x308(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x258(%rsp), %rdi
cmpq %r13, %rdi
je 0x9e4b
movq 0x268(%rsp), %rsi
incq %rsi
callq 0x4470
incl %ebx
movq 0x18(%rsp), %rcx
movq 0x2f0(%rcx), %rax
movq 0x2f8(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x79435e50d79435e5, %rdx # imm = 0x86BCA1AF286BCA1B
imulq %rdx, %rcx
cmpq %rbx, %rcx
ja 0x9d88
movq 0x180(%rsp), %rax
cmpq %rax, 0x188(%rsp)
je 0xa686
leaq 0x198(%rsp), %r14
xorl %r13d, %r13d
movl $0x2, 0xa4(%rsp)
leaq 0x4e8(%rsp), %rdi
movq $0x0, 0xb0(%rsp)
leaq (,%r13,8), %rcx
addq %r13, %rcx
movsd 0x8(%rax,%rcx,8), %xmm0
movsd 0x10(%rax,%rcx,8), %xmm1
movq %rcx, 0xc0(%rsp)
movq 0x18(%rax,%rcx,8), %xmm2
callq 0x84364
movq 0xb0(%rsp), %rax
incl %eax
movq %rax, 0xf0(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %r13, 0xd0(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x210(%rsp)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %eax, 0xa8(%rsp)
movl %ecx, 0xac(%rsp)
movl %ecx, %edx
orl %eax, %edx
movl %edx, 0xfc(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd %xmm0, 0x218(%rsp)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl 0xfc(%rsp), %eax
orl %ebx, %eax
movl %ebx, 0x3c(%rsp)
je 0xa268
leaq 0x1e0(%rsp), %rdi
movq %r13, %rsi
callq 0xee36
testq %rdx, (%rax)
je 0xa601
movq 0x60(%rsp), %rax
cmpq %rax, 0x68(%rsp)
je 0xa601
xorps %xmm0, %xmm0
cvtsi2sdl 0x3c(%rsp), %xmm0
movsd %xmm0, 0x220(%rsp)
movl $0x1, %ebx
xorl %ecx, %ecx
movl (%rax,%rcx,4), %r12d
movq 0x180(%rsp), %rax
movq 0x188(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x71c71c71c71c71c7, %rcx # imm = 0x8E38E38E38E38E39
imulq %rcx, %rdx
cmpq %r12, %rdx
jbe 0xb21c
leaq (%r12,%r12,8), %r15
movsd 0x8(%rax,%r15,8), %xmm0
movsd 0x10(%rax,%r15,8), %xmm1
movq 0x18(%rax,%r15,8), %xmm2
leaq 0x100(%rsp), %rdi
callq 0x84364
movq 0x10(%r14), %rax
movq %rax, 0x30(%rsp)
movups (%r14), %xmm0
movaps %xmm0, 0x20(%rsp)
movq 0x28(%r14), %rax
movq %rax, 0x90(%rsp)
movups 0x18(%r14), %xmm0
movaps %xmm0, 0x80(%rsp)
movq 0x40(%r14), %rax
movq %rax, 0x50(%rsp)
movups 0x30(%r14), %xmm0
movaps %xmm0, 0x40(%rsp)
leaq 0x2c0(%rsp), %rbp
movq %rbp, %rdi
leaq 0x20(%rsp), %rsi
movsd 0x210(%rsp), %xmm0
callq 0x84416
leaq 0x278(%rsp), %rdi
leaq 0x100(%rsp), %rsi
movq %rbp, %rdx
callq 0x84642
leaq 0x2a8(%rsp), %rbp
movq %rbp, %rdi
leaq 0x80(%rsp), %rsi
movsd 0x218(%rsp), %xmm0
callq 0x84416
leaq 0x168(%rsp), %rdi
leaq 0x278(%rsp), %rsi
movq %rbp, %rdx
callq 0x84642
leaq 0x290(%rsp), %rbp
movq %rbp, %rdi
leaq 0x40(%rsp), %rsi
movsd 0x220(%rsp), %xmm0
callq 0x84416
leaq 0x2d8(%rsp), %rdi
leaq 0x168(%rsp), %rsi
movq %rbp, %rdx
callq 0x84642
movq 0x2e8(%rsp), %rax
movq %rax, 0x110(%rsp)
movups 0x2d8(%rsp), %xmm0
movaps %xmm0, 0x100(%rsp)
movsd 0x4e8(%rsp), %xmm0
movsd 0x4f0(%rsp), %xmm1
movq 0x4f8(%rsp), %xmm2
movsd 0x100(%rsp), %xmm3
movsd 0x108(%rsp), %xmm4
movsd 0x110(%rsp), %xmm5
callq 0x84cbb
movsd %xmm0, (%rsp)
movq 0x180(%rsp), %rax
movq 0x188(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x71c71c71c71c71c7, %rcx # imm = 0x8E38E38E38E38E39
imulq %rcx, %rdx
cmpq %r13, %rdx
jbe 0xb20b
cmpq %r12, %rdx
jbe 0xb208
movq 0xc0(%rsp), %rcx
leaq (%rax,%rcx,8), %r13
movsd 0x38(%r13), %xmm0
addsd 0x38(%rax,%r15,8), %xmm0
addsd 0x142ece(%rip), %xmm0   # 0x14d060
ucomisd (%rsp), %xmm0
jbe 0xa23d
leaq 0x228(%rsp), %rdi
movl 0xa8(%rsp), %esi
movl 0xac(%rsp), %edx
movl 0x3c(%rsp), %ecx
callq 0x506b0
movq 0x228(%rsp), %rcx
movl 0x230(%rsp), %r8d
leaq 0x2d8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movl %r12d, %edx
movsd (%rsp), %xmm0
movsd 0x142e7c(%rip), %xmm1   # 0x14d068
callq 0x5081a
movq 0x28(%r13), %rsi
cmpq 0x30(%r13), %rsi
je 0xa229
movq 0x2f8(%rsp), %rax
movq %rax, 0x20(%rsi)
movupd 0x2d8(%rsp), %xmm0
movupd 0x2e8(%rsp), %xmm1
movupd %xmm1, 0x10(%rsi)
movupd %xmm0, (%rsi)
addq $0x28, 0x28(%r13)
jmp 0xa23d
addq $0x20, %r13
movq %r13, %rdi
leaq 0x2d8(%rsp), %rdx
callq 0x144fc
movl %ebx, %ecx
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
incl %ebx
cmpq %rcx, %rdx
movq 0xd0(%rsp), %r13
ja 0x9f9f
jmp 0xa601
movq 0x180(%rsp), %rax
movq 0x188(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x71c71c71c71c71c7, %rdx # imm = 0x8E38E38E38E38E39
imulq %rdx, %rcx
cmpq 0xf0(%rsp), %rcx
jbe 0xa601
movl 0xa4(%rsp), %ecx
movl %ecx, %ebx
movq 0xf0(%rsp), %r12
leaq (%r12,%r12,8), %r15
movsd 0x8(%rax,%r15,8), %xmm0
movsd 0x10(%rax,%r15,8), %xmm1
movq 0x18(%rax,%r15,8), %xmm2
leaq 0x100(%rsp), %rdi
callq 0x84364
movq 0x10(%r14), %rax
movq %rax, 0x30(%rsp)
movups (%r14), %xmm0
movaps %xmm0, 0x20(%rsp)
movq 0x28(%r14), %rax
movq %rax, 0x90(%rsp)
movups 0x18(%r14), %xmm0
movaps %xmm0, 0x80(%rsp)
movq 0x40(%r14), %rax
movq %rax, 0x50(%rsp)
movupd 0x30(%r14), %xmm0
movapd %xmm0, 0x40(%rsp)
xorpd %xmm0, %xmm0
leaq 0x2c0(%rsp), %rbp
movq %rbp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x84416
leaq 0x278(%rsp), %rdi
leaq 0x100(%rsp), %rsi
movq %rbp, %rdx
callq 0x84642
xorpd %xmm0, %xmm0
leaq 0x2a8(%rsp), %rbp
movq %rbp, %rdi
leaq 0x80(%rsp), %rsi
callq 0x84416
leaq 0x168(%rsp), %rdi
leaq 0x278(%rsp), %rsi
movq %rbp, %rdx
callq 0x84642
xorpd %xmm0, %xmm0
leaq 0x290(%rsp), %rbp
movq %rbp, %rdi
leaq 0x40(%rsp), %rsi
callq 0x84416
leaq 0x2d8(%rsp), %rdi
leaq 0x168(%rsp), %rsi
movq %rbp, %rdx
callq 0x84642
movq 0x2e8(%rsp), %rax
movq %rax, 0x110(%rsp)
movups 0x2d8(%rsp), %xmm0
movaps %xmm0, 0x100(%rsp)
movsd 0x4e8(%rsp), %xmm0
movsd 0x4f0(%rsp), %xmm1
movq 0x4f8(%rsp), %xmm2
movsd 0x100(%rsp), %xmm3
movsd 0x108(%rsp), %xmm4
movsd 0x110(%rsp), %xmm5
callq 0x84cbb
movsd %xmm0, (%rsp)
movq 0x180(%rsp), %rax
movq 0x188(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x71c71c71c71c71c7, %rcx # imm = 0x8E38E38E38E38E39
imulq %rcx, %rdx
cmpq %r13, %rdx
jbe 0xb22d
cmpq %r12, %rdx
jbe 0xb230
movq 0xc0(%rsp), %rcx
leaq (%rax,%rcx,8), %r13
movsd 0x38(%r13), %xmm0
addsd 0x38(%rax,%r15,8), %xmm0
addsd 0x142c00(%rip), %xmm0   # 0x14d060
ucomisd (%rsp), %xmm0
jbe 0xa5eb
leaq 0x248(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x506b0
leal -0x1(%rbx), %ebp
movq 0x248(%rsp), %rcx
movl 0x250(%rsp), %r8d
leaq 0x2d8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movl %ebp, %edx
movsd (%rsp), %xmm0
movsd 0x142bb8(%rip), %xmm1   # 0x14d068
callq 0x5081a
movq 0x28(%r13), %rsi
cmpq 0x30(%r13), %rsi
je 0xa4ed
movq 0x2f8(%rsp), %rax
movq %rax, 0x20(%rsi)
movupd 0x2d8(%rsp), %xmm0
movupd 0x2e8(%rsp), %xmm1
movupd %xmm1, 0x10(%rsi)
movupd %xmm0, (%rsi)
addq $0x28, 0x28(%r13)
jmp 0xa501
addq $0x20, %r13
movq %r13, %rdi
leaq 0x2d8(%rsp), %rdx
callq 0x144fc
movq 0x180(%rsp), %r13
movq 0x188(%rsp), %rdx
subq %r13, %rdx
sarq $0x3, %rdx
movabsq $-0x71c71c71c71c71c7, %rax # imm = 0x8E38E38E38E38E39
imulq %rax, %rdx
cmpq %r12, %rdx
jbe 0xb230
leaq 0x238(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x506b0
movq 0x238(%rsp), %rcx
movl 0x240(%rsp), %r8d
leaq 0x2d8(%rsp), %rdi
movl %ebp, %esi
movq 0xb0(%rsp), %rdx
movsd (%rsp), %xmm0
movsd 0x142af7(%rip), %xmm1   # 0x14d068
callq 0x5081a
leaq 0x20(,%r15,8), %rdi
addq %r13, %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0xa5b9
movq 0x2f8(%rsp), %rax
movq %rax, 0x20(%rsi)
movupd 0x2d8(%rsp), %xmm0
movupd 0x2e8(%rsp), %xmm1
movupd %xmm1, 0x10(%rsi)
movupd %xmm0, (%rsi)
addq $0x28, 0x8(%rdi)
jmp 0xa5c6
leaq 0x2d8(%rsp), %rdx
callq 0x144fc
movq 0x180(%rsp), %rax
movq 0x188(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x71c71c71c71c71c7, %rcx # imm = 0x8E38E38E38E38E39
imulq %rcx, %rdx
movl %ebx, %r12d
incl %ebx
cmpq %r12, %rdx
movq 0xd0(%rsp), %r13
ja 0xa2ac
movl 0x3c(%rsp), %ebx
incl %ebx
cmpl $0x2, %ebx
movl 0xac(%rsp), %ecx
jne 0x9f4a
incl %ecx
cmpl $0x2, %ecx
movl 0xa8(%rsp), %eax
jne 0x9f23
incl %eax
cmpl $0x2, %eax
jne 0x9f07
movq 0x180(%rsp), %rax
movq 0x188(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x71c71c71c71c71c7, %rdx # imm = 0x8E38E38E38E38E39
imulq %rdx, %rcx
incl 0xa4(%rsp)
movq 0xf0(%rsp), %rsi
movq %rsi, %r13
movl %esi, %edx
movq %rdx, 0xb0(%rsp)
cmpq %rsi, %rcx
leaq 0x4e8(%rsp), %rdi
ja 0x9ebe
xorl %eax, %eax
leaq 0x100(%rsp), %rsi
movq %rax, (%rsi)
movl %eax, 0x8(%rsi)
movq %rax, 0x10(%rsi)
movl %eax, 0x18(%rsi)
movq %rax, 0x20(%rsi)
leaq 0x20(%rsp), %rdx
movq %rax, 0x10(%rdx)
xorpd %xmm0, %xmm0
movapd %xmm0, (%rdx)
leaq 0x180(%rsp), %rdi
callq 0x6fe82
leaq 0x2d8(%rsp), %rdi
callq 0x4520
leaq 0x2d8(%rsp), %rdi
movq 0xe8(%rsp), %rsi
movl $0x10, %edx
callq 0x43d0
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rax, %rcx
je 0xa748
sarq $0x4, %rcx
movabsq $-0x79435e50d79435e5, %rdx # imm = 0x86BCA1AF286BCA1B
imulq %rdx, %rcx
addq $0x108, %rax            # imm = 0x108
pxor %xmm2, %xmm2
movl $0x1, %edx
movdqa 0x1429c2(%rip), %xmm0   # 0x14d0e0
movq 0xe8(%rsp), %r14
movd (%rax), %xmm1
pshufd $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0]
pcmpeqd %xmm0, %xmm1
psubd %xmm1, %xmm2
movl %edx, %esi
addq $0x130, %rax            # imm = 0x130
incl %edx
cmpq %rsi, %rcx
ja 0xa726
jmp 0xa754
pxor %xmm2, %xmm2
movq 0xe8(%rsp), %r14
movdqa %xmm2, (%rsp)
leaq 0x2e8(%rsp), %rbx
testq %r14, %r14
je 0xa77e
movq %r14, %rdi
callq 0x41e0
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x44e0
jmp 0xa79d
movq 0x2e8(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x308(%rsp,%rax), %esi
orl $0x1, %esi
callq 0x4710
leaq 0x142d3a(%rip), %rsi    # 0x14d4de
movl $0x3, %edx
movq %rbx, %rdi
callq 0x44e0
leaq 0x4e8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x54c6a
movq 0x4e8(%rsp), %rsi
movq 0x4f0(%rsp), %rdx
movq %rbx, %rdi
callq 0x44e0
movq %rax, %r14
leaq 0x142cf9(%rip), %rsi    # 0x14d4de
movl $0x3, %edx
movq %rax, %rdi
callq 0x44e0
movq 0x28(%rsp), %rsi
subq 0x20(%rsp), %rsi
sarq $0x4, %rsi
movabsq $-0x79435e50d79435e5, %rax # imm = 0x86BCA1AF286BCA1B
imulq %rax, %rsi
movq %r14, %rdi
callq 0x42b0
movq %rax, %r14
leaq 0x142bdc(%rip), %rsi    # 0x14d3fc
movl $0xb, %edx
movq %rax, %rdi
callq 0x44e0
movq 0x28(%rsp), %rsi
subq 0x20(%rsp), %rsi
sarq $0x4, %rsi
movabsq $-0x79435e50d79435e5, %rax # imm = 0x86BCA1AF286BCA1B
imulq %rax, %rsi
pshufd $0xff, (%rsp), %xmm0    # xmm0 = mem[3,3,3,3]
movd %xmm0, %ebp
movslq %ebp, %rax
subq %rax, %rsi
movq %r14, %rdi
callq 0x42b0
movq %rax, %r14
leaq 0x142b9d(%rip), %rsi    # 0x14d408
movl $0x18, %edx
movq %rax, %rdi
callq 0x44e0
movdqa (%rsp), %xmm0
movd %xmm0, %esi
movq %r14, %rdi
callq 0x4750
movq %rax, %r14
leaq 0x14ad43(%rip), %rsi    # 0x1555d6
movl $0x1, %edx
movq %rax, %rdi
callq 0x44e0
pshufd $0x55, (%rsp), %xmm0    # xmm0 = mem[1,1,1,1]
movd %xmm0, %esi
movq %r14, %rdi
callq 0x4750
movq %rax, %r14
leaq 0x14ad1a(%rip), %rsi    # 0x1555d6
movl $0x1, %edx
movq %rax, %rdi
callq 0x44e0
pshufd $0xee, (%rsp), %xmm0    # xmm0 = mem[2,3,2,3]
movd %xmm0, %esi
movq %r14, %rdi
callq 0x4750
movq %rax, %r14
leaq 0x142b3c(%rip), %rsi    # 0x14d421
movl $0x8, %edx
movq %rax, %rdi
callq 0x44e0
movq %r14, %rdi
movl %ebp, %esi
callq 0x4750
leaq 0x142b27(%rip), %rsi    # 0x14d42a
movl $0x3a, %edx
movq %rax, %rdi
callq 0x44e0
leaq 0x4f8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa931
movq 0x4f8(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
cmpq %rax, %rcx
je 0xa9a3
movl $0x1, %ebp
xorl %edx, %edx
leaq 0x14ac88(%rip), %r14    # 0x1555d6
imulq $0x130, %rdx, %rdx      # imm = 0x130
movl 0x108(%rax,%rdx), %esi
testl %esi, %esi
jle 0xa982
movq %rbx, %rdi
callq 0x4750
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x44e0
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movl %ebp, %edx
movq %rcx, %rsi
subq %rax, %rsi
sarq $0x4, %rsi
movabsq $-0x79435e50d79435e5, %rdi # imm = 0x86BCA1AF286BCA1B
imulq %rdi, %rsi
incl %ebp
cmpq %rdx, %rsi
ja 0xa94e
leaq 0x148c74(%rip), %rsi    # 0x15361e
movl $0x1, %edx
movq %rbx, %rdi
callq 0x44e0
leaq 0x2d8(%rsp), %rdi
callq 0x4090
cmpb $0x0, 0xf8(%rsp)
je 0xb181
leaq 0x4e8(%rsp), %rdi
callq 0x4520
leaq 0x4e8(%rsp), %rdi
movq 0x208(%rsp), %rsi
movl $0x10, %edx
callq 0x43d0
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rax
cmpq %rsi, %rax
je 0xb167
xorl %ebx, %ebx
imulq $0x130, %rbx, %r13      # imm = 0x130
cmpl $0x0, 0x108(%rsi,%r13)
jne 0xb144
addq %r13, %rsi
leaq 0x80(%rsp), %rdi
callq 0x7148a
movq %rbx, 0xb0(%rsp)
pxor %xmm0, %xmm0
movdqa %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movq 0x80(%rsp), %rsi
movq (%rsi), %rax
movq 0x8(%rsi), %rdi
cmpq %rax, %rdi
je 0xad0e
xorl %ebx, %ebx
xorl %r12d, %r12d
leal 0x1(%r12), %r8d
movq %rdi, %rdx
subq %rax, %rdx
sarq $0x5, %rdx
movq %r8, %rcx
movl %r8d, %r15d
movq %r8, 0xd0(%rsp)
cmpq %r8, %rdx
jbe 0xacf7
cmpq %rbx, %rdx
jbe 0xb285
movq 0x20(%rsp), %r8
movq %rbx, %rdi
shlq $0x5, %rdi
addq %rax, %rdi
leaq (%r8,%r13), %rdx
addq $0x38, %rdx
movq 0x8(%rdx), %rsi
testq %rsi, %rsi
je 0xab2a
movl (%rdi), %r9d
movq %rsi, %r10
movq %rdx, %r8
xorl %r11d, %r11d
cmpl %r9d, 0x20(%r10)
setl %r11b
cmovgeq %r10, %r8
movq 0x10(%r10,%r11,8), %r10
testq %r10, %r10
jne 0xaac4
movq %rdx, %r10
cmpq %rdx, %r8
je 0xaaf0
cmpl 0x20(%r8), %r9d
cmovlq %rdx, %r8
movq %r8, %r10
movl 0x24(%r10), %ebp
movq %rcx, %r8
shlq $0x5, %r8
movl (%rax,%r8), %r8d
movq %rdx, %r9
xorl %r10d, %r10d
cmpl %r8d, 0x20(%rsi)
setl %r10b
cmovgeq %rsi, %r9
movq 0x10(%rsi,%r10,8), %rsi
testq %rsi, %rsi
jne 0xab02
cmpq %rdx, %r9
je 0xab35
cmpl 0x20(%r9), %r8d
cmovgeq %r9, %rdx
jmp 0xab35
leaq (%r8,%r13), %rsi
addq $0x30, %rsi
movl 0x2c(%rsi), %ebp
movslq 0x24(%rdx), %r14
addq $0x8, %rdi
shlq $0x5, %rcx
leaq (%rax,%rcx), %rsi
addq $0x8, %rsi
callq 0x8468c
movq %xmm0, 0xc0(%rsp)
movslq %ebp, %rsi
movq 0x18(%rsp), %rcx
movq 0x2f0(%rcx), %rax
movq 0x2f8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x79435e50d79435e5, %rcx # imm = 0x86BCA1AF286BCA1B
imulq %rcx, %rdx
cmpq %rsi, %rdx
jbe 0xb277
imulq $0x98, %rsi, %rcx
leaq 0x158(%rsp), %rdx
movq %rdx, 0x148(%rsp)
movq 0x40(%rax,%rcx), %rsi
movq 0x48(%rax,%rcx), %rdx
addq %rsi, %rdx
leaq 0x148(%rsp), %rdi
callq 0xf3ce
leaq 0x148(%rsp), %rdi
callq 0x22046
movq %xmm0, (%rsp)
movq 0x18(%rsp), %rcx
movq 0x2f0(%rcx), %rax
movq 0x2f8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x79435e50d79435e5, %rcx # imm = 0x86BCA1AF286BCA1B
imulq %rcx, %rdx
cmpq %r14, %rdx
jbe 0xb266
imulq $0x98, %r14, %rcx
leaq 0x138(%rsp), %rdx
movq %rdx, 0x128(%rsp)
movq 0x40(%rax,%rcx), %rsi
movq 0x48(%rax,%rcx), %rdx
addq %rsi, %rdx
leaq 0x128(%rsp), %rdi
callq 0xf3ce
leaq 0x128(%rsp), %rdi
callq 0x22046
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
addsd 0x142422(%rip), %xmm1   # 0x14d070
movsd %xmm1, (%rsp)
movq 0x128(%rsp), %rdi
leaq 0x138(%rsp), %rax
cmpq %rax, %rdi
je 0xac78
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x148(%rsp), %rdi
leaq 0x158(%rsp), %rax
cmpq %rax, %rdi
je 0xac9d
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x4470
movsd (%rsp), %xmm0
ucomisd 0xc0(%rsp), %xmm0
jbe 0xaccf
movl %r12d, 0x168(%rsp)
movl %r15d, 0x16c(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0x146a0
incl %r15d
movq 0x80(%rsp), %rsi
movq (%rsi), %rax
movq 0x8(%rsi), %rdi
movq %rdi, %rdx
subq %rax, %rdx
sarq $0x5, %rdx
movq %r15, %rcx
cmpq %r15, %rdx
ja 0xaa92
movq 0xd0(%rsp), %rcx
movq %rcx, %rbx
movl %ecx, %r12d
cmpq %rcx, %rdx
ja 0xaa6c
cmpq %rsi, 0x88(%rsp)
je 0xb10e
movq $0x0, (%rsp)
leaq 0x4f8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
callq 0x42b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4420
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42c0
movl $0xb, %edx
leaq 0x4f8(%rsp), %rdi
leaq 0x1426ee(%rip), %rsi    # 0x14d465
callq 0x44e0
movq 0x4f8(%rsp), %rax
movq -0x18(%rax), %rdi
leaq 0x4f8(%rsp), %rax
addq %rax, %rdi
movl $0xa, %esi
callq 0x4420
movsbl %al, %esi
leaq 0x4f8(%rsp), %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4420
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42c0
movl $0x2, %edx
leaq 0x4f8(%rsp), %rdi
leaq 0x1426ec(%rip), %rsi    # 0x14d4df
callq 0x44e0
movq 0x20(%rsp), %rax
movq 0x58(%rax,%r13), %rsi
leaq 0x4f8(%rsp), %rdi
callq 0x42b0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x14a7b5(%rip), %rsi    # 0x1555d6
callq 0x44e0
movq 0x48(%rsp), %rsi
subq 0x40(%rsp), %rsi
sarq $0x3, %rsi
movq %rbx, %rdi
callq 0x42b0
movl $0x21, %edx
movq %rax, %rdi
leaq 0x142626(%rip), %rsi    # 0x14d471
callq 0x44e0
movq 0x20(%rsp), %rax
cmpq $0x0, 0x58(%rax,%r13)
je 0xb043
addq %r13, %rax
addq $0x30, %rax
xorl %ebp, %ebp
movq 0x80(%rsp), %rcx
movq (%rsp), %rdx
leaq (%rdx,%rdx,2), %r15
movq (%rcx,%r15,8), %rsi
movq 0x8(%rcx,%r15,8), %rdx
subq %rsi, %rdx
sarq $0x5, %rdx
cmpq %rbp, %rdx
jbe 0xb255
movq 0x10(%rax), %rcx
addq $0x8, %rax
testq %rcx, %rcx
je 0xaed0
movq %rbp, %rdx
shlq $0x5, %rdx
movl (%rsi,%rdx), %edx
movq %rax, %rsi
xorl %edi, %edi
cmpl %edx, 0x20(%rcx)
setl %dil
cmovgeq %rcx, %rsi
movq 0x10(%rcx,%rdi,8), %rcx
testq %rcx, %rcx
jne 0xaead
cmpq %rax, %rsi
je 0xaed0
cmpl 0x20(%rsi), %edx
cmovgeq %rsi, %rax
movslq 0x24(%rax), %r12
movl $0x4, %edx
leaq 0x4f8(%rsp), %rdi
leaq 0x1425f5(%rip), %rsi    # 0x14d4dd
callq 0x44e0
movq 0x80(%rsp), %rcx
movq (%rcx,%r15,8), %rax
movq 0x8(%rcx,%r15,8), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %rbp, %rdx
jbe 0xb244
movq %rbp, %rbx
shlq $0x5, %rbx
movsd 0x8(%rax,%rbx), %xmm0
leaq 0x4f8(%rsp), %rdi
callq 0x46b0
movq %rax, %r14
movl $0x2, %edx
movq %rax, %rdi
leaq 0x1425a5(%rip), %rsi    # 0x14d4df
callq 0x44e0
movq 0x80(%rsp), %rcx
movq (%rcx,%r15,8), %rax
movq 0x8(%rcx,%r15,8), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %rbp, %rdx
jbe 0xb244
movsd 0x10(%rax,%rbx), %xmm0
movq %r14, %rdi
callq 0x46b0
movq %rax, %r14
movl $0x2, %edx
movq %rax, %rdi
leaq 0x14255f(%rip), %rsi    # 0x14d4df
callq 0x44e0
movq 0x80(%rsp), %rcx
movq (%rcx,%r15,8), %rax
movq 0x8(%rcx,%r15,8), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %rbp, %rdx
jbe 0xb244
movsd 0x18(%rax,%rbx), %xmm0
movq %r14, %rdi
callq 0x46b0
movl $0x2, %edx
movq %rax, %rdi
leaq 0x14251c(%rip), %rsi    # 0x14d4df
callq 0x44e0
movq 0x18(%rsp), %rcx
movq 0x2f0(%rcx), %rax
movq 0x2f8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x79435e50d79435e5, %rcx # imm = 0x86BCA1AF286BCA1B
imulq %rcx, %rdx
cmpq %r12, %rdx
jbe 0xb241
imulq $0x98, %r12, %rcx
movq 0x40(%rax,%rcx), %rsi
movq 0x48(%rax,%rcx), %rdx
leaq 0x4f8(%rsp), %rdi
callq 0x44e0
movl $0x26, %edx
movq %rax, %rdi
leaq 0x14246d(%rip), %rsi    # 0x14d493
callq 0x44e0
incl %ebp
movq 0x20(%rsp), %rax
addq %r13, %rax
addq $0x30, %rax
cmpq %rbp, 0x28(%rax)
ja 0xae6a
movq 0x40(%rsp), %rax
cmpq %rax, 0x48(%rsp)
je 0xb0c0
movl $0x1, %ebp
xorl %r14d, %r14d
movl (%rax,%r14,8), %esi
leaq 0x4f8(%rsp), %rdi
callq 0x4750
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
leaq 0x142465(%rip), %rsi    # 0x14d4df
callq 0x44e0
movq 0x40(%rsp), %rax
movl 0x4(%rax,%r14,8), %esi
movq %rbx, %rdi
callq 0x4750
movl $0xb, %edx
movq %rax, %rdi
leaq 0x14241a(%rip), %rsi    # 0x14d4ba
callq 0x44e0
movl %ebp, %r14d
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
incl %ebp
cmpq %r14, %rcx
ja 0xb057
movl $0xc, %edx
leaq 0x4f8(%rsp), %rdi
leaq 0x1423f2(%rip), %rsi    # 0x14d4c6
callq 0x44e0
movq 0x88(%rsp), %rax
subq 0x80(%rsp), %rax
movq (%rsp), %rdx
incl %edx
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movq %rdx, (%rsp)
cmpq %rdx, %rax
ja 0xad24
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
movq 0xb0(%rsp), %rbx
je 0xb12d
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
leaq 0x80(%rsp), %rdi
callq 0xee9c
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rax
incl %ebx
movq %rax, %rcx
subq %rsi, %rcx
sarq $0x4, %rcx
movabsq $-0x79435e50d79435e5, %rdx # imm = 0x86BCA1AF286BCA1B
imulq %rdx, %rcx
cmpq %rbx, %rcx
ja 0xaa0e
leaq 0x4e8(%rsp), %rdi
callq 0x4090
leaq 0x4e8(%rsp), %rdi
callq 0x4110
leaq 0x2d8(%rsp), %rdi
callq 0x4110
leaq 0x20(%rsp), %rdi
callq 0xeef0
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0xb1b5
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
leaq 0x180(%rsp), %rdi
callq 0xf10e
movq 0x1e0(%rsp), %rdi
testq %rdi, %rdi
je 0xb1df
movq 0x200(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0xb1f6
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
addq $0x6f8, %rsp            # imm = 0x6F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %r13
leaq 0x1424e3(%rip), %rdi    # 0x14d6f5
movq %r13, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0x1424d2(%rip), %rdi    # 0x14d6f5
movq %r12, %rsi
xorl %eax, %eax
callq 0x4630
movq %r13, %r12
leaq 0x1424be(%rip), %rdi    # 0x14d6f5
movq %r12, %rsi
xorl %eax, %eax
callq 0x4630
movq %r12, %rbp
leaq 0x1424aa(%rip), %rdi    # 0x14d6f5
movq %rbp, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0x142499(%rip), %rdi    # 0x14d6f5
movq %rbp, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0x142488(%rip), %rdi    # 0x14d6f5
movq %r14, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0x142477(%rip), %rdi    # 0x14d6f5
xorl %eax, %eax
callq 0x4630
leaq 0x142469(%rip), %rdi    # 0x14d6f5
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4630
jmp 0xb2ee
jmp 0xb2af
jmp 0xb2ee
jmp 0xb2ee
jmp 0xb2a0
movq %rax, %rbx
jmp 0xb3f5
jmp 0xb43c
jmp 0xb2f6
movq %rax, %rbx
jmp 0xb3db
jmp 0xb2ee
jmp 0xb2f6
jmp 0xb2f6
jmp 0xb2f6
movq %rax, %rbx
leaq 0x4f8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb3e8
movq 0x4f8(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0xb3e8
jmp 0xb2f6
movq %rax, %rbx
jmp 0xb3e8
movq %rax, %rbx
jmp 0xb44c
movq %rax, %rbx
movq 0x2f8(%rsp), %rdi
testq %rdi, %rdi
je 0xb328
movq 0x308(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
jmp 0xb328
jmp 0xb43c
movq %rax, %rbx
movq 0x258(%rsp), %rdi
cmpq %r13, %rdi
je 0xb43f
movq 0x268(%rsp), %rsi
incq %rsi
jmp 0xb417
jmp 0xb3b4
jmp 0xb3b4
movq %rax, %rbx
movq 0x128(%rsp), %rdi
leaq 0x138(%rsp), %rax
cmpq %rax, %rdi
je 0xb382
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0xb382
jmp 0xb3b4
jmp 0xb37f
jmp 0xb3b4
jmp 0xb3b4
movq %rax, %rbx
movq 0x148(%rsp), %rdi
leaq 0x158(%rsp), %rax
cmpq %rax, %rdi
je 0xb3b7
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0xb3b7
jmp 0xb3b4
jmp 0xb3b4
jmp 0xb3b4
jmp 0xb43c
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xb3ce
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
leaq 0x80(%rsp), %rdi
callq 0xee9c
leaq 0x4e8(%rsp), %rdi
callq 0x4110
leaq 0x2d8(%rsp), %rdi
callq 0x4110
leaq 0x20(%rsp), %rdi
callq 0xeef0
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0xb43f
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
jmp 0xb43f
jmp 0xb43c
jmp 0xb43c
jmp 0xb43c
jmp 0xb43c
jmp 0xb43c
jmp 0xb43c
jmp 0xb43c
jmp 0xb43c
jmp 0xb43c
jmp 0xb43c
jmp 0xb43c
jmp 0xb43c
jmp 0xb43c
jmp 0xb43c
jmp 0xb43c
movq %rax, %rbx
leaq 0x180(%rsp), %rdi
callq 0xf10e
movq 0x1e0(%rsp), %rdi
testq %rdi, %rdi
je 0xb486
movq 0x200(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
xorl %eax, %eax
movq %rax, 0x1e0(%rsp)
movl $0x0, 0x1e8(%rsp)
movq %rax, 0x1f0(%rsp)
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0xb49d
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq %rbx, %rdi
callq 0x4780