// File: /workspace/github_c_makefile_star2_O0/ugobas[P]tnm/simulation.c
// Function: Simulate_ensemble
int Simulate_ensemble(int N_struct, float factor, char *name,
		      struct Para_simul Para_simul, float Mass_sqrt,
		      atom *atoms, int natoms,
		      struct axe *axe, int naxes,
		      struct bond *bonds,
		      struct residue *seq, int nres,
		      int N_diso, struct Normal_Mode NM,
		      struct Jacobian J, struct Reference Ref,
		      struct interaction *Int_list, int N_int,
		      struct interaction **Int_KB,
		      char *INT_TYPE, float s0, char *nameout,
		      int anhar)
{
  float E_thr=factor*factor*log(4*N_struct);
  float RMSD_mod_thr=0.02;
  float RMSD_min_fact=0.1;
  float sigma_thr=Mass_sqrt*RMSD_mod_thr/factor;
  float c_thr=Mass_sqrt*RMSD_mod_thr;
  float gasdev(long *idum);

  float *sigma2; int i, k;
  if(anhar){sigma2=NM.sigma2_anhar;}
  else{sigma2=NM.sigma2;}
  float sigma[NM.N];
  for(k=0; k<NM.N; k++){
    if(sigma2[k]>0){sigma[k]=sqrt(sigma2[k]);}
    else{sigma[k]=0;}
  }
  double RMSD_all=0;
  for(k=0; k<NM.N; k++){
    if(sigma[k]<sigma_thr)break;
    RMSD_all+=sigma2[k];
  }
  RMSD_all=sqrt(RMSD_all)/Mass_sqrt;
  float RMSD_thr=factor*RMSD_all*RMSD_min_fact;

  idum=randomgenerator();
  int n3=3*natoms;
  float mass[natoms]; for(i=0; i<natoms; i++)mass[i]=Mass(atoms+i);
  float coord_all_1[n3], coord_all[n3];
  Write_all_coord_atom(coord_all_1, atoms, natoms);

  // Open files
  char name_pdb[100], name_out[200];
  sprintf(name_pdb, "%s_%s_ensemble.pdb", nameout, name);
  FILE *file_pdb=fopen(name_pdb, "w");
  sprintf(name_out, "%s_%s_ensemble.dat", nameout, name);
  FILE *file_out=fopen(name_out, "w");
  fprintf(file_out, "#struct rmsd energy modes accept\n");
  if(anhar){
    fprintf(file_out, "# Omega2 corrected for anharmonicity\n");
    fprintf(file_pdb, "REMARK Omega2 corrected for anharmonicity\n");
  }

  double d_phi[naxes]; for(i=0; i<naxes; i++)d_phi[i]=0;
  float Ene_anhar,
    Ene_anhar_ini=Energy_anharmonic(coord_all_1,atoms,natoms,
				    seq,nres,Int_list,N_int,Int_KB,20,
				    axe, naxes, d_phi);
  // Write initial PDB
  //fprintf(file_pdb, "MODEL 0  RMSD from PDB= 0.0\n");
  //Print_PDB(file_pdb, atoms, natoms, coord_all_1, seq, 0, 0.00);
  fprintf(file_out, "%d %.3f %.3g 0 1\n", 0, 0.0, 0.0);

  int nsel=0, ndisc=0, ndisc_max=50, nconf=1;
  struct bond *bonds2=Set_bonds_topology(natoms, atoms, seq);
  //struct ali_atoms ali_a; Copy_ali(&ali_a, Ref);
  while(nsel<N_struct){
    if(ndisc>=ndisc_max)break;
    Set_bonds_measure(bonds, natoms, atoms);
    int nmode=0;
    for(k=0; k<NM.N; k++){
      // Change the structure with each relevant normal mode
      if(sigma[k]<sigma_thr)break;
      float c = gasdev(&idum)*factor*sigma[k], *mode=NM.Tors[k];
      if(c<c_thr)continue;
      nmode++;
      for(i=0; i<naxes; i++){d_phi[i]=c*mode[i];}
      Copy_bonds(bonds2, bonds, natoms);
      Build_up(bonds2, natoms, d_phi, naxes);
      Put_coord(coord_all, bonds2, natoms);
      Ene_anhar=Energy_anharmonic(coord_all,atoms,natoms,
				  seq,nres,Int_list,N_int,Int_KB,20,
				  axe, naxes, d_phi);
      Ene_anhar-= Ene_anhar_ini;
      if(Ene_anhar<=E_thr)Copy_bonds(bonds, bonds2, natoms); // accept
    }
    Put_coord(coord_all, bonds, natoms);
    float rmsd=rmsd_mclachlan_f(coord_all_1, coord_all, mass, natoms);
    Ene_anhar=Energy_anharmonic(coord_all,atoms,natoms,
				seq,nres,Int_list,N_int,Int_KB,20,
				axe, naxes, d_phi);
    Ene_anhar-= Ene_anhar_ini;
    fprintf(file_out, "%d %.3f %.3g %d", nconf, rmsd, Ene_anhar, nmode);
    nconf++;
    if(Ene_anhar>E_thr || rmsd<RMSD_thr){
      ndisc++; fprintf(file_out, " 0\n"); continue;
    }
    nsel++; fprintf(file_out, " 1\n");
    Print_PDB(file_pdb, atoms, natoms, coord_all, seq, nsel, rmsd);
  }
  printf("Distances printed in %s\n", name_out); fclose(file_out);
  if(nsel)printf("%d simulated structures printed in %s\n", nsel, name_pdb);
  fclose(file_pdb);
  Set_bonds_measure(bonds, natoms, atoms);
  //if(Ini_ch==0){Empty_tors(Diff_s); free(ali_sim.alignres); Ini_ch=1;}
  if(ndisc>=ndisc_max){
    printf("WARNING, amplitude factor= %.1f", factor);
    printf(" only %d over %d structure printed in ensemble\n",nsel,N_struct);
    printf("Rejection ratio= %.1f\n", (float)nconf/nsel-1);
    return(-1);
  }
  return(nsel);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x270, %rsp            # imm = 0x270
movl 0x1e0(%rbp), %eax
movq 0x1d8(%rbp), %rax
movq 0x1d0(%rbp), %rax
movq 0x1c8(%rbp), %rax
movl 0x1c0(%rbp), %eax
movq 0x1b8(%rbp), %rax
leaq 0x70(%rbp), %rax
movq %rax, -0x250(%rbp)
movl 0x68(%rbp), %eax
movl 0x60(%rbp), %eax
movq 0x58(%rbp), %rax
movq 0x50(%rbp), %rax
movl %edi, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
movq %rsi, -0x28(%rbp)
movss %xmm1, -0x2c(%rbp)
movq %rdx, -0x38(%rbp)
movl %ecx, -0x3c(%rbp)
movq %r8, -0x48(%rbp)
movl %r9d, -0x4c(%rbp)
movss %xmm2, -0x50(%rbp)
movss -0x1c(%rbp), %xmm0
mulss -0x1c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x248(%rbp)
movl -0x18(%rbp), %eax
shll $0x2, %eax
cvtsi2sd %eax, %xmm0
callq 0x10f0
movaps %xmm0, %xmm1
movsd -0x248(%rbp), %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x54(%rbp)
movss 0x35c07(%rip), %xmm0    # 0x80050
movss %xmm0, -0x58(%rbp)
movss 0x2bc46(%rip), %xmm0    # 0x7609c
movss %xmm0, -0x5c(%rbp)
movss -0x2c(%rbp), %xmm0
mulss -0x58(%rbp), %xmm0
divss -0x1c(%rbp), %xmm0
movss %xmm0, -0x60(%rbp)
movss -0x2c(%rbp), %xmm0
mulss -0x58(%rbp), %xmm0
movss %xmm0, -0x64(%rbp)
cmpl $0x0, 0x1e0(%rbp)
je 0x4a49b
movq -0x250(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x70(%rbp)
jmp 0x4a4aa
movq -0x250(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x250(%rbp), %rax
movl (%rax), %eax
movq %rsp, %rcx
movq %rcx, -0x80(%rbp)
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x258(%rbp)
movq %rcx, %rsp
movq %rax, -0x88(%rbp)
movl $0x0, -0x78(%rbp)
movq -0x250(%rbp), %rcx
movl -0x78(%rbp), %eax
cmpl (%rcx), %eax
jge 0x4a553
movq -0x70(%rbp), %rax
movslq -0x78(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x4a533
movq -0x70(%rbp), %rax
movslq -0x78(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x1220
movq -0x258(%rbp), %rax
cvtsd2ss %xmm0, %xmm0
movslq -0x78(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
jmp 0x4a546
movq -0x258(%rbp), %rax
movslq -0x78(%rbp), %rcx
xorps %xmm0, %xmm0
movss %xmm0, (%rax,%rcx,4)
jmp 0x4a548
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x4a4e4
xorps %xmm0, %xmm0
movsd %xmm0, -0x90(%rbp)
movl $0x0, -0x78(%rbp)
movq -0x250(%rbp), %rcx
movl -0x78(%rbp), %eax
cmpl (%rcx), %eax
jge 0x4a5bb
movq -0x258(%rbp), %rax
movslq -0x78(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
movss -0x60(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x4a58f
jmp 0x4a5bb
movq -0x70(%rbp), %rax
movslq -0x78(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
addsd -0x90(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x4a565
movsd -0x90(%rbp), %xmm0
callq 0x1220
movss -0x2c(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x90(%rbp)
movss -0x1c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd -0x90(%rbp), %xmm1
mulsd %xmm1, %xmm0
movss -0x5c(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x94(%rbp)
callq 0x49ce0
movq %rax, 0x51eb9(%rip)     # 0x9c4d0
movl -0x3c(%rbp), %ecx
movl %ecx, %eax
leal (%rax,%rax,2), %eax
movl %eax, -0x98(%rbp)
movl -0x3c(%rbp), %eax
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x260(%rbp)
movq %rcx, %rsp
movq %rax, -0xa0(%rbp)
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x4a689
movq -0x38(%rbp), %rdi
movslq -0x74(%rbp), %rax
imulq $0x70, %rax, %rax
addq %rax, %rdi
callq 0x351c0
movq -0x260(%rbp), %rax
movslq -0x74(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x4a652
movl -0x98(%rbp), %eax
leaq 0xf(,%rax,4), %rcx
andq $-0x10, %rcx
movq %rsp, %rdi
subq %rcx, %rdi
movq %rdi, -0x270(%rbp)
movq %rdi, %rsp
movq %rax, -0xa8(%rbp)
movl -0x98(%rbp), %eax
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x268(%rbp)
movq %rcx, %rsp
movq %rax, -0xb0(%rbp)
movq -0x38(%rbp), %rsi
movl -0x3c(%rbp), %edx
callq 0x4a300
leaq -0x120(%rbp), %rdi
movq 0x1d8(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0x35adc(%rip), %rsi     # 0x801dc
movb $0x0, %al
callq 0x1200
leaq -0x120(%rbp), %rdi
leaq 0x31c5d(%rip), %rsi     # 0x7c372
callq 0x11b0
movq %rax, -0x1f8(%rbp)
leaq -0x1f0(%rbp), %rdi
movq 0x1d8(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0x35ab5(%rip), %rsi     # 0x801ef
movb $0x0, %al
callq 0x1200
leaq -0x1f0(%rbp), %rdi
leaq 0x31c23(%rip), %rsi     # 0x7c372
callq 0x11b0
movq %rax, -0x200(%rbp)
movq -0x200(%rbp), %rdi
leaq 0x35a99(%rip), %rsi     # 0x80202
movb $0x0, %al
callq 0x1150
cmpl $0x0, 0x1e0(%rbp)
je 0x4a7a3
movq -0x200(%rbp), %rdi
leaq 0x35a9d(%rip), %rsi     # 0x80224
movb $0x0, %al
callq 0x1150
movq -0x1f8(%rbp), %rdi
leaq 0x35aae(%rip), %rsi     # 0x8024a
movb $0x0, %al
callq 0x1150
movl -0x4c(%rbp), %eax
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x278(%rbp)
movq %rcx, %rsp
movq %rax, -0x208(%rbp)
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x4a7f6
movq -0x278(%rbp), %rax
movslq -0x74(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x4a7d0
movq -0x278(%rbp), %rax
movq -0x270(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x3c(%rbp), %edx
movq 0x58(%rbp), %rcx
movl 0x60(%rbp), %r8d
movq 0x1b8(%rbp), %r9
movl 0x1c0(%rbp), %r14d
movq 0x1c8(%rbp), %rbx
movq -0x48(%rbp), %r11
movl -0x4c(%rbp), %r10d
subq $0x30, %rsp
movl %r14d, (%rsp)
movq %rbx, 0x8(%rsp)
movl $0x14, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movl %r10d, 0x20(%rsp)
movq %rax, 0x28(%rsp)
callq 0x25680
addq $0x30, %rsp
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x210(%rbp)
movq -0x200(%rbp), %rdi
leaq 0x359fe(%rip), %rsi     # 0x80275
xorl %edx, %edx
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
movb $0x2, %al
callq 0x1150
movl $0x0, -0x214(%rbp)
movl $0x0, -0x218(%rbp)
movl $0x32, -0x21c(%rbp)
movl $0x1, -0x220(%rbp)
movl -0x3c(%rbp), %edi
movq -0x38(%rbp), %rsi
movq 0x58(%rbp), %rdx
callq 0x1ce20
movq %rax, -0x228(%rbp)
movl -0x214(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x4aca3
movl -0x218(%rbp), %eax
cmpl -0x21c(%rbp), %eax
jl 0x4a8e7
jmp 0x4aca3
movq 0x50(%rbp), %rdi
movl -0x3c(%rbp), %esi
movq -0x38(%rbp), %rdx
callq 0x1bf00
movl $0x0, -0x22c(%rbp)
movl $0x0, -0x78(%rbp)
movq -0x250(%rbp), %rcx
movl -0x78(%rbp), %eax
cmpl (%rcx), %eax
jge 0x4aaee
movq -0x258(%rbp), %rax
movslq -0x78(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
movss -0x60(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x4a939
jmp 0x4aaee
leaq 0x51b90(%rip), %rdi     # 0x9c4d0
callq 0x75410
movq -0x258(%rbp), %rcx
movq -0x250(%rbp), %rax
mulss -0x1c(%rbp), %xmm0
movslq -0x78(%rbp), %rdx
mulss (%rcx,%rdx,4), %xmm0
movss %xmm0, -0x230(%rbp)
movq 0x40(%rax), %rax
movslq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x238(%rbp)
movss -0x230(%rbp), %xmm1
movss -0x64(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x4a993
jmp 0x4aae0
movl -0x22c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x22c(%rbp)
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x4a9e8
movq -0x278(%rbp), %rax
movss -0x230(%rbp), %xmm0
movq -0x238(%rbp), %rcx
movslq -0x74(%rbp), %rdx
mulss (%rcx,%rdx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x74(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x4a9a9
movq -0x228(%rbp), %rdi
movq 0x50(%rbp), %rsi
movl -0x3c(%rbp), %edx
callq 0x4adb0
movq -0x278(%rbp), %rdx
movq -0x228(%rbp), %rdi
movl -0x3c(%rbp), %esi
movl -0x4c(%rbp), %ecx
callq 0x1c4f0
movq -0x268(%rbp), %rdi
movq -0x228(%rbp), %rsi
movl -0x3c(%rbp), %edx
callq 0x49770
movq -0x268(%rbp), %rdi
movq -0x278(%rbp), %rax
movq -0x38(%rbp), %rsi
movl -0x3c(%rbp), %edx
movq 0x58(%rbp), %rcx
movl 0x60(%rbp), %r8d
movq 0x1b8(%rbp), %r9
movl 0x1c0(%rbp), %r14d
movq 0x1c8(%rbp), %rbx
movq -0x48(%rbp), %r11
movl -0x4c(%rbp), %r10d
subq $0x30, %rsp
movl %r14d, (%rsp)
movq %rbx, 0x8(%rsp)
movl $0x14, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movl %r10d, 0x20(%rsp)
movq %rax, 0x28(%rsp)
callq 0x25680
addq $0x30, %rsp
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x20c(%rbp)
movss -0x210(%rbp), %xmm1
movss -0x20c(%rbp), %xmm0
subss %xmm1, %xmm0
movss %xmm0, -0x20c(%rbp)
movss -0x20c(%rbp), %xmm1
movss -0x54(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jb 0x4aade
movq 0x50(%rbp), %rdi
movq -0x228(%rbp), %rsi
movl -0x3c(%rbp), %edx
callq 0x4adb0
jmp 0x4aae0
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x4a908
movq -0x268(%rbp), %rdi
movq 0x50(%rbp), %rsi
movl -0x3c(%rbp), %edx
callq 0x49770
movq -0x270(%rbp), %rdi
movq -0x260(%rbp), %rdx
movq -0x268(%rbp), %rsi
movl -0x3c(%rbp), %ecx
callq 0x70af0
movq -0x268(%rbp), %rdi
movq -0x278(%rbp), %rax
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x23c(%rbp)
movq -0x38(%rbp), %rsi
movl -0x3c(%rbp), %edx
movq 0x58(%rbp), %rcx
movl 0x60(%rbp), %r8d
movq 0x1b8(%rbp), %r9
movl 0x1c0(%rbp), %r14d
movq 0x1c8(%rbp), %rbx
movq -0x48(%rbp), %r11
movl -0x4c(%rbp), %r10d
subq $0x30, %rsp
movl %r14d, (%rsp)
movq %rbx, 0x8(%rsp)
movl $0x14, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movl %r10d, 0x20(%rsp)
movq %rax, 0x28(%rsp)
callq 0x25680
addq $0x30, %rsp
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x20c(%rbp)
movss -0x210(%rbp), %xmm1
movss -0x20c(%rbp), %xmm0
subss %xmm1, %xmm0
movss %xmm0, -0x20c(%rbp)
movq -0x200(%rbp), %rdi
movl -0x220(%rbp), %edx
movss -0x23c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movss -0x20c(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
movl -0x22c(%rbp), %ecx
leaq 0x3569c(%rip), %rsi     # 0x80287
movb $0x2, %al
callq 0x1150
movl -0x220(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x220(%rbp)
movss -0x20c(%rbp), %xmm0
ucomiss -0x54(%rbp), %xmm0
ja 0x4ac24
movss -0x23c(%rbp), %xmm1
movss -0x94(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x4ac4d
movl -0x218(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x218(%rbp)
movq -0x200(%rbp), %rdi
leaq 0x35656(%rip), %rsi     # 0x80297
movb $0x0, %al
callq 0x1150
jmp 0x4a8c5
movl -0x214(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x214(%rbp)
movq -0x200(%rbp), %rdi
leaq 0x35619(%rip), %rsi     # 0x80283
movb $0x0, %al
callq 0x1150
movq -0x268(%rbp), %rcx
movq -0x1f8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x3c(%rbp), %edx
movq 0x58(%rbp), %r8
movl -0x214(%rbp), %r9d
movss -0x23c(%rbp), %xmm0
callq 0x49a60
jmp 0x4a8c5
leaq -0x1f0(%rbp), %rsi
leaq 0x355ea(%rip), %rdi     # 0x8029b
movb $0x0, %al
callq 0x10d0
movq -0x200(%rbp), %rdi
callq 0x10a0
cmpl $0x0, -0x214(%rbp)
je 0x4ace8
movl -0x214(%rbp), %esi
leaq -0x120(%rbp), %rdx
leaq 0x355d3(%rip), %rdi     # 0x802b4
movb $0x0, %al
callq 0x10d0
movq -0x1f8(%rbp), %rdi
callq 0x10a0
movq 0x50(%rbp), %rdi
movl -0x3c(%rbp), %esi
movq -0x38(%rbp), %rdx
callq 0x1bf00
movl -0x218(%rbp), %eax
cmpl -0x21c(%rbp), %eax
jl 0x4ad85
movss -0x1c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x355b9(%rip), %rdi     # 0x802db
movb $0x1, %al
callq 0x10d0
movl -0x214(%rbp), %esi
movl -0x18(%rbp), %edx
leaq 0x355c2(%rip), %rdi     # 0x802fb
movb $0x0, %al
callq 0x10d0
cvtsi2ssl -0x220(%rbp), %xmm0
cvtsi2ssl -0x214(%rbp), %xmm1
divss %xmm1, %xmm0
movss 0x2b334(%rip), %xmm1    # 0x76090
subss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x355c0(%rip), %rdi     # 0x8032b
movb $0x1, %al
callq 0x10d0
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x240(%rbp)
jmp 0x4ad98
movl -0x214(%rbp), %eax
movl %eax, -0x14(%rbp)
movl $0x1, -0x240(%rbp)
movq -0x80(%rbp), %rax
movq %rax, %rsp
movl -0x14(%rbp), %eax
leaq -0x10(%rbp), %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax,%rax)