// File: Luthaf[P]zeopp/networkstorage.cc
// Function: get_multiple_best_RMSD_fits(MOLECULE, ATOM_NETWORK*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
vector<MOLECULE> get_multiple_best_RMSD_fits(MOLECULE mol, ATOM_NETWORK *cell, int vertex_ID, string net, string prefix, int mol_ID) {
  bool verbose = false; //for printing data to terminal
  //1) can we fit this MOLECULE to this VERTEX?
  int num_fit_sites_no_dummy = cell->vertices.at(vertex_ID).edges.size();
  int num_fit_sites_dummy = cell->vertices.at(vertex_ID).dummy_edges.size();
  int num_fit_sites = num_fit_sites_no_dummy + num_fit_sites_dummy;
  int num_mol_sites_no_dummy = mol.sites.size();
  int num_mol_sites_dummy = mol.dummy_sites.size();
  int num_mol_sites = num_mol_sites_no_dummy + num_mol_sites_dummy;
  if(num_fit_sites_dummy!=num_mol_sites_dummy || num_fit_sites_no_dummy!=num_mol_sites_no_dummy) { //we can only fit the molecule to the given vertex is the number of sites is the same in each
    printf("ERROR: cannot fit molecule with %d sites and %d dummy sites to a vertex with %d sites and %d dummy sites!\n", num_mol_sites_no_dummy, num_mol_sites_dummy, num_fit_sites_no_dummy, num_fit_sites_dummy);
    exit(EXIT_FAILURE);
  }

  //2) how many ways can we do it?
  vector<int> permute_base_no_dummy, permute_base_dummy;
  for(int i=0; i<num_fit_sites_no_dummy; i++) permute_base_no_dummy.push_back(i);
  for(int i=0; i<num_fit_sites_dummy; i++) permute_base_dummy.push_back(i+num_fit_sites_no_dummy);
  vector< vector<int> > permutations_no_dummy, permutations_dummy;

  permute(permute_base_no_dummy, 0, &permutations_no_dummy); //fills in a vector with all possible permutations by which we can try and orient our two objects, e.g. (0123), (0132), ...
  permute(permute_base_dummy, 0, &permutations_dummy);

  //2b) now collapse permutations for non-dummy and dummy together to get acceptable permutations
  vector< vector<int> > permutations;
  int num_perm_no_dummy = permutations_no_dummy.size();
  int num_perm_dummy = permutations_dummy.size();
  for(int i=0; i<num_perm_no_dummy; i++) {
    for(int j=0; j<num_perm_dummy; j++) {
      vector<int> new_perm = permutations_no_dummy.at(i);
      for(int k=0; k<num_fit_sites_dummy; k++) new_perm.push_back(permutations_dummy.at(j).at(k));
      permutations.push_back(new_perm);
    }
  }

  int num_perm = permutations.size();
  if(verbose) {
    printf("there are %d permutations of length %d:\n", num_perm, num_fit_sites);
    for(int i=0; i<num_perm; i++) {
      printf("\t");
      for(int j=0; j<permutations.at(i).size(); j++) {
        printf("%d ", permutations.at(i).at(j));
      }
      printf("\n");
    }
  }
  //3) which way gives us the lowest rmsd?
  double best_rmsd = -1; //dummy value
  int best_rmsd_ID = -1;
  vector<FIT> vector_of_fits;
  vector<MOLECULE> vector_of_centred_molecules;
  for(int p=0; p<num_perm; p++) { //try each permutation!
    vector<int> perm = permutations.at(p);
    double fixed[num_fit_sites][3], moving[num_fit_sites][3];
    XYZ fixed_CoM = origin, moving_CoM = origin;
    for(int i=0; i<num_fit_sites; i++) {
      XYZ fix(0,0,0);
      if(i<num_fit_sites_no_dummy)
        fix = cell->abc_to_xyz_returning_XYZ(cell->vertices.at(vertex_ID).edges.at(i)); //the edges are always in the same order
      else
        fix = cell->abc_to_xyz_returning_XYZ(cell->vertices.at(vertex_ID).dummy_edges.at(i-num_fit_sites_no_dummy));
      fixed[i][0] = fix.x;
      fixed[i][1] = fix.y;
      fixed[i][2] = fix.z;
      fixed_CoM = fixed_CoM+fix;
      XYZ move(0,0,0);
      if(perm.at(i)<num_fit_sites_no_dummy)
        move = mol.atoms_xyz.at(mol.sites.at(perm.at(i))); //permutation encodes in what order the sites should go to correspond to the edges
      else
//        move = mol.dummy_sites.at(perm.at(i)-num_fit_sites_no_dummy);
        move = mol.atoms_xyz.at(mol.dummy_sites.at(perm.at(i)-num_fit_sites_no_dummy));
      moving[i][0] = move.x;
      moving[i][1] = move.y;
      moving[i][2] = move.z;
      moving_CoM = moving_CoM+move;
    }

    if(verbose) {
      printf("PERMUTATION %d:\n\t", p);
      for(int i=0; i<num_fit_sites; i++) {
        printf("%d ", perm.at(i));
      }
      printf("\n");
      printf("\tfits the following positions:\n");
      for(int i=0; i<num_fit_sites; i++) {
        printf("\t\t%.3f %.3f %.3f to %.3f %.3f %.3f\n", moving[i][0], moving[i][1], moving[i][2], fixed[i][0], fixed[i][1], fixed[i][2]);
      }
    }
    //3a) evaluate this permutation
    double mov_com[3], mov_to_ref[3]; //leave these blank, they are filled in by the rmsd method
    double rotation_matrix[3][3];
    for(int i=0; i<3; i++) for(int j=0; j<3; j++) rotation_matrix[i][j] = 0; //dummy values - filled in by the rmsd method
    double rmsd = 0; //dummy value - filled in by the rmsd method
    calculate_rotation_rmsd(fixed, moving, num_fit_sites, mov_com, mov_to_ref, rotation_matrix, &rmsd); //calling rmsd code - writes the corresponding rotation matrix
    //3b) some permutations are not possible, and produce NAN
    bool valid = true;
    if(isnan(rmsd)) valid=false;
    for(int i=0; i<3 && valid; i++) for(int j=0; j<3 && valid; j++) if(isnan(rotation_matrix[i][j])) valid=false;
    if(valid) {
      FIT f;
      f.fit = rotate(mol, rotation_matrix);
      MOLECULE centred_aligned_mol = translate(f.fit, get_mol_site_CoM(&f.fit).scale(-1));
      f.fit.permutation = permutations.at(p);
      f.perm_ID = p;
      f.rmsd = rmsd;
//try and select alignments appropriately ...
      if(best_rmsd<0 || rmsd<best_rmsd) {
        best_rmsd = rmsd;
//        best_rmsd_ID = p;
        best_rmsd_ID = vector_of_fits.size();
      }
      vector_of_fits.push_back(f);
      vector_of_centred_molecules.push_back(centred_aligned_mol);
    } else if(verbose) printf("\tTHIS PERMUTATION COULD NOT PRODUCE A VALID ROTATION MATRIX\n");
  }

  //now return all molecules which are within a tolerance of the best RMSD
  int num_fits = vector_of_fits.size();
if(verbose) printf("DEBUG: num valid rotation matrices = %d; best_rmsd_ID = %d\n", num_fits, best_rmsd_ID);
  vector<MOLECULE> vec, vector_of_unique_centred_molecules;
  vector_of_unique_centred_molecules.push_back(vector_of_centred_molecules.at(best_rmsd_ID));
  FIT f0 = vector_of_fits.at(best_rmsd_ID);
  vec.push_back(f0.fit);
if(verbose) {
  string rotmol_name = prefix+"_molecule_ID_"+convertToString(mol_ID)+"_basic_vertex_ID_"+convertToString(vertex_ID)+"_permutation_"+convertToString(f0.perm_ID)+".xyz"; //write molecule to xyz file
  FILE *rotmol = fopen(rotmol_name.c_str(),"w");
  if(rotmol==NULL) {
    printf("ERROR: could not open output rotated molecule file with name %s\n", rotmol_name.c_str());
    exit(EXIT_FAILURE);
  }
  MOLECULE rotated = translate(f0.fit, get_mol_site_CoM(&f0.fit).scale(-1));
  write_molecule(rotmol, &rotated, net, vertex_ID, -1, true); //oriented to basic vertex basic_ID with symmetry "-1" (not applicable here) - this will be noted in the file - true indicates 'write out sites'
  fclose(rotmol);
  printf("\tmolecule %d oriented to basic vertex %d written to %s\n", mol_ID, vertex_ID, rotmol_name.c_str());
}
  for(int i=0; i<num_fits; i++) {
    if(i!=best_rmsd_ID) { //don't check the one we pushed already
      if(vector_of_fits.at(i).rmsd<best_rmsd*TOLERANCE_PROPORTION) { //acceptable RMSD?
        if(molecule_alignment_chemistry_is_unique(&vector_of_centred_molecules.at(i), &vector_of_unique_centred_molecules)) { //unique molecule?
          vector_of_unique_centred_molecules.push_back(vector_of_centred_molecules.at(i));
          FIT f = vector_of_fits.at(i);
          vec.push_back(f.fit);
if(verbose) {
  string rotmol_name = prefix+"_molecule_ID_"+convertToString(mol_ID)+"_basic_vertex_ID_"+convertToString(vertex_ID)+"_permutation_"+convertToString(f.perm_ID)+".xyz"; //write molecule to xyz file
  FILE *rotmol = fopen(rotmol_name.c_str(),"w");
  if(rotmol==NULL) {
    printf("ERROR: could not open output rotated molecule file with name %s\n", rotmol_name.c_str());
    exit(EXIT_FAILURE);
  }
  MOLECULE rotated = translate(f.fit, get_mol_site_CoM(&f.fit).scale(-1));
  write_molecule(rotmol, &rotated, net, vertex_ID, -1, true); //oriented to basic vertex basic_ID with symmetry "-1" (not applicable here) - this will be noted in the file - true indicates 'write out sites'
  fclose(rotmol);
  printf("\tmolecule %d oriented to basic vertex %d written to %s\n", mol_ID, vertex_ID, rotmol_name.c_str());
}
        }
      }
    }
  }
if(verbose) printf("DEBUG: of %d permutations, %d unique alignments were generated\n", num_perm, (int)(vec.size()));
  return vec;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xfd0, %rsp            # imm = 0xFD0
movq %r9, -0xe58(%rbp)
movq %r8, -0xe50(%rbp)
movq %rsi, -0xe38(%rbp)
movq %rdi, -0xe48(%rbp)
movq %rdi, %rax
movq %rax, -0xe40(%rbp)
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movb $0x0, -0x31(%rbp)
movq -0x18(%rbp), %rdi
addq $0x3c0, %rdi            # imm = 0x3C0
movslq -0x1c(%rbp), %rsi
callq 0xae4a0
movq %rax, %rdi
addq $0x20, %rdi
callq 0xae590
movl %eax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
addq $0x3c0, %rdi            # imm = 0x3C0
movslq -0x1c(%rbp), %rsi
callq 0xae4a0
movq %rax, %rdi
addq $0x38, %rdi
callq 0xae590
movq -0xe38(%rbp), %rdi
movl %eax, -0x3c(%rbp)
movl -0x38(%rbp), %eax
addl -0x3c(%rbp), %eax
movl %eax, -0x40(%rbp)
addq $0x48, %rdi
callq 0x10090
movq -0xe38(%rbp), %rdi
movl %eax, -0x44(%rbp)
addq $0x60, %rdi
callq 0x10090
movl %eax, -0x48(%rbp)
movl -0x44(%rbp), %eax
addl -0x48(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x48(%rbp), %eax
jne 0xa1e3d
movl -0x38(%rbp), %eax
cmpl -0x44(%rbp), %eax
je 0xa1e62
movl -0x44(%rbp), %esi
movl -0x48(%rbp), %edx
movl -0x38(%rbp), %ecx
movl -0x3c(%rbp), %r8d
leaq 0x156f68(%rip), %rdi    # 0x1f8db9
movb $0x0, %al
callq 0x5070
movl $0x1, %edi
callq 0x67c0
leaq -0x68(%rbp), %rdi
callq 0xd0d0
leaq -0x80(%rbp), %rdi
callq 0xd0d0
movl $0x0, -0x84(%rbp)
movl -0x84(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0xa1ec5
leaq -0x68(%rbp), %rdi
leaq -0x84(%rbp), %rsi
callq 0xd1b0
jmp 0xa1e9b
jmp 0xa1e9d
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0xa1e7e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa3b21
movl $0x0, -0x98(%rbp)
movl -0x98(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0xa1f10
movl -0x98(%rbp), %eax
movl -0x38(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x9c(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x9c(%rbp), %rsi
callq 0xffc0
jmp 0xa1efd
jmp 0xa1eff
movl -0x98(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x98(%rbp)
jmp 0xa1ecf
leaq -0xb8(%rbp), %rdi
callq 0x10580
leaq -0xd0(%rbp), %rdi
callq 0x10580
leaq -0xe8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0xeec0
jmp 0xa1f3a
leaq -0xe8(%rbp), %rdi
xorl %esi, %esi
leaq -0xb8(%rbp), %rdx
callq 0x111020
jmp 0xa1f51
leaq -0xe8(%rbp), %rdi
callq 0xec80
leaq -0x100(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xeec0
jmp 0xa1f6f
leaq -0x100(%rbp), %rdi
xorl %esi, %esi
leaq -0xd0(%rbp), %rdx
callq 0x111020
jmp 0xa1f86
leaq -0x100(%rbp), %rdi
callq 0xec80
leaq -0x118(%rbp), %rdi
callq 0x10580
leaq -0xb8(%rbp), %rdi
callq 0x10860
movl %eax, -0x11c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x10860
movl %eax, -0x120(%rbp)
movl $0x0, -0x124(%rbp)
movl -0x124(%rbp), %eax
cmpl -0x11c(%rbp), %eax
jge 0xa2186
movl $0x0, -0x128(%rbp)
movl -0x128(%rbp), %eax
cmpl -0x120(%rbp), %eax
jge 0xa2170
movslq -0x124(%rbp), %rsi
leaq -0xb8(%rbp), %rdi
callq 0xaf5b0
movq %rax, -0xe60(%rbp)
jmp 0xa2016
movq -0xe60(%rbp), %rsi
leaq -0x140(%rbp), %rdi
callq 0xeec0
jmp 0xa202b
movl $0x0, -0x144(%rbp)
movl -0x144(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0xa213b
movslq -0x128(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
callq 0xaf5b0
movq %rax, -0xe68(%rbp)
jmp 0xa2060
movq -0xe68(%rbp), %rdi
movslq -0x144(%rbp), %rsi
callq 0x101d0
movq %rax, -0xe70(%rbp)
jmp 0xa207c
movq -0xe70(%rbp), %rsi
leaq -0x140(%rbp), %rdi
callq 0xd1b0
jmp 0xa2091
jmp 0xa2093
movl -0x144(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x144(%rbp)
jmp 0xa2035
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa3b09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0xec80
jmp 0xa3b09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x100(%rbp), %rdi
callq 0xec80
jmp 0xa3b09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa3afd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x140(%rbp), %rdi
callq 0xec80
jmp 0xa3afd
leaq -0x118(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x107f0
jmp 0xa2150
leaq -0x140(%rbp), %rdi
callq 0xec80
movl -0x128(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x128(%rbp)
jmp 0xa1fe8
jmp 0xa2172
movl -0x124(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x124(%rbp)
jmp 0xa1fcc
leaq -0x118(%rbp), %rdi
callq 0x10860
movl %eax, -0x148(%rbp)
testb $0x1, -0x31(%rbp)
je 0xa22c5
movl -0x148(%rbp), %esi
movl -0x40(%rbp), %edx
leaq 0x156c72(%rip), %rdi    # 0x1f8e24
xorl %eax, %eax
callq 0x5070
jmp 0xa21bb
movl $0x0, -0x14c(%rbp)
movl -0x14c(%rbp), %eax
cmpl -0x148(%rbp), %eax
jge 0xa22c3
leaq 0x1513ed(%rip), %rdi    # 0x1f35cb
xorl %eax, %eax
callq 0x5070
jmp 0xa21e7
movl $0x0, -0x150(%rbp)
movslq -0x150(%rbp), %rax
movq %rax, -0xe80(%rbp)
movslq -0x14c(%rbp), %rsi
leaq -0x118(%rbp), %rdi
callq 0xaf5b0
movq %rax, -0xe78(%rbp)
jmp 0xa221b
movq -0xe78(%rbp), %rdi
callq 0x10090
movq %rax, %rcx
movq -0xe80(%rbp), %rax
cmpq %rcx, %rax
jae 0xa229d
movslq -0x14c(%rbp), %rsi
leaq -0x118(%rbp), %rdi
callq 0xaf5b0
movq %rax, -0xe88(%rbp)
jmp 0xa2252
movq -0xe88(%rbp), %rdi
movslq -0x150(%rbp), %rsi
callq 0x101d0
movq %rax, -0xe90(%rbp)
jmp 0xa226e
movq -0xe90(%rbp), %rax
movl (%rax), %esi
leaq 0x1683d9(%rip), %rdi    # 0x20a657
xorl %eax, %eax
callq 0x5070
jmp 0xa2287
jmp 0xa2289
movl -0x150(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x150(%rbp)
jmp 0xa21f1
leaq 0x157381(%rip), %rdi    # 0x1f9625
xorl %eax, %eax
callq 0x5070
jmp 0xa22ad
jmp 0xa22af
movl -0x14c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14c(%rbp)
jmp 0xa21c5
jmp 0xa22c5
movsd 0x1504ab(%rip), %xmm0   # 0x1f2778
movsd %xmm0, -0x158(%rbp)
movl $0xffffffff, -0x15c(%rbp) # imm = 0xFFFFFFFF
leaq -0x178(%rbp), %rdi
callq 0xaf5f0
leaq -0x190(%rbp), %rdi
callq 0xaf610
movl $0x0, -0x194(%rbp)
movl -0x194(%rbp), %eax
cmpl -0x148(%rbp), %eax
jge 0xa2dd9
movslq -0x194(%rbp), %rsi
leaq -0x118(%rbp), %rdi
callq 0xaf5b0
movq %rax, -0xe98(%rbp)
jmp 0xa232f
movq -0xe98(%rbp), %rsi
leaq -0x1b0(%rbp), %rdi
callq 0xeec0
jmp 0xa2344
movl -0x40(%rbp), %eax
movq %rsp, %rcx
movq %rcx, -0x1b8(%rbp)
leaq (%rax,%rax,2), %rcx
leaq 0xf(,%rcx,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0xea8(%rbp)
movq %rcx, %rsp
movq %rax, -0x1c0(%rbp)
movl -0x40(%rbp), %eax
leaq (%rax,%rax,2), %rcx
leaq 0xf(,%rcx,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0xea0(%rbp)
movq %rcx, %rsp
movq %rax, -0x1c8(%rbp)
movq 0x1d13ff(%rip), %rax    # 0x2737a8
movq %rax, -0x1e0(%rbp)
movq 0x1d13f9(%rip), %rax    # 0x2737b0
movq %rax, -0x1d8(%rbp)
movq 0x1d13f3(%rip), %rax    # 0x2737b8
movq %rax, -0x1d0(%rbp)
movq 0x1d13d5(%rip), %rax    # 0x2737a8
movq %rax, -0x1f8(%rbp)
movq 0x1d13cf(%rip), %rax    # 0x2737b0
movq %rax, -0x1f0(%rbp)
movq 0x1d13c9(%rip), %rax    # 0x2737b8
movq %rax, -0x1e8(%rbp)
movl $0x0, -0x1fc(%rbp)
movl -0x1fc(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0xa2842
leaq -0x218(%rbp), %rdi
xorps %xmm2, %xmm2
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0xea8e0
jmp 0xa2426
movl -0x1fc(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0xa24f2
movq -0x18(%rbp), %rdi
movq %rdi, -0xeb8(%rbp)
addq $0x3c0, %rdi            # imm = 0x3C0
movslq -0x1c(%rbp), %rsi
callq 0xae4a0
movq %rax, -0xeb0(%rbp)
jmp 0xa2459
movq -0xeb0(%rbp), %rdi
addq $0x20, %rdi
movslq -0x1fc(%rbp), %rsi
callq 0xae5c0
movq %rax, -0xec0(%rbp)
jmp 0xa2479
movq -0xec0(%rbp), %rdx
movq -0xeb8(%rbp), %rsi
leaq -0x230(%rbp), %rdi
callq 0x97310
jmp 0xa2495
movq -0x230(%rbp), %rax
movq %rax, -0x218(%rbp)
movq -0x228(%rbp), %rax
movq %rax, -0x210(%rbp)
movq -0x220(%rbp), %rax
movq %rax, -0x208(%rbp)
jmp 0xa2583
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa3ae5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa2dc8
movq -0x18(%rbp), %rdi
movq %rdi, -0xed0(%rbp)
addq $0x3c0, %rdi            # imm = 0x3C0
movslq -0x1c(%rbp), %rsi
callq 0xae4a0
movq %rax, -0xec8(%rbp)
jmp 0xa2516
movq -0xec8(%rbp), %rdi
addq $0x38, %rdi
movl -0x1fc(%rbp), %eax
movl -0x38(%rbp), %ecx
subl %ecx, %eax
movslq %eax, %rsi
callq 0xae5c0
movq %rax, -0xed8(%rbp)
jmp 0xa253d
movq -0xed8(%rbp), %rdx
movq -0xed0(%rbp), %rsi
leaq -0x248(%rbp), %rdi
callq 0x97310
jmp 0xa2559
movq -0x248(%rbp), %rax
movq %rax, -0x218(%rbp)
movq -0x240(%rbp), %rax
movq %rax, -0x210(%rbp)
movq -0x238(%rbp), %rax
movq %rax, -0x208(%rbp)
movq -0xea8(%rbp), %rax
movsd -0x218(%rbp), %xmm0
movslq -0x1fc(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x210(%rbp), %xmm0
movslq -0x1fc(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movsd %xmm0, 0x8(%rax,%rcx,8)
movsd -0x208(%rbp), %xmm0
movslq -0x1fc(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movsd %xmm0, 0x10(%rax,%rcx,8)
leaq -0x260(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
leaq -0x218(%rbp), %rdx
callq 0xeae50
jmp 0xa25f0
movq -0x250(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movups -0x260(%rbp), %xmm0
movaps %xmm0, -0x1e0(%rbp)
leaq -0x278(%rbp), %rdi
xorps %xmm2, %xmm2
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0xea8e0
jmp 0xa2623
movslq -0x1fc(%rbp), %rsi
leaq -0x1b0(%rbp), %rdi
callq 0x101d0
movq %rax, -0xee0(%rbp)
jmp 0xa263f
movq -0xee0(%rbp), %rax
movl (%rax), %eax
cmpl -0x38(%rbp), %eax
jge 0xa26f3
movq -0xe38(%rbp), %rax
movq %rax, %rcx
movq %rcx, -0xef8(%rbp)
addq $0x48, %rax
movq %rax, -0xef0(%rbp)
movslq -0x1fc(%rbp), %rsi
leaq -0x1b0(%rbp), %rdi
callq 0x101d0
movq %rax, -0xee8(%rbp)
jmp 0xa2689
movq -0xef0(%rbp), %rdi
movq -0xee8(%rbp), %rax
movslq (%rax), %rsi
callq 0x101d0
movq %rax, -0xf00(%rbp)
jmp 0xa26a8
movq -0xef8(%rbp), %rdi
movq -0xf00(%rbp), %rax
movslq (%rax), %rsi
callq 0xae5c0
movq %rax, -0xf08(%rbp)
jmp 0xa26c7
movq -0xf08(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x278(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x270(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x268(%rbp)
jmp 0xa2797
movq -0xe38(%rbp), %rax
movq %rax, %rcx
movq %rcx, -0xf20(%rbp)
addq $0x60, %rax
movq %rax, -0xf18(%rbp)
movslq -0x1fc(%rbp), %rsi
leaq -0x1b0(%rbp), %rdi
callq 0x101d0
movq %rax, -0xf10(%rbp)
jmp 0xa272b
movq -0xf18(%rbp), %rdi
movq -0xf10(%rbp), %rax
movl (%rax), %eax
movl -0x38(%rbp), %ecx
subl %ecx, %eax
movslq %eax, %rsi
callq 0x101d0
movq %rax, -0xf28(%rbp)
jmp 0xa2751
movq -0xf20(%rbp), %rdi
movq -0xf28(%rbp), %rax
movslq (%rax), %rsi
callq 0xae5c0
movq %rax, -0xf30(%rbp)
jmp 0xa2770
movq -0xf30(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x278(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x270(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x268(%rbp)
movq -0xea0(%rbp), %rax
movsd -0x278(%rbp), %xmm0
movslq -0x1fc(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x270(%rbp), %xmm0
movslq -0x1fc(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movsd %xmm0, 0x8(%rax,%rcx,8)
movsd -0x268(%rbp), %xmm0
movslq -0x1fc(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movsd %xmm0, 0x10(%rax,%rcx,8)
leaq -0x290(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
leaq -0x278(%rbp), %rdx
callq 0xeae50
jmp 0xa2804
movq -0x290(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movq -0x288(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movq -0x280(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movl -0x1fc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1fc(%rbp)
jmp 0xa2400
testb $0x1, -0x31(%rbp)
je 0xa2958
movl -0x194(%rbp), %esi
leaq 0x1565f4(%rip), %rdi    # 0x1f8e4d
xorl %eax, %eax
callq 0x5070
jmp 0xa2862
movl $0x0, -0x294(%rbp)
movl -0x294(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0xa28bf
movslq -0x294(%rbp), %rsi
leaq -0x1b0(%rbp), %rdi
callq 0x101d0
movq %rax, -0xf38(%rbp)
jmp 0xa2893
movq -0xf38(%rbp), %rax
movl (%rax), %esi
leaq 0x167db4(%rip), %rdi    # 0x20a657
xorl %eax, %eax
callq 0x5070
jmp 0xa28ac
jmp 0xa28ae
movl -0x294(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x294(%rbp)
jmp 0xa286c
leaq 0x156d5f(%rip), %rdi    # 0x1f9625
xorl %eax, %eax
callq 0x5070
jmp 0xa28cf
leaq 0x156589(%rip), %rdi    # 0x1f8e5f
xorl %eax, %eax
callq 0x5070
jmp 0xa28df
movl $0x0, -0x298(%rbp)
movl -0x298(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0xa2956
movq -0xea8(%rbp), %rax
movq -0xea0(%rbp), %rdx
movslq -0x298(%rbp), %rcx
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
movsd (%rdx,%rcx), %xmm0
movsd 0x8(%rdx,%rcx), %xmm1
movsd 0x10(%rdx,%rcx), %xmm2
movsd (%rax,%rcx), %xmm3
movsd 0x8(%rax,%rcx), %xmm4
movsd 0x10(%rax,%rcx), %xmm5
leaq 0x156545(%rip), %rdi    # 0x1f8e7f
movb $0x6, %al
callq 0x5070
jmp 0xa2943
jmp 0xa2945
movl -0x298(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x298(%rbp)
jmp 0xa28e9
jmp 0xa2958
movl $0x0, -0x324(%rbp)
cmpl $0x3, -0x324(%rbp)
jge 0xa29c6
movl $0x0, -0x328(%rbp)
cmpl $0x3, -0x328(%rbp)
jge 0xa29b3
movslq -0x324(%rbp), %rcx
leaq -0x320(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x328(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x328(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x328(%rbp)
jmp 0xa2975
jmp 0xa29b5
movl -0x324(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x324(%rbp)
jmp 0xa2962
movq -0xea0(%rbp), %rsi
movq -0xea8(%rbp), %rdi
movq $0x0, -0x330(%rbp)
movl -0x40(%rbp), %edx
subq $0x10, %rsp
movq %rsp, %rax
leaq -0x330(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x2b0(%rbp), %rcx
leaq -0x2d0(%rbp), %r8
leaq -0x320(%rbp), %r9
callq 0x116930
addq $0x10, %rsp
jmp 0xa2a13
movb $0x1, -0x331(%rbp)
movsd -0x330(%rbp), %xmm0
callq 0xaf630
movb %al, -0xf39(%rbp)
jmp 0xa2a2f
movb -0xf39(%rbp), %al
testb $0x1, %al
jne 0xa2a3b
jmp 0xa2a42
movb $0x0, -0x331(%rbp)
movl $0x0, -0x338(%rbp)
xorl %eax, %eax
cmpl $0x3, -0x338(%rbp)
movb %al, -0xf3a(%rbp)
jge 0xa2a69
movb -0x331(%rbp), %al
movb %al, -0xf3a(%rbp)
movb -0xf3a(%rbp), %al
testb $0x1, %al
jne 0xa2a78
jmp 0xa2b13
movl $0x0, -0x33c(%rbp)
xorl %eax, %eax
cmpl $0x3, -0x33c(%rbp)
movb %al, -0xf3b(%rbp)
jge 0xa2a9f
movb -0x331(%rbp), %al
movb %al, -0xf3b(%rbp)
movb -0xf3b(%rbp), %al
testb $0x1, %al
jne 0xa2aab
jmp 0xa2afd
movslq -0x338(%rbp), %rax
leaq (%rax,%rax,2), %rax
leaq -0x320(%rbp,%rax,8), %rax
movslq -0x33c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0xaf630
movb %al, -0xf3c(%rbp)
jmp 0xa2ad7
movb -0xf3c(%rbp), %al
testb $0x1, %al
jne 0xa2ae3
jmp 0xa2aea
movb $0x0, -0x331(%rbp)
jmp 0xa2aec
movl -0x33c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x33c(%rbp)
jmp 0xa2a82
jmp 0xa2aff
movl -0x338(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x338(%rbp)
jmp 0xa2a4c
testb $0x1, -0x331(%rbp)
je 0xa2d84
leaq -0x3f8(%rbp), %rdi
callq 0xaf650
jmp 0xa2b2e
movq -0xe38(%rbp), %rsi
leaq -0x548(%rbp), %rdi
callq 0xaf160
jmp 0xa2b43
leaq -0x4a0(%rbp), %rdi
leaq -0x548(%rbp), %rsi
leaq -0x320(%rbp), %rdx
callq 0x110a50
jmp 0xa2b5f
leaq -0x3f8(%rbp), %rdi
movq %rdi, -0xf48(%rbp)
leaq -0x4a0(%rbp), %rsi
movq %rsi, -0xf50(%rbp)
callq 0xaf2c0
movq -0xf50(%rbp), %rdi
callq 0xaf390
leaq -0x548(%rbp), %rdi
callq 0xaf390
movq -0xf48(%rbp), %rsi
leaq -0x698(%rbp), %rdi
callq 0xaf160
jmp 0xa2bad
leaq -0x6c8(%rbp), %rdi
leaq -0x3f8(%rbp), %rsi
callq 0x110c60
jmp 0xa2bc2
leaq -0x6b0(%rbp), %rdi
leaq -0x6c8(%rbp), %rsi
movsd 0x14fba0(%rip), %xmm0   # 0x1f2778
callq 0xea9f0
jmp 0xa2bdf
subq $0x20, %rsp
movq -0x6a0(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x10(%rax)
movups -0x6b0(%rbp), %xmm0
movups %xmm0, (%rax)
leaq -0x5f0(%rbp), %rdi
leaq -0x698(%rbp), %rsi
callq 0x110ee0
addq $0x20, %rsp
jmp 0xa2c14
leaq -0x698(%rbp), %rdi
callq 0xaf390
movslq -0x194(%rbp), %rsi
leaq -0x118(%rbp), %rdi
callq 0xaf5b0
movq %rax, -0xf58(%rbp)
jmp 0xa2c3c
movq -0xf58(%rbp), %rsi
leaq -0x380(%rbp), %rdi
callq 0x17a10
jmp 0xa2c51
movl -0x194(%rbp), %eax
movl %eax, -0x348(%rbp)
movsd -0x330(%rbp), %xmm0
movsd %xmm0, -0x350(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x158(%rbp), %xmm0
ja 0xa2c94
movsd -0x330(%rbp), %xmm1
movsd -0x158(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xa2d32
movsd -0x330(%rbp), %xmm0
movsd %xmm0, -0x158(%rbp)
leaq -0x178(%rbp), %rdi
callq 0xaf670
movl %eax, -0x15c(%rbp)
jmp 0xa2d32
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa2d76
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x548(%rbp), %rdi
callq 0xaf390
jmp 0xa2d76
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x698(%rbp), %rdi
callq 0xaf390
jmp 0xa2d76
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x5f0(%rbp), %rdi
callq 0xaf390
jmp 0xa2d76
leaq -0x178(%rbp), %rdi
leaq -0x3f8(%rbp), %rsi
callq 0xaf6a0
jmp 0xa2d47
leaq -0x190(%rbp), %rdi
leaq -0x5f0(%rbp), %rsi
callq 0xaf710
jmp 0xa2d5c
leaq -0x5f0(%rbp), %rdi
callq 0xaf390
leaq -0x3f8(%rbp), %rdi
callq 0xaf780
jmp 0xa2d9e
leaq -0x3f8(%rbp), %rdi
callq 0xaf780
jmp 0xa2dc8
testb $0x1, -0x31(%rbp)
je 0xa2d9c
leaq 0x156112(%rip), %rdi    # 0x1f8ea3
xorl %eax, %eax
callq 0x5070
jmp 0xa2d9a
jmp 0xa2d9c
jmp 0xa2d9e
movq -0x1b8(%rbp), %rax
movq %rax, %rsp
leaq -0x1b0(%rbp), %rdi
callq 0xec80
movl -0x194(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x194(%rbp)
jmp 0xa2301
leaq -0x1b0(%rbp), %rdi
callq 0xec80
jmp 0xa3ae5
leaq -0x178(%rbp), %rdi
callq 0xaf670
movl %eax, -0x6cc(%rbp)
testb $0x1, -0x31(%rbp)
je 0xa2e0f
movl -0x6cc(%rbp), %esi
movl -0x15c(%rbp), %edx
leaq 0x1560dc(%rip), %rdi    # 0x1f8ee0
xorl %eax, %eax
callq 0x5070
jmp 0xa2e0d
jmp 0xa2e0f
movq -0xe48(%rbp), %rdi
movb $0x0, -0x6cd(%rbp)
callq 0xaf610
leaq -0x6e8(%rbp), %rdi
callq 0xaf610
movslq -0x15c(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0xaf120
movq %rax, -0xf60(%rbp)
jmp 0xa2e4a
movq -0xf60(%rbp), %rsi
leaq -0x6e8(%rbp), %rdi
callq 0xaf710
jmp 0xa2e5f
movslq -0x15c(%rbp), %rsi
leaq -0x178(%rbp), %rdi
callq 0xaf7a0
movq %rax, -0xf68(%rbp)
jmp 0xa2e7b
movq -0xf68(%rbp), %rsi
leaq -0x7a0(%rbp), %rdi
callq 0xaf7e0
jmp 0xa2e90
movq -0xe48(%rbp), %rdi
leaq -0x7a0(%rbp), %rsi
callq 0xaf710
jmp 0xa2ea5
testb $0x1, -0x31(%rbp)
je 0xa33a8
movq -0xe58(%rbp), %rsi
leaq 0x15605f(%rip), %rdx    # 0x1f8f1c
leaq -0x880(%rbp), %rdi
callq 0xaf950
jmp 0xa2ecb
movl 0x10(%rbp), %esi
leaq -0x8a0(%rbp), %rdi
callq 0x1151a0
jmp 0xa2edc
leaq -0x860(%rbp), %rdi
leaq -0x880(%rbp), %rsi
leaq -0x8a0(%rbp), %rdx
callq 0xaf880
jmp 0xa2ef8
leaq 0x15602b(%rip), %rdx    # 0x1f8f2a
leaq -0x840(%rbp), %rdi
leaq -0x860(%rbp), %rsi
callq 0xaf830
jmp 0xa2f14
movl -0x1c(%rbp), %esi
leaq -0x8c0(%rbp), %rdi
callq 0x1151a0
jmp 0xa2f25
leaq -0x820(%rbp), %rdi
leaq -0x840(%rbp), %rsi
leaq -0x8c0(%rbp), %rdx
callq 0xaf880
jmp 0xa2f41
leaq 0x155ff4(%rip), %rdx    # 0x1f8f3c
leaq -0x800(%rbp), %rdi
leaq -0x820(%rbp), %rsi
callq 0xaf830
jmp 0xa2f5d
movl -0x6f0(%rbp), %esi
leaq -0x8e0(%rbp), %rdi
callq 0x1151a0
jmp 0xa2f71
leaq -0x7e0(%rbp), %rdi
leaq -0x800(%rbp), %rsi
leaq -0x8e0(%rbp), %rdx
callq 0xaf880
jmp 0xa2f8d
leaq 0x1543f8(%rip), %rdx    # 0x1f738c
leaq -0x7c0(%rbp), %rdi
leaq -0x7e0(%rbp), %rsi
callq 0xaf830
jmp 0xa2fa9
leaq -0x7e0(%rbp), %rdi
callq 0x5300
leaq -0x8e0(%rbp), %rdi
callq 0x5300
leaq -0x800(%rbp), %rdi
callq 0x5300
leaq -0x820(%rbp), %rdi
callq 0x5300
leaq -0x8c0(%rbp), %rdi
callq 0x5300
leaq -0x840(%rbp), %rdi
callq 0x5300
leaq -0x860(%rbp), %rdi
callq 0x5300
leaq -0x8a0(%rbp), %rdi
callq 0x5300
leaq -0x880(%rbp), %rdi
callq 0x5300
leaq -0x7c0(%rbp), %rdi
callq 0x5200
movq %rax, %rdi
leaq 0x153be9(%rip), %rsi    # 0x1f6c14
callq 0x5650
movq %rax, -0xf70(%rbp)
jmp 0xa3039
movq -0xf70(%rbp), %rax
movq %rax, -0x8e8(%rbp)
cmpq $0x0, -0x8e8(%rbp)
jne 0xa31f2
leaq -0x7c0(%rbp), %rdi
callq 0x5200
movq %rax, %rsi
leaq 0x155edf(%rip), %rdi    # 0x1f8f4a
xorl %eax, %eax
callq 0x5070
jmp 0xa3074
movl $0x1, %edi
callq 0x67c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa3a65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa3a59
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa31ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa31be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa31b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa31a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa319a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa318e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa3182
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa3176
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x7e0(%rbp), %rdi
callq 0x5300
leaq -0x8e0(%rbp), %rdi
callq 0x5300
leaq -0x800(%rbp), %rdi
callq 0x5300
leaq -0x820(%rbp), %rdi
callq 0x5300
leaq -0x8c0(%rbp), %rdi
callq 0x5300
leaq -0x840(%rbp), %rdi
callq 0x5300
leaq -0x860(%rbp), %rdi
callq 0x5300
leaq -0x8a0(%rbp), %rdi
callq 0x5300
leaq -0x880(%rbp), %rdi
callq 0x5300
jmp 0xa3a59
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa3397
leaq -0xa38(%rbp), %rdi
leaq -0x7a0(%rbp), %rsi
callq 0xaf160
jmp 0xa3207
leaq -0xa68(%rbp), %rdi
leaq -0x7a0(%rbp), %rsi
callq 0x110c60
jmp 0xa321c
leaq -0xa50(%rbp), %rdi
leaq -0xa68(%rbp), %rsi
movsd 0x14f546(%rip), %xmm0   # 0x1f2778
callq 0xea9f0
jmp 0xa3239
subq $0x20, %rsp
movq -0xa40(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x10(%rax)
movups -0xa50(%rbp), %xmm0
movups %xmm0, (%rax)
leaq -0x990(%rbp), %rdi
leaq -0xa38(%rbp), %rsi
callq 0x110ee0
addq $0x20, %rsp
jmp 0xa326e
leaq -0xa38(%rbp), %rdi
callq 0xaf390
movq -0xe50(%rbp), %rsi
movq -0x8e8(%rbp), %rax
movq %rax, -0xf78(%rbp)
leaq -0xa88(%rbp), %rdi
callq 0x5220
jmp 0xa329d
movq -0xf78(%rbp), %rdi
movl -0x1c(%rbp), %ecx
leaq -0x990(%rbp), %rsi
leaq -0xa88(%rbp), %rdx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl $0x1, %r9d
callq 0x114f70
jmp 0xa32c8
leaq -0xa88(%rbp), %rdi
callq 0x5300
movq -0x8e8(%rbp), %rdi
callq 0x5550
jmp 0xa32e2
movl 0x10(%rbp), %eax
movl %eax, -0xf80(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0xf7c(%rbp)
leaq -0x7c0(%rbp), %rdi
callq 0x5200
movl -0xf80(%rbp), %esi
movl -0xf7c(%rbp), %edx
movq %rax, %rcx
leaq 0x155c75(%rip), %rdi    # 0x1f8f8b
xorl %eax, %eax
callq 0x5070
jmp 0xa331f
leaq -0x990(%rbp), %rdi
callq 0xaf390
leaq -0x7c0(%rbp), %rdi
callq 0x5300
jmp 0xa33a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0xa38(%rbp), %rdi
callq 0xaf390
jmp 0xa3397
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa338b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0xa88(%rbp), %rdi
callq 0x5300
leaq -0x990(%rbp), %rdi
callq 0xaf390
leaq -0x7c0(%rbp), %rdi
callq 0x5300
jmp 0xa3a59
movl $0x0, -0xa8c(%rbp)
movl -0xa8c(%rbp), %eax
cmpl -0x6cc(%rbp), %eax
jge 0xa39f7
movl -0xa8c(%rbp), %eax
cmpl -0x15c(%rbp), %eax
je 0xa39e1
movslq -0xa8c(%rbp), %rsi
leaq -0x178(%rbp), %rdi
callq 0xaf7a0
movq %rax, -0xf88(%rbp)
jmp 0xa33f2
movq -0xf88(%rbp), %rax
movsd 0xa8(%rax), %xmm1
movsd 0x15448f(%rip), %xmm0   # 0x1f7898
mulsd -0x158(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xa39df
movslq -0xa8c(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0xaf120
movq %rax, -0xf90(%rbp)
jmp 0xa3437
movq -0xf90(%rbp), %rdi
leaq -0x6e8(%rbp), %rsi
callq 0x114280
movb %al, -0xf91(%rbp)
jmp 0xa3452
movb -0xf91(%rbp), %al
testb $0x1, %al
jne 0xa3461
jmp 0xa39dd
movslq -0xa8c(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0xaf120
movq %rax, -0xfa0(%rbp)
jmp 0xa347d
movq -0xfa0(%rbp), %rsi
leaq -0x6e8(%rbp), %rdi
callq 0xaf710
jmp 0xa3492
movslq -0xa8c(%rbp), %rsi
leaq -0x178(%rbp), %rdi
callq 0xaf7a0
movq %rax, -0xfa8(%rbp)
jmp 0xa34ae
movq -0xfa8(%rbp), %rsi
leaq -0xb48(%rbp), %rdi
callq 0xaf7e0
jmp 0xa34c3
movq -0xe48(%rbp), %rdi
leaq -0xb48(%rbp), %rsi
callq 0xaf710
jmp 0xa34d8
testb $0x1, -0x31(%rbp)
je 0xa39c1
movq -0xe58(%rbp), %rsi
leaq 0x155a2c(%rip), %rdx    # 0x1f8f1c
leaq -0xc28(%rbp), %rdi
callq 0xaf950
jmp 0xa34fe
movl 0x10(%rbp), %esi
leaq -0xc48(%rbp), %rdi
callq 0x1151a0
jmp 0xa350f
leaq -0xc08(%rbp), %rdi
leaq -0xc28(%rbp), %rsi
leaq -0xc48(%rbp), %rdx
callq 0xaf880
jmp 0xa352b
leaq 0x1559f8(%rip), %rdx    # 0x1f8f2a
leaq -0xbe8(%rbp), %rdi
leaq -0xc08(%rbp), %rsi
callq 0xaf830
jmp 0xa3547
movl -0x1c(%rbp), %esi
leaq -0xc68(%rbp), %rdi
callq 0x1151a0
jmp 0xa3558
leaq -0xbc8(%rbp), %rdi
leaq -0xbe8(%rbp), %rsi
leaq -0xc68(%rbp), %rdx
callq 0xaf880
jmp 0xa3574
leaq 0x1559c1(%rip), %rdx    # 0x1f8f3c
leaq -0xba8(%rbp), %rdi
leaq -0xbc8(%rbp), %rsi
callq 0xaf830
jmp 0xa3590
movl -0xa98(%rbp), %esi
leaq -0xc88(%rbp), %rdi
callq 0x1151a0
jmp 0xa35a4
leaq -0xb88(%rbp), %rdi
leaq -0xba8(%rbp), %rsi
leaq -0xc88(%rbp), %rdx
callq 0xaf880
jmp 0xa35c0
leaq 0x153dc5(%rip), %rdx    # 0x1f738c
leaq -0xb68(%rbp), %rdi
leaq -0xb88(%rbp), %rsi
callq 0xaf830
jmp 0xa35dc
leaq -0xb88(%rbp), %rdi
callq 0x5300
leaq -0xc88(%rbp), %rdi
callq 0x5300
leaq -0xba8(%rbp), %rdi
callq 0x5300
leaq -0xbc8(%rbp), %rdi
callq 0x5300
leaq -0xc68(%rbp), %rdi
callq 0x5300
leaq -0xbe8(%rbp), %rdi
callq 0x5300
leaq -0xc08(%rbp), %rdi
callq 0x5300
leaq -0xc48(%rbp), %rdi
callq 0x5300
leaq -0xc28(%rbp), %rdi
callq 0x5300
leaq -0xb68(%rbp), %rdi
callq 0x5200
movq %rax, %rdi
leaq 0x1535b6(%rip), %rsi    # 0x1f6c14
callq 0x5650
movq %rax, -0xfb0(%rbp)
jmp 0xa366c
movq -0xfb0(%rbp), %rax
movq %rax, -0xc90(%rbp)
cmpq $0x0, -0xc90(%rbp)
jne 0xa380e
leaq -0xb68(%rbp), %rdi
callq 0x5200
movq %rax, %rsi
leaq 0x1558ac(%rip), %rdi    # 0x1f8f4a
xorl %eax, %eax
callq 0x5070
jmp 0xa36a7
movl $0x1, %edi
callq 0x67c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa39cf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa37e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa37da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa37ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa37c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa37b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa37aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa379e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa3792
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0xb88(%rbp), %rdi
callq 0x5300
leaq -0xc88(%rbp), %rdi
callq 0x5300
leaq -0xba8(%rbp), %rdi
callq 0x5300
leaq -0xbc8(%rbp), %rdi
callq 0x5300
leaq -0xc68(%rbp), %rdi
callq 0x5300
leaq -0xbe8(%rbp), %rdi
callq 0x5300
leaq -0xc08(%rbp), %rdi
callq 0x5300
leaq -0xc48(%rbp), %rdi
callq 0x5300
leaq -0xc28(%rbp), %rdi
callq 0x5300
jmp 0xa39cf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa39b3
leaq -0xde0(%rbp), %rdi
leaq -0xb48(%rbp), %rsi
callq 0xaf160
jmp 0xa3823
leaq -0xe10(%rbp), %rdi
leaq -0xb48(%rbp), %rsi
callq 0x110c60
jmp 0xa3838
leaq -0xdf8(%rbp), %rdi
leaq -0xe10(%rbp), %rsi
movsd 0x14ef2a(%rip), %xmm0   # 0x1f2778
callq 0xea9f0
jmp 0xa3855
subq $0x20, %rsp
movq -0xde8(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x10(%rax)
movups -0xdf8(%rbp), %xmm0
movups %xmm0, (%rax)
leaq -0xd38(%rbp), %rdi
leaq -0xde0(%rbp), %rsi
callq 0x110ee0
addq $0x20, %rsp
jmp 0xa388a
leaq -0xde0(%rbp), %rdi
callq 0xaf390
movq -0xe50(%rbp), %rsi
movq -0xc90(%rbp), %rax
movq %rax, -0xfb8(%rbp)
leaq -0xe30(%rbp), %rdi
callq 0x5220
jmp 0xa38b9
movq -0xfb8(%rbp), %rdi
movl -0x1c(%rbp), %ecx
leaq -0xd38(%rbp), %rsi
leaq -0xe30(%rbp), %rdx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl $0x1, %r9d
callq 0x114f70
jmp 0xa38e4
leaq -0xe30(%rbp), %rdi
callq 0x5300
movq -0xc90(%rbp), %rdi
callq 0x5550
jmp 0xa38fe
movl 0x10(%rbp), %eax
movl %eax, -0xfc0(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0xfbc(%rbp)
leaq -0xb68(%rbp), %rdi
callq 0x5200
movl -0xfc0(%rbp), %esi
movl -0xfbc(%rbp), %edx
movq %rax, %rcx
leaq 0x155659(%rip), %rdi    # 0x1f8f8b
xorl %eax, %eax
callq 0x5070
jmp 0xa393b
leaq -0xd38(%rbp), %rdi
callq 0xaf390
leaq -0xb68(%rbp), %rdi
callq 0x5300
jmp 0xa39c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0xde0(%rbp), %rdi
callq 0xaf390
jmp 0xa39b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xa39a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0xe30(%rbp), %rdi
callq 0x5300
leaq -0xd38(%rbp), %rdi
callq 0xaf390
leaq -0xb68(%rbp), %rdi
callq 0x5300
jmp 0xa39cf
leaq -0xb48(%rbp), %rdi
callq 0xaf780
jmp 0xa39dd
leaq -0xb48(%rbp), %rdi
callq 0xaf780
jmp 0xa3a59
jmp 0xa39df
jmp 0xa39e1
jmp 0xa39e3
movl -0xa8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa8c(%rbp)
jmp 0xa33b2
testb $0x1, -0x31(%rbp)
je 0xa3a2f
movq -0xe48(%rbp), %rdi
movl -0x148(%rbp), %eax
movl %eax, -0xfc4(%rbp)
callq 0xaf3f0
movl -0xfc4(%rbp), %esi
movl %eax, %edx
leaq 0x15559f(%rip), %rdi    # 0x1f8fc3
xorl %eax, %eax
callq 0x5070
jmp 0xa3a2d
jmp 0xa3a2f
movb $0x1, -0x6cd(%rbp)
leaq -0x7a0(%rbp), %rdi
callq 0xaf780
leaq -0x6e8(%rbp), %rdi
callq 0xaf9d0
testb $0x1, -0x6cd(%rbp)
jne 0xa3a8b
jmp 0xa3a7f
leaq -0x7a0(%rbp), %rdi
callq 0xaf780
leaq -0x6e8(%rbp), %rdi
callq 0xaf9d0
movq -0xe48(%rbp), %rdi
callq 0xaf9d0
jmp 0xa3ae5
movq -0xe48(%rbp), %rdi
callq 0xaf9d0
leaq -0x190(%rbp), %rdi
callq 0xaf9d0
leaq -0x178(%rbp), %rdi
callq 0xafa30
leaq -0x118(%rbp), %rdi
callq 0x108b0
leaq -0xd0(%rbp), %rdi
callq 0x108b0
leaq -0xb8(%rbp), %rdi
callq 0x108b0
leaq -0x80(%rbp), %rdi
callq 0xec80
leaq -0x68(%rbp), %rdi
callq 0xec80
movq -0xe40(%rbp), %rax
movq %rbp, %rsp
popq %rbp
retq
leaq -0x190(%rbp), %rdi
callq 0xaf9d0
leaq -0x178(%rbp), %rdi
callq 0xafa30
leaq -0x118(%rbp), %rdi
callq 0x108b0
leaq -0xd0(%rbp), %rdi
callq 0x108b0
leaq -0xb8(%rbp), %rdi
callq 0x108b0
leaq -0x80(%rbp), %rdi
callq 0xec80
leaq -0x68(%rbp), %rdi
callq 0xec80
movq -0x90(%rbp), %rdi
callq 0x58f0
nop