// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../external/RecfastCLASS/wrap_recfast.c
// Function: recfast_dx_He_dz
int recfast_dx_He_dz(struct thermodynamics* pth, struct thermorecfast * pre, double x_He, double x, double x_H, double nH,
                     double z, double Hz, double Tmat, double Trad,
                     double* dxHe_dz) {

  /** Define local variables */
  double Rdown_trip,Rup_trip,tauHe_s,pHe_s,tauHe_t,pHe_t,CL_PSt;
  double Doppler,gamma_2Ps,gamma_2Pt,pb,qb,AHcon;
  double sq_0,sq_1;
  double K_He,Rup_He,Rdown_He,He_Boltz;
  double CfHe_t=0.;
  double C_He;
  double n_He;
  int Heflag;

  /* Einstein coefficient of 2s -> 1s transition in helium */
  double A2s1sHe = _Lambda_He_;

  /* This is just to prevent the compiler complaining:
     Technically Rdown_trip/Rup_trip should always be fine */
  Rdown_trip = 0.; Rup_trip = 0.;

  /* Varying fundamental constants */
  if (pth->has_varconst == _TRUE_) {
    /** - Rescale temperatures by factor alpha^2 * m_e (see e.g. 1705.03925) */
    Tmat /= pre->fsR*pre->fsR*pre->meR;
    Trad /= pre->fsR*pre->fsR*pre->meR;
  }

  /** - Local variables and coefficients */
  n_He = pre->fHe * nH;
  sq_0 = sqrt(Tmat/_T_0_);
  sq_1 = sqrt(Tmat/_T_1_);

  Rdown_He = _a_VF_/(sq_0 * pow((1.+sq_0),(1.-_b_VF_)) * pow((1. + sq_1),(1. + _b_VF_)));
  switch (pre->photoion_mode){
    case recfast_photoion_Tmat:
      Rup_He = 4.*Rdown_He*pow((pre->CR*Tmat),1.5)*exp(-pre->CDB_He/Tmat);
      break;
    case recfast_photoion_Trad:
    default:
      Rup_He = 4.*_a_VF_/(sqrt(Trad/_T_0_) * pow((1.+sqrt(Trad/_T_0_)),(1.-_b_VF_)) * pow((1. + sqrt(Trad/_T_1_)),(1. + _b_VF_))) * pow((pre->CR*Trad),1.5)*exp(-pre->CDB_He/Trad);
      break;
  }

  /** - The K_He is calculated up to the required accuracy  */
  if ((x_He < pre->x_He_trigger_small) || (x_He > pre->x_He0_trigger2)){
    Heflag = 0;
  }
  else if(z<pre->z_switch_late){
    Heflag = 2;
  }
  else{
    Heflag = pre->Heswitch;
  }

  /* Simplest case : as defined in the equation */
  if (Heflag == 0){
    K_He = pre->CK_He/Hz;
  }
  /* More difficult cases : Take into account additional contributions */
  else {
    tauHe_s = _A2P_s_*pre->CK_He*3.*n_He*(1.-x_He)/Hz;
    pHe_s = (1.-exp(-tauHe_s))/tauHe_s;
    K_He = 1./(_A2P_s_*pHe_s*3.*n_He*(1.-x_He));

    /* In doppler mode (2) or in all mode (>=5), take doppler corrections */
    if (((Heflag == 2) || (Heflag >= 5)) && (x_H < pre->x_H_limit_KHe)) {

      Doppler = 2.*_k_B_*Tmat/(_m_H_*_not4_*_c_*_c_);
      Doppler = _c_*_L_He_2p_*sqrt(Doppler);
      gamma_2Ps = 3.*_A2P_s_*pre->fHe*(1.-x_He)*_c_*_c_
          /(sqrt(_PI_)*_sigma_He_2Ps_*8.*_PI_*Doppler*(1.-x_H))
          /pow(_c_*_L_He_2p_,2);
      pb = 0.36;
      qb = pre->fudge_He;
      AHcon = _A2P_s_/(1.+pb*pow(gamma_2Ps,qb));
      K_He=1./((_A2P_s_*pHe_s+AHcon)*3.*n_He*(1.-x_He));
    }

    /* In modes where triple He is added (>=3), calculate the triple He CfHe_t */
    if (Heflag >= 3) {
      Rdown_trip = _a_trip_/(sq_0*pow((1.+sq_0),(1.-_b_trip_)) * pow((1.+sq_1),(1.+_b_trip_)));
      switch (pre->photoion_mode){
        case recfast_photoion_Tmat:
          Rup_trip = Rdown_trip*exp(-_h_P_*_c_*_L_He2St_ion_/(_k_B_*Tmat))*pow(pre->CR*Tmat,1.5)*4./3.;
          break;
        case recfast_photoion_Trad:
        default:
          Rup_trip = _a_trip_/(sqrt(Trad/_T_0_)*pow((1.+sqrt(Trad/_T_0_)),(1.-_b_trip_)) * pow((1.+sqrt(Trad/_T_1_)),(1.+_b_trip_))) *exp(-_h_P_*_c_*_L_He2St_ion_/(_k_B_*Trad))*pow(pre->CR*Trad,1.5)*4./3.;
          break;
      }
      /* Varying fundamental constants */
      if (pth->has_varconst == _TRUE_) {
        /** - Rescale by various powers of fsR = relative alpha and meR = relative m_e (see e.g. 1705.03925) */
        Rdown_trip *= pre->fsR*pre->fsR/pre->meR/pre->meR;
        Rup_trip *= pre->fsR*pre->fsR*pre->fsR*pre->fsR*pre->fsR*pre->meR;
      }

      tauHe_t = _A2P_t_*n_He*(1.-x_He)*3./(8.*_PI_*Hz*pow(_L_He_2Pt_,3));
      pHe_t = (1. - exp(-tauHe_t))/tauHe_t;
      CL_PSt = _h_P_*_c_*(_L_He_2Pt_ - _L_He_2St_)/_k_B_;
      /* In triple He default mode, or mode 5, take simple term */
      if ((Heflag == 3) || (Heflag == 5) || (x_H >= pre->x_H_limit_CfHe_t)) {
        CfHe_t = _A2P_t_*pHe_t*exp(-CL_PSt/Tmat);
        CfHe_t = CfHe_t/(Rup_trip+CfHe_t);
      }
      /* In triple He doppler mode (4) or all mode (>=6), take doppler corrections */
      else {
        Doppler = 2.*_k_B_*Tmat/(_m_H_*_not4_*_c_*_c_);
        Doppler = _c_*_L_He_2Pt_*sqrt(Doppler);
        gamma_2Pt = 3.*_A2P_t_*pre->fHe*(1.-x_He)*_c_*_c_
          /(sqrt(_PI_)*_sigma_He_2Pt_*8.*_PI_*Doppler*(1.-x_H))
          /pow(_c_*_L_He_2Pt_,2);
        pb = 0.66;
        qb = 0.9;
        AHcon = _A2P_t_/(1.+pb*pow(gamma_2Pt,qb))/3.;
        CfHe_t = (_A2P_t_*pHe_t+AHcon)*exp(-CL_PSt/Tmat);
        CfHe_t = CfHe_t/(Rup_trip+CfHe_t);
      }
    }
  }

  /* Varying fundamental constants */
  if (pth->has_varconst == _TRUE_) {
    /** - Rescale temperatures by various powers of fsR = relative alpha and meR = relative m_e (see e.g. 1705.03925) */
    Rdown_He *= pre->fsR*pre->fsR/pre->meR/pre->meR;
    Rup_He *= pre->fsR*pre->fsR*pre->fsR*pre->fsR*pre->fsR*pre->meR;
  }

  /** - Final helium equations, again fudged Peebles' equations are used */
  if (x_He < 1.e-15){
    *dxHe_dz=0.;
  }
  else {

    /* Calculate first the boltzmann factor (limited for numerical reasons) */
    if (pre->CDB_He2s2p/Tmat < pre->max_exp_boltz){
      He_Boltz=exp(pre->CDB_He2s2p/Tmat);
    }
    else{
      He_Boltz=exp(pre->max_exp_boltz);
    }

    /* Varying fundamental constants */
    if (pth->has_varconst == _TRUE_) {
      K_He /= pow(pre->fsR*pre->fsR*pre->meR,3);
      A2s1sHe *= pow(pre->fsR, 8)*pre->meR;
    }
    C_He = (1. + K_He*A2s1sHe*n_He*(1.-x_He)*He_Boltz)/(1. + K_He*(A2s1sHe+Rup_He)*n_He*(1.-x_He)*He_Boltz);

    /** Final He quations by Peebles with K_He*/
    *dxHe_dz = (x*x_He*nH*Rdown_He - Rup_He*(1.-x_He)*exp(-pre->CL_He/Tmat)) * C_He / (Hz*(1+z));

    /* following is from recfast 1.4 (now reordered) */
    /* this correction is not self-consistent when there is energy injection from dark matter, and leads to nan's at small redshift (unimportant when reionization takes over before that redshift) */
    /* Corrections due to triple helium, only when Heflag >=3 */
    if (Heflag >= 3){
      /** CfHe_t correction */
      *dxHe_dz += (x*x_He*nH*Rdown_trip - (1.-x_He)*3.*Rup_trip*exp(-pre->CL_Het/Tmat)) *CfHe_t/(Hz*(1.+z));
    }
    /* end of new recfast 1.4 piece */
  }

  /** - No He Energy injection */

  return _SUCCESS_;
}

// Assembly:
subq $0x2a8, %rsp            # imm = 0x2A8
movq %rdi, 0x2a0(%rsp)
movq %rsi, 0x298(%rsp)
movsd %xmm0, 0x290(%rsp)
movsd %xmm1, 0x288(%rsp)
movsd %xmm2, 0x280(%rsp)
movsd %xmm3, 0x278(%rsp)
movsd %xmm4, 0x270(%rsp)
movsd %xmm5, 0x268(%rsp)
movsd %xmm6, 0x260(%rsp)
movsd %xmm7, 0x258(%rsp)
movq %rdx, 0x250(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x1b0(%rsp)
movsd 0x71885(%rip), %xmm0    # 0x20c940
movsd %xmm0, 0x190(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x248(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x240(%rsp)
movq 0x2a0(%rsp), %rax
movswl 0xe78(%rax), %eax
cmpl $0x1, %eax
jne 0x19b180
movq 0x298(%rsp), %rax
movsd 0x120(%rax), %xmm1
movq 0x298(%rsp), %rax
mulsd 0x120(%rax), %xmm1
movq 0x298(%rsp), %rax
mulsd 0x128(%rax), %xmm1
movsd 0x260(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x260(%rsp)
movq 0x298(%rsp), %rax
movsd 0x120(%rax), %xmm1
movq 0x298(%rsp), %rax
mulsd 0x120(%rax), %xmm1
movq 0x298(%rsp), %rax
mulsd 0x128(%rax), %xmm1
movsd 0x258(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x258(%rsp)
movq 0x298(%rsp), %rax
movsd 0x20(%rax), %xmm0
movsd 0x278(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0x1a0(%rsp)
movsd 0x260(%rsp), %xmm0
movsd %xmm0, 0x150(%rsp)
movsd 0x37623(%rip), %xmm0    # 0x1d27e0
movsd %xmm0, 0x160(%rsp)
movsd 0x7177a(%rip), %xmm1    # 0x20c948
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x150(%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x82e0
movaps %xmm0, %xmm1
movsd 0x160(%rsp), %xmm0
movsd %xmm1, 0x1e0(%rsp)
movsd 0x260(%rsp), %xmm1
movsd %xmm1, 0x158(%rsp)
movsd 0x71739(%rip), %xmm1    # 0x20c950
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x158(%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x82e0
movaps %xmm0, %xmm1
movsd 0x160(%rsp), %xmm0
movsd %xmm1, 0x1d8(%rsp)
movsd 0x7170a(%rip), %xmm1    # 0x20c958
callq 0x8610
movsd %xmm0, 0x180(%rsp)
movsd 0x1e0(%rsp), %xmm0
movsd %xmm0, 0x170(%rsp)
movsd 0x36fd2(%rip), %xmm1    # 0x1d2248
movsd %xmm1, 0x168(%rsp)
addsd %xmm1, %xmm0
movsd 0x716d5(%rip), %xmm1    # 0x20c960
callq 0x8610
movsd 0x168(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x170(%rsp), %xmm0
mulsd %xmm2, %xmm0
movsd %xmm0, 0x178(%rsp)
movsd 0x1d8(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd 0x716a1(%rip), %xmm1    # 0x20c968
callq 0x8610
movsd 0x178(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x180(%rsp), %xmm0
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x1c0(%rsp)
movq 0x298(%rsp), %rax
movl 0x130(%rax), %eax
movl %eax, 0x18c(%rsp)
testl %eax, %eax
je 0x19b322
jmp 0x19b30d
movl 0x18c(%rsp), %eax
subl $0x1, %eax
je 0x19b3c8
jmp 0x19b3ca
movsd 0x3a19e(%rip), %xmm0    # 0x1d54c8
mulsd 0x1c0(%rsp), %xmm0
movsd %xmm0, 0x140(%rsp)
movq 0x298(%rsp), %rax
movsd 0x8(%rax), %xmm0
mulsd 0x260(%rsp), %xmm0
movsd 0x378f6(%rip), %xmm1    # 0x1d2c50
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x140(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x148(%rsp)
movq 0x298(%rsp), %rax
movsd 0x30(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
divsd 0x260(%rsp), %xmm0
callq 0x8670
movaps %xmm0, %xmm1
movsd 0x148(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x1c8(%rsp)
jmp 0x19b5b2
jmp 0x19b3ca
movsd 0x3740e(%rip), %xmm0    # 0x1d27e0
movsd 0x7157e(%rip), %xmm1    # 0x20c958
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x3a0de(%rip), %xmm0    # 0x1d54c8
mulsd %xmm1, %xmm0
movsd %xmm0, 0x128(%rsp)
movsd 0x258(%rsp), %xmm0
movsd %xmm0, 0x100(%rsp)
movsd 0x373cf(%rip), %xmm0    # 0x1d27e0
movsd 0x7152f(%rip), %xmm1    # 0x20c948
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x100(%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x82e0
movsd %xmm0, 0x110(%rsp)
movsd 0x258(%rsp), %xmm0
movsd %xmm0, 0x108(%rsp)
movsd 0x3738a(%rip), %xmm0    # 0x1d27e0
movsd 0x714ea(%rip), %xmm1    # 0x20c948
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x108(%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x82e0
movaps %xmm0, %xmm1
movsd 0x36dc5(%rip), %xmm0    # 0x1d2248
addsd %xmm1, %xmm0
movsd 0x714d1(%rip), %xmm1    # 0x20c960
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x110(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x120(%rsp)
movsd 0x258(%rsp), %xmm0
movsd %xmm0, 0x118(%rsp)
movsd 0x37319(%rip), %xmm0    # 0x1d27e0
movsd 0x71481(%rip), %xmm1    # 0x20c950
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x118(%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x82e0
movaps %xmm0, %xmm1
movsd 0x36d54(%rip), %xmm0    # 0x1d2248
addsd %xmm1, %xmm0
movsd 0x71468(%rip), %xmm1    # 0x20c968
callq 0x8610
movsd 0x120(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x128(%rsp), %xmm0
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x130(%rsp)
movq 0x298(%rsp), %rax
movsd 0x8(%rax), %xmm0
mulsd 0x258(%rsp), %xmm0
movsd 0x37707(%rip), %xmm1    # 0x1d2c50
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x130(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x138(%rsp)
movq 0x298(%rsp), %rax
movsd 0x30(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
divsd 0x258(%rsp), %xmm0
callq 0x8670
movaps %xmm0, %xmm1
movsd 0x138(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x1c8(%rsp)
movsd 0x290(%rsp), %xmm1
movq 0x298(%rsp), %rax
movsd 0xe0(%rax), %xmm0
ucomisd %xmm1, %xmm0
ja 0x19b5ec
movsd 0x290(%rsp), %xmm0
movq 0x298(%rsp), %rax
ucomisd 0xd0(%rax), %xmm0
jbe 0x19b5f9
movl $0x0, 0x19c(%rsp)
jmp 0x19b63c
movsd 0x270(%rsp), %xmm1
movq 0x298(%rsp), %rax
movsd 0xd8(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x19b625
movl $0x2, 0x19c(%rsp)
jmp 0x19b63a
movq 0x298(%rsp), %rax
movl 0xc0(%rax), %eax
movl %eax, 0x19c(%rsp)
jmp 0x19b63c
cmpl $0x0, 0x19c(%rsp)
jne 0x19b66a
movq 0x298(%rsp), %rax
movsd 0x38(%rax), %xmm0
divsd 0x268(%rsp), %xmm0
movsd %xmm0, 0x1d0(%rsp)
jmp 0x19c1b4
movq 0x298(%rsp), %rax
movsd 0x712f6(%rip), %xmm0    # 0x20c970
mulsd 0x38(%rax), %xmm0
movsd 0x38011(%rip), %xmm1    # 0x1d3698
mulsd %xmm1, %xmm0
mulsd 0x1a0(%rsp), %xmm0
movsd 0x36bac(%rip), %xmm1    # 0x1d2248
subsd 0x290(%rsp), %xmm1
mulsd %xmm1, %xmm0
divsd 0x268(%rsp), %xmm0
movsd %xmm0, 0x238(%rsp)
movsd 0x238(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
callq 0x8670
movaps %xmm0, %xmm1
movsd 0x36b5d(%rip), %xmm0    # 0x1d2248
subsd %xmm1, %xmm0
divsd 0x238(%rsp), %xmm0
movsd %xmm0, 0x230(%rsp)
movsd 0x71267(%rip), %xmm1    # 0x20c970
mulsd 0x230(%rsp), %xmm1
movsd 0x37f7e(%rip), %xmm0    # 0x1d3698
mulsd %xmm0, %xmm1
mulsd 0x1a0(%rsp), %xmm1
movsd 0x36b19(%rip), %xmm0    # 0x1d2248
subsd 0x290(%rsp), %xmm0
mulsd %xmm0, %xmm1
movsd 0x36b04(%rip), %xmm0    # 0x1d2248
divsd %xmm1, %xmm0
movsd %xmm0, 0x1d0(%rsp)
cmpl $0x2, 0x19c(%rsp)
je 0x19b769
cmpl $0x5, 0x19c(%rsp)
jl 0x19b99b
movsd 0x280(%rsp), %xmm1
movq 0x298(%rsp), %rax
movsd 0xf8(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x19b99b
movsd 0x7120c(%rip), %xmm0    # 0x20c9a0
mulsd 0x260(%rsp), %xmm0
movsd 0x711f3(%rip), %xmm1    # 0x20c998
divsd %xmm1, %xmm0
movsd %xmm0, 0x210(%rsp)
movsd 0x210(%rsp), %xmm0
callq 0x82e0
movaps %xmm0, %xmm1
movsd 0x711b5(%rip), %xmm0    # 0x20c980
mulsd %xmm1, %xmm0
movsd %xmm0, 0x210(%rsp)
movq 0x298(%rsp), %rax
movsd 0x711a8(%rip), %xmm0    # 0x20c990
mulsd 0x20(%rax), %xmm0
movsd 0x36a53(%rip), %xmm1    # 0x1d2248
subsd 0x290(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd 0x3ae26(%rip), %xmm1    # 0x1d6630
mulsd %xmm1, %xmm0
movsd 0x3ae1a(%rip), %xmm1    # 0x1d6630
mulsd %xmm1, %xmm0
movsd %xmm0, 0xe8(%rsp)
movsd 0x397b5(%rip), %xmm0    # 0x1d4fe0
callq 0x82e0
movaps %xmm0, %xmm1
movsd 0xe8(%rsp), %xmm0
movsd 0x71144(%rip), %xmm2    # 0x20c988
mulsd %xmm2, %xmm1
movsd 0x39c88(%rip), %xmm2    # 0x1d54d8
mulsd %xmm2, %xmm1
movsd 0x39784(%rip), %xmm2    # 0x1d4fe0
mulsd %xmm2, %xmm1
mulsd 0x210(%rsp), %xmm1
movsd 0x369d7(%rip), %xmm2    # 0x1d2248
subsd 0x280(%rsp), %xmm2
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0xf0(%rsp)
movsd 0x710ed(%rip), %xmm0    # 0x20c980
movsd 0x373e5(%rip), %xmm1    # 0x1d2c80
callq 0x8610
movaps %xmm0, %xmm1
movsd 0xf0(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x208(%rsp)
movsd 0x710b7(%rip), %xmm0    # 0x20c978
movsd %xmm0, 0x1f8(%rsp)
movq 0x298(%rsp), %rax
movsd 0xe8(%rax), %xmm0
movsd %xmm0, 0x1f0(%rsp)
movsd 0x1f8(%rsp), %xmm0
movsd %xmm0, 0xf8(%rsp)
movsd 0x208(%rsp), %xmm0
movsd 0x1f0(%rsp), %xmm1
callq 0x8610
movsd 0xf8(%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd 0x36927(%rip), %xmm0    # 0x1d2248
addsd %xmm0, %xmm1
movsd 0x71043(%rip), %xmm0    # 0x20c970
divsd %xmm1, %xmm0
movsd %xmm0, 0x1e8(%rsp)
movsd 0x230(%rsp), %xmm1
movsd 0x1e8(%rsp), %xmm0
movsd 0x7101c(%rip), %xmm2    # 0x20c970
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x37d34(%rip), %xmm0    # 0x1d3698
mulsd %xmm0, %xmm1
mulsd 0x1a0(%rsp), %xmm1
movsd 0x368cf(%rip), %xmm0    # 0x1d2248
subsd 0x290(%rsp), %xmm0
mulsd %xmm0, %xmm1
movsd 0x368ba(%rip), %xmm0    # 0x1d2248
divsd %xmm1, %xmm0
movsd %xmm0, 0x1d0(%rsp)
cmpl $0x3, 0x19c(%rsp)
jl 0x19c1b2
movsd 0x36e2f(%rip), %xmm0    # 0x1d27e0
movsd 0x70fef(%rip), %xmm1    # 0x20c9a8
callq 0x8610
movsd %xmm0, 0xd8(%rsp)
movsd 0x1e0(%rsp), %xmm0
movsd %xmm0, 0xc8(%rsp)
movsd 0x36867(%rip), %xmm1    # 0x1d2248
movsd %xmm1, 0xc0(%rsp)
addsd %xmm1, %xmm0
movsd 0x70fba(%rip), %xmm1    # 0x20c9b0
callq 0x8610
movsd 0xc0(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0xc8(%rsp), %xmm0
mulsd %xmm2, %xmm0
movsd %xmm0, 0xd0(%rsp)
movsd 0x1d8(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd 0x70f86(%rip), %xmm1    # 0x20c9b8
callq 0x8610
movsd 0xd0(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0xd8(%rsp), %xmm0
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x248(%rsp)
movq 0x298(%rsp), %rax
movl 0x130(%rax), %eax
movl %eax, 0xe4(%rsp)
testl %eax, %eax
je 0x19ba8d
jmp 0x19ba78
movl 0xe4(%rsp), %eax
subl $0x1, %eax
je 0x19bb33
jmp 0x19bb35
movsd 0x248(%rsp), %xmm0
movsd %xmm0, 0xb0(%rsp)
movsd 0x3ab99(%rip), %xmm1    # 0x1d6640
mulsd 0x260(%rsp), %xmm1
movsd 0x70f08(%rip), %xmm0    # 0x20c9c0
divsd %xmm1, %xmm0
callq 0x8670
movaps %xmm0, %xmm1
movsd 0xb0(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0xb8(%rsp)
movq 0x298(%rsp), %rax
movsd 0x8(%rax), %xmm0
mulsd 0x260(%rsp), %xmm0
movsd 0x37158(%rip), %xmm1    # 0x1d2c50
callq 0x8610
movaps %xmm0, %xmm1
movsd 0xb8(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd 0x399b3(%rip), %xmm1    # 0x1d54c8
mulsd %xmm1, %xmm0
movsd 0x37b77(%rip), %xmm1    # 0x1d3698
divsd %xmm1, %xmm0
movsd %xmm0, 0x240(%rsp)
jmp 0x19bd0a
jmp 0x19bb35
movsd 0x36ca3(%rip), %xmm0    # 0x1d27e0
movsd 0x70e63(%rip), %xmm1    # 0x20c9a8
callq 0x8610
movsd %xmm0, 0x98(%rsp)
movsd 0x258(%rsp), %xmm0
movsd %xmm0, 0x70(%rsp)
movsd 0x36c76(%rip), %xmm0    # 0x1d27e0
movsd 0x70dd6(%rip), %xmm1    # 0x20c948
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x70(%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x82e0
movsd %xmm0, 0x80(%rsp)
movsd 0x258(%rsp), %xmm0
movsd %xmm0, 0x78(%rsp)
movsd 0x36c37(%rip), %xmm0    # 0x1d27e0
movsd 0x70d97(%rip), %xmm1    # 0x20c948
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x78(%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x82e0
movaps %xmm0, %xmm1
movsd 0x36675(%rip), %xmm0    # 0x1d2248
addsd %xmm1, %xmm0
movsd 0x70dd1(%rip), %xmm1    # 0x20c9b0
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x80(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x90(%rsp)
movsd 0x258(%rsp), %xmm0
movsd %xmm0, 0x88(%rsp)
movsd 0x36bc9(%rip), %xmm0    # 0x1d27e0
movsd 0x70d31(%rip), %xmm1    # 0x20c950
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x88(%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x82e0
movaps %xmm0, %xmm1
movsd 0x36604(%rip), %xmm0    # 0x1d2248
addsd %xmm1, %xmm0
movsd 0x70d68(%rip), %xmm1    # 0x20c9b8
callq 0x8610
movsd 0x90(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x98(%rsp), %xmm0
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0xa0(%rsp)
movsd 0x3a9bd(%rip), %xmm1    # 0x1d6640
mulsd 0x258(%rsp), %xmm1
movsd 0x70d2c(%rip), %xmm0    # 0x20c9c0
divsd %xmm1, %xmm0
callq 0x8670
movaps %xmm0, %xmm1
movsd 0xa0(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0xa8(%rsp)
movq 0x298(%rsp), %rax
movsd 0x8(%rax), %xmm0
mulsd 0x258(%rsp), %xmm0
movsd 0x36f7c(%rip), %xmm1    # 0x1d2c50
callq 0x8610
movaps %xmm0, %xmm1
movsd 0xa8(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd 0x397d7(%rip), %xmm1    # 0x1d54c8
mulsd %xmm1, %xmm0
movsd 0x3799b(%rip), %xmm1    # 0x1d3698
divsd %xmm1, %xmm0
movsd %xmm0, 0x240(%rsp)
movq 0x2a0(%rsp), %rax
movswl 0xe78(%rax), %eax
cmpl $0x1, %eax
jne 0x19bde6
movq 0x298(%rsp), %rax
movsd 0x120(%rax), %xmm0
movq 0x298(%rsp), %rax
mulsd 0x120(%rax), %xmm0
movq 0x298(%rsp), %rax
divsd 0x128(%rax), %xmm0
movq 0x298(%rsp), %rax
divsd 0x128(%rax), %xmm0
mulsd 0x248(%rsp), %xmm0
movsd %xmm0, 0x248(%rsp)
movq 0x298(%rsp), %rax
movsd 0x120(%rax), %xmm0
movq 0x298(%rsp), %rax
mulsd 0x120(%rax), %xmm0
movq 0x298(%rsp), %rax
mulsd 0x120(%rax), %xmm0
movq 0x298(%rsp), %rax
mulsd 0x120(%rax), %xmm0
movq 0x298(%rsp), %rax
mulsd 0x120(%rax), %xmm0
movq 0x298(%rsp), %rax
mulsd 0x128(%rax), %xmm0
mulsd 0x240(%rsp), %xmm0
movsd %xmm0, 0x240(%rsp)
movsd 0x70bea(%rip), %xmm0    # 0x20c9d8
mulsd 0x1a0(%rsp), %xmm0
movsd 0x36449(%rip), %xmm1    # 0x1d2248
subsd 0x290(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd 0x37884(%rip), %xmm1    # 0x1d3698
mulsd %xmm1, %xmm0
movsd %xmm0, 0x68(%rsp)
movsd 0x3a9fa(%rip), %xmm0    # 0x1d6820
mulsd 0x268(%rsp), %xmm0
movsd %xmm0, 0x60(%rsp)
movsd 0x70b93(%rip), %xmm0    # 0x20c9d0
movsd 0x37853(%rip), %xmm1    # 0x1d3698
callq 0x8610
movsd 0x60(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x68(%rsp), %xmm0
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x228(%rsp)
movsd 0x228(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
callq 0x8670
movaps %xmm0, %xmm1
movsd 0x363ae(%rip), %xmm0    # 0x1d2248
subsd %xmm1, %xmm0
divsd 0x228(%rsp), %xmm0
movsd %xmm0, 0x220(%rsp)
movsd 0x70b10(%rip), %xmm0    # 0x20c9c8
movsd %xmm0, 0x218(%rsp)
cmpl $0x3, 0x19c(%rsp)
je 0x19bef4
cmpl $0x5, 0x19c(%rsp)
je 0x19bef4
movsd 0x280(%rsp), %xmm0
movq 0x298(%rsp), %rax
ucomisd 0x100(%rax), %xmm0
jb 0x19bf7c
movsd 0x70adc(%rip), %xmm0    # 0x20c9d8
mulsd 0x220(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
movsd 0x218(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
divsd 0x260(%rsp), %xmm0
callq 0x8670
movaps %xmm0, %xmm1
movsd 0x58(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x1b0(%rsp)
movsd 0x1b0(%rsp), %xmm0
movsd 0x240(%rsp), %xmm1
addsd 0x1b0(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x1b0(%rsp)
jmp 0x19c1b0
movsd 0x70a1c(%rip), %xmm0    # 0x20c9a0
mulsd 0x260(%rsp), %xmm0
movsd 0x70a03(%rip), %xmm1    # 0x20c998
divsd %xmm1, %xmm0
movsd %xmm0, 0x210(%rsp)
movsd 0x210(%rsp), %xmm0
callq 0x82e0
movaps %xmm0, %xmm1
movsd 0x70a2d(%rip), %xmm0    # 0x20c9e8
mulsd %xmm1, %xmm0
movsd %xmm0, 0x210(%rsp)
movq 0x298(%rsp), %rax
movsd 0x70a20(%rip), %xmm0    # 0x20c9f8
mulsd 0x20(%rax), %xmm0
movsd 0x36263(%rip), %xmm1    # 0x1d2248
subsd 0x290(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd 0x3a636(%rip), %xmm1    # 0x1d6630
mulsd %xmm1, %xmm0
movsd 0x3a62a(%rip), %xmm1    # 0x1d6630
mulsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x38fc8(%rip), %xmm0    # 0x1d4fe0
callq 0x82e0
movaps %xmm0, %xmm1
movsd 0x38(%rsp), %xmm0
movsd 0x709c2(%rip), %xmm2    # 0x20c9f0
mulsd %xmm2, %xmm1
movsd 0x3949e(%rip), %xmm2    # 0x1d54d8
mulsd %xmm2, %xmm1
movsd 0x38f9a(%rip), %xmm2    # 0x1d4fe0
mulsd %xmm2, %xmm1
mulsd 0x210(%rsp), %xmm1
movsd 0x361ed(%rip), %xmm2    # 0x1d2248
subsd 0x280(%rsp), %xmm2
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x7096e(%rip), %xmm0    # 0x20c9e8
movsd 0x36bfe(%rip), %xmm1    # 0x1d2c80
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x40(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x200(%rsp)
movsd 0x7093b(%rip), %xmm0    # 0x20c9e0
movsd %xmm0, 0x1f8(%rsp)
movsd 0x361a2(%rip), %xmm0    # 0x1d2258
movsd %xmm0, 0x1f0(%rsp)
movsd 0x1f8(%rsp), %xmm0
movsd %xmm0, 0x48(%rsp)
movsd 0x200(%rsp), %xmm0
movsd 0x1f0(%rsp), %xmm1
callq 0x8610
movsd 0x48(%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd 0x36151(%rip), %xmm0    # 0x1d2248
addsd %xmm0, %xmm1
movsd 0x708d5(%rip), %xmm0    # 0x20c9d8
divsd %xmm1, %xmm0
movsd 0x37589(%rip), %xmm1    # 0x1d3698
divsd %xmm1, %xmm0
movsd %xmm0, 0x1e8(%rsp)
movsd 0x220(%rsp), %xmm0
movsd 0x1e8(%rsp), %xmm1
movsd 0x708a2(%rip), %xmm2    # 0x20c9d8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0x218(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
divsd 0x260(%rsp), %xmm0
callq 0x8670
movaps %xmm0, %xmm1
movsd 0x50(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x1b0(%rsp)
movsd 0x1b0(%rsp), %xmm0
movsd 0x240(%rsp), %xmm1
addsd 0x1b0(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x1b0(%rsp)
jmp 0x19c1b2
jmp 0x19c1b4
movq 0x2a0(%rsp), %rax
movswl 0xe78(%rax), %eax
cmpl $0x1, %eax
jne 0x19c290
movq 0x298(%rsp), %rax
movsd 0x120(%rax), %xmm0
movq 0x298(%rsp), %rax
mulsd 0x120(%rax), %xmm0
movq 0x298(%rsp), %rax
divsd 0x128(%rax), %xmm0
movq 0x298(%rsp), %rax
divsd 0x128(%rax), %xmm0
mulsd 0x1c0(%rsp), %xmm0
movsd %xmm0, 0x1c0(%rsp)
movq 0x298(%rsp), %rax
movsd 0x120(%rax), %xmm0
movq 0x298(%rsp), %rax
mulsd 0x120(%rax), %xmm0
movq 0x298(%rsp), %rax
mulsd 0x120(%rax), %xmm0
movq 0x298(%rsp), %rax
mulsd 0x120(%rax), %xmm0
movq 0x298(%rsp), %rax
mulsd 0x120(%rax), %xmm0
movq 0x298(%rsp), %rax
mulsd 0x128(%rax), %xmm0
mulsd 0x1c8(%rsp), %xmm0
movsd %xmm0, 0x1c8(%rsp)
movsd 0x36978(%rip), %xmm0    # 0x1d2c10
ucomisd 0x290(%rsp), %xmm0
jbe 0x19c2b7
movq 0x250(%rsp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
jmp 0x19c686
movq 0x298(%rsp), %rax
movsd 0x68(%rax), %xmm1
divsd 0x260(%rsp), %xmm1
movq 0x298(%rsp), %rax
movsd 0x108(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x19c309
movq 0x298(%rsp), %rax
movsd 0x68(%rax), %xmm0
divsd 0x260(%rsp), %xmm0
callq 0x8670
movsd %xmm0, 0x1b8(%rsp)
jmp 0x19c327
movq 0x298(%rsp), %rax
movsd 0x108(%rax), %xmm0
callq 0x8670
movsd %xmm0, 0x1b8(%rsp)
movq 0x2a0(%rsp), %rax
movswl 0xe78(%rax), %eax
cmpl $0x1, %eax
jne 0x19c3d4
movq 0x298(%rsp), %rax
movsd 0x120(%rax), %xmm0
movq 0x298(%rsp), %rax
mulsd 0x120(%rax), %xmm0
movq 0x298(%rsp), %rax
mulsd 0x128(%rax), %xmm0
movsd 0x37321(%rip), %xmm1    # 0x1d3698
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x1d0(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x1d0(%rsp)
movq 0x298(%rsp), %rax
movsd 0x120(%rax), %xmm0
movsd 0x3912b(%rip), %xmm1    # 0x1d54d8
callq 0x8610
movq 0x298(%rsp), %rax
mulsd 0x128(%rax), %xmm0
mulsd 0x190(%rsp), %xmm0
movsd %xmm0, 0x190(%rsp)
movsd 0x1d0(%rsp), %xmm0
mulsd 0x190(%rsp), %xmm0
mulsd 0x1a0(%rsp), %xmm0
movsd 0x35e51(%rip), %xmm1    # 0x1d2248
subsd 0x290(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd 0x1b8(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd 0x35e2f(%rip), %xmm1    # 0x1d2248
addsd %xmm1, %xmm0
movsd 0x1d0(%rsp), %xmm1
movsd 0x190(%rsp), %xmm2
addsd 0x1c8(%rsp), %xmm2
mulsd %xmm2, %xmm1
mulsd 0x1a0(%rsp), %xmm1
movsd 0x35dfb(%rip), %xmm2    # 0x1d2248
subsd 0x290(%rsp), %xmm2
mulsd %xmm2, %xmm1
movsd 0x1b8(%rsp), %xmm2
mulsd %xmm2, %xmm1
movsd 0x35dd9(%rip), %xmm2    # 0x1d2248
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x1a8(%rsp)
movsd 0x288(%rsp), %xmm0
mulsd 0x290(%rsp), %xmm0
mulsd 0x278(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x1c0(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x1c8(%rsp), %xmm0
movsd 0x35d87(%rip), %xmm1    # 0x1d2248
subsd 0x290(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x298(%rsp), %rax
movsd 0x40(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
divsd 0x260(%rsp), %xmm0
callq 0x8670
movsd 0x20(%rsp), %xmm1
movsd 0x28(%rsp), %xmm2
movaps %xmm0, %xmm3
movsd 0x30(%rsp), %xmm0
mulsd %xmm3, %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
mulsd 0x1a8(%rsp), %xmm0
movsd 0x268(%rsp), %xmm1
movsd 0x35cf0(%rip), %xmm2    # 0x1d2248
addsd 0x270(%rsp), %xmm2
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movq 0x250(%rsp), %rax
movsd %xmm0, (%rax)
cmpl $0x3, 0x19c(%rsp)
jl 0x19c684
movsd 0x288(%rsp), %xmm0
mulsd 0x290(%rsp), %xmm0
mulsd 0x278(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x248(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x35c8d(%rip), %xmm0    # 0x1d2248
subsd 0x290(%rsp), %xmm0
movsd 0x370cc(%rip), %xmm1    # 0x1d3698
mulsd %xmm1, %xmm0
mulsd 0x240(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x298(%rsp), %rax
movsd 0x48(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
divsd 0x260(%rsp), %xmm0
callq 0x8670
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm2
movaps %xmm0, %xmm3
movsd 0x18(%rsp), %xmm0
mulsd %xmm3, %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
mulsd 0x1b0(%rsp), %xmm0
movsd 0x268(%rsp), %xmm1
movsd 0x35be5(%rip), %xmm2    # 0x1d2248
addsd 0x270(%rsp), %xmm2
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movq 0x250(%rsp), %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
jmp 0x19c686
xorl %eax, %eax
addq $0x2a8, %rsp            # imm = 0x2A8
retq