// File: /workspace/github_cpp_makefile_star2_O1/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 $0xb58, %rsp            # imm = 0xB58
movl %r9d, %ebx
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movsd %xmm1, 0x228(%rsp)
movq %rdi, 0x220(%rsp)
xorl %eax, %eax
leaq 0xc0(%rsp), %rsi
movq %rax, (%rsi)
movl %eax, 0x8(%rsi)
movq %rax, 0x10(%rsi)
movl %eax, 0x18(%rsi)
movq %rax, 0x20(%rsi)
leaq 0x270(%rsp), %rdx
movq %rax, 0x10(%rdx)
xorps %xmm1, %xmm1
movaps %xmm1, (%rdx)
movq %r15, %rdi
movsd %xmm0, 0x30(%rsp)
callq 0x7481a
leaq 0x6f8(%rsp), %rdi
callq 0x514f4
leaq 0x6f8(%rsp), %rsi
movq %r14, %rdi
callq 0x528f4
leaq 0xe8(%rsp), %rdi
callq 0x555c0
leaq 0xe8(%rsp), %rsi
movq %r15, %rdi
callq 0x556ec
xorl %eax, %eax
movq %rax, 0x58(%rsp)
movl %eax, 0x60(%rsp)
movq %rax, 0x68(%rsp)
movl %eax, 0x70(%rsp)
movq %rax, 0x78(%rsp)
movzbl %bpl, %eax
movl %eax, 0x54(%rsp)
testb %bl, %bl
je 0x44d83
movq %r15, 0x8(%rsp)
movq 0x148(%rsp), %rax
cmpq %rax, 0x150(%rsp)
je 0x44a59
movq %rax, 0x150(%rsp)
movl %ebp, (%rsp)
movq 0x130(%rsp), %rbx
movq 0x138(%rsp), %r15
cmpq %rbx, %r15
je 0x44a9a
movq %rbx, %r13
movq 0x20(%r13), %rdi
testq %rdi, %rdi
je 0x44a89
movq 0x30(%r13), %rsi
subq %rdi, %rsi
callq 0x4470
addq $0x40, %r13
cmpq %r15, %r13
jne 0x44a74
movq %rbx, 0x138(%rsp)
leaq 0x9e8(%rsp), %rbx
movq (%rbx), %rsi
movq %rbx, %rdi
callq 0x12f02
movl $0x0, -0x1e0(%rbx)
cmpl $0x0, 0x110(%r14)
jle 0x44ccc
movl $0x40, %r13d
xorl %ebp, %ebp
leaq 0x290(%rsp), %r15
leaq 0x160(%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 0x45cc2
addq %r13, %rdi
movq %r12, %rsi
callq 0x4050
testl %eax, %eax
jne 0x44cb2
movq %r15, %rdi
callq 0x5162c
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 0x45cd3
addq %r13, %rsi
leaq 0x2d0(%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 0x45cd3
movsd -0x28(%rax,%r13), %xmm0
movsd %xmm0, 0x2a8(%rsp)
movsd -0x20(%rax,%r13), %xmm0
movsd %xmm0, 0x2b0(%rsp)
movsd -0x18(%rax,%r13), %xmm0
movsd %xmm0, 0x2b8(%rsp)
movsd -0x40(%rax,%r13), %xmm0
movsd %xmm0, 0x290(%rsp)
movsd -0x38(%rax,%r13), %xmm0
movsd %xmm0, 0x298(%rsp)
movsd -0x30(%rax,%r13), %xmm0
movsd %xmm0, 0x2a0(%rsp)
leaq 0x170(%rsp), %rax
movq %rax, 0x160(%rsp)
movq 0x2d0(%rsp), %rsi
movq 0x2d8(%rsp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xf32a
movq %rbx, %rdi
movl 0x54(%rsp), %esi
callq 0x21e42
movsd %xmm0, 0x2c0(%rsp)
movq 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
cmpq %rax, %rdi
je 0x44c51
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x9e8(%rsp), %rdi
movq %r15, %rsi
callq 0xe936
incl 0x808(%rsp)
movq 0x2f0(%rsp), %rdi
leaq 0x300(%rsp), %rax
cmpq %rax, %rdi
je 0x44c8d
movq 0x300(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x2d0(%rsp), %rdi
leaq 0x2e0(%rsp), %rax
cmpq %rax, %rdi
je 0x44cb2
movq 0x2e0(%rsp), %rsi
incq %rsi
callq 0x4470
incq %rbp
movslq 0x110(%r14), %rax
addq $0x98, %r13
cmpq %rax, %rbp
jl 0x44add
movq 0x1522ed(%rip), %rdi    # 0x196fc0
leaq 0x10f05a(%rip), %rsi    # 0x153d34
movl $0x29, %edx
callq 0x44e0
movq 0x1522d5(%rip), %rdi    # 0x196fc0
leaq 0x11083c(%rip), %rsi    # 0x15552e
movl $0x1, %edx
callq 0x44e0
xorps %xmm0, %xmm0
movaps %xmm0, 0x290(%rsp)
xorl %eax, %eax
movq %rax, 0x2a0(%rsp)
movq %rax, 0x190(%rsp)
movaps %xmm0, 0x180(%rsp)
cmpb $0x0, (%rsp)
movq 0x8(%rsp), %r15
je 0x44d9a
leaq 0x6f8(%rsp), %rsi
leaq 0xe8(%rsp), %rdx
leaq 0x290(%rsp), %rcx
leaq 0x180(%rsp), %r9
movl $0x1, %edi
xorl %r8d, %r8d
callq 0x717c
movq %rax, %rbx
testq %rax, %rax
je 0x44df0
movq %rbx, %rdi
addq $0x1f8, %rdi            # imm = 0x1F8
callq 0xf028
movq %rbx, %rdi
callq 0x149ea2
movl $0x298, %esi            # imm = 0x298
jmp 0x44de8
leaq 0x58(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x494e0
jmp 0x44ece
leaq 0x6f8(%rsp), %rsi
leaq 0xe8(%rsp), %rdx
leaq 0x290(%rsp), %rcx
leaq 0x180(%rsp), %r9
xorl %edi, %edi
xorl %r8d, %r8d
callq 0x717c
movq %rax, %rbx
testq %rax, %rax
je 0x44df0
movq %rbx, %rdi
addq $0x1d0, %rdi            # imm = 0x1D0
callq 0xf052
movq %rbx, %rdi
callq 0x149ea2
movl $0x270, %esi            # imm = 0x270
movq %rbx, %rdi
callq 0x4470
movq 0x1521c9(%rip), %rdi    # 0x196fc0
leaq 0x10ef60(%rip), %rsi    # 0x153d5e
movl $0x29, %edx
callq 0x44e0
movq 0x1521b1(%rip), %rdi    # 0x196fc0
leaq 0x110718(%rip), %rsi    # 0x15552e
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 0x10ef3c(%rip), %rdi    # 0x153d88
xorl %eax, %eax
callq 0x4060
movl 0x808(%rsp), %esi
leaq 0xe8(%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 0x10ef4e(%rip), %rdi    # 0x153dd5
xorl %eax, %eax
callq 0x4060
movsd 0x30(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x58(%rsp), %rdx
movq %r14, %rdi
movl $0x1, %esi
movq %rbx, %rcx
callq 0x4202b
leaq 0x180(%rsp), %rdi
callq 0xebe4
leaq 0x290(%rsp), %rdi
callq 0xebb4
movq 0x130(%rsp), %rax
movq 0x138(%rsp), %rdx
subq %rax, %rdx
sarq $0x6, %rdx
testl %edx, %edx
jle 0x44f63
xorl %ebx, %ebx
movl $0x18, %r12d
leaq 0x58(%rsp), %r15
xorl %ebp, %ebp
cmpq %rbx, %rdx
jbe 0x45c9b
xorps %xmm0, %xmm0
ucomisd (%rax,%r12), %xmm0
jb 0x44f1d
movq %r15, %rdi
movq %rbx, %rsi
callq 0xedb6
notq %rdx
andq %rdx, (%rax)
movq %r15, %rdi
movq %rbx, %rsi
callq 0xedb6
andq (%rax), %rdx
cmpq $0x1, %rdx
sbbl $-0x1, %ebp
incq %rbx
movq 0x130(%rsp), %rax
movq 0x138(%rsp), %rcx
subq %rax, %rcx
movq %rcx, %rdx
sarq $0x6, %rdx
shrq $0x6, %rcx
movslq %ecx, %rcx
addq $0x40, %r12
cmpq %rcx, %rbx
jl 0x44ef8
movl %ebp, %ebx
jmp 0x44f65
xorl %ebx, %ebx
leaq 0x10eeb8(%rip), %rdi    # 0x153e24
movl %ebx, %esi
xorl %eax, %eax
callq 0x4060
movslq %ebx, %r15
movl %ebx, %ebp
leaq (,%r15,8), %rbx
movq %rbx, %rdi
callq 0x4030
movq %rax, 0x18(%rsp)
movl %ebp, %eax
movq %rax, (%rsp)
movl %ebp, 0x24(%rsp)
testl %ebp, %ebp
jle 0x44fba
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0x4030
movq 0x18(%rsp), %rcx
movq %rax, (%rcx,%r12,8)
incq %r12
cmpq %r12, (%rsp)
jne 0x44fa0
shlq $0x2, %r15
movq %r15, %rdi
callq 0x4030
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
callq 0x4030
movq %rax, %rbx
movq 0x138(%rsp), %rax
subq 0x130(%rsp), %rax
shrq $0x6, %rax
testl %eax, %eax
jle 0x45036
xorl %r15d, %r15d
leaq 0x58(%rsp), %rbp
xorl %r12d, %r12d
movq %rbp, %rdi
movq %r15, %rsi
callq 0xedb6
testq %rdx, (%rax)
je 0x45018
movslq %r12d, %r12
movq 0x8(%rsp), %rax
movl %r15d, (%rax,%r12,4)
incl %r12d
movq 0x138(%rsp), %rax
subq 0x130(%rsp), %rax
incq %r15
shrq $0x6, %rax
cltq
cmpq %rax, %r15
jl 0x44ff9
cmpl $0x0, 0x24(%rsp)
jle 0x45053
movq (%rsp), %rax
leaq (,%rax,8), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4250
movl 0x24(%rsp), %ebp
testl %ebp, %ebp
jle 0x45449
movq (%rsp), %rcx
leaq -0x1(%rcx), %rax
movq %rax, 0x28(%rsp)
xorl %eax, %eax
leaq 0x290(%rsp), %r15
xorl %ebp, %ebp
movq %rax, %rdx
movq 0x18(%rsp), %rax
movq (%rax,%rdx,8), %rax
movq $0x0, (%rax,%rdx,8)
leaq 0x1(%rdx), %rax
movq %rax, 0x10(%rsp)
cmpq %rcx, %rax
jae 0x4527b
movq %rdx, %r13
movq %rdx, %r12
movq %rdx, 0x48(%rsp)
movq 0x8(%rsp), %rcx
movslq (%rcx,%r13,4), %rsi
movq 0x130(%rsp), %rax
movq 0x138(%rsp), %rdx
subq %rax, %rdx
sarq $0x6, %rdx
cmpq %rsi, %rdx
jbe 0x45c57
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 0x180(%rsp), %rdi
movq %r14, %rsi
callq 0x531ea
movq 0x130(%rsp), %rax
movq 0x138(%rsp), %rdx
subq %rax, %rdx
sarq $0x6, %rdx
cmpq %r15, %rdx
jbe 0x45c65
shlq $0x6, %r15
movsd (%rax,%r15), %xmm0
movsd 0x8(%rax,%r15), %xmm1
movsd 0x10(%rax,%r15), %xmm2
leaq 0x80(%rsp), %rdi
movq %r14, %rsi
callq 0x531ea
movq %r13, %r15
movq %r13, %rdi
movq %r14, %rsi
callq 0x52aea
movsd 0x180(%rsp), %xmm0
movsd 0x188(%rsp), %xmm1
movsd 0x190(%rsp), %xmm2
movsd 0x80(%rsp), %xmm3
movsd 0x88(%rsp), %xmm4
movsd 0x90(%rsp), %xmm5
movq %r15, %rdi
callq 0x78f3c
movaps %xmm0, 0x30(%rsp)
movq 0x2c0(%rsp), %rdi
testq %rdi, %rdi
je 0x451b5
movq 0x2d0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x2a8(%rsp), %rdi
testq %rdi, %rdi
je 0x451d2
movq 0x2b8(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x290(%rsp), %rdi
testq %rdi, %rdi
je 0x451ef
movq 0x2a0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movsd 0x109e61(%rip), %xmm0   # 0x14f058
movapd 0x30(%rsp), %xmm1
ucomisd %xmm1, %xmm0
movzbl %bpl, %ebp
movl $0x1, %eax
cmoval %eax, %ebp
movq 0x18(%rsp), %rcx
movq 0x48(%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 0x10e377(%rip), %xmm0   # 0x1535b0
mulsd %xmm1, %xmm0
movapd %xmm0, 0x30(%rsp)
callq 0x47b0
addsd (%rbx,%r13,8), %xmm0
movsd %xmm0, (%rbx,%r13,8)
movapd 0x30(%rsp), %xmm0
callq 0x47b0
addsd 0x8(%rbx,%r12,8), %xmm0
movsd %xmm0, 0x8(%rbx,%r12,8)
incq %r12
cmpq %r12, 0x28(%rsp)
jne 0x450a9
movq (%rsp), %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jne 0x45078
testb %bpl, %bpl
movl 0x24(%rsp), %ebp
je 0x45449
movq (%rsp), %rax
leaq (,%rax,8), %rax
movq %rax, 0x10(%rsp)
movl %ebp, 0x28(%rsp)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r15d, %r15d
movsd 0x10e011(%rip), %xmm0   # 0x1532d0
movsd %xmm0, 0x30(%rsp)
movq 0x8(%rsp), %rax
movslq (%rax,%r15,4), %rsi
leaq 0x58(%rsp), %rdi
callq 0xedb6
testq %rdx, (%rax)
je 0x452f4
movsd (%rbx,%r15,8), %xmm0
ucomisd 0x30(%rsp), %xmm0
jbe 0x452f4
movl %r15d, %ebp
movsd %xmm0, 0x30(%rsp)
incq %r15
cmpq %r15, (%rsp)
jne 0x452c5
xorpd %xmm0, %xmm0
ucomisd 0x30(%rsp), %xmm0
ja 0x45cac
testl %ebp, %ebp
js 0x45cac
movl %ebp, %eax
movq 0x8(%rsp), %rcx
movslq (%rcx,%rax,4), %rsi
leaq 0x58(%rsp), %rdi
callq 0xedb6
notq %rdx
andq %rdx, (%rax)
decl 0x28(%rsp)
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %esi, %esi
movq 0x10(%rsp), %rdx
callq 0x4250
movl $0x1, %ebp
xorl %r15d, %r15d
movq 0x8(%rsp), %rax
movslq (%rax,%r13,4), %rsi
leaq 0x58(%rsp), %rdi
callq 0xedb6
leaq 0x1(%r13), %rcx
testq %rdx, (%rax)
movq %rcx, 0x48(%rsp)
je 0x4540b
movq %rbp, %r12
cmpq (%rsp), %rcx
jae 0x4540b
movq 0x8(%rsp), %rax
movslq (%rax,%r12,4), %rsi
leaq 0x58(%rsp), %rdi
callq 0xedb6
testq %rdx, (%rax)
je 0x453fe
movq 0x18(%rsp), %rax
movq (%rax,%r13,8), %rax
movsd (%rax,%r12,8), %xmm2
movsd 0x109ca9(%rip), %xmm1   # 0x14f058
ucomisd %xmm2, %xmm1
movzbl %r15b, %r15d
movl $0x1, %eax
cmoval %eax, %r15d
movapd %xmm2, %xmm0
xorpd 0x10e1e4(%rip), %xmm0   # 0x1535b0
mulsd %xmm2, %xmm0
movapd %xmm0, 0x30(%rsp)
callq 0x47b0
addsd (%rbx,%r13,8), %xmm0
movsd %xmm0, (%rbx,%r13,8)
movapd 0x30(%rsp), %xmm0
callq 0x47b0
addsd (%rbx,%r12,8), %xmm0
movsd %xmm0, (%rbx,%r12,8)
incq %r12
cmpq %r12, (%rsp)
jne 0x45380
incq %rbp
movq 0x48(%rsp), %r13
cmpq (%rsp), %r13
jne 0x4534e
cmpb $0x1, %r15b
je 0x452af
movl 0x24(%rsp), %ebp
movl %ebp, %esi
movl 0x28(%rsp), %edx
subl %edx, %esi
leaq 0x10ea20(%rip), %rdi    # 0x153e5a
movsd 0x109c16(%rip), %xmm0   # 0x14f058
movb $0x1, %al
callq 0x4060
testl %ebp, %ebp
movq (%rsp), %r12
movq 0x8(%rsp), %r13
jle 0x45474
xorl %r15d, %r15d
movq 0x18(%rsp), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x4546c
callq 0x4570
incq %r15
cmpq %r15, %r12
jne 0x45459
movq 0x18(%rsp), %rdi
callq 0x4570
movq %r13, %rdi
callq 0x4570
movq %rbx, %rdi
callq 0x4570
leaq 0x290(%rsp), %rdi
callq 0x514f4
leaq 0x290(%rsp), %rsi
movq %r14, %rdi
callq 0x528f4
leaq 0xb90(%rsp), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x85900
subl (%rax), %ebx
movq %rbx, 0x10(%rsp)
leaq 0x260(%rsp), %r12
leaq 0x180(%rsp), %r13
leaq 0x250(%rsp), %rbp
leaq 0xb90(%rsp), %rdi
xorl %esi, %esi
callq 0x85900
movq 0x10(%rsp), %rcx
cmpl (%rax), %ecx
jg 0x4579b
leaq 0xb90(%rsp), %rdi
movl $0x1, %esi
callq 0x85900
xorl %ecx, %ecx
subl (%rax), %ecx
movl %ecx, 0x28(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x10(%rsp), %xmm0
movsd %xmm0, (%rsp)
leaq 0xb90(%rsp), %rdi
movl $0x1, %esi
callq 0x85900
movl 0x28(%rsp), %ecx
cmpl (%rax), %ecx
jg 0x4578a
leaq 0xb90(%rsp), %rdi
movl $0x2, %esi
callq 0x85900
xorl %ebx, %ebx
subl (%rax), %ebx
movq 0x10(%rsp), %rax
movl 0x28(%rsp), %ecx
orl %ecx, %eax
setne 0x48(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0xb90(%rsp), %rdi
movl $0x2, %esi
callq 0x85900
cmpl (%rax), %ebx
jg 0x45781
movl %ebx, 0x18(%rsp)
testl %ebx, %ebx
setne %al
orb 0x48(%rsp), %al
cmpb $0x1, %al
jne 0x45776
cmpl $0x0, 0x110(%r14)
jle 0x45776
xorps %xmm0, %xmm0
cvtsi2sdl 0x18(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movl $0x40, %ebx
xorl %r15d, %r15d
movq %r13, %rdi
callq 0x5162c
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 0x45c46
addq %rbx, %rsi
leaq 0x1c0(%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 0x45c46
movsd -0x28(%rax,%rbx), %xmm0
addsd (%rsp), %xmm0
movsd %xmm0, 0x198(%rsp)
movsd -0x20(%rax,%rbx), %xmm1
addsd 0x8(%rsp), %xmm1
movsd %xmm1, 0x1a0(%rsp)
movsd -0x18(%rax,%rbx), %xmm2
addsd 0x30(%rsp), %xmm2
movsd %xmm2, 0x1a8(%rsp)
leaq 0x80(%rsp), %rdi
movq %r14, %rsi
callq 0x53092
movsd 0x80(%rsp), %xmm0
movsd %xmm0, 0x180(%rsp)
movupd 0x88(%rsp), %xmm0
movupd %xmm0, 0x188(%rsp)
movq %r12, 0x250(%rsp)
movq 0x1c0(%rsp), %rsi
movq 0x1c8(%rsp), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0xf32a
movq %rbp, %rdi
movl 0x54(%rsp), %esi
callq 0x21e42
movsd %xmm0, 0x1b0(%rsp)
movq 0x250(%rsp), %rdi
cmpq %r12, %rdi
je 0x456fb
movq 0x260(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x580(%rsp), %rdi
movq %r13, %rsi
callq 0xe936
incl 0x3a0(%rsp)
movq 0x1e0(%rsp), %rdi
leaq 0x1f0(%rsp), %rax
cmpq %rax, %rdi
je 0x45737
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x1c0(%rsp), %rdi
leaq 0x1d0(%rsp), %rax
cmpq %rax, %rdi
je 0x4575c
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x4470
incq %r15
movslq 0x110(%r14), %rax
addq $0x98, %rbx
cmpq %rax, %r15
jl 0x455c4
movl 0x18(%rsp), %ebx
incl %ebx
jmp 0x45570
incl 0x28(%rsp)
jmp 0x4551f
movq 0x10(%rsp), %rax
incl %eax
movq %rax, 0x10(%rsp)
jmp 0x454db
movl 0x110(%r14), %esi
movl 0x3a0(%rsp), %edx
leaq 0x10e702(%rip), %rdi    # 0x153eb2
xorl %eax, %eax
callq 0x4060
movq 0x138(%rsp), %rax
subq 0x130(%rsp), %rax
shrq $0x6, %rax
testl %eax, %eax
jle 0x45b6e
leaq 0xa0(%rsp), %r12
leaq 0x10e736(%rip), %r13    # 0x153f18
xorl %ebx, %ebx
movl $0x0, 0x30(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movq $0x0, 0xb0(%rsp)
leaq 0x58(%rsp), %rdi
movq %rbx, %rsi
callq 0xedb6
testq %rdx, (%rax)
je 0x45b44
cmpl $0x0, 0x3a0(%rsp)
jle 0x45919
movq %rbx, %r15
shlq $0x6, %r15
xorl %r14d, %r14d
xorl %ebp, %ebp
movq 0x130(%rsp), %rax
movq 0x138(%rsp), %rdx
subq %rax, %rdx
sarq $0x6, %rdx
cmpq %rbx, %rdx
jbe 0x45c79
movq 0x580(%rsp), %rcx
movq 0x588(%rsp), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x79435e50d79435e5, %rsi # imm = 0x86BCA1AF286BCA1B
imulq %rsi, %rdx
cmpq %rbp, %rdx
jbe 0x45c76
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 0x868fa
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x228(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x458fe
movq 0x580(%rsp), %rsi
movq 0x588(%rsp), %rdx
subq %rsi, %rdx
sarq $0x3, %rdx
movabsq $-0x79435e50d79435e5, %rax # imm = 0x86BCA1AF286BCA1B
imulq %rax, %rdx
cmpq %rbp, %rdx
jbe 0x45c76
addq %r14, %rsi
movq %r12, %rdi
callq 0xe936
incq %rbp
movslq 0x3a0(%rsp), %rax
addq $0x98, %r14
cmpq %rax, %rbp
jl 0x45833
leaq 0x180(%rsp), %rdi
movl 0x30(%rsp), %esi
callq 0x4ab0e
leaq 0x230(%rsp), %r14
movq %r14, %rdi
movq 0x220(%rsp), %rsi
leaq 0x47(%rsp), %rdx
callq 0x2f6b2
leaq 0x80(%rsp), %r15
movq %r14, %rdi
leaq 0x10e59b(%rip), %rsi    # 0x153ef4
callq 0x4820
leaq 0x90(%rsp), %rcx
movq %rcx, 0x80(%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xf32a
movq 0x230(%rsp), %rdi
leaq 0x240(%rsp), %rax
cmpq %rax, %rdi
je 0x459a5
movq 0x240(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x180(%rsp), %rsi
movq 0x188(%rsp), %rdx
movq %r15, %rdi
callq 0x4190
movq %r15, %rdi
leaq 0x10e7f5(%rip), %rsi    # 0x1541bc
callq 0x4820
movq 0x80(%rsp), %rdi
leaq 0x10e1b9(%rip), %rsi    # 0x153b94
callq 0x4510
movq 0xa8(%rsp), %rcx
subq 0xa0(%rsp), %rcx
movq %rax, %rbp
shrq $0x3, %rcx
imull $0x286bca1b, %ecx, %edx # imm = 0x286BCA1B
incl %edx
movq %rax, %rdi
leaq 0x10e500(%rip), %rsi    # 0x153f09
xorl %eax, %eax
callq 0x45f0
movq 0xa0(%rsp), %rax
movq 0xa8(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x79435e50d79435e5, %rcx # imm = 0x86BCA1AF286BCA1B
imulq %rcx, %rdx
testl %edx, %edx
jle 0x45aa5
xorl %r14d, %r14d
xorl %r15d, %r15d
cmpq %r15, %rdx
jbe 0x45c8a
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 0xa0(%rsp), %rax
movq 0xa8(%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 0x45a3f
movq 0x130(%rsp), %rax
movq 0x138(%rsp), %rdx
subq %rax, %rdx
sarq $0x6, %rdx
cmpq %rbx, %rdx
jbe 0x45ce4
movq %rbx, %rcx
shlq $0x6, %rcx
movsd (%rax,%rcx), %xmm0
movsd 0x8(%rax,%rcx), %xmm1
movsd 0x10(%rax,%rcx), %xmm2
movq %rbp, %rdi
leaq 0x10e444(%rip), %rsi    # 0x153f2b
movb $0x3, %al
callq 0x45f0
movq %rbp, %rdi
callq 0x4450
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x45b1b
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x180(%rsp), %rdi
leaq 0x190(%rsp), %rax
cmpq %rax, %rdi
je 0x45b40
movq 0x190(%rsp), %rsi
incq %rsi
callq 0x4470
incl 0x30(%rsp)
movq %r12, %rdi
callq 0xf236
movq 0x138(%rsp), %rax
subq 0x130(%rsp), %rax
incq %rbx
shrq $0x6, %rax
cltq
cmpq %rax, %rbx
jl 0x457ec
leaq 0x290(%rsp), %rdi
callq 0xec14
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x45bab
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
xorl %eax, %eax
movq %rax, 0x58(%rsp)
movl %eax, 0x60(%rsp)
movq %rax, 0x68(%rsp)
movl %eax, 0x70(%rsp)
movq %rax, 0x78(%rsp)
movq 0x148(%rsp), %rdi
testq %rdi, %rdi
je 0x45bc8
movq 0x158(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
leaq 0x130(%rsp), %rdi
callq 0xf1b8
leaq 0x6f8(%rsp), %rdi
callq 0xec14
leaq 0x270(%rsp), %rdi
callq 0x494b0
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x45c34
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
xorl %eax, %eax
movq %rax, 0xc0(%rsp)
movl %eax, 0xc8(%rsp)
movq %rax, 0xd0(%rsp)
movl %eax, 0xd8(%rsp)
movq %rax, 0xe0(%rsp)
addq $0xb58, %rsp            # imm = 0xB58
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x109a58(%rip), %rdi    # 0x14f6a5
movq %r15, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0x109a47(%rip), %rdi    # 0x14f6a5
xorl %eax, %eax
callq 0x4630
leaq 0x109a39(%rip), %rdi    # 0x14f6a5
movq %r15, %rsi
xorl %eax, %eax
callq 0x4630
movq %rbp, %rbx
leaq 0x109a25(%rip), %rdi    # 0x14f6a5
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0x109a14(%rip), %rdi    # 0x14f6a5
movq %r15, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0x109a03(%rip), %rdi    # 0x14f6a5
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0x10e43b(%rip), %rdi    # 0x1540ee
callq 0x4660
movl $0x1, %edi
callq 0x710c
leaq 0x1099dc(%rip), %rdi    # 0x14f6a5
movq %rbp, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0x1099cb(%rip), %rdi    # 0x14f6a5
movq %rbp, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0x1099ba(%rip), %rdi    # 0x14f6a5
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4630
jmp 0x45d19
jmp 0x45d19
jmp 0x45d19
jmp 0x45ea3
jmp 0x45ea3
jmp 0x45e99
jmp 0x45e99
jmp 0x45e99
jmp 0x45e99
movq %rax, %rbx
leaq 0x180(%rsp), %rdi
callq 0xebe4
leaq 0x290(%rsp), %rdi
callq 0xebb4
jmp 0x45f28
movq %rax, %rbx
jmp 0x45f58
jmp 0x45d45
movq %rax, %rbx
jmp 0x45f82
jmp 0x45d4f
movq %rax, %rbx
jmp 0x45f8f
jmp 0x45e99
jmp 0x45e99
movq %rax, %rbx
movq 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
cmpq %rax, %rdi
je 0x45de1
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x45de1
movq %rax, %rbx
jmp 0x45e34
jmp 0x45e0c
jmp 0x45e5d
jmp 0x45e5d
jmp 0x45dde
jmp 0x45e0c
movq %rax, %rbx
movq 0x230(%rsp), %rdi
leaq 0x240(%rsp), %rax
cmpq %rax, %rdi
je 0x45e34
movq 0x240(%rsp), %rsi
jmp 0x45e2c
jmp 0x45ea3
jmp 0x45e99
jmp 0x45e99
jmp 0x45e99
jmp 0x45ea3
movq %rax, %rbx
leaq 0x290(%rsp), %rdi
callq 0x2f814
jmp 0x45f28
jmp 0x45e99
jmp 0x45e99
jmp 0x45e99
jmp 0x45e99
jmp 0x45e99
movq %rax, %rbx
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x45e34
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x180(%rsp), %rdi
leaq 0x190(%rsp), %rax
cmpq %rax, %rdi
je 0x45e60
movq 0x190(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x45e60
jmp 0x45e5d
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0xf236
jmp 0x45f1b
jmp 0x45ea3
jmp 0x45ea3
jmp 0x45e99
movq %rax, %rbx
leaq 0x290(%rsp), %rdi
callq 0x38a78
jmp 0x45f28
jmp 0x45e99
jmp 0x45e99
jmp 0x45e99
jmp 0x45e99
jmp 0x45e99
jmp 0x45e99
movq %rax, %rbx
jmp 0x45f28
jmp 0x45ea3
movq %rax, %rbx
jmp 0x45f1b
movq %rax, %rbx
movq 0x250(%rsp), %rdi
cmpq %r12, %rdi
je 0x45ed1
movq 0x260(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x45ed1
jmp 0x45ece
jmp 0x45ece
movq %rax, %rbx
movq 0x1e0(%rsp), %rdi
leaq 0x1f0(%rsp), %rax
cmpq %rax, %rdi
je 0x45ef6
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x1c0(%rsp), %rdi
leaq 0x1d0(%rsp), %rax
cmpq %rax, %rdi
je 0x45f1b
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x290(%rsp), %rdi
callq 0xec14
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x45f58
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
xorl %eax, %eax
movq %rax, 0x58(%rsp)
movl %eax, 0x60(%rsp)
movq %rax, 0x68(%rsp)
movl %eax, 0x70(%rsp)
movq %rax, 0x78(%rsp)
movq 0x148(%rsp), %rdi
testq %rdi, %rdi
je 0x45f75
movq 0x158(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
leaq 0x130(%rsp), %rdi
callq 0xf1b8
leaq 0x6f8(%rsp), %rdi
callq 0xec14
leaq 0x270(%rsp), %rdi
callq 0x494b0
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x45fe1
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
xorl %eax, %eax
movq %rax, 0xc0(%rsp)
movl %eax, 0xc8(%rsp)
movq %rax, 0xd0(%rsp)
movl %eax, 0xd8(%rsp)
movq %rax, 0xe0(%rsp)
movq %rbx, %rdi
callq 0x4780