// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xe8, %rsp
movq %rdx, %rbx
movsd %xmm5, 0x88(%rsp)
movsd %xmm4, 0x78(%rsp)
movsd %xmm2, 0x70(%rsp)
movapd %xmm0, %xmm4
movq %rsi, %r14
movq %rdi, %r15
cmpw $0x1, 0xe78(%rdi)
unpcklpd %xmm6, %xmm7            # xmm7 = xmm7[0],xmm6[0]
jne 0xd19dd
movsd 0x120(%r14), %xmm0
mulsd %xmm0, %xmm0
mulsd 0x128(%r14), %xmm0
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
divpd %xmm0, %xmm7
movsd 0x20(%r14), %xmm5
movapd %xmm7, %xmm2
unpckhpd %xmm7, %xmm2            # xmm2 = xmm2[1],xmm7[1]
movapd %xmm2, %xmm0
divsd 0x59961(%rip), %xmm0    # 0x12b358
mulsd %xmm3, %xmm5
movapd %xmm5, 0xc0(%rsp)
xorpd %xmm5, %xmm5
ucomisd %xmm5, %xmm0
movapd %xmm2, 0x40(%rsp)
movsd %xmm4, 0x58(%rsp)
movsd %xmm1, 0x80(%rsp)
movsd %xmm3, 0xb8(%rsp)
movapd %xmm7, 0x60(%rsp)
jb 0xd1a38
sqrtsd %xmm0, %xmm0
jmp 0xd1a47
callq 0x82b0
xorpd %xmm5, %xmm5
movapd 0x40(%rsp), %xmm2
movsd %xmm0, 0x10(%rsp)
movapd %xmm2, %xmm0
divsd 0x59907(%rip), %xmm0    # 0x12b360
ucomisd %xmm5, %xmm0
jb 0xd1a65
sqrtsd %xmm0, %xmm0
jmp 0xd1a6a
callq 0x82b0
movsd %xmm0, 0x28(%rsp)
movsd 0x10(%rsp), %xmm0
addsd 0x1f7e2(%rip), %xmm0    # 0xf1260
movsd 0x598e2(%rip), %xmm1    # 0x12b368
movsd %xmm0, 0xd0(%rsp)
callq 0x8620
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x28(%rsp), %xmm0
addsd 0x1f7b2(%rip), %xmm0    # 0xf1260
movsd 0x598ba(%rip), %xmm1    # 0x12b370
movsd %xmm0, 0x28(%rsp)
callq 0x8620
mulsd 0x8(%rsp), %xmm0
movsd 0x598a9(%rip), %xmm1    # 0x12b378
divsd %xmm0, %xmm1
cmpl $0x0, 0x130(%r14)
movsd %xmm1, 0xb0(%rsp)
je 0xd1b96
movapd 0x60(%rsp), %xmm1
divsd 0x59860(%rip), %xmm1    # 0x12b358
xorps %xmm2, %xmm2
sqrtsd %xmm1, %xmm2
xorpd %xmm3, %xmm3
ucomisd %xmm3, %xmm1
movapd %xmm2, %xmm0
jae 0xd1b32
movapd %xmm1, %xmm0
movsd %xmm2, 0x8(%rsp)
movapd %xmm1, 0x30(%rsp)
callq 0x82b0
xorpd %xmm3, %xmm3
movapd 0x30(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
movsd %xmm0, 0x8(%rsp)
ucomisd %xmm3, %xmm1
jae 0xd1b4b
movapd %xmm1, %xmm0
callq 0x82b0
movapd %xmm0, %xmm2
addsd 0x1f70d(%rip), %xmm2    # 0xf1260
movsd 0x5980d(%rip), %xmm1    # 0x12b368
movapd %xmm2, %xmm0
callq 0x8620
movapd %xmm0, %xmm1
movapd 0x60(%rsp), %xmm0
divsd 0x597ea(%rip), %xmm0    # 0x12b360
movsd 0x8(%rsp), %xmm2
mulsd %xmm1, %xmm2
movsd %xmm2, 0x8(%rsp)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xd1bb0
sqrtsd %xmm0, %xmm0
jmp 0xd1bb5
movsd 0x2288a(%rip), %xmm0    # 0xf4428
mulsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movapd 0x40(%rsp), %xmm1
jmp 0xd1bec
callq 0x82b0
addsd 0x1f6a3(%rip), %xmm0    # 0xf1260
movsd 0x597ab(%rip), %xmm1    # 0x12b370
callq 0x8620
movsd 0x8(%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd 0x597a4(%rip), %xmm0    # 0x12b380
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movapd 0x60(%rsp), %xmm1
movsd %xmm1, 0x90(%rsp)
movsd 0x8(%r14), %xmm0
mulsd %xmm1, %xmm0
movsd 0x223b1(%rip), %xmm1    # 0xf3fb8
callq 0x8620
movsd %xmm0, 0x30(%rsp)
movsd 0x30(%r14), %xmm0
xorpd 0x1f610(%rip), %xmm0    # 0xf1230
divsd 0x90(%rsp), %xmm0
callq 0x8670
movsd 0xe0(%r14), %xmm1
xorl %ebp, %ebp
movsd 0x58(%rsp), %xmm5
ucomisd %xmm5, %xmm1
jbe 0xd1c4d
movsd 0x8(%rsp), %xmm7
jmp 0xd1c7b
ucomisd 0xd0(%r14), %xmm5
movsd 0x8(%rsp), %xmm7
ja 0xd1c7b
movsd 0xd8(%r14), %xmm1
movl $0x2, %ebp
ucomisd 0x78(%rsp), %xmm1
ja 0xd1c7b
movl 0xc0(%r14), %ebp
mulsd 0x30(%rsp), %xmm7
movsd 0x38(%r14), %xmm1
testl %ebp, %ebp
je 0xd1d73
movsd %xmm0, 0xa8(%rsp)
movsd %xmm7, 0x8(%rsp)
mulsd 0x596e2(%rip), %xmm1    # 0x12b388
mulsd 0x209d2(%rip), %xmm1    # 0xf2680
mulsd 0xc0(%rsp), %xmm1
movsd 0x1f5a1(%rip), %xmm0    # 0xf1260
subsd %xmm5, %xmm0
movapd %xmm0, 0x90(%rsp)
mulsd %xmm0, %xmm1
divsd 0x88(%rsp), %xmm1
movapd %xmm1, 0x30(%rsp)
movapd 0x1f549(%rip), %xmm0    # 0xf1230
xorpd %xmm1, %xmm0
callq 0x8670
movsd 0x1f568(%rip), %xmm2    # 0xf1260
subsd %xmm0, %xmm2
divsd 0x30(%rsp), %xmm2
movapd %xmm2, %xmm0
mulsd 0x5967a(%rip), %xmm0    # 0x12b388
cmpl $0x2, %ebp
setne %al
cmpl $0x5, %ebp
setl %cl
testb %cl, %al
jne 0xd1e31
movsd 0xf8(%r14), %xmm1
ucomisd 0x70(%rsp), %xmm1
movapd 0x40(%rsp), %xmm4
movsd 0x58(%rsp), %xmm5
movsd 0x8(%rsp), %xmm7
jbe 0xd1e43
movsd %xmm2, 0x30(%rsp)
movsd 0x59639(%rip), %xmm0    # 0x12b390
mulsd %xmm4, %xmm0
divsd 0x59635(%rip), %xmm0    # 0x12b398
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xd1d9b
sqrtsd %xmm0, %xmm0
jmp 0xd1da0
divsd 0x88(%rsp), %xmm1
movapd %xmm1, 0x30(%rsp)
xorpd %xmm9, %xmm9
xorps %xmm8, %xmm8
xorpd %xmm10, %xmm10
movapd 0x40(%rsp), %xmm4
jmp 0xd21e2
callq 0x82b0
movsd 0x20(%r14), %xmm2
movsd 0xe8(%r14), %xmm1
mulsd 0x595e9(%rip), %xmm2    # 0x12b3a0
mulsd 0x90(%rsp), %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
mulpd 0x59534(%rip), %xmm2    # 0x12b300
mulpd 0x5953c(%rip), %xmm2    # 0x12b310
movsd 0x1f484(%rip), %xmm0    # 0xf1260
subsd 0x70(%rsp), %xmm0
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
mulsd %xmm0, %xmm3
divsd %xmm3, %xmm2
divsd 0x595ae(%rip), %xmm2    # 0x12b3a8
movapd %xmm2, %xmm0
callq 0x8620
mulsd 0x595a5(%rip), %xmm0    # 0x12b3b0
addsd 0x1f44d(%rip), %xmm0    # 0xf1260
movsd 0x5956d(%rip), %xmm1    # 0x12b388
movsd 0x30(%rsp), %xmm2
mulsd %xmm1, %xmm2
divsd %xmm0, %xmm1
addsd %xmm2, %xmm1
movapd %xmm1, %xmm0
movapd 0x40(%rsp), %xmm4
movsd 0x58(%rsp), %xmm5
movsd 0x8(%rsp), %xmm7
mulsd 0x20835(%rip), %xmm0    # 0xf2680
mulsd 0xc0(%rsp), %xmm0
mulsd 0x90(%rsp), %xmm0
movsd 0x1f3fb(%rip), %xmm1    # 0xf1260
divsd %xmm0, %xmm1
movapd %xmm1, 0x30(%rsp)
xorpd %xmm9, %xmm9
cmpl $0x3, %ebp
jl 0xd1f8e
movsd 0x59533(%rip), %xmm1    # 0x12b3b8
movsd 0xd0(%rsp), %xmm0
callq 0x8620
movsd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movsd 0x59515(%rip), %xmm1    # 0x12b3c0
movsd 0x28(%rsp), %xmm0
callq 0x8620
mulsd 0x10(%rsp), %xmm0
movsd 0x59504(%rip), %xmm1    # 0x12b3c8
divsd %xmm0, %xmm1
cmpl $0x0, 0x130(%r14)
movsd %xmm1, 0x28(%rsp)
je 0xd1fa5
movapd 0x60(%rsp), %xmm1
divsd 0x5946e(%rip), %xmm1    # 0x12b358
xorps %xmm2, %xmm2
sqrtsd %xmm1, %xmm2
xorpd %xmm3, %xmm3
ucomisd %xmm3, %xmm1
movapd %xmm2, %xmm0
jae 0xd1f2a
movapd %xmm1, %xmm0
movsd %xmm2, 0x10(%rsp)
movapd %xmm1, 0xd0(%rsp)
callq 0x82b0
xorpd %xmm3, %xmm3
movapd 0xd0(%rsp), %xmm1
movsd 0x10(%rsp), %xmm2
movsd %xmm0, 0x10(%rsp)
ucomisd %xmm3, %xmm1
jae 0xd1f43
movapd %xmm1, %xmm0
callq 0x82b0
movapd %xmm0, %xmm2
addsd 0x1f315(%rip), %xmm2    # 0xf1260
movsd 0x59465(%rip), %xmm1    # 0x12b3b8
movapd %xmm2, %xmm0
callq 0x8620
movapd %xmm0, %xmm1
movapd 0x60(%rsp), %xmm0
divsd 0x593f2(%rip), %xmm0    # 0x12b360
movsd 0x10(%rsp), %xmm2
mulsd %xmm1, %xmm2
movsd %xmm2, 0x10(%rsp)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xd1fd8
sqrtsd %xmm0, %xmm0
jmp 0xd1fdd
xorps %xmm8, %xmm8
xorpd %xmm10, %xmm10
movsd 0xa8(%rsp), %xmm0
jmp 0xd21e2
movsd 0x23c63(%rip), %xmm1    # 0xf5c10
mulsd 0x40(%rsp), %xmm1
movsd 0x59415(%rip), %xmm0    # 0x12b3d0
divsd %xmm1, %xmm0
callq 0x8670
mulsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movapd 0x40(%rsp), %xmm2
jmp 0xd203f
callq 0x82b0
addsd 0x1f27b(%rip), %xmm0    # 0xf1260
movsd 0x593d3(%rip), %xmm1    # 0x12b3c0
callq 0x8620
movsd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd 0x593c4(%rip), %xmm0    # 0x12b3c8
divsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movapd 0x60(%rsp), %xmm1
mulsd 0x23bf4(%rip), %xmm1    # 0xf5c10
movsd 0x593ac(%rip), %xmm0    # 0x12b3d0
divsd %xmm1, %xmm0
callq 0x8670
movapd 0x60(%rsp), %xmm2
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
mulsd 0x8(%r14), %xmm2
movsd 0x21f6b(%rip), %xmm1    # 0xf3fb8
movapd %xmm2, %xmm0
callq 0x8620
mulsd 0x10(%rsp), %xmm0
mulsd 0x223c4(%rip), %xmm0    # 0xf4428
divsd 0x20614(%rip), %xmm0    # 0xf2680
cmpw $0x1, 0xe78(%r15)
jne 0xd20c1
movsd 0x120(%r14), %xmm5
movsd 0x128(%r14), %xmm1
movapd %xmm5, %xmm2
mulsd %xmm5, %xmm2
movapd %xmm5, %xmm3
mulsd %xmm2, %xmm3
divsd %xmm1, %xmm2
divsd %xmm1, %xmm2
movsd 0x28(%rsp), %xmm4
mulsd %xmm2, %xmm4
movsd %xmm4, 0x28(%rsp)
mulsd %xmm5, %xmm3
mulsd %xmm5, %xmm3
mulsd %xmm1, %xmm3
mulsd %xmm3, %xmm0
movsd %xmm0, 0x60(%rsp)
movsd 0x59309(%rip), %xmm1    # 0x12b3d8
mulsd 0xc0(%rsp), %xmm1
mulsd 0x90(%rsp), %xmm1
mulsd 0x20597(%rip), %xmm1    # 0xf2680
movsd 0x592ef(%rip), %xmm0    # 0x12b3e0
mulsd 0x88(%rsp), %xmm0
mulsd 0x592e6(%rip), %xmm0    # 0x12b3e8
divsd %xmm0, %xmm1
movapd %xmm1, 0x10(%rsp)
movapd 0x1f11c(%rip), %xmm0    # 0xf1230
xorpd %xmm1, %xmm0
callq 0x8670
movsd 0x1f13b(%rip), %xmm1    # 0xf1260
subsd %xmm0, %xmm1
divsd 0x10(%rsp), %xmm1
cmpl $0x3, %ebp
je 0xd217d
cmpl $0x5, %ebp
je 0xd217d
movsd 0x70(%rsp), %xmm0
ucomisd 0x100(%r14), %xmm0
jae 0xd217d
movsd %xmm1, 0x10(%rsp)
movsd 0x59238(%rip), %xmm0    # 0x12b390
mulsd 0x40(%rsp), %xmm0
divsd 0x59232(%rip), %xmm0    # 0x12b398
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xd24a5
sqrtsd %xmm0, %xmm0
jmp 0xd24aa
mulsd 0x59253(%rip), %xmm1    # 0x12b3d8
movsd %xmm1, 0x10(%rsp)
movsd 0x5925d(%rip), %xmm0    # 0x12b3f0
divsd 0x40(%rsp), %xmm0
callq 0x8670
movapd 0x40(%rsp), %xmm4
movapd %xmm0, %xmm10
mulsd 0x10(%rsp), %xmm10
movsd 0x60(%rsp), %xmm9
movapd %xmm9, %xmm0
addsd %xmm10, %xmm0
divsd %xmm0, %xmm10
movsd 0x58(%rsp), %xmm5
movsd 0x8(%rsp), %xmm7
movsd 0xa8(%rsp), %xmm0
movsd 0x28(%rsp), %xmm8
mulsd %xmm0, %xmm7
cmpw $0x1, 0xe78(%r15)
jne 0xd2241
movsd 0x120(%r14), %xmm0
movsd 0x128(%r14), %xmm1
movapd %xmm0, %xmm2
mulsd %xmm0, %xmm2
movapd %xmm0, %xmm3
mulsd %xmm2, %xmm3
divsd %xmm1, %xmm2
divsd %xmm1, %xmm2
movsd 0xb0(%rsp), %xmm6
mulsd %xmm2, %xmm6
movsd %xmm6, 0xb0(%rsp)
mulsd %xmm0, %xmm3
mulsd %xmm0, %xmm3
mulsd %xmm1, %xmm3
mulsd %xmm3, %xmm7
xorpd %xmm0, %xmm0
movsd 0x1fa63(%rip), %xmm1    # 0xf1cb0
ucomisd %xmm5, %xmm1
ja 0xd2491
movsd %xmm10, 0x90(%rsp)
movsd %xmm9, 0x60(%rsp)
movsd %xmm8, 0x28(%rsp)
movsd %xmm7, 0x8(%rsp)
movsd 0x68(%r14), %xmm0
divsd %xmm4, %xmm0
minsd 0x108(%r14), %xmm0
callq 0x8670
movapd %xmm0, 0x10(%rsp)
cmpw $0x1, 0xe78(%r15)
jne 0xd230f
movsd 0x120(%r14), %xmm0
mulsd %xmm0, %xmm0
mulsd 0x128(%r14), %xmm0
movsd 0x203c4(%rip), %xmm1    # 0xf2680
callq 0x8620
movapd 0x30(%rsp), %xmm1
divsd %xmm0, %xmm1
movapd %xmm1, 0x30(%rsp)
movsd 0x120(%r14), %xmm0
movsd 0x2217e(%rip), %xmm1    # 0xf4460
callq 0x8620
movapd 0x30(%rsp), %xmm6
mulsd 0x128(%r14), %xmm0
mulsd 0x59112(%rip), %xmm0    # 0x12b410
movsd 0xb8(%rsp), %xmm2
movsd 0x8(%rsp), %xmm4
jmp 0xd232c
movsd 0x590f9(%rip), %xmm0    # 0x12b410
movsd 0xb8(%rsp), %xmm2
movsd 0x8(%rsp), %xmm4
movapd 0x30(%rsp), %xmm6
movsd 0x1ef2c(%rip), %xmm1    # 0xf1260
movsd 0x58(%rsp), %xmm3
subsd %xmm3, %xmm1
movapd %xmm1, %xmm5
movapd %xmm1, 0x30(%rsp)
movapd %xmm4, %xmm1
addsd %xmm0, %xmm1
unpcklpd %xmm6, %xmm6            # xmm6 = xmm6[0,0]
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
mulpd %xmm6, %xmm0
movapd 0xc0(%rsp), %xmm1
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm0, %xmm1
movapd %xmm5, %xmm0
unpcklpd %xmm5, %xmm0            # xmm0 = xmm0[0],xmm5[0]
mulpd %xmm1, %xmm0
movapd 0x10(%rsp), %xmm1
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm0, %xmm1
addpd 0x22591(%rip), %xmm1    # 0xf4920
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
divsd %xmm0, %xmm1
movapd %xmm1, 0x10(%rsp)
movsd 0x80(%rsp), %xmm0
mulsd %xmm3, %xmm0
mulsd %xmm2, %xmm0
movsd %xmm0, 0x80(%rsp)
movsd 0x40(%r14), %xmm0
xorpd 0x1ee67(%rip), %xmm0    # 0xf1230
divsd 0x40(%rsp), %xmm0
callq 0x8670
movsd 0x80(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
mulsd 0x30(%rsp), %xmm2
mulsd %xmm0, %xmm2
movapd %xmm2, %xmm0
movsd 0xb0(%rsp), %xmm2
mulsd %xmm1, %xmm2
subsd %xmm0, %xmm2
mulsd 0x10(%rsp), %xmm2
movsd 0x78(%rsp), %xmm0
addsd 0x1ee4a(%rip), %xmm0    # 0xf1260
mulsd 0x88(%rsp), %xmm0
divsd %xmm0, %xmm2
movsd %xmm2, (%rbx)
cmpl $0x3, %ebp
jl 0xd2495
movsd %xmm0, 0x78(%rsp)
movsd 0x48(%r14), %xmm0
xorpd 0x1edf0(%rip), %xmm0    # 0xf1230
divsd 0x40(%rsp), %xmm0
callq 0x8670
movapd 0x30(%rsp), %xmm1
mulsd 0x22017(%rip), %xmm1    # 0xf4470
mulsd 0x60(%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd 0x80(%rsp), %xmm0
mulsd 0x28(%rsp), %xmm0
addsd %xmm1, %xmm0
movapd %xmm0, %xmm1
movsd 0x90(%rsp), %xmm0
mulsd %xmm1, %xmm0
divsd 0x78(%rsp), %xmm0
addsd (%rbx), %xmm0
movsd %xmm0, (%rbx)
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x82b0
movsd 0x20(%r14), %xmm1
mulsd 0x58f40(%rip), %xmm1    # 0x12b3f8
movapd 0x90(%rsp), %xmm2
mulsd %xmm1, %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
mulpd 0x58e4f(%rip), %xmm2    # 0x12b320
mulpd 0x58e57(%rip), %xmm2    # 0x12b330
movsd 0x1ed7f(%rip), %xmm0    # 0xf1260
subsd 0x70(%rsp), %xmm0
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1            # xmm1 = xmm1[1],xmm2[1]
mulsd %xmm0, %xmm1
divsd %xmm1, %xmm2
divsd 0x58f01(%rip), %xmm2    # 0x12b400
movsd 0x1ed71(%rip), %xmm1    # 0xf1278
movapd %xmm2, %xmm0
callq 0x8620
mulsd 0x58ef0(%rip), %xmm0    # 0x12b408
addsd 0x1ed40(%rip), %xmm0    # 0xf1260
movsd 0x58eb0(%rip), %xmm1    # 0x12b3d8
movapd %xmm1, %xmm2
divsd %xmm0, %xmm2
divsd 0x20148(%rip), %xmm2    # 0xf2680
movsd 0x10(%rsp), %xmm0
mulsd %xmm1, %xmm0
addsd %xmm2, %xmm0
movsd %xmm0, 0x10(%rsp)
jmp 0xd218b
nopl (%rax)