// File: /workspace/github_c_makefile_star2_O2/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, 0x148(%rsp)
movsd %xmm0, 0x100(%rsp)
movl %r9d, 0x114(%rsp)
movl %r8d, %r14d
movq %rcx, 0x140(%rsp)
movq %rsi, %rbx
leaq 0x190(%rsp), %r15
movl %edi, 0xe8(%rsp)
testl %edi, %edi
movq %rdx, 0x150(%rsp)
je 0x9cb2
movq 0x88(%r15), %r12
leaq 0x42475(%rip), %rdi     # 0x4c123
pushq $0x19
jmp 0x9cbf
movq 0x28(%r15), %r12
leaq 0x42480(%rip), %rdi     # 0x4c13d
pushq $0x1c
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x2280
movl (%r15), %ebp
movq %r12, %rdi
movl %ebp, %esi
callq 0x10033
cvtss2sd %xmm0, %xmm0
leaq 0x42477(%rip), %rsi     # 0x4c15a
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
movq 0x68(%r15), %rax
xorl %ecx, %ecx
testl %ebp, %ebp
movl $0x0, %r13d
cmovgl %ebp, %r13d
xorpd %xmm1, %xmm1
jmp 0x9d21
movss (%r12,%rcx,4), %xmm0
movss (%rax,%rcx,4), %xmm2
mulss %xmm0, %xmm2
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
cvtps2pd %xmm0, %xmm0
addpd %xmm0, %xmm1
incq %rcx
cmpq %rcx, %r13
jne 0x9d05
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
movapd %xmm2, %xmm3
divsd %xmm1, %xmm3
xorpd %xmm0, %xmm0
cmpneqsd %xmm1, %xmm0
andpd %xmm0, %xmm3
andnpd %xmm2, %xmm0
orpd %xmm3, %xmm0
leaq 0x42424(%rip), %rsi     # 0x4c176
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
leaq 0xf8(%rsp), %rax
andq $0x0, (%rax)
leaq 0x138(%rsp), %rdx
andq $0x0, (%rdx)
movss 0x58418(%rip), %xmm0    # 0x62194
divss 0x4129c(%rip), %xmm0    # 0x4b020
cvtss2sd %xmm0, %xmm1
mulsd 0x412d8(%rip), %xmm1    # 0x4b068
cvtss2sd 0x58404(%rip), %xmm0    # 0x6219c
divsd %xmm0, %xmm1
movsd 0x412a4(%rip), %xmm0    # 0x4b048
movsd %xmm1, 0xe0(%rsp)
divsd %xmm1, %xmm0
pushq $0x1a
popq %rcx
movq %rsp, %rdi
leaq 0x190(%rsp), %r15
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
andl $0x0, 0xd8(%rsp)
andq $0x0, 0xd0(%rsp)
movq %rax, %rdi
movq %rdx, %rsi
movq %r12, %rdx
movsd %xmm0, 0x108(%rsp)
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xa4d1
movsd %xmm0, 0x120(%rsp)
cmpl $0x0, 0xe8(%rsp)
jne 0x9e22
leaq 0x42383(%rip), %rsi     # 0x4c192
movq %rbx, %rdi
movsd 0xe0(%rsp), %xmm0
movb $0x1, %al
callq 0x2190
movq 0x18(%r15), %rcx
xorl %eax, %eax
movl 0x114(%rsp), %r15d
movsd 0xe0(%rsp), %xmm1
cmpq %rax, %r13
je 0x9e4e
cvtss2sd (%rcx,%rax,4), %xmm0
ucomisd %xmm1, %xmm0
ja 0x9e51
incq %rax
jmp 0x9e39
movl %r13d, %eax
movl %ebp, %edx
subl %eax, %edx
leaq 0x42351(%rip), %rsi     # 0x4c1ad
movq %rbx, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2190
cvtsi2sd %r15d, %xmm1
movsd 0x120(%rsp), %xmm0
movsd %xmm1, 0xe0(%rsp)
divsd %xmm1, %xmm0
leaq 0x42342(%rip), %rsi     # 0x4c1cc
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
cmpl $0x0, 0x428(%rsp)
je 0x9f00
leaq 0x42342(%rip), %rbp     # 0x4c1e7
pushq $0x7
popq %rsi
pushq $0x1
popq %rdx
movq %rbp, %rdi
movq %rbx, %rcx
callq 0x2280
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0x2140
movsd 0xf8(%rsp), %xmm0
movsd %xmm0, 0xf0(%rsp)
divsd 0xe0(%rsp), %xmm0
leaq 0x4230c(%rip), %rsi     # 0x4c1ef
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
movq %rbp, %rdi
pushq $0x7
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x2280
jmp 0x9f37
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0x2140
movsd 0xf8(%rsp), %xmm0
movsd %xmm0, 0xf0(%rsp)
divsd 0xe0(%rsp), %xmm0
leaq 0x422c2(%rip), %rsi     # 0x4c1ef
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0x2140
cmpl $0x0, 0x348(%rsp)
je 0xa0d9
leaq 0x268(%rsp), %rcx
leaq 0x88(%rcx), %rax
addq $0x28, %rcx
cmpl $0x0, 0xe8(%rsp)
cmovneq %rax, %rcx
movq (%rcx), %rdx
leaq 0x130(%rsp), %rbp
andq $0x0, (%rbp)
leaq 0x128(%rsp), %rax
andq $0x0, (%rax)
pushq $0x1a
popq %rcx
movq %rsp, %rdi
leaq 0x190(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
andl $0x0, 0xd8(%rsp)
andq $0x0, 0xd0(%rsp)
movq %rbp, %rdi
movq %rax, %rsi
movsd 0x108(%rsp), %xmm0
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xa4d1
movsd %xmm0, 0x118(%rsp)
leaq 0x42231(%rip), %rsi     # 0x4c20a
movq %rbx, %rdi
movl 0x338(%rsp), %edx
xorl %eax, %eax
callq 0x2190
leaq 0x42232(%rip), %rsi     # 0x4c223
movq %rbx, %rdi
movsd 0x100(%rsp), %xmm0
movb $0x1, %al
callq 0x2190
movsd 0x118(%rsp), %xmm0
divsd 0xe0(%rsp), %xmm0
leaq 0x42222(%rip), %rsi     # 0x4c23f
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
movsd (%rbp), %xmm0
movsd %xmm0, 0x100(%rsp)
divsd 0xe0(%rsp), %xmm0
leaq 0x42221(%rip), %rsi     # 0x4c266
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
movsd 0xf0(%rsp), %xmm0
subsd 0x100(%rsp), %xmm0
divsd 0xe0(%rsp), %xmm0
leaq 0x4221c(%rip), %rsi     # 0x4c28d
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
movsd 0x118(%rsp), %xmm0
subsd 0x120(%rsp), %xmm0
divsd 0xe0(%rsp), %xmm0
leaq 0x4220d(%rip), %rsi     # 0x4c2aa
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
cvtsi2ss %r15d, %xmm0
cvtsi2ssl 0x5ad6c(%rip), %xmm1 # 0x64e20
divss 0x5816c(%rip), %xmm1    # 0x62228
subss %xmm0, %xmm1
addss %xmm0, %xmm1
cvtss2sd %xmm1, %xmm0
leaq 0x421f8(%rip), %rsi     # 0x4c2c7
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
cmpl $0x0, 0x428(%rsp)
je 0xa3ba
leaq 0x350(%rsp), %rbp
leaq 0x88(%rbp), %rax
leaq 0x28(%rbp), %rcx
cmpl $0x0, 0xe8(%rsp)
cmoveq %rcx, %rax
movq (%rax), %rax
movq %rax, 0xe8(%rsp)
pushq $0x1a
popq %rcx
movq %rsp, %rdi
leaq 0x190(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movl 0x450(%rsp), %r15d
movl %r15d, 0xd8(%rsp)
movq 0x448(%rsp), %rax
movq %rax, 0xd0(%rsp)
leaq 0xf8(%rsp), %rdi
leaq 0x138(%rsp), %rsi
movq %r12, %rdx
movsd 0x108(%rsp), %xmm0
movq 0x430(%rsp), %rcx
movq 0x438(%rsp), %r8
movl 0x440(%rsp), %r15d
movl %r15d, %r9d
callq 0xa4d1
leaq 0x130(%rsp), %r8
andq $0x0, (%r8)
leaq 0x128(%rsp), %rdx
andq $0x0, (%rdx)
pushq $0x1a
popq %rcx
movq %rsp, %rdi
movq %rbp, %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 %rdx, %rsi
movq 0xe8(%rsp), %rdx
movsd 0x108(%rsp), %xmm0
movq 0x430(%rsp), %rcx
movq 0x438(%rsp), %r8
movl %r15d, %r9d
callq 0xa4d1
movsd %xmm0, 0xe8(%rsp)
leaq 0x420e5(%rip), %rsi     # 0x4c2e4
movq %rbx, %rdi
movl 0x420(%rsp), %ebp
movl %ebp, %edx
xorl %eax, %eax
callq 0x2190
movsd 0xe8(%rsp), %xmm0
divsd 0xe0(%rsp), %xmm0
leaq 0x420d3(%rip), %rsi     # 0x4c2fe
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
leaq 0x130(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0xe8(%rsp)
divsd 0xe0(%rsp), %xmm0
leaq 0x420d1(%rip), %rsi     # 0x4c32b
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
leaq 0x128(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0xf0(%rsp)
cvtsi2sdl 0x450(%rsp), %xmm1
divsd %xmm1, %xmm0
leaq 0x420c8(%rip), %rsi     # 0x4c355
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
leaq 0xf8(%rsp), %rax
movsd (%rax), %xmm2
movapd %xmm2, %xmm0
subsd 0xe8(%rsp), %xmm0
movsd 0xe0(%rsp), %xmm3
divsd %xmm3, %xmm0
movsd %xmm0, 0x59ceb(%rip)    # 0x63fb0
leaq 0x138(%rsp), %rax
movsd (%rax), %xmm1
subsd 0xf0(%rsp), %xmm1
divsd %xmm3, %xmm1
movsd %xmm1, 0x59cd2(%rip)    # 0x63fb8
divsd %xmm3, %xmm2
movsd %xmm2, 0xf0(%rsp)
leaq 0x42086(%rip), %rsi     # 0x4c380
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
movsd 0x59cac(%rip), %xmm0    # 0x63fb8
leaq 0x4209d(%rip), %rsi     # 0x4c3b0
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
leaq 0x420c0(%rip), %rsi     # 0x4c3e4
movq %rbx, %rdi
movsd 0x148(%rsp), %xmm0
movb $0x1, %al
callq 0x2190
movl 0x59ddf(%rip), %eax     # 0x6411c
movl 0x59ddd(%rip), %ecx     # 0x64120
addl %eax, %ebp
movl 0x59dc9(%rip), %edx     # 0x64114
movl 0x59dc7(%rip), %esi     # 0x64118
leal (%rsi,%rdx), %edi
cvtsi2ss %edi, %xmm0
addl %ecx, %ebp
cvtsi2ss %ebp, %xmm1
movss 0x57ec2(%rip), %xmm2    # 0x62228
divss %xmm2, %xmm1
subss %xmm0, %xmm1
movd %esi, %xmm0
movd %edx, %xmm3
punpckldq %xmm0, %xmm3    # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
cvtdq2ps %xmm3, %xmm0
movd %ecx, %xmm3
movd %eax, %xmm4
punpckldq %xmm3, %xmm4    # xmm4 = xmm4[0],xmm3[0],xmm4[1],xmm3[1]
cvtdq2ps %xmm4, %xmm3
shufps $0x0, %xmm2, %xmm2      # xmm2 = xmm2[0,0,0,0]
divps %xmm2, %xmm3
subps %xmm3, %xmm0
movaps %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm2     # xmm2 = xmm2[1,1],xmm0[1,1]
addss %xmm0, %xmm2
addss %xmm1, %xmm2
cvtss2sd %xmm2, %xmm0
leaq 0x42053(%rip), %rsi     # 0x4c403
movq %rbx, %rdi
movb $0x1, %al
callq 0x2190
movq 0x150(%rsp), %rdi
movq %rbx, %rsi
callq 0x2100
cmpl $0x2, 0x260(%rsp)
jl 0xa4b6
leaq 0x190(%rsp), %rax
movq 0x48(%rax), %rax
xorl %ecx, %ecx
testl %r14d, %r14d
cmovlel %ecx, %r14d
movq 0x140(%rsp), %r8
addq $0x4, %r8
xorpd %xmm0, %xmm0
xorps %xmm4, %xmm4
xorpd %xmm5, %xmm5
cmpq %r13, %rcx
je 0xa46c
movq (%rax,%rcx,8), %rdx
xorpd %xmm1, %xmm1
movq %r8, %rsi
xorl %edi, %edi
xorpd %xmm2, %xmm2
cmpq %rdi, %r14
je 0xa44d
cmpl $0x0, (%rsi)
je 0xa441
cmpb $0x6c, -0x4(%rsi)
movss (%rdx,%rdi,4), %xmm3
mulss %xmm3, %xmm3
cvtss2sd %xmm3, %xmm3
jne 0xa43d
addsd %xmm3, %xmm1
jmp 0xa441
addsd %xmm3, %xmm2
incq %rdi
addq $0x158, %rsi            # imm = 0x158
jmp 0xa41a
cvtss2sd (%r12,%rcx,4), %xmm3
mulsd %xmm3, %xmm1
addsd %xmm1, %xmm0
mulsd %xmm3, %xmm2
addsd %xmm2, %xmm4
addsd %xmm3, %xmm5
incq %rcx
jmp 0xa404
divsd %xmm5, %xmm0
leaq 0x41fab(%rip), %rsi     # 0x4c422
movq %rbx, %rdi
movb $0x1, %al
movsd %xmm4, 0xe8(%rsp)
movsd %xmm5, 0xe0(%rsp)
callq 0x2190
movsd 0xe8(%rsp), %xmm0
divsd 0xe0(%rsp), %xmm0
leaq 0x41f92(%rip), %rsi     # 0x4c43e
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