// File: /workspace/github_c_makefile_star2_O2/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 0x14672(%rip), %xmm1    # 0xe5260
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, 0x30(%rsp)
andq $0x0, 0x38(%rdi)
movsd 0x60(%rdi), %xmm0
xorpd %xmm2, %xmm2
xorpd %xmm1, %xmm1
movsd %xmm1, 0x20(%rsp)
ucomisd %xmm2, %xmm0
jne 0xd0d36
jp 0xd0d36
movsd 0x18(%rbx), %xmm0
movsd 0x20(%rbx), %xmm1
movsd %xmm1, 0x10(%rsp)
movapd 0x30(%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, 0x20(%rsp)
divpd %xmm1, %xmm0
divpd %xmm1, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x40(%rsp)
movsd 0x145ed(%rip), %xmm1    # 0xe5260
movapd %xmm1, %xmm0
divsd %xmm2, %xmm0
movsd %xmm0, 0x8(%rsp)
addsd 0x40(%rbx), %xmm1
movsd 0x15aba(%rip), %xmm2    # 0xe6748
movsd %xmm2, (%rsp)
mulsd %xmm2, %xmm1
callq 0x8650
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd (%rsp), %xmm0
mulsd 0x48(%rbx), %xmm0
movsd %xmm0, (%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x82e0
addsd 0x14b1e(%rip), %xmm0    # 0xe57e8
addsd 0x30(%rsp), %xmm0
mulsd (%rsp), %xmm0
callq 0x86a0
movapd %xmm0, %xmm1
mulsd 0x10(%rsp), %xmm1
addsd 0x40(%rsp), %xmm1
movupd 0x30(%rbx), %xmm0
movapd 0x20(%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
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xd0d21
sqrtsd %xmm0, %xmm0
jmp 0xd0d26
callq 0x82d0
mulsd 0x508da(%rip), %xmm0    # 0x121608
addq $0x58, %rsp
popq %rbx
popq %r14
retq
movsd 0x8(%rbx), %xmm1
mulsd 0x5088d(%rip), %xmm1    # 0x1215d0
movsd 0x5088d(%rip), %xmm2    # 0x1215d8
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
movsd %xmm2, 0x8(%rsp)
divsd 0x30(%rsp), %xmm1
movsd %xmm1, 0x50(%rsp)
xorl %r14d, %r14d
cvtsi2sd %r14d, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xd0c24
movsd 0x68(%rbx,%r14,8), %xmm0
divsd 0x5047a(%rip), %xmm0    # 0x121208
divsd 0x50(%rsp), %xmm0
movsd %xmm0, (%rsp)
movsd 0x5083f(%rip), %xmm1    # 0x1215e0
callq 0x8650
mulsd 0x5083a(%rip), %xmm0    # 0x1215e8
addsd 0x144aa(%rip), %xmm0    # 0xe5260
shufpd $0x2, 0x4bef1(%rip), %xmm0 # xmm0 = xmm0[0],mem[1]
movapd %xmm0, 0x40(%rsp)
movsd (%rsp), %xmm0
movsd 0x5081e(%rip), %xmm1    # 0x1215f0
callq 0x8650
movaps %xmm0, 0x10(%rsp)
movsd (%rsp), %xmm0
movsd 0x5080f(%rip), %xmm1    # 0x1215f8
callq 0x8650
movapd 0x10(%rsp), %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
mulpd 0x50870(%rip), %xmm1    # 0x121670
addpd 0x40(%rsp), %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
divsd %xmm0, %xmm1
mulsd 0x8(%rsp), %xmm1
mulsd 0x507e0(%rip), %xmm1    # 0x121600
addsd %xmm1, %xmm1
movsd 0x20(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movsd %xmm0, 0x38(%rbx)
incq %r14
movsd 0x60(%rbx), %xmm0
jmp 0xd0d70