// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/feature.cc
// Function: FEATURE::calculateSurfaceArea_OLD(ATOM_NETWORK*, std::vector<DIJKSTRA_NODE, std::allocator<DIJKSTRA_NODE>>*, std::vector<int, std::allocator<int>>*, int, char*, int)
double FEATURE::calculateSurfaceArea_OLD(ATOM_NETWORK *uc,vector<DIJKSTRA_NODE> *ChanNodeList,vector <int> *featnodemap,int curr_f,char *name,int fid){
 
  long int i,j,k,counter=0;  
  double volume;
  int step;
  double r_tr; // threshold for r
  XYZ max,min;
  XYZ box;
  XYZ pt;

  vector <double> SA_holo;  // stores hologram for each feature
  vector <double> SA_holo_otherf; // as above but excluding surface that is covered by other segments

  srand(randSeed2);
  SPHERE sph,sph2;
  vector <SPHERE> object; // a vector of spheres that define object (segemnt/feature/channel)

  vector <SPHERE> other_object; // vectors of spheres corresponding to other segments

    // Draw the components located in each unit cell
    for(unsigned int i = 0; i < unitCells.size(); i++){
      vector<int> nodeIDs = ucNodes.at(i);
      DELTA_POS disp = unitCells.at(i);
      
      // Iterate over all nodes in the unit cell
      for(unsigned int j = 0; j < nodeIDs.size(); j++){
	DIJKSTRA_NODE curNode = nodes.at(nodeIDs.at(j));
	
	// Find node coordinates

        if(dimensionality<1) 
           { // if feature is not a channel, use reconstrcted feature
	   sph.x = curNode.x + v_a.x*disp.x + v_b.x*disp.y + v_c.x*disp.z;
	   sph.y = curNode.y + v_a.y*disp.x + v_b.y*disp.y + v_c.y*disp.z;
	   sph.z = curNode.z + v_a.z*disp.x + v_b.z*disp.y + v_c.z*disp.z;
           } else {
           sph.x = nodes.at(nodeIDs.at(j)).x;sph.y = nodes.at(nodeIDs.at(j)).y;sph.z = nodes.at(nodeIDs.at(j)).z;
//           cout << "draw sphere { " << sph.x << "  " << sph.y << "  " << sph.z << " } radius 0.1 " << "\n"; 
           };

	sph.r = SPHERE_SCALE*curNode.max_radius;

        object.push_back(sph);

        if(object.size()==1)
          { // first sphere added
          min.x=sph.x-sph.r;max.x=sph.x+sph.r;
          min.y=sph.y-sph.r;max.y=sph.y+sph.r;
          min.z=sph.z-sph.r;max.z=sph.z+sph.r;
          }else
          {
          if(min.x>(sph.x-sph.r)) min.x=sph.x-sph.r;
          if(max.x<(sph.x+sph.r)) max.x=sph.x+sph.r;
          if(min.y>(sph.y-sph.r)) min.y=sph.y-sph.r;
          if(max.y<(sph.y+sph.r)) max.y=sph.y+sph.r;
          if(min.z>(sph.z-sph.r)) min.z=sph.z-sph.r;
          if(max.z<(sph.z+sph.r)) max.z=sph.z+sph.r;
          };
		
      }
    } // end of analysis of object



// Create a list of spheres that overlap with the current feature
/*
 for(j=0;j<(int)ChanNodeList->size();j++)
    {
    int count=0;
    int count2=0;
    Point node;
    node.x=ChanNodeList->at(j).x; node.y=ChanNodeList->at(j).y; node.z=ChanNodeList->at(j).z;
    node=uc->shiftXYZInUC(node);

    for(int i = 0; i < (int)object.size(); i++){
       Point p;
       p.x=object[i].x;p.y=object[i].y;p.z=object[i].z;
       Point p_shifted=uc->shiftXYZInUC(p);

       double dist = uc->calcDistanceXYZ(p.x,p.y,p.z,node.x,node.y,node.z);
       if(dist<0.01&&fabs(ChanNodeList->at(j).max_radius*SPHERE_SCALE-object[i].r)<0.01) 
          {
          count++; break;
          };

       if(dist<ChanNodeList->at(j).max_radius*SPHERE_SCALE+object[i].r)
         {
         count2++;
         };

       };

    if(count==0) // if node is not a part of the current feature
      {
      if(count2>0) {
        //origDNet->nodes[j] is an sphere overlapping with the current feature
        sph2.r=ChanNodeList->at(j).max_radius*SPHERE_SCALE;
        sph2.x=node.x; sph2.y=node.y; sph2.z=node.z;
        other_object.push_back(sph2);
        };
      };

    };
*/

// New version of code to find overlapping nodes

vector <int> conn_feat;

 for(j=0;j<(int)ChanNodeList->size();j++)
    {
    if(featnodemap->at(j)==curr_f)
      {
      for(i=0;i<(int)(ChanNodeList->at(j).connections.size());i++)      
         {
         if(featnodemap->at(ChanNodeList->at(j).connections.at(i).to)!=curr_f)
            {
            int flag=0;
            for(k=0;k<(int)conn_feat.size();k++)
               {
               if(conn_feat[k]==featnodemap->at(ChanNodeList->at(j).connections.at(i).to)) flag=1;
               };
            if(flag==0) conn_feat.push_back(featnodemap->at(ChanNodeList->at(j).connections.at(i).to));
            };
         };
      };
    }

for(i=0;i<(int)conn_feat.size();i++)
 for(j=0;j<(int)ChanNodeList->size();j++)
    {
    if(featnodemap->at(j)==i)
       {
       Point node;
       node[0]=ChanNodeList->at(j).x; node[1]=ChanNodeList->at(j).y; node[2]=ChanNodeList->at(j).z;
       node=uc->shiftXYZInUC(node);

       sph2.r=ChanNodeList->at(j).max_radius*SPHERE_SCALE;
       sph2.x=node[0]; sph2.y=node[1]; sph2.z=node[2];
       other_object.push_back(sph2);

       };
    };



cout << "Outside spheres list contain " << other_object.size() << " spheres (of " << ChanNodeList->size() << " nodes)." << "\n";


//

  box.x=max.x-min.x;
  box.y=max.y-min.y;
  box.z=max.z-min.z;
 
  volume=box.x*box.y*box.z;

//  cout << "Segment Box volume= " << volume << "\n"; 

// Now MC integration of surface

//int pos_origDNet;

SA_holo.resize(NBINS_SA_HOLO,0);
SA_holo_otherf.resize(NBINS_SA_HOLO,0);

for(step=0;step<NBINS_SA_HOLO;step++) // loop over all bins for surface area holograms
   {
   r_tr=(double)step*SA_HOLO_STEP;

   counter=0;

   for(j=0;j<(int)object.size();j++)
      {
      if(object[j].r>r_tr) { counter++;break;}; // at least one sphere larger than r_tr, sampling makes sense
      };


   if(counter>0)
     { // sampling makes sense

//     double totalSA = 0;
//     int sampleCount = 0;

     // Sample around each of the object's spheres
     for(int i = 0; i < (int)object.size(); i++){


        // now go to sampling

//        cout << "Object " << i << "\n"; cout.flush();

        int count = 0;
        int count_otherf=0;

        if(object[i].r-r_tr>0)
        for(int j = 0; j < N_MC_SA_SAMPLE; j++){

        bool overlap=false;
        bool overlap_otherf=false; // overlap with other features

        // Randomly sample point on a sphere of radius 1
        double theta = (rand()*1.0/RAND_MAX)*2*PI;
        double cosphi = 1.0 - (rand()*1.0/RAND_MAX)*2.0;
        double phi = acos(cosphi);

        // Convert spherical coordinates to xyz coordinates
        double xpoint = sin(phi)*cos(theta); //Don't need abs(sin(phi)) becase phi is from 0 to pi
        double ypoint = sin(phi)*sin(theta);
        double zpoint = cosphi;	
      
        // Scale the point to lie on a radius of r_probe + r_atom#i
        xpoint *= (object[i].r-r_tr);
        ypoint *= (object[i].r-r_tr);
        zpoint *= (object[i].r-r_tr);

        // move the point to the segment

        pt.x=object[i].x+xpoint;
        pt.y=object[i].y+ypoint;
        pt.z=object[i].z+zpoint;


        if(dimensionality<1)
          { // if the feature is not a channel, just check overlap with other spheres

          for(k=0;k<(int)object.size();k++)
             {
             if(k!=i)
                {
                if(calcEuclideanDistance(pt.x,pt.y,pt.z,object[k].x,object[k].y,object[k].z)<(object[k].r-r_tr)- 0.00001)
                   {
                   overlap=true; break;
                   };
                };
             };

          if(overlap==false) count++;


          //otherlap with other segments

         if(overlap==false)
         for(int jj=0;jj<(int)other_object.size();jj++)
            {
            Point p;
            p[0]=pt.x;p[1]=pt.y;p[2]=pt.z;
            Point p_shifted=uc->shiftXYZInUC(p);

            double dist = uc->calcDistanceXYZ(p[0],p[1],p[2],other_object[jj].x,other_object[jj].y,other_object[jj].z);

            if(dist<other_object[jj].r) {
                 overlap_otherf=true; break;
                 };

           };

 
          if(overlap_otherf==false) count_otherf++;

          }else{
          // sample points in case of channels, have to use pbc here

          // Convert (x,y,z) coordinates to ones relative to the unit cell vectors
          Point abc_coords = uc->xyz_to_abc(pt.x, pt.y, pt.z);

          abc_coords=uc->shiftABCInUC(abc_coords);
/*
          if(abc_coords.x<0||abc_coords.x>=1||abc_coords.y<0||abc_coords.y>=1||abc_coords.z<0||abc_coords.z>=1)
             {
             overlap=true;           
             };
*/
          if(overlap!=true)
            {
            for(k=0;k<(int)object.size();k++)
               {
               if(k!=i)
                  {
                  Point new_abc=uc->xyz_to_abc(object[k].x, object[k].y, object[k].z);
                  double centerDist = uc->calcDistanceABC(new_abc[0],new_abc[1],new_abc[2],abc_coords[0],abc_coords[1],abc_coords[2]);
                  if(centerDist < (object[k].r-r_tr) - 0.00001){
                     overlap=true; break;
                     };
                  };
               };

            };
          if(overlap==false) count++;

         // check otherlap with other segments
  
         if(overlap==false)
         for(int jk=0;jk<(int)other_object.size();jk++)
            {
            Point p;
            p[0]=pt.x;p[1]=pt.y;p[2]=pt.z;
            Point p_shifted=uc->shiftXYZInUC(p);

            double dist = uc->calcDistanceXYZ(p[0],p[1],p[2],other_object[jk].x,other_object[jk].y,other_object[jk].z);

            if(dist<other_object[jk].r) {
                 overlap_otherf=true; break;
                 };

           };
          

          if(overlap_otherf == false) 
	    count_otherf++;

          }; // end if, for channels (dim>0)

     
       }; // ends for(int j = 0; j < N_MC_SA_SAMPLE; j++){

//     cout << " count= " << count << "    cont_otherf= " << count_otherf << "\n";

     SA_holo[step]+= ((double)count/(double)N_MC_SA_SAMPLE)* 4.0 * PI * pow(object[i].r-r_tr,2);
     SA_holo_otherf[step]+= ((double)count_otherf/(double)N_MC_SA_SAMPLE)* 4.0 * PI * pow(object[i].r-r_tr,2);
     }; // ends for(int i = 0; i < (int)object.size() 

     }else   // from if(counter>0)
     {
     // surface area is 0
     SA_holo[step]=0;
     }; // ends  if(counter>0)

   }; // ends for(step=0;step<NBINS_SA_HOLO;step++)


cout << "##SA_holo:  " << name << "  Feature=  " << fid << "   ";
for(i=0;i<NBINS_SA_HOLO;i++)
   {
   cout << SA_holo[i] << "   ";
   };

cout << " Other:  ";
for(i=0;i<NBINS_SA_HOLO;i++)
   {
   cout << SA_holo_otherf[i] << "   ";
   };

cout << "\n";

//volume=volume*((double)(N_MC_SAMPLE-counter))/(double)N_MC_SAMPLE;

return SA_holo[0];


}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %r9, 0xa8(%rsp)
movl %r8d, 0x18(%rsp)
movq %rcx, 0x40(%rsp)
movq %rdx, %r12
movq %rsi, 0x70(%rsp)
movq %rdi, %r13
leaq 0x108(%rsp), %rdi
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
callq 0x85982
leaq 0xf0(%rsp), %rdi
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
callq 0x85982
leaq 0x208(%rsp), %rdi
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
callq 0x85982
leaq 0xd8(%rsp), %rdi
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
callq 0x85982
xorl %r15d, %r15d
movq %r15, 0x140(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x130(%rsp)
movq %r15, 0x160(%rsp)
movapd %xmm0, 0x150(%rsp)
movl $0x3b4ca6f5, %edi       # imm = 0x3B4CA6F5
callq 0x4410
movq %r15, 0x60(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x50(%rsp)
movq %r15, 0x90(%rsp)
movapd %xmm0, 0x80(%rsp)
movq 0x98(%r13), %rax
cmpq 0x90(%r13), %rax
movq %r13, 0x178(%rsp)
je 0x7eb96
leaq 0x1a0(%rsp), %rbx
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
movq 0xa8(%r13), %rax
movq 0xb0(%r13), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
cmpq %r15, %rdx
jbe 0x7fbe9
leaq (%r15,%r15,2), %r14
leaq (%rax,%r14,8), %rsi
leaq 0x20(%rsp), %rdi
callq 0xe886
movq 0x90(%r13), %rax
movq 0x98(%r13), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
imulq %rbp, %rdx
cmpq %r15, %rdx
jbe 0x7fbd8
movq 0x20(%rsp), %rdi
cmpq %rdi, 0x28(%rsp)
je 0x7eb62
movq %r15, 0x120(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%r14,4), %xmm0
movsd %xmm0, 0x48(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x4(%rax,%r14,4), %xmm0
movsd %xmm0, 0xa0(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x8(%rax,%r14,4), %xmm0
movsd %xmm0, 0x128(%rsp)
movl $0x1, %r14d
xorl %ebp, %ebp
movslq (%rdi,%rbp,4), %rsi
movq 0x60(%r13), %r15
movq 0x68(%r13), %rdx
subq %r15, %rdx
sarq $0x3, %rdx
movabsq $-0x71c71c71c71c71c7, %rax # imm = 0x8E38E38E38E38E39
imulq %rax, %rdx
cmpq %rsi, %rdx
jbe 0x7fbb1
leaq (%rsi,%rsi,8), %r13
leaq (%r15,%r13,8), %rsi
addq $0x20, %rsi
movupd -0x20(%rsi), %xmm0
movupd -0x10(%rsi), %xmm1
movapd %xmm1, 0x190(%rsp)
movapd %xmm0, 0x180(%rsp)
movq %rbx, %rdi
callq 0x38318
leaq (%r15,%r13,8), %rax
movb 0x40(%rax), %cl
movb %cl, 0x20(%rbx)
movq 0x38(%rax), %rax
movq %rax, 0x18(%rbx)
movq 0x178(%rsp), %r13
cmpl $0x0, 0x108(%r13)
jle 0x7e884
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %rbp, %rdx
jbe 0x7fba0
movslq (%rax,%rbp,4), %rbp
movq 0x60(%r13), %rax
movq 0x68(%r13), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x71c71c71c71c71c7, %rcx # imm = 0x8E38E38E38E38E39
imulq %rcx, %rdx
cmpq %rbp, %rdx
jbe 0x7fba0
leaq (,%rbp,8), %rcx
addq %rbp, %rcx
movsd 0x8(%rax,%rcx,8), %xmm0
movsd %xmm0, 0xb8(%rsp)
movsd 0x10(%rax,%rcx,8), %xmm0
movsd %xmm0, 0xc0(%rsp)
movsd 0x18(%rax,%rcx,8), %xmm0
jmp 0x7e956
movsd 0xc0(%r13), %xmm0
movsd 0x48(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd 0x188(%rsp), %xmm0
movsd 0xd8(%r13), %xmm1
movsd 0xa0(%rsp), %xmm3
mulsd %xmm3, %xmm1
addsd %xmm0, %xmm1
movsd 0xf0(%r13), %xmm0
movsd 0x128(%rsp), %xmm4
mulsd %xmm4, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xb8(%rsp)
movsd 0xc8(%r13), %xmm0
mulsd %xmm2, %xmm0
addsd 0x190(%rsp), %xmm0
movsd 0xe0(%r13), %xmm1
mulsd %xmm3, %xmm1
addsd %xmm0, %xmm1
movsd 0xf8(%r13), %xmm0
mulsd %xmm4, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xc0(%rsp)
movsd 0xd0(%r13), %xmm0
mulsd %xmm2, %xmm0
addsd 0x198(%rsp), %xmm0
movsd 0xe8(%r13), %xmm1
mulsd %xmm3, %xmm1
addsd %xmm0, %xmm1
movsd 0x100(%r13), %xmm0
mulsd %xmm4, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xc8(%rsp)
movsd 0x1b8(%rsp), %xmm0
mulsd 0xd57b0(%rip), %xmm0    # 0x154120
movsd %xmm0, 0xd0(%rsp)
movq 0x58(%rsp), %rsi
cmpq 0x60(%rsp), %rsi
je 0x7e9ab
movupd 0xb8(%rsp), %xmm0
movupd 0xc8(%rsp), %xmm1
movupd %xmm1, 0x10(%rsi)
movupd %xmm0, (%rsi)
addq $0x20, %rsi
movq %rsi, 0x58(%rsp)
jmp 0x7e9bd
leaq 0x50(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
callq 0x49c88
movq 0x58(%rsp), %rax
subq 0x50(%rsp), %rax
cmpq $0x20, %rax
jne 0x7ea47
movsd 0xd0(%rsp), %xmm0
movsd 0xb8(%rsp), %xmm1
movsd 0xc0(%rsp), %xmm2
movapd %xmm1, %xmm3
subsd %xmm0, %xmm3
movsd %xmm3, 0xf0(%rsp)
addsd %xmm0, %xmm1
movsd %xmm1, 0x108(%rsp)
movapd %xmm0, %xmm1
addsd %xmm2, %xmm1
subsd %xmm0, %xmm2
movsd %xmm2, 0xf8(%rsp)
movsd %xmm1, 0x110(%rsp)
movsd 0xc8(%rsp), %xmm1
movapd %xmm1, %xmm2
subsd %xmm0, %xmm2
movsd %xmm2, 0x100(%rsp)
addsd %xmm1, %xmm0
jmp 0x7eb0a
movsd 0xf0(%rsp), %xmm3
movsd 0xb8(%rsp), %xmm1
movsd 0xd0(%rsp), %xmm0
movapd %xmm1, %xmm2
subsd %xmm0, %xmm2
ucomisd %xmm2, %xmm3
jbe 0x7ea79
movsd %xmm2, 0xf0(%rsp)
addsd %xmm0, %xmm1
ucomisd 0x108(%rsp), %xmm1
jbe 0x7ea91
movsd %xmm1, 0x108(%rsp)
movsd 0xf8(%rsp), %xmm3
movsd 0xc0(%rsp), %xmm1
movapd %xmm1, %xmm2
subsd %xmm0, %xmm2
ucomisd %xmm2, %xmm3
jbe 0x7eaba
movsd %xmm2, 0xf8(%rsp)
addsd %xmm0, %xmm1
ucomisd 0x110(%rsp), %xmm1
jbe 0x7ead2
movsd %xmm1, 0x110(%rsp)
movsd 0x100(%rsp), %xmm3
movsd 0xc8(%rsp), %xmm1
movapd %xmm1, %xmm2
subsd %xmm0, %xmm2
ucomisd %xmm2, %xmm3
jbe 0x7eafb
movsd %xmm2, 0x100(%rsp)
addsd %xmm1, %xmm0
ucomisd 0x118(%rsp), %xmm0
jbe 0x7eb13
movsd %xmm0, 0x118(%rsp)
movq 0x1a0(%rsp), %rdi
testq %rdi, %rdi
je 0x7eb30
movq 0x1b0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movl %r14d, %ebp
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rax
subq %rdi, %rax
sarq $0x2, %rax
incl %r14d
cmpq %rbp, %rax
ja 0x7e78e
movq 0x120(%rsp), %r15
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
testq %rdi, %rdi
je 0x7eb74
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x98(%r13), %rax
subq 0x90(%r13), %rax
incl %r15d
sarq $0x2, %rax
imulq %rbp, %rax
cmpq %r15, %rax
ja 0x7e6e3
xorpd %xmm0, %xmm0
movapd %xmm0, 0x180(%rsp)
movq $0x0, 0x190(%rsp)
movq 0x8(%r12), %rax
subq (%r12), %rax
shrq $0x3, %rax
imull $0x38e38e39, %eax, %eax # imm = 0x38E38E39
testl %eax, %eax
jle 0x7ed43
xorl %r15d, %r15d
movabsq $-0x3333333333333333, %r14 # imm = 0xCCCCCCCCCCCCCCCD
movl $0x1, %ebp
movq 0x40(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r15, %rdx
jbe 0x7fbc7
movl 0x18(%rsp), %ecx
cmpl %ecx, (%rax,%r15,4)
jne 0x7ed22
movq (%r12), %rax
movq 0x8(%r12), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x71c71c71c71c71c7, %rcx # imm = 0x8E38E38E38E38E39
imulq %rcx, %rdx
cmpq %r15, %rdx
jbe 0x7fbc7
leaq (%r15,%r15,8), %r13
xorl %ebx, %ebx
movq 0x20(%rax,%r13,8), %rcx
movq 0x28(%rax,%r13,8), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
imulq %r14, %rdx
movslq %edx, %rax
cmpq %rax, %rbx
jge 0x7ed22
cmpq %rbx, %rdx
jbe 0x7fbc4
leaq (%rbx,%rbx,4), %rax
movslq 0x4(%rcx,%rax,8), %rax
movq 0x40(%rsp), %rdx
movq (%rdx), %rcx
movq 0x8(%rdx), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq %rax, %rdx
jbe 0x7fbbf
movl (%rcx,%rax,4), %edx
cmpl 0x18(%rsp), %edx
je 0x7ecf3
movq 0x180(%rsp), %rdi
movq 0x188(%rsp), %rsi
movq %rsi, %r8
subq %rdi, %r8
shrq $0x2, %r8
movslq %r8d, %r8
testq %r8, %r8
jle 0x7ecc8
xorl %r9d, %r9d
xorl %r10d, %r10d
cmpl %edx, (%rdi,%r9,4)
cmovel %ebp, %r10d
incq %r9
cmpq %r9, %r8
jne 0x7ecb3
testl %r10d, %r10d
jne 0x7ecf3
cmpq 0x190(%rsp), %rsi
je 0x7ece2
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x188(%rsp)
jmp 0x7ecf3
leaq (%rcx,%rax,4), %rdx
leaq 0x180(%rsp), %rdi
callq 0xf7b4
incq %rbx
movq (%r12), %rax
movq 0x8(%r12), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x71c71c71c71c71c7, %rcx # imm = 0x8E38E38E38E38E39
imulq %rcx, %rdx
cmpq %r15, %rdx
ja 0x7ec33
jmp 0x7fbc7
incq %r15
movq 0x8(%r12), %rax
subq (%r12), %rax
shrq $0x3, %rax
imull $0x38e38e39, %eax, %eax # imm = 0x38E38E39
cltq
cmpq %rax, %r15
jl 0x7ebdc
movq 0x188(%rsp), %rax
subq 0x180(%rsp), %rax
shlq $0x1e, %rax
testq %rax, %rax
movq 0x40(%rsp), %rbx
jle 0x7f006
xorl %r14d, %r14d
leaq 0x20(%rsp), %rbp
movq 0x8(%r12), %rax
subq (%r12), %rax
shrq $0x3, %rax
imull $0x38e38e39, %eax, %eax # imm = 0x38E38E39
testl %eax, %eax
jle 0x7efe4
xorl %r13d, %r13d
xorl %r15d, %r15d
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r15, %rdx
jbe 0x7fbc7
movslq (%rax,%r15,4), %rax
cmpq %rax, %r14
jne 0x7efbf
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
movq %rbp, %rdi
callq 0x85436
movq (%r12), %rax
movq 0x8(%r12), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x71c71c71c71c71c7, %rcx # imm = 0x8E38E38E38E38E39
imulq %rcx, %rdx
cmpq %r15, %rdx
jbe 0x7fb8f
movsd 0x8(%rax,%r13), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %rbp, %rdi
xorl %esi, %esi
callq 0x85478
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq (%r12), %rax
movq 0x8(%r12), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x71c71c71c71c71c7, %rcx # imm = 0x8E38E38E38E38E39
imulq %rcx, %rdx
cmpq %r15, %rdx
jbe 0x7fb8f
movsd 0x10(%rax,%r13), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %rbp, %rdi
movl $0x1, %esi
callq 0x85478
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq (%r12), %rax
movq 0x8(%r12), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x71c71c71c71c71c7, %rcx # imm = 0x8E38E38E38E38E39
imulq %rcx, %rdx
cmpq %r15, %rdx
jbe 0x7fb8f
movsd 0x18(%rax,%r13), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %rbp, %rdi
movl $0x2, %esi
callq 0x85478
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x1c8(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0x53e0c
movq 0x1d8(%rsp), %rax
movq %rax, 0x30(%rsp)
movupd 0x1c8(%rsp), %xmm0
movapd %xmm0, 0x20(%rsp)
movq (%r12), %rax
movq 0x8(%r12), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x71c71c71c71c71c7, %rcx # imm = 0x8E38E38E38E38E39
imulq %rcx, %rdx
cmpq %r15, %rdx
jbe 0x7fb8f
movsd 0x38(%rax,%r13), %xmm0
mulsd 0xd5205(%rip), %xmm0    # 0x154120
movsd %xmm0, 0x200(%rsp)
movq %rbp, %rdi
xorl %esi, %esi
callq 0x85478
movsd (%rax), %xmm0
movsd %xmm0, 0x1e8(%rsp)
movq %rbp, %rdi
movl $0x1, %esi
callq 0x85478
movsd (%rax), %xmm0
movsd %xmm0, 0x1f0(%rsp)
movq %rbp, %rdi
movl $0x2, %esi
callq 0x85478
movsd (%rax), %xmm0
movsd %xmm0, 0x1f8(%rsp)
movq 0x88(%rsp), %rsi
cmpq 0x90(%rsp), %rsi
je 0x7efaa
movupd 0x1e8(%rsp), %xmm0
movupd 0x1f8(%rsp), %xmm1
movupd %xmm1, 0x10(%rsi)
movupd %xmm0, (%rsi)
addq $0x20, %rsi
movq %rsi, 0x88(%rsp)
jmp 0x7efbf
leaq 0x80(%rsp), %rdi
leaq 0x1e8(%rsp), %rdx
callq 0x49c88
incq %r15
movq 0x8(%r12), %rax
subq (%r12), %rax
shrq $0x3, %rax
imull $0x38e38e39, %eax, %eax # imm = 0x38E38E39
cltq
addq $0x48, %r13
cmpq %rax, %r15
jl 0x7ed8e
movq 0x188(%rsp), %rax
subq 0x180(%rsp), %rax
incq %r14
shrq $0x2, %rax
cltq
cmpq %rax, %r14
jl 0x7ed6d
movq 0x117fb3(%rip), %rdi    # 0x196fc0
leaq 0xd7e13(%rip), %rsi     # 0x156e27
movl $0x1d, %edx
callq 0x44e0
movq 0xa8(%rsp), %r14
movq 0x88(%rsp), %rsi
subq 0x80(%rsp), %rsi
sarq $0x5, %rsi
movq 0x117f7f(%rip), %rdi    # 0x196fc0
callq 0x42b0
movq %rax, %rbx
leaq 0xd7df5(%rip), %rsi     # 0x156e45
movl $0xd, %edx
movq %rax, %rdi
callq 0x44e0
movq 0x8(%r12), %rsi
subq (%r12), %rsi
sarq $0x3, %rsi
movabsq $-0x71c71c71c71c71c7, %rax # imm = 0x8E38E38E38E38E39
imulq %rax, %rsi
movq %rbx, %rdi
callq 0x42b0
movq %rax, %rbx
leaq 0xd7dc9(%rip), %rsi     # 0x156e53
movl $0x8, %edx
movq %rax, %rdi
callq 0x44e0
leaq 0xd6490(%rip), %rsi     # 0x15552e
movl $0x1, %edx
movq %rbx, %rdi
callq 0x44e0
movsd 0x108(%rsp), %xmm0
movsd 0x110(%rsp), %xmm1
subsd 0xf0(%rsp), %xmm0
subsd 0xf8(%rsp), %xmm1
movsd %xmm0, 0x208(%rsp)
movsd 0x118(%rsp), %xmm0
subsd 0x100(%rsp), %xmm0
movsd %xmm1, 0x210(%rsp)
movsd %xmm0, 0x218(%rsp)
leaq 0x20(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x130(%rsp), %rdi
movl $0x1, %esi
callq 0x49580
leaq 0x20(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x150(%rsp), %rdi
movl $0x1, %esi
callq 0x49580
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rax, %rcx
shrq $0x5, %rcx
movslq %ecx, %rcx
testq %rcx, %rcx
jle 0x7f16c
addq $0x18, %rax
xorpd %xmm0, %xmm0
movsd (%rax), %xmm1
ucomisd %xmm0, %xmm1
ja 0x7f180
addq $0x20, %rax
decq %rcx
jne 0x7f159
movq 0x130(%rsp), %rax
movq $0x0, (%rax)
jmp 0x7f9c0
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rax, %rcx
shrq $0x5, %rcx
testl %ecx, %ecx
jle 0x7f9c0
xorl %r15d, %r15d
leaq 0x20(%rsp), %rbx
leaq 0x1c8(%rsp), %r13
movq %r15, %rcx
shlq $0x5, %rcx
movsd 0x18(%rax,%rcx), %xmm0
ucomisd 0xd4102(%rip), %xmm0    # 0x1532c0
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
jbe 0x7f92a
movq %rcx, 0x170(%rsp)
xorl %edx, %edx
xorl %eax, %eax
movl $0x0, 0xb4(%rsp)
movq %r15, 0x1e0(%rsp)
movl %edx, 0x7c(%rsp)
movl %eax, 0x120(%rsp)
callq 0x4150
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0xd4356(%rip), %xmm0    # 0x153560
addsd %xmm0, %xmm0
mulsd 0xd436a(%rip), %xmm0    # 0x153580
movsd %xmm0, 0x18(%rsp)
callq 0x4150
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0xd4358(%rip), %xmm0    # 0x153588
addsd %xmm0, %xmm0
addsd 0xcfe1c(%rip), %xmm0    # 0x14f058
movsd %xmm0, 0x40(%rsp)
callq 0x4400
movsd %xmm0, 0x48(%rsp)
callq 0x4100
movsd %xmm0, 0xa0(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x4800
mulsd 0xa0(%rsp), %xmm0
movsd %xmm0, 0xa0(%rsp)
movsd 0x48(%rsp), %xmm0
callq 0x4100
movsd %xmm0, 0x48(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x4100
movsd 0xa0(%rsp), %xmm3
movsd 0x40(%rsp), %xmm2
movapd %xmm0, %xmm1
mulsd 0x48(%rsp), %xmm1
movq 0x50(%rsp), %rax
movq 0x170(%rsp), %rcx
movsd 0x18(%rax,%rcx), %xmm0
mulsd %xmm0, %xmm3
addsd (%rax,%rcx), %xmm3
mulsd %xmm0, %xmm1
movsd %xmm3, 0xd8(%rsp)
addsd 0x8(%rax,%rcx), %xmm1
mulsd %xmm0, %xmm2
movsd %xmm1, 0xe0(%rsp)
addsd 0x10(%rax,%rcx), %xmm2
movsd %xmm2, 0xe8(%rsp)
movq 0x178(%rsp), %rax
cmpl $0x0, 0x108(%rax)
jle 0x7f4ba
movq %rbx, %rdi
movq 0x70(%rsp), %r12
movq %r12, %rsi
movapd %xmm3, %xmm0
callq 0x531ea
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
callq 0x53d90
movq 0x1d8(%rsp), %rax
movq %rax, 0x30(%rsp)
movupd 0x1c8(%rsp), %xmm0
movapd %xmm0, 0x20(%rsp)
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rax, %rcx
shlq $0x1b, %rcx
testq %rcx, %rcx
jle 0x7f723
xorl %ebx, %ebx
xorl %r14d, %r14d
xorl %ebp, %ebp
cmpq %r14, %r15
je 0x7f480
movsd (%rax,%rbx), %xmm0
movsd 0x8(%rax,%rbx), %xmm1
movsd 0x10(%rax,%rbx), %xmm2
movq %r13, %rdi
movq 0x70(%rsp), %rsi
callq 0x531ea
movq %r13, %rdi
xorl %esi, %esi
callq 0x85478
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %r13, %rdi
movl $0x1, %esi
callq 0x85478
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movq %r13, %rdi
movl $0x2, %esi
callq 0x85478
movsd (%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x85478
movsd (%rax), %xmm0
movsd %xmm0, 0xa0(%rsp)
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x85478
movsd (%rax), %xmm0
movsd %xmm0, 0x128(%rsp)
leaq 0x20(%rsp), %rdi
movl $0x2, %esi
callq 0x85478
movsd (%rax), %xmm5
movq 0x70(%rsp), %rdi
movsd 0x18(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movsd 0x48(%rsp), %xmm2
movsd 0xa0(%rsp), %xmm3
movsd 0x128(%rsp), %xmm4
callq 0x5369a
movq 0x50(%rsp), %rax
movsd 0x18(%rax,%rbx), %xmm1
addsd 0xd76fa(%rip), %xmm1    # 0x156b68
ucomisd %xmm0, %xmm1
movzbl %bpl, %ebp
movl $0x1, %eax
cmoval %eax, %ebp
ja 0x7f4a4
incq %r14
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rax, %rcx
shrq $0x5, %rcx
movslq %ecx, %rcx
addq $0x20, %rbx
cmpq %rcx, %r14
jl 0x7f37c
andb $0x1, %bpl
movq 0xa8(%rsp), %r14
leaq 0x20(%rsp), %rbx
jmp 0x7f725
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rax, %rcx
shlq $0x1b, %rcx
movabsq $0x100000000, %rdx      # imm = 0x100000000
cmpq %rdx, %rcx
setl %bpl
jl 0x7f556
xorl %ebx, %ebx
xorl %r14d, %r14d
cmpq %r14, %r15
je 0x7f532
movsd 0xd8(%rsp), %xmm0
movsd 0xe0(%rsp), %xmm1
movsd 0xe8(%rsp), %xmm2
movsd (%rax,%rbx), %xmm3
movsd 0x8(%rax,%rbx), %xmm4
movsd 0x10(%rax,%rbx), %xmm5
callq 0x868fa
movq 0x50(%rsp), %rax
movsd 0x18(%rax,%rbx), %xmm1
addsd 0xd763c(%rip), %xmm1    # 0x156b68
ucomisd %xmm0, %xmm1
ja 0x7f556
incq %r14
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rax, %rcx
shrq $0x5, %rcx
movslq %ecx, %rcx
addq $0x20, %rbx
cmpq %rcx, %r14
setge %bpl
jl 0x7f4e3
movzbl %bpl, %ecx
movl %ecx, %edx
andl $0x1, %edx
movl $0x1, %eax
testb $0x1, %cl
movq 0xa8(%rsp), %r14
je 0x7f8e4
movl %edx, 0x48(%rsp)
movq 0x88(%rsp), %rcx
subq 0x80(%rsp), %rcx
shrq $0x5, %rcx
testl %ecx, %ecx
jle 0x7f711
xorl %ebp, %ebp
xorl %ebx, %ebx
xorl %r14d, %r14d
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x85436
movsd 0xd8(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %r12, %rdi
xorl %esi, %esi
callq 0x85478
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movsd 0xe0(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %r12, %rdi
movl $0x1, %esi
callq 0x85478
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movsd 0xe8(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %r12, %rdi
movl $0x2, %esi
callq 0x85478
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movupd 0x20(%rsp), %xmm0
movupd %xmm0, (%rsp)
movq %r13, %rdi
movq 0x70(%rsp), %rsi
callq 0x53e0c
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x85478
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x85478
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
leaq 0x20(%rsp), %rdi
movl $0x2, %esi
callq 0x85478
movsd (%rax), %xmm2
movq 0x80(%rsp), %rax
movsd (%rax,%rbp), %xmm3
movsd 0x8(%rax,%rbp), %xmm4
movsd 0x10(%rax,%rbp), %xmm5
movq 0x70(%rsp), %rdi
movsd 0x18(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
callq 0x5394a
movq 0x80(%rsp), %rax
movsd 0x18(%rax,%rbp), %xmm1
ucomisd %xmm0, %xmm1
movzbl %r14b, %r14d
movl $0x1, %eax
cmoval %eax, %r14d
ja 0x7f6fe
incq %rbx
movq 0x88(%rsp), %rax
subq 0x80(%rsp), %rax
shrq $0x5, %rax
cltq
addq $0x20, %rbp
cmpq %rax, %rbx
jl 0x7f59c
notb %r14b
andb $0x1, %r14b
movzbl %r14b, %eax
movq 0xa8(%rsp), %r14
leaq 0x20(%rsp), %rbx
movl 0x7c(%rsp), %edx
movl 0x48(%rsp), %ecx
jmp 0x7f8ef
xorl %ebp, %ebp
movl $0x1, %eax
testb %bpl, %bpl
jne 0x7f8da
movq 0x88(%rsp), %rcx
subq 0x80(%rsp), %rcx
shrq $0x5, %rcx
testl %ecx, %ecx
jle 0x7f8da
xorl %ebx, %ebx
xorl %r12d, %r12d
xorl %r14d, %r14d
movq 0x70(%rsp), %r15
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
movq %r13, %rdi
callq 0x85436
movsd 0xd8(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %r13, %rdi
xorl %esi, %esi
callq 0x85478
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movsd 0xe0(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %r13, %rdi
movl $0x1, %esi
callq 0x85478
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movsd 0xe8(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %r13, %rdi
movl $0x2, %esi
callq 0x85478
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x1d8(%rsp), %rax
movq %rax, 0x10(%rsp)
movupd 0x1c8(%rsp), %xmm0
movupd %xmm0, (%rsp)
leaq 0x220(%rsp), %rdi
movq %r15, %rsi
callq 0x53e0c
movq %r13, %rdi
xorl %esi, %esi
callq 0x85478
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %r13, %rdi
movl $0x1, %esi
callq 0x85478
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movq %r13, %rdi
movl $0x2, %esi
callq 0x85478
movsd (%rax), %xmm2
movq 0x80(%rsp), %rax
movsd (%rax,%rbx), %xmm3
movsd 0x8(%rax,%rbx), %xmm4
movsd 0x10(%rax,%rbx), %xmm5
movq %r15, %rdi
movsd 0x18(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
callq 0x5394a
movq 0x80(%rsp), %rax
movsd 0x18(%rax,%rbx), %xmm1
ucomisd %xmm0, %xmm1
movzbl %r14b, %r14d
movl $0x1, %eax
cmoval %eax, %r14d
ja 0x7f8ba
incq %r12
movq 0x88(%rsp), %rax
subq 0x80(%rsp), %rax
shrq $0x5, %rax
cltq
addq $0x20, %rbx
cmpq %rax, %r12
jl 0x7f75c
notb %r14b
andb $0x1, %r14b
movzbl %r14b, %eax
movq 0xa8(%rsp), %r14
movq 0x1e0(%rsp), %r15
leaq 0x20(%rsp), %rbx
xorb $0x1, %bpl
movzbl %bpl, %ecx
jmp 0x7f8eb
movl %edx, %ecx
leaq 0x20(%rsp), %rbx
movl 0x7c(%rsp), %edx
addl %ecx, 0xb4(%rsp)
movl 0x120(%rsp), %ecx
addl %eax, %ecx
movl %ecx, %eax
incl %edx
cmpl $0x1f4, %edx            # imm = 0x1F4
jne 0x7f1eb
xorps %xmm1, %xmm1
cvtsi2sdl 0xb4(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movq 0x170(%rsp), %rcx
movsd 0xd723e(%rip), %xmm4    # 0x156b70
divsd %xmm4, %xmm1
movsd 0xd3c52(%rip), %xmm5    # 0x153590
mulsd %xmm5, %xmm1
movsd 0xd3c36(%rip), %xmm3    # 0x153580
mulsd %xmm3, %xmm1
movq 0x50(%rsp), %rax
movsd 0x18(%rax,%rcx), %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm2
movq 0x130(%rsp), %rax
addsd (%rax), %xmm2
movsd %xmm2, (%rax)
divsd %xmm4, %xmm0
mulsd %xmm5, %xmm0
mulsd %xmm3, %xmm0
movq 0x50(%rsp), %rax
movsd 0x18(%rax,%rcx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm1
movq 0x150(%rsp), %rax
addsd (%rax), %xmm1
movsd %xmm1, (%rax)
incq %r15
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rax, %rcx
shrq $0x5, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r15
jl 0x7f1a9
movq 0x1175f9(%rip), %rbx    # 0x196fc0
leaq 0xd748e(%rip), %rsi     # 0x156e5c
movl $0xc, %edx
movq %rbx, %rdi
callq 0x44e0
testq %r14, %r14
je 0x7f9fc
movq %r14, %rdi
callq 0x41e0
movq 0x1175d1(%rip), %rdi    # 0x196fc0
movq %r14, %rsi
movq %rax, %rdx
callq 0x44e0
jmp 0x7fa13
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x4710
movq 0x1175a6(%rip), %rdi    # 0x196fc0
leaq 0xd7448(%rip), %rsi     # 0x156e69
movl $0xc, %edx
callq 0x44e0
movl 0x270(%rsp), %esi
movq 0x117587(%rip), %rdi    # 0x196fc0
callq 0x4750
leaq 0xcfa49(%rip), %rsi     # 0x14f48e
movl $0x3, %edx
movq %rax, %rdi
callq 0x44e0
movq 0x130(%rsp), %rax
movsd (%rax), %xmm0
movq 0x11755b(%rip), %rdi    # 0x196fc0
callq 0x46b0
leaq 0xcfa1d(%rip), %rsi     # 0x14f48e
movl $0x3, %edx
movq %rax, %rdi
callq 0x44e0
movq 0x11753b(%rip), %rdi    # 0x196fc0
leaq 0xd73ea(%rip), %rsi     # 0x156e76
movl $0x9, %edx
callq 0x44e0
movq 0x150(%rsp), %rax
movsd (%rax), %xmm0
movq 0x117517(%rip), %rdi    # 0x196fc0
callq 0x46b0
leaq 0xcf9d9(%rip), %rsi     # 0x14f48e
movl $0x3, %edx
movq %rax, %rdi
callq 0x44e0
movq 0x1174f7(%rip), %rdi    # 0x196fc0
leaq 0xd5a5e(%rip), %rsi     # 0x15552e
movl $0x1, %edx
callq 0x44e0
movq 0x130(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x70(%rsp)
movq 0x180(%rsp), %rdi
testq %rdi, %rdi
je 0x7fb09
movq 0x190(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x7fb26
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x7fb3d
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x150(%rsp), %rdi
testq %rdi, %rdi
je 0x7fb5a
movq 0x160(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x7fb77
movq 0x140(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movsd 0x70(%rsp), %xmm0
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xcfb0f(%rip), %rdi     # 0x14f6a5
movq %r15, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0xcfafe(%rip), %rdi     # 0x14f6a5
movq %rbp, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0xcfaed(%rip), %rdi     # 0x14f6a5
xorl %eax, %eax
callq 0x4630
movq %rax, %r15
jmp 0x7fbc7
movq %rbx, %r15
leaq 0xcfad7(%rip), %rdi     # 0x14f6a5
movq %r15, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0xcfac6(%rip), %rdi     # 0x14f6a5
movq %r15, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0xcfab5(%rip), %rdi     # 0x14f6a5
movq %r15, %rsi
xorl %eax, %eax
callq 0x4630
jmp 0x7fc5f
jmp 0x7fc5f
jmp 0x7fc00
movq %rax, %rbx
jmp 0x7fc7f
jmp 0x7fc19
jmp 0x7fc5f
jmp 0x7fc5f
jmp 0x7fc5f
jmp 0x7fc20
jmp 0x7fc5f
jmp 0x7fc5f
jmp 0x7fc5f
jmp 0x7fc5f
jmp 0x7fc19
movq %rax, %rbx
jmp 0x7fc40
jmp 0x7fc5f
movq %rax, %rbx
movq 0x1a0(%rsp), %rdi
testq %rdi, %rdi
je 0x7fc40
movq 0x1b0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x7fc7f
movq 0x30(%rsp), %rsi
jmp 0x7fc77
jmp 0x7fc5f
jmp 0x7fc5f
jmp 0x7fc5f
jmp 0x7fc5f
jmp 0x7fc5f
jmp 0x7fc5f
jmp 0x7fc5f
movq %rax, %rbx
movq 0x180(%rsp), %rdi
testq %rdi, %rdi
je 0x7fc7f
movq 0x190(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x7fc9c
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x7fcb3
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x150(%rsp), %rdi
testq %rdi, %rdi
je 0x7fcd0
movq 0x160(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x7fced
movq 0x140(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq %rbx, %rdi
callq 0x4780
nop