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

 // General consts
 const double Threshold = PI/16.;

 // Output variables
 int nOMS=0;
 vector< vector<int> > OMS_atomIDs;

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

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

 double surface_slab_d = 3.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;
   };


 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));

    if(isMetal(atmnet->atoms.at(i).type) == true)
     {

     vector< vector <double> > cluster;
     vector <int> cluster_atomIDs;

     XYZ atom1(atmnet->atoms.at(i).x, atmnet->atoms.at(i).y, atmnet->atoms.at(i).z);
     vector <double> origin;
     origin.push_back(atom1.x); origin.push_back(atom1.y); origin.push_back(atom1.z);
     cluster.push_back(origin);
     cluster_atomIDs.push_back(i);

     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 = 0; j < atmnet->atoms.size(); j++)
            {
            if(i!=j)
              {
              XYZ atom2(atmnet->atoms.at(j).x, atmnet->atoms.at(j).y, atmnet->atoms.at(j).z);
              XYZ va = atmnet->v_a; XYZ vb = atmnet->v_b; XYZ vc = atmnet->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 < lookupCovRadius(atmnet->atoms.at(i).type) + lookupCovRadius(atmnet->atoms.at(j).type)  + 0.4)
               { // connected;
               vector <double> clusteratom;
               clusteratom.push_back(atom2.x); clusteratom.push_back(atom2.y); clusteratom.push_back(atom2.z);
               cluster.push_back(clusteratom);
               cluster_atomIDs.push_back(j);
               };
              };
            };
         }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(atmnet->atoms.at(j).x, atmnet->atoms.at(j).y, atmnet->atoms.at(j).z);
              XYZ va = atmnet->v_a; XYZ vb = atmnet->v_b; XYZ vc = atmnet->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 < lookupCovRadius(atmnet->atoms.at(i).type) + lookupCovRadius(atmnet->atoms.at(j).type)  + 0.4)
               { // connected;
               vector <double> clusteratom;
               clusteratom.push_back(atom2.x); clusteratom.push_back(atom2.y); clusteratom.push_back(atom2.z);
               cluster.push_back(clusteratom);
               cluster_atomIDs.push_back(j);
               };



              }; // ends loop over k
            }; // ends surfaceFlag.at(i) if

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

   if(IsExposedMoleculeThreshold(cluster, Threshold)) 
      {
      nOMS++;
      OMS_atomIDs.push_back(cluster_atomIDs);
      };

   }; // ends if isMetal
  }; // finishes loop over all atoms

 // Save output
 fstream output;
 output.open(filename, fstream::out);
 output << filename << " #OMS=  "<< nOMS << "\n";
 output.close();

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




/* Save additional atom statistics */

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

   for(unsigned int i=0; i < OMS_atomIDs.size(); i++)
      {
      output2 << atmnet->atoms.at(OMS_atomIDs[i].at(0)).type << "     ";
      output2 << OMS_atomIDs[i].size()-1 << "  ";
      for(unsigned int j=1; j < OMS_atomIDs[i].size(); j++)
         output2 << atmnet->atoms.at(OMS_atomIDs[i].at(j)).type << " ";
      output2 << "\n";
      };

   output2.close();

   }; // ends extended output


}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb50, %rsp            # imm = 0xB50
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movabsq $0x3fc921fb54442c8a, %rax # imm = 0x3FC921FB54442C8A
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x10580
leaq -0x60(%rbp), %rdi
callq 0xd0d0
leaq -0x88(%rbp), %rdi
movq %rdi, -0x8f0(%rbp)
callq 0xf670
movabsq $0x400c000000000000, %rax # imm = 0x400C000000000000
movq %rax, -0x90(%rbp)
movsd -0x90(%rbp), %xmm0
movq -0x18(%rbp), %rax
movsd 0x8(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x90(%rbp), %xmm0
movq -0x18(%rbp), %rax
movsd 0x10(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0xa0(%rbp)
movsd -0x90(%rbp), %xmm0
movq -0x18(%rbp), %rax
movsd 0x18(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0xa8(%rbp)
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
callq 0xf060
movq -0x8f0(%rbp), %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0xfea0
jmp 0xbab3
movsd -0x98(%rbp), %xmm0
movsd 0x1e658d(%rip), %xmm1   # 0x1f2050
ucomisd %xmm1, %xmm0
jae 0xbaf9
movsd -0xa0(%rbp), %xmm0
movsd 0x1e6577(%rip), %xmm1   # 0x1f2050
ucomisd %xmm1, %xmm0
jae 0xbaf9
movsd -0xa8(%rbp), %xmm0
movsd 0x1e6561(%rip), %xmm1   # 0x1f2050
ucomisd %xmm1, %xmm0
jb 0xbc47
movl $0x0, -0xb8(%rbp)
movl -0xb8(%rbp), %eax
movq %rax, -0x8f8(%rbp)
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
callq 0xf060
movq %rax, %rcx
movq -0x8f8(%rbp), %rax
cmpq %rcx, %rax
jae 0xbbcd
movl -0xb8(%rbp), %eax
movl %eax, -0xbc(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0xbc(%rbp), %rsi
callq 0xffc0
jmp 0xbb51
movl -0xb8(%rbp), %eax
movl %eax, %esi
leaq -0x88(%rbp), %rdi
callq 0xfff0
movq %rdx, -0x908(%rbp)
movq %rax, -0x900(%rbp)
jmp 0xbb75
movq -0x908(%rbp), %rax
movq -0x900(%rbp), %rcx
movq %rcx, -0xd0(%rbp)
movq %rax, -0xc8(%rbp)
leaq -0xd0(%rbp), %rdi
movl $0x1, %esi
callq 0x10040
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
jmp 0xbb03
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0xd01e
movq 0x2673ec(%rip), %rdi    # 0x272fc0
leaq 0x1e6729(%rip), %rsi    # 0x1f2304
callq 0x5540
movq %rax, -0x910(%rbp)
jmp 0xbbe9
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
callq 0xf060
movq -0x910(%rbp), %rdi
movq %rax, %rsi
callq 0x5160
movq %rax, -0x918(%rbp)
jmp 0xbc11
movq -0x918(%rbp), %rdi
leaq 0x1e66fb(%rip), %rsi    # 0x1f231a
callq 0x5540
movq %rax, -0x920(%rbp)
jmp 0xbc2d
movq -0x920(%rbp), %rdi
movq 0x26735d(%rip), %rsi    # 0x272f98
callq 0x55b0
jmp 0xbc42
jmp 0xbf16
movl $0x0, -0xd4(%rbp)
movl -0xd4(%rbp), %eax
movq %rax, -0x928(%rbp)
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
callq 0xf060
movq %rax, %rcx
movq -0x928(%rbp), %rax
cmpq %rcx, %rax
jae 0xbe45
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movl -0xd4(%rbp), %eax
movl %eax, %esi
callq 0xf090
movq %rax, -0x930(%rbp)
jmp 0xbca2
movq -0x930(%rbp), %rax
movsd 0x18(%rax), %xmm0
movsd %xmm0, -0xe0(%rbp)
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movl -0xd4(%rbp), %eax
movl %eax, %esi
callq 0xf090
movq %rax, -0x938(%rbp)
jmp 0xbcd7
movq -0x938(%rbp), %rax
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0xe8(%rbp)
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movl -0xd4(%rbp), %eax
movl %eax, %esi
callq 0xf090
movq %rax, -0x940(%rbp)
jmp 0xbd0c
movq -0x940(%rbp), %rax
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0xf0(%rbp)
movsd -0xe0(%rbp), %xmm1
movsd -0x98(%rbp), %xmm0
ucomisd %xmm1, %xmm0
ja 0xbdc0
movsd -0xe0(%rbp), %xmm0
movsd 0x1e6306(%rip), %xmm1   # 0x1f2050
subsd -0x98(%rbp), %xmm1
ucomisd %xmm1, %xmm0
ja 0xbdc0
movsd -0xe8(%rbp), %xmm1
movsd -0xa0(%rbp), %xmm0
ucomisd %xmm1, %xmm0
ja 0xbdc0
movsd -0xe8(%rbp), %xmm0
movsd 0x1e62d2(%rip), %xmm1   # 0x1f2050
subsd -0xa0(%rbp), %xmm1
ucomisd %xmm1, %xmm0
ja 0xbdc0
movsd -0xf0(%rbp), %xmm1
movsd -0xa8(%rbp), %xmm0
ucomisd %xmm1, %xmm0
ja 0xbdc0
movsd -0xf0(%rbp), %xmm0
movsd 0x1e629e(%rip), %xmm1   # 0x1f2050
subsd -0xa8(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0xbe2f
movl -0xd4(%rbp), %eax
movl %eax, -0xf4(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0xf4(%rbp), %rsi
callq 0xffc0
jmp 0xbdde
movl -0xd4(%rbp), %eax
movl %eax, %esi
leaq -0x88(%rbp), %rdi
callq 0xfff0
movq %rdx, -0x950(%rbp)
movq %rax, -0x948(%rbp)
jmp 0xbe02
movq -0x950(%rbp), %rax
movq -0x948(%rbp), %rcx
movq %rcx, -0x108(%rbp)
movq %rax, -0x100(%rbp)
leaq -0x108(%rbp), %rdi
movl $0x1, %esi
callq 0x10040
jmp 0xbe31
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0xbc51
movq 0x267174(%rip), %rdi    # 0x272fc0
leaq 0x1e64fa(%rip), %rsi    # 0x1f234d
callq 0x5540
movq %rax, -0x958(%rbp)
jmp 0xbe61
leaq -0x60(%rbp), %rdi
callq 0x10090
movq -0x958(%rbp), %rdi
movq %rax, %rsi
callq 0x5160
movq %rax, -0x960(%rbp)
jmp 0xbe82
movq -0x960(%rbp), %rdi
leaq 0x1ead44(%rip), %rsi    # 0x1f6bd4
callq 0x5540
movq %rax, -0x968(%rbp)
jmp 0xbe9e
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
callq 0xf060
movq -0x968(%rbp), %rdi
movq %rax, %rsi
callq 0x5160
movq %rax, -0x970(%rbp)
jmp 0xbec6
movq -0x970(%rbp), %rdi
leaq 0x1e6489(%rip), %rsi    # 0x1f235d
callq 0x5540
movq %rax, -0x978(%rbp)
jmp 0xbee2
movq -0x978(%rbp), %rdi
movsd -0x90(%rbp), %xmm0
callq 0x5980
movq %rax, -0x980(%rbp)
jmp 0xbeff
movq -0x980(%rbp), %rdi
movq 0x26708b(%rip), %rsi    # 0x272f98
callq 0x55b0
jmp 0xbf14
jmp 0xbf16
movl $0x0, -0x10c(%rbp)
movl -0x10c(%rbp), %eax
movq %rax, -0x988(%rbp)
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
callq 0xf060
movq %rax, %rcx
movq -0x988(%rbp), %rax
cmpq %rcx, %rax
jae 0xcc7f
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movl -0x10c(%rbp), %eax
movl %eax, %esi
callq 0xf090
movq %rax, -0x990(%rbp)
jmp 0xbf71
movq -0x990(%rbp), %rsi
addq $0x40, %rsi
leaq -0x130(%rbp), %rdi
callq 0x5220
jmp 0xbf8a
leaq -0x130(%rbp), %rdi
callq 0x46d20
movb %al, -0x991(%rbp)
jmp 0xbf9e
movb -0x991(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x998(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x5300
movl -0x998(%rbp), %eax
cmpl $0x1, %eax
jne 0xcc69
leaq -0x148(%rbp), %rdi
callq 0x105a0
leaq -0x160(%rbp), %rdi
callq 0xd0d0
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movl -0x10c(%rbp), %eax
movl %eax, %esi
callq 0xf090
movq %rax, -0x9a0(%rbp)
jmp 0xc003
movq -0x9a0(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x9b0(%rbp)
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movl -0x10c(%rbp), %eax
movl %eax, %esi
callq 0xf090
movq %rax, -0x9a8(%rbp)
jmp 0xc037
movq -0x9a8(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x9c0(%rbp)
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movl -0x10c(%rbp), %eax
movl %eax, %esi
callq 0xf090
movq %rax, -0x9b8(%rbp)
jmp 0xc06c
movsd -0x9c0(%rbp), %xmm1
movsd -0x9b0(%rbp), %xmm0
movq -0x9b8(%rbp), %rax
movsd 0x10(%rax), %xmm2
leaq -0x178(%rbp), %rdi
callq 0xea8e0
jmp 0xc096
leaq -0x190(%rbp), %rdi
movq %rdi, -0x9c8(%rbp)
callq 0xf650
movq -0x9c8(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x105c0
jmp 0xc0be
leaq -0x170(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x105c0
jmp 0xc0d3
leaq -0x168(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x105c0
jmp 0xc0e8
leaq -0x148(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x10630
jmp 0xc0fd
movl -0x10c(%rbp), %eax
movl %eax, -0x194(%rbp)
leaq -0x160(%rbp), %rdi
leaq -0x194(%rbp), %rsi
callq 0xffc0
jmp 0xc11e
movl $0xffffffff, -0x198(%rbp) # imm = 0xFFFFFFFF
cmpl $0x2, -0x198(%rbp)
jge 0xcb95
movl $0xffffffff, -0x19c(%rbp) # imm = 0xFFFFFFFF
cmpl $0x2, -0x19c(%rbp)
jge 0xcb7f
movl $0xffffffff, -0x1a0(%rbp) # imm = 0xFFFFFFFF
cmpl $0x2, -0x1a0(%rbp)
jge 0xcb69
cmpl $0x0, -0x198(%rbp)
jne 0xc665
cmpl $0x0, -0x19c(%rbp)
jne 0xc665
cmpl $0x0, -0x1a0(%rbp)
jne 0xc665
movl $0x0, -0x1a4(%rbp)
movl -0x1a4(%rbp), %eax
movq %rax, -0x9d0(%rbp)
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
callq 0xf060
movq %rax, %rcx
movq -0x9d0(%rbp), %rax
cmpq %rcx, %rax
jae 0xc660
movl -0x10c(%rbp), %eax
cmpl -0x1a4(%rbp), %eax
je 0xc64a
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movl -0x1a4(%rbp), %eax
movl %eax, %esi
callq 0xf090
movq %rax, -0x9d8(%rbp)
jmp 0xc1f7
movq -0x9d8(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x9e8(%rbp)
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movl -0x1a4(%rbp), %eax
movl %eax, %esi
callq 0xf090
movq %rax, -0x9e0(%rbp)
jmp 0xc22b
movq -0x9e0(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x9f8(%rbp)
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movl -0x1a4(%rbp), %eax
movl %eax, %esi
callq 0xf090
movq %rax, -0x9f0(%rbp)
jmp 0xc260
movsd -0x9f8(%rbp), %xmm1
movsd -0x9e8(%rbp), %xmm0
movq -0x9f0(%rbp), %rax
movsd 0x10(%rax), %xmm2
leaq -0x1c0(%rbp), %rdi
callq 0xea8e0
jmp 0xc28a
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rcx
movq %rcx, -0x1d0(%rbp)
movups 0x38(%rax), %xmm0
movaps %xmm0, -0x1e0(%rbp)
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rcx
movq %rcx, -0x1f0(%rbp)
movups 0x50(%rax), %xmm0
movaps %xmm0, -0x200(%rbp)
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rcx
movq %rcx, -0x210(%rbp)
movups 0x68(%rax), %xmm0
movaps %xmm0, -0x220(%rbp)
cvtsi2sdl -0x198(%rbp), %xmm0
leaq -0x280(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0xea9f0
jmp 0xc2f5
leaq -0x268(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
leaq -0x280(%rbp), %rdx
callq 0xeae50
jmp 0xc311
cvtsi2sdl -0x19c(%rbp), %xmm0
leaq -0x298(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0xea9f0
jmp 0xc32e
leaq -0x250(%rbp), %rdi
leaq -0x268(%rbp), %rsi
leaq -0x298(%rbp), %rdx
callq 0xeae50
jmp 0xc34a
cvtsi2sdl -0x1a0(%rbp), %xmm0
leaq -0x2b0(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0xea9f0
jmp 0xc367
leaq -0x238(%rbp), %rdi
leaq -0x250(%rbp), %rsi
leaq -0x2b0(%rbp), %rdx
callq 0xeae50
jmp 0xc383
movq -0x228(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movups -0x238(%rbp), %xmm0
movaps %xmm0, -0x1c0(%rbp)
movsd -0x178(%rbp), %xmm0
movsd -0x170(%rbp), %xmm1
movsd -0x168(%rbp), %xmm2
movsd -0x1c0(%rbp), %xmm3
movsd -0x1b8(%rbp), %xmm4
movsd -0x1b0(%rbp), %xmm5
callq 0xebaf0
movsd %xmm0, -0xa00(%rbp)
jmp 0xc3de
movsd -0xa00(%rbp), %xmm0
movsd %xmm0, -0x2b8(%rbp)
movsd -0x2b8(%rbp), %xmm0
movsd %xmm0, -0xa10(%rbp)
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movl -0x10c(%rbp), %eax
movl %eax, %esi
callq 0xf090
movq %rax, -0xa08(%rbp)
jmp 0xc41f
movq -0xa08(%rbp), %rsi
addq $0x40, %rsi
leaq -0x2d8(%rbp), %rdi
callq 0x5220
jmp 0xc438
leaq -0x2d8(%rbp), %rdi
callq 0x46a20
movsd %xmm0, -0xa18(%rbp)
jmp 0xc44e
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movl -0x1a4(%rbp), %eax
movl %eax, %esi
callq 0xf090
movq %rax, -0xa20(%rbp)
jmp 0xc46f
movq -0xa20(%rbp), %rsi
addq $0x40, %rsi
leaq -0x2f8(%rbp), %rdi
callq 0x5220
jmp 0xc488
leaq -0x2f8(%rbp), %rdi
callq 0x46a20
movsd %xmm0, -0xa28(%rbp)
jmp 0xc49e
movsd -0xa28(%rbp), %xmm1
movsd -0xa18(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd 0x1e5ba6(%rip), %xmm1   # 0x1f2060
addsd %xmm1, %xmm0
movsd %xmm0, -0xa30(%rbp)
leaq -0x2f8(%rbp), %rdi
callq 0x5300
leaq -0x2d8(%rbp), %rdi
callq 0x5300
movsd -0xa10(%rbp), %xmm1
movsd -0xa30(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xc648
leaq -0x310(%rbp), %rdi
movq %rdi, -0xa38(%rbp)
callq 0xf650
movq -0xa38(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x105c0
jmp 0xc520
leaq -0x1b8(%rbp), %rsi
leaq -0x310(%rbp), %rdi
callq 0x105c0
jmp 0xc535
leaq -0x1b0(%rbp), %rsi
leaq -0x310(%rbp), %rdi
callq 0x105c0
jmp 0xc54a
leaq -0x148(%rbp), %rdi
leaq -0x310(%rbp), %rsi
callq 0x10630
jmp 0xc55f
movl -0x1a4(%rbp), %eax
movl %eax, -0x314(%rbp)
leaq -0x160(%rbp), %rdi
leaq -0x314(%rbp), %rsi
callq 0xffc0
jmp 0xc580
leaq -0x310(%rbp), %rdi
callq 0xf9d0
jmp 0xc648
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x5300
jmp 0xd01e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0xcc4c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0xcc40
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0xc614
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x2f8(%rbp), %rdi
callq 0x5300
leaq -0x2d8(%rbp), %rdi
callq 0x5300
jmp 0xcc40
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x310(%rbp), %rdi
callq 0xf9d0
jmp 0xcc40
jmp 0xc64a
jmp 0xc64c
movl -0x1a4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1a4(%rbp)
jmp 0xc194
jmp 0xcb53
movl -0x10c(%rbp), %eax
movl %eax, %esi
leaq -0x88(%rbp), %rdi
callq 0xfff0
movq %rdx, -0xa48(%rbp)
movq %rax, -0xa40(%rbp)
jmp 0xc689
movq -0xa48(%rbp), %rax
movq -0xa40(%rbp), %rcx
movq %rcx, -0x328(%rbp)
movq %rax, -0x320(%rbp)
leaq -0x328(%rbp), %rdi
callq 0x101a0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xcb51
movl $0x0, -0x32c(%rbp)
movl -0x32c(%rbp), %eax
movq %rax, -0xa50(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x10090
movq %rax, %rcx
movq -0xa50(%rbp), %rax
cmpq %rcx, %rax
jae 0xcb4f
movl -0x32c(%rbp), %eax
movl %eax, %esi
leaq -0x60(%rbp), %rdi
callq 0x101d0
movq %rax, -0xa58(%rbp)
jmp 0xc70c
movq -0xa58(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x330(%rbp)
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movl -0x330(%rbp), %eax
movl %eax, %esi
callq 0xf090
movq %rax, -0xa60(%rbp)
jmp 0xc73c
movq -0xa60(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0xa70(%rbp)
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movl -0x330(%rbp), %eax
movl %eax, %esi
callq 0xf090
movq %rax, -0xa68(%rbp)
jmp 0xc770
movq -0xa68(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0xa80(%rbp)
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movl -0x330(%rbp), %eax
movl %eax, %esi
callq 0xf090
movq %rax, -0xa78(%rbp)
jmp 0xc7a5
movsd -0xa80(%rbp), %xmm1
movsd -0xa70(%rbp), %xmm0
movq -0xa78(%rbp), %rax
movsd 0x10(%rax), %xmm2
leaq -0x350(%rbp), %rdi
callq 0xea8e0
jmp 0xc7cf
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rcx
movq %rcx, -0x360(%rbp)
movups 0x38(%rax), %xmm0
movaps %xmm0, -0x370(%rbp)
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rcx
movq %rcx, -0x380(%rbp)
movups 0x50(%rax), %xmm0
movaps %xmm0, -0x390(%rbp)
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rcx
movq %rcx, -0x3a0(%rbp)
movups 0x68(%rax), %xmm0
movaps %xmm0, -0x3b0(%rbp)
cvtsi2sdl -0x198(%rbp), %xmm0
leaq -0x410(%rbp), %rdi
leaq -0x370(%rbp), %rsi
callq 0xea9f0
jmp 0xc83a
leaq -0x3f8(%rbp), %rdi
leaq -0x350(%rbp), %rsi
leaq -0x410(%rbp), %rdx
callq 0xeae50
jmp 0xc856
cvtsi2sdl -0x19c(%rbp), %xmm0
leaq -0x428(%rbp), %rdi
leaq -0x390(%rbp), %rsi
callq 0xea9f0
jmp 0xc873
leaq -0x3e0(%rbp), %rdi
leaq -0x3f8(%rbp), %rsi
leaq -0x428(%rbp), %rdx
callq 0xeae50
jmp 0xc88f
cvtsi2sdl -0x1a0(%rbp), %xmm0
leaq -0x440(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0xea9f0
jmp 0xc8ac
leaq -0x3c8(%rbp), %rdi
leaq -0x3e0(%rbp), %rsi
leaq -0x440(%rbp), %rdx
callq 0xeae50
jmp 0xc8c8
movq -0x3b8(%rbp), %rax
movq %rax, -0x340(%rbp)
movups -0x3c8(%rbp), %xmm0
movaps %xmm0, -0x350(%rbp)
movsd -0x178(%rbp), %xmm0
movsd -0x170(%rbp), %xmm1
movsd -0x168(%rbp), %xmm2
movsd -0x350(%rbp), %xmm3
movsd -0x348(%rbp), %xmm4
movsd -0x340(%rbp), %xmm5
callq 0xebaf0
movsd %xmm0, -0xa88(%rbp)
jmp 0xc923
movsd -0xa88(%rbp), %xmm0
movsd %xmm0, -0x448(%rbp)
movsd -0x448(%rbp), %xmm0
movsd %xmm0, -0xa98(%rbp)
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movl -0x10c(%rbp), %eax
movl %eax, %esi
callq 0xf090
movq %rax, -0xa90(%rbp)
jmp 0xc964
movq -0xa90(%rbp), %rsi
addq $0x40, %rsi
leaq -0x468(%rbp), %rdi
callq 0x5220
jmp 0xc97d
leaq -0x468(%rbp), %rdi
callq 0x46a20
movsd %xmm0, -0xaa0(%rbp)
jmp 0xc993
movq -0x18(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movl -0x330(%rbp), %eax
movl %eax, %esi
callq 0xf090
movq %rax, -0xaa8(%rbp)
jmp 0xc9b4
movq -0xaa8(%rbp), %rsi
addq $0x40, %rsi
leaq -0x488(%rbp), %rdi
callq 0x5220
jmp 0xc9cd
leaq -0x488(%rbp), %rdi
callq 0x46a20
movsd %xmm0, -0xab0(%rbp)
jmp 0xc9e3
movsd -0xab0(%rbp), %xmm1
movsd -0xaa0(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd 0x1e5661(%rip), %xmm1   # 0x1f2060
addsd %xmm1, %xmm0
movsd %xmm0, -0xab8(%rbp)
leaq -0x488(%rbp), %rdi
callq 0x5300
leaq -0x468(%rbp), %rdi
callq 0x5300
movsd -0xa98(%rbp), %xmm1
movsd -0xab8(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xcb39
leaq -0x4a0(%rbp), %rdi
movq %rdi, -0xac0(%rbp)
callq 0xf650
movq -0xac0(%rbp), %rdi
leaq -0x350(%rbp), %rsi
callq 0x105c0
jmp 0xca65
leaq -0x348(%rbp), %rsi
leaq -0x4a0(%rbp), %rdi
callq 0x105c0
jmp 0xca7a
leaq -0x340(%rbp), %rsi
leaq -0x4a0(%rbp), %rdi
callq 0x105c0
jmp 0xca8f
leaq -0x148(%rbp), %rdi
leaq -0x4a0(%rbp), %rsi
callq 0x10630
jmp 0xcaa4
movl -0x330(%rbp), %eax
movl %eax, -0x4a4(%rbp)
leaq -0x160(%rbp), %rdi
leaq -0x4a4(%rbp), %rsi
callq 0xffc0
jmp 0xcac5
leaq -0x4a0(%rbp), %rdi
callq 0xf9d0
jmp 0xcb39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0xcb05
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x488(%rbp), %rdi
callq 0x5300
leaq -0x468(%rbp), %rdi
callq 0x5300
jmp 0xcc40
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x4a0(%rbp), %rdi
callq 0xf9d0
jmp 0xcc40
jmp 0xcb3b
movl -0x32c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x32c(%rbp)
jmp 0xc6c9
jmp 0xcb51
jmp 0xcb53
jmp 0xcb55
movl -0x1a0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1a0(%rbp)
jmp 0xc156
jmp 0xcb6b
movl -0x19c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x19c(%rbp)
jmp 0xc13f
jmp 0xcb81
movl -0x198(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x198(%rbp)
jmp 0xc128
leaq -0x4c0(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x106a0
jmp 0xcbaa
leaq -0x4c0(%rbp), %rdi
movsd 0x1e54b7(%rip), %xmm0   # 0x1f2070
callq 0x174740
movb %al, -0xac1(%rbp)
jmp 0xcbc6
leaq -0x4c0(%rbp), %rdi
callq 0x10790
movb -0xac1(%rbp), %al
testb $0x1, %al
jne 0xcbde
jmp 0xcc1a
movl -0x2c(%rbp), %eax
incl %eax
movl %eax, -0x2c(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x107f0
jmp 0xcbf8
jmp 0xcc1a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x4c0(%rbp), %rdi
callq 0x10790
jmp 0xcc40
leaq -0x190(%rbp), %rdi
callq 0xf9d0
leaq -0x160(%rbp), %rdi
callq 0xec80
leaq -0x148(%rbp), %rdi
callq 0x10790
jmp 0xcc69
leaq -0x190(%rbp), %rdi
callq 0xf9d0
leaq -0x160(%rbp), %rdi
callq 0xec80
leaq -0x148(%rbp), %rdi
callq 0x10790
jmp 0xd01e
jmp 0xcc6b
movl -0x10c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10c(%rbp)
jmp 0xbf20
leaq -0x6d0(%rbp), %rdi
callq 0x5660
jmp 0xcc8d
movq -0x8(%rbp), %rsi
leaq -0x6d0(%rbp), %rdi
movl $0x10, %edx
callq 0x54b0
jmp 0xcca4
leaq -0x6c0(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x5540
movq %rax, -0xad0(%rbp)
jmp 0xccbd
movq -0xad0(%rbp), %rdi
leaq 0x1e57b1(%rip), %rsi    # 0x1f247c
callq 0x5540
movq %rax, -0xad8(%rbp)
jmp 0xccd9
movq -0xad8(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x58d0
movq %rax, -0xae0(%rbp)
jmp 0xccf1
movq -0xae0(%rbp), %rdi
leaq 0x1ec926(%rip), %rsi    # 0x1f9625
callq 0x5540
jmp 0xcd06
leaq -0x6d0(%rbp), %rdi
callq 0x50a0
jmp 0xcd14
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xcfdf
leaq -0x8e0(%rbp), %rdi
callq 0x5660
jmp 0xcd33
movq -0x10(%rbp), %rsi
leaq -0x8e0(%rbp), %rdi
movl $0x10, %edx
callq 0x54b0
jmp 0xcd4a
movl $0x0, -0x8e4(%rbp)
movl -0x8e4(%rbp), %eax
movq %rax, -0xae8(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x10860
movq %rax, %rcx
movq -0xae8(%rbp), %rax
cmpq %rcx, %rax
jae 0xcfc5
leaq -0x8d0(%rbp), %rax
movq %rax, -0xb00(%rbp)
movq -0x18(%rbp), %rax
addq $0x2f0, %rax            # imm = 0x2F0
movq %rax, -0xaf8(%rbp)
movl -0x8e4(%rbp), %eax
movl %eax, %esi
leaq -0x48(%rbp), %rdi
callq 0x10890
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x101d0
movq %rax, -0xaf0(%rbp)
jmp 0xcdc2
movq -0xaf8(%rbp), %rdi
movq -0xaf0(%rbp), %rax
movslq (%rax), %rsi
callq 0xf090
movq %rax, -0xb08(%rbp)
jmp 0xcde1
movq -0xb00(%rbp), %rdi
movq -0xb08(%rbp), %rsi
addq $0x40, %rsi
callq 0x5480
movq %rax, -0xb10(%rbp)
jmp 0xce01
movq -0xb10(%rbp), %rdi
leaq 0x1e5676(%rip), %rsi    # 0x1f2485
callq 0x5540
jmp 0xce16
leaq -0x8d0(%rbp), %rax
movq %rax, -0xb20(%rbp)
movl -0x8e4(%rbp), %eax
movl %eax, %esi
leaq -0x48(%rbp), %rdi
callq 0x10890
movq %rax, %rdi
callq 0x10090
movq -0xb20(%rbp), %rdi
movq %rax, %rsi
decq %rsi
callq 0x5160
movq %rax, -0xb18(%rbp)
jmp 0xce58
movq -0xb18(%rbp), %rdi
leaq 0x1e5622(%rip), %rsi    # 0x1f2488
callq 0x5540
jmp 0xce6d
movl $0x1, -0x8e8(%rbp)
movl -0x8e8(%rbp), %eax
movq %rax, -0xb28(%rbp)
movl -0x8e4(%rbp), %eax
movl %eax, %esi
leaq -0x48(%rbp), %rdi
callq 0x10890
movq %rax, %rdi
callq 0x10090
movq %rax, %rcx
movq -0xb28(%rbp), %rax
cmpq %rcx, %rax
jae 0xcf9a
leaq -0x8d0(%rbp), %rax
movq %rax, -0xb40(%rbp)
movq -0x18(%rbp), %rax
addq $0x2f0, %rax            # imm = 0x2F0
movq %rax, -0xb38(%rbp)
movl -0x8e4(%rbp), %eax
movl %eax, %esi
leaq -0x48(%rbp), %rdi
callq 0x10890
movq %rax, %rdi
movl -0x8e8(%rbp), %eax
movl %eax, %esi
callq 0x101d0
movq %rax, -0xb30(%rbp)
jmp 0xcef9
movq -0xb38(%rbp), %rdi
movq -0xb30(%rbp), %rax
movslq (%rax), %rsi
callq 0xf090
movq %rax, -0xb48(%rbp)
jmp 0xcf18
movq -0xb40(%rbp), %rdi
movq -0xb48(%rbp), %rsi
addq $0x40, %rsi
callq 0x5480
movq %rax, -0xb50(%rbp)
jmp 0xcf38
movq -0xb50(%rbp), %rdi
leaq 0x1ef368(%rip), %rsi    # 0x1fc2ae
callq 0x5540
jmp 0xcf4d
jmp 0xcf4f
movl -0x8e8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8e8(%rbp)
jmp 0xce77
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0xd012
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x8e0(%rbp), %rdi
callq 0x5150
jmp 0xd012
leaq -0x8d0(%rbp), %rdi
leaq 0x1ec67d(%rip), %rsi    # 0x1f9625
callq 0x5540
jmp 0xcfaf
jmp 0xcfb1
movl -0x8e4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8e4(%rbp)
jmp 0xcd54
leaq -0x8e0(%rbp), %rdi
callq 0x50a0
jmp 0xcfd3
leaq -0x8e0(%rbp), %rdi
callq 0x5150
leaq -0x6d0(%rbp), %rdi
callq 0x5150
leaq -0x88(%rbp), %rdi
callq 0xf9b0
leaq -0x60(%rbp), %rdi
callq 0xec80
leaq -0x48(%rbp), %rdi
callq 0x108b0
addq $0xb50, %rsp            # imm = 0xB50
popq %rbp
retq
leaq -0x6d0(%rbp), %rdi
callq 0x5150
leaq -0x88(%rbp), %rdi
callq 0xf9b0
leaq -0x60(%rbp), %rdi
callq 0xec80
leaq -0x48(%rbp), %rdi
callq 0x108b0
movq -0xb0(%rbp), %rdi
callq 0x58f0
nopl (%rax,%rax)