// File: /workspace/github_c_makefile_star2_O3/PoulinV[P]AxiCLASS/build/../external/HyRec2020/history.c
// Function: rec_HubbleRate
double rec_HubbleRate(REC_COSMOPARAMS *cosmo, double z) {
  double a = 1./(1.+z), y, Tnu0;
  int i;
  cosmo->onuh2 = 0;
  Tnu0 = cosmo->T0 * pow(4./11.,1./3.) ;
  if (cosmo->Nmnu == 0) cosmo->onuh2 = 0;
  else{
    /* Massive neutrino energy density using fitting function */
    for (i=0;i<cosmo->Nmnu;i++) {
      y = cosmo->mnu[i]/kBoltz/(Tnu0/a);
      cosmo->onuh2 = cosmo->onuh2 + (1.+0.317322*0.0457584*pow(y,3.47446+1.)
          + 2.05298*0.0457584*pow(y,3.47446-1.))/(1.+0.0457584*pow(y,3.47446))*(3.45e-8*Tnu0*Tnu0*Tnu0*Tnu0)*5.6822*2;
    }
  }

  /* Total density parameter, including curvature */
  double rho = cosmo->ocbh2 /a/a/a     /* Matter (baryon + CDM) */
             + cosmo->okh2 /a/a       /* Curvature */
             + cosmo->odeh2 * pow(1./a, 3*(1+cosmo->w0)) * exp(3*cosmo->wa* (log(1./a)-1.+a))  /* Dark energy */
             + cosmo->orh2 /a/a/a/a   /* Radiation (photons + massless neutrinos) */
             + cosmo->onuh2 /a/a/a/a; /* Massive neutrinos */
  /* Conversion to Hubble rate in sec-1 */

  return( 3.2407792896393e-18 * sqrt(rho) );
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movsd 0x1595a(%rip), %xmm1    # 0xee260
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, 0x20(%rsp)
movq $0x0, 0x38(%rdi)
movsd 0x60(%rdi), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xd8a46
movsd 0x8(%rbx), %xmm0
mulsd 0x51e24(%rip), %xmm0    # 0x12a760
movsd 0x51e24(%rip), %xmm1    # 0x12a768
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
divsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
movl $0xd, %r14d
xorpd %xmm2, %xmm2
movsd %xmm2, 0x40(%rsp)
movsd (%rbx,%r14,8), %xmm0
divsd 0x519e4(%rip), %xmm0    # 0x12a368
divsd 0x50(%rsp), %xmm0
movsd %xmm0, (%rsp)
movsd 0x51dd9(%rip), %xmm1    # 0x12a770
callq 0x8620
mulsd 0x51dd4(%rip), %xmm0    # 0x12a778
addsd 0x158b4(%rip), %xmm0    # 0xee260
shufpd $0x2, 0x5113b(%rip), %xmm0 # xmm0 = xmm0[0],mem[1]
movapd %xmm0, 0x30(%rsp)
movsd (%rsp), %xmm0
movsd 0x51db8(%rip), %xmm1    # 0x12a780
callq 0x8620
movaps %xmm0, 0x10(%rsp)
movsd (%rsp), %xmm0
movsd 0x51da9(%rip), %xmm1    # 0x12a788
callq 0x8620
movsd 0x40(%rsp), %xmm2
movapd 0x10(%rsp), %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
mulpd 0x51e04(%rip), %xmm1    # 0x12a800
addpd 0x30(%rsp), %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
divsd %xmm0, %xmm1
mulsd 0x8(%rsp), %xmm1
mulsd 0x51d74(%rip), %xmm1    # 0x12a790
addsd %xmm1, %xmm1
addsd %xmm1, %xmm2
movsd %xmm2, 0x38(%rbx)
leal -0xc(%r14), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x60(%rbx), %xmm1
incq %r14
ucomisd %xmm0, %xmm1
ja 0xd8970
movsd 0x18(%rbx), %xmm0
movsd 0x20(%rbx), %xmm1
movsd %xmm1, 0x10(%rsp)
movapd 0x20(%rsp), %xmm2
divsd %xmm2, %xmm0
movhpd 0x28(%rbx), %xmm0       # xmm0 = xmm0[0],mem[0]
movapd %xmm2, %xmm1
unpcklpd %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0]
movapd %xmm1, 0x40(%rsp)
divpd %xmm1, %xmm0
divpd %xmm1, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x30(%rsp)
movsd 0x157cb(%rip), %xmm1    # 0xee260
movapd %xmm1, %xmm0
divsd %xmm2, %xmm0
movsd %xmm0, 0x8(%rsp)
addsd 0x40(%rbx), %xmm1
movsd 0x16bd0(%rip), %xmm2    # 0xef680
movsd %xmm2, (%rsp)
mulsd %xmm2, %xmm1
callq 0x8620
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd (%rsp), %xmm0
mulsd 0x48(%rbx), %xmm0
movsd %xmm0, (%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x82c0
addsd 0x15cfc(%rip), %xmm0    # 0xee7e8
addsd 0x20(%rsp), %xmm0
mulsd (%rsp), %xmm0
callq 0x8670
movapd %xmm0, %xmm1
mulsd 0x10(%rsp), %xmm1
addsd 0x30(%rsp), %xmm1
movupd 0x30(%rbx), %xmm0
movapd 0x40(%rsp), %xmm2
divpd %xmm2, %xmm0
divpd %xmm2, %xmm0
divpd %xmm2, %xmm0
divpd %xmm2, %xmm0
addsd %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
ucomisd 0x1571d(%rip), %xmm0    # 0xee258
jb 0xd8b43
sqrtsd %xmm0, %xmm0
jmp 0xd8b48
callq 0x82b0
mulsd 0x51c48(%rip), %xmm0    # 0x12a798
addq $0x58, %rsp
popq %rbx
popq %r14
retq