// File: /workspace/github_c_makefile_star2_O1/PoulinV[P]AxiCLASS/build/../external/HMcode/hmcode.c
// Function: hmcode_cbnu_ratio
int hmcode_cbnu_ratio(
                      double k,
                      double z,
                      double fnu,
                      double om_m,
                      double Tcmb,
                      double growth,
                      double *cbnu_ratio
                      ){

  double pcb, BigT, zeq, D, q, Nnu, yfs, Dcb, Dcbnu;

  pcb=(5.-sqrt(1+24*(1.-fnu)))/4;

  BigT=Tcmb/2.7;

  zeq=(2.5e4)*om_m*pow(BigT,-4.);
  //IF (EdS_Tcold_growth) THEN
  //    D=(1.+zeq)/(1.+z) ! EdS solution
  //ELSE
  //    D=(1.+zeq)*ungrow(z, cosm) ! General solution
  //END IF
  D=(1.+zeq)*growth;//(1.+zeq)/(1.+z);

  q=k*BigT*BigT/om_m;

  Nnu = 1;
  yfs=17.2*fnu*(1.+0.488*pow(fnu,-7./6.))*pow(Nnu*q/fnu,2);

  Dcb=pow(1.+pow(D/(1.+yfs),0.7),pcb/0.7);
  Dcbnu=pow(pow(1-fnu,0.7/pcb)+pow(D/(1.+yfs),0.7),pcb/0.7);

  *cbnu_ratio =  Dcb/Dcbnu;

  return _SUCCESS_;
}

// Assembly:
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
movsd %xmm5, 0x8(%rsp)
movsd %xmm4, (%rsp)
movaps %xmm3, 0x30(%rsp)
movaps %xmm0, 0x10(%rsp)
movsd 0xad25(%rip), %xmm3     # 0xf1260
movapd %xmm3, %xmm1
movsd %xmm2, 0x20(%rsp)
subsd %xmm2, %xmm1
movsd 0xc19f(%rip), %xmm0     # 0xf26f0
movsd %xmm1, 0x48(%rsp)
mulsd %xmm1, %xmm0
addsd %xmm3, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xe656f
sqrtsd %xmm0, %xmm0
jmp 0xe6574
callq 0x82b0
movsd 0xacf4(%rip), %xmm1     # 0xf1270
subsd %xmm0, %xmm1
mulsd 0xdfe8(%rip), %xmm1     # 0xf4570
movsd %xmm1, 0x28(%rsp)
movsd (%rsp), %xmm0
divsd 0x488ed(%rip), %xmm0    # 0x12ee88
movsd %xmm0, (%rsp)
movsd 0xdeb0(%rip), %xmm1     # 0xf4458
callq 0x8620
movapd %xmm0, 0x50(%rsp)
movapd 0x10(%rsp), %xmm0
movsd (%rsp), %xmm1
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
divsd 0x30(%rsp), %xmm0
movapd %xmm0, 0x10(%rsp)
movsd 0x488b6(%rip), %xmm1    # 0x12ee90
movsd 0x20(%rsp), %xmm0
mulsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd 0x488a7(%rip), %xmm1    # 0x12ee98
callq 0x8620
mulsd 0x488a2(%rip), %xmm0    # 0x12eea0
movsd 0xac5a(%rip), %xmm1     # 0xf1260
addsd %xmm1, %xmm0
mulsd (%rsp), %xmm0
movapd 0x10(%rsp), %xmm1
divsd 0x20(%rsp), %xmm1
movapd 0x30(%rsp), %xmm2
unpcklpd %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
movapd %xmm1, %xmm3
movsd 0x48877(%rip), %xmm1    # 0x12eea8
unpcklpd %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0]
mulpd %xmm2, %xmm1
movapd 0x50(%rsp), %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
mulpd %xmm1, %xmm2
addpd 0xe2d1(%rip), %xmm2     # 0xf4920
movsd 0x8(%rsp), %xmm0
mulsd %xmm2, %xmm0
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
divsd %xmm2, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x48841(%rip), %xmm1    # 0x12eeb0
callq 0x8620
addsd 0xabe4(%rip), %xmm0     # 0xf1260
movsd 0x28(%rsp), %xmm1
divsd 0x48826(%rip), %xmm1    # 0x12eeb0
movsd %xmm1, (%rsp)
callq 0x8620
movsd %xmm0, 0x10(%rsp)
movsd 0x4880e(%rip), %xmm1    # 0x12eeb0
divsd 0x28(%rsp), %xmm1
movsd 0x48(%rsp), %xmm0
callq 0x8620
movsd %xmm0, 0x30(%rsp)
movsd 0x8(%rsp), %xmm0
movsd 0x487e9(%rip), %xmm1    # 0x12eeb0
callq 0x8620
addsd 0x30(%rsp), %xmm0
movsd (%rsp), %xmm1
callq 0x8620
movsd 0x10(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rbx)
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
retq