// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/thermodynamics.c
// Function: thermodynamics_ionization_fractions
int thermodynamics_ionization_fractions(
                                        double z,
                                        double * y,
                                        struct background * pba,
                                        struct thermodynamics * pth,
                                        struct thermo_workspace * ptw,
                                        int current_ap
                                        ) {

  /** Summary: */

  /** Define local variables */
  struct thermo_diffeq_workspace * ptdw = ptw->ptdw;
  struct thermo_vector * ptv = ptdw->ptv;

  /* Thermo quantities */
  double x_H, x_He, xHeII, x=0., Tmat;
  /* Analytical quantities */
  double rhs, sqrt_val;

  /* Varying fundamental constants (according to 1705.03925) */
  double rescale_rhs = 1., rescale_T = 1.;
  double alpha = 1., me = 1.;

  if (pth->has_varconst == _TRUE_) {
    class_call(background_varconst_of_z(pba, z, &alpha, &me),
               pba->error_message,
               pth->error_message);
    rescale_rhs = alpha*alpha*alpha*me*me*me;
    rescale_T = 1./alpha/alpha/me;
  }

  /** - Calculate x_noreio from Recfast/Hyrec in each approximation
      regime. Store the results in the workspace. */
  /** - --> For credits, see external/wrap_recfast.c */

  /* Set Tmat from the y vector (it is always evolved). */
  Tmat = y[ptv->index_ti_D_Tmat] + ptw->Tcmb*(1.+z);
  if (pth->has_varconst == _TRUE_) {
    Tmat *= rescale_T;
  }

  /** - --> first regime: H and Helium fully ionized */
  if (current_ap == ptdw->index_ap_brec || (ptw->has_ap_idmtca && current_ap == ptdw->index_ap_idmtca)) {

    /* This is equivalent to the formula for HeIII --> HeII in Saha, just using rhs' = 1/rhs */
    rhs = ptw->SIunit_nH0/exp( 1.5*log(ptw->const_NR_numberdens*Tmat/(1.+z)/(1.+z)) - ptw->const_Tion_HeII/Tmat );
    if (pth->has_varconst == _TRUE_) {
      rhs /= rescale_rhs;
    }

    sqrt_val = sqrt(pow(1.-rhs*(1.+ptw->fHe),2) + 4.*rhs*(1.+2*ptw->fHe));

    x = 2.*(1+2.*ptw->fHe)/(1.-rhs*(1.+ptw->fHe) + sqrt_val);

    ptdw->x_H = 1.;
    ptdw->x_He = 1.;

  }
  /** - --> second regime: first Helium recombination (analytic approximation) */
  else if (current_ap == ptdw->index_ap_He1) {

    /* Assuming Saha equilibrium for HeIII --> HeII */
    rhs = exp( 1.5*log(ptw->const_NR_numberdens*Tmat/(1.+z)/(1.+z)) - ptw->const_Tion_HeII/Tmat ) / ptw->SIunit_nH0;
    if (pth->has_varconst == _TRUE_) {
      rhs *= rescale_rhs;
    }

    sqrt_val = sqrt(pow((rhs-1.-ptw->fHe),2) + 4.*(1.+2.*ptw->fHe)*rhs);

    x = 0.5*(sqrt_val - (rhs-1.-ptw->fHe));

    ptdw->x_H = 1.;
    ptdw->x_He = 1.;

  }
  /** - --> third regime: first Helium recombination finished, H and Helium fully ionized */
  else if (current_ap == ptdw->index_ap_He1f) {

    /* Assuming Saha equilibrium for HeII --> HeI with HII fully ionized, again expanding in rhs' = 1/rhs compared to below */
    rhs = 0.25*ptw->SIunit_nH0/exp( 1.5*log(ptw->const_NR_numberdens*Tmat/(1.+z)/(1.+z)) - ptw->const_Tion_HeI/Tmat );
    if (pth->has_varconst == _TRUE_) {
      rhs /= rescale_rhs;
    }

    sqrt_val = sqrt(pow(1.-rhs,2) + 4.*rhs*(1.+ptw->fHe));

    x = 2.*(1+ptw->fHe)/(1.-rhs + sqrt_val);

    ptdw->x_H = 1.;
    ptdw->x_He = 1.;

  }
  /** - --> fourth regime: second Helium recombination starts (analytic approximation) */
  else if (current_ap == ptdw->index_ap_He2) {

    /* Assuming Saha equilibrium for HeII --> HeI with HII fully ionized */
    rhs = 4.*exp(1.5*log(ptw->const_NR_numberdens*Tmat/(1.+z)/(1.+z)) - ptw->const_Tion_HeI/Tmat ) / ptw->SIunit_nH0;
    if (pth->has_varconst == _TRUE_) {
      rhs *= rescale_rhs;
    }

    sqrt_val = sqrt(pow((rhs-1.),2) + 4.*(1.+ptw->fHe)*rhs );

    x = 0.5*(sqrt_val - (rhs-1.));

    ptdw->x_H = 1.;
    ptdw->x_He = (x-1.)/ptw->fHe;

  }
  /** - --> fifth regime: Hydrogen recombination starts (analytic approximation)
      while Helium recombination continues (full equation) */
  else if (current_ap == ptdw->index_ap_H) {

    rhs = exp(1.5*log(ptw->const_NR_numberdens*Tmat/(1.+z)/(1.+z)) - ptw->const_Tion_H/Tmat)/ptw->SIunit_nH0;
    if (pth->has_varconst == _TRUE_) {
      rhs *= rescale_rhs;
    }

    /* Assuming Saha equilibrium for HII->HI. Includes xHeII corrections from incomplete recombination of HeII --> HeI (non-zero x_HeII) */
    xHeII = y[ptv->index_ti_x_He]*ptw->fHe;
    x_H = 2./(1.+xHeII/rhs + sqrt((1.+xHeII/rhs)*(1.+xHeII/rhs)+4./rhs));

    x_He = y[ptv->index_ti_x_He];
    x = x_H + ptw->fHe * x_He;

    ptdw->x_H = x_H;
    ptdw->x_He = x_He;

  }
  /** - --> sixth regime: full Hydrogen and Helium equations */
  else if (current_ap == ptdw->index_ap_frec) {
    x_H = y[ptv->index_ti_x_H];
    x_He = y[ptv->index_ti_x_He];
    x = x_H + ptw->fHe * x_He;

    ptdw->x_H = x_H;
    ptdw->x_He = x_He;

  }
  /** - --> seventh regime: calculate x_noreio during reionization
      (i.e. x before taking reionisation into account) */
  else if (current_ap == ptdw->index_ap_reio) {

    x_H = y[ptv->index_ti_x_H];
    x_He = y[ptv->index_ti_x_He];
    x = x_H + ptw->fHe * x_He;

    ptdw->x_H = x_H;
    ptdw->x_He = x_He;

  }

  ptdw->x_noreio = x;

  /** - If z is during reionization, also calculate the reionized x */
  if (current_ap == ptdw->index_ap_reio) {

    /* set x from the evolver (which is very low ~10^-4) as 'xe_before' */
    ptw->ptrp->reionization_parameters[ptw->ptrp->index_re_xe_before] = x;

    /* compute x */
    class_call(thermodynamics_reionization_function(z,pth,ptw->ptrp,&x),
               pth->error_message,
               pth->error_message);
  }

  ptdw->x_reio = x;

  return _SUCCESS_;
}

// Assembly:
subq $0x10c8, %rsp           # imm = 0x10C8
movsd %xmm0, 0x10b8(%rsp)
movq %rdi, 0x10b0(%rsp)
movq %rsi, 0x10a8(%rsp)
movq %rdx, 0x10a0(%rsp)
movq %rcx, 0x1098(%rsp)
movl %r8d, 0x1094(%rsp)
movq 0x1098(%rsp), %rax
movq 0x80(%rax), %rax
movq %rax, 0x1088(%rsp)
movq 0x1088(%rsp), %rax
movq 0xb8(%rax), %rax
movq %rax, 0x1080(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x1060(%rsp)
movsd 0x10de8e(%rip), %xmm0   # 0x1d2248
movsd %xmm0, 0x1040(%rsp)
movsd 0x10de7d(%rip), %xmm0   # 0x1d2248
movsd %xmm0, 0x1038(%rsp)
movsd 0x10de6c(%rip), %xmm0   # 0x1d2248
movsd %xmm0, 0x1030(%rsp)
movsd 0x10de5b(%rip), %xmm0   # 0x1d2248
movsd %xmm0, 0x1028(%rsp)
movq 0x10a0(%rsp), %rax
movswl 0xe78(%rax), %eax
cmpl $0x1, %eax
jne 0xc4511
movq 0x10a8(%rsp), %rdi
movsd 0x10b8(%rsp), %xmm0
leaq 0x1030(%rsp), %rsi
leaq 0x1028(%rsp), %rdx
callq 0xa2870
cmpl $0x1, %eax
jne 0xc44a6
leaq 0x820(%rsp), %rdi
movq 0x10a8(%rsp), %rcx
addq $0xd1c, %rcx            # imm = 0xD1C
leaq 0x10df81(%rip), %rsi    # 0x1d23d8
leaq 0x12d1d2(%rip), %rdx    # 0x1f1630
movb $0x0, %al
callq 0x5b9c0
movq 0x10a0(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x820(%rsp), %r8
leaq 0x10dbb1(%rip), %rsi    # 0x1d2034
leaq 0x13172e(%rip), %rdx    # 0x1f5bb8
movl $0xf8b, %ecx            # imm = 0xF8B
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x10c4(%rsp)
jmp 0xc524f
movsd 0x1030(%rsp), %xmm0
mulsd 0x1030(%rsp), %xmm0
mulsd 0x1030(%rsp), %xmm0
mulsd 0x1028(%rsp), %xmm0
mulsd 0x1028(%rsp), %xmm0
mulsd 0x1028(%rsp), %xmm0
movsd %xmm0, 0x1040(%rsp)
movsd 0x10dd5b(%rip), %xmm0   # 0x1d2248
divsd 0x1030(%rsp), %xmm0
divsd 0x1030(%rsp), %xmm0
divsd 0x1028(%rsp), %xmm0
movsd %xmm0, 0x1038(%rsp)
movq 0x10b0(%rsp), %rax
movq 0x1080(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x1098(%rsp), %rax
movsd 0x38(%rax), %xmm0
movsd 0x10dd09(%rip), %xmm2   # 0x1d2248
addsd 0x10b8(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x1058(%rsp)
movq 0x10a0(%rsp), %rax
movswl 0xe78(%rax), %eax
cmpl $0x1, %eax
jne 0xc4588
movsd 0x1038(%rsp), %xmm0
mulsd 0x1058(%rsp), %xmm0
movsd %xmm0, 0x1058(%rsp)
movl 0x1094(%rsp), %eax
movq 0x1088(%rsp), %rcx
cmpl 0x74(%rcx), %eax
je 0xc45c9
movq 0x1098(%rsp), %rax
movswl 0x60(%rax), %eax
cmpl $0x0, %eax
je 0xc47f7
movl 0x1094(%rsp), %eax
movq 0x1088(%rsp), %rcx
cmpl 0x70(%rcx), %eax
jne 0xc47f7
movq 0x1098(%rsp), %rax
movsd 0x30(%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x1098(%rsp), %rax
movsd 0x40(%rax), %xmm0
mulsd 0x1058(%rsp), %xmm0
movsd 0x10dc4e(%rip), %xmm1   # 0x1d2248
addsd 0x10b8(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd 0x10dc39(%rip), %xmm1   # 0x1d2248
addsd 0x10b8(%rsp), %xmm1
divsd %xmm1, %xmm0
callq 0x82f0
movq 0x1098(%rsp), %rax
movsd 0x58(%rax), %xmm1
divsd 0x1058(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x10e5fa(%rip), %xmm2   # 0x1d2c50
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x8670
movaps %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x1050(%rsp)
movq 0x10a0(%rsp), %rax
movswl 0xe78(%rax), %eax
cmpl $0x1, %eax
jne 0xc46ac
movsd 0x1040(%rsp), %xmm1
movsd 0x1050(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x1050(%rsp)
movsd 0x1050(%rsp), %xmm0
movq 0x1098(%rsp), %rax
movsd 0x10db83(%rip), %xmm1   # 0x1d2248
addsd 0x20(%rax), %xmm1
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm1, %xmm0
movsd 0x10db5b(%rip), %xmm1   # 0x1d2248
addsd %xmm1, %xmm0
movsd 0x10e587(%rip), %xmm1   # 0x1d2c80
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x110dbf(%rip), %xmm0   # 0x1d54c8
mulsd 0x1050(%rsp), %xmm0
movq 0x1098(%rsp), %rax
movsd 0x20(%rax), %xmm2
addsd %xmm2, %xmm2
movsd 0x10db1d(%rip), %xmm3   # 0x1d2248
addsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x82e0
movsd %xmm0, 0x1048(%rsp)
movq 0x1098(%rsp), %rax
movsd 0x20(%rax), %xmm1
addsd %xmm1, %xmm1
movsd 0x10daea(%rip), %xmm0   # 0x1d2248
addsd %xmm0, %xmm1
movsd 0x10e516(%rip), %xmm0   # 0x1d2c80
mulsd %xmm1, %xmm0
movsd 0x1050(%rsp), %xmm1
movq 0x1098(%rsp), %rax
movsd 0x10dac1(%rip), %xmm2   # 0x1d2248
addsd 0x20(%rax), %xmm2
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm1
movsd 0x10da99(%rip), %xmm2   # 0x1d2248
addsd %xmm2, %xmm1
addsd 0x1048(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x1060(%rsp)
movq 0x1088(%rsp), %rax
movsd 0x10da6f(%rip), %xmm0   # 0x1d2248
movsd %xmm0, (%rax)
movq 0x1088(%rsp), %rax
movsd 0x10da5b(%rip), %xmm0   # 0x1d2248
movsd %xmm0, 0x8(%rax)
jmp 0xc5131
movl 0x1094(%rsp), %eax
movq 0x1088(%rsp), %rcx
cmpl 0x78(%rcx), %eax
jne 0xc49c7
movq 0x1098(%rsp), %rax
movsd 0x40(%rax), %xmm0
mulsd 0x1058(%rsp), %xmm0
movsd 0x10da1b(%rip), %xmm1   # 0x1d2248
addsd 0x10b8(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd 0x10da06(%rip), %xmm1   # 0x1d2248
addsd 0x10b8(%rsp), %xmm1
divsd %xmm1, %xmm0
callq 0x82f0
movq 0x1098(%rsp), %rax
movsd 0x58(%rax), %xmm1
divsd 0x1058(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x10e3c7(%rip), %xmm2   # 0x1d2c50
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x8670
movq 0x1098(%rsp), %rax
divsd 0x30(%rax), %xmm0
movsd %xmm0, 0x1050(%rsp)
movq 0x10a0(%rsp), %rax
movswl 0xe78(%rax), %eax
cmpl $0x1, %eax
jne 0xc48db
movsd 0x1040(%rsp), %xmm0
mulsd 0x1050(%rsp), %xmm0
movsd %xmm0, 0x1050(%rsp)
movsd 0x1050(%rsp), %xmm0
movsd 0x10d95c(%rip), %xmm1   # 0x1d2248
subsd %xmm1, %xmm0
movq 0x1098(%rsp), %rax
subsd 0x20(%rax), %xmm0
movsd 0x10e37b(%rip), %xmm1   # 0x1d2c80
callq 0x8610
movaps %xmm0, %xmm1
movq 0x1098(%rsp), %rax
movsd 0x20(%rax), %xmm2
addsd %xmm2, %xmm2
movsd 0x10d922(%rip), %xmm0   # 0x1d2248
addsd %xmm0, %xmm2
movsd 0x110b96(%rip), %xmm0   # 0x1d54c8
mulsd %xmm2, %xmm0
movsd 0x1050(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x82e0
movsd %xmm0, 0x1048(%rsp)
movsd 0x1048(%rsp), %xmm1
movsd 0x1050(%rsp), %xmm0
movsd 0x10d8d9(%rip), %xmm2   # 0x1d2248
subsd %xmm2, %xmm0
movq 0x1098(%rsp), %rax
subsd 0x20(%rax), %xmm0
subsd %xmm0, %xmm1
movsd 0x10e2fc(%rip), %xmm0   # 0x1d2c88
mulsd %xmm1, %xmm0
movsd %xmm0, 0x1060(%rsp)
movq 0x1088(%rsp), %rax
movsd 0x10d89f(%rip), %xmm0   # 0x1d2248
movsd %xmm0, (%rax)
movq 0x1088(%rsp), %rax
movsd 0x10d88b(%rip), %xmm0   # 0x1d2248
movsd %xmm0, 0x8(%rax)
jmp 0xc512f
movl 0x1094(%rsp), %eax
movq 0x1088(%rsp), %rcx
cmpl 0x7c(%rcx), %eax
jne 0xc4b9d
movq 0x1098(%rsp), %rax
movsd 0x10e2d1(%rip), %xmm0   # 0x1d2cc0
mulsd 0x30(%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x1098(%rsp), %rax
movsd 0x40(%rax), %xmm0
mulsd 0x1058(%rsp), %xmm0
movsd 0x10d830(%rip), %xmm1   # 0x1d2248
addsd 0x10b8(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd 0x10d81b(%rip), %xmm1   # 0x1d2248
addsd 0x10b8(%rsp), %xmm1
divsd %xmm1, %xmm0
callq 0x82f0
movq 0x1098(%rsp), %rax
movsd 0x50(%rax), %xmm1
divsd 0x1058(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x10e1dc(%rip), %xmm2   # 0x1d2c50
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x8670
movaps %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x1050(%rsp)
movq 0x10a0(%rsp), %rax
movswl 0xe78(%rax), %eax
cmpl $0x1, %eax
jne 0xc4aca
movsd 0x1040(%rsp), %xmm1
movsd 0x1050(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x1050(%rsp)
movsd 0x10d776(%rip), %xmm0   # 0x1d2248
subsd 0x1050(%rsp), %xmm0
movsd 0x10e19d(%rip), %xmm1   # 0x1d2c80
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x1109d5(%rip), %xmm0   # 0x1d54c8
mulsd 0x1050(%rsp), %xmm0
movq 0x1098(%rsp), %rax
movsd 0x10d73c(%rip), %xmm2   # 0x1d2248
addsd 0x20(%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x82e0
movsd %xmm0, 0x1048(%rsp)
movq 0x1098(%rsp), %rax
movsd 0x10d711(%rip), %xmm1   # 0x1d2248
addsd 0x20(%rax), %xmm1
movsd 0x10e13c(%rip), %xmm0   # 0x1d2c80
mulsd %xmm1, %xmm0
movsd 0x10d6f8(%rip), %xmm1   # 0x1d2248
subsd 0x1050(%rsp), %xmm1
addsd 0x1048(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x1060(%rsp)
movq 0x1088(%rsp), %rax
movsd 0x10d6c9(%rip), %xmm0   # 0x1d2248
movsd %xmm0, (%rax)
movq 0x1088(%rsp), %rax
movsd 0x10d6b5(%rip), %xmm0   # 0x1d2248
movsd %xmm0, 0x8(%rax)
jmp 0xc512d
movl 0x1094(%rsp), %eax
movq 0x1088(%rsp), %rcx
cmpl 0x80(%rcx), %eax
jne 0xc4d77
movq 0x1098(%rsp), %rax
movsd 0x40(%rax), %xmm0
mulsd 0x1058(%rsp), %xmm0
movsd 0x10d672(%rip), %xmm1   # 0x1d2248
addsd 0x10b8(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd 0x10d65d(%rip), %xmm1   # 0x1d2248
addsd 0x10b8(%rsp), %xmm1
divsd %xmm1, %xmm0
callq 0x82f0
movq 0x1098(%rsp), %rax
movsd 0x50(%rax), %xmm1
divsd 0x1058(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x10e01e(%rip), %xmm2   # 0x1d2c50
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x8670
movaps %xmm0, %xmm1
movsd 0x11087e(%rip), %xmm0   # 0x1d54c8
mulsd %xmm1, %xmm0
movq 0x1098(%rsp), %rax
divsd 0x30(%rax), %xmm0
movsd %xmm0, 0x1050(%rsp)
movq 0x10a0(%rsp), %rax
movswl 0xe78(%rax), %eax
cmpl $0x1, %eax
jne 0xc4c93
movsd 0x1040(%rsp), %xmm0
mulsd 0x1050(%rsp), %xmm0
movsd %xmm0, 0x1050(%rsp)
movsd 0x1050(%rsp), %xmm0
movsd 0x10d5a4(%rip), %xmm1   # 0x1d2248
subsd %xmm1, %xmm0
movsd 0x10dfd0(%rip), %xmm1   # 0x1d2c80
callq 0x8610
movaps %xmm0, %xmm1
movq 0x1098(%rsp), %rax
movsd 0x10d580(%rip), %xmm2   # 0x1d2248
addsd 0x20(%rax), %xmm2
movsd 0x1107f3(%rip), %xmm0   # 0x1d54c8
mulsd %xmm2, %xmm0
movsd 0x1050(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x82e0
movsd %xmm0, 0x1048(%rsp)
movsd 0x1048(%rsp), %xmm1
movsd 0x1050(%rsp), %xmm0
movsd 0x10d536(%rip), %xmm2   # 0x1d2248
subsd %xmm2, %xmm0
subsd %xmm0, %xmm1
movsd 0x10df66(%rip), %xmm0   # 0x1d2c88
mulsd %xmm1, %xmm0
movsd %xmm0, 0x1060(%rsp)
movq 0x1088(%rsp), %rax
movsd 0x10d509(%rip), %xmm0   # 0x1d2248
movsd %xmm0, (%rax)
movsd 0x1060(%rsp), %xmm0
movsd 0x10d4f4(%rip), %xmm1   # 0x1d2248
subsd %xmm1, %xmm0
movq 0x1098(%rsp), %rax
divsd 0x20(%rax), %xmm0
movq 0x1088(%rsp), %rax
movsd %xmm0, 0x8(%rax)
jmp 0xc512b
movl 0x1094(%rsp), %eax
movq 0x1088(%rsp), %rcx
cmpl 0x84(%rcx), %eax
jne 0xc4fac
movq 0x1098(%rsp), %rax
movsd 0x40(%rax), %xmm0
mulsd 0x1058(%rsp), %xmm0
movsd 0x10d498(%rip), %xmm1   # 0x1d2248
addsd 0x10b8(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd 0x10d483(%rip), %xmm1   # 0x1d2248
addsd 0x10b8(%rsp), %xmm1
divsd %xmm1, %xmm0
callq 0x82f0
movq 0x1098(%rsp), %rax
movsd 0x48(%rax), %xmm1
divsd 0x1058(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x10de44(%rip), %xmm2   # 0x1d2c50
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x8670
movq 0x1098(%rsp), %rax
divsd 0x30(%rax), %xmm0
movsd %xmm0, 0x1050(%rsp)
movq 0x10a0(%rsp), %rax
movswl 0xe78(%rax), %eax
cmpl $0x1, %eax
jne 0xc4e5e
movsd 0x1040(%rsp), %xmm0
mulsd 0x1050(%rsp), %xmm0
movsd %xmm0, 0x1050(%rsp)
movq 0x10b0(%rsp), %rax
movq 0x1080(%rsp), %rcx
movslq 0x8(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x1098(%rsp), %rax
mulsd 0x20(%rax), %xmm0
movsd %xmm0, 0x1068(%rsp)
movsd 0x1068(%rsp), %xmm1
divsd 0x1050(%rsp), %xmm1
movsd 0x10d3a1(%rip), %xmm0   # 0x1d2248
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x1068(%rsp), %xmm1
divsd 0x1050(%rsp), %xmm1
movsd 0x10d37d(%rip), %xmm0   # 0x1d2248
addsd %xmm1, %xmm0
movsd 0x1068(%rsp), %xmm1
divsd 0x1050(%rsp), %xmm1
movsd 0x10d35f(%rip), %xmm2   # 0x1d2248
addsd %xmm1, %xmm2
movsd 0x1105d3(%rip), %xmm1   # 0x1d54c8
divsd 0x1050(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x82e0
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd 0x10dd63(%rip), %xmm0   # 0x1d2c80
divsd %xmm1, %xmm0
movsd %xmm0, 0x1078(%rsp)
movq 0x10b0(%rsp), %rax
movq 0x1080(%rsp), %rcx
movslq 0x8(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x1070(%rsp)
movsd 0x1078(%rsp), %xmm1
movq 0x1098(%rsp), %rax
movsd 0x20(%rax), %xmm0
movsd 0x1070(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x1060(%rsp)
movsd 0x1078(%rsp), %xmm0
movq 0x1088(%rsp), %rax
movsd %xmm0, (%rax)
movsd 0x1070(%rsp), %xmm0
movq 0x1088(%rsp), %rax
movsd %xmm0, 0x8(%rax)
jmp 0xc5129
movl 0x1094(%rsp), %eax
movq 0x1088(%rsp), %rcx
cmpl 0x88(%rcx), %eax
jne 0xc506b
movq 0x10b0(%rsp), %rax
movq 0x1080(%rsp), %rcx
movslq 0x4(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x1078(%rsp)
movq 0x10b0(%rsp), %rax
movq 0x1080(%rsp), %rcx
movslq 0x8(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x1070(%rsp)
movsd 0x1078(%rsp), %xmm1
movq 0x1098(%rsp), %rax
movsd 0x20(%rax), %xmm0
movsd 0x1070(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x1060(%rsp)
movsd 0x1078(%rsp), %xmm0
movq 0x1088(%rsp), %rax
movsd %xmm0, (%rax)
movsd 0x1070(%rsp), %xmm0
movq 0x1088(%rsp), %rax
movsd %xmm0, 0x8(%rax)
jmp 0xc5127
movl 0x1094(%rsp), %eax
movq 0x1088(%rsp), %rcx
cmpl 0x8c(%rcx), %eax
jne 0xc5125
movq 0x10b0(%rsp), %rax
movq 0x1080(%rsp), %rcx
movslq 0x4(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x1078(%rsp)
movq 0x10b0(%rsp), %rax
movq 0x1080(%rsp), %rcx
movslq 0x8(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x1070(%rsp)
movsd 0x1078(%rsp), %xmm1
movq 0x1098(%rsp), %rax
movsd 0x20(%rax), %xmm0
movsd 0x1070(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x1060(%rsp)
movsd 0x1078(%rsp), %xmm0
movq 0x1088(%rsp), %rax
movsd %xmm0, (%rax)
movsd 0x1070(%rsp), %xmm0
movq 0x1088(%rsp), %rax
movsd %xmm0, 0x8(%rax)
jmp 0xc5127
jmp 0xc5129
jmp 0xc512b
jmp 0xc512d
jmp 0xc512f
jmp 0xc5131
movsd 0x1060(%rsp), %xmm0
movq 0x1088(%rsp), %rax
movsd %xmm0, 0x10(%rax)
movl 0x1094(%rsp), %eax
movq 0x1088(%rsp), %rcx
cmpl 0x8c(%rcx), %eax
jne 0xc522e
movsd 0x1060(%rsp), %xmm0
movq 0x1098(%rsp), %rax
movq 0x88(%rax), %rax
movq 0x38(%rax), %rax
movq 0x1098(%rsp), %rcx
movq 0x88(%rcx), %rcx
movslq 0xc(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x10b8(%rsp), %xmm0
movq 0x10a0(%rsp), %rdi
movq 0x1098(%rsp), %rax
movq 0x88(%rax), %rsi
leaq 0x1060(%rsp), %rdx
callq 0xc5ac0
cmpl $0x1, %eax
jne 0xc522c
leaq 0x20(%rsp), %rdi
movq 0x10a0(%rsp), %rcx
addq $0x1064, %rcx           # imm = 0x1064
leaq 0x10d1f5(%rip), %rsi    # 0x1d23d8
leaq 0x1309f2(%rip), %rdx    # 0x1f5bdc
movb $0x0, %al
callq 0x5b9c0
movq 0x10a0(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x20(%rsp), %r8
leaq 0x10ce28(%rip), %rsi    # 0x1d2034
leaq 0x1309a5(%rip), %rdx    # 0x1f5bb8
movl $0x1014, %ecx           # imm = 0x1014
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x10c4(%rsp)
jmp 0xc524f
jmp 0xc522e
movsd 0x1060(%rsp), %xmm0
movq 0x1088(%rsp), %rax
movsd %xmm0, 0x18(%rax)
movl $0x0, 0x10c4(%rsp)
movl 0x10c4(%rsp), %eax
addq $0x10c8, %rsp           # imm = 0x10C8
retq
nop