// File: /workspace/github_c_makefile_star2_O2/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 0xa5f1(%rip), %xmm3     # 0xe5260
movapd %xmm3, %xmm1
movsd %xmm2, 0x20(%rsp)
subsd %xmm2, %xmm1
movsd 0xba43(%rip), %xmm0     # 0xe66c8
movsd %xmm1, 0x48(%rsp)
mulsd %xmm1, %xmm0
addsd %xmm3, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xdaca3
sqrtsd %xmm0, %xmm0
jmp 0xdaca8
callq 0x82d0
movsd 0xa5c0(%rip), %xmm1     # 0xe5270
subsd %xmm0, %xmm1
mulsd 0xd844(%rip), %xmm1     # 0xe8500
movsd %xmm1, 0x28(%rsp)
movsd (%rsp), %xmm0
divsd 0x48059(%rip), %xmm0    # 0x122d28
movsd %xmm0, (%rsp)
movsd 0xd74c(%rip), %xmm1     # 0xe8428
callq 0x8650
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 0x48022(%rip), %xmm1    # 0x122d30
movsd 0x20(%rsp), %xmm0
mulsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd 0x48013(%rip), %xmm1    # 0x122d38
callq 0x8650
mulsd 0x4800e(%rip), %xmm0    # 0x122d40
movsd 0xa526(%rip), %xmm1     # 0xe5260
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 0x47fe3(%rip), %xmm1    # 0x122d48
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 0xdacd(%rip), %xmm2     # 0xe8850
movsd 0x8(%rsp), %xmm0
mulsd %xmm2, %xmm0
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
divsd %xmm2, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x47fad(%rip), %xmm1    # 0x122d50
callq 0x8650
addsd 0xa4b0(%rip), %xmm0     # 0xe5260
movsd 0x28(%rsp), %xmm1
divsd 0x47f92(%rip), %xmm1    # 0x122d50
movsd %xmm1, (%rsp)
callq 0x8650
movsd %xmm0, 0x10(%rsp)
movsd 0x47f7a(%rip), %xmm1    # 0x122d50
divsd 0x28(%rsp), %xmm1
movsd 0x48(%rsp), %xmm0
callq 0x8650
movsd %xmm0, 0x30(%rsp)
movsd 0x8(%rsp), %xmm0
movsd 0x47f55(%rip), %xmm1    # 0x122d50
callq 0x8650
addsd 0x30(%rsp), %xmm0
movsd (%rsp), %xmm1
callq 0x8650
movsd 0x10(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rbx)
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
retq