// File: /workspace/github_cpp_makefile_star2_O3/Luthaf[P]zeopp/area_and_volume.cc
// Function: getLocalSubstructures(char*, double, double, TRIPLET, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, VORONOI_NETWORK*, ATOM_NETWORK*, bool, bool)
void getLocalSubstructures(char* name, double probeRad, double local_substructure_radius, TRIPLET supercell_steps_local_substructure, string element, VORONOI_NETWORK* vornet, ATOM_NETWORK* atmnet, bool radial, bool usingElementOnly) {
  vector<bool> accessInfo;
  vector<CHANNEL> channels;
  CHANNEL::findChannels(vornet, probeRad, &accessInfo, &channels);
  ATOM_NETWORK simplified_atmnet;
  atmnet->copy(&simplified_atmnet);
  VORONOI_NETWORK simplified_vornet;
  vornet->copy(&simplified_vornet);
  vector<bool> isAccessible;
  int num_accessible = 0;
  //if not simplifying, avoid the calculation and just copy the data
  if(!usingElementOnly) {
    isAccessible = accessInfo;
  } else {
    //create the simplified atmnet, ready to calculate simplified vornet etc.
    simplified_vornet.edges.clear();
    simplified_vornet.nodes.clear();
    simplified_atmnet.atoms.clear();
    simplified_atmnet.numAtoms = 0;
    for(int i=0; i<atmnet->numAtoms; i++){
      if(atmnet->atoms.at(i).type.compare(element)==0) {
        ATOM newAtom;
        newAtom.type = atmnet->atoms.at(i).type;
        newAtom.a_coord = atmnet->atoms.at(i).a_coord;
        newAtom.b_coord = atmnet->atoms.at(i).b_coord;
        newAtom.c_coord = atmnet->atoms.at(i).c_coord;
        newAtom.x = atmnet->atoms.at(i).x;
        newAtom.y = atmnet->atoms.at(i).y;
        newAtom.z = atmnet->atoms.at(i).z;
        newAtom.radius = lookupRadius(newAtom.type, radial);
        simplified_atmnet.atoms.push_back(newAtom);
        simplified_atmnet.numAtoms++;
      }
    }
    cout << "Starting simplified Voronoi decomposition" << "\n";
    vector< VOR_CELL> simplified_cells;
    vector< BASIC_VCELL> simplified_bvcells;
    if(radial) {
      container_periodic_poly *rad_con = (container_periodic_poly *)performVoronoiDecomp(true, &simplified_atmnet, &simplified_vornet, simplified_cells, false, simplified_bvcells);
      delete rad_con;
    } else {
      container_periodic *no_rad_con = (container_periodic *)performVoronoiDecomp (false, &simplified_atmnet, &simplified_vornet, simplified_cells, false, simplified_bvcells); 
      delete no_rad_con;
    }
    cout << "Finished simplified Voronoi decomposition" << "\n";
    printf("*** Original voronoi network on %d atoms contains %d nodes and %d edges ***\n", atmnet->numAtoms, (int)(vornet->nodes.size()), (int)(vornet->edges.size()));
    printf("*** Simplified voronoi network on %d atoms contains %d nodes and %d edges ***\n", simplified_atmnet.numAtoms, (int)(simplified_vornet.nodes.size()), (int)(simplified_vornet.edges.size()));
    //now check which of these nodes of the simplified network lie in accessible space w.r.t. atmnet
    float chan_radius = probeRad;
    determineAccessibility(atmnet, chan_radius, probeRad, true, &isAccessible, &simplified_vornet); //where probeRad is the smaller, used to probe the channels accessible to chan_radius, the larger
  }
  for(int i=0; i<(int)(simplified_vornet.nodes.size()); i++) {
    if(simplified_vornet.nodes.at(i).rad_stat_sphere<=0) isAccessible.at(i)=false;
    if(isAccessible.at(i)==true) num_accessible++;
  }
  printf("*** %d of these %d nodes lie in accessible space ***\n", num_accessible, (int)(simplified_vornet.nodes.size()));
  //now try and remove redundant nodes
  int malloc_num_accessible = num_accessible;
  double **distance_between_nodes_array = new double*[malloc_num_accessible];
  for(int i=0; i<malloc_num_accessible; i++) distance_between_nodes_array[i] = new double[malloc_num_accessible];
  int *node_reference = new int[malloc_num_accessible];
  double *node_density = new double[malloc_num_accessible];
  int iter = 0;
  for(int i=0; i<(int)(simplified_vornet.nodes.size()); i++) {
    if(isAccessible.at(i)==true) {
      node_reference[iter] = i; //now we can iterate over this array for simplicity
      iter++;
    }
  }
  double minimum_node_distance = 1.0; //two nodes closer than this probably don't tell us anything different about the structure
  char some_distance_too_low_exists = 0;
  for(int i=0; i<malloc_num_accessible; i++) {
    node_density[i] = 0.0;
  }
  for(int i=0; i<malloc_num_accessible; i++) {
    distance_between_nodes_array[i][i] = 0.0;
    for(int j=i+1; j<malloc_num_accessible; j++) {
      int node_i = node_reference[i];
      int node_j = node_reference[j];
      Point abcCoord_i = atmnet->xyz_to_abc(simplified_vornet.nodes.at(node_i).x, simplified_vornet.nodes.at(node_i).y, simplified_vornet.nodes.at(node_i).z);
      Point abcCoord_j = atmnet->xyz_to_abc(simplified_vornet.nodes.at(node_j).x, simplified_vornet.nodes.at(node_j).y, simplified_vornet.nodes.at(node_j).z);
      double distance = atmnet->getDistCalc().minimum_periodic_distance(abcCoord_i.vals[0], abcCoord_i.vals[1], abcCoord_i.vals[2], abcCoord_j.vals[0], abcCoord_j.vals[1], abcCoord_j.vals[2]);
      if(distance<minimum_node_distance) some_distance_too_low_exists = 1;
      distance_between_nodes_array[i][j] = distance;
      distance_between_nodes_array[j][i] = distance;
      node_density[i] += exp(-1*distance*distance);
      node_density[j] += exp(-1*distance*distance);
    }
  }
  if(some_distance_too_low_exists>0) {
    //now we have the distance array, iterate over the nodes, removing the most dense, while there are some accessible ones closer than some distance
    while(some_distance_too_low_exists==1) {
      int accessibility_index_of_max_density_node = -1;
      double max_density = -1;
      for(int i=0; i<malloc_num_accessible; i++) {
        if(isAccessible.at(node_reference[i])==true) {
          if(node_density[i]>max_density) {
            max_density = node_density[i];
            accessibility_index_of_max_density_node = i;
          }
        }
      }
      if(max_density<0 || accessibility_index_of_max_density_node<0) {
        printf("ERROR: no node found in max density search\n");
        exit(EXIT_FAILURE);
      }
      //remove this most dense node
      isAccessible.at(node_reference[accessibility_index_of_max_density_node])=false;
      num_accessible--;
      //we need to recalculate densities and check if any remaining accessible node triggers the too-close test!
      some_distance_too_low_exists = 0;
      for(int i=0; i<malloc_num_accessible; i++) {
        node_density[i] = 0.0;
      }
      for(int i=0; i<malloc_num_accessible; i++) {
        int node_i = node_reference[i];
        if(isAccessible.at(node_i)==true) {
          for(int j=i+1; j<malloc_num_accessible; j++) {
            int node_j = node_reference[j];
            if(isAccessible.at(node_j)==true) {
              double distance = distance_between_nodes_array[i][j];
              if(distance<minimum_node_distance) some_distance_too_low_exists = 1;
              node_density[i] += exp(-1*distance*distance);
              node_density[j] += exp(-1*distance*distance);
            }
          }
        }
      }
    }
    printf("STATUS: %d nodes were removed, leaving %d, none of which are within %.3fA of any other\n", malloc_num_accessible-num_accessible, num_accessible, minimum_node_distance);
  }
  //free memory
  for(int i=0; i<malloc_num_accessible; i++) delete[] distance_between_nodes_array[i];
  delete[] distance_between_nodes_array;
  delete[] node_reference;
  delete[] node_density;

  //construct the supercell_atmnet for extracting spheres
  ATOM_NETWORK supercell_atmnet;
  atmnet->copy(&supercell_atmnet);
  for(int a_step=-1*supercell_steps_local_substructure[0]; a_step<=supercell_steps_local_substructure[0]; a_step++) {
    for(int b_step=-1*supercell_steps_local_substructure[1]; b_step<=supercell_steps_local_substructure[1]; b_step++) {
      for(int c_step=-1*supercell_steps_local_substructure[2]; c_step<=supercell_steps_local_substructure[2]; c_step++) {
        if(a_step!=0 || b_step!=0 || c_step!=0) { //don't make copies within the unit cell!
          for(int i=0; i<atmnet->numAtoms; i++){
            ATOM newAtom;
            newAtom.type = atmnet->atoms.at(i).type;
            newAtom.a_coord = atmnet->atoms.at(i).a_coord+a_step;
            newAtom.b_coord = atmnet->atoms.at(i).b_coord+b_step;
            newAtom.c_coord = atmnet->atoms.at(i).c_coord+c_step;
            Point xyz = atmnet->abc_to_xyz(newAtom.a_coord, newAtom.b_coord, newAtom.c_coord);
            newAtom.x = xyz.vals[0];
            newAtom.y = xyz.vals[1];
            newAtom.z = xyz.vals[2];
            newAtom.radius = lookupRadius(newAtom.type, radial);
            supercell_atmnet.atoms.push_back(newAtom);
            supercell_atmnet.numAtoms++;
          }
        }
      }
    }
  }
  printf("*** Unit cell contains %d atoms; supercell contains %d atoms ***\n", atmnet->numAtoms, supercell_atmnet.numAtoms);
  int node_index = 0;
  for(int i=0; i<(int)(simplified_vornet.nodes.size()); i++) {
    vector<ATOM> vector_of_local_atoms; //all those visible atoms within some distance, i.e. those which comprise the local surface
    if(isAccessible.at(i)==true) {
      for(int j=0; j<supercell_atmnet.numAtoms; j++) {
        float distance = calcEuclideanDistance(simplified_vornet.nodes.at(i).x, simplified_vornet.nodes.at(i).y, simplified_vornet.nodes.at(i).z, supercell_atmnet.atoms.at(j).x, supercell_atmnet.atoms.at(j).y, supercell_atmnet.atoms.at(j).z);
        if(distance<=local_substructure_radius) vector_of_local_atoms.push_back(supercell_atmnet.atoms.at(j));
      }
      //now finished putting local atoms in the vector, write them to file for now
      string number = intAsString(node_index);
      string filename_xyz = string(name).append("_local_substructure_");
      filename_xyz.append(number);
      filename_xyz.append(".xyz");
      FILE *local_xyz; local_xyz = fopen(filename_xyz.c_str(), "w");
      fprintf(local_xyz, "%d\nxyz header\n", (int)vector_of_local_atoms.size()+1);
      for(int j=0; j<(int)vector_of_local_atoms.size(); j++) {
        fprintf(local_xyz, "%s %.3f %.3f %.3f\n", vector_of_local_atoms.at(j).type.c_str(), vector_of_local_atoms.at(j).x, vector_of_local_atoms.at(j).y, vector_of_local_atoms.at(j).z);
      }
      fprintf(local_xyz, "X %.3f %.3f %.3f\n", simplified_vornet.nodes.at(i).x, simplified_vornet.nodes.at(i).y, simplified_vornet.nodes.at(i).z);
      fclose(local_xyz);
      node_index++;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb88, %rsp            # imm = 0xB88
movl %r9d, %ebx
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movsd %xmm1, 0x230(%rsp)
movq %rdi, 0x228(%rsp)
xorl %eax, %eax
leaq 0x278(%rsp), %rsi
movq %rax, (%rsi)
movl %eax, 0x8(%rsi)
movq %rax, 0x10(%rsi)
movl %eax, 0x18(%rsi)
movq %rax, 0x20(%rsi)
leaq 0x2a0(%rsp), %rdx
movq %rax, 0x10(%rdx)
xorps %xmm1, %xmm1
movaps %xmm1, (%rdx)
movq %r15, %rdi
movsd %xmm0, 0x20(%rsp)
callq 0x73b1c
leaq 0x728(%rsp), %rdi
callq 0x5112c
leaq 0x728(%rsp), %rsi
movq %r14, %rdi
callq 0x52620
leaq 0xf8(%rsp), %rdi
callq 0x55288
leaq 0xf8(%rsp), %rsi
movq %r15, %rdi
callq 0x553b4
xorl %eax, %eax
movq %rax, 0x68(%rsp)
movl %eax, 0x70(%rsp)
movq %rax, 0x78(%rsp)
movl %eax, 0x80(%rsp)
movq %rax, 0x88(%rsp)
movzbl %bpl, %eax
movl %eax, 0x4c(%rsp)
testb %bl, %bl
je 0x44753
movq %r15, 0x50(%rsp)
movq 0x158(%rsp), %rax
cmpq %rax, 0x160(%rsp)
je 0x4444f
movq %rax, 0x160(%rsp)
movl %ebp, 0x8(%rsp)
movq 0x140(%rsp), %rbx
movq 0x148(%rsp), %r15
cmpq %rbx, %r15
je 0x44491
movq %rbx, %r13
movq 0x20(%r13), %rdi
testq %rdi, %rdi
je 0x44480
movq 0x30(%r13), %rsi
subq %rdi, %rsi
callq 0x4470
addq $0x40, %r13
cmpq %r15, %r13
jne 0x4446b
movq %rbx, 0x148(%rsp)
leaq 0xa18(%rsp), %rbx
movq (%rbx), %rsi
movq %rbx, %rdi
callq 0x12ea6
movl $0x0, -0x1e0(%rbx)
cmpl $0x0, 0x110(%r14)
jle 0x4469f
movl $0x40, %r13d
xorl %ebp, %ebp
leaq 0x2c0(%rsp), %r15
leaq 0x170(%rsp), %rbx
movq 0x2f0(%r14), %rdi
movq 0x2f8(%r14), %rdx
subq %rdi, %rdx
sarq $0x3, %rdx
movabsq $-0x79435e50d79435e5, %rax # imm = 0x86BCA1AF286BCA1B
imulq %rax, %rdx
cmpq %rbp, %rdx
jbe 0x45681
addq %r13, %rdi
movq %r12, %rsi
callq 0x4050
testl %eax, %eax
jne 0x44685
movq %r15, %rdi
callq 0x51264
movq 0x2f0(%r14), %rsi
movq 0x2f8(%r14), %rdx
subq %rsi, %rdx
sarq $0x3, %rdx
movabsq $-0x79435e50d79435e5, %rax # imm = 0x86BCA1AF286BCA1B
imulq %rax, %rdx
cmpq %rbp, %rdx
jbe 0x45692
addq %r13, %rsi
leaq 0x300(%rsp), %rdi
callq 0x4240
movq 0x2f0(%r14), %rax
movq 0x2f8(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x79435e50d79435e5, %rcx # imm = 0x86BCA1AF286BCA1B
imulq %rcx, %rdx
cmpq %rbp, %rdx
jbe 0x45692
movups -0x28(%rax,%r13), %xmm0
movups %xmm0, 0x2d8(%rsp)
movsd -0x18(%rax,%r13), %xmm0
movsd %xmm0, 0x2e8(%rsp)
movups -0x40(%rax,%r13), %xmm0
movaps %xmm0, 0x2c0(%rsp)
movsd -0x30(%rax,%r13), %xmm0
movsd %xmm0, 0x2d0(%rsp)
leaq 0x180(%rsp), %rax
movq %rax, 0x170(%rsp)
movq 0x300(%rsp), %rsi
movq 0x308(%rsp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xf3ce
movq %rbx, %rdi
movl 0x4c(%rsp), %esi
callq 0x21d5e
movsd %xmm0, 0x2f0(%rsp)
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0x44624
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0xa18(%rsp), %rdi
movq %r15, %rsi
callq 0xe9a8
incl 0x838(%rsp)
movq 0x320(%rsp), %rdi
leaq 0x330(%rsp), %rax
cmpq %rax, %rdi
je 0x44660
movq 0x330(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0x44685
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x4470
incq %rbp
movslq 0x110(%r14), %rax
addq $0x98, %r13
cmpq %rax, %rbp
jl 0x444d4
movq 0x15091a(%rip), %rdi    # 0x194fc0
leaq 0x10d737(%rip), %rsi    # 0x151de4
movl $0x29, %edx
callq 0x44e0
movq 0x150902(%rip), %rdi    # 0x194fc0
leaq 0x10ef59(%rip), %rsi    # 0x15361e
movl $0x1, %edx
callq 0x44e0
xorps %xmm0, %xmm0
movaps %xmm0, 0x2c0(%rsp)
xorl %eax, %eax
movq %rax, 0x2d0(%rsp)
movq %rax, 0x1a0(%rsp)
movaps %xmm0, 0x190(%rsp)
cmpb $0x0, 0x8(%rsp)
movq 0x50(%rsp), %r15
je 0x4476a
leaq 0x728(%rsp), %rsi
leaq 0xf8(%rsp), %rdx
leaq 0x2c0(%rsp), %rcx
leaq 0x190(%rsp), %r9
movl $0x1, %edi
xorl %r8d, %r8d
callq 0x732c
movq %rax, %rbx
testq %rax, %rax
je 0x4474c
movq %rbx, %rdi
addq $0x1f8, %rdi            # imm = 0x1F8
callq 0xf0ba
movq %rbx, %rdi
callq 0x148936
movl $0x298, %esi            # imm = 0x298
jmp 0x447b8
leaq 0x68(%rsp), %rdi
leaq 0x278(%rsp), %rsi
callq 0x48bec
jmp 0x4489e
leaq 0x728(%rsp), %rsi
leaq 0xf8(%rsp), %rdx
leaq 0x2c0(%rsp), %rcx
leaq 0x190(%rsp), %r9
xorl %edi, %edi
xorl %r8d, %r8d
callq 0x732c
movq %rax, %rbx
testq %rax, %rax
je 0x447b3
movq %rbx, %rdi
addq $0x1d0, %rdi            # imm = 0x1D0
callq 0xf0e4
movq %rbx, %rdi
callq 0x148936
movl $0x270, %esi            # imm = 0x270
movq %rbx, %rdi
callq 0x4470
movq 0x1507f9(%rip), %rdi    # 0x194fc0
leaq 0x10d640(%rip), %rsi    # 0x151e0e
movl $0x29, %edx
callq 0x44e0
movq 0x1507e1(%rip), %rdi    # 0x194fc0
leaq 0x10ee38(%rip), %rsi    # 0x15361e
movl $0x1, %edx
callq 0x44e0
movl 0x110(%r14), %esi
movq 0x50(%r15), %rdx
movq 0x68(%r15), %rax
subq 0x48(%r15), %rdx
shrq $0x6, %rdx
subq 0x60(%r15), %rax
shrq $0x3, %rax
imull $0xcccccccd, %eax, %ecx # imm = 0xCCCCCCCD
leaq 0x10d61c(%rip), %rdi    # 0x151e38
xorl %eax, %eax
callq 0x4060
movl 0x838(%rsp), %esi
leaq 0xf8(%rsp), %rbx
movq 0x50(%rbx), %rdx
movq 0x68(%rbx), %rax
subq 0x48(%rbx), %rdx
shrq $0x6, %rdx
subq 0x60(%rbx), %rax
shrq $0x3, %rax
imull $0xcccccccd, %eax, %ecx # imm = 0xCCCCCCCD
leaq 0x10d62e(%rip), %rdi    # 0x151e85
xorl %eax, %eax
callq 0x4060
movsd 0x20(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x68(%rsp), %rdx
movq %r14, %rdi
movl $0x1, %esi
movq %rbx, %rcx
callq 0x41af0
leaq 0x190(%rsp), %rdi
callq 0xec64
leaq 0x2c0(%rsp), %rdi
callq 0xec34
movq 0x140(%rsp), %rax
movq 0x148(%rsp), %rdx
subq %rax, %rdx
sarq $0x6, %rdx
testl %edx, %edx
jle 0x44933
xorl %ebx, %ebx
movl $0x18, %r12d
leaq 0x68(%rsp), %r15
xorl %r13d, %r13d
cmpq %rbx, %rdx
jbe 0x4565a
xorps %xmm0, %xmm0
ucomisd (%rax,%r12), %xmm0
jb 0x448ee
movq %r15, %rdi
movq %rbx, %rsi
callq 0xee36
notq %rdx
andq %rdx, (%rax)
movq %r15, %rdi
movq %rbx, %rsi
callq 0xee36
andq (%rax), %rdx
cmpq $0x1, %rdx
sbbl $-0x1, %r13d
incq %rbx
movq 0x140(%rsp), %rax
movq 0x148(%rsp), %rcx
subq %rax, %rcx
movq %rcx, %rdx
sarq $0x6, %rdx
shrq $0x6, %rcx
movslq %ecx, %rcx
addq $0x40, %r12
cmpq %rcx, %rbx
jl 0x448c9
jmp 0x44936
xorl %r13d, %r13d
leaq 0x10d597(%rip), %rdi    # 0x151ed4
movl %r13d, %esi
xorl %eax, %eax
callq 0x4060
movslq %r13d, %rax
movq %rax, 0xe0(%rsp)
leaq (,%rax,8), %rbx
movq %rbx, %rdi
callq 0x4030
movq %rax, 0x18(%rsp)
movl %r13d, %eax
movq %rax, 0x8(%rsp)
testl %r13d, %r13d
jle 0x44992
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x4030
movq 0x18(%rsp), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
cmpq %r15, 0x8(%rsp)
jne 0x44977
movq 0xe0(%rsp), %rax
leaq (,%rax,4), %rdi
callq 0x4030
movq %rax, 0x50(%rsp)
movq %rbx, %rdi
callq 0x4030
movq %rax, %rbx
movq 0x148(%rsp), %rax
subq 0x140(%rsp), %rax
shrq $0x6, %rax
testl %eax, %eax
jle 0x44a17
xorl %r15d, %r15d
leaq 0x68(%rsp), %rbp
xorl %r12d, %r12d
movq %rbp, %rdi
movq %r15, %rsi
callq 0xee36
testq %rdx, (%rax)
je 0x449f9
movslq %r12d, %r12
movq 0x50(%rsp), %rax
movl %r15d, (%rax,%r12,4)
incl %r12d
movq 0x148(%rsp), %rax
subq 0x140(%rsp), %rax
incq %r15
shrq $0x6, %rax
cltq
cmpq %rax, %r15
jl 0x449da
testl %r13d, %r13d
jle 0x44e6c
movl %r13d, 0x48(%rsp)
movq 0x8(%rsp), %r15
leaq (,%r15,8), %rdx
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4250
leaq -0x1(%r15), %rax
movq %rax, 0x10(%rsp)
leaq 0x2c0(%rsp), %r15
xorl %ebp, %ebp
movq 0x18(%rsp), %rax
movq (%rax,%r13,8), %rax
movq $0x0, (%rax,%r13,8)
leaq 0x1(%r13), %rax
movq %rax, 0xb8(%rsp)
cmpq 0xe0(%rsp), %rax
jge 0x44c57
movq %r13, %r12
movq %r13, 0x38(%rsp)
movq 0x50(%rsp), %rcx
movslq (%rcx,%r13,4), %rsi
movq 0x140(%rsp), %rax
movq 0x148(%rsp), %rdx
subq %rax, %rdx
sarq $0x6, %rdx
cmpq %rsi, %rdx
jbe 0x45616
movq %r15, %r13
movslq 0x4(%rcx,%r12,4), %r15
shlq $0x6, %rsi
movsd (%rax,%rsi), %xmm0
movsd 0x8(%rax,%rsi), %xmm1
movsd 0x10(%rax,%rsi), %xmm2
leaq 0x190(%rsp), %rdi
movq %r14, %rsi
callq 0x52eec
movq 0x140(%rsp), %rax
movq 0x148(%rsp), %rdx
subq %rax, %rdx
sarq $0x6, %rdx
cmpq %r15, %rdx
jbe 0x45624
shlq $0x6, %r15
movsd (%rax,%r15), %xmm0
movsd 0x8(%rax,%r15), %xmm1
movsd 0x10(%rax,%r15), %xmm2
leaq 0x90(%rsp), %rdi
movq %r14, %rsi
callq 0x52eec
movq %r13, %r15
movq %r13, %rdi
movq %r14, %rsi
callq 0x527f2
movsd 0x190(%rsp), %xmm0
movsd 0x198(%rsp), %xmm1
movsd 0x1a0(%rsp), %xmm2
movsd 0x90(%rsp), %xmm3
movsd 0x98(%rsp), %xmm4
movsd 0xa0(%rsp), %xmm5
movq %r15, %rdi
callq 0x77fb0
movaps %xmm0, 0x20(%rsp)
movq 0x2f0(%rsp), %rdi
testq %rdi, %rdi
je 0x44b91
movq 0x300(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x2d8(%rsp), %rdi
testq %rdi, %rdi
je 0x44bae
movq 0x2e8(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x2c0(%rsp), %rdi
testq %rdi, %rdi
je 0x44bcb
movq 0x2d0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movsd 0x108485(%rip), %xmm0   # 0x14d058
movapd 0x20(%rsp), %xmm1
ucomisd %xmm1, %xmm0
movzbl %bpl, %ebp
movl $0x1, %eax
cmoval %eax, %ebp
movq 0x18(%rsp), %rcx
movq 0x38(%rsp), %r13
movq (%rcx,%r13,8), %rax
movsd %xmm1, 0x8(%rax,%r12,8)
movq 0x8(%rcx,%r12,8), %rax
movsd %xmm1, (%rax,%r13,8)
movapd %xmm1, %xmm0
xorpd 0x10ca2b(%rip), %xmm0   # 0x151640
mulsd %xmm1, %xmm0
movapd %xmm0, 0x20(%rsp)
callq 0x47b0
addsd (%rbx,%r13,8), %xmm0
movsd %xmm0, (%rbx,%r13,8)
movapd 0x20(%rsp), %xmm0
callq 0x47b0
addsd 0x8(%rbx,%r12,8), %xmm0
movsd %xmm0, 0x8(%rbx,%r12,8)
incq %r12
cmpq %r12, 0x10(%rsp)
jne 0x44a85
movq 0xb8(%rsp), %r13
cmpq 0x8(%rsp), %r13
jne 0x44a52
testb %bpl, %bpl
movl 0x48(%rsp), %r12d
je 0x44e47
movq 0x8(%rsp), %rax
leaq (,%rax,8), %rax
movq %rax, 0xb8(%rsp)
movl %r12d, 0x10(%rsp)
testl %r12d, %r12d
movq 0x50(%rsp), %r13
jle 0x4566b
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r15d, %r15d
movsd 0x10c6b0(%rip), %xmm0   # 0x151360
movsd %xmm0, 0x20(%rsp)
movslq (%r13,%r15,4), %rsi
leaq 0x68(%rsp), %rdi
callq 0xee36
testq %rdx, (%rax)
je 0x44ce1
movsd (%rbx,%r15,8), %xmm0
ucomisd 0x20(%rsp), %xmm0
jbe 0x44ce1
movl %r15d, %ebp
movsd %xmm0, 0x20(%rsp)
incq %r15
cmpq %r15, 0x8(%rsp)
jne 0x44cb6
xorpd %xmm0, %xmm0
ucomisd 0x20(%rsp), %xmm0
ja 0x4566b
testl %ebp, %ebp
js 0x4566b
movl %ebp, %eax
movslq (%r13,%rax,4), %rsi
leaq 0x68(%rsp), %rdi
callq 0xee36
notq %rdx
andq %rdx, (%rax)
decl 0x10(%rsp)
testl %r12d, %r12d
jle 0x44e28
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
movq 0xb8(%rsp), %rdx
callq 0x4250
movl $0x1, %ebp
xorl %r13d, %r13d
movq 0x50(%rsp), %rax
movslq (%rax,%r15,4), %rsi
leaq 0x68(%rsp), %rdi
callq 0xee36
leaq 0x1(%r15), %rcx
testq %rdx, (%rax)
movq %rcx, 0x38(%rsp)
je 0x44e06
movq %rbp, %r12
cmpq 0xe0(%rsp), %rcx
jge 0x44e06
movq 0x50(%rsp), %rax
movslq (%rax,%r12,4), %rsi
leaq 0x68(%rsp), %rdi
callq 0xee36
testq %rdx, (%rax)
je 0x44df8
movq 0x18(%rsp), %rax
movq (%rax,%r15,8), %rax
movsd (%rax,%r12,8), %xmm2
movsd 0x1082af(%rip), %xmm1   # 0x14d058
ucomisd %xmm2, %xmm1
movzbl %r13b, %r13d
movl $0x1, %eax
cmoval %eax, %r13d
movapd %xmm2, %xmm0
xorpd 0x10c87a(%rip), %xmm0   # 0x151640
mulsd %xmm2, %xmm0
movapd %xmm0, 0x20(%rsp)
callq 0x47b0
addsd (%rbx,%r15,8), %xmm0
movsd %xmm0, (%rbx,%r15,8)
movapd 0x20(%rsp), %xmm0
callq 0x47b0
addsd (%rbx,%r12,8), %xmm0
movsd %xmm0, (%rbx,%r12,8)
incq %r12
cmpq %r12, 0x8(%rsp)
jne 0x44d7a
incq %rbp
movq 0x38(%rsp), %r15
cmpq 0x8(%rsp), %r15
jne 0x44d44
cmpb $0x1, %r13b
movl 0x48(%rsp), %r12d
je 0x44c92
movl %r12d, %esi
movl 0x10(%rsp), %edx
subl %edx, %esi
leaq 0x10d0d2(%rip), %rdi    # 0x151f0a
movsd 0x108218(%rip), %xmm0   # 0x14d058
movb $0x1, %al
callq 0x4060
testl %r12d, %r12d
jle 0x44e6c
xorl %r15d, %r15d
movq 0x18(%rsp), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x44e62
callq 0x4570
incq %r15
cmpq %r15, 0x8(%rsp)
jne 0x44e4f
movq 0x18(%rsp), %rdi
callq 0x4570
movq 0x50(%rsp), %rdi
callq 0x4570
movq %rbx, %rdi
callq 0x4570
leaq 0x2c0(%rsp), %rdi
callq 0x5112c
leaq 0x2c0(%rsp), %rsi
movq %r14, %rdi
callq 0x52620
leaq 0xbc0(%rsp), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x842e6
subl (%rax), %ebx
movq %rbx, 0x10(%rsp)
leaq 0x268(%rsp), %r12
leaq 0x190(%rsp), %r13
leaq 0x258(%rsp), %rbp
leaq 0xbc0(%rsp), %rdi
xorl %esi, %esi
callq 0x842e6
movq 0x10(%rsp), %rcx
cmpl (%rax), %ecx
jg 0x45198
leaq 0xbc0(%rsp), %rdi
movl $0x1, %esi
callq 0x842e6
xorl %ecx, %ecx
subl (%rax), %ecx
movl %ecx, 0x38(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x10(%rsp), %xmm0
movapd %xmm0, 0xe0(%rsp)
leaq 0xbc0(%rsp), %rdi
movl $0x1, %esi
callq 0x842e6
movl 0x38(%rsp), %ecx
cmpl (%rax), %ecx
jg 0x45187
leaq 0xbc0(%rsp), %rdi
movl $0x2, %esi
callq 0x842e6
xorl %ebx, %ebx
subl (%rax), %ebx
movq 0x10(%rsp), %rax
movl 0x38(%rsp), %ecx
orl %ecx, %eax
setne 0x18(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movapd 0xe0(%rsp), %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movapd %xmm1, 0x50(%rsp)
leaq 0xbc0(%rsp), %rdi
movl $0x2, %esi
callq 0x842e6
cmpl (%rax), %ebx
jg 0x4517e
movl %ebx, 0x8(%rsp)
testl %ebx, %ebx
setne %al
orb 0x18(%rsp), %al
cmpb $0x1, %al
jne 0x45173
cmpl $0x0, 0x110(%r14)
jle 0x45173
xorps %xmm0, %xmm0
cvtsi2sdl 0x8(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movl $0x40, %ebx
xorl %r15d, %r15d
movq %r13, %rdi
callq 0x51264
movq 0x2f0(%r14), %rsi
movq 0x2f8(%r14), %rdx
subq %rsi, %rdx
sarq $0x3, %rdx
movabsq $-0x79435e50d79435e5, %rax # imm = 0x86BCA1AF286BCA1B
imulq %rax, %rdx
cmpq %r15, %rdx
jbe 0x45605
addq %rbx, %rsi
leaq 0x1d0(%rsp), %rdi
callq 0x4240
movq 0x2f0(%r14), %rax
movq 0x2f8(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x79435e50d79435e5, %rcx # imm = 0x86BCA1AF286BCA1B
imulq %rcx, %rdx
cmpq %r15, %rdx
jbe 0x45605
movupd -0x28(%rax,%rbx), %xmm0
addpd 0x50(%rsp), %xmm0
movupd %xmm0, 0x1a8(%rsp)
movsd -0x18(%rax,%rbx), %xmm2
addsd 0x20(%rsp), %xmm2
movsd %xmm2, 0x1b8(%rsp)
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
leaq 0x90(%rsp), %rdi
movq %r14, %rsi
callq 0x52d94
movaps 0x90(%rsp), %xmm0
movaps %xmm0, 0x190(%rsp)
movsd 0xa0(%rsp), %xmm0
movsd %xmm0, 0x1a0(%rsp)
movq %r12, 0x258(%rsp)
movq 0x1d0(%rsp), %rsi
movq 0x1d8(%rsp), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0xf3ce
movq %rbp, %rdi
movl 0x4c(%rsp), %esi
callq 0x21d5e
movsd %xmm0, 0x1c0(%rsp)
movq 0x258(%rsp), %rdi
cmpq %r12, %rdi
je 0x450f8
movq 0x268(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x5b0(%rsp), %rdi
movq %r13, %rsi
callq 0xe9a8
incl 0x3d0(%rsp)
movq 0x1f0(%rsp), %rdi
leaq 0x200(%rsp), %rax
cmpq %rax, %rdi
je 0x45134
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x1d0(%rsp), %rdi
leaq 0x1e0(%rsp), %rax
cmpq %rax, %rdi
je 0x45159
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x4470
incq %r15
movslq 0x110(%r14), %rax
addq $0x98, %rbx
cmpq %rax, %r15
jl 0x44fcf
movl 0x8(%rsp), %ebx
incl %ebx
jmp 0x44f7b
incl 0x38(%rsp)
jmp 0x44f1d
movq 0x10(%rsp), %rax
incl %eax
movq %rax, 0x10(%rsp)
jmp 0x44ed5
movl 0x110(%r14), %esi
movl 0x3d0(%rsp), %edx
leaq 0x10cdb5(%rip), %rdi    # 0x151f62
xorl %eax, %eax
callq 0x4060
movq 0x148(%rsp), %rax
subq 0x140(%rsp), %rax
shrq $0x6, %rax
testl %eax, %eax
jle 0x4556b
leaq 0xc0(%rsp), %r12
leaq 0x10cde9(%rip), %r13    # 0x151fc8
xorl %ebx, %ebx
movl $0x0, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xc0(%rsp)
movq $0x0, 0xd0(%rsp)
leaq 0x68(%rsp), %rdi
movq %rbx, %rsi
callq 0xee36
testq %rdx, (%rax)
je 0x45541
cmpl $0x0, 0x3d0(%rsp)
jle 0x45316
movq %rbx, %r15
shlq $0x6, %r15
xorl %r14d, %r14d
xorl %ebp, %ebp
movq 0x140(%rsp), %rax
movq 0x148(%rsp), %rdx
subq %rax, %rdx
sarq $0x6, %rdx
cmpq %rbx, %rdx
jbe 0x45638
movq 0x5b0(%rsp), %rcx
movq 0x5b8(%rsp), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x79435e50d79435e5, %rsi # imm = 0x86BCA1AF286BCA1B
imulq %rsi, %rdx
cmpq %rbp, %rdx
jbe 0x45635
movsd 0x10(%rax,%r15), %xmm2
movsd (%rax,%r15), %xmm0
movsd 0x8(%rax,%r15), %xmm1
movsd (%rcx,%r14), %xmm3
movsd 0x8(%rcx,%r14), %xmm4
movsd 0x10(%rcx,%r14), %xmm5
callq 0x84cbb
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x230(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x452fb
movq 0x5b0(%rsp), %rsi
movq 0x5b8(%rsp), %rdx
subq %rsi, %rdx
sarq $0x3, %rdx
movabsq $-0x79435e50d79435e5, %rax # imm = 0x86BCA1AF286BCA1B
imulq %rax, %rdx
cmpq %rbp, %rdx
jbe 0x45635
addq %r14, %rsi
movq %r12, %rdi
callq 0xe9a8
incq %rbp
movslq 0x3d0(%rsp), %rax
addq $0x98, %r14
cmpq %rax, %rbp
jl 0x45230
leaq 0x190(%rsp), %rdi
movl 0x20(%rsp), %esi
callq 0x4a806
leaq 0x238(%rsp), %r14
movq %r14, %rdi
movq 0x228(%rsp), %rsi
leaq 0x47(%rsp), %rdx
callq 0x2f484
leaq 0x90(%rsp), %r15
movq %r14, %rdi
leaq 0x10cc4e(%rip), %rsi    # 0x151fa4
callq 0x4820
leaq 0xa0(%rsp), %rcx
movq %rcx, 0x90(%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xf3ce
movq 0x238(%rsp), %rdi
leaq 0x248(%rsp), %rax
cmpq %rax, %rdi
je 0x453a2
movq 0x248(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x190(%rsp), %rsi
movq 0x198(%rsp), %rdx
movq %r15, %rdi
callq 0x4190
movq %r15, %rdi
leaq 0x10cea8(%rip), %rsi    # 0x15226c
callq 0x4820
movq 0x90(%rsp), %rdi
leaq 0x10c86c(%rip), %rsi    # 0x151c44
callq 0x4510
movq 0xc8(%rsp), %rcx
subq 0xc0(%rsp), %rcx
movq %rax, %rbp
shrq $0x3, %rcx
imull $0x286bca1b, %ecx, %edx # imm = 0x286BCA1B
incl %edx
movq %rax, %rdi
leaq 0x10cbb3(%rip), %rsi    # 0x151fb9
xorl %eax, %eax
callq 0x45f0
movq 0xc0(%rsp), %rax
movq 0xc8(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x79435e50d79435e5, %rcx # imm = 0x86BCA1AF286BCA1B
imulq %rcx, %rdx
testl %edx, %edx
jle 0x454a2
xorl %r14d, %r14d
xorl %r15d, %r15d
cmpq %r15, %rdx
jbe 0x45649
movq 0x40(%rax,%r14), %rdx
movsd (%rax,%r14), %xmm0
movsd 0x8(%rax,%r14), %xmm1
movsd 0x10(%rax,%r14), %xmm2
movq %rbp, %rdi
movq %r13, %rsi
movb $0x3, %al
callq 0x45f0
incq %r15
movq 0xc0(%rsp), %rax
movq 0xc8(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x79435e50d79435e5, %rcx # imm = 0x86BCA1AF286BCA1B
imulq %rcx, %rdx
movslq %edx, %rcx
addq $0x98, %r14
cmpq %rcx, %r15
jl 0x4543c
movq 0x140(%rsp), %rax
movq 0x148(%rsp), %rdx
subq %rax, %rdx
sarq $0x6, %rdx
cmpq %rbx, %rdx
jbe 0x456a3
movq %rbx, %rcx
shlq $0x6, %rcx
movsd (%rax,%rcx), %xmm0
movsd 0x8(%rax,%rcx), %xmm1
movsd 0x10(%rax,%rcx), %xmm2
movq %rbp, %rdi
leaq 0x10caf7(%rip), %rsi    # 0x151fdb
movb $0x3, %al
callq 0x45f0
movq %rbp, %rdi
callq 0x4450
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x45518
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x190(%rsp), %rdi
leaq 0x1a0(%rsp), %rax
cmpq %rax, %rdi
je 0x4553d
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x4470
incl 0x20(%rsp)
movq %r12, %rdi
callq 0xf2da
movq 0x148(%rsp), %rax
subq 0x140(%rsp), %rax
incq %rbx
shrq $0x6, %rax
cltq
cmpq %rax, %rbx
jl 0x451e9
leaq 0x2c0(%rsp), %rdi
callq 0xec94
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x45592
movq 0x88(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x158(%rsp), %rdi
testq %rdi, %rdi
je 0x455af
movq 0x168(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
leaq 0x140(%rsp), %rdi
callq 0xf256
leaq 0x728(%rsp), %rdi
callq 0xec94
leaq 0x2a0(%rsp), %rdi
callq 0x48bbc
movq 0x278(%rsp), %rdi
testq %rdi, %rdi
je 0x455f3
movq 0x298(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
addq $0xb88, %rsp            # imm = 0xB88
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1080e9(%rip), %rdi    # 0x14d6f5
movq %r15, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0x1080d8(%rip), %rdi    # 0x14d6f5
xorl %eax, %eax
callq 0x4630
leaq 0x1080ca(%rip), %rdi    # 0x14d6f5
movq %r15, %rsi
xorl %eax, %eax
callq 0x4630
movq %rbp, %rbx
leaq 0x1080b6(%rip), %rdi    # 0x14d6f5
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0x1080a5(%rip), %rdi    # 0x14d6f5
movq %r15, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0x108094(%rip), %rdi    # 0x14d6f5
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0x10cb2c(%rip), %rdi    # 0x15219e
callq 0x4660
movl $0x1, %edi
callq 0x72bc
leaq 0x10806d(%rip), %rdi    # 0x14d6f5
movq %rbp, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0x10805c(%rip), %rdi    # 0x14d6f5
movq %rbp, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0x10804b(%rip), %rdi    # 0x14d6f5
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4630
jmp 0x456d8
jmp 0x456d8
jmp 0x456d8
jmp 0x45862
jmp 0x45862
jmp 0x45858
jmp 0x45858
jmp 0x45858
jmp 0x45858
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0xec64
leaq 0x2c0(%rsp), %rdi
callq 0xec34
jmp 0x458e7
movq %rax, %rbx
jmp 0x45918
jmp 0x45704
movq %rax, %rbx
jmp 0x45942
jmp 0x4570e
movq %rax, %rbx
jmp 0x4594f
jmp 0x45858
jmp 0x45858
movq %rax, %rbx
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0x457a5
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x457a5
movq %rax, %rbx
jmp 0x457f3
jmp 0x457cb
jmp 0x4581e
jmp 0x45858
jmp 0x4581e
jmp 0x457a2
jmp 0x457cb
movq %rax, %rbx
movq 0x238(%rsp), %rdi
leaq 0x248(%rsp), %rax
cmpq %rax, %rdi
je 0x457f3
movq 0x248(%rsp), %rsi
jmp 0x457eb
jmp 0x45862
jmp 0x45858
jmp 0x45858
jmp 0x45858
jmp 0x45862
movq %rax, %rbx
leaq 0x2c0(%rsp), %rdi
callq 0x2f5e8
jmp 0x458e7
jmp 0x45858
jmp 0x45858
jmp 0x45858
jmp 0x45858
movq %rax, %rbx
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x457f3
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x190(%rsp), %rdi
leaq 0x1a0(%rsp), %rax
cmpq %rax, %rdi
je 0x45821
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x45821
jmp 0x4581e
jmp 0x45858
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0xf2da
jmp 0x458da
jmp 0x45858
jmp 0x45862
jmp 0x45862
jmp 0x45858
movq %rax, %rbx
leaq 0x2c0(%rsp), %rdi
callq 0x385cc
jmp 0x458e7
jmp 0x45858
jmp 0x45858
jmp 0x45858
jmp 0x45858
movq %rax, %rbx
jmp 0x458e7
jmp 0x45862
movq %rax, %rbx
jmp 0x458da
movq %rax, %rbx
movq 0x258(%rsp), %rdi
cmpq %r12, %rdi
je 0x45890
movq 0x268(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x45890
jmp 0x4588d
jmp 0x4588d
movq %rax, %rbx
movq 0x1f0(%rsp), %rdi
leaq 0x200(%rsp), %rax
cmpq %rax, %rdi
je 0x458b5
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x1d0(%rsp), %rdi
leaq 0x1e0(%rsp), %rax
cmpq %rax, %rdi
je 0x458da
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x2c0(%rsp), %rdi
callq 0xec94
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x45918
movq 0x88(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
xorl %eax, %eax
movq %rax, 0x68(%rsp)
movl %eax, 0x70(%rsp)
movq %rax, 0x78(%rsp)
movl %eax, 0x80(%rsp)
movq 0x158(%rsp), %rdi
testq %rdi, %rdi
je 0x45935
movq 0x168(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
leaq 0x140(%rsp), %rdi
callq 0xf256
leaq 0x728(%rsp), %rdi
callq 0xec94
leaq 0x2a0(%rsp), %rdi
callq 0x48bbc
movq 0x278(%rsp), %rdi
testq %rdi, %rdi
je 0x45979
movq 0x298(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq %rbx, %rdi
callq 0x4780