// File: /workspace/github_c_makefile_star2_O3/PoulinV[P]AxiCLASS/build/../external/HyRec2020/hydrogen.c
// Function: rec_TLA_dxHIIdlna
double rec_TLA_dxHIIdlna(REC_COSMOPARAMS *cosmo, double xe, double xHII, double nH, double H, double TM, double TR, double Fudge) {

  double RLya, alphaB_TM, alphaB_TR, four_betaB, C, s, Dxe2, DalphaB;
  double fsR = cosmo->fsR, meR = cosmo->meR;

  rescale_T(&TM, fsR, meR);
  rescale_T(&TR, fsR, meR);

  RLya       = LYA_FACT(fsR, meR) * H / nH / (1.-xHII);
  alphaB_TM  = Fudge * alphaB_PPB(TM, fsR, meR);
  alphaB_TR  = Fudge * alphaB_PPB(TR, fsR, meR);

  four_betaB = SAHA_FACT(fsR, meR) *TR*sqrt(TR) *exp(-0.25*EI/TR) * alphaB_TR;
  C          = (3.*RLya + L2s_rescaled(fsR, meR))/(3.*RLya + L2s_rescaled(fsR, meR) + four_betaB);    /* Peebles' C-factor */

  s          = SAHA_FACT(fsR, meR) *TR*sqrt(TR) *exp(-EI/TR)/nH;
  Dxe2       = xe*xHII - s*(1.-xHII);    /* xe xp - xe xp[Saha eq with 1s] -- gives more compact expressions */
  DalphaB    = alphaB_TM - alphaB_TR;

  return -nH*(s*(1.-xHII)*DalphaB + Dxe2*alphaB_TM)*C/H + (cosmo->inj_params->ion + (1.-C)*cosmo->inj_params->exclya)/H;

}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movaps %xmm6, 0x50(%rsp)
movaps %xmm3, 0xb0(%rsp)
movaps %xmm2, 0xa0(%rsp)
movsd %xmm1, 0x48(%rsp)
movsd %xmm0, 0x98(%rsp)
movq %rdi, %rbx
movsd 0x98(%rdi), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0xa0(%rdi), %xmm1
movsd %xmm1, 0x18(%rsp)
mulsd %xmm0, %xmm0
movsd %xmm0, 0x40(%rsp)
mulsd %xmm1, %xmm0
divsd %xmm0, %xmm4
movsd %xmm4, (%rsp)
divsd %xmm0, %xmm5
movsd %xmm5, 0x10(%rsp)
callq 0xd3759
movapd %xmm0, %xmm1
mulsd 0x556e2(%rip), %xmm1    # 0x12a358
mulsd 0xb0(%rsp), %xmm1
divsd 0xa0(%rsp), %xmm1
movsd 0x195d0(%rip), %xmm0    # 0xee260
subsd 0x48(%rsp), %xmm0
movsd %xmm0, 0x90(%rsp)
divsd %xmm0, %xmm1
movsd %xmm1, 0x38(%rsp)
movsd (%rsp), %xmm0
divsd 0x556b2(%rip), %xmm0    # 0x12a368
divsd 0x38a0a(%rip), %xmm0    # 0x10d6c8
movsd %xmm0, (%rsp)
movsd 0x8(%rsp), %xmm0
divsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x60(%rsp)
callq 0xd3754
movapd %xmm0, 0x20(%rsp)
movsd 0x3d7e0(%rip), %xmm1    # 0x1124c8
movsd (%rsp), %xmm0
callq 0x8620
movaps %xmm0, 0x80(%rsp)
movsd 0x3d7d6(%rip), %xmm1    # 0x1124d8
movsd (%rsp), %xmm0
callq 0x8620
movaps %xmm0, 0x70(%rsp)
movsd 0x10(%rsp), %xmm0
divsd 0x55649(%rip), %xmm0    # 0x12a368
divsd 0x389a1(%rip), %xmm0    # 0x10d6c8
movsd %xmm0, (%rsp)
movsd 0x60(%rsp), %xmm0
callq 0xd3754
movaps %xmm0, 0x60(%rsp)
movsd (%rsp), %xmm0
movsd 0x3d77f(%rip), %xmm1    # 0x1124c8
callq 0x8620
movaps %xmm0, 0xc0(%rsp)
movsd (%rsp), %xmm0
movsd 0x3d775(%rip), %xmm1    # 0x1124d8
callq 0x8620
movapd 0x20(%rsp), %xmm1
unpcklpd 0x60(%rsp), %xmm1       # xmm1 = xmm1[0],mem[0]
mulpd 0x556d4(%rip), %xmm1    # 0x12a450
movapd %xmm1, %xmm2
movapd 0x80(%rsp), %xmm1
unpcklpd 0xc0(%rsp), %xmm1       # xmm1 = xmm1[0],mem[0]
movapd 0x70(%rsp), %xmm3
unpcklpd %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0]
mulpd 0x556bc(%rip), %xmm3    # 0x12a460
mulpd %xmm2, %xmm1
addpd 0x1cb80(%rip), %xmm3    # 0xf1930
divpd %xmm3, %xmm1
movapd 0x50(%rsp), %xmm0
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm1, %xmm0
movapd %xmm0, 0x50(%rsp)
movsd 0x8(%rsp), %xmm0
mulsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x80(%rsp)
callq 0xd3759
movapd %xmm0, %xmm3
mulsd 0x55562(%rip), %xmm3    # 0x12a350
movsd 0x10(%rsp), %xmm0
mulsd %xmm0, %xmm3
xorps %xmm1, %xmm1
sqrtsd %xmm0, %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
movsd %xmm1, (%rsp)
movapd %xmm1, %xmm0
jae 0xd4e29
movsd 0x10(%rsp), %xmm0
movsd %xmm3, 0x20(%rsp)
callq 0x82b0
movsd 0x20(%rsp), %xmm3
mulsd %xmm3, %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x5553d(%rip), %xmm0    # 0x12a378
divsd 0x10(%rsp), %xmm0
callq 0x8670
mulsd 0x20(%rsp), %xmm0
movapd 0x50(%rsp), %xmm1
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
movapd %xmm1, 0x20(%rsp)
mulsd %xmm0, %xmm1
movapd %xmm1, 0x70(%rsp)
movsd 0x40(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
callq 0xd3754
mulsd 0x554d3(%rip), %xmm0    # 0x12a360
mulsd 0x18(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
mulsd 0x1a7df(%rip), %xmm1    # 0xef680
movsd %xmm1, 0x38(%rsp)
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x40(%rsp), %xmm0
callq 0xd3754
mulsd 0x5549c(%rip), %xmm0    # 0x12a360
mulsd 0x18(%rsp), %xmm0
addsd 0x38(%rsp), %xmm0
addsd 0x70(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x80(%rsp), %xmm0
callq 0xd3759
movapd %xmm0, %xmm1
mulsd 0x55450(%rip), %xmm1    # 0x12a350
movsd 0x10(%rsp), %xmm0
mulsd %xmm0, %xmm1
ucomisd 0x19346(%rip), %xmm0    # 0xee258
jae 0xd4f30
movsd 0x10(%rsp), %xmm0
movsd %xmm1, 0x18(%rsp)
callq 0x82b0
movsd 0x18(%rsp), %xmm1
movsd %xmm0, (%rsp)
movsd (%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, (%rsp)
movsd 0x5543a(%rip), %xmm0    # 0x12a380
divsd 0x10(%rsp), %xmm0
callq 0x8670
mulsd (%rsp), %xmm0
movapd 0xa0(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd 0x90(%rsp), %xmm4
mulsd %xmm0, %xmm4
movsd 0x98(%rsp), %xmm3
mulsd 0x48(%rsp), %xmm3
subsd %xmm4, %xmm3
movapd 0x50(%rsp), %xmm2
movapd %xmm2, %xmm0
subsd 0x20(%rsp), %xmm0
xorpd 0x19295(%rip), %xmm1    # 0xee230
mulsd %xmm2, %xmm3
mulsd %xmm4, %xmm0
addsd %xmm3, %xmm0
mulsd %xmm1, %xmm0
movq 0xb8(%rbx), %rax
movsd 0x192a6(%rip), %xmm1    # 0xee260
movsd 0x8(%rsp), %xmm2
subsd %xmm2, %xmm1
mulsd 0x68(%rax), %xmm1
addsd 0x60(%rax), %xmm1
mulsd %xmm2, %xmm0
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movapd 0xb0(%rsp), %xmm0
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
divpd %xmm0, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
addq $0xd0, %rsp
popq %rbx
retq