// File: Luthaf[P]zeopp/area_and_volume.cc
// Function: calcASA(ATOM_NETWORK*, ATOM_NETWORK*, bool, double, double, double, int, bool, std::ostream&, char*, bool, bool, bool, bool)
double calcASA(ATOM_NETWORK *hiaccatmnet, ATOM_NETWORK *orgatmnet, bool highAccuracy, double r_probe_chan, double r_probe, double rho_crystal, int numSamples, bool excludePockets, ostream &output, char *filename, bool visualize, bool VisITflag, bool LiverpoolFlag, bool ExtendedOutputFlag){

  ATOM_NETWORK *atmnet; // pointed to the analyzed (original atomsnet)

  if(highAccuracy) atmnet=orgatmnet; else atmnet = hiaccatmnet; // this ensures that the loops below loop over original atoms
                                                                // and not "high-acuracy" clusters, which are used only for
                                                                // voronoi decomposition

  // Create an object that handles analysis of accessibility of sampled points
  AccessibilityClass accessAnalysis;
  if(highAccuracy) accessAnalysis.setupAndFindChannels(hiaccatmnet, orgatmnet, highAccuracy, r_probe_chan, r_probe);
    else accessAnalysis.setupAndFindChannels(hiaccatmnet, hiaccatmnet, highAccuracy, r_probe_chan, r_probe);

  accessAnalysis.removeOverlappedNodes();

  srand(randSeed);

  vector<Point> axsPoints   = vector<Point> (); // List of accessible points to be visualized in ZeoVis
  vector<int> axsPointsChannelIDs;  // corresponding channel IDs
  vector<Point> inaxsPoints = vector<Point> (); // List of inaccessible points to be visualized in ZeoVis
  vector<int> inaxsPointsPocketIDs; // corresponding pocket IDs
  double totalSA = 0;
  double totalSA_inaxs = 0;

  vector<double> totalSA_inChannel(accessAnalysis.n_channels,0);
  vector<double> totalSA_inPocket(accessAnalysis.n_pockets,0);

  //vectors that store SA contributions per atom (a pair of accessible and inaccessible)
  vector< pair <double,double> > histogramSAperAtom;

  // Sample around each of the network's atoms
  for(int i = 0; i < atmnet->numAtoms; i++){
    int count = 0;
    int count_inaxs = 0;
    // MC statistics can be collected w.r.t to identified channels and inaccessible pockets
    vector<int> count_inChannel(accessAnalysis.n_channels,0);
    vector<int> count_inPocket(accessAnalysis.n_pockets,0);

    for(int j = 0; j < numSamples; j++){
      bool overlaps = false;
      bool inside = false;

      // 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 *= (atmnet->atoms[i].radius + r_probe);
      ypoint *= (atmnet->atoms[i].radius + r_probe);
      zpoint *= (atmnet->atoms[i].radius + r_probe);

      // Convert (x,y,z) coordinates to ones relative to the unit cell vectors
      Point abc_coords = atmnet->xyz_to_abc(xpoint, ypoint, zpoint);

      // Transform coords relative to the atom center into ones relative to the unit cell vectors
      double newAPoint = abc_coords[0] + atmnet->atoms[i].a_coord;
      double newBPoint = abc_coords[1] + atmnet->atoms[i].b_coord;
      double newCPoint = abc_coords[2] + atmnet->atoms[i].c_coord;

      Point samplingPoint = atmnet->abc_to_xyz(newAPoint, newBPoint, newCPoint);


      // Calling accessibility object to determine accessibility of the point (this replaced a big chunk of code by Thomas)
      pair<bool,bool> answer = (accessAnalysis.isSPointInsideAtomAndNotAccessible(samplingPoint, i));
      inside = answer.first; overlaps = answer.second;
      if(accessAnalysis.needToResample() == true) j--; // the sampled point could not be analyzed in isSPointInsideAtomAndNotAccessible() function, resampling needed

      if(inside == false && excludePockets == false) overlaps = false; // if ignore inacceible pockets, treat the point as accessible (unless inside atom)


      // Store sampled points that did not overlap within atom for later visualization
      if(accessAnalysis.needToResample() == false && !inside) {
	Point abcCoords = Point(newAPoint, newBPoint, newCPoint);
	Point coords = atmnet->abc_to_xyz(atmnet->shiftABCInUC(abcCoords));
	if(overlaps)
          {
          count_inaxs++;
	  inaxsPoints.push_back(coords);
          pair <int,int> CoP = accessAnalysis.lastChannelOrPocket();
          if(CoP.first!=-1)
            {
            cout << "Error: CoP.first!=-1 in pocket, consult source code provider\n";
            } else {
            count_inPocket[CoP.second]++;
            };
          inaxsPointsPocketIDs.push_back(CoP.second);
          }
	else
          {
	  axsPoints.push_back(coords);
          count++;
          pair <int,int> CoP = accessAnalysis.lastChannelOrPocket();
          if(CoP.second!=-1)
            {
            cout << "Error: CoP.second!=-1 in channel, consult source code provider\n";
            } else {
            count_inChannel[CoP.first]++;
            };
          axsPointsChannelIDs.push_back(CoP.first);
          };
      }

//      if(accessAnalysis.needToResample() == false && !overlaps)
//        count++;
    }
   
    // SA per atom (in accessible space and in inaccessible pockets)
    double SAperAtom = (1.0*count)/numSamples * 4.0 * PI * pow((atmnet->atoms.at(i).radius + r_probe),2);
    double SAperAtom_inaxs = (1.0*count_inaxs)/numSamples * 4.0 * PI * pow((atmnet->atoms.at(i).radius + r_probe),2);

    //Increment total surface area by fraction of atom that is accessible
    totalSA += SAperAtom;
    //and inaccessible
    totalSA_inaxs += SAperAtom_inaxs;

    // SA per channel and pocket
    for(unsigned int m = 0; m < totalSA_inChannel.size(); m++)
      {
      totalSA_inChannel[m] += (1.0*count_inChannel[m])/numSamples * 4.0 * PI * pow((atmnet->atoms.at(i).radius + r_probe),2);
      };
    for(unsigned int m = 0; m < totalSA_inPocket.size(); m++)
      {
      totalSA_inPocket[m] += (1.0*count_inPocket[m])/numSamples * 4.0 * PI * pow((atmnet->atoms.at(i).radius + r_probe),2);
      };

    histogramSAperAtom.push_back(pair <double,double> (SAperAtom,SAperAtom_inaxs));

  }

  // Write the necessary commands to the output stream
  // necessary to visualize the sampling
  if(visualize){
    if(VisITflag == false)
      {
      reportPoints(output, axsPoints, inaxsPoints);
      }
    else{
      if(LiverpoolFlag == false)
        {
        //report points in std. VisIt format
        reportPointsVisIT(output, axsPoints, inaxsPoints);
        }
      else{
      //report points in Liverpool format
      vector<Point> LiverpoolAxsPoints = vector<Point> ();
      vector<Point> LiverpoolInaxsPoints = vector<Point> ();
      for(unsigned i = 0; i < axsPoints.size(); i++)
         {
         LiverpoolAxsPoints.push_back(atmnet->xyz_to_abc(axsPoints[i]));
         };
      for(unsigned j = 0; j < inaxsPoints.size(); j++)
         {
         LiverpoolInaxsPoints.push_back(atmnet->xyz_to_abc(inaxsPoints[j]));
         };
//      reportPointsVisIT(output, LiverpoolAxsPoints, LiverpoolInaxsPoints);
      reportPointsVisIT(output, LiverpoolAxsPoints, axsPointsChannelIDs, LiverpoolInaxsPoints, inaxsPointsPocketIDs);
      };
      };
    //reportResampledPoints(output, resampledInfo);
  }


  double ucVolume    = calcDeterminant(atmnet->ucVectors);   
  double saPerVolume = (totalSA/ucVolume)*pow(10.0,4.0); // Units of m^2/cm^3
  double saPerMass   = saPerVolume/rho_crystal;          // Units of m^2/g

  double saPerVolume_inaxs = (totalSA_inaxs/ucVolume)*pow(10.0,4.0); // Units of m^2/cm^3
  double saPerMass_inaxs   = saPerVolume_inaxs/rho_crystal;          // Units of m^2/g

  if(!visualize){
//    output << newAtomNet.name << " ";
    output << "@ " << filename << " ";
    output << "Unitcell_volume: " << ucVolume << "   Density: " << rho_crystal << "   ";
    output << "ASA_A^2: " << totalSA << " "
	   << "ASA_m^2/cm^3: " << saPerVolume << " "
	   << "ASA_m^2/g: " << saPerMass << " "
           << "NASA_A^2: " << totalSA_inaxs << " "
           << "NASA_m^2/cm^3: " << saPerVolume_inaxs << " "
           << "NASA_m^2/g: " << saPerMass_inaxs << "\n";
  }

  // Surface composition histogram
  if(!visualize&&ExtendedOutputFlag){
    double metalFrac = 0, metalFrac_inaxs = 0;

    for(int i = 0; i < atmnet->numAtoms; i++)
       {
       if(isMetal(atmnet->atoms[i].type) == true) 
         {
         metalFrac+= histogramSAperAtom.at(i).first;
         metalFrac_inaxs += histogramSAperAtom.at(i).second;
         };
       };

    metalFrac = metalFrac / totalSA;
    if(totalSA == 0) metalFrac=0;
    metalFrac_inaxs = metalFrac_inaxs / totalSA_inaxs;
    if(totalSA_inaxs == 0) metalFrac_inaxs =0;

    output << "# " << filename << " Metal fraction in ASA and NASA: " << metalFrac << "   " << metalFrac_inaxs << "\n";
  };

  // extended output
  if(!visualize){
    output << "Number_of_channels: " << totalSA_inChannel.size()  << " Channel_surface_area_A^2: ";
    for(unsigned int i = 0; i < totalSA_inChannel.size(); i++)
      {
      output << totalSA_inChannel[i] << "  ";
      };
    output << "\nNumber_of_pockets: " << totalSA_inPocket.size()  << " Pocket_surface_area_A^2: ";
    for(unsigned int i = 0; i < totalSA_inPocket.size(); i++)
      {
      output << totalSA_inPocket[i] << "  ";
      };
    output << "\n";
    };

    
    // Warn user if points were resampled
  int resampleCount =  accessAnalysis.getResampleCount();
  if(resampleCount != 0){
    cerr << "\n" << "\n"
  	 << "Warning: Resampled " << resampleCount << " points out of " << atmnet->numAtoms*numSamples 
	 << "\n" << "\n"; 
  }
  accessAnalysis.deconstruct();
  return totalSA;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1210, %rsp           # imm = 0x1210
movl %r8d, %eax
movl %ecx, %r8d
movq %rsi, %r11
movq %rdi, %rbx
movb %al, %dil
movb %dl, %r10b
movb 0x30(%rbp), %al
movb 0x28(%rbp), %cl
movb 0x20(%rbp), %dl
movb 0x18(%rbp), %sil
movq 0x10(%rbp), %r14
movq %rbx, -0x18(%rbp)
movq %r11, -0x20(%rbp)
andb $0x1, %r10b
movb %r10b, -0x21(%rbp)
movsd %xmm0, -0x30(%rbp)
movsd %xmm1, -0x38(%rbp)
movsd %xmm2, -0x40(%rbp)
movl %r8d, -0x44(%rbp)
andb $0x1, %dil
movb %dil, -0x45(%rbp)
movq %r9, -0x50(%rbp)
andb $0x1, %sil
movb %sil, -0x51(%rbp)
andb $0x1, %dl
movb %dl, -0x52(%rbp)
andb $0x1, %cl
movb %cl, -0x53(%rbp)
andb $0x1, %al
movb %al, -0x54(%rbp)
testb $0x1, -0x21(%rbp)
je 0x80849
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x80851
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0xaa0(%rbp), %rdi
callq 0x84640
testb $0x1, -0x21(%rbp)
je 0x808a3
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movzbl -0x21(%rbp), %ecx
andl $0x1, %ecx
leaq -0xaa0(%rbp), %rdi
callq 0xfd200
jmp 0x8088a
jmp 0x808cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xaa8(%rbp)
movl %eax, -0xaac(%rbp)
jmp 0x824c9
movq -0x18(%rbp), %rdx
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movzbl -0x21(%rbp), %ecx
andl $0x1, %ecx
leaq -0xaa0(%rbp), %rdi
movq %rdx, %rsi
callq 0xfd200
jmp 0x808c9
jmp 0x808cb
leaq -0xaa0(%rbp), %rdi
callq 0xfd810
jmp 0x808d9
movl $0x3b4ca6f5, %edi       # imm = 0x3B4CA6F5
callq 0x5510
xorps %xmm0, %xmm0
movaps %xmm0, -0xf10(%rbp)
movaps %xmm0, -0xad0(%rbp)
movq $0x0, -0xac0(%rbp)
leaq -0xad0(%rbp), %rdi
callq 0xed40
leaq -0xae8(%rbp), %rdi
callq 0xd0d0
movaps -0xf10(%rbp), %xmm0
movaps %xmm0, -0xb00(%rbp)
movq $0x0, -0xaf0(%rbp)
leaq -0xb00(%rbp), %rdi
callq 0xed40
leaq -0xb18(%rbp), %rdi
callq 0xd0d0
movq $0x0, -0xb20(%rbp)
movq $0x0, -0xb28(%rbp)
movslq -0x118(%rbp), %rax
movq %rax, -0xf00(%rbp)
movq $0x0, -0xb48(%rbp)
leaq -0xb49(%rbp), %rdi
movq %rdi, -0xef8(%rbp)
callq 0x10b20
movq -0xf00(%rbp), %rsi
movq -0xef8(%rbp), %rcx
leaq -0xb40(%rbp), %rdi
leaq -0xb48(%rbp), %rdx
callq 0x64ff0
jmp 0x809ad
leaq -0xb49(%rbp), %rdi
callq 0x1ebe0
movslq -0x114(%rbp), %rax
movq %rax, -0xf20(%rbp)
movq $0x0, -0xb70(%rbp)
leaq -0xb71(%rbp), %rdi
movq %rdi, -0xf18(%rbp)
callq 0x10b20
movq -0xf20(%rbp), %rsi
movq -0xf18(%rbp), %rcx
leaq -0xb68(%rbp), %rdi
leaq -0xb70(%rbp), %rdx
callq 0x64ff0
jmp 0x80a08
leaq -0xb71(%rbp), %rdi
callq 0x1ebe0
leaq -0xb90(%rbp), %rdi
callq 0x850a0
movl $0x0, -0xb94(%rbp)
movl -0xb94(%rbp), %eax
movq -0x60(%rbp), %rcx
cmpl 0x110(%rcx), %eax
jge 0x815c8
movl $0x0, -0xb98(%rbp)
movl $0x0, -0xb9c(%rbp)
movslq -0x118(%rbp), %rax
movq %rax, -0xf30(%rbp)
movl $0x0, -0xbbc(%rbp)
leaq -0xbbd(%rbp), %rdi
movq %rdi, -0xf28(%rbp)
callq 0x10960
movq -0xf30(%rbp), %rsi
movq -0xf28(%rbp), %rcx
leaq -0xbb8(%rbp), %rdi
leaq -0xbbc(%rbp), %rdx
callq 0x65a70
jmp 0x80aa2
leaq -0xbbd(%rbp), %rdi
callq 0x13030
movslq -0x114(%rbp), %rax
movq %rax, -0xf40(%rbp)
movl $0x0, -0xbdc(%rbp)
leaq -0xbdd(%rbp), %rdi
movq %rdi, -0xf38(%rbp)
callq 0x10960
movq -0xf40(%rbp), %rsi
movq -0xf38(%rbp), %rcx
leaq -0xbd8(%rbp), %rdi
leaq -0xbdc(%rbp), %rdx
callq 0x65a70
jmp 0x80afc
leaq -0xbdd(%rbp), %rdi
callq 0x13030
movl $0x0, -0xbe4(%rbp)
movl -0xbe4(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x811ee
movb $0x0, -0xbe5(%rbp)
movb $0x0, -0xbe6(%rbp)
callq 0x5190
cvtsi2sd %eax, %xmm0
movsd 0x175ac8(%rip), %xmm1   # 0x1f6608
movsd %xmm1, -0xf58(%rbp)
divsd %xmm1, %xmm0
addsd %xmm0, %xmm0
movsd 0x175ad8(%rip), %xmm1   # 0x1f6630
mulsd %xmm1, %xmm0
movsd %xmm0, -0xbf0(%rbp)
callq 0x5190
movsd -0xf58(%rbp), %xmm0
cvtsi2sd %eax, %xmm1
divsd %xmm0, %xmm1
addsd %xmm1, %xmm1
movsd 0x1714cb(%rip), %xmm0   # 0x1f2050
subsd %xmm1, %xmm0
movsd %xmm0, -0xbf8(%rbp)
movsd -0xbf8(%rbp), %xmm0
callq 0x54f0
movsd %xmm0, -0xc00(%rbp)
movsd -0xc00(%rbp), %xmm0
callq 0x5140
movsd %xmm0, -0xf50(%rbp)
movsd -0xbf0(%rbp), %xmm0
callq 0x5970
movaps %xmm0, %xmm1
movsd -0xf50(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0xc08(%rbp)
movsd -0xc00(%rbp), %xmm0
callq 0x5140
movsd %xmm0, -0xf48(%rbp)
movsd -0xbf0(%rbp), %xmm0
callq 0x5140
movaps %xmm0, %xmm1
movsd -0xf48(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0xc10(%rbp)
movsd -0xbf8(%rbp), %xmm0
movsd %xmm0, -0xc18(%rbp)
movq -0x60(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movslq -0xb94(%rbp), %rsi
callq 0xfcc0
movsd 0x30(%rax), %xmm1
movsd -0x38(%rbp), %xmm0
addsd %xmm0, %xmm1
movsd -0xc08(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0xc08(%rbp)
movq -0x60(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movslq -0xb94(%rbp), %rsi
callq 0xfcc0
movsd 0x30(%rax), %xmm1
movsd -0x38(%rbp), %xmm0
addsd %xmm0, %xmm1
movsd -0xc10(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0xc10(%rbp)
movq -0x60(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movslq -0xb94(%rbp), %rsi
callq 0xfcc0
movsd 0x30(%rax), %xmm1
movsd -0x38(%rbp), %xmm0
addsd %xmm0, %xmm1
movsd -0xc18(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0xc18(%rbp)
movq -0x60(%rbp), %rsi
movsd -0xc08(%rbp), %xmm0
movsd -0xc10(%rbp), %xmm1
movsd -0xc18(%rbp), %xmm2
leaq -0xc30(%rbp), %rdi
callq 0x97360
jmp 0x80cfd
leaq -0xc30(%rbp), %rdi
xorl %esi, %esi
callq 0xe9d70
movq %rax, -0xf60(%rbp)
jmp 0x80d14
movq -0xf60(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0xf70(%rbp)
movq -0x60(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movslq -0xb94(%rbp), %rsi
callq 0xfcc0
movsd -0xf70(%rbp), %xmm0
movsd 0x18(%rax), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0xc38(%rbp)
leaq -0xc30(%rbp), %rdi
movl $0x1, %esi
callq 0xe9d70
movq %rax, -0xf68(%rbp)
jmp 0x80d71
movq -0xf68(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0xf80(%rbp)
movq -0x60(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movslq -0xb94(%rbp), %rsi
callq 0xfcc0
movsd -0xf80(%rbp), %xmm0
movsd 0x20(%rax), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0xc40(%rbp)
leaq -0xc30(%rbp), %rdi
movl $0x2, %esi
callq 0xe9d70
movq %rax, -0xf78(%rbp)
jmp 0x80dce
movq -0xf78(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0xf88(%rbp)
movq -0x60(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movslq -0xb94(%rbp), %rsi
callq 0xfcc0
movsd -0xf88(%rbp), %xmm0
movsd 0x28(%rax), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0xc48(%rbp)
movq -0x60(%rbp), %rsi
movsd -0xc38(%rbp), %xmm0
movsd -0xc40(%rbp), %xmm1
movsd -0xc48(%rbp), %xmm2
leaq -0xc60(%rbp), %rdi
callq 0x97170
jmp 0x80e3b
movq -0xc50(%rbp), %rax
movq %rax, -0xc70(%rbp)
movups -0xc60(%rbp), %xmm0
movaps %xmm0, -0xc80(%rbp)
movl -0xb94(%rbp), %esi
movq -0xc70(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x10(%rax)
movaps -0xc80(%rbp), %xmm0
movups %xmm0, (%rax)
leaq -0xaa0(%rbp), %rdi
callq 0xfe860
movw %ax, -0xf8a(%rbp)
jmp 0x80e8a
movw -0xf8a(%rbp), %ax
movw %ax, -0xc62(%rbp)
movb -0xc62(%rbp), %al
andb $0x1, %al
movb %al, -0xbe6(%rbp)
movb -0xc61(%rbp), %al
andb $0x1, %al
movb %al, -0xbe5(%rbp)
leaq -0xaa0(%rbp), %rdi
callq 0x847d0
movb %al, -0xf8b(%rbp)
jmp 0x80ec8
movb -0xf8b(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x80f9f
movl -0xbe4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xbe4(%rbp)
jmp 0x80f9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xaa8(%rbp)
movl %eax, -0xaac(%rbp)
leaq -0xb49(%rbp), %rdi
callq 0x1ebe0
jmp 0x82499
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xaa8(%rbp)
movl %eax, -0xaac(%rbp)
leaq -0xb71(%rbp), %rdi
callq 0x1ebe0
jmp 0x8248d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xaa8(%rbp)
movl %eax, -0xaac(%rbp)
leaq -0xbbd(%rbp), %rdi
callq 0x13030
jmp 0x82475
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xaa8(%rbp)
movl %eax, -0xaac(%rbp)
leaq -0xbdd(%rbp), %rdi
callq 0x13030
jmp 0x815b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xaa8(%rbp)
movl %eax, -0xaac(%rbp)
leaq -0xbd8(%rbp), %rdi
callq 0xec80
jmp 0x815b7
movb -0xbe6(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x80fc3
movb -0x45(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x80fc3
movb $0x0, -0xbe5(%rbp)
leaq -0xaa0(%rbp), %rdi
callq 0x847d0
movb %al, -0xf8c(%rbp)
jmp 0x80fd7
movb -0xf8c(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x811d8
testb $0x1, -0xbe6(%rbp)
jne 0x811d8
movsd -0xc38(%rbp), %xmm0
movsd -0xc40(%rbp), %xmm1
movsd -0xc48(%rbp), %xmm2
leaq -0xc98(%rbp), %rdi
callq 0xe9c70
jmp 0x8101e
movq -0x60(%rbp), %rsi
movq %rsi, -0xf98(%rbp)
movq -0xc88(%rbp), %rax
movq %rax, -0xcd0(%rbp)
movups -0xc98(%rbp), %xmm0
movaps %xmm0, -0xce0(%rbp)
movq -0xcd0(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x10(%rax)
movaps -0xce0(%rbp), %xmm0
movups %xmm0, (%rax)
leaq -0xcc8(%rbp), %rdi
callq 0x97e90
jmp 0x8106b
movq -0xf98(%rbp), %rsi
movq -0xcb8(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x10(%rax)
movups -0xcc8(%rbp), %xmm0
movups %xmm0, (%rax)
leaq -0xcb0(%rbp), %rdi
callq 0x961d0
jmp 0x81098
testb $0x1, -0xbe5(%rbp)
je 0x8113f
movl -0xb9c(%rbp), %eax
incl %eax
movl %eax, -0xb9c(%rbp)
leaq -0xb00(%rbp), %rdi
leaq -0xcb0(%rbp), %rsi
callq 0x59bf0
jmp 0x810c8
leaq -0xaa0(%rbp), %rdi
callq 0x84840
movq %rax, -0xfa0(%rbp)
jmp 0x810dd
movq -0xfa0(%rbp), %rax
movq %rax, -0xce8(%rbp)
cmpl $-0x1, -0xce8(%rbp)
je 0x8110b
movq 0x1f1ec5(%rip), %rdi    # 0x272fc0
leaq 0x17561e(%rip), %rsi    # 0x1f6720
callq 0x5540
jmp 0x81109
jmp 0x81125
movslq -0xce4(%rbp), %rsi
leaq -0xbd8(%rbp), %rdi
callq 0xed60
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
leaq -0xce4(%rbp), %rsi
leaq -0xb18(%rbp), %rdi
callq 0xd1b0
jmp 0x8113a
jmp 0x811d6
leaq -0xad0(%rbp), %rdi
leaq -0xcb0(%rbp), %rsi
callq 0x59bf0
jmp 0x81154
movl -0xb98(%rbp), %eax
incl %eax
movl %eax, -0xb98(%rbp)
leaq -0xaa0(%rbp), %rdi
callq 0x84840
movq %rax, -0xfa8(%rbp)
jmp 0x81177
movq -0xfa8(%rbp), %rax
movq %rax, -0xcf0(%rbp)
cmpl $-0x1, -0xcec(%rbp)
je 0x811a5
movq 0x1f1e2b(%rip), %rdi    # 0x272fc0
leaq 0x1755c2(%rip), %rsi    # 0x1f675e
callq 0x5540
jmp 0x811a3
jmp 0x811bf
movslq -0xcf0(%rbp), %rsi
leaq -0xbb8(%rbp), %rdi
callq 0xed60
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
leaq -0xae8(%rbp), %rdi
leaq -0xcf0(%rbp), %rsi
callq 0xd1b0
jmp 0x811d4
jmp 0x811d6
jmp 0x811d8
jmp 0x811da
movl -0xbe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbe4(%rbp)
jmp 0x80b12
cvtsi2sdl -0xb98(%rbp), %xmm0
cvtsi2sdl -0x44(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd 0x175421(%rip), %xmm1   # 0x1f6628
mulsd %xmm1, %xmm0
movsd 0x17541d(%rip), %xmm1   # 0x1f6630
mulsd %xmm1, %xmm0
movsd %xmm0, -0xfb8(%rbp)
movq -0x60(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movslq -0xb94(%rbp), %rsi
callq 0xf090
movq %rax, -0xfb0(%rbp)
jmp 0x8123f
movq -0xfb0(%rbp), %rax
movsd 0x30(%rax), %xmm0
movsd -0x38(%rbp), %xmm1
addsd %xmm1, %xmm0
movl $0x2, %edi
callq 0x850c0
movsd %xmm0, -0xfc0(%rbp)
jmp 0x81268
movsd -0xfc0(%rbp), %xmm1
movsd -0xfb8(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0xcf8(%rbp)
cvtsi2sdl -0xb9c(%rbp), %xmm0
cvtsi2sdl -0x44(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd 0x17538b(%rip), %xmm1   # 0x1f6628
mulsd %xmm1, %xmm0
movsd 0x175387(%rip), %xmm1   # 0x1f6630
mulsd %xmm1, %xmm0
movsd %xmm0, -0xfd0(%rbp)
movq -0x60(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movslq -0xb94(%rbp), %rsi
callq 0xf090
movq %rax, -0xfc8(%rbp)
jmp 0x812d5
movq -0xfc8(%rbp), %rax
movsd 0x30(%rax), %xmm0
movsd -0x38(%rbp), %xmm1
addsd %xmm1, %xmm0
movl $0x2, %edi
callq 0x850c0
movsd %xmm0, -0xfd8(%rbp)
jmp 0x812fe
movsd -0xfd8(%rbp), %xmm1
movsd -0xfd0(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0xd00(%rbp)
movsd -0xcf8(%rbp), %xmm0
addsd -0xb20(%rbp), %xmm0
movsd %xmm0, -0xb20(%rbp)
movsd -0xd00(%rbp), %xmm0
addsd -0xb28(%rbp), %xmm0
movsd %xmm0, -0xb28(%rbp)
movl $0x0, -0xd04(%rbp)
movl -0xd04(%rbp), %eax
movq %rax, -0xfe0(%rbp)
leaq -0xb40(%rbp), %rdi
callq 0xf990
movq %rax, %rcx
movq -0xfe0(%rbp), %rax
cmpq %rcx, %rax
jae 0x81452
movl -0xd04(%rbp), %eax
movl %eax, %esi
leaq -0xbb8(%rbp), %rdi
callq 0xed60
cvtsi2sdl (%rax), %xmm0
cvtsi2sdl -0x44(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd 0x17527f(%rip), %xmm1   # 0x1f6628
mulsd %xmm1, %xmm0
movsd 0x17527b(%rip), %xmm1   # 0x1f6630
mulsd %xmm1, %xmm0
movsd %xmm0, -0xff0(%rbp)
movq -0x60(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movslq -0xb94(%rbp), %rsi
callq 0xf090
movq %rax, -0xfe8(%rbp)
jmp 0x813e1
movq -0xfe8(%rbp), %rax
movsd 0x30(%rax), %xmm0
movsd -0x38(%rbp), %xmm1
addsd %xmm1, %xmm0
movl $0x2, %edi
callq 0x850c0
movsd %xmm0, -0xff8(%rbp)
jmp 0x8140a
movl -0xd04(%rbp), %eax
movl %eax, %esi
leaq -0xb40(%rbp), %rdi
callq 0xedb0
movsd -0xff0(%rbp), %xmm0
movsd -0xff8(%rbp), %xmm2
movsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl -0xd04(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd04(%rbp)
jmp 0x81354
movl $0x0, -0xd08(%rbp)
movl -0xd08(%rbp), %eax
movq %rax, -0x1000(%rbp)
leaq -0xb68(%rbp), %rdi
callq 0xf990
movq %rax, %rcx
movq -0x1000(%rbp), %rax
cmpq %rcx, %rax
jae 0x8155a
movl -0xd08(%rbp), %eax
movl %eax, %esi
leaq -0xbd8(%rbp), %rdi
callq 0xed60
cvtsi2sdl (%rax), %xmm0
cvtsi2sdl -0x44(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd 0x175177(%rip), %xmm1   # 0x1f6628
mulsd %xmm1, %xmm0
movsd 0x175173(%rip), %xmm1   # 0x1f6630
mulsd %xmm1, %xmm0
movsd %xmm0, -0x1010(%rbp)
movq -0x60(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movslq -0xb94(%rbp), %rsi
callq 0xf090
movq %rax, -0x1008(%rbp)
jmp 0x814e9
movq -0x1008(%rbp), %rax
movsd 0x30(%rax), %xmm0
movsd -0x38(%rbp), %xmm1
addsd %xmm1, %xmm0
movl $0x2, %edi
callq 0x850c0
movsd %xmm0, -0x1018(%rbp)
jmp 0x81512
movl -0xd08(%rbp), %eax
movl %eax, %esi
leaq -0xb68(%rbp), %rdi
callq 0xedb0
movsd -0x1010(%rbp), %xmm0
movsd -0x1018(%rbp), %xmm2
movsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl -0xd08(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd08(%rbp)
jmp 0x8145c
leaq -0xd18(%rbp), %rdi
leaq -0xcf8(%rbp), %rsi
leaq -0xd00(%rbp), %rdx
callq 0x85120
jmp 0x81576
leaq -0xb90(%rbp), %rdi
leaq -0xd18(%rbp), %rsi
callq 0x850f0
jmp 0x8158b
leaq -0xbd8(%rbp), %rdi
callq 0xec80
leaq -0xbb8(%rbp), %rdi
callq 0xec80
movl -0xb94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb94(%rbp)
jmp 0x80a2a
leaq -0xbb8(%rbp), %rdi
callq 0xec80
jmp 0x82475
testb $0x1, -0x51(%rbp)
je 0x81abb
movb -0x52(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x816ab
movq -0x50(%rbp), %rax
movq %rax, -0x1020(%rbp)
leaq -0xd30(%rbp), %rdi
leaq -0xad0(%rbp), %rsi
callq 0xedd0
jmp 0x81603
leaq -0xd48(%rbp), %rdi
leaq -0xb00(%rbp), %rsi
callq 0xedd0
jmp 0x81618
movq -0x1020(%rbp), %rdi
leaq -0xd30(%rbp), %rsi
leaq -0xd48(%rbp), %rdx
callq 0x75d60
jmp 0x81634
leaq -0xd48(%rbp), %rdi
callq 0xefe0
leaq -0xd30(%rbp), %rdi
callq 0xefe0
jmp 0x81ab9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xaa8(%rbp)
movl %eax, -0xaac(%rbp)
jmp 0x82475
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xaa8(%rbp)
movl %eax, -0xaac(%rbp)
jmp 0x8169a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xaa8(%rbp)
movl %eax, -0xaac(%rbp)
leaq -0xd48(%rbp), %rdi
callq 0xefe0
leaq -0xd30(%rbp), %rdi
callq 0xefe0
jmp 0x82475
movb -0x53(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x8176d
movq -0x50(%rbp), %rax
movq %rax, -0x1028(%rbp)
leaq -0xd60(%rbp), %rdi
leaq -0xad0(%rbp), %rsi
callq 0xedd0
jmp 0x816dc
leaq -0xd78(%rbp), %rdi
leaq -0xb00(%rbp), %rsi
callq 0xedd0
jmp 0x816f1
movq -0x1028(%rbp), %rdi
leaq -0xd60(%rbp), %rsi
leaq -0xd78(%rbp), %rdx
callq 0x761c0
jmp 0x8170d
leaq -0xd78(%rbp), %rdi
callq 0xefe0
leaq -0xd60(%rbp), %rdi
callq 0xefe0
jmp 0x81ab7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xaa8(%rbp)
movl %eax, -0xaac(%rbp)
jmp 0x8175c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xaa8(%rbp)
movl %eax, -0xaac(%rbp)
leaq -0xd78(%rbp), %rdi
callq 0xefe0
leaq -0xd60(%rbp), %rdi
callq 0xefe0
jmp 0x82475
leaq -0xd90(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x52a0
leaq -0xd90(%rbp), %rdi
callq 0xed40
leaq -0xda8(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x52a0
leaq -0xda8(%rbp), %rdi
callq 0xed40
movl $0x0, -0xdac(%rbp)
movl -0xdac(%rbp), %eax
movq %rax, -0x1030(%rbp)
leaq -0xad0(%rbp), %rdi
callq 0x17c60
movq %rax, %rcx
movq -0x1030(%rbp), %rax
cmpq %rcx, %rax
jae 0x81884
movq -0x60(%rbp), %rax
movq %rax, -0x1038(%rbp)
movl -0xdac(%rbp), %eax
movl %eax, %esi
leaq -0xad0(%rbp), %rdi
callq 0x5c150
movq -0x1038(%rbp), %rsi
movq 0x10(%rax), %rcx
movq %rcx, -0xdd0(%rbp)
movups (%rax), %xmm0
movaps %xmm0, -0xde0(%rbp)
movq -0xdd0(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x10(%rax)
movaps -0xde0(%rbp), %xmm0
movups %xmm0, (%rax)
leaq -0xdc8(%rbp), %rdi
callq 0x96150
jmp 0x81842
leaq -0xd90(%rbp), %rdi
leaq -0xdc8(%rbp), %rsi
callq 0x59bf0
jmp 0x81857
jmp 0x81859
movl -0xdac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdac(%rbp)
jmp 0x817b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xaa8(%rbp)
movl %eax, -0xaac(%rbp)
jmp 0x81a9a
movl $0x0, -0xde4(%rbp)
movl -0xde4(%rbp), %eax
movq %rax, -0x1040(%rbp)
leaq -0xb00(%rbp), %rdi
callq 0x17c60
movq %rax, %rcx
movq -0x1040(%rbp), %rax
cmpq %rcx, %rax
jae 0x81946
movq -0x60(%rbp), %rax
movq %rax, -0x1048(%rbp)
movl -0xde4(%rbp), %eax
movl %eax, %esi
leaq -0xb00(%rbp), %rdi
callq 0x5c150
movq -0x1048(%rbp), %rsi
movq 0x10(%rax), %rcx
movq %rcx, -0xe10(%rbp)
movups (%rax), %xmm0
movaps %xmm0, -0xe20(%rbp)
movq -0xe10(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x10(%rax)
movaps -0xe20(%rbp), %xmm0
movups %xmm0, (%rax)
leaq -0xe00(%rbp), %rdi
callq 0x96150
jmp 0x8191b
leaq -0xda8(%rbp), %rdi
leaq -0xe00(%rbp), %rsi
callq 0x59bf0
jmp 0x81930
jmp 0x81932
movl -0xde4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xde4(%rbp)
jmp 0x8188e
movq -0x50(%rbp), %rax
movq %rax, -0x1050(%rbp)
leaq -0xe38(%rbp), %rdi
leaq -0xd90(%rbp), %rsi
callq 0xedd0
jmp 0x81966
leaq -0xe50(%rbp), %rdi
leaq -0xae8(%rbp), %rsi
callq 0xeec0
jmp 0x8197b
leaq -0xe68(%rbp), %rdi
leaq -0xda8(%rbp), %rsi
callq 0xedd0
jmp 0x81990
leaq -0xe80(%rbp), %rdi
leaq -0xb18(%rbp), %rsi
callq 0xeec0
jmp 0x819a5
movq -0x1050(%rbp), %rdi
leaq -0xe38(%rbp), %rsi
leaq -0xe50(%rbp), %rdx
leaq -0xe68(%rbp), %rcx
leaq -0xe80(%rbp), %r8
callq 0x763f0
jmp 0x819cf
leaq -0xe80(%rbp), %rdi
callq 0xec80
leaq -0xe68(%rbp), %rdi
callq 0xefe0
leaq -0xe50(%rbp), %rdi
callq 0xec80
leaq -0xe38(%rbp), %rdi
callq 0xefe0
leaq -0xda8(%rbp), %rdi
callq 0xefe0
leaq -0xd90(%rbp), %rdi
callq 0xefe0
jmp 0x81ab7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xaa8(%rbp)
movl %eax, -0xaac(%rbp)
jmp 0x81a8e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xaa8(%rbp)
movl %eax, -0xaac(%rbp)
jmp 0x81a82
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xaa8(%rbp)
movl %eax, -0xaac(%rbp)
jmp 0x81a76
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xaa8(%rbp)
movl %eax, -0xaac(%rbp)
leaq -0xe80(%rbp), %rdi
callq 0xec80
leaq -0xe68(%rbp), %rdi
callq 0xefe0
leaq -0xe50(%rbp), %rdi
callq 0xec80
leaq -0xe38(%rbp), %rdi
callq 0xefe0
leaq -0xda8(%rbp), %rdi
callq 0xefe0
leaq -0xd90(%rbp), %rdi
callq 0xefe0
jmp 0x82475
jmp 0x81ab9
jmp 0x81abb
movq -0x60(%rbp), %rdi
subq $-0x80, %rdi
callq 0xe9390
movsd %xmm0, -0x1058(%rbp)
jmp 0x81ad2
movsd -0x1058(%rbp), %xmm0
movsd %xmm0, -0xe88(%rbp)
movsd -0xb20(%rbp), %xmm0
divsd -0xe88(%rbp), %xmm0
movsd %xmm0, -0x1068(%rbp)
movsd 0x174b1e(%rip), %xmm0   # 0x1f6620
movsd 0x174b1e(%rip), %xmm1   # 0x1f6628
callq 0x58e0
movaps %xmm0, %xmm1
movsd -0x1068(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0xe90(%rbp)
movsd -0xe90(%rbp), %xmm0
divsd -0x40(%rbp), %xmm0
movsd %xmm0, -0xe98(%rbp)
movsd -0xb28(%rbp), %xmm0
divsd -0xe88(%rbp), %xmm0
movsd %xmm0, -0x1060(%rbp)
movsd 0x174ac5(%rip), %xmm0   # 0x1f6620
movsd 0x174ac5(%rip), %xmm1   # 0x1f6628
callq 0x58e0
movaps %xmm0, %xmm1
movsd -0x1060(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0xea0(%rbp)
movsd -0xea0(%rbp), %xmm0
divsd -0x40(%rbp), %xmm0
movsd %xmm0, -0xea8(%rbp)
testb $0x1, -0x51(%rbp)
jne 0x81e5c
movq -0x50(%rbp), %rdi
leaq 0x179d8c(%rip), %rsi    # 0x1fb935
callq 0x5540
movq %rax, -0x1070(%rbp)
jmp 0x81bb7
movq -0x1070(%rbp), %rdi
movq 0x10(%rbp), %rsi
callq 0x5540
movq %rax, -0x1078(%rbp)
jmp 0x81bd0
movq -0x1078(%rbp), %rdi
leaq 0x17a6d0(%rip), %rsi    # 0x1fc2ae
callq 0x5540
jmp 0x81be5
movq -0x50(%rbp), %rdi
leaq 0x174c92(%rip), %rsi    # 0x1f6882
callq 0x5540
movq %rax, -0x1080(%rbp)
jmp 0x81bfe
movq -0x1080(%rbp), %rdi
movsd -0xe88(%rbp), %xmm0
callq 0x5980
movq %rax, -0x1088(%rbp)
jmp 0x81c1b
movq -0x1088(%rbp), %rdi
leaq 0x174c6b(%rip), %rsi    # 0x1f6894
callq 0x5540
movq %rax, -0x1090(%rbp)
jmp 0x81c37
movq -0x1090(%rbp), %rdi
movsd -0x40(%rbp), %xmm0
callq 0x5980
movq %rax, -0x1098(%rbp)
jmp 0x81c51
movq -0x1098(%rbp), %rdi
leaq 0x170828(%rip), %rsi    # 0x1f2487
callq 0x5540
jmp 0x81c66
movq -0x50(%rbp), %rdi
leaq 0x175379(%rip), %rsi    # 0x1f6fea
callq 0x5540
movq %rax, -0x10a0(%rbp)
jmp 0x81c7f
movq -0x10a0(%rbp), %rdi
movsd -0xb20(%rbp), %xmm0
callq 0x5980
movq %rax, -0x10a8(%rbp)
jmp 0x81c9c
movq -0x10a8(%rbp), %rdi
leaq 0x17a604(%rip), %rsi    # 0x1fc2ae
callq 0x5540
movq %rax, -0x10b0(%rbp)
jmp 0x81cb8
movq -0x10b0(%rbp), %rdi
leaq 0x17532f(%rip), %rsi    # 0x1f6ff5
callq 0x5540
movq %rax, -0x10b8(%rbp)
jmp 0x81cd4
movq -0x10b8(%rbp), %rdi
movsd -0xe90(%rbp), %xmm0
callq 0x5980
movq %rax, -0x10c0(%rbp)
jmp 0x81cf1
movq -0x10c0(%rbp), %rdi
leaq 0x17a5af(%rip), %rsi    # 0x1fc2ae
callq 0x5540
movq %rax, -0x10c8(%rbp)
jmp 0x81d0d
movq -0x10c8(%rbp), %rdi
leaq 0x1752ea(%rip), %rsi    # 0x1f7005
callq 0x5540
movq %rax, -0x10d0(%rbp)
jmp 0x81d29
movq -0x10d0(%rbp), %rdi
movsd -0xe98(%rbp), %xmm0
callq 0x5980
movq %rax, -0x10d8(%rbp)
jmp 0x81d46
movq -0x10d8(%rbp), %rdi
leaq 0x17a55a(%rip), %rsi    # 0x1fc2ae
callq 0x5540
movq %rax, -0x10e0(%rbp)
jmp 0x81d62
movq -0x10e0(%rbp), %rdi
leaq 0x175279(%rip), %rsi    # 0x1f6fe9
callq 0x5540
movq %rax, -0x10e8(%rbp)
jmp 0x81d7e
movq -0x10e8(%rbp), %rdi
movsd -0xb28(%rbp), %xmm0
callq 0x5980
movq %rax, -0x10f0(%rbp)
jmp 0x81d9b
movq -0x10f0(%rbp), %rdi
leaq 0x17a505(%rip), %rsi    # 0x1fc2ae
callq 0x5540
movq %rax, -0x10f8(%rbp)
jmp 0x81db7
movq -0x10f8(%rbp), %rdi
leaq 0x17522f(%rip), %rsi    # 0x1f6ff4
callq 0x5540
movq %rax, -0x1100(%rbp)
jmp 0x81dd3
movq -0x1100(%rbp), %rdi
movsd -0xea0(%rbp), %xmm0
callq 0x5980
movq %rax, -0x1108(%rbp)
jmp 0x81df0
movq -0x1108(%rbp), %rdi
leaq 0x17a4b0(%rip), %rsi    # 0x1fc2ae
callq 0x5540
movq %rax, -0x1110(%rbp)
jmp 0x81e0c
movq -0x1110(%rbp), %rdi
leaq 0x1751ea(%rip), %rsi    # 0x1f7004
callq 0x5540
movq %rax, -0x1118(%rbp)
jmp 0x81e28
movq -0x1118(%rbp), %rdi
movsd -0xea8(%rbp), %xmm0
callq 0x5980
movq %rax, -0x1120(%rbp)
jmp 0x81e45
movq -0x1120(%rbp), %rdi
leaq 0x1777d2(%rip), %rsi    # 0x1f9625
callq 0x5540
jmp 0x81e5a
jmp 0x81e5c
testb $0x1, -0x51(%rbp)
jne 0x820e7
testb $0x1, -0x54(%rbp)
je 0x820e7
xorps %xmm0, %xmm0
movsd %xmm0, -0xeb0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0xeb8(%rbp)
movl $0x0, -0xebc(%rbp)
movl -0xebc(%rbp), %eax
movq -0x60(%rbp), %rcx
cmpl 0x110(%rcx), %eax
jge 0x81fc0
movq -0x60(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movslq -0xebc(%rbp), %rsi
callq 0xfcc0
movq %rax, %rsi
addq $0x40, %rsi
leaq -0xee0(%rbp), %rdi
callq 0x5220
jmp 0x81ed2
leaq -0xee0(%rbp), %rdi
callq 0x46d20
movb %al, -0x1121(%rbp)
jmp 0x81ee6
movb -0x1121(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1128(%rbp)
leaq -0xee0(%rbp), %rdi
callq 0x5300
movl -0x1128(%rbp), %eax
cmpl $0x1, %eax
jne 0x81faa
movslq -0xebc(%rbp), %rsi
leaq -0xb90(%rbp), %rdi
callq 0x85150
movq %rax, -0x1130(%rbp)
jmp 0x81f2e
movq -0x1130(%rbp), %rax
movsd (%rax), %xmm1
movsd -0xeb0(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xeb0(%rbp)
movslq -0xebc(%rbp), %rsi
leaq -0xb90(%rbp), %rdi
callq 0x85150
movq %rax, -0x1138(%rbp)
jmp 0x81f69
movq -0x1138(%rbp), %rax
movsd 0x8(%rax), %xmm0
addsd -0xeb8(%rbp), %xmm0
movsd %xmm0, -0xeb8(%rbp)
jmp 0x81faa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xaa8(%rbp)
movl %eax, -0xaac(%rbp)
leaq -0xee0(%rbp), %rdi
callq 0x5300
jmp 0x82475
jmp 0x81fac
movl -0xebc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xebc(%rbp)
jmp 0x81e90
movsd -0xeb0(%rbp), %xmm0
divsd -0xb20(%rbp), %xmm0
movsd %xmm0, -0xeb0(%rbp)
movsd -0xb20(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x81ff6
jp 0x81ff6
xorps %xmm0, %xmm0
movsd %xmm0, -0xeb0(%rbp)
movsd -0xeb8(%rbp), %xmm0
divsd -0xb28(%rbp), %xmm0
movsd %xmm0, -0xeb8(%rbp)
movsd -0xb28(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x8202c
jp 0x8202c
xorps %xmm0, %xmm0
movsd %xmm0, -0xeb8(%rbp)
movq -0x50(%rbp), %rdi
leaq 0x174fda(%rip), %rsi    # 0x1f7011
callq 0x5540
movq %rax, -0x1140(%rbp)
jmp 0x82045
movq -0x1140(%rbp), %rdi
movq 0x10(%rbp), %rsi
callq 0x5540
movq %rax, -0x1148(%rbp)
jmp 0x8205e
movq -0x1148(%rbp), %rdi
leaq 0x174fa8(%rip), %rsi    # 0x1f7014
callq 0x5540
movq %rax, -0x1150(%rbp)
jmp 0x8207a
movq -0x1150(%rbp), %rdi
movsd -0xeb0(%rbp), %xmm0
callq 0x5980
movq %rax, -0x1158(%rbp)
jmp 0x82097
movq -0x1158(%rbp), %rdi
leaq 0x1703e2(%rip), %rsi    # 0x1f2487
callq 0x5540
movq %rax, -0x1160(%rbp)
jmp 0x820b3
movq -0x1160(%rbp), %rdi
movsd -0xeb8(%rbp), %xmm0
callq 0x5980
movq %rax, -0x1168(%rbp)
jmp 0x820d0
movq -0x1168(%rbp), %rdi
leaq 0x177547(%rip), %rsi    # 0x1f9625
callq 0x5540
jmp 0x820e5
jmp 0x820e7
testb $0x1, -0x51(%rbp)
jne 0x822d3
movq -0x50(%rbp), %rdi
leaq 0x1747d9(%rip), %rsi    # 0x1f68d5
callq 0x5540
movq %rax, -0x1170(%rbp)
jmp 0x8210a
leaq -0xb40(%rbp), %rdi
callq 0xf990
movq -0x1170(%rbp), %rdi
movq %rax, %rsi
callq 0x5160
movq %rax, -0x1178(%rbp)
jmp 0x8212e
movq -0x1178(%rbp), %rdi
leaq 0x174efa(%rip), %rsi    # 0x1f7036
callq 0x5540
jmp 0x82143
movl $0x0, -0xee4(%rbp)
movl -0xee4(%rbp), %eax
movq %rax, -0x1180(%rbp)
leaq -0xb40(%rbp), %rdi
callq 0xf990
movq %rax, %rcx
movq -0x1180(%rbp), %rax
cmpq %rcx, %rax
jae 0x821d8
movq -0x50(%rbp), %rax
movq %rax, -0x1190(%rbp)
movl -0xee4(%rbp), %eax
movl %eax, %esi
leaq -0xb40(%rbp), %rdi
callq 0xedb0
movq -0x1190(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x5980
movq %rax, -0x1188(%rbp)
jmp 0x821ad
movq -0x1188(%rbp), %rdi
leaq 0x1702cd(%rip), %rsi    # 0x1f2488
callq 0x5540
jmp 0x821c2
jmp 0x821c4
movl -0xee4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xee4(%rbp)
jmp 0x8214d
movq -0x50(%rbp), %rdi
leaq 0x17471d(%rip), %rsi    # 0x1f6900
callq 0x5540
movq %rax, -0x1198(%rbp)
jmp 0x821f1
leaq -0xb68(%rbp), %rdi
callq 0xf990
movq -0x1198(%rbp), %rdi
movq %rax, %rsi
callq 0x5160
movq %rax, -0x11a0(%rbp)
jmp 0x82215
movq -0x11a0(%rbp), %rdi
leaq 0x174e2f(%rip), %rsi    # 0x1f7052
callq 0x5540
jmp 0x8222a
movl $0x0, -0xee8(%rbp)
movl -0xee8(%rbp), %eax
movq %rax, -0x11a8(%rbp)
leaq -0xb68(%rbp), %rdi
callq 0xf990
movq %rax, %rcx
movq -0x11a8(%rbp), %rax
cmpq %rcx, %rax
jae 0x822bf
movq -0x50(%rbp), %rax
movq %rax, -0x11b8(%rbp)
movl -0xee8(%rbp), %eax
movl %eax, %esi
leaq -0xb68(%rbp), %rdi
callq 0xedb0
movq -0x11b8(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x5980
movq %rax, -0x11b0(%rbp)
jmp 0x82294
movq -0x11b0(%rbp), %rdi
leaq 0x1701e6(%rip), %rsi    # 0x1f2488
callq 0x5540
jmp 0x822a9
jmp 0x822ab
movl -0xee8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xee8(%rbp)
jmp 0x82234
movq -0x50(%rbp), %rdi
leaq 0x17735b(%rip), %rsi    # 0x1f9625
callq 0x5540
jmp 0x822d1
jmp 0x822d3
leaq -0xaa0(%rbp), %rdi
callq 0x849d0
movl %eax, -0x11bc(%rbp)
jmp 0x822e7
movl -0x11bc(%rbp), %eax
movl %eax, -0xeec(%rbp)
cmpl $0x0, -0xeec(%rbp)
je 0x823e3
movq 0x1f0ce9(%rip), %rdi    # 0x272ff0
leaq 0x177317(%rip), %rsi    # 0x1f9625
callq 0x5540
movq %rax, -0x11c8(%rbp)
jmp 0x8231c
movq -0x11c8(%rbp), %rdi
leaq 0x1772fb(%rip), %rsi    # 0x1f9625
callq 0x5540
movq %rax, -0x11d0(%rbp)
jmp 0x82338
movq -0x11d0(%rbp), %rdi
leaq 0x174458(%rip), %rsi    # 0x1f679e
callq 0x5540
movq %rax, -0x11d8(%rbp)
jmp 0x82354
movq -0x11d8(%rbp), %rdi
movl -0xeec(%rbp), %esi
callq 0x58d0
movq %rax, -0x11e0(%rbp)
jmp 0x8236f
movq -0x11e0(%rbp), %rdi
leaq 0x174435(%rip), %rsi    # 0x1f67b2
callq 0x5540
movq %rax, -0x11e8(%rbp)
jmp 0x8238b
movq -0x11e8(%rbp), %rdi
movq -0x60(%rbp), %rax
movl 0x110(%rax), %esi
movl -0x44(%rbp), %eax
imull %eax, %esi
callq 0x58d0
movq %rax, -0x11f0(%rbp)
jmp 0x823b0
movq -0x11f0(%rbp), %rdi
leaq 0x177267(%rip), %rsi    # 0x1f9625
callq 0x5540
movq %rax, -0x11f8(%rbp)
jmp 0x823cc
movq -0x11f8(%rbp), %rdi
leaq 0x17724b(%rip), %rsi    # 0x1f9625
callq 0x5540
jmp 0x823e1
jmp 0x823e3
leaq -0xaa0(%rbp), %rdi
callq 0x849f0
jmp 0x823f1
movsd -0xb20(%rbp), %xmm0
movsd %xmm0, -0x1200(%rbp)
leaq -0xb90(%rbp), %rdi
callq 0x85190
leaq -0xb68(%rbp), %rdi
callq 0xf9d0
leaq -0xb40(%rbp), %rdi
callq 0xf9d0
leaq -0xb18(%rbp), %rdi
callq 0xec80
leaq -0xb00(%rbp), %rdi
callq 0xefe0
leaq -0xae8(%rbp), %rdi
callq 0xec80
leaq -0xad0(%rbp), %rdi
callq 0xefe0
leaq -0xaa0(%rbp), %rdi
callq 0x84a30
movsd -0x1200(%rbp), %xmm0
addq $0x1210, %rsp           # imm = 0x1210
popq %rbx
popq %r14
popq %rbp
retq
leaq -0xb90(%rbp), %rdi
callq 0x85190
leaq -0xb68(%rbp), %rdi
callq 0xf9d0
leaq -0xb40(%rbp), %rdi
callq 0xf9d0
leaq -0xb18(%rbp), %rdi
callq 0xec80
leaq -0xb00(%rbp), %rdi
callq 0xefe0
leaq -0xae8(%rbp), %rdi
callq 0xec80
leaq -0xad0(%rbp), %rdi
callq 0xefe0
leaq -0xaa0(%rbp), %rdi
callq 0x84a30
movq -0xaa8(%rbp), %rdi
callq 0x58f0
nopw %cs:(%rax,%rax)