// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/main_tnm.c
// Function: Print_thermal
double Print_thermal(int anharmonic, FILE *file_out,
		     struct Normal_Mode NM, char *out_B,
		     struct axe *axes, int N_main,
		     int N_res, int Nchain,
		     struct Normal_Mode NM_unfold,
		     int N_int_unfold, int N_int, 
		     double E_cont_unfold, int FOLDING,
		     struct Normal_Mode NM_apo, int N_int_inter,
		     double Econt_bind, int BINDING,
		     float *mass_coord, int *Cart_interface, int N_Cart_inter,
		     int *rigid_inter, int N_rigid)
{
  float *sigma2; char name[80]="";
  if(anharmonic){
    sigma2=NM.sigma2_anhar; strcpy(name, "anhar");
    fprintf(file_out, "# Anharmonic correction:\n");
  }else{
    sigma2=NM.sigma2;
    fprintf(file_out, "#\n# Harmonic approximation:\n");
  }

  double k_Therm=Collectivity_norm1(sigma2, NM.N); //Renyi
  fprintf(file_out, "Recp.Coll(therm)      %.0f\n", k_Therm);
  /*fprintf(file_out, "Area(therm)           %.3f\n",
    Area_norm1(NM.sigma2, NM.N));*/

  double Mean_Cart_coll=0, sum_w=0; int ia, i;
  for(ia=0; ia<NM.N; ia++){
    float w=sigma2[ia];
    Mean_Cart_coll+=NM.Cart_coll[ia]*w; sum_w+=w;
  }
  if(sum_w)Mean_Cart_coll/=sum_w;
  fprintf(file_out, "Ave_collectivity_NM   %.3f\n", Mean_Cart_coll);
  /*
  Coll_thr_cc=Mean_Cart_coll*0.6666;
  int N_modes_coll=0;
  for(ia=0; ia<NM.N; ia++){
    if((NM.select[ia])&&(NM.Cart_coll[ia] >= Coll_thr_cc))N_modes_coll++;
  }
  fprintf(file_out, "Num.collective_modes  %d\n", N_modes_coll);
  fprintf(file_out, "Threshold_collectivity %.3f\n", Coll_thr_cc);
  */
  double Free_Ene_holo=0, Free_Ene_holo_rigid=0;

  {  /* Harmonic entropy quantum
	h/= 1.055 e-34 J.sec
	h = 6.626 e-34 J.sec
	k_B T at 293K = 1.381 e-23 *293= 4.05e-21 J
	/h/k_BT = 0.260e-13 s^(-1) = 2.6 ps
	h/k_BT = 1.637e-13 s^(-1) = 0.1636 ps
	omega_q = kBT/h/ = 6.1 ps^(-1)
	(agrees with K. Hinsen)

	Our internal units of time are:
	[t]=[m l^2/E]^(1/2)
	Energy unit: kT= 4.05e-21 J at T=293
	Mass unit: Atomic mass 1.66e-27 kg
	mass/Energy: 0.4099e-6 sqrt: 0.64 e-3
	//sqrt(k_B T/M)= sqrt(4.05e-21 J/1.66e-27 Kg)=1562
	length unit = e-10 m
	time unit: 0.64 e-13 = 6.4 e-12 = 6.4 ps
	Frequency unit: 0.156 ps^(-1)
	omega_q = 39 internal units
	1/(omega_q)^2= 0.00065 in internal units 

	Other constants:
	Avogadro number NA= 6.02e+23
	Gas constant R= 8.314 J/(K*mol) 

     */

    double omega_q=6.1*(Temp_comp/293)/Freq_unit;
    double beta_omega=1./omega_q;
    double entropy=
      Compute_entropy(&Free_Ene_holo, &Free_Ene_holo_rigid,
		      NM, sigma2, beta_omega, NULL, NULL, 0, NULL, 0);
    if(anharmonic==0){
      fprintf(file_out,"kT/h=                %.4g\n", omega_q);
    }
    int m=0, k; for(k=0; k<NM.N; k++){if(NM.omega[k]>omega_q)break; m++;}
    fprintf(file_out, "Quantum modes:        %d / %d\n", NM.N-m, NM.N);
    fprintf(file_out, "Entropy per res       %.4g", entropy/N_res);
    if(BINDING){fprintf(file_out, " (holo)");}
    fprintf(file_out, "\n");
    fprintf(file_out, "Free energy per res   %.4g", Free_Ene_holo/N_res);
    if(BINDING){fprintf(file_out, " (holo)");}
    fprintf(file_out, "\n");

    if(FOLDING){
      float *s2_unfold;
      if(anharmonic){s2_unfold=NM_unfold.sigma2_anhar;}
      else{s2_unfold=NM_unfold.sigma2;}
      double Free_Ene_unfold=0, Free_Ene_unfold_rigid=0;
      double entropy_unfold= 
	Compute_entropy(&Free_Ene_unfold, &Free_Ene_unfold_rigid, NM,
			s2_unfold, beta_omega, NULL, NULL, 0, NULL, 0);
      fprintf(file_out, "Unfolded contacts:   %d\n", N_int_unfold);
      fprintf(file_out, "Contact energy unfold %.4g\n", E_cont_unfold);
      fprintf(file_out, "Entropy per res       %.4g (unfolded)\n",
	      (entropy_unfold)/N_res);
      fprintf(file_out, "Free energy per res   %.4g (unfolded)\n",
	      Free_Ene_unfold/N_res);
      double DG_NM_unfold=(Free_Ene_holo-Free_Ene_unfold)/N_res;
      fprintf(file_out, "Unfold free energy NM  %.4g\n", DG_NM_unfold);
      fprintf(file_out, "Unfold entropy NM      %.4g\n",
	      (entropy_unfold-entropy)/N_res);


      //float r0=pow(N_res, 1/3);
      //float c=(float)N_int/(float)N_res;
      //float Surf=(cont_inf -c)*r0*r0;
      float Surf=N_res-N_int_long/cont_inf;


      //float c_1=(float)N_int_unfold/(float)N_res;
      //float Surf_1=(3.94 -c_1)*r0*r0;

      fprintf(file_out, "SASA diff unfold       %.4g\n",
	      N_res-Surf);
    }
  
    if(BINDING){
      float *s2_apo;
      if(anharmonic){s2_apo=NM_apo.sigma2_anhar;}
      else{s2_apo=NM_apo.sigma2;}
      entropy= //double entropy_holo=
	Compute_entropy(&Free_Ene_holo, &Free_Ene_holo_rigid, NM, sigma2,
			beta_omega, mass_coord, Cart_interface, N_Cart_inter,
			rigid_inter, N_rigid);
      double Free_Ene_apo=0, Free_Ene_apo_rigid=0;
      entropy=
	Compute_entropy(&Free_Ene_apo, &Free_Ene_apo_rigid, NM_apo, s2_apo,
			beta_omega, mass_coord, Cart_interface, N_Cart_inter,
			rigid_inter, N_rigid);
      fprintf(file_out, "Interface contacts:   %d\n", N_int_inter);
      fprintf(file_out, "Entropy per res       %.4g (apo, interface)\n",
	      (entropy)/N_res);
      fprintf(file_out, "Free energy per res   %.4g (apo, intern)\n",
	      Free_Ene_apo/N_res);
      fprintf(file_out, "Free energy rigid     %.4g (apo, /nrigid)\n",
	      Free_Ene_apo_rigid/N_rigid);
      DG_NM_internal=(Free_Ene_holo-Free_Ene_apo)/N_res;
      DG_NM_rigid=(Free_Ene_holo_rigid-Free_Ene_apo_rigid)/N_res;
      //N_rigid_inter;
      Free_Ene_holo/=N_res;

      fprintf(file_out, "Binding free energy NM  %.4g (internal, /Nres)\n",
	      DG_NM_internal);
      fprintf(file_out, "Binding free energy NM  %.4g (rigid body, /nrigid)\n",
	      DG_NM_rigid);

      //fprintf(file_out, "Binding entropy NM      %.4g\n",
      //	      entropy_holo-entropy);
      fprintf(file_out, "Binding free energy cont %.4g\n", Econt_bind);

      int N_int=N_cont_long_1+N_cont_long_2+N_int_inter;
      float Surf=N_res_1+N_res_2-N_int/cont_inf;
      float Surf_1=N_res_1-N_cont_long_1/cont_inf;
      float Surf_2=N_res_2-N_cont_long_2/cont_inf;

      fprintf(file_out, "SASA difference          %.4g\n",
	      Surf_1+Surf_2-Surf);
    }
  }

  fprintf(file_out, "%s", out_B);

  // Rigid body degrees of freedom
  if(Nchain>1){
    double tra=0, rot=0, all=0;
    for(ia=0; ia<NM.N; ia++){
      float *v=NM.MW_Tors[ia];
      double tra_ia=0, rot_ia=0;
      for(i=0; i<N_main; i++){
	if(axes[i].rigid){
	  if(axes[i].type=='l'){tra_ia+=(*v)*(*v);}
	  else{rot_ia += (*v)*(*v);}
	}
	v++;
      }
      tra+=tra_ia*sigma2[ia];
      rot+=rot_ia*sigma2[ia];
      all+=sigma2[ia];
    }
    fprintf(file_out, "Fraction_RB_tra       %.3g\n", tra/all);
    fprintf(file_out, "Fraction_RB_rot       %.3g\n", rot/all);
  }
  return(Free_Ene_holo);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movsd %xmm1, 0x140(%rsp)
movsd %xmm0, 0x108(%rsp)
movl %r9d, 0x100(%rsp)
movl %r8d, 0x114(%rsp)
movq %rcx, 0x138(%rsp)
movq %rdx, 0x148(%rsp)
movq %rsi, %rbx
movl %edi, %r13d
leaq 0x190(%rsp), %rbp
testl %edi, %edi
je 0xa21e
movq 0x88(%rbp), %r15
leaq 0x47f40(%rip), %rdi     # 0x52157
movl $0x19, %esi
jmp 0xa22e
movq 0x28(%rbp), %r15
leaq 0x47f48(%rip), %rdi     # 0x52171
movl $0x1c, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2280
movl (%rbp), %r12d
movq %r15, %rdi
movl %r12d, %esi
callq 0x10ffa
cvtss2sd %xmm0, %xmm0
leaq 0x47f39(%rip), %rsi     # 0x5218e
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
xorps %xmm0, %xmm0
xorpd %xmm2, %xmm2
xorpd %xmm1, %xmm1
testl %r12d, %r12d
jle 0xa29c
movq 0x68(%rbp), %rax
xorl %ecx, %ecx
movss (%r15,%rcx,4), %xmm3
movss (%rax,%rcx,4), %xmm4
mulss %xmm3, %xmm4
cvtss2sd %xmm4, %xmm4
addsd %xmm4, %xmm1
cvtss2sd %xmm3, %xmm3
addsd %xmm3, %xmm2
incq %rcx
cmpq %rcx, %r12
jne 0xa275
movapd %xmm1, %xmm3
divsd %xmm2, %xmm3
cmpneqsd %xmm2, %xmm0
andpd %xmm0, %xmm3
andnpd %xmm1, %xmm0
orpd %xmm3, %xmm0
leaq 0x47eee(%rip), %rsi     # 0x521aa
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
xorl %r14d, %r14d
leaq 0xf0(%rsp), %rax
movq %r14, (%rax)
leaq 0x130(%rsp), %rdx
movss 0x5ceb0(%rip), %xmm0    # 0x67194
divss 0x46d34(%rip), %xmm0    # 0x51020
xorps %xmm1, %xmm1
cvtss2sd %xmm0, %xmm1
mulsd 0x46d55(%rip), %xmm1    # 0x51050
xorps %xmm0, %xmm0
cvtss2sd 0x5ce96(%rip), %xmm0    # 0x6719c
movq %r14, (%rdx)
divsd %xmm0, %xmm1
movsd 0x46d2b(%rip), %xmm0    # 0x51040
movsd %xmm1, 0xe0(%rsp)
divsd %xmm1, %xmm0
movl $0x1a, %ecx
movq %rsp, %rdi
movq %rbp, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r14, 0xd0(%rsp)
movl $0x0, 0xd8(%rsp)
movq %rax, %rdi
movq %rdx, %rsi
movq %r15, %rdx
movsd %xmm0, 0xe8(%rsp)
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xaa7a
movsd %xmm0, 0x120(%rsp)
movl %r13d, 0xfc(%rsp)
testl %r13d, %r13d
jne 0xa392
leaq 0x47e47(%rip), %rsi     # 0x521c6
movq %rbx, %rdi
movsd 0xe0(%rsp), %xmm0
movb $0x1, %al
callq 0x2190
movl 0x428(%rsp), %r13d
testl %r12d, %r12d
jle 0xa3c9
movq 0x18(%rbp), %rax
xorl %r14d, %r14d
movsd 0xe0(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtss2sd (%rax,%r14,4), %xmm0
ucomisd %xmm1, %xmm0
ja 0xa3c9
incq %r14
cmpq %r14, %r12
jne 0xa3af
movl %r12d, %r14d
movl 0x348(%rsp), %ebp
movl %r12d, %edx
subl %r14d, %edx
leaq 0x47e04(%rip), %rsi     # 0x521e1
movq %rbx, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2190
xorps %xmm1, %xmm1
cvtsi2sdl 0x100(%rsp), %xmm1
movsd %xmm1, 0xe0(%rsp)
movsd 0x120(%rsp), %xmm0
divsd %xmm1, %xmm0
leaq 0x47ded(%rip), %rsi     # 0x52200
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
testl %r13d, %r13d
je 0xa485
leaq 0x47df2(%rip), %r14     # 0x5221b
movl $0x7, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2280
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2140
movsd 0xf0(%rsp), %xmm0
divsd 0xe0(%rsp), %xmm0
leaq 0x47dbf(%rip), %rsi     # 0x52223
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
movl $0x7, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2280
jmp 0xa4b5
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2140
movsd 0xf0(%rsp), %xmm0
divsd 0xe0(%rsp), %xmm0
leaq 0x47d78(%rip), %rsi     # 0x52223
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2140
testl %ebp, %ebp
je 0xa663
movl 0x338(%rsp), %ebp
leaq 0x268(%rsp), %rax
leaq 0x88(%rax), %rcx
addq $0x28, %rax
cmpl $0x0, 0xfc(%rsp)
cmovneq %rcx, %rax
movq (%rax), %rdx
xorl %r8d, %r8d
leaq 0x150(%rsp), %r14
movq %r8, (%r14)
leaq 0x128(%rsp), %rax
movq %r8, (%rax)
movl $0x1a, %ecx
movq %rsp, %rdi
leaq 0x190(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r8, 0xd0(%rsp)
movl $0x0, 0xd8(%rsp)
movq %r14, %rdi
movq %rax, %rsi
movsd 0xe8(%rsp), %xmm0
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xaa7a
movsd %xmm0, 0x118(%rsp)
leaq 0x47ce0(%rip), %rsi     # 0x5223e
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2190
leaq 0x47ce6(%rip), %rsi     # 0x52257
movq %rbx, %rdi
movsd 0x108(%rsp), %xmm0
movb $0x1, %al
callq 0x2190
movsd 0x118(%rsp), %xmm0
divsd 0xe0(%rsp), %xmm0
leaq 0x47cd6(%rip), %rsi     # 0x52273
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
movsd (%r14), %xmm0
movsd %xmm0, 0x108(%rsp)
divsd 0xe0(%rsp), %xmm0
leaq 0x47cd5(%rip), %rsi     # 0x5229a
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
movsd 0xf0(%rsp), %xmm0
subsd 0x108(%rsp), %xmm0
divsd 0xe0(%rsp), %xmm0
leaq 0x47cd0(%rip), %rsi     # 0x522c1
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
movsd 0x118(%rsp), %xmm0
subsd 0x120(%rsp), %xmm0
divsd 0xe0(%rsp), %xmm0
leaq 0x47cc1(%rip), %rsi     # 0x522de
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
xorps %xmm0, %xmm0
cvtsi2ssl 0x100(%rsp), %xmm0
cvtsi2ssl 0x5f7e5(%rip), %xmm1 # 0x69e20
divss 0x5cbe5(%rip), %xmm1    # 0x67228
subss %xmm0, %xmm1
addss %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
leaq 0x47ca2(%rip), %rsi     # 0x522fb
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
movl 0x260(%rsp), %ebp
testl %r13d, %r13d
je 0xa946
movl 0x450(%rsp), %edx
movq 0x448(%rsp), %r11
movl 0x440(%rsp), %r9d
movq 0x438(%rsp), %r8
movq 0x430(%rsp), %r10
movl 0x420(%rsp), %r13d
leaq 0x350(%rsp), %r14
leaq 0x88(%r14), %rax
leaq 0x28(%r14), %rcx
cmpl $0x0, 0xfc(%rsp)
cmoveq %rcx, %rax
movq (%rax), %rbp
movl $0x1a, %ecx
movq %rsp, %rdi
leaq 0x190(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movl %edx, 0xd8(%rsp)
movq %r11, 0xd0(%rsp)
leaq 0xf0(%rsp), %rdi
leaq 0x130(%rsp), %rsi
movq %r15, %rdx
movsd 0xe8(%rsp), %xmm0
movq %r10, %rcx
callq 0xaa7a
xorl %eax, %eax
leaq 0x150(%rsp), %r8
movq %rax, (%r8)
leaq 0x128(%rsp), %rdx
movq %rax, (%rdx)
movl $0x1a, %ecx
movq %rsp, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl 0x450(%rsp), %eax
movl %eax, 0xd8(%rsp)
movq 0x448(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq %r8, %rdi
movq %r8, %r14
movq %rdx, %rsi
movq %rbp, %rdx
movl 0x260(%rsp), %ebp
movsd 0xe8(%rsp), %xmm0
movq 0x430(%rsp), %rcx
movq 0x438(%rsp), %r8
movl 0x440(%rsp), %r9d
callq 0xaa7a
movsd %xmm0, 0xe8(%rsp)
leaq 0x47b81(%rip), %rsi     # 0x52318
movq %rbx, %rdi
movl %r13d, %edx
xorl %eax, %eax
callq 0x2190
movsd 0xe8(%rsp), %xmm0
divsd 0xe0(%rsp), %xmm0
leaq 0x47b75(%rip), %rsi     # 0x52332
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
movsd (%r14), %xmm0
movsd %xmm0, 0xe8(%rsp)
divsd 0xe0(%rsp), %xmm0
leaq 0x47b7a(%rip), %rsi     # 0x5235f
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
leaq 0x128(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x100(%rsp)
cvtsi2sdl 0x450(%rsp), %xmm1
divsd %xmm1, %xmm0
leaq 0x47b71(%rip), %rsi     # 0x52389
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
leaq 0xf0(%rsp), %rax
movsd (%rax), %xmm1
movapd %xmm1, %xmm0
subsd 0xe8(%rsp), %xmm0
movsd 0xe0(%rsp), %xmm3
divsd %xmm3, %xmm0
movsd %xmm0, 0x5e760(%rip)    # 0x68fb0
leaq 0x130(%rsp), %rcx
movsd (%rcx), %xmm2
subsd 0x100(%rsp), %xmm2
divsd %xmm3, %xmm2
movsd %xmm2, 0x5e747(%rip)    # 0x68fb8
divsd %xmm3, %xmm1
movsd %xmm1, (%rax)
leaq 0x47b34(%rip), %rsi     # 0x523b4
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
movsd 0x5e726(%rip), %xmm0    # 0x68fb8
leaq 0x47b4b(%rip), %rsi     # 0x523e4
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
leaq 0x47b6e(%rip), %rsi     # 0x52418
movq %rbx, %rdi
movsd 0x140(%rsp), %xmm0
movb $0x1, %al
callq 0x2190
movl 0x5e859(%rip), %eax     # 0x6911c
movl 0x5e857(%rip), %ecx     # 0x69120
addl %eax, %r13d
movl 0x5e842(%rip), %edx     # 0x69114
movl 0x5e840(%rip), %esi     # 0x69118
leal (%rsi,%rdx), %edi
xorps %xmm0, %xmm0
cvtsi2ss %edi, %xmm0
addl %ecx, %r13d
xorps %xmm1, %xmm1
cvtsi2ss %r13d, %xmm1
movss 0x5c933(%rip), %xmm2    # 0x67228
divss %xmm2, %xmm1
subss %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
xorps %xmm3, %xmm3
cvtsi2ss %eax, %xmm3
divss %xmm2, %xmm3
subss %xmm3, %xmm0
xorps %xmm3, %xmm3
cvtsi2ss %esi, %xmm3
cvtsi2ss %ecx, %xmm4
divss %xmm2, %xmm4
subss %xmm4, %xmm3
addss %xmm0, %xmm3
addss %xmm1, %xmm3
xorps %xmm0, %xmm0
cvtss2sd %xmm3, %xmm0
leaq 0x47afb(%rip), %rsi     # 0x52437
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
movq 0x148(%rsp), %rdi
movq %rbx, %rsi
callq 0x2100
cmpl $0x2, %ebp
jl 0xaa5f
testl %r12d, %r12d
jle 0xaa09
leaq 0x190(%rsp), %rax
movq 0x48(%rax), %rax
movl 0x114(%rsp), %r9d
movl %r9d, %ecx
movq 0x138(%rsp), %r10
addq $0x4, %r10
xorpd %xmm5, %xmm5
xorl %edx, %edx
xorpd %xmm4, %xmm4
xorpd %xmm0, %xmm0
xorpd %xmm2, %xmm2
xorpd %xmm1, %xmm1
testl %r9d, %r9d
jle 0xa9e2
movq (%rax,%rdx,8), %rsi
movq %r10, %rdi
xorl %r8d, %r8d
cmpl $0x0, (%rdi)
je 0xa9d3
cmpb $0x6c, -0x4(%rdi)
movss (%rsi,%r8,4), %xmm3
mulss %xmm3, %xmm3
cvtss2sd %xmm3, %xmm3
jne 0xa9cf
addsd %xmm3, %xmm2
jmp 0xa9d3
addsd %xmm3, %xmm1
incq %r8
addq $0x158, %rdi            # imm = 0x158
cmpq %r8, %rcx
jne 0xa9b0
xorps %xmm3, %xmm3
cvtss2sd (%r15,%rdx,4), %xmm3
mulsd %xmm3, %xmm2
addsd %xmm2, %xmm0
mulsd %xmm3, %xmm1
addsd %xmm1, %xmm4
addsd %xmm3, %xmm5
incq %rdx
cmpq %r12, %rdx
jne 0xa999
jmp 0xaa15
xorpd %xmm0, %xmm0
xorpd %xmm4, %xmm4
xorpd %xmm5, %xmm5
movsd %xmm4, 0xe8(%rsp)
movsd %xmm5, 0xe0(%rsp)
divsd %xmm5, %xmm0
leaq 0x47a24(%rip), %rsi     # 0x52456
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
movsd 0xe8(%rsp), %xmm0
divsd 0xe0(%rsp), %xmm0
leaq 0x47a1d(%rip), %rsi     # 0x52472
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
movsd 0xf0(%rsp), %xmm0
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq