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

  /** - define local variables */

  /* (a) time scale of Fourier mode, \f$ \tau_k = 1/k \f$ */
  double tau_k;
  /* (b) time scale of expansion, \f$ \tau_h = a/a' \f$ */
  double tau_h;
  /* (c) time scale of recombination, \f$ \tau_{\gamma} = 1/\kappa' \f$ */
  double tau_c = 0.;

  /* in case of idm_g there is a third condition for the tca, tau_c * dmu_idm_g << 1 which we need to take into account - see 1802.06589 */
  double tau_dmu_idm_g = 0., tau_dmu_idm_dr = 0.;
  /* in case of idm_b there is a fourth condition */
  double tau_R_idm_b;
  /** - compute Fourier mode time scale = \f$ \tau_k = 1/k \f$ */


  class_test(k == 0.,
             ppt->error_message,
             "stop to avoid division by zero");

  tau_k = 1./k;

  /** - evaluate background quantities with background_at_tau() and
      Hubble time scale \f$ \tau_h = a/a' \f$ */

  class_call(background_at_tau(pba,tau, normal_info, (interpolation_method)ppw->inter_mode, &(ppw->last_index_back), ppw->pvecback),
             pba->error_message,
             ppt->error_message);

  class_test(ppw->pvecback[pba->index_bg_H]*ppw->pvecback[pba->index_bg_a] == 0.,
             ppt->error_message,
             "aH=0, stop to avoid division by zero");

  tau_h = 1./(ppw->pvecback[pba->index_bg_H]*ppw->pvecback[pba->index_bg_a]);

  /** - for scalar modes: */

  if (_scalars_) {

    /** - --> (a) evaluate thermodynamical quantities with thermodynamics_at_z() */

    class_call(thermodynamics_at_z(pba,
                                   pth,
                                   1./ppw->pvecback[pba->index_bg_a]-1.,  /* redshift z=1/a-1 */
                                   (interpolation_method)ppw->inter_mode,
                                   &(ppw->last_index_thermo),
                                   ppw->pvecback,
                                   ppw->pvecthermo),
               pth->error_message,
               ppt->error_message);

    /* in case of idm_g, calculate relevant quantities */
    if (pth->has_idm_g == _TRUE_) {
      class_test(ppw->pvecthermo[pth->index_th_dmu_idm_g] == 0.,
                 ppt->error_message,
                 "dmu_idm_g = 0 - stop to avoid division by 0")
        tau_dmu_idm_g = 1./ppw->pvecthermo[pth->index_th_dmu_idm_g];
    }

    /** - ---> (b.1.) if \f$ \kappa'=0 \f$, recombination is finished; tight-coupling approximation must be off */

    if (ppw->pvecthermo[pth->index_th_dkappa] == 0.) {

      ppw->approx[ppw->index_ap_tca] = (int)tca_off;

    }

    /** - ---> (b.2.) if \f$ \kappa' \neq 0 \f$, recombination is not finished: check tight-coupling approximation */

    else {

      /** - ----> (b.2.a) compute recombination time scale for photons, \f$ \tau_{\gamma} = 1/ \kappa' \f$ */
      tau_c = 1./ppw->pvecthermo[pth->index_th_dkappa];

      class_test(tau_c < 0.,
                 ppt->error_message,
                 "tau_c = 1/kappa' should always be positive unless there is something wrong in the thermodynamics module. However you have here tau_c=%e at z=%e, conformal time=%e x_e=%e. (This could come from the interpolation of a too poorly sampled reionisation history?).\n",
                 tau_c,
                 1./ppw->pvecback[pba->index_bg_a]-1.,
                 tau,
                 ppw->pvecthermo[pth->index_th_xe]);

      /** - ----> (b.2.b) check whether tight-coupling approximation should be on */

      if ((tau_c/tau_h < ppr->tight_coupling_trigger_tau_c_over_tau_h) &&
          (tau_c/tau_k < ppr->tight_coupling_trigger_tau_c_over_tau_k)) {
        ppw->approx[ppw->index_ap_tca] = (int)tca_on;
      }
      else {
        ppw->approx[ppw->index_ap_tca] = (int)tca_off;
      }


      /* for idm_g there is a third condition for the tca */
      if (pth->has_idm_g == _TRUE_) {
        if (tau_c/tau_dmu_idm_g >= ppr->tight_coupling_trigger_tau_c_over_tau_dmu_idm_g) {
          if (ppw->approx[ppw->index_ap_tca] == (int)tca_on && ppt->perturbations_verbose > 2)   {
            printf("switched off tca for k = %5.e because of idm_g at tau = %5.e\n", k, tau);
          }
          ppw->approx[ppw->index_ap_tca] = (int)tca_off;
        }
      }
    }
    /* for idm_b there is a fourth condition for the tca */
    if (pth->has_idm_b == _TRUE_) {
      tau_R_idm_b = 1./ppw->pvecthermo[pth->index_th_R_idm_b];
      if (tau_c/tau_R_idm_b >= ppr->tight_coupling_trigger_tau_c_over_tau_R_idm_b) {
        if (ppw->approx[ppw->index_ap_tca] == (int)tca_on && ppt->perturbations_verbose > 2)   {
          printf("switched off tca for k = %5.e because of idm_b at tau = %5.e\n", k, tau);
        }
        ppw->approx[ppw->index_ap_tca] = (int)tca_off;
      }
    }

    if (pth->has_idm_dr == _TRUE_){
      if (ppw->pvecthermo[pth->index_th_dmu_idm_dr] == 0.){
        ppw->approx[ppw->index_ap_tca_idm_dr] = (int)tca_idm_dr_off;
      }
      else{
        tau_dmu_idm_dr = 1./ppw->pvecthermo[pth->index_th_dmu_idm_dr];

        class_test(tau_dmu_idm_dr < 0.,
                   ppt->error_message,
                   "negative tau_idm_dr=1/dmu_idm_dr=%e at z=%e, conformal time=%e.\n",
                   tau_dmu_idm_dr,
                   1./ppw->pvecback[pba->index_bg_a]-1.,
                   tau);

        if ((tau_dmu_idm_dr / tau_h < ppr->idm_dr_tight_coupling_trigger_tau_c_over_tau_h) &&
            (tau_dmu_idm_dr / tau_k < ppr->idm_dr_tight_coupling_trigger_tau_c_over_tau_k) &&
            (pth->n_index_idm_dr>=2) && (ppt->idr_nature == idr_free_streaming)) {
          ppw->approx[ppw->index_ap_tca_idm_dr] = (int)tca_idm_dr_on;
        }
        else{
          ppw->approx[ppw->index_ap_tca_idm_dr] = (int)tca_idm_dr_off;
        }
      }
    }

    /** - --> (c) free-streaming approximations */

    if ((tau/tau_k > ppr->radiation_streaming_trigger_tau_over_tau_k) &&
        (tau > pth->tau_free_streaming) &&
        (ppr->radiation_streaming_approximation != rsa_none)) {

      ppw->approx[ppw->index_ap_rsa] = (int)rsa_on;
    }
    else {
      ppw->approx[ppw->index_ap_rsa] = (int)rsa_off;
    }

    /* interacting dark radiation free streaming approximation*/
    if (pba->has_idr == _TRUE_){

      if ((tau/tau_k > ppr->idr_streaming_trigger_tau_over_tau_k) &&
          (tau > pth->tau_idr_free_streaming) &&
          (pth->has_idm_dr == _FALSE_ || pth->n_index_idm_dr >= 2) &&
          (ppr->idr_streaming_approximation != rsa_idr_none)){

        ppw->approx[ppw->index_ap_rsa_idr] = (int)rsa_idr_on;
      }
      else{
        ppw->approx[ppw->index_ap_rsa_idr] = (int)rsa_idr_off;
      }
    }

    if (pba->has_ur == _TRUE_) {

      if ((tau/tau_k > ppr->ur_fluid_trigger_tau_over_tau_k) &&
          (ppr->ur_fluid_approximation != ufa_none)) {

        ppw->approx[ppw->index_ap_ufa] = (int)ufa_on;
      }
      else {
        ppw->approx[ppw->index_ap_ufa] = (int)ufa_off;
      }
    }

    if (pba->has_ncdm == _TRUE_) {

      if ((tau/tau_k > ppr->ncdm_fluid_trigger_tau_over_tau_k) &&
          (ppr->ncdm_fluid_approximation != ncdmfa_none)) {

        ppw->approx[ppw->index_ap_ncdmfa] = (int)ncdmfa_on;
      }
      else {
        ppw->approx[ppw->index_ap_ncdmfa] = (int)ncdmfa_off;
      }
    }
  }

  /** - for tensor modes: */

  if (_tensors_) {

    /** - --> (a) evaluate thermodynamical quantities with thermodynamics_at_z() */

    class_call(thermodynamics_at_z(pba,
                                   pth,
                                   1./ppw->pvecback[pba->index_bg_a]-1.,  /* redshift z=1/a-1 */
                                   (interpolation_method)ppw->inter_mode,
                                   &(ppw->last_index_thermo),
                                   ppw->pvecback,
                                   ppw->pvecthermo),
               pth->error_message,
               ppt->error_message);

    /** - ---> (b.1.) if \f$ \kappa'=0 \f$, recombination is finished; tight-coupling approximation must be off */

    if (ppw->pvecthermo[pth->index_th_dkappa] == 0.) {

      ppw->approx[ppw->index_ap_tca] = (int)tca_off;

    }

    /** - ---> (b.2.) if \f$ \kappa' \neq 0 \f$, recombination is not finished: check tight-coupling approximation */

    else {

      /** - ----> (b.2.a) compute recombination time scale for photons, \f$ \tau_{\gamma} = 1/ \kappa' \f$ */
      tau_c = 1./ppw->pvecthermo[pth->index_th_dkappa];

      /** - ----> (b.2.b) check whether tight-coupling approximation should be on */
      if ((tau_c/tau_h < ppr->tight_coupling_trigger_tau_c_over_tau_h) &&
          (tau_c/tau_k < ppr->tight_coupling_trigger_tau_c_over_tau_k)) {
        ppw->approx[ppw->index_ap_tca] = (int)tca_on;
      }
      else {
        ppw->approx[ppw->index_ap_tca] = (int)tca_off;
      }
    }

    if ((tau/tau_k > ppr->radiation_streaming_trigger_tau_over_tau_k) &&
        (tau > pth->tau_free_streaming) &&
        (ppr->radiation_streaming_approximation != rsa_none)) {

      ppw->approx[ppw->index_ap_rsa] = (int)rsa_on;
    }
    else {
      ppw->approx[ppw->index_ap_rsa] = (int)rsa_off;
    }
  }

  return _SUCCESS_;
}

// Assembly:
subq $0x6878, %rsp           # imm = 0x6878
movq %rdi, 0x6868(%rsp)
movq %rsi, 0x6860(%rsp)
movq %rdx, 0x6858(%rsp)
movq %rcx, 0x6850(%rsp)
movl %r8d, 0x684c(%rsp)
movsd %xmm0, 0x6840(%rsp)
movsd %xmm1, 0x6838(%rsp)
movq %r9, 0x6830(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x6818(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x6810(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x6808(%rsp)
movsd 0x6840(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xf8e2d
jp 0xf8e2d
leaq 0x6000(%rsp), %rdi
leaq 0xdaf64(%rip), %rsi     # 0x1d3d24
movb $0x0, %al
callq 0x5b9c0
leaq 0x5800(%rsp), %rdi
leaq 0x6000(%rsp), %rcx
leaq 0xd92a4(%rip), %rsi     # 0x1d2082
leaq 0x10295c(%rip), %rdx    # 0x1fb741
movb $0x0, %al
callq 0x5b9c0
movq 0x6850(%rsp), %rdi
addq $0x6c8a, %rdi           # imm = 0x6C8A
leaq 0x5800(%rsp), %r8
leaq 0xd922a(%rip), %rsi     # 0x1d2034
leaq 0x10254b(%rip), %rdx    # 0x1fb35c
movl $0x191b, %ecx           # imm = 0x191B
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x6874(%rsp)
jmp 0xf9dc0
movsd 0xd9413(%rip), %xmm0    # 0x1d2248
divsd 0x6840(%rsp), %xmm0
movsd %xmm0, 0x6828(%rsp)
movq 0x6860(%rsp), %rdi
movsd 0x6838(%rsp), %xmm0
movq 0x6830(%rsp), %rax
movswl 0x154(%rax), %edx
movq 0x6830(%rsp), %rcx
addq $0x158, %rcx            # imm = 0x158
movq 0x6830(%rsp), %rax
movq 0x30(%rax), %r8
movl $0x1, %esi
callq 0x9e9b0
cmpl $0x1, %eax
jne 0xf8efe
leaq 0x5000(%rsp), %rdi
movq 0x6860(%rsp), %rcx
addq $0xd1c, %rcx            # imm = 0xD1C
leaq 0xd9529(%rip), %rsi     # 0x1d23d8
leaq 0x1024c3(%rip), %rdx    # 0x1fb379
movb $0x0, %al
callq 0x5b9c0
movq 0x6850(%rsp), %rdi
addq $0x6c8a, %rdi           # imm = 0x6C8A
leaq 0x5000(%rsp), %r8
leaq 0xd9159(%rip), %rsi     # 0x1d2034
leaq 0x10247a(%rip), %rdx    # 0x1fb35c
movl $0x1924, %ecx           # imm = 0x1924
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x6874(%rsp)
jmp 0xf9dc0
movq 0x6830(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x6860(%rsp), %rcx
movslq 0x384(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x6830(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x6860(%rsp), %rcx
movslq 0x380(%rcx), %rcx
mulsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xf8fc5
jp 0xf8fc5
leaq 0x4800(%rsp), %rdi
leaq 0x102498(%rip), %rsi    # 0x1fb3f0
movb $0x0, %al
callq 0x5b9c0
leaq 0x4000(%rsp), %rdi
leaq 0x4800(%rsp), %rcx
leaq 0xd910c(%rip), %rsi     # 0x1d2082
leaq 0x102498(%rip), %rdx    # 0x1fb415
movb $0x0, %al
callq 0x5b9c0
movq 0x6850(%rsp), %rdi
addq $0x6c8a, %rdi           # imm = 0x6C8A
leaq 0x4000(%rsp), %r8
leaq 0xd9092(%rip), %rsi     # 0x1d2034
leaq 0x1023b3(%rip), %rdx    # 0x1fb35c
movl $0x1928, %ecx           # imm = 0x1928
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x6874(%rsp)
jmp 0xf9dc0
movq 0x6830(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x6860(%rsp), %rcx
movslq 0x384(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x6830(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x6860(%rsp), %rcx
movslq 0x380(%rcx), %rcx
mulsd (%rax,%rcx,8), %xmm1
movsd 0xd923b(%rip), %xmm0    # 0x1d2248
divsd %xmm1, %xmm0
movsd %xmm0, 0x6820(%rsp)
movq 0x6850(%rsp), %rax
movswl 0xe(%rax), %eax
cmpl $0x1, %eax
jne 0xf9adc
movl 0x684c(%rsp), %eax
movq 0x6850(%rsp), %rcx
cmpl 0x848(%rcx), %eax
jne 0xf9adc
movq 0x6860(%rsp), %rdi
movq 0x6858(%rsp), %rsi
movq 0x6830(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x6860(%rsp), %rcx
movslq 0x380(%rcx), %rcx
movsd 0xd91cb(%rip), %xmm0    # 0x1d2248
divsd (%rax,%rcx,8), %xmm0
movsd 0xd91be(%rip), %xmm1    # 0x1d2248
subsd %xmm1, %xmm0
movq 0x6830(%rsp), %rax
movswl 0x154(%rax), %edx
movq 0x6830(%rsp), %rcx
addq $0x15c, %rcx            # imm = 0x15C
movq 0x6830(%rsp), %rax
movq 0x30(%rax), %r8
movq 0x6830(%rsp), %rax
movq 0x38(%rax), %r9
callq 0xb05b0
cmpl $0x1, %eax
jne 0xf913b
leaq 0x3800(%rsp), %rdi
movq 0x6858(%rsp), %rcx
addq $0x1064, %rcx           # imm = 0x1064
leaq 0xd92ec(%rip), %rsi     # 0x1d23d8
leaq 0x102366(%rip), %rdx    # 0x1fb459
movb $0x0, %al
callq 0x5b9c0
movq 0x6850(%rsp), %rdi
addq $0x6c8a, %rdi           # imm = 0x6C8A
leaq 0x3800(%rsp), %r8
leaq 0xd8f1c(%rip), %rsi     # 0x1d2034
leaq 0x10223d(%rip), %rdx    # 0x1fb35c
movl $0x193a, %ecx           # imm = 0x193A
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x6874(%rsp)
jmp 0xf9dc0
movq 0x6858(%rsp), %rax
movswl 0x36(%rax), %eax
cmpl $0x1, %eax
jne 0xf9228
movq 0x6830(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x6858(%rsp), %rcx
movslq 0xec8(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xf91f7
jp 0xf91f7
leaq 0x3000(%rsp), %rdi
leaq 0x102375(%rip), %rsi    # 0x1fb4ff
movb $0x0, %al
callq 0x5b9c0
leaq 0x2800(%rsp), %rdi
leaq 0x3000(%rsp), %rcx
leaq 0xd8eda(%rip), %rsi     # 0x1d2082
leaq 0x10237c(%rip), %rdx    # 0x1fb52b
movb $0x0, %al
callq 0x5b9c0
movq 0x6850(%rsp), %rdi
addq $0x6c8a, %rdi           # imm = 0x6C8A
leaq 0x2800(%rsp), %r8
leaq 0xd8e60(%rip), %rsi     # 0x1d2034
leaq 0x102181(%rip), %rdx    # 0x1fb35c
movl $0x1940, %ecx           # imm = 0x1940
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x6874(%rsp)
jmp 0xf9dc0
movq 0x6830(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x6858(%rsp), %rcx
movslq 0xec8(%rcx), %rcx
movsd 0xd902e(%rip), %xmm0    # 0x1d2248
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x6810(%rsp)
movq 0x6830(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x6858(%rsp), %rcx
movslq 0xe80(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xf927d
jp 0xf927d
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x160(%rcx), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0xf94f8
movq 0x6830(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x6858(%rsp), %rcx
movslq 0xe80(%rcx), %rcx
movsd 0xd8fa8(%rip), %xmm0    # 0x1d2248
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x6818(%rsp)
xorps %xmm0, %xmm0
ucomisd 0x6818(%rsp), %xmm0
jbe 0xf93a2
leaq 0x2000(%rsp), %rdi
movsd 0x6818(%rsp), %xmm0
movq 0x6830(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x6860(%rsp), %rcx
movslq 0x380(%rcx), %rcx
movsd 0xd8f54(%rip), %xmm1    # 0x1d2248
divsd (%rax,%rcx,8), %xmm1
movsd 0xd8f47(%rip), %xmm2    # 0x1d2248
subsd %xmm2, %xmm1
movsd 0x6838(%rsp), %xmm2
movq 0x6830(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x6858(%rsp), %rcx
movslq 0xe7c(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm3
leaq 0x102225(%rip), %rsi    # 0x1fb55a
movb $0x4, %al
callq 0x5b9c0
leaq 0x1800(%rsp), %rdi
leaq 0x2000(%rsp), %rcx
leaq 0xd8d2f(%rip), %rsi     # 0x1d2082
leaq 0x102304(%rip), %rdx    # 0x1fb65e
movb $0x0, %al
callq 0x5b9c0
movq 0x6850(%rsp), %rdi
addq $0x6c8a, %rdi           # imm = 0x6C8A
leaq 0x1800(%rsp), %r8
leaq 0xd8cb5(%rip), %rsi     # 0x1d2034
leaq 0x101fd6(%rip), %rdx    # 0x1fb35c
movl $0x1959, %ecx           # imm = 0x1959
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x6874(%rsp)
jmp 0xf9dc0
movsd 0x6818(%rsp), %xmm1
divsd 0x6820(%rsp), %xmm1
movq 0x6868(%rsp), %rax
movsd 0x578(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xf9419
movsd 0x6818(%rsp), %xmm1
divsd 0x6828(%rsp), %xmm1
movq 0x6868(%rsp), %rax
movsd 0x580(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xf9419
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x160(%rcx), %rcx
movl $0x0, (%rax,%rcx,4)
jmp 0xf943e
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x160(%rcx), %rcx
movl $0x1, (%rax,%rcx,4)
movq 0x6858(%rsp), %rax
movswl 0x36(%rax), %eax
cmpl $0x1, %eax
jne 0xf94f6
movsd 0x6818(%rsp), %xmm0
divsd 0x6810(%rsp), %xmm0
movq 0x6868(%rsp), %rax
ucomisd 0x588(%rax), %xmm0
jb 0xf94f4
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x160(%rcx), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0xf94cf
movq 0x6850(%rsp), %rax
movswl 0x6c88(%rax), %eax
cmpl $0x2, %eax
jle 0xf94cf
movsd 0x6840(%rsp), %xmm0
movsd 0x6838(%rsp), %xmm1
leaq 0x1021a1(%rip), %rdi    # 0x1fb669
movb $0x2, %al
callq 0x8030
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x160(%rcx), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0xf94f6
jmp 0xf94f8
movq 0x6858(%rsp), %rax
movswl 0x34(%rax), %eax
cmpl $0x1, %eax
jne 0xf95e1
movq 0x6830(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x6858(%rsp), %rcx
movslq 0xed8(%rcx), %rcx
movsd 0xd8d18(%rip), %xmm0    # 0x1d2248
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x6800(%rsp)
movsd 0x6818(%rsp), %xmm0
divsd 0x6800(%rsp), %xmm0
movq 0x6868(%rsp), %rax
ucomisd 0x590(%rax), %xmm0
jb 0xf95df
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x160(%rcx), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0xf95ba
movq 0x6850(%rsp), %rax
movswl 0x6c88(%rax), %eax
cmpl $0x2, %eax
jle 0xf95ba
movsd 0x6840(%rsp), %xmm0
movsd 0x6838(%rsp), %xmm1
leaq 0x1020f4(%rip), %rdi    # 0x1fb6a7
movb $0x2, %al
callq 0x8030
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x160(%rcx), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0xf95e1
movq 0x6858(%rsp), %rax
movswl 0x38(%rax), %eax
cmpl $0x1, %eax
jne 0xf981f
movq 0x6830(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x6858(%rsp), %rcx
movslq 0xeac(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xf964b
jp 0xf964b
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x168(%rcx), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0xf981d
movq 0x6830(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x6858(%rsp), %rcx
movslq 0xeac(%rcx), %rcx
movsd 0xd8bda(%rip), %xmm0    # 0x1d2248
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x6808(%rsp)
xorps %xmm0, %xmm0
ucomisd 0x6808(%rsp), %xmm0
jbe 0xf9750
leaq 0x1000(%rsp), %rdi
movsd 0x6808(%rsp), %xmm0
movq 0x6830(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x6860(%rsp), %rcx
movslq 0x380(%rcx), %rcx
movsd 0xd8b86(%rip), %xmm1    # 0x1d2248
divsd (%rax,%rcx,8), %xmm1
movsd 0xd8b79(%rip), %xmm2    # 0x1d2248
subsd %xmm2, %xmm1
movsd 0x6838(%rsp), %xmm2
leaq 0x102002(%rip), %rsi    # 0x1fb6e5
movb $0x3, %al
callq 0x5b9c0
leaq 0x800(%rsp), %rdi
leaq 0x1000(%rsp), %rcx
leaq 0xd8981(%rip), %rsi     # 0x1d2082
leaq 0x10201e(%rip), %rdx    # 0x1fb726
movb $0x0, %al
callq 0x5b9c0
movq 0x6850(%rsp), %rdi
addq $0x6c8a, %rdi           # imm = 0x6C8A
leaq 0x800(%rsp), %r8
leaq 0xd8907(%rip), %rsi     # 0x1d2034
leaq 0x101c28(%rip), %rdx    # 0x1fb35c
movl $0x1987, %ecx           # imm = 0x1987
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x6874(%rsp)
jmp 0xf9dc0
movsd 0x6808(%rsp), %xmm1
divsd 0x6820(%rsp), %xmm1
movq 0x6868(%rsp), %rax
movsd 0x5b0(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xf97f6
movsd 0x6808(%rsp), %xmm1
divsd 0x6828(%rsp), %xmm1
movq 0x6868(%rsp), %rax
movsd 0x5a8(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xf97f6
movq 0x6858(%rsp), %rax
movsd 0x1028(%rax), %xmm0
movsd 0xd94c8(%rip), %xmm1    # 0x1d2c80
ucomisd %xmm1, %xmm0
jb 0xf97f6
movq 0x6850(%rsp), %rax
cmpl $0x0, 0x830(%rax)
jne 0xf97f6
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x168(%rcx), %rcx
movl $0x0, (%rax,%rcx,4)
jmp 0xf981b
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x168(%rcx), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0xf981d
jmp 0xf981f
movsd 0x6838(%rsp), %xmm0
divsd 0x6828(%rsp), %xmm0
movq 0x6868(%rsp), %rax
ucomisd 0x628(%rax), %xmm0
jbe 0xf9896
movsd 0x6838(%rsp), %xmm0
movq 0x6858(%rsp), %rax
ucomisd 0xfd8(%rax), %xmm0
jbe 0xf9896
movq 0x6868(%rsp), %rax
cmpl $0x3, 0x620(%rax)
je 0xf9896
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x164(%rcx), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0xf98bb
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x164(%rcx), %rcx
movl $0x0, (%rax,%rcx,4)
movq 0x6860(%rsp), %rax
movswl 0x4c6(%rax), %eax
cmpl $0x1, %eax
jne 0xf99a4
movsd 0x6838(%rsp), %xmm0
divsd 0x6828(%rsp), %xmm0
movq 0x6868(%rsp), %rax
ucomisd 0x640(%rax), %xmm0
jbe 0xf997d
movsd 0x6838(%rsp), %xmm0
movq 0x6858(%rsp), %rax
ucomisd 0xfe0(%rax), %xmm0
jbe 0xf997d
movq 0x6858(%rsp), %rax
movswl 0x38(%rax), %eax
cmpl $0x0, %eax
je 0xf9945
movq 0x6858(%rsp), %rax
movsd 0x1028(%rax), %xmm0
movsd 0xd9341(%rip), %xmm1    # 0x1d2c80
ucomisd %xmm1, %xmm0
jb 0xf997d
movq 0x6868(%rsp), %rax
cmpl $0x0, 0x638(%rax)
je 0xf997d
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x16c(%rcx), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0xf99a2
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x16c(%rcx), %rcx
movl $0x0, (%rax,%rcx,4)
jmp 0xf99a4
movq 0x6860(%rsp), %rax
movswl 0x4c4(%rax), %eax
cmpl $0x1, %eax
jne 0xf9a3f
movsd 0x6838(%rsp), %xmm0
divsd 0x6828(%rsp), %xmm0
movq 0x6868(%rsp), %rax
ucomisd 0x658(%rax), %xmm0
jbe 0xf9a18
movq 0x6868(%rsp), %rax
cmpl $0x3, 0x650(%rax)
je 0xf9a18
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x170(%rcx), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0xf9a3d
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x170(%rcx), %rcx
movl $0x0, (%rax,%rcx,4)
jmp 0xf9a3f
movq 0x6860(%rsp), %rax
movswl 0x4be(%rax), %eax
cmpl $0x1, %eax
jne 0xf9ada
movsd 0x6838(%rsp), %xmm0
divsd 0x6828(%rsp), %xmm0
movq 0x6868(%rsp), %rax
ucomisd 0x668(%rax), %xmm0
jbe 0xf9ab3
movq 0x6868(%rsp), %rax
cmpl $0x3, 0x660(%rax)
je 0xf9ab3
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x174(%rcx), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0xf9ad8
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x174(%rcx), %rcx
movl $0x0, (%rax,%rcx,4)
jmp 0xf9ada
jmp 0xf9adc
movq 0x6850(%rsp), %rax
movswl 0x12(%rax), %eax
cmpl $0x1, %eax
jne 0xf9db5
movl 0x684c(%rsp), %eax
movq 0x6850(%rsp), %rcx
cmpl 0x84c(%rcx), %eax
jne 0xf9db5
movq 0x6860(%rsp), %rdi
movq 0x6858(%rsp), %rsi
movq 0x6830(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x6860(%rsp), %rcx
movslq 0x380(%rcx), %rcx
movsd 0xd8709(%rip), %xmm0    # 0x1d2248
divsd (%rax,%rcx,8), %xmm0
movsd 0xd86fc(%rip), %xmm1    # 0x1d2248
subsd %xmm1, %xmm0
movq 0x6830(%rsp), %rax
movswl 0x154(%rax), %edx
movq 0x6830(%rsp), %rcx
addq $0x15c, %rcx            # imm = 0x15C
movq 0x6830(%rsp), %rax
movq 0x30(%rax), %r8
movq 0x6830(%rsp), %rax
movq 0x38(%rax), %r9
callq 0xb05b0
cmpl $0x1, %eax
jne 0xf9bf3
movq %rsp, %rdi
movq 0x6858(%rsp), %rcx
addq $0x1064, %rcx           # imm = 0x1064
leaq 0xd882f(%rip), %rsi     # 0x1d23d8
leaq 0x1018a9(%rip), %rdx    # 0x1fb459
movb $0x0, %al
callq 0x5b9c0
movq 0x6850(%rsp), %rdi
addq $0x6c8a, %rdi           # imm = 0x6C8A
movq %rsp, %r8
leaq 0xd8464(%rip), %rsi     # 0x1d2034
leaq 0x101785(%rip), %rdx    # 0x1fb35c
movl $0x19d6, %ecx           # imm = 0x19D6
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x6874(%rsp)
jmp 0xf9dc0
movq 0x6830(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x6858(%rsp), %rcx
movslq 0xe80(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xf9c48
jp 0xf9c48
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x160(%rcx), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0xf9d17
movq 0x6830(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x6858(%rsp), %rcx
movslq 0xe80(%rcx), %rcx
movsd 0xd85dd(%rip), %xmm0    # 0x1d2248
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x6818(%rsp)
movsd 0x6818(%rsp), %xmm1
divsd 0x6820(%rsp), %xmm1
movq 0x6868(%rsp), %rax
movsd 0x578(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xf9cf0
movsd 0x6818(%rsp), %xmm1
divsd 0x6828(%rsp), %xmm1
movq 0x6868(%rsp), %rax
movsd 0x580(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xf9cf0
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x160(%rcx), %rcx
movl $0x0, (%rax,%rcx,4)
jmp 0xf9d15
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x160(%rcx), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0xf9d17
movsd 0x6838(%rsp), %xmm0
divsd 0x6828(%rsp), %xmm0
movq 0x6868(%rsp), %rax
ucomisd 0x628(%rax), %xmm0
jbe 0xf9d8e
movsd 0x6838(%rsp), %xmm0
movq 0x6858(%rsp), %rax
ucomisd 0xfd8(%rax), %xmm0
jbe 0xf9d8e
movq 0x6868(%rsp), %rax
cmpl $0x3, 0x620(%rax)
je 0xf9d8e
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x164(%rcx), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0xf9db3
movq 0x6830(%rsp), %rax
movq 0x180(%rax), %rax
movq 0x6830(%rsp), %rcx
movslq 0x164(%rcx), %rcx
movl $0x0, (%rax,%rcx,4)
jmp 0xf9db5
movl $0x0, 0x6874(%rsp)
movl 0x6874(%rsp), %eax
addq $0x6878, %rsp           # imm = 0x6878
retq
nop