// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1038, %rsp           # imm = 0x1038
movq %rcx, %rbx
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jne 0x85caa
jp 0x85caa
pushq $0x1
popq %r12
leaq 0x610b1(%rip), %rsi     # 0xe6cfd
leaq 0x30(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x5f420(%rip), %rsi     # 0xe5082
leaq 0x88940(%rip), %rdx     # 0x10e5a9
leaq 0x830(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x5f3a8(%rip), %rsi     # 0xe5034
leaq 0x88531(%rip), %rdx     # 0x10e1c4
movq %rbx, %rdi
movl $0x191b, %ecx           # imm = 0x191B
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
jmp 0x85dca
movq %r9, %r15
movl %r8d, %ebp
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r12
movsd %xmm0, 0x8(%rsp)
movswl 0x154(%r9), %edx
leaq 0x158(%r9), %rcx
movq 0x30(%r9), %r8
pushq $0x1
popq %rsi
movq %r13, %rdi
movsd %xmm1, 0x20(%rsp)
movapd %xmm1, %xmm0
callq 0x5887d
cmpl $0x1, %eax
jne 0x85d38
addq $0xd1c, %r13            # imm = 0xD1C
leaq 0x5f6f6(%rip), %rsi     # 0xe53f0
leaq 0x884e0(%rip), %rdx     # 0x10e1e1
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x5f313(%rip), %rsi     # 0xe5034
leaq 0x8849c(%rip), %rdx     # 0x10e1c4
movq %rbx, %rdi
movl $0x1924, %ecx           # imm = 0x1924
movq %r14, %r8
jmp 0x85dbf
movq 0x30(%r15), %r8
movslq 0x384(%r13), %rax
movslq 0x380(%r13), %rcx
movsd (%r8,%rcx,8), %xmm1
movsd (%r8,%rax,8), %xmm0
mulsd %xmm1, %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jne 0x85ddf
jp 0x85ddf
leaq 0x884eb(%rip), %rsi     # 0x10e258
leaq 0x30(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x5f2ff(%rip), %rsi     # 0xe5082
leaq 0x884f3(%rip), %rdx     # 0x10e27d
leaq 0x830(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x5f287(%rip), %rsi     # 0xe5034
leaq 0x88410(%rip), %rdx     # 0x10e1c4
movq %rbx, %rdi
movl $0x1928, %ecx           # imm = 0x1928
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
pushq $0x1
popq %r12
movl %r12d, %eax
addq $0x1038, %rsp           # imm = 0x1038
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsd 0x5f479(%rip), %xmm4    # 0xe5260
movapd %xmm4, %xmm5
divsd 0x8(%rsp), %xmm5
movapd %xmm4, %xmm2
divsd %xmm0, %xmm2
cmpw $0x1, 0xe(%rbx)
jne 0x8635b
cmpl %ebp, 0x848(%rbx)
jne 0x8635b
movsd %xmm2, 0x18(%rsp)
movsd %xmm5, 0x10(%rsp)
divsd %xmm1, %xmm4
addsd 0x5f9c0(%rip), %xmm4    # 0xe57e8
movswl 0x154(%r15), %edx
leaq 0x15c(%r15), %rcx
movq 0x38(%r15), %r9
movq %r13, %rdi
movq %r14, %rsi
movapd %xmm4, %xmm0
callq 0x61ff8
cmpl $0x1, %eax
jne 0x85e98
addq $0x1064, %r14           # imm = 0x1064
leaq 0x5f593(%rip), %rsi     # 0xe53f0
leaq 0x8845d(%rip), %rdx     # 0x10e2c1
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x5f1b0(%rip), %rsi     # 0xe5034
leaq 0x88339(%rip), %rdx     # 0x10e1c4
movq %rbx, %rdi
movl $0x193a, %ecx           # imm = 0x193A
jmp 0x85dbc
movzwl 0x36(%r14), %ecx
movq 0x38(%r15), %rax
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
cmpw $0x1, %cx
movsd 0x20(%rsp), %xmm2
movsd 0x5f3a5(%rip), %xmm4    # 0xe5260
movsd 0x10(%rsp), %xmm5
jne 0x85f3a
movslq 0xec8(%r14), %rdx
movsd (%rax,%rdx,8), %xmm3
ucomisd %xmm0, %xmm3
jne 0x85f32
jp 0x85f32
leaq 0x88489(%rip), %rsi     # 0x10e367
leaq 0x30(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x5f18e(%rip), %rsi     # 0xe5082
leaq 0x88498(%rip), %rdx     # 0x10e393
leaq 0x830(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x5f116(%rip), %rsi     # 0xe5034
leaq 0x8829f(%rip), %rdx     # 0x10e1c4
movq %rbx, %rdi
movl $0x1940, %ecx           # imm = 0x1940
jmp 0x85dbc
movapd %xmm4, %xmm0
divsd %xmm3, %xmm0
movslq 0xe80(%r14), %rdx
movsd (%rax,%rdx,8), %xmm3
ucomisd %xmm1, %xmm3
jne 0x860cd
jp 0x860cd
movq 0x180(%r15), %rax
movslq 0x160(%r15), %rcx
leaq (%rax,%rcx,4), %rcx
xorpd %xmm6, %xmm6
movsd 0x8(%rsp), %xmm0
movl $0x1, (%rcx)
cmpw $0x1, 0x34(%r14)
jne 0x85ff6
movq 0x38(%r15), %rcx
movslq 0xed8(%r14), %rdx
movapd %xmm4, %xmm1
divsd (%rcx,%rdx,8), %xmm1
divsd %xmm1, %xmm6
ucomisd 0x590(%r12), %xmm6
jb 0x85ff6
movslq 0x160(%r15), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x85fef
cmpw $0x3, 0x6c88(%rbx)
jl 0x85fef
leaq 0x8854d(%rip), %rdi     # 0x10e50f
movapd %xmm2, %xmm1
movb $0x2, %al
callq 0x8030
movsd 0x10(%rsp), %xmm5
movsd 0x5f285(%rip), %xmm4    # 0xe5260
movsd 0x20(%rsp), %xmm2
movq 0x180(%r15), %rax
movslq 0x160(%r15), %rcx
movl $0x1, (%rax,%rcx,4)
movzwl 0x38(%r14), %ecx
cmpw $0x1, %cx
jne 0x86032
movq 0x38(%r15), %rdx
movslq 0xeac(%r14), %rsi
movsd (%rdx,%rsi,8), %xmm1
pushq $0x1
popq %rdx
xorpd %xmm3, %xmm3
ucomisd %xmm3, %xmm1
jne 0x8627f
jp 0x8627f
movslq 0x168(%r15), %rsi
movl %edx, (%rax,%rsi,4)
movapd %xmm2, %xmm0
divsd %xmm5, %xmm0
ucomisd 0x628(%r12), %xmm0
jbe 0x86060
ucomisd 0xfd8(%r14), %xmm2
jbe 0x86060
cmpl $0x3, 0x620(%r12)
jne 0x86313
xorl %edx, %edx
movslq 0x164(%r15), %rsi
movl %edx, (%rax,%rsi,4)
cmpw $0x1, 0x4c6(%r13)
jne 0x86172
ucomisd 0x640(%r12), %xmm0
jbe 0x86166
ucomisd 0xfe0(%r14), %xmm2
jbe 0x86166
testw %cx, %cx
je 0x860b6
movsd 0x1028(%r14), %xmm1
ucomisd 0x5fc30(%rip), %xmm1    # 0xe5ce0
jb 0x86166
cmpl $0x0, 0x638(%r12)
je 0x86166
pushq $0x1
popq %rcx
jmp 0x86168
movapd %xmm4, %xmm6
divsd %xmm3, %xmm6
ucomisd %xmm6, %xmm1
jbe 0x861a9
movq 0x30(%r15), %rcx
movslq 0x380(%r13), %rdx
divsd (%rcx,%rdx,8), %xmm4
addsd 0x5f6f1(%rip), %xmm4    # 0xe57e8
movslq 0xe7c(%r14), %rcx
movsd (%rax,%rcx,8), %xmm3
leaq 0x882b8(%rip), %rsi     # 0x10e3c2
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movapd %xmm6, %xmm0
movapd %xmm4, %xmm1
movb $0x4, %al
callq 0x2e014
leaq 0x5ef5a(%rip), %rsi     # 0xe5082
leaq 0x88397(%rip), %rdx     # 0x10e4c6
leaq 0x830(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x5eee2(%rip), %rsi     # 0xe5034
leaq 0x8806b(%rip), %rdx     # 0x10e1c4
movq %rbx, %rdi
movl $0x1959, %ecx           # imm = 0x1959
jmp 0x85dbc
xorl %ecx, %ecx
movslq 0x16c(%r15), %rdx
movl %ecx, (%rax,%rdx,4)
cmpw $0x1, 0x4c4(%r13)
movsd 0x18(%rsp), %xmm2
jne 0x86328
ucomisd 0x658(%r12), %xmm0
jbe 0x861a2
cmpl $0x3, 0x650(%r12)
jne 0x8631b
xorl %ecx, %ecx
jmp 0x8631e
movapd %xmm6, %xmm1
divsd 0x18(%rsp), %xmm1
movsd 0x578(%r12), %xmm3
ucomisd %xmm1, %xmm3
jbe 0x861dd
movapd %xmm6, %xmm1
divsd %xmm5, %xmm1
movsd 0x580(%r12), %xmm3
xorl %edx, %edx
ucomisd %xmm1, %xmm3
ja 0x861e0
pushq $0x1
popq %rdx
movq 0x180(%r15), %rax
movslq 0x160(%r15), %rsi
movl %edx, (%rax,%rsi,4)
cmpw $0x1, %cx
jne 0x86308
movapd %xmm6, %xmm1
divsd %xmm0, %xmm1
ucomisd 0x588(%r12), %xmm1
movsd 0x8(%rsp), %xmm0
jb 0x85f78
movslq 0x160(%r15), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x86276
cmpw $0x3, 0x6c88(%rbx)
jl 0x86276
leaq 0x8829a(%rip), %rdi     # 0x10e4d1
movapd %xmm2, %xmm1
movb $0x2, %al
movsd %xmm6, 0x28(%rsp)
callq 0x8030
movsd 0x28(%rsp), %xmm6
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm5
movsd 0x5effe(%rip), %xmm4    # 0xe5260
movsd 0x20(%rsp), %xmm2
movq 0x180(%r15), %rax
movslq 0x160(%r15), %rcx
leaq (%rax,%rcx,4), %rcx
jmp 0x85f72
movapd %xmm4, %xmm0
divsd %xmm1, %xmm0
ucomisd %xmm0, %xmm3
jbe 0x864f1
movq 0x30(%r15), %rax
movslq 0x380(%r13), %rcx
divsd (%rax,%rcx,8), %xmm4
addsd 0x5f53f(%rip), %xmm4    # 0xe57e8
leaq 0x8829d(%rip), %rsi     # 0x10e54d
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movapd %xmm4, %xmm1
movb $0x3, %al
callq 0x2e014
leaq 0x5edb8(%rip), %rsi     # 0xe5082
leaq 0x882bd(%rip), %rdx     # 0x10e58e
leaq 0x830(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x5ed40(%rip), %rsi     # 0xe5034
leaq 0x87ec9(%rip), %rdx     # 0x10e1c4
movq %rbx, %rdi
movl $0x1987, %ecx           # imm = 0x1987
jmp 0x85dbc
movsd 0x8(%rsp), %xmm0
jmp 0x85f78
pushq $0x1
popq %rdx
jmp 0x86062
pushq $0x1
popq %rcx
movslq 0x170(%r15), %rdx
movl %ecx, (%rax,%rdx,4)
cmpw $0x1, 0x4be(%r13)
jne 0x8635b
ucomisd 0x668(%r12), %xmm0
jbe 0x8634a
cmpl $0x3, 0x660(%r12)
jne 0x8634e
xorl %ecx, %ecx
jmp 0x86351
pushq $0x1
popq %rcx
movslq 0x174(%r15), %rdx
movl %ecx, (%rax,%rdx,4)
movq %r12, 0x8(%rsp)
xorl %r12d, %r12d
cmpw $0x1, 0x12(%rbx)
jne 0x85dca
cmpl %ebp, 0x84c(%rbx)
jne 0x85dca
movsd %xmm2, 0x18(%rsp)
movsd %xmm5, 0x10(%rsp)
movslq 0x380(%r13), %rax
movq 0x30(%r15), %r8
movq 0x38(%r15), %r9
divsd (%r8,%rax,8), %xmm4
addsd 0x5f445(%rip), %xmm4    # 0xe57e8
movswl 0x154(%r15), %edx
leaq 0x15c(%r15), %rcx
movq %r13, %rdi
movq %r14, %rsi
movapd %xmm4, %xmm0
callq 0x61ff8
cmpl $0x1, %eax
jne 0x8640f
addq $0x1064, %r14           # imm = 0x1064
leaq 0x5f01c(%rip), %rsi     # 0xe53f0
leaq 0x87ee6(%rip), %rdx     # 0x10e2c1
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x5ec39(%rip), %rsi     # 0xe5034
leaq 0x87dc2(%rip), %rdx     # 0x10e1c4
movq %rbx, %rdi
movl $0x19d6, %ecx           # imm = 0x19D6
jmp 0x85dbc
movq 0x38(%r15), %rax
movslq 0xe80(%r14), %rcx
movsd (%rax,%rcx,8), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x8643c
jp 0x8643c
pushq $0x1
popq %rcx
movsd 0x20(%rsp), %xmm1
movsd 0x10(%rsp), %xmm3
jmp 0x8648d
movsd 0x5ee1c(%rip), %xmm2    # 0xe5260
divsd %xmm0, %xmm2
movapd %xmm2, %xmm0
divsd 0x18(%rsp), %xmm0
movq 0x8(%rsp), %rax
movsd 0x578(%rax), %xmm1
ucomisd %xmm0, %xmm1
movsd 0x20(%rsp), %xmm1
movsd 0x10(%rsp), %xmm3
jbe 0x8648a
divsd %xmm3, %xmm2
movq 0x8(%rsp), %rax
movsd 0x580(%rax), %xmm0
xorl %ecx, %ecx
ucomisd %xmm2, %xmm0
ja 0x8648d
pushq $0x1
popq %rcx
movq 0x180(%r15), %rax
movslq 0x160(%r15), %rdx
movl %ecx, (%rax,%rdx,4)
movapd %xmm1, %xmm0
divsd %xmm3, %xmm0
movq 0x8(%rsp), %rcx
ucomisd 0x628(%rcx), %xmm0
jbe 0x864ce
ucomisd 0xfd8(%r14), %xmm1
jbe 0x864ce
movq 0x8(%rsp), %rcx
cmpl $0x3, 0x620(%rcx)
jne 0x864de
movslq 0x164(%r15), %rcx
andl $0x0, (%rax,%rcx,4)
jmp 0x85dca
movslq 0x164(%r15), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0x85dca
movapd %xmm0, %xmm1
divsd 0x18(%rsp), %xmm1
movsd 0x5b0(%r12), %xmm3
ucomisd %xmm1, %xmm3
jbe 0x86028
divsd %xmm5, %xmm0
movsd 0x5a8(%r12), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x86028
movsd 0x1028(%r14), %xmm0
ucomisd 0x5f7a8(%rip), %xmm0    # 0xe5ce0
jb 0x86028
cmpl $0x0, 0x830(%rbx)
jne 0x86028
xorl %edx, %edx
jmp 0x86028