// File: /workspace/github_c_makefile_star2_O0/ugobas[P]tnm/simulation.c
// Function: Torsional_confchange
void Torsional_confchange(double *diff_phi, char *diff_type,
			  struct bond *bonds_ini,
			  struct Jacobian *J, struct Reference Ref1,
			  struct ali_atoms ali_a,
			  double Tors_fluct,
			  atom *atoms1, int natoms1, char *nameout,
			  struct axe *axes, int naxes,
			  struct residue *seq, int nres,
			  struct chain *chains, int Nchain, 
			  atom *atoms2, int natoms2,
			  struct Para_simul Para_simul,
			  struct Normal_Mode *NM,
			  char *mode_name, int NMODES, float rmsd_thr)
{
  int i, a;
  int IT_MAX=Para_simul.NSTEPS; // 100 
  float STEP_MAX=Para_simul.STEP_MAX, STEP_MIN=Para_simul.STEP_MIN; //0.3 0.001
  float A_MAX=Para_simul.ANGLE, PDB_STEP=0.33;
  printf("Interpolating conformation change with %d %s modes\n",
	 NMODES, mode_name);
  
  // Initial bonds
  Set_bonds_measure(bonds_ini, natoms1, atoms1);
  struct bond bonds[natoms1], bonds_tmp[natoms1];
  Copy_bonds(bonds, bonds_ini, natoms1);
  printf("Internal coordinates of initial structure\n");
  double phi_ini[naxes], phi_opt[naxes]; 
  Internal_coordinates(phi_ini, naxes, bonds_ini, natoms1);
  double diff_phi0[naxes]; for(i=0; i<naxes; i++)diff_phi0[i]=0;

  // Set references 
  /*char SEL[4]="EB"; // "EB" "ALL"
  struct Reference Ref1, Ref2;
  int N_ref=Set_reference(&Ref1, 0, SEL, atoms1, 0, natoms1);
  printf("Change reference atoms to %s n=%d\n",SEL, Ref1.N_ref);
  int N_Cart=3*N_ref; Ref1.N_Cart=N_Cart;
  int first_kin[naxes], last_kin[naxes];
  Change_kin(first_kin, last_kin, axes, naxes, natoms1, Ref1);
  struct Jacobian J; Allocate_Jacobian(&J, naxes, Ref1.N_Cart);
  */
  //int N_ref=Ref1.N_ref;
  int N_ali=ali_a.N_ref, N_Cart=3*N_ali;
  double Mass_tot=0; for(i=0; i<Ref1.N_ref; i++)Mass_tot+=Ref1.mass_atom[i];

  float coord_ref_1[N_Cart], coord_ref_2[N_Cart];
  Write_ref_coord_atom(coord_ref_1, N_ali, atoms1, ali_a.ali1);
  Write_ref_coord_atom(coord_ref_2, N_ali, atoms2, ali_a.ali2);
  float coord1[N_Cart], coord2[N_Cart], coord_pdb[N_Cart]; //coord_kin[N_Cart]; 
  for(i=0; i<N_Cart; i++){
    coord1[i]=coord_ref_1[i]; coord2[i]=coord1[i];
    coord_pdb[i]=coord1[i]; //coord_kin[i]=coord1[i];
  }


  float *coord_new=coord1, *coord_old=coord2, *mass_ref=Ref1.mass_atom;
  float coord_all[3*natoms1]; Put_coord(coord_all, bonds_ini, natoms1);
  float Ene=Energy_clashes(coord_all, natoms1);

  // Print rmsd
  char namermsd[200];
  sprintf(namermsd, "%s_%s_rmsd.dat", nameout, diff_type);
  FILE *file_rmsd=fopen(namermsd, "w");
  printf("Opening %s\n", namermsd);
  fprintf(file_rmsd,
	  "# Interpolating conformation change with %d %s modes\n",
	  NMODES, mode_name);
  fprintf(file_rmsd,"# RMSD_step: max= %.2g min= %.2g max. steps %d\n",
	  STEP_MAX, STEP_MIN, IT_MAX);
  fprintf(file_rmsd,"# E_clash(PDB)= %.2g\n", Ene);
  // Superimpose second structure to first one
  float RMSD_kf=rmsd_mclachlan_f(coord_ref_1, coord_ref_2, ali_a.mass, N_ali);
  float RMSD_ki=0, RMSD_step=0, RMSD_opt=RMSD_kf;
  printf("Initial RMSD: %.2f\n\n", RMSD_kf);
  fprintf(file_rmsd,"# RMSD= %.3f\n", RMSD_kf);
  fprintf(file_rmsd,"# RMSD_ki RMSD_kf RMSD_step E_clash factor accept\n");
  fprintf(file_rmsd, "%.3f\t%.3f\t%.3f\t%.2g\t%.2g\t%d\n",
	  RMSD_ki, RMSD_kf, RMSD_step, Ene, 1.0, 1);

  // Opening file for printing PDB
  FILE *file_pdb=NULL;
  float coord_all_1[3*natoms1], mass[natoms1], rmsd;
  for(i=0; i<natoms1; i++)mass[i]=Mass(atoms1+i);
  if(strcmp(diff_type, "standard")!=0){
    char pdbout[200];
    sprintf(pdbout, "%s_confchange_%s.pdb", nameout, diff_type);
    file_pdb=fopen(pdbout, "w");
    printf("Writing trajectory in PDB format in %s\n", pdbout);
    Print_seqres(file_pdb, chains, Nchain);
    Put_coord(coord_all_1, bonds_ini, natoms1);
    Print_PDB(file_pdb, atoms1, natoms1, coord_all_1, seq, 0, 0.0);
  }

  float c_amax[NMODES];
  for (i=0; i<NMODES; i++){
    float *mode=NM->Tors[i], max=fabs(mode[0]); 
    for(a=1; a<naxes; a++)if(fabs(mode[a])>max)max=fabs(mode[a]);
    c_amax[i]=A_MAX/max; // Maximum coefficient of mode i for phi<A_MAX
  }

  int accept=1, iter, exit=0, k_pdb=0;
  //float FRAC=0.0;
  float Mass_sqrt=sqrt(Mass_tot), c_thr=rmsd_thr*Mass_sqrt;
  double skip_tot=0; int nskip=0;
  for(iter=0; iter<IT_MAX; iter++){

    /*// Update Jacobian matrix WRONG!!!!
      rmsd=rmsd_mclachlan_f(coord_kin, coord_old, mass_ref, N_ali);
    if((rmsd>RMSD_TOL)){
      printf("Computing kinetic energy\n");
      // Kinetic energy must be computed with new atoms!!!!
      for(i=0;i<N_Cart;i++)coord_kin[i]=coord_old[i];
      atom atoms_t[natoms1]; Copy_atoms_bonds(atoms_t, bonds, natoms1);
      Compute_kinetic(J, axes, naxes, atoms_t, natoms1, Ref1, 0);
      }*/

    // Difference of coordinates
    float Diff_Cart[N_Cart];
    for(i=0;i<N_Cart;i++)Diff_Cart[i]=coord_ref_2[i]-coord_old[i];
    float tors_coeff[naxes];
    for(i=0; i<naxes; i++){
	tors_coeff[i]=
	  Scalar_product_weighted(Diff_Cart, J->Jacobian_ar[i],
				  Ref1.mass_coord, N_Cart);
      }

    // Compute angles
    double diff_step[naxes], diff_all[naxes];
    for(a=0; a<naxes; a++)diff_step[a]=0;
    double rstep=0, factor=1, excess=1;
    float c_lin[NMODES];
    for (i=0; i<NMODES; i++){
      float *mode=NM->Tors[i]; 
      double c=0; for(a=0; a<naxes; a++)c+=tors_coeff[a]*mode[a];
      if(fabs(c)>excess*c_amax[i])excess=fabs(c)/c_amax[i];
      c_lin[i]=c; rstep+=c*c;
    }
    rstep=1.1*sqrt(rstep/Mass_tot);
    if(rstep<STEP_MIN){exit=1; goto print;}
    factor=rstep/STEP_MAX;
    if(excess>factor)factor=excess;

    //float thr=FRAC*RMSD_kf*Mass_sqrt; if(thr<c_thr)thr=c_thr;
    int skip=0;
    for (i=0; i<NMODES; i++){
      float c=c_lin[i]; if(factor>1)c/=factor;
      if(fabs(c)<c_thr){skip++; continue;}
      float *mode=NM->Tors[i];
      for(a=0; a<naxes; a++)diff_step[a]+=c*mode[a];
    }
    skip_tot+=skip; nskip++;
    float max=0;
    for(i=0; i<naxes; i++)if(fabs(diff_step[i])>max)max=fabs(diff_step[i]);
    if(max>A_MAX){
      float f=A_MAX/max;
      printf("WARNING, too large angle= %.2f ", max);
      printf("Reducing d_phi by a factor %.2g\n", f);
      rstep/=f; for(i=0; i<naxes; i++)diff_step[i]*=f;
    }
    if(rstep<STEP_MIN){exit=1; goto print;}

    // Move atoms
    float reduce_step=1; factor=1;
    while(1){ // loop on amplitudes
      for(i=0; i<naxes; i++)diff_all[i]=diff_phi0[i]+diff_step[i];
      Copy_bonds(bonds_tmp, bonds_ini, natoms1);
      Build_up(bonds_tmp, natoms1, diff_all, naxes);
      accept=Write_RMSD(&reduce_step, &RMSD_opt, &RMSD_kf,
			STEP_MIN, STEP_MAX, factor, iter, file_rmsd,
			bonds_tmp, coord_all, natoms1, ali_a,
			coord_new,coord_old,coord_ref_1,coord_ref_2);
      if(accept)break;
      factor*=reduce_step; rstep*=reduce_step;
      if(rstep<STEP_MIN){
	printf("Too small amplitude (%.2g), exiting\n", factor);
	accept=0; break;
      }
      printf("Reducing amplitude by factor %.2g\n", reduce_step);
      for(i=0; i<naxes; i++)diff_step[i]*=reduce_step;
    } // End loop amplitude 


    if(accept==0){
      exit=1;
    }else{
      exit=(RMSD_opt < RMSD_TOL);
      // Store conformation
      Copy_bonds(bonds, bonds_tmp, natoms1);
      Internal_coordinates(phi_opt, naxes, bonds, natoms1);
      for(i=0; i<naxes; i++)diff_phi0[i]=phi_opt[i]-phi_ini[i];
    }

    // Print PDB
  print:
    if(file_pdb){
      rmsd=rmsd_mclachlan_f(coord_pdb, coord_new, mass_ref, N_ali);
      if((rmsd > PDB_STEP)|| exit){
	k_pdb++;
	for(i=0; i<N_Cart; i++)coord_pdb[i]=coord_new[i];
	RMSD_ki=rmsd_mclachlan_f(coord_all_1, coord_all, mass, natoms1);
	Print_PDB(file_pdb,atoms1,natoms1,coord_all,seq,k_pdb,RMSD_ki);
      }
    }
    printf("\n");
    if(exit){
      printf("Exiting iterations, rmsd= %.2f\n",RMSD_opt);
      break;
    }

    float *tmp=coord_old; coord_old=coord_new; coord_new=tmp;

  }

  // Take final coordinates from bonds
  fprintf(file_rmsd, "# Final RMSD:\n");
  float reduce_step;
  Write_RMSD(&reduce_step, &RMSD_opt, &RMSD_kf, STEP_MIN, 100, // = STEP_MAX
	     1.00, iter, file_rmsd, bonds, coord_all, natoms1, ali_a,
	     coord_new,coord_ref_1,coord_ref_1,coord_ref_2);
  printf("Final RMSD= %.2f\n", RMSD_kf);

  printf("Storing internal coordinates\n");
  Internal_coordinates(phi_opt, naxes, bonds, natoms1);
  for(i=0; i<naxes; i++)diff_phi[i]=phi_opt[i]-phi_ini[i];
  Periodic_angles(diff_phi, axes, naxes);

  Copy_bonds(bonds, bonds_ini, natoms1);
  Build_up(bonds, natoms1, diff_phi, naxes);
  fprintf(file_rmsd, "# Reconstructed RMSD:\n");
  Write_RMSD(&reduce_step, &RMSD_opt, &RMSD_kf, STEP_MIN, 100,
	     1.00, iter, file_rmsd, bonds, coord_all, natoms1,
	     ali_a, coord_new, coord_ref_1,coord_ref_1,coord_ref_2);
  printf("%d %s modes, reconstructed RMSD= %.2f\n", NMODES,mode_name,RMSD_kf);
  printf("Mean number of skipped modes out of %d: %.1f\n",
	 NMODES, skip_tot/nskip);
  fprintf(file_rmsd, "# Mean number of skipped modes out of %d: %.1f",
	  NMODES, skip_tot/nskip);
  fprintf(file_rmsd, " threshold= %.3f A\n", rmsd_thr);


  fclose(file_rmsd);
  if(file_pdb)fclose(file_pdb);
  //Empty_Ref(&Ref1);
  //Change_kin_back(axes, naxes, first_kin, last_kin);
  //Empty_Jacobian(J);
  if(0)Compute_kinetic(J, axes, naxes, atoms1, natoms1, Ref1,0);
  return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x440, %rsp            # imm = 0x440
movl 0xf8(%rbp), %eax
movq 0xf0(%rbp), %rax
movq 0xe8(%rbp), %rax
leaq 0xa8(%rbp), %rax
movl 0xa0(%rbp), %r10d
movq 0x98(%rbp), %r10
movl 0x90(%rbp), %r10d
movq 0x88(%rbp), %r10
movl 0x80(%rbp), %r10d
movq 0x78(%rbp), %r10
movl 0x70(%rbp), %r10d
movq 0x68(%rbp), %r10
movq 0x60(%rbp), %r10
leaq 0x40(%rbp), %r10
movq %r10, -0x3d8(%rbp)
leaq 0x10(%rbp), %r10
movq %r10, -0x3d0(%rbp)
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movq %rcx, -0x40(%rbp)
movsd %xmm0, -0x48(%rbp)
movq %r8, -0x50(%rbp)
movl %r9d, -0x54(%rbp)
movss %xmm1, -0x58(%rbp)
movl 0x10(%rax), %ecx
movl %ecx, -0x64(%rbp)
movss 0x4(%rax), %xmm0
movss %xmm0, -0x68(%rbp)
movss 0x8(%rax), %xmm0
movss %xmm0, -0x6c(%rbp)
movss 0xc(%rax), %xmm0
movss %xmm0, -0x70(%rbp)
movl $0x3ea8f5c3, -0x74(%rbp) # imm = 0x3EA8F5C3
movl 0xf8(%rbp), %esi
movq 0xf0(%rbp), %rdx
leaq 0x34e13(%rip), %rdi     # 0x8043a
xorl %eax, %eax
movb %al, -0x3b1(%rbp)
callq 0x10d0
movq -0x38(%rbp), %rdi
movl -0x54(%rbp), %esi
movq -0x50(%rbp), %rdx
callq 0x1bf00
movl -0x54(%rbp), %eax
movq %rsp, %rcx
movq %rcx, -0x80(%rbp)
movq %rax, %rcx
shlq $0x6, %rcx
leaq (%rcx,%rcx,2), %rcx
movq %rsp, %rdi
subq %rcx, %rdi
movq %rdi, -0x3c8(%rbp)
movq %rdi, %rsp
movq %rax, -0x88(%rbp)
movl -0x54(%rbp), %eax
movq %rax, %rcx
shlq $0x6, %rcx
leaq (%rcx,%rcx,2), %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x3c0(%rbp)
movq %rcx, %rsp
movq %rax, -0x90(%rbp)
movq -0x38(%rbp), %rsi
movl -0x54(%rbp), %edx
callq 0x4adb0
movb -0x3b1(%rbp), %al
leaq 0x34d44(%rip), %rdi     # 0x803f2
callq 0x10d0
movl 0x70(%rbp), %eax
leaq 0xf(,%rax,8), %rcx
andq $-0x10, %rcx
movq %rsp, %rdi
subq %rcx, %rdi
movq %rdi, -0x3b0(%rbp)
movq %rdi, %rsp
movq %rax, -0x98(%rbp)
movl 0x70(%rbp), %eax
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x3a8(%rbp)
movq %rcx, %rsp
movq %rax, -0xa0(%rbp)
movl 0x70(%rbp), %esi
movq -0x38(%rbp), %rdx
movl -0x54(%rbp), %ecx
callq 0x1e1e0
movl 0x70(%rbp), %eax
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x3a0(%rbp)
movq %rcx, %rsp
movq %rax, -0xa8(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl 0x70(%rbp), %eax
jge 0x4b761
movq -0x3a0(%rbp), %rax
movslq -0x5c(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4b73b
movq -0x3d8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0xac(%rbp)
imull $0x3, -0xac(%rbp), %eax
movl %eax, -0xb0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0xb8(%rbp)
movl $0x0, -0x5c(%rbp)
movq -0x3d0(%rbp), %rcx
movl -0x5c(%rbp), %eax
cmpl (%rcx), %eax
jge 0x4b7d1
movq -0x3d0(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x5c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
addsd -0xb8(%rbp), %xmm0
movsd %xmm0, -0xb8(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4b790
movq -0x3d8(%rbp), %rax
movl -0xb0(%rbp), %ecx
leaq 0xf(,%rcx,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rdi
subq %rdx, %rdi
movq %rdi, -0x400(%rbp)
movq %rdi, %rsp
movq %rcx, -0xc0(%rbp)
movl -0xb0(%rbp), %ecx
leaq 0xf(,%rcx,4), %rsi
andq $-0x10, %rsi
movq %rsp, %rdx
subq %rsi, %rdx
movq %rdx, -0x3f8(%rbp)
movq %rdx, %rsp
movq %rcx, -0xc8(%rbp)
movl -0xac(%rbp), %esi
movq -0x50(%rbp), %rdx
movq (%rax), %rcx
callq 0x4a130
movq -0x3d8(%rbp), %rax
movq -0x3f8(%rbp), %rdi
movl -0xac(%rbp), %esi
movq 0x98(%rbp), %rdx
movq 0x8(%rax), %rcx
callq 0x4a130
movl -0xb0(%rbp), %eax
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x3f0(%rbp)
movq %rcx, %rsp
movq %rax, -0xd0(%rbp)
movl -0xb0(%rbp), %eax
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x3e8(%rbp)
movq %rcx, %rsp
movq %rax, -0xd8(%rbp)
movl -0xb0(%rbp), %eax
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x3e0(%rbp)
movq %rcx, %rsp
movq %rax, -0xe0(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0xb0(%rbp), %eax
jge 0x4b94a
movq -0x3e0(%rbp), %rax
movq -0x3f0(%rbp), %rcx
movq -0x3e8(%rbp), %rdx
movq -0x400(%rbp), %rsi
movslq -0x5c(%rbp), %rdi
movss (%rsi,%rdi,4), %xmm0
movslq -0x5c(%rbp), %rsi
movss %xmm0, (%rcx,%rsi,4)
movslq -0x5c(%rbp), %rsi
movss (%rcx,%rsi,4), %xmm0
movslq -0x5c(%rbp), %rsi
movss %xmm0, (%rdx,%rsi,4)
movslq -0x5c(%rbp), %rdx
movss (%rcx,%rdx,4), %xmm0
movslq -0x5c(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4b8e2
movq -0x3d0(%rbp), %rax
movq -0x3e8(%rbp), %rcx
movq -0x3f0(%rbp), %rdx
movq %rdx, -0xe8(%rbp)
movq %rcx, -0xf0(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0xf8(%rbp)
movl -0x54(%rbp), %ecx
movl %ecx, %eax
leal (%rax,%rax,2), %eax
leaq 0xf(,%rax,4), %rcx
andq $-0x10, %rcx
movq %rsp, %rdi
subq %rcx, %rdi
movq %rdi, -0x428(%rbp)
movq %rdi, %rsp
movq %rax, -0x100(%rbp)
movq -0x38(%rbp), %rsi
movl -0x54(%rbp), %edx
callq 0x49770
movq -0x428(%rbp), %rdi
movl -0x54(%rbp), %esi
callq 0x49810
movss %xmm0, -0x104(%rbp)
movq 0x60(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq 0x34a48(%rip), %rsi     # 0x8041d
xorl %eax, %eax
movb %al, -0x411(%rbp)
leaq -0x1d0(%rbp), %rdi
movq %rdi, -0x420(%rbp)
callq 0x1200
movq -0x420(%rbp), %rdi
leaq 0x30974(%rip), %rsi     # 0x7c372
callq 0x11b0
movq -0x420(%rbp), %rsi
movq %rax, %rcx
movb -0x411(%rbp), %al
movq %rcx, -0x1d8(%rbp)
leaq 0x34a0b(%rip), %rdi     # 0x8042c
callq 0x10d0
movb -0x411(%rbp), %al
movq -0x1d8(%rbp), %rdi
movl 0xf8(%rbp), %edx
movq 0xf0(%rbp), %rcx
leaq 0x349f1(%rip), %rsi     # 0x80438
callq 0x1150
movq -0x1d8(%rbp), %rdi
movss -0x68(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movss -0x6c(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
movl -0x64(%rbp), %edx
leaq 0x349ff(%rip), %rsi     # 0x8046e
movb $0x2, %al
callq 0x1150
movq -0x1d8(%rbp), %rdi
movss -0x104(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x34a0e(%rip), %rsi     # 0x8049e
movb $0x1, %al
movb %al, -0x412(%rbp)
callq 0x1150
movq -0x400(%rbp), %rdi
movq -0x3f8(%rbp), %rsi
movq -0x3d8(%rbp), %rax
movq 0x10(%rax), %rdx
movl -0xac(%rbp), %ecx
callq 0x70af0
movb -0x412(%rbp), %al
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x1dc(%rbp)
movl $0x0, -0x1e0(%rbp)
movl $0x0, -0x1e4(%rbp)
movss -0x1dc(%rbp), %xmm0
movss %xmm0, -0x1e8(%rbp)
movss -0x1dc(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x349aa(%rip), %rdi     # 0x804b4
callq 0x10d0
movb -0x412(%rbp), %al
movq -0x1d8(%rbp), %rdi
movss -0x1dc(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x3499a(%rip), %rsi     # 0x804c9
callq 0x1150
movb -0x411(%rbp), %al
movq -0x1d8(%rbp), %rdi
leaq 0x3498f(%rip), %rsi     # 0x804d7
callq 0x1150
movq -0x1d8(%rbp), %rdi
movss -0x1e0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movss -0x1dc(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
movss -0x1e4(%rbp), %xmm2
cvtss2sd %xmm2, %xmm2
movss -0x104(%rbp), %xmm3
cvtss2sd %xmm3, %xmm3
leaq 0x3497f(%rip), %rsi     # 0x8050a
movsd 0x2a4b5(%rip), %xmm4    # 0x76048
movl $0x1, %edx
movb $0x5, %al
callq 0x1150
movq $0x0, -0x1f0(%rbp)
movl -0x54(%rbp), %ecx
movl %ecx, %eax
leal (%rax,%rax,2), %eax
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x410(%rbp)
movq %rcx, %rsp
movq %rax, -0x1f8(%rbp)
movl -0x54(%rbp), %eax
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x408(%rbp)
movq %rcx, %rsp
movq %rax, -0x200(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x4bc39
movq -0x50(%rbp), %rdi
movslq -0x5c(%rbp), %rax
imulq $0x70, %rax, %rax
addq %rax, %rdi
callq 0x351c0
movq -0x408(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4bc02
movq -0x30(%rbp), %rdi
leaq 0x348e3(%rip), %rsi     # 0x80527
callq 0x1140
cmpl $0x0, %eax
je 0x4bcee
leaq -0x2d0(%rbp), %rdi
movq 0x60(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq 0x348c8(%rip), %rsi     # 0x80530
movb $0x0, %al
callq 0x1200
leaq -0x2d0(%rbp), %rdi
leaq 0x306f5(%rip), %rsi     # 0x7c372
callq 0x11b0
movq %rax, -0x1f0(%rbp)
leaq -0x2d0(%rbp), %rsi
leaq 0x348ae(%rip), %rdi     # 0x80545
movb $0x0, %al
callq 0x10d0
movq -0x1f0(%rbp), %rdi
movq 0x88(%rbp), %rsi
movl 0x90(%rbp), %edx
callq 0x49fb0
movq -0x410(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x54(%rbp), %edx
callq 0x49770
movq -0x410(%rbp), %rcx
movq -0x1f0(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0x54(%rbp), %edx
movq 0x78(%rbp), %r8
xorl %r9d, %r9d
xorps %xmm0, %xmm0
callq 0x49a60
movl 0xf8(%rbp), %eax
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x430(%rbp)
movq %rcx, %rsp
movq %rax, -0x2d8(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl 0xf8(%rbp), %eax
jge 0x4be10
movq 0xe8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x5c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x2e0(%rbp)
movq -0x2e0(%rbp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movaps 0x30733(%rip), %xmm1    # 0x7c490
pand %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x2e4(%rbp)
movl $0x1, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpl 0x70(%rbp), %eax
jge 0x4bde5
movq -0x2e0(%rbp), %rax
movslq -0x60(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movaps 0x306f9(%rip), %xmm1    # 0x7c490
pand %xmm1, %xmm0
movss -0x2e4(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x4bdd8
movq -0x2e0(%rbp), %rax
movslq -0x60(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movaps 0x306c8(%rip), %xmm1    # 0x7c490
pand %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x2e4(%rbp)
jmp 0x4bdda
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x4bd74
movq -0x430(%rbp), %rax
movss -0x70(%rbp), %xmm0
divss -0x2e4(%rbp), %xmm0
movslq -0x5c(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4bd1e
movl $0x1, -0x2e8(%rbp)
movl $0x0, -0x2f0(%rbp)
movl $0x0, -0x2f4(%rbp)
movsd -0xb8(%rbp), %xmm0
callq 0x1220
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x2f8(%rbp)
movss -0x58(%rbp), %xmm0
mulss -0x2f8(%rbp), %xmm0
movss %xmm0, -0x2fc(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x308(%rbp)
movl $0x0, -0x30c(%rbp)
movl $0x0, -0x2ec(%rbp)
movl -0x2ec(%rbp), %eax
cmpl -0x64(%rbp), %eax
jge 0x4c944
movl -0xb0(%rbp), %eax
movq %rsp, %rcx
movq %rcx, -0x318(%rbp)
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x438(%rbp)
movq %rcx, %rsp
movq %rax, -0x320(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0xb0(%rbp), %eax
jge 0x4bf0a
movq -0x438(%rbp), %rax
movq -0x3f8(%rbp), %rcx
movslq -0x5c(%rbp), %rdx
movss (%rcx,%rdx,4), %xmm0
movq -0xf0(%rbp), %rcx
movslq -0x5c(%rbp), %rdx
subss (%rcx,%rdx,4), %xmm0
movslq -0x5c(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4bec4
movl 0x70(%rbp), %eax
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x440(%rbp)
movq %rcx, %rsp
movq %rax, -0x328(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl 0x70(%rbp), %eax
jge 0x4bf87
movq -0x438(%rbp), %rdi
movq -0x3d0(%rbp), %rax
movq -0x40(%rbp), %rcx
movq 0x10(%rcx), %rcx
movslq -0x5c(%rbp), %rdx
movq (%rcx,%rdx,8), %rsi
movq 0x18(%rax), %rdx
movl -0xb0(%rbp), %ecx
callq 0x15510
movq -0x440(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4bf37
movl 0x70(%rbp), %eax
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x450(%rbp)
movq %rcx, %rsp
movq %rax, -0x330(%rbp)
movl 0x70(%rbp), %eax
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x448(%rbp)
movq %rcx, %rsp
movq %rax, -0x338(%rbp)
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpl 0x70(%rbp), %eax
jge 0x4c000
movq -0x450(%rbp), %rax
movslq -0x60(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x4bfda
movq $0x0, -0x340(%rbp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, -0x348(%rbp)
movq %rax, -0x350(%rbp)
movl 0xf8(%rbp), %eax
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x458(%rbp)
movq %rcx, %rsp
movq %rax, -0x358(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl 0xf8(%rbp), %eax
jge 0x4c193
movq 0xe8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x5c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x360(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x368(%rbp)
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpl 0x70(%rbp), %eax
jge 0x4c0d5
movq -0x440(%rbp), %rax
movslq -0x60(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x360(%rbp), %rax
movslq -0x60(%rbp), %rcx
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
addsd -0x368(%rbp), %xmm0
movsd %xmm0, -0x368(%rbp)
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x4c08e
movq -0x430(%rbp), %rax
movsd -0x368(%rbp), %xmm0
movaps 0x303a5(%rip), %xmm1    # 0x7c490
pand %xmm1, %xmm0
movsd -0x350(%rbp), %xmm1
movslq -0x5c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm2
cvtss2sd %xmm2, %xmm2
mulsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x4c141
movq -0x430(%rbp), %rax
movsd -0x368(%rbp), %xmm0
movaps 0x3036c(%rip), %xmm1    # 0x7c490
pand %xmm1, %xmm0
movslq -0x5c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x350(%rbp)
movq -0x458(%rbp), %rax
movsd -0x368(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movslq -0x5c(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movsd -0x368(%rbp), %xmm0
movsd -0x368(%rbp), %xmm2
movsd -0x340(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x340(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4c053
movsd -0x340(%rbp), %xmm0
divsd -0xb8(%rbp), %xmm0
callq 0x1220
movaps %xmm0, %xmm1
movsd 0x33eb5(%rip), %xmm0    # 0x80068
mulsd %xmm1, %xmm0
movsd %xmm0, -0x340(%rbp)
movsd -0x340(%rbp), %xmm1
movss -0x6c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4c1e5
movl $0x1, -0x2f0(%rbp)
jmp 0x4c7ac
movsd -0x340(%rbp), %xmm0
movss -0x68(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x348(%rbp)
movsd -0x350(%rbp), %xmm0
ucomisd -0x348(%rbp), %xmm0
jbe 0x4c224
movsd -0x350(%rbp), %xmm0
movsd %xmm0, -0x348(%rbp)
movl $0x0, -0x36c(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl 0xf8(%rbp), %eax
jge 0x4c345
movq -0x458(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x370(%rbp)
movsd -0x348(%rbp), %xmm0
movsd 0x29ddc(%rip), %xmm1    # 0x76048
ucomisd %xmm1, %xmm0
jbe 0x4c296
movsd -0x348(%rbp), %xmm1
movss -0x370(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x370(%rbp)
movss -0x370(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
movaps 0x301e7(%rip), %xmm0    # 0x7c490
pand %xmm0, %xmm1
movss -0x2fc(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4c2d0
movl -0x36c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x36c(%rbp)
jmp 0x4c337
movq 0xe8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x5c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x378(%rbp)
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpl 0x70(%rbp), %eax
jge 0x4c335
movq -0x450(%rbp), %rax
movss -0x370(%rbp), %xmm0
movq -0x378(%rbp), %rcx
movslq -0x60(%rbp), %rdx
mulss (%rcx,%rdx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x60(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x4c2f1
jmp 0x4c337
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4c235
cvtsi2sdl -0x36c(%rbp), %xmm0
addsd -0x308(%rbp), %xmm0
movsd %xmm0, -0x308(%rbp)
movl -0x30c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30c(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x37c(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl 0x70(%rbp), %eax
jge 0x4c3e7
movq -0x450(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0x300f3(%rip), %xmm1    # 0x7c490
pand %xmm1, %xmm0
movss -0x37c(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x4c3da
movq -0x450(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0x300c6(%rip), %xmm1    # 0x7c490
pand %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x37c(%rbp)
jmp 0x4c3dc
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4c37e
movss -0x37c(%rbp), %xmm0
ucomiss -0x70(%rbp), %xmm0
jbe 0x4c49f
movss -0x70(%rbp), %xmm0
divss -0x37c(%rbp), %xmm0
movss %xmm0, -0x380(%rbp)
movss -0x37c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x3414c(%rip), %rdi     # 0x8056d
movb $0x1, %al
callq 0x10d0
movss -0x380(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x34152(%rip), %rdi     # 0x8058d
movb $0x1, %al
callq 0x10d0
movss -0x380(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
movsd -0x340(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x340(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl 0x70(%rbp), %eax
jge 0x4c49d
movq -0x450(%rbp), %rax
movss -0x380(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x5c(%rbp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4c469
jmp 0x4c49f
movsd -0x340(%rbp), %xmm1
movss -0x6c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4c4c5
movl $0x1, -0x2f0(%rbp)
jmp 0x4c7ac
movss 0x29bc3(%rip), %xmm0    # 0x76090
movss %xmm0, -0x384(%rbp)
movsd 0x29b6b(%rip), %xmm0    # 0x76048
movsd %xmm0, -0x348(%rbp)
jmp 0x4c4e7
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl 0x70(%rbp), %eax
jge 0x4c531
movq -0x448(%rbp), %rax
movq -0x450(%rbp), %rcx
movq -0x3a0(%rbp), %rdx
movslq -0x5c(%rbp), %rsi
movsd (%rdx,%rsi,8), %xmm0
movslq -0x5c(%rbp), %rdx
addsd (%rcx,%rdx,8), %xmm0
movslq -0x5c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4c4ee
movq -0x3d8(%rbp), %r14
movq -0x428(%rbp), %r12
movq -0x3c0(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x54(%rbp), %edx
callq 0x4adb0
movq -0x448(%rbp), %rdx
movq -0x3c0(%rbp), %rdi
movl -0x54(%rbp), %esi
movl 0x70(%rbp), %ecx
callq 0x1c4f0
movq -0x3c0(%rbp), %r9
movq -0x400(%rbp), %r10
movq -0x3f8(%rbp), %rax
movss -0x6c(%rbp), %xmm0
movss -0x68(%rbp), %xmm1
movsd -0x348(%rbp), %xmm2
cvtsd2ss %xmm2, %xmm2
movl -0x2ec(%rbp), %ecx
movq -0x1d8(%rbp), %r8
movl -0x54(%rbp), %r15d
movq -0xe8(%rbp), %rbx
movq -0xf0(%rbp), %r11
leaq -0x384(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
leaq -0x1dc(%rbp), %rdx
subq $0x50, %rsp
movq %r12, (%rsp)
movl %r15d, 0x8(%rsp)
movq (%r14), %r15
movq %r15, 0x10(%rsp)
movq 0x8(%r14), %r15
movq %r15, 0x18(%rsp)
movq 0x10(%r14), %r15
movq %r15, 0x20(%rsp)
movq 0x18(%r14), %r14
movq %r14, 0x28(%rsp)
movq %rbx, 0x30(%rsp)
movq %r11, 0x38(%rsp)
movq %r10, 0x40(%rsp)
movq %rax, 0x48(%rsp)
callq 0x4cc70
addq $0x50, %rsp
movl %eax, -0x2e8(%rbp)
cmpl $0x0, -0x2e8(%rbp)
je 0x4c62b
jmp 0x4c6f6
movss -0x384(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
mulsd -0x348(%rbp), %xmm0
movsd %xmm0, -0x348(%rbp)
movss -0x384(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
mulsd -0x340(%rbp), %xmm0
movsd %xmm0, -0x340(%rbp)
movsd -0x340(%rbp), %xmm1
movss -0x6c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4c69c
movsd -0x348(%rbp), %xmm0
leaq 0x33f25(%rip), %rdi     # 0x805ae
movb $0x1, %al
callq 0x10d0
movl $0x0, -0x2e8(%rbp)
jmp 0x4c6f6
movss -0x384(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x33f24(%rip), %rdi     # 0x805d3
movb $0x1, %al
callq 0x10d0
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl 0x70(%rbp), %eax
jge 0x4c6f1
movq -0x450(%rbp), %rax
movss -0x384(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x5c(%rbp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4c6bd
jmp 0x4c4e5
cmpl $0x0, -0x2e8(%rbp)
jne 0x4c70e
movl $0x1, -0x2f0(%rbp)
jmp 0x4c7aa
movq -0x3c8(%rbp), %rdi
movq -0x3c0(%rbp), %rsi
movss -0x1e8(%rbp), %xmm1
movss 0x3f754(%rip), %xmm0    # 0x8be80
ucomiss %xmm1, %xmm0
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x2f0(%rbp)
movl -0x54(%rbp), %edx
callq 0x4adb0
movq -0x3a8(%rbp), %rdi
movq -0x3c8(%rbp), %rdx
movl 0x70(%rbp), %esi
movl -0x54(%rbp), %ecx
callq 0x1e1e0
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl 0x70(%rbp), %eax
jge 0x4c7a8
movq -0x3a0(%rbp), %rax
movq -0x3b0(%rbp), %rcx
movq -0x3a8(%rbp), %rdx
movslq -0x5c(%rbp), %rsi
movsd (%rdx,%rsi,8), %xmm0
movslq -0x5c(%rbp), %rdx
subsd (%rcx,%rdx,8), %xmm0
movslq -0x5c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4c765
jmp 0x4c7aa
jmp 0x4c7ac
cmpq $0x0, -0x1f0(%rbp)
je 0x4c8a5
movq -0x3e0(%rbp), %rdi
movq -0xe8(%rbp), %rsi
movq -0xf8(%rbp), %rdx
movl -0xac(%rbp), %ecx
callq 0x70af0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x204(%rbp)
movss -0x204(%rbp), %xmm0
ucomiss -0x74(%rbp), %xmm0
ja 0x4c801
cmpl $0x0, -0x2f0(%rbp)
je 0x4c8a3
movl -0x2f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2f4(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0xb0(%rbp), %eax
jge 0x4c84d
movq -0x3e0(%rbp), %rax
movq -0xe8(%rbp), %rcx
movslq -0x5c(%rbp), %rdx
movss (%rcx,%rdx,4), %xmm0
movslq -0x5c(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4c817
movq -0x428(%rbp), %rsi
movq -0x408(%rbp), %rdx
movq -0x410(%rbp), %rdi
movl -0x54(%rbp), %ecx
callq 0x70af0
movq -0x428(%rbp), %rcx
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x1e0(%rbp)
movq -0x1f0(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0x54(%rbp), %edx
movq 0x78(%rbp), %r8
movl -0x2f4(%rbp), %r9d
movss -0x1e0(%rbp), %xmm0
callq 0x49a60
jmp 0x4c8a5
leaq 0x317cc(%rip), %rdi     # 0x7e078
movb $0x0, %al
callq 0x10d0
cmpl $0x0, -0x2f0(%rbp)
je 0x4c8e2
movss -0x1e8(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x33d27(%rip), %rdi     # 0x805f6
movb $0x1, %al
callq 0x10d0
movl $0x14, -0x388(%rbp)
jmp 0x4c916
movq -0xf0(%rbp), %rax
movq %rax, -0x390(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x390(%rbp), %rax
movq %rax, -0xe8(%rbp)
movl $0x0, -0x388(%rbp)
movq -0x318(%rbp), %rax
movq %rax, %rsp
movl -0x388(%rbp), %eax
testl %eax, %eax
je 0x4c92e
jmp 0x4c92c
jmp 0x4c944
jmp 0x4c930
movl -0x2ec(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2ec(%rbp)
jmp 0x4be7b
movq -0x3d8(%rbp), %rbx
movq -0x428(%rbp), %r15
movq -0x1d8(%rbp), %rdi
leaq 0x33cb6(%rip), %rsi     # 0x80616
movb $0x0, %al
callq 0x1150
movq -0x400(%rbp), %r10
movq -0x3c8(%rbp), %r9
movq -0x3f8(%rbp), %rax
movss -0x6c(%rbp), %xmm0
movl -0x2ec(%rbp), %ecx
movq -0x1d8(%rbp), %r8
movl -0x54(%rbp), %r14d
movq -0xe8(%rbp), %r11
leaq -0x394(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
leaq -0x1dc(%rbp), %rdx
movss 0x296fa(%rip), %xmm1    # 0x760b0
movss 0x296d2(%rip), %xmm2    # 0x76090
subq $0x50, %rsp
movq %r15, (%rsp)
movl %r14d, 0x8(%rsp)
movq (%rbx), %r14
movq %r14, 0x10(%rsp)
movq 0x8(%rbx), %r14
movq %r14, 0x18(%rsp)
movq 0x10(%rbx), %r14
movq %r14, 0x20(%rsp)
movq 0x18(%rbx), %rbx
movq %rbx, 0x28(%rsp)
movq %r11, 0x30(%rsp)
movq %r10, 0x38(%rsp)
movq %r10, 0x40(%rsp)
movq %rax, 0x48(%rsp)
callq 0x4cc70
addq $0x50, %rsp
movss -0x1dc(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x33c07(%rip), %rdi     # 0x80625
movb $0x1, %al
callq 0x10d0
leaq 0x33c0b(%rip), %rdi     # 0x80637
movb $0x0, %al
callq 0x10d0
movq -0x3a8(%rbp), %rdi
movq -0x3c8(%rbp), %rdx
movl 0x70(%rbp), %esi
movl -0x54(%rbp), %ecx
callq 0x1e1e0
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl 0x70(%rbp), %eax
jge 0x4ca93
movq -0x3b0(%rbp), %rax
movq -0x3a8(%rbp), %rcx
movslq -0x5c(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movslq -0x5c(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm0
movq -0x28(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4ca53
movq -0x3d8(%rbp), %rbx
movq -0x428(%rbp), %r15
movq -0x28(%rbp), %rdi
movq 0x68(%rbp), %rsi
movl 0x70(%rbp), %edx
callq 0x44010
movq -0x3c8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x54(%rbp), %edx
callq 0x4adb0
movq -0x3c8(%rbp), %rdi
movl -0x54(%rbp), %esi
movq -0x28(%rbp), %rdx
movl 0x70(%rbp), %ecx
callq 0x1c4f0
movq -0x1d8(%rbp), %rdi
leaq 0x33b6d(%rip), %rsi     # 0x80655
movb $0x0, %al
callq 0x1150
movq -0x3c8(%rbp), %r9
movq -0x400(%rbp), %r10
movq -0x3f8(%rbp), %rax
movss -0x6c(%rbp), %xmm0
movl -0x2ec(%rbp), %ecx
movq -0x1d8(%rbp), %r8
movl -0x54(%rbp), %r14d
movq -0xe8(%rbp), %r11
leaq -0x394(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
leaq -0x1dc(%rbp), %rdx
movss 0x29572(%rip), %xmm1    # 0x760b0
movss 0x2954a(%rip), %xmm2    # 0x76090
subq $0x50, %rsp
movq %r15, (%rsp)
movl %r14d, 0x8(%rsp)
movq (%rbx), %r14
movq %r14, 0x10(%rsp)
movq 0x8(%rbx), %r14
movq %r14, 0x18(%rsp)
movq 0x10(%rbx), %r14
movq %r14, 0x20(%rsp)
movq 0x18(%rbx), %rbx
movq %rbx, 0x28(%rsp)
movq %r11, 0x30(%rsp)
movq %r10, 0x38(%rsp)
movq %r10, 0x40(%rsp)
movq %rax, 0x48(%rsp)
callq 0x4cc70
addq $0x50, %rsp
movl 0xf8(%rbp), %esi
movq 0xf0(%rbp), %rdx
movss -0x1dc(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x33ab9(%rip), %rdi     # 0x8066c
movb $0x1, %al
callq 0x10d0
movl 0xf8(%rbp), %esi
movsd -0x308(%rbp), %xmm0
cvtsi2sdl -0x30c(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0x33ab8(%rip), %rdi     # 0x80693
movb $0x1, %al
callq 0x10d0
movq -0x1d8(%rbp), %rdi
movl 0xf8(%rbp), %edx
movsd -0x308(%rbp), %xmm0
cvtsi2sdl -0x30c(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0x33ab7(%rip), %rsi     # 0x806c1
movb $0x1, %al
callq 0x1150
movq -0x1d8(%rbp), %rdi
movss -0x58(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x33ac8(%rip), %rsi     # 0x806f0
movb $0x1, %al
callq 0x1150
movq -0x1d8(%rbp), %rdi
callq 0x10a0
cmpq $0x0, -0x1f0(%rbp)
je 0x4cc51
movq -0x1f0(%rbp), %rdi
callq 0x10a0
movl $0x1, -0x388(%rbp)
movq -0x80(%rbp), %rax
movq %rax, %rsp
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop