// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/simulation.c
// Function: Torsional_confchange_1angle_old
void Torsional_confchange_1angle_old(struct bond *bonds, int natoms1,
				     int naxes, struct Reference Ref1,
				     float *coord_ref_1, float *coord_ref_2,
				     int N_Cart, atom *atoms1,FILE *file_rmsd,
				     struct Para_simul Para_simul)
{
  printf("Changing %d internal coordinates one by one\n", naxes);
  fprintf(file_rmsd, "# Changing %d internal coordinates one by one\n",naxes);

  float coord_all[3*natoms1];
  Put_coord(coord_all, bonds, natoms1);
  struct bond bonds2[natoms1];
  int N_ref=Ref1.N_ref;
  float coord1[N_Cart], coord2[N_Cart];
  Write_ref_coord(coord1, N_ref, coord_all, Ref1.atom_num);
  Write_ref_coord(coord2, N_ref, coord_all, Ref1.atom_num);
  float *coord_new=coord1, *coord_old=coord2;
  
  float *mass_ref=Ref1.mass_atom;
  float RMSD_opt=rmsd_mclachlan_f(coord_ref_2, coord_new, mass_ref, N_ref);
  float RMSD_kf, RMSD_ki, RMSD_step, Ene;

  for(int iter=0; iter<Para_simul.NSTEPS; iter++){ //ITER_MAX_1
    
    int i, j;
    double diff_tors[naxes]; for(j=0; j<naxes; j++)diff_tors[j]=0;
    float RMSD_min=10000000;
    int i_min=-1, dir_min=0, accept=1;

    for(i=0; i<naxes; i++){

      // Change internal coordinate i in positive direction
      diff_tors[i]=Para_simul.ANGLE;
      Copy_bonds(bonds2, bonds, natoms1);
      Build_up(bonds2, natoms1, diff_tors, naxes);
      Put_coord(coord_all, bonds2, natoms1);
      Write_ref_coord(coord_new, N_ref, coord_all, Ref1.atom_num);
      RMSD_kf=rmsd_mclachlan_f(coord_ref_2, coord_new, mass_ref, N_ref);
      if(RMSD_kf<RMSD_min){i_min=i; dir_min=1; RMSD_min=RMSD_kf;}

      // Change internal coordinate i in negative direction
      diff_tors[i]=-Para_simul.ANGLE;
      Copy_bonds(bonds2, bonds, natoms1);
      Build_up(bonds2, natoms1, diff_tors, naxes);
      Put_coord(coord_all, bonds2, natoms1);
      Write_ref_coord(coord_new, N_ref, coord_all, Ref1.atom_num);
      RMSD_kf=rmsd_mclachlan_f(coord_ref_2, coord_new, mass_ref, N_ref);
      if(RMSD_kf<RMSD_min){i_min=i; dir_min=-1; RMSD_min=RMSD_kf;}

      diff_tors[i]=0;
    }

    if(i_min<0){
      printf("\nERROR, internal coordinate %d does not exist\n", i_min);
      return;
    }

    float d_max=Para_simul.ANGLE;
    RMSD_kf=1000;
    while(1){
      diff_tors[i_min]=dir_min*d_max;
      Copy_bonds(bonds2, bonds, natoms1);
      Build_up(bonds2, natoms1, diff_tors, naxes);
      Put_coord(coord_all, bonds2, natoms1);
      Write_ref_coord(coord_new, N_ref, coord_all, Ref1.atom_num);
      RMSD_kf=rmsd_mclachlan_f(coord_ref_2, coord_new, mass_ref, N_ref);
      RMSD_step=rmsd_mclachlan_f(coord_old, coord_new, mass_ref, N_ref);
      RMSD_ki=rmsd_mclachlan_f(coord_ref_1, coord_new, mass_ref, N_ref);
      printf("iter= %d RMSD_kf= %.3f step= %.3f angle= %.2g\n",
	     iter+1, RMSD_kf, RMSD_step, d_max);
      Ene=Energy_clashes(coord_all, natoms1);
      fprintf(file_rmsd, "%.3f\t%.3f\t%.3f\t%.2g\t%.2g\t%d\n",
	      RMSD_ki, RMSD_kf, RMSD_step, d_max, Ene, accept);
      fflush(file_rmsd);
      if(isnan(RMSD_step)||isnan(RMSD_kf)||isnan(RMSD_ki))return;

      if(RMSD_kf < RMSD_opt){
	if(RMSD_step<Para_simul.STEP_MAX){
	  RMSD_opt=RMSD_kf; accept=1;
	  Copy_bonds(bonds, bonds2, natoms1);
	  break;
	}else{
	  accept=0; d_max*=0.98*(Para_simul.STEP_MAX/RMSD_step);
	  if(RMSD_step<Para_simul.STEP_MIN)break;
	}
      }else{
	if(RMSD_step<Para_simul.STEP_MIN)break;
	accept=0; d_max/=2;  // Reduce step
	printf("Reducing max. step to %.2g \n", d_max);
      }
      if(d_max<0.0001)break;
    }

    if((accept==0)||(RMSD_kf < RMSD_TOL))break;


  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %r9d, -0x2c(%rbp)
movq %r8, -0xa8(%rbp)
movq %rcx, -0xf0(%rbp)
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r13
movq 0x48(%rbp), %r14
leaq 0x10(%rbp), %r12
leaq 0x243dc(%rip), %rdi     # 0x5b52d
movl %edx, %esi
xorl %eax, %eax
callq 0x20f0
leaq 0x243ca(%rip), %rsi     # 0x5b52b
movq %r14, %rdi
movl %ebx, -0x30(%rbp)
movl %ebx, %edx
xorl %eax, %eax
callq 0x2190
leal (%r15,%r15,2), %eax
leaq 0xf(,%rax,4), %rax
andq $-0x10, %rax
movq %rsp, %r14
subq %rax, %r14
movq %r14, %rsp
movl %r15d, %edi
movq %r15, -0x40(%rbp)
testl %r15d, %r15d
jle 0x371d8
leaq 0x8(%r13), %rax
xorl %ecx, %ecx
movq %r14, %rdx
leaq (%rcx,%rcx,2), %rsi
shlq $0x6, %rsi
cmpl $0x0, 0x20(%r13,%rsi)
js 0x371d8
xorl %esi, %esi
xorps %xmm0, %xmm0
cvtsd2ss (%rax,%rsi,2), %xmm0
movss %xmm0, (%rdx,%rsi)
addq $0x4, %rsi
cmpq $0xc, %rsi
jne 0x371b0
incq %rcx
addq $0xc0, %rax
addq %rsi, %rdx
cmpq %rdi, %rcx
jne 0x3719e
leaq 0x50(%rbp), %r15
movq %rsp, %rbx
movq %rdi, %rax
shlq $0x6, %rax
leaq (%rax,%rax,2), %rax
subq %rax, %rbx
movq %rbx, %rsp
movq %r12, %r9
movslq (%r12), %rcx
movl -0x2c(%rbp), %eax
movq %rsp, %rdx
leaq 0xf(,%rax,4), %rax
andq $-0x10, %rax
subq %rax, %rdx
movq %rdx, -0x60(%rbp)
movq %rdx, %rsp
movq %rsp, %rdx
subq %rax, %rdx
movq %rdx, -0xd0(%rbp)
movq %rdx, %rsp
movq 0x28(%r12), %r12
testq %rcx, %rcx
jle 0x3729e
xorl %eax, %eax
movq -0x60(%rbp), %r8
movl (%r12,%rax,4), %edx
leal (%rdx,%rdx,2), %edx
movslq %edx, %rdx
leaq (%r14,%rdx,4), %rsi
xorl %edx, %edx
movss (%rsi,%rdx), %xmm0
movss %xmm0, (%r8,%rdx)
addq $0x4, %rdx
cmpl $0xc, %edx
jne 0x37243
incq %rax
addq %rdx, %r8
cmpq %rcx, %rax
jne 0x37233
testl %ecx, %ecx
jle 0x3729e
xorl %eax, %eax
movq -0xd0(%rbp), %r8
movl (%r12,%rax,4), %edx
leal (%rdx,%rdx,2), %edx
movslq %edx, %rdx
leaq (%r14,%rdx,4), %rsi
xorl %edx, %edx
movss (%rsi,%rdx), %xmm0
movss %xmm0, (%r8,%rdx)
addq $0x4, %rdx
cmpl $0xc, %edx
jne 0x3727f
incq %rax
addq %rdx, %r8
cmpq %rcx, %rax
jne 0x3726f
movq %rdi, -0xc0(%rbp)
movq 0x10(%r9), %rdx
movq -0xa8(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq %rdx, -0x88(%rbp)
movq %rcx, -0x58(%rbp)
callq 0x4e010
movl 0x10(%r15), %eax
movl %eax, -0xc4(%rbp)
testl %eax, %eax
movq -0x40(%rbp), %rcx
jle 0x37b3e
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x6c(%rbp)
movl -0x30(%rbp), %eax
leaq (,%rax,8), %rdx
movq %rdx, -0xd8(%rbp)
leaq 0x8(%rbx), %rdx
movq %rdx, -0xb8(%rbp)
movq %rax, -0x110(%rbp)
leaq 0xf(,%rax,8), %rax
andq $-0x10, %rax
movq %rax, -0xe0(%rbp)
movq $0x0, -0xb0(%rbp)
movq %rcx, %r15
movq %r14, -0x78(%rbp)
movq %r12, -0x80(%rbp)
movq %rsp, -0xe8(%rbp)
movq %rsp, %rdx
subq -0xe0(%rbp), %rdx
movq %rdx, %rsp
cmpl $0x0, -0x30(%rbp)
movq %rdx, -0x68(%rbp)
jle 0x37367
movq %rdx, %rdi
xorl %esi, %esi
movq -0xd8(%rbp), %rdx
callq 0x2110
movq -0x68(%rbp), %rdx
movq -0x40(%rbp), %rcx
cmpl $0x0, -0x30(%rbp)
jle 0x376d8
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edi, %edi
xorl %eax, %eax
movss 0x23a66(%rip), %xmm0    # 0x5ade8
movss %xmm0, -0x2c(%rbp)
movl %eax, -0x50(%rbp)
movl %esi, -0xa0(%rbp)
leaq 0x50(%rbp), %rax
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rax), %xmm0
movq %rdi, -0x90(%rbp)
movsd %xmm0, (%rdx,%rdi,8)
movq $0x0, 0x28(%rbx)
testl %ecx, %ecx
jle 0x3747d
xorl %r14d, %r14d
xorl %r12d, %r12d
leaq (%r14,%r13), %rsi
leaq (%rbx,%r14), %rdi
movl $0xc0, %edx
callq 0x21a0
testl %r12d, %r12d
je 0x373f9
movq 0x28(%r13,%r14), %rax
subq %r13, %rax
shrq $0x6, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
cltq
leaq (%rax,%rax,2), %rax
shlq $0x6, %rax
addq %rbx, %rax
movq %rax, 0x28(%rbx,%r14)
incl %r12d
addq $0xc0, %r14
cmpl %r12d, %r15d
jne 0x373be
movq %rbx, %rdi
movq %r15, %r14
movl %r14d, %esi
movq -0x68(%rbp), %rdx
movl -0x30(%rbp), %ecx
callq 0x154bb
testl %r14d, %r14d
movq -0x78(%rbp), %r14
movq -0xc0(%rbp), %rdi
movq -0x58(%rbp), %rcx
movq -0x80(%rbp), %r12
jle 0x3748e
movq -0xb8(%rbp), %rax
xorl %r8d, %r8d
movq %r14, %rdx
leaq (%r8,%r8,2), %rsi
shlq $0x6, %rsi
cmpl $0x0, 0x20(%rbx,%rsi)
js 0x3748e
xorl %esi, %esi
xorps %xmm0, %xmm0
cvtsd2ss (%rax,%rsi,2), %xmm0
movss %xmm0, (%rdx,%rsi)
addq $0x4, %rsi
cmpq $0xc, %rsi
jne 0x37453
incq %r8
addq $0xc0, %rax
addq %rsi, %rdx
cmpq %rdi, %r8
jne 0x37442
jmp 0x3748e
movq %rbx, %rdi
movl %ecx, %esi
movl -0x30(%rbp), %ecx
callq 0x154bb
movq -0x58(%rbp), %rcx
testl %ecx, %ecx
jle 0x374c6
xorl %eax, %eax
movq -0x60(%rbp), %rdi
movl (%r12,%rax,4), %edx
leal (%rdx,%rdx,2), %edx
movslq %edx, %rdx
leaq (%r14,%rdx,4), %rsi
xorl %edx, %edx
movss (%rsi,%rdx), %xmm0
movss %xmm0, (%rdi,%rdx)
addq $0x4, %rdx
cmpl $0xc, %edx
jne 0x374a8
incq %rax
addq %rdx, %rdi
cmpq %rcx, %rax
jne 0x37498
movq -0xa8(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq -0x88(%rbp), %rdx
callq 0x4e010
xorps %xmm1, %xmm1
cvtsd2ss %xmm0, %xmm1
movss -0x2c(%rbp), %xmm0
movss %xmm1, -0x44(%rbp)
ucomiss %xmm1, %xmm0
movl $0x1, %eax
movl -0x50(%rbp), %ecx
cmoval %eax, %ecx
movl %ecx, -0x50(%rbp)
leaq 0x50(%rbp), %rax
movss 0xc(%rax), %xmm0
xorps 0x1f421(%rip), %xmm0    # 0x56930
cvtss2sd %xmm0, %xmm0
movq -0x68(%rbp), %rdx
movq -0x90(%rbp), %rax
movsd %xmm0, (%rdx,%rax,8)
movq $0x0, 0x28(%rbx)
movq -0x40(%rbp), %rsi
testl %esi, %esi
jle 0x375fc
xorl %r14d, %r14d
xorl %r12d, %r12d
leaq (%r14,%r13), %rsi
leaq (%rbx,%r14), %rdi
movl $0xc0, %edx
callq 0x21a0
testl %r12d, %r12d
je 0x37578
movq 0x28(%r13,%r14), %rax
subq %r13, %rax
shrq $0x6, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
cltq
leaq (%rax,%rax,2), %rax
shlq $0x6, %rax
addq %rbx, %rax
movq %rax, 0x28(%rbx,%r14)
incl %r12d
addq $0xc0, %r14
cmpl %r12d, %r15d
jne 0x3753d
movq %rbx, %rdi
movq %r15, %r14
movl %r14d, %esi
movq -0x68(%rbp), %rdx
movl -0x30(%rbp), %ecx
callq 0x154bb
testl %r14d, %r14d
movq -0x78(%rbp), %r14
movq -0xc0(%rbp), %rdi
movq -0x58(%rbp), %rcx
movq -0x80(%rbp), %r12
jle 0x3760b
movq -0xb8(%rbp), %rax
xorl %r8d, %r8d
movq %r14, %rdx
leaq (%r8,%r8,2), %rsi
shlq $0x6, %rsi
cmpl $0x0, 0x20(%rbx,%rsi)
js 0x3760b
xorl %esi, %esi
xorps %xmm0, %xmm0
cvtsd2ss (%rax,%rsi,2), %xmm0
movss %xmm0, (%rdx,%rsi)
addq $0x4, %rsi
cmpq $0xc, %rsi
jne 0x375d2
incq %r8
addq $0xc0, %rax
addq %rsi, %rdx
cmpq %rdi, %r8
jne 0x375c1
jmp 0x3760b
movq %rbx, %rdi
movl -0x30(%rbp), %ecx
callq 0x154bb
movq -0x58(%rbp), %rcx
testl %ecx, %ecx
jle 0x37643
xorl %eax, %eax
movq -0x60(%rbp), %rdi
movl (%r12,%rax,4), %edx
leal (%rdx,%rdx,2), %edx
movslq %edx, %rdx
leaq (%r14,%rdx,4), %rsi
xorl %edx, %edx
movss (%rsi,%rdx), %xmm0
movss %xmm0, (%rdi,%rdx)
addq $0x4, %rdx
cmpl $0xc, %edx
jne 0x37625
incq %rax
addq %rdx, %rdi
cmpq %rcx, %rax
jne 0x37615
movss -0x44(%rbp), %xmm0
minss -0x2c(%rbp), %xmm0
movss %xmm0, -0x34(%rbp)
movq -0xa8(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq -0x88(%rbp), %rdx
callq 0x4e010
cvtsd2ss %xmm0, %xmm0
movss -0x34(%rbp), %xmm1
ucomiss %xmm0, %xmm1
movl -0xa0(%rbp), %esi
movq -0x90(%rbp), %rdi
cmoval %edi, %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl -0x50(%rbp), %ecx
cmoval %eax, %ecx
movl %ecx, %eax
movss -0x2c(%rbp), %xmm2
ucomiss -0x44(%rbp), %xmm2
minss %xmm1, %xmm0
cmoval %edi, %esi
movq -0x68(%rbp), %rdx
movq $0x0, (%rdx,%rdi,8)
incq %rdi
movss %xmm0, -0x2c(%rbp)
cmpq -0x110(%rbp), %rdi
movq -0x40(%rbp), %rcx
jne 0x37387
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x94(%rbp)
jmp 0x376e8
xorps %xmm0, %xmm0
movss %xmm0, -0x94(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
testl %esi, %esi
js 0x37a4f
leaq 0x50(%rbp), %rax
movss 0xc(%rax), %xmm2
movl %esi, %eax
movq %rax, -0xf8(%rbp)
movq -0xb0(%rbp), %rax
incl %eax
movl %eax, -0xc8(%rbp)
movl $0x1, -0x34(%rbp)
movss %xmm2, -0x50(%rbp)
movaps %xmm2, %xmm0
mulss -0x94(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0xf8(%rbp), %rax
movsd %xmm0, (%rdx,%rax,8)
movq $0x0, 0x28(%rbx)
testl %ecx, %ecx
jle 0x3780d
xorl %r14d, %r14d
xorl %r12d, %r12d
leaq (%r14,%r13), %rsi
leaq (%rbx,%r14), %rdi
movl $0xc0, %edx
callq 0x21a0
testl %r12d, %r12d
je 0x37789
movq 0x28(%r13,%r14), %rax
subq %r13, %rax
shrq $0x6, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
cltq
leaq (%rax,%rax,2), %rax
shlq $0x6, %rax
addq %rbx, %rax
movq %rax, 0x28(%rbx,%r14)
incl %r12d
addq $0xc0, %r14
cmpl %r12d, %r15d
jne 0x3774e
movq %rbx, %rdi
movq %r15, %r14
movl %r14d, %esi
movq -0x68(%rbp), %rdx
movl -0x30(%rbp), %ecx
callq 0x154bb
testl %r14d, %r14d
movq -0x78(%rbp), %r14
movq -0xc0(%rbp), %rdi
movq -0x58(%rbp), %rcx
movq -0x80(%rbp), %r12
jle 0x3781e
movq -0xb8(%rbp), %rax
xorl %r8d, %r8d
movq %r14, %rdx
leaq (%r8,%r8,2), %rsi
shlq $0x6, %rsi
cmpl $0x0, 0x20(%rbx,%rsi)
js 0x3781e
xorl %esi, %esi
xorps %xmm0, %xmm0
cvtsd2ss (%rax,%rsi,2), %xmm0
movss %xmm0, (%rdx,%rsi)
addq $0x4, %rsi
cmpq $0xc, %rsi
jne 0x377e3
incq %r8
addq $0xc0, %rax
addq %rsi, %rdx
cmpq %rdi, %r8
jne 0x377d2
jmp 0x3781e
movq %rbx, %rdi
movl %ecx, %esi
movl -0x30(%rbp), %ecx
callq 0x154bb
movq -0x58(%rbp), %rcx
testl %ecx, %ecx
jle 0x37856
xorl %eax, %eax
movq -0x60(%rbp), %rdi
movl (%r12,%rax,4), %edx
leal (%rdx,%rdx,2), %edx
movslq %edx, %rdx
leaq (%r14,%rdx,4), %rsi
xorl %edx, %edx
movss (%rsi,%rdx), %xmm0
movss %xmm0, (%rdi,%rdx)
addq $0x4, %rdx
cmpl $0xc, %edx
jne 0x37838
incq %rax
addq %rdx, %rdi
cmpq %rcx, %rax
jne 0x37828
movq -0xa8(%rbp), %rdi
movq -0x60(%rbp), %r12
movq %r12, %rsi
movq -0x88(%rbp), %rdx
callq 0x4e010
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x2c(%rbp)
movq -0xd0(%rbp), %rdi
movq %r12, %rsi
movq -0x88(%rbp), %rdx
movq -0x58(%rbp), %rcx
callq 0x4e010
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x90(%rbp)
movq -0xf0(%rbp), %rdi
movq %r12, %rsi
movq -0x88(%rbp), %rdx
movq -0x58(%rbp), %rcx
callq 0x4e010
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x44(%rbp)
xorps %xmm0, %xmm0
cvtss2sd -0x2c(%rbp), %xmm0
movsd %xmm0, -0x108(%rbp)
xorps %xmm1, %xmm1
cvtss2sd -0x90(%rbp), %xmm1
movsd %xmm1, -0x100(%rbp)
xorps %xmm2, %xmm2
cvtss2sd -0x50(%rbp), %xmm2
movsd %xmm2, -0xa0(%rbp)
leaq 0x23c5e(%rip), %rdi     # 0x5b55a
movl -0xc8(%rbp), %esi
movb $0x3, %al
callq 0x20f0
movq %r14, %rdi
movq -0x40(%rbp), %rsi
callq 0x32b71
xorps %xmm1, %xmm1
cvtss2sd -0x44(%rbp), %xmm1
cvtss2sd %xmm0, %xmm4
movq 0x48(%rbp), %r14
movq %r14, %rdi
leaq 0x23903(%rip), %rsi     # 0x5b232
movaps %xmm1, %xmm0
movsd -0x108(%rbp), %xmm1
movsd -0x100(%rbp), %xmm2
movsd -0xa0(%rbp), %xmm3
movl -0x34(%rbp), %edx
movb $0x5, %al
callq 0x2190
movq %r14, %rdi
callq 0x21e0
movss -0x90(%rbp), %xmm2
ucomiss %xmm2, %xmm2
movb $0x1, %al
jp 0x37b29
movss -0x2c(%rbp), %xmm3
ucomiss %xmm3, %xmm3
movq -0x78(%rbp), %r14
movq -0x80(%rbp), %r12
jp 0x37b31
movss -0x44(%rbp), %xmm0
ucomiss %xmm0, %xmm0
movq -0x40(%rbp), %rcx
jp 0x37b00
movss -0x6c(%rbp), %xmm0
leaq 0x50(%rbp), %rax
ucomiss %xmm3, %xmm0
jbe 0x379e6
movss 0x4(%rax), %xmm0
ucomiss %xmm2, %xmm0
movq -0x68(%rbp), %rdx
ja 0x37a68
divss %xmm2, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0x233f1(%rip), %xmm0    # 0x5adb8
movss 0x8(%rax), %xmm1
ucomiss %xmm2, %xmm1
ja 0x37ae2
mulsd -0xa0(%rbp), %xmm0
xorps %xmm2, %xmm2
cvtsd2ss %xmm0, %xmm2
jmp 0x37a2a
movss 0x8(%rax), %xmm0
ucomiss %xmm2, %xmm0
movss -0x50(%rbp), %xmm0
ja 0x37ae9
mulss 0x1e17b(%rip), %xmm0    # 0x55b7c
movss %xmm0, -0x50(%rbp)
cvtss2sd %xmm0, %xmm0
leaq 0x23b78(%rip), %rdi     # 0x5b589
movb $0x1, %al
callq 0x20f0
movss -0x2c(%rbp), %xmm3
movss -0x50(%rbp), %xmm2
movq -0x68(%rbp), %rdx
movq -0x40(%rbp), %rcx
xorps %xmm0, %xmm0
cvtss2sd %xmm2, %xmm0
movl $0x0, -0x34(%rbp)
movsd 0x1e140(%rip), %xmm1    # 0x55b80
ucomisd %xmm0, %xmm1
jbe 0x37718
jmp 0x37ae9
leaq 0x23aa6(%rip), %rdi     # 0x5b4fc
xorl %eax, %eax
callq 0x20f0
movq -0x40(%rbp), %rcx
movb $0x1, %al
jmp 0x37b00
xorl %edx, %edx
movq $0x0, 0x28(%r13)
testl %ecx, %ecx
jle 0x37b37
xorl %r14d, %r14d
movq %rdx, -0x50(%rbp)
leaq (%rbx,%r14), %rsi
leaq (%r14,%r13), %rdi
movl $0xc0, %edx
callq 0x21a0
movq -0x50(%rbp), %rdx
testl %edx, %edx
je 0x37abf
movq 0x28(%rbx,%r14), %rax
subq %rbx, %rax
shrq $0x6, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
cltq
leaq (%rax,%rax,2), %rax
shlq $0x6, %rax
addq %r13, %rax
movq %rax, 0x28(%r13,%r14)
incl %edx
addq $0xc0, %r14
movq -0x40(%rbp), %rcx
cmpl %edx, %ecx
jne 0x37a7d
xorl %edx, %edx
movss -0x2c(%rbp), %xmm3
movss %xmm3, -0x6c(%rbp)
movq -0x78(%rbp), %r14
jmp 0x37af0
movl $0x0, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
sete %dl
movss 0x313c4(%rip), %xmm0    # 0x68ebc
ucomiss %xmm3, %xmm0
seta %al
orb %dl, %al
movq -0xe8(%rbp), %rsp
testb %al, %al
jne 0x37b3e
movq -0xb0(%rbp), %rax
incl %eax
movq %rax, -0xb0(%rbp)
cmpl -0xc4(%rbp), %eax
jne 0x37330
jmp 0x37b3e
movq -0x78(%rbp), %r14
movq -0x80(%rbp), %r12
movq -0x40(%rbp), %rcx
jmp 0x37b00
movss %xmm3, -0x6c(%rbp)
jmp 0x37af0
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq