// File: /workspace/github_c_makefile_star2_O3/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 0xb263(%rip), %xmm3     # 0xee260
movapd %xmm3, %xmm1
movsd %xmm2, 0x20(%rsp)
subsd %xmm2, %xmm1
movsd 0xc6dd(%rip), %xmm0     # 0xef6f0
movsd %xmm1, 0x48(%rsp)
mulsd %xmm1, %xmm0
addsd %xmm3, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xe3031
sqrtsd %xmm0, %xmm0
jmp 0xe3036
callq 0x82b0
movsd 0xb232(%rip), %xmm1     # 0xee270
subsd %xmm0, %xmm1
mulsd 0xe536(%rip), %xmm1     # 0xf1580
movsd %xmm1, 0x28(%rsp)
movsd (%rsp), %xmm0
divsd 0x48e5b(%rip), %xmm0    # 0x12beb8
movsd %xmm0, (%rsp)
movsd 0xe3fe(%rip), %xmm1     # 0xf1468
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 0x48e24(%rip), %xmm1    # 0x12bec0
movsd 0x20(%rsp), %xmm0
mulsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd 0x48e15(%rip), %xmm1    # 0x12bec8
callq 0x8620
mulsd 0x48e10(%rip), %xmm0    # 0x12bed0
movsd 0xb198(%rip), %xmm1     # 0xee260
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 0x48de5(%rip), %xmm1    # 0x12bed8
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 0xe81f(%rip), %xmm2     # 0xf1930
movsd 0x8(%rsp), %xmm0
mulsd %xmm2, %xmm0
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
divsd %xmm2, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x48daf(%rip), %xmm1    # 0x12bee0
callq 0x8620
addsd 0xb122(%rip), %xmm0     # 0xee260
movsd 0x28(%rsp), %xmm1
divsd 0x48d94(%rip), %xmm1    # 0x12bee0
movsd %xmm1, (%rsp)
callq 0x8620
movsd %xmm0, 0x10(%rsp)
movsd 0x48d7c(%rip), %xmm1    # 0x12bee0
divsd 0x28(%rsp), %xmm1
movsd 0x48(%rsp), %xmm0
callq 0x8620
movsd %xmm0, 0x30(%rsp)
movsd 0x8(%rsp), %xmm0
movsd 0x48d57(%rip), %xmm1    # 0x12bee0
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