// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../external/HyRec2020/hydrogen.c
// Function: fplus_from_fminus
void fplus_from_fminus(double Dfplus[NVIRT], double Dfplus_Ly[], double **Dfminus_hist, double **Dfminus_Ly_hist,
                       double TR, double zstart, unsigned iz, double z, double Eb_tab[NVIRT]) {
  unsigned b;
  double ainv, lna_start, zp1;

  zp1 = 1.+z;
  lna_start = -log(1.+zstart);

  /*** Bins below Lyman alpha ***/
  for (b = 0; b < NSUBLYA-1; b++) {
    ainv = zp1*Eb_tab[b+1]/Eb_tab[b];
    Dfplus[b] = interp_Dfnu(lna_start, DLNA_HYREC, Dfminus_hist[b+1], iz, -log(ainv));
  }

  /*** highest bin below Ly-alpha: feedback from optically thick Ly-alpha ***/
  b = NSUBLYA-1;
  ainv = zp1*E21/Eb_tab[b];
  Dfplus[b] = interp_Dfnu(lna_start, DLNA_HYREC, Dfminus_Ly_hist[0], iz, -log(ainv));

  /*** incoming photon occupation number at Lyman alpha ***/
  b = NSUBLYA;     /* next highest bin */
  ainv = zp1*Eb_tab[b]/E21;
  Dfplus_Ly[0] = interp_Dfnu(lna_start, DLNA_HYREC, Dfminus_hist[b], iz, -log(ainv));

  /*** Bins between Lyman alpha and beta ***/
  for (b = NSUBLYA; b < NSUBLYB-1; b++) {
    ainv = zp1*Eb_tab[b+1]/Eb_tab[b];
    Dfplus[b] = interp_Dfnu(lna_start, DLNA_HYREC, Dfminus_hist[b+1], iz, -log(ainv));
  }

  /*** highest bin below Ly-beta: feedback from Ly-beta ***/
  b = NSUBLYB-1;
  ainv = zp1*E31/Eb_tab[b];
  Dfplus[b] = interp_Dfnu(lna_start, DLNA_HYREC, Dfminus_Ly_hist[1], iz, -log(ainv));

  /*** incoming photon occupation number at Lyman beta ***/
  b = NSUBLYB;     /* next highest bin */
  ainv = zp1*Eb_tab[b]/E31;
  Dfplus_Ly[1] = interp_Dfnu(lna_start, DLNA_HYREC, Dfminus_hist[b], iz, -log(ainv));

  /*** Bins between Lyman beta and gamma ***/
  for (b = NSUBLYB; b < NVIRT-1; b++) {
    ainv = zp1*Eb_tab[b+1]/Eb_tab[b];
    Dfplus[b] = interp_Dfnu(lna_start, DLNA_HYREC, Dfminus_hist[b+1], iz, -log(ainv));
  }

  /*** highest energy bin: feedback from Ly-gamma ***/
  b = NVIRT-1;
  ainv = zp1*E41/Eb_tab[b];
  Dfplus[b] = interp_Dfnu(lna_start, DLNA_HYREC, Dfminus_Ly_hist[2], iz, -log(ainv));

}

// Assembly:
subq $0x128, %rsp            # imm = 0x128
movq %rdi, 0x120(%rsp)
movq %rsi, 0x118(%rsp)
movq %rdx, 0x110(%rsp)
movq %rcx, 0x108(%rsp)
movsd %xmm0, 0x100(%rsp)
movsd %xmm1, 0xf8(%rsp)
movl %r8d, 0xf4(%rsp)
movsd %xmm2, 0xe8(%rsp)
movq %r9, 0xe0(%rsp)
movsd 0x25e7e(%rip), %xmm0    # 0x1d2248
addsd 0xe8(%rsp), %xmm0
movsd %xmm0, 0xc0(%rsp)
movsd 0x25e64(%rip), %xmm0    # 0x1d2248
addsd 0xf8(%rsp), %xmm0
callq 0x82f0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0xc8(%rsp)
movl $0x0, 0xdc(%rsp)
cmpl $0x8b, 0xdc(%rsp)
jae 0x1ac524
movsd 0xc0(%rsp), %xmm0
movq 0xe0(%rsp), %rax
movl 0xdc(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
mulsd (%rax,%rcx,8), %xmm0
movq 0xe0(%rsp), %rax
movl 0xdc(%rsp), %ecx
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0xd0(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0xb8(%rsp)
movq 0x110(%rsp), %rax
movl 0xdc(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0xa8(%rsp)
movl 0xf4(%rsp), %eax
movl %eax, 0xb4(%rsp)
movsd 0xd0(%rsp), %xmm0
callq 0x82f0
movq 0xa8(%rsp), %rdi
movl 0xb4(%rsp), %esi
movaps %xmm0, %xmm1
movsd 0xb8(%rsp), %xmm0
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movsd 0x62483(%rip), %xmm1    # 0x20e978
callq 0x1ac220
movq 0x120(%rsp), %rax
movl 0xdc(%rsp), %ecx
movsd %xmm0, (%rax,%rcx,8)
movl 0xdc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xdc(%rsp)
jmp 0x1ac41d
movl $0x8b, 0xdc(%rsp)
movsd 0x62401(%rip), %xmm0    # 0x20e938
mulsd 0xc0(%rsp), %xmm0
movq 0xe0(%rsp), %rax
movl 0xdc(%rsp), %ecx
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0xd0(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0x88(%rsp)
movq 0x108(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x78(%rsp)
movl 0xf4(%rsp), %eax
movl %eax, 0x84(%rsp)
movsd 0xd0(%rsp), %xmm0
callq 0x82f0
movq 0x78(%rsp), %rdi
movl 0x84(%rsp), %esi
movaps %xmm0, %xmm1
movsd 0x88(%rsp), %xmm0
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movsd 0x623a6(%rip), %xmm1    # 0x20e978
callq 0x1ac220
movq 0x120(%rsp), %rax
movl 0xdc(%rsp), %ecx
movsd %xmm0, (%rax,%rcx,8)
movl $0x8c, 0xdc(%rsp)
movsd 0xc0(%rsp), %xmm0
movq 0xe0(%rsp), %rax
movl 0xdc(%rsp), %ecx
mulsd (%rax,%rcx,8), %xmm0
movsd 0x6231d(%rip), %xmm1    # 0x20e938
divsd %xmm1, %xmm0
movsd %xmm0, 0xd0(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0xa0(%rsp)
movq 0x110(%rsp), %rax
movl 0xdc(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x90(%rsp)
movl 0xf4(%rsp), %eax
movl %eax, 0x9c(%rsp)
movsd 0xd0(%rsp), %xmm0
callq 0x82f0
movq 0x90(%rsp), %rdi
movl 0x9c(%rsp), %esi
movaps %xmm0, %xmm1
movsd 0xa0(%rsp), %xmm0
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movsd 0x622cd(%rip), %xmm1    # 0x20e978
callq 0x1ac220
movq 0x118(%rsp), %rax
movsd %xmm0, (%rax)
movl $0x8c, 0xdc(%rsp)
cmpl $0x10e, 0xdc(%rsp) # imm = 0x10E
jae 0x1ac7bc
movsd 0xc0(%rsp), %xmm0
movq 0xe0(%rsp), %rax
movl 0xdc(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
mulsd (%rax,%rcx,8), %xmm0
movq 0xe0(%rsp), %rax
movl 0xdc(%rsp), %ecx
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0xd0(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0x70(%rsp)
movq 0x110(%rsp), %rax
movl 0xdc(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x60(%rsp)
movl 0xf4(%rsp), %eax
movl %eax, 0x6c(%rsp)
movsd 0xd0(%rsp), %xmm0
callq 0x82f0
movq 0x60(%rsp), %rdi
movl 0x6c(%rsp), %esi
movaps %xmm0, %xmm1
movsd 0x70(%rsp), %xmm0
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movsd 0x621eb(%rip), %xmm1    # 0x20e978
callq 0x1ac220
movq 0x120(%rsp), %rax
movl 0xdc(%rsp), %ecx
movsd %xmm0, (%rax,%rcx,8)
movl 0xdc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xdc(%rsp)
jmp 0x1ac6c7
movl $0x10e, 0xdc(%rsp) # imm = 0x10E
movsd 0x621a1(%rip), %xmm0    # 0x20e970
mulsd 0xc0(%rsp), %xmm0
movq 0xe0(%rsp), %rax
movl 0xdc(%rsp), %ecx
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0xd0(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0x108(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x30(%rsp)
movl 0xf4(%rsp), %eax
movl %eax, 0x3c(%rsp)
movsd 0xd0(%rsp), %xmm0
callq 0x82f0
movq 0x30(%rsp), %rdi
movl 0x3c(%rsp), %esi
movaps %xmm0, %xmm1
movsd 0x40(%rsp), %xmm0
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movsd 0x62119(%rip), %xmm1    # 0x20e978
callq 0x1ac220
movq 0x120(%rsp), %rax
movl 0xdc(%rsp), %ecx
movsd %xmm0, (%rax,%rcx,8)
movl $0x10f, 0xdc(%rsp) # imm = 0x10F
movsd 0xc0(%rsp), %xmm0
movq 0xe0(%rsp), %rax
movl 0xdc(%rsp), %ecx
mulsd (%rax,%rcx,8), %xmm0
movsd 0x620c8(%rip), %xmm1    # 0x20e970
divsd %xmm1, %xmm0
movsd %xmm0, 0xd0(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
movq 0x110(%rsp), %rax
movl 0xdc(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x48(%rsp)
movl 0xf4(%rsp), %eax
movl %eax, 0x54(%rsp)
movsd 0xd0(%rsp), %xmm0
callq 0x82f0
movq 0x48(%rsp), %rdi
movl 0x54(%rsp), %esi
movaps %xmm0, %xmm1
movsd 0x58(%rsp), %xmm0
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movsd 0x62052(%rip), %xmm1    # 0x20e978
callq 0x1ac220
movq 0x118(%rsp), %rax
movsd %xmm0, 0x8(%rax)
movl $0x10f, 0xdc(%rsp) # imm = 0x10F
cmpl $0x136, 0xdc(%rsp) # imm = 0x136
jae 0x1aca38
movsd 0xc0(%rsp), %xmm0
movq 0xe0(%rsp), %rax
movl 0xdc(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
mulsd (%rax,%rcx,8), %xmm0
movq 0xe0(%rsp), %rax
movl 0xdc(%rsp), %ecx
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0xd0(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x110(%rsp), %rax
movl 0xdc(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x18(%rsp)
movl 0xf4(%rsp), %eax
movl %eax, 0x24(%rsp)
movsd 0xd0(%rsp), %xmm0
callq 0x82f0
movq 0x18(%rsp), %rdi
movl 0x24(%rsp), %esi
movaps %xmm0, %xmm1
movsd 0x28(%rsp), %xmm0
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movsd 0x61f6f(%rip), %xmm1    # 0x20e978
callq 0x1ac220
movq 0x120(%rsp), %rax
movl 0xdc(%rsp), %ecx
movsd %xmm0, (%rax,%rcx,8)
movl 0xdc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xdc(%rsp)
jmp 0x1ac943
movl $0x136, 0xdc(%rsp) # imm = 0x136
movsd 0x61f1d(%rip), %xmm0    # 0x20e968
mulsd 0xc0(%rsp), %xmm0
movq 0xe0(%rsp), %rax
movl 0xdc(%rsp), %ecx
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0xd0(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x108(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, (%rsp)
movl 0xf4(%rsp), %eax
movl %eax, 0xc(%rsp)
movsd 0xd0(%rsp), %xmm0
callq 0x82f0
movq (%rsp), %rdi
movl 0xc(%rsp), %esi
movaps %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movsd 0x61e9f(%rip), %xmm1    # 0x20e978
callq 0x1ac220
movq 0x120(%rsp), %rax
movl 0xdc(%rsp), %ecx
movsd %xmm0, (%rax,%rcx,8)
addq $0x128, %rsp            # imm = 0x128
retq
nopw (%rax,%rax)