// File: /workspace/github_c_makefile_star2_O3/PoulinV[P]AxiCLASS/build/../source/perturbations.c
// Function: perturbations_einstein
int perturbations_einstein(
                           struct precision * ppr,
                           struct background * pba,
                           struct thermodynamics * pth,
                           struct perturbations * ppt,
                           int index_md,
                           double k,
                           double tau,
                           double * y,
                           struct perturbations_workspace * ppw
                           ) {
  /** Summary: */

  /** - define local variables */

  double k2,a,a2,a_prime_over_a;
  double s2_squared;
  double shear_g = 0.;
  double shear_idr = 0.;

  /** - define wavenumber and scale factor related quantities */

  k2 = k*k;
  a = ppw->pvecback[pba->index_bg_a];
  a2 = a * a;
  a_prime_over_a = ppw->pvecback[pba->index_bg_H]*a;
  s2_squared = 1.-3.*pba->K/k2;

  /** - sum up perturbations from all species */
  class_call(perturbations_total_stress_energy(ppr,pba,pth,ppt,index_md,k,y,ppw),
             ppt->error_message,
             ppt->error_message);

  /** - for scalar modes: */

  if (_scalars_) {

    /** - --> infer metric perturbations from Einstein equations */

    /* newtonian gauge */
    if (ppt->gauge == newtonian) {

      /* in principle we could get phi from the constrain equation:

         ppw->pvecmetric[ppw->index_mt_phi] = -1.5 * (a2/k2/k2/s2/s2) * (k2 * delta_rho + 3.*a_prime_over_a * rho_plus_p_theta);

         with s2_squared = sqrt(1-3K/k2) = ppw->s_l[2]*ppw->s_l[2]

         This was the case in class v1.3. However the integration is
         more stable is we treat phi as a dynamical variable
         y[ppw->pv->index_pt_phi], which derivative is given by the
         second equation below (credits to Guido Walter Pettinari). */

      /* equation for psi */
      ppw->pvecmetric[ppw->index_mt_psi] = y[ppw->pv->index_pt_phi] - 4.5 * (a2/k2) * ppw->rho_plus_p_shear;

      /* equation for phi' */
      ppw->pvecmetric[ppw->index_mt_phi_prime] = -a_prime_over_a * ppw->pvecmetric[ppw->index_mt_psi] + 1.5 * (a2/k2) * ppw->rho_plus_p_theta;

      /* eventually, infer radiation streaming approximation for
         gamma and ur (this is exactly the right place to do it
         because the result depends on h_prime) */

      if (ppw->approx[ppw->index_ap_rsa] == (int)rsa_on) {

        class_call(perturbations_rsa_delta_and_theta(ppr,pba,pth,ppt,k,y,a_prime_over_a,ppw->pvecthermo,ppw,ppt->error_message),
                   ppt->error_message,
                   ppt->error_message);
      }

      if ((pba->has_idr)&&(ppw->approx[ppw->index_ap_rsa_idr] == (int)rsa_idr_on)){

        class_call(perturbations_rsa_idr_delta_and_theta(ppr,pba,pth,ppt,k,y,a_prime_over_a,ppw->pvecthermo,ppw,ppt->error_message),
                   ppt->error_message,
                   ppt->error_message);
      }
    }

    /* synchronous gauge */
    if (ppt->gauge == synchronous) {

      /* first equation involving total density fluctuation */
      ppw->pvecmetric[ppw->index_mt_h_prime] =
        ( k2 * s2_squared * y[ppw->pv->index_pt_eta] + 1.5 * a2 * ppw->delta_rho)/(0.5*a_prime_over_a);  /* h' */

      /* eventually, infer radiation streaming approximation for
         gamma and ur (this is exactly the right place to do it
         because the result depends on h_prime) */

      if (ppw->approx[ppw->index_ap_rsa] == (int)rsa_on) {

        class_call(perturbations_rsa_delta_and_theta(ppr,pba,pth,ppt,k,y,a_prime_over_a,ppw->pvecthermo,ppw,ppt->error_message),
                   ppt->error_message,
                   ppt->error_message);
      }

      if ((pba->has_idr==_TRUE_)&&(ppw->approx[ppw->index_ap_rsa_idr] == (int)rsa_idr_on)) {

        class_call(perturbations_rsa_idr_delta_and_theta(ppr,pba,pth,ppt,k,y,a_prime_over_a,ppw->pvecthermo,ppw,ppt->error_message),
                   ppt->error_message,
                   ppt->error_message);

        ppw->rho_plus_p_theta += 4./3.*ppw->pvecback[pba->index_bg_rho_idr]*ppw->rsa_theta_idr;
      }

      /* second equation involving total velocity */
      ppw->pvecmetric[ppw->index_mt_eta_prime] = (1.5 * a2 * ppw->rho_plus_p_theta + 0.5 * pba->K * ppw->pvecmetric[ppw->index_mt_h_prime])/k2/s2_squared;  /* eta' */

      /* third equation involving total pressure */
      ppw->pvecmetric[ppw->index_mt_h_prime_prime] =
        - 2. * a_prime_over_a * ppw->pvecmetric[ppw->index_mt_h_prime]
        + 2. * k2 * s2_squared * y[ppw->pv->index_pt_eta]
        - 9. * a2 * ppw->delta_p;

      /* alpha = (h'+6eta')/2k^2 */
      ppw->pvecmetric[ppw->index_mt_alpha] = (ppw->pvecmetric[ppw->index_mt_h_prime] + 6.*ppw->pvecmetric[ppw->index_mt_eta_prime])/2./k2;

      /* eventually, infer first-order tight-coupling approximation for photon
         shear, then correct the total shear */
      if (ppw->approx[ppw->index_ap_tca] == (int)tca_on) {

        if (pth->has_idm_g == _TRUE_) {
          shear_g = 16./45./(ppw->pvecthermo[pth->index_th_dkappa] + ppw->pvecthermo[pth->index_th_dmu_idm_g])*(y[ppw->pv->index_pt_theta_g]+k2*ppw->pvecmetric[ppw->index_mt_alpha]);
        }
        else {
          shear_g = 16./45./ppw->pvecthermo[pth->index_th_dkappa]*(y[ppw->pv->index_pt_theta_g]+k2*ppw->pvecmetric[ppw->index_mt_alpha]);
        }

        ppw->rho_plus_p_shear += 4./3.*ppw->pvecback[pba->index_bg_rho_g]*shear_g;

      }

      if (pth->has_idm_dr == _TRUE_) {
        if (ppw->approx[ppw->index_ap_tca_idm_dr] == (int)tca_idm_dr_on){

          shear_idr = 0.5*8./15./ppw->pvecthermo[pth->index_th_dmu_idm_dr]/ppt->alpha_idm_dr[0]*(y[ppw->pv->index_pt_theta_idr]+k2*ppw->pvecmetric[ppw->index_mt_alpha]);

          ppw->rho_plus_p_shear += 4./3.*ppw->pvecback[pba->index_bg_rho_idr]*shear_idr;
        }
      }

      /* fourth equation involving total shear */
      ppw->pvecmetric[ppw->index_mt_alpha_prime] =  //TBC
        - 2. * a_prime_over_a * ppw->pvecmetric[ppw->index_mt_alpha]
        + y[ppw->pv->index_pt_eta]
        - 4.5 * (a2/k2) * ppw->rho_plus_p_shear;

    }

    /* transform (delta_m, theta_m) of the current gauge into
       gauge-independent variables (you could comment this out if you
       really want gauge-dependent results) */

    if (ppt->has_matter_source_in_current_gauge == _FALSE_) {
      if (ppt->has_source_delta_m == _TRUE_) {
        ppw->delta_m += 3. *ppw->pvecback[pba->index_bg_a]*ppw->pvecback[pba->index_bg_H] * ppw->theta_m/k2;
        // note: until 2.4.3 there was a typo, the factor was (-2 H'/H) instead
        // of (3 aH). There is the same typo in the CLASSgal paper
        // 1307.1459v1,v2,v3. It came from a confusion between (1+w_total)
        // and (1+w_matter)=1 [the latter is the relevant one here].
        //
        // note2: at this point this gauge-invariant variable is only
        // valid if all matter components are pressureless and
        // stable. This relation will be generalized soon to the case
        // of decaying dark matter.
      }

      if (ppt->has_source_delta_cb == _TRUE_) {
        ppw->delta_cb += 3. *ppw->pvecback[pba->index_bg_a]*ppw->pvecback[pba->index_bg_H] * ppw->theta_cb/k2;//check gauge transformation
      }

      if (ppt->has_source_theta_m == _TRUE_) {
        if  (ppt->gauge == synchronous) {
          ppw->theta_m += ppw->pvecmetric[ppw->index_mt_alpha]*k2;
        }
      }
      if (ppt->has_source_theta_cb == _TRUE_){
        if  (ppt->gauge == synchronous) {
          ppw->theta_cb += ppw->pvecmetric[ppw->index_mt_alpha]*k2; //check gauge transformation
        }
      }
    }
  }
  /** - for vector modes */

  if (_vectors_) {

    if (ppt->gauge == newtonian) {

      ppw->pvecmetric[ppw->index_mt_V_prime] = -2.*a_prime_over_a*y[ppw->pv->index_pt_V] - 3.*ppw->vector_source_pi/k;

    }

    if (ppt->gauge == synchronous) {

      // assuming    vector_source_pi = p_class a^2 pi_T^{(1)} and  vector_source_v = (rho_class+p_class)a^2 v^{(1)}

      // from Hu and White:
      ppw->pvecmetric[ppw->index_mt_hv_prime_prime] = -2.*a_prime_over_a*y[ppw->pv->index_pt_hv_prime] - 3.*ppw->vector_source_pi/k2;

      // what we suspect:
      //ppw->pvecmetric[ppw->index_mt_hv_prime_prime] = -2.*a_prime_over_a*y[ppw->pv->index_pt_hv_prime] - 3.*ppw->vector_source_pi;

      // if we use the other equation:
      //ppw->pvecmetric[ppw->index_mt_hv_prime] = -2./k/ (1.-2.*pba->K/k2) * 3. * ppw->vector_source_v;

    }

  }

  /** - for tensor modes */

  if (_tensors_) {

    /* single einstein equation for tensor perturbations */
    ppw->pvecmetric[ppw->index_mt_gw_prime_prime] = -2.*a_prime_over_a*y[ppw->pv->index_pt_gwdot]-(k2+2.*pba->K)*y[ppw->pv->index_pt_gw]+ppw->gw_source;

  }

  return _SUCCESS_;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x858, %rsp            # imm = 0x858
movq %r9, %rbp
movl %r8d, %r12d
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
movq 0x890(%rsp), %rdx
movq 0x30(%rdx), %rax
movslq 0x380(%rsi), %rcx
movsd (%rax,%rcx,8), %xmm2
movslq 0x384(%rsi), %rcx
movsd (%rax,%rcx,8), %xmm1
movsd %xmm2, 0x18(%rsp)
mulsd %xmm2, %xmm1
movsd %xmm1, 0x40(%rsp)
movsd 0x318(%rsi), %xmm1
movsd %xmm1, 0x30(%rsp)
movq %rdx, (%rsp)
movq %r15, %rdx
movq %r14, %rcx
movsd %xmm0, 0x38(%rsp)
callq 0x8eb14
testl %eax, %eax
je 0x8e348
addq $0x6c8a, %r14           # imm = 0x6C8A
leaq 0x600eb(%rip), %rsi     # 0xee3f0
leaq 0x89560(%rip), %rdx     # 0x11786c
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x5fd0f(%rip), %rsi     # 0xee034
leaq 0x89584(%rip), %rdx     # 0x1178b0
movq %r14, %rdi
movl $0x1adb, %ecx           # imm = 0x1ADB
movq %rbx, %r8
xorl %eax, %eax
callq 0x30af0
movl $0x1, %eax
jmp 0x8eb02
movq %r13, 0x10(%rsp)
movq %r15, 0x28(%rsp)
movsd 0x18(%rsp), %xmm7
movsd 0x38(%rsp), %xmm5
movapd %xmm5, %xmm6
mulsd %xmm5, %xmm6
cmpw $0x1, 0xe(%r14)
movq 0x890(%rsp), %r10
movsd 0x40(%rsp), %xmm1
movq %r14, %r13
jne 0x8ea1f
cmpl %r12d, 0x848(%r13)
jne 0x8ea1f
mulsd %xmm7, %xmm7
movl 0x83c(%r13), %eax
testl %eax, %eax
jne 0x8e508
movq 0x40(%r10), %rax
movq 0x48(%r10), %rcx
movslq 0xd4(%rcx), %rcx
movapd %xmm7, %xmm0
divsd %xmm6, %xmm0
movsd 0x8425e(%rip), %xmm2    # 0x112620
mulsd %xmm0, %xmm2
mulsd 0x60(%r10), %xmm2
addsd (%rbp,%rcx,8), %xmm2
movslq (%r10), %rcx
movsd %xmm2, (%rax,%rcx,8)
mulsd 0x62be6(%rip), %xmm0    # 0xf0fc8
mulsd 0x58(%r10), %xmm0
mulsd %xmm1, %xmm2
subsd %xmm2, %xmm0
movslq 0x4(%r10), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x180(%r10), %rax
movslq 0x164(%r10), %rcx
cmpl $0x1, (%rax,%rcx,4)
jne 0x8e4a1
movq %r10, (%rsp)
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %r13, %rcx
movapd %xmm5, %xmm0
movq %rbp, %r8
movq %r10, %r14
movsd %xmm6, 0x20(%rsp)
movsd %xmm7, 0x18(%rsp)
callq 0x9159a
movsd 0x18(%rsp), %xmm7
movsd 0x20(%rsp), %xmm6
movsd 0x38(%rsp), %xmm5
movsd 0x40(%rsp), %xmm1
movq %r14, %r10
testl %eax, %eax
je 0x8e4a1
addq $0x6c8a, %r13           # imm = 0x6C8A
leaq 0x5ff83(%rip), %rsi     # 0xee3f0
leaq 0x89453(%rip), %rdx     # 0x1178c7
leaq 0x50(%rsp), %r14
movq %r14, %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x5fba7(%rip), %rsi     # 0xee034
leaq 0x8941c(%rip), %rdx     # 0x1178b0
movq %r13, %rdi
movl $0x1aff, %ecx           # imm = 0x1AFF
jmp 0x8e60f
movq 0x10(%rsp), %rax
cmpw $0x0, 0x4c6(%rax)
je 0x8e501
movq 0x180(%r10), %rax
movslq 0x16c(%r10), %rcx
cmpl $0x1, (%rax,%rcx,4)
jne 0x8e501
movq %r10, (%rsp)
movq %r13, %rcx
movapd %xmm5, %xmm0
movq %rbp, %r8
movq %r10, %r14
movsd %xmm6, 0x20(%rsp)
movsd %xmm7, 0x18(%rsp)
callq 0x91a20
movsd 0x18(%rsp), %xmm7
movsd 0x20(%rsp), %xmm6
movsd 0x38(%rsp), %xmm5
movsd 0x40(%rsp), %xmm1
movq %r14, %r10
movl 0x83c(%r13), %eax
cmpl $0x1, %eax
jne 0x8e8fa
movsd 0x30(%rsp), %xmm2
mulsd 0x62f61(%rip), %xmm2    # 0xf1480
divsd %xmm6, %xmm2
addsd 0x5fd35(%rip), %xmm2    # 0xee260
movapd %xmm6, %xmm0
movsd %xmm2, 0x30(%rsp)
mulsd %xmm2, %xmm0
movq 0x40(%r10), %rax
movq 0x48(%r10), %rcx
movslq 0xd0(%rcx), %rcx
movsd 0x62a78(%rip), %xmm3    # 0xf0fc8
mulsd %xmm7, %xmm3
movsd 0x50(%r10), %xmm2
mulsd %xmm3, %xmm2
mulsd (%rbp,%rcx,8), %xmm0
addsd %xmm2, %xmm0
movsd 0x60760(%rip), %xmm2    # 0xeecd0
mulsd %xmm1, %xmm2
divsd %xmm2, %xmm0
movslq 0x8(%r10), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x180(%r10), %rcx
movslq 0x164(%r10), %rax
cmpl $0x1, (%rcx,%rax,4)
jne 0x8e63f
movsd %xmm3, 0x48(%rsp)
movsd %xmm7, 0x18(%rsp)
movsd %xmm6, 0x20(%rsp)
movq %r10, (%rsp)
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %r13, %rcx
movapd %xmm5, %xmm0
movq %rbp, %r8
movq %r10, %r14
callq 0x9159a
testl %eax, %eax
je 0x8e617
addq $0x6c8a, %r13           # imm = 0x6C8A
leaq 0x5fe10(%rip), %rsi     # 0xee3f0
leaq 0x892e0(%rip), %rdx     # 0x1178c7
leaq 0x50(%rsp), %r14
movq %r14, %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x5fa34(%rip), %rsi     # 0xee034
leaq 0x892a9(%rip), %rdx     # 0x1178b0
movq %r13, %rdi
movl $0x1b19, %ecx           # imm = 0x1B19
movq %r14, %r8
jmp 0x8e337
movq 0x180(%r14), %rcx
movq %r14, %r10
movsd 0x40(%rsp), %xmm1
movsd 0x38(%rsp), %xmm5
movsd 0x20(%rsp), %xmm6
movsd 0x18(%rsp), %xmm7
movsd 0x48(%rsp), %xmm3
movq 0x10(%rsp), %rax
cmpw $0x1, 0x4c6(%rax)
jne 0x8e707
movslq 0x16c(%r10), %rax
cmpl $0x1, (%rcx,%rax,4)
movq 0x10(%rsp), %rax
movq 0x28(%rsp), %r15
movsd 0x30(%rsp), %xmm2
jne 0x8e712
movq %r10, (%rsp)
movq %r13, %rcx
movapd %xmm5, %xmm0
movq %rbp, %r8
movq %r10, %r14
movsd %xmm6, 0x20(%rsp)
movsd %xmm7, 0x18(%rsp)
movsd %xmm3, 0x48(%rsp)
callq 0x91a20
movsd 0x48(%rsp), %xmm3
movsd 0x30(%rsp), %xmm2
movsd 0x18(%rsp), %xmm7
movsd 0x20(%rsp), %xmm6
movsd 0x38(%rsp), %xmm5
movsd 0x40(%rsp), %xmm1
movq 0x28(%rsp), %r15
movq %r14, %r10
movq 0x10(%rsp), %rax
movslq 0x3b0(%rax), %rax
movq 0x30(%r14), %rcx
movsd (%rcx,%rax,8), %xmm0
movq 0x10(%rsp), %rax
mulsd 0x62dd7(%rip), %xmm0    # 0xf14c0
mulsd 0xd0(%r14), %xmm0
movq 0x180(%r14), %rcx
addsd 0x58(%r14), %xmm0
movsd %xmm0, 0x58(%r14)
jmp 0x8e712
movq 0x28(%rsp), %r15
movsd 0x30(%rsp), %xmm2
movsd 0x605b6(%rip), %xmm4    # 0xeecd0
movsd 0x318(%rax), %xmm0
mulsd %xmm4, %xmm0
movq 0x40(%r10), %rax
movslq 0x8(%r10), %rdi
mulsd (%rax,%rdi,8), %xmm0
mulsd 0x58(%r10), %xmm3
addsd %xmm0, %xmm3
divsd %xmm6, %xmm3
divsd %xmm2, %xmm3
movslq 0x10(%r10), %r11
movsd %xmm3, (%rax,%r11,8)
movsd 0x61009(%rip), %xmm0    # 0xef760
movapd %xmm2, %xmm3
movapd %xmm6, %xmm2
addsd %xmm6, %xmm2
mulsd %xmm3, %xmm2
movq 0x48(%r10), %rsi
movslq 0xd0(%rsi), %rdx
mulsd (%rbp,%rdx,8), %xmm2
mulsd %xmm1, %xmm0
movsd (%rax,%rdi,8), %xmm3
mulsd %xmm0, %xmm3
addsd %xmm2, %xmm3
movsd 0x83d8f(%rip), %xmm2    # 0x112520
mulsd %xmm7, %xmm2
mulsd 0x68(%r10), %xmm2
addsd %xmm3, %xmm2
movslq 0xc(%r10), %r9
movsd %xmm2, (%rax,%r9,8)
movsd (%rax,%r11,8), %xmm2
mulsd 0x60eb9(%rip), %xmm2    # 0xef670
addsd (%rax,%rdi,8), %xmm2
mulsd %xmm4, %xmm2
divsd %xmm6, %xmm2
movslq 0x14(%r10), %rdi
movsd %xmm2, (%rax,%rdi,8)
movslq 0x160(%r10), %r9
cmpl $0x0, (%rcx,%r9,4)
jne 0x8e84e
cmpw $0x1, 0x36(%r15)
movq 0x38(%r10), %r11
movslq 0xe80(%r15), %r9
movsd (%r11,%r9,8), %xmm4
jne 0x8e801
movslq 0xec8(%r15), %r9
addsd (%r11,%r9,8), %xmm4
movsd 0x83e1f(%rip), %xmm3    # 0x112628
divsd %xmm4, %xmm3
movslq 0x4(%rsi), %r9
mulsd %xmm6, %xmm2
addsd (%rbp,%r9,8), %xmm2
mulsd %xmm3, %xmm2
movq 0x30(%r10), %r11
movq 0x10(%rsp), %r9
movslq 0x38c(%r9), %r9
movsd (%r11,%r9,8), %xmm3
mulsd 0x62c82(%rip), %xmm3    # 0xf14c0
mulsd %xmm2, %xmm3
addsd 0x60(%r10), %xmm3
movsd %xmm3, 0x60(%r10)
cmpw $0x1, 0x38(%r15)
jne 0x8e8d0
movslq 0x168(%r10), %r9
cmpl $0x0, (%rcx,%r9,4)
jne 0x8e8d0
movq 0x30(%r10), %rcx
movq 0x38(%r10), %r11
movslq 0xeac(%r15), %r9
movsd 0x83c75(%rip), %xmm3    # 0x1124f0
divsd (%r11,%r9,8), %xmm3
movq 0x820(%r13), %r9
divsd (%r9), %xmm3
movslq 0x94(%rsi), %rsi
movsd (%rax,%rdi,8), %xmm2
mulsd %xmm6, %xmm2
addsd (%rbp,%rsi,8), %xmm2
mulsd %xmm3, %xmm2
movq 0x10(%rsp), %rsi
movslq 0x3b0(%rsi), %rsi
movsd (%rcx,%rsi,8), %xmm3
mulsd 0x62c00(%rip), %xmm3    # 0xf14c0
mulsd %xmm2, %xmm3
addsd 0x60(%r10), %xmm3
movsd %xmm3, 0x60(%r10)
mulsd (%rax,%rdi,8), %xmm0
addsd (%rbp,%rdx,8), %xmm0
divsd %xmm6, %xmm7
mulsd 0x83d39(%rip), %xmm7    # 0x112620
mulsd 0x60(%r10), %xmm7
addsd %xmm0, %xmm7
movslq 0x18(%r10), %rcx
movsd %xmm7, (%rax,%rcx,8)
cmpw $0x0, 0x844(%r13)
jne 0x8ea1f
cmpw $0x1, 0x87c(%r13)
jne 0x8e95c
movq 0x30(%r10), %rax
movq 0x10(%rsp), %rdx
movslq 0x380(%rdx), %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd 0x60d4f(%rip), %xmm0    # 0xef680
movslq 0x384(%rdx), %rcx
mulsd (%rax,%rcx,8), %xmm0
mulsd 0x108(%r10), %xmm0
divsd %xmm6, %xmm0
addsd 0x100(%r10), %xmm0
movsd %xmm0, 0x100(%r10)
cmpw $0x1, 0x87e(%r13)
jne 0x8e9af
movq 0x30(%r10), %rax
movq 0x10(%rsp), %rdx
movslq 0x380(%rdx), %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd 0x60cfc(%rip), %xmm0    # 0xef680
movslq 0x384(%rdx), %rcx
mulsd (%rax,%rcx,8), %xmm0
mulsd 0x118(%r10), %xmm0
divsd %xmm6, %xmm0
addsd 0x110(%r10), %xmm0
movsd %xmm0, 0x110(%r10)
cmpw $0x1, 0x898(%r13)
jne 0x8e9e7
cmpl $0x1, 0x83c(%r13)
jne 0x8e9e7
movq 0x40(%r10), %rax
movslq 0x14(%r10), %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd %xmm6, %xmm0
addsd 0x108(%r10), %xmm0
movsd %xmm0, 0x108(%r10)
cmpw $0x1, 0x89a(%r13)
jne 0x8ea1f
cmpl $0x1, 0x83c(%r13)
jne 0x8ea1f
movq 0x40(%r10), %rax
movslq 0x14(%r10), %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd %xmm6, %xmm0
addsd 0x118(%r10), %xmm0
movsd %xmm0, 0x118(%r10)
cmpw $0x1, 0x10(%r13)
jne 0x8ea9d
cmpl %r12d, 0x850(%r13)
jne 0x8ea9d
movl 0x83c(%r13), %eax
cmpl $0x1, %eax
je 0x8ea50
testl %eax, %eax
jne 0x8ea9d
movl $0xdc, %ecx
addq 0x48(%r10), %rcx
movl $0x20, %eax
jmp 0x8ea62
movl $0xd8, %ecx
addq 0x48(%r10), %rcx
movl $0x24, %eax
movapd %xmm6, %xmm5
movsd 0x60cf6(%rip), %xmm0    # 0xef760
mulsd %xmm1, %xmm0
movsd 0x80(%r10), %xmm2
mulsd 0x62a01(%rip), %xmm2    # 0xf1480
movslq (%rcx), %rcx
divsd %xmm5, %xmm2
mulsd (%rbp,%rcx,8), %xmm0
addsd %xmm2, %xmm0
movq 0x40(%r10), %rcx
movslq (%r10,%rax), %rax
movsd %xmm0, (%rcx,%rax,8)
xorl %eax, %eax
cmpw $0x1, 0x12(%r13)
jne 0x8eb02
cmpl %r12d, 0x84c(%r13)
jne 0x8eb02
mulsd 0x60ca8(%rip), %xmm1    # 0xef760
movq 0x40(%r10), %rcx
movq 0x48(%r10), %rdx
movq 0x10(%rsp), %rsi
movsd 0x318(%rsi), %xmm0
addsd %xmm0, %xmm0
addsd %xmm6, %xmm0
movslq 0xe0(%rdx), %rsi
mulsd (%rbp,%rsi,8), %xmm0
movslq 0xe4(%rdx), %rdx
mulsd (%rbp,%rdx,8), %xmm1
subsd %xmm0, %xmm1
addsd 0x78(%r10), %xmm1
movslq 0x1c(%r10), %rdx
movsd %xmm1, (%rcx,%rdx,8)
addq $0x858, %rsp            # imm = 0x858
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq