// File: /workspace/github_c_makefile_star2_O2/PoulinV[P]AxiCLASS/build/../source/background.c
// Function: background_solve
int background_solve(
                     struct precision *ppr,
                     struct background *pba
                     ) {

  /** Summary: */

  /** - define local variables */

  /* parameters and workspace for the background_derivs function */
  struct background_parameters_and_workspace bpaw;
  /* vector of quantities to be integrated */
  double * pvecback_integration;
  /* vector of all background quantities */
  double * pvecback;
  /* comoving radius coordinate in Mpc (equal to conformal distance in flat case) */
  double comoving_radius=0.;

  /* VP: scalar field critical reshift and fractional energy density at z_c */
  double z_c_new, f_ede_new, phi_c_new, counter_scf = 0;
  /* parameters to find peak of pheno_axion/pheno_ADE EDE fluid */
  double z_peak_new;
 /* VP: some additional parameters in AxiCLASS */
  double integration_stepsize;
  double ac, n, anow, Tosc;
  short is_axion_converged = _FALSE_;
  double Omega0_axion_used=0;

  /* conformal distance in Mpc (equal to comoving radius in flat case) */
  double conformal_distance;

  /* evolvers */
  extern int evolver_rk(EVOLVER_PROTOTYPE);
  extern int evolver_ndf15(EVOLVER_PROTOTYPE);
  int (*generic_evolver)(EVOLVER_PROTOTYPE) = evolver_ndf15;

  /* initial and final loga values */
  double loga_ini, loga_final;
  /* growth factor today */
  double D_today;
  /* indices for the different arrays */
  int index_loga, index_scf;
  /* what parameters are used in the output? */
  int * used_in_output;

  /* index of ncdm species */
  int n_ncdm;

  /** - setup background workspace */
  bpaw.pba = pba;
  class_alloc(pvecback,pba->bg_size*sizeof(double),pba->error_message);
  bpaw.pvecback = pvecback;



  /** - Determine output vector */
  loga_final = 0.; // with our conventions, loga is in fact log(a/a_0); we integrate until today, when log(a/a_0) = 0
  pba->bt_size = ppr->background_Nloga;

  /** - allocate background tables */
  class_alloc(pba->tau_table,pba->bt_size * sizeof(double),pba->error_message);
  class_alloc(pba->z_table,pba->bt_size * sizeof(double),pba->error_message);

  class_alloc(pba->d2tau_dz2_table,pba->bt_size * sizeof(double),pba->error_message);
  class_alloc(pba->d2z_dtau2_table,pba->bt_size * sizeof(double),pba->error_message);

  class_alloc(pba->background_table,pba->bt_size * pba->bg_size * sizeof(double),pba->error_message);
  class_alloc(pba->d2background_dloga2_table,pba->bt_size * pba->bg_size * sizeof(double),pba->error_message);


  /** - define values of loga at which results will be stored */


  /** - choose the right evolver */
  switch (ppr->background_evolver) {

  case rk:
    generic_evolver = evolver_rk;
    if (pba->background_verbose > 1) {
      printf("%s\n", "Chose rk as generic_evolver");
    }
    break;

  case ndf15:
    generic_evolver = evolver_ndf15;
    if (pba->background_verbose > 1) {
      printf("%s\n", "Chose ndf15 as generic_evolver");
    }
    break;
  }
if(pba->Omega0_scf!=0){
  Omega0_axion_used = pba->Omega0_scf;
}
while(is_axion_converged == _FALSE_){
//VP: new to axiclass: To correctly incorporate the axion contribution to Omega_Lambda in the case where it is not known.
/** - allocate vector of quantities to be integrated */
class_alloc(pvecback_integration,pba->bi_size*sizeof(double),pba->error_message);

/** - impose initial conditions with background_initial_conditions() */
class_call(background_initial_conditions(ppr,pba,pvecback,pvecback_integration,&(loga_ini)),
           pba->error_message,
           pba->error_message);

 class_alloc(pba->loga_table,pba->bt_size * sizeof(double),pba->error_message);
 class_alloc(used_in_output, pba->bt_size*sizeof(int), pba->error_message);


   for (index_loga=0; index_loga<pba->bt_size; index_loga++) {
     pba->loga_table[index_loga] = loga_ini + index_loga*(loga_final-loga_ini)/(pba->bt_size-1);
     used_in_output[index_loga] = 1;
   }

  // is_axion_converged = _TRUE_;
  /** - perform the integration */
  class_call(generic_evolver(background_derivs,
                             loga_ini,
                             loga_final,
                             pvecback_integration,
                             used_in_output,
                             pba->bi_size,
                             &bpaw,
                             ppr->tol_background_integration,
                             ppr->smallest_allowed_variation,
                             background_timescale, //'evaluate_timescale', required by evolver_rk but not by ndf15
                             ppr->background_integration_stepsize,
                             pba->loga_table,
                             pba->bt_size,
                             background_sources,
                             NULL, //'print_variables' in evolver_rk could be set, but, not required
                             pba->error_message),
             pba->error_message,
             pba->error_message);


             /* VP: loop over background to ensure the closure relation, to be updated*/
     //
     if(pba->loop_over_background_for_closure_relation == _TRUE_){
       if(pba->scf_potential == axion || pba->scf_potential == axionquad){
         if(pba->Omega0_scf>0){
           //already included Omega_sf in the contribution
           is_axion_converged = _TRUE_;
         }else{
           class_test(pba->has_scf == _FALSE_,pba->error_message,"it's weird, you have loop_over_background_for_closure_relation = yes and  scf_potential = axion or axionquad but no scf, there must be a problem in your ini file!");
           pba->Omega0_axion = pvecback_integration[pba->index_bi_rho_scf]/pba->H0/pba->H0;
           // printf("pba->Omega0_axion %e Omega0_axion_used %e pba->precision_loop_over_background %e\n", pba->Omega0_axion,Omega0_axion_used,pba->precision_loop_over_background);
           if(pba->has_lambda == _TRUE_){
             // printf(" original Omega_Lambda %e \n",pba->Omega0_lambda);
             pba->Omega0_lambda-=pba->Omega0_axion;//we remove the axion contribution that we had "forgotten"
             pba->Omega0_lambda+=Omega0_axion_used;//initially, this is 0. As the code shoots it will be updated
             if(pba->background_verbose>0)printf(" adjusted Omega_Lambda to incorporate the axion contribution; new Omega_Lambda = %e  \n",pba->Omega0_lambda);
             if(pba->background_verbose>=10)printf("how far? new %e old %e rel. diff. %e \n",pba->Omega0_axion, Omega0_axion_used,(pba->Omega0_axion-Omega0_axion_used)/pba->Omega0_axion);

           }else if(pba->has_fld==_TRUE_){
             //if pba->has_lambda == _FALSE_ and pba->has_fld==_TRUE_ it means we are using pba->Omega0_fld to enforce the closure equation.
             pba->Omega0_fld -=pba->Omega0_axion;
             pba->Omega0_fld +=Omega0_axion_used;
             if(pba->background_verbose>0)printf(" adjusted Omega0_fld to incorporate the axion contribution; new Omega0_fld = %e  \n",pba->Omega0_fld);

           }
           //VP: test that the budget equation is satisfied or loop.
           if(fabs(pba->Omega0_axion-Omega0_axion_used)/pba->Omega0_axion<pba->precision_loop_over_background){
             //default is 1e-3
             is_axion_converged = _TRUE_;
           }
           else{
             Omega0_axion_used = pba->Omega0_axion;
             free(pvecback_integration);
             free(pba->loga_table);
             free(used_in_output);
            }
         }
       }else{
         //no axion or no loop required so we ignore the loop.
         is_axion_converged = _TRUE_;
       }
       }else{
         //no axion or no loop required so we ignore the loop.
         is_axion_converged = _TRUE_;
       }
  }
  /** - recover some quantities today */
  /* -> age in Gyears */
  pba->age = pvecback_integration[pba->index_bi_time]/_Gyr_over_Mpc_;
  /* -> conformal age in Mpc */
  pba->conformal_age = pvecback_integration[pba->index_bi_tau];
  /* -> contribution of decaying dark matter and dark radiation to the critical density today: */
  if (pba->has_dcdm == _TRUE_) {
    pba->Omega0_dcdm = pvecback_integration[pba->index_bi_rho_dcdm]/pba->H0/pba->H0;
  }




  if (pba->has_dr == _TRUE_){
    pba->Omega0_dr = pvecback_integration[pba->index_bi_rho_dr]/pba->H0/pba->H0;
  }
  /* -> scale-invariant growth rate today */
  D_today = pvecback_integration[pba->index_bi_D];
  if(pba->has_scf == _TRUE_){
    pba->f_ede = 0.0;
  }
  /** - In a loop over lines, fill rest of background table for
      quantities that depend on numbers like "conformal_age" or
      "D_today" that were calculated just before */
  for (index_loga=0; index_loga < pba->bt_size; index_loga++) {

    pba->background_table[index_loga*pba->bg_size+pba->index_bg_D]*= 1./D_today;

    conformal_distance = pba->conformal_age - pba->tau_table[index_loga];
    pba->background_table[index_loga*pba->bg_size+pba->index_bg_conf_distance] = conformal_distance;

    if (pba->sgnK == 0) { comoving_radius = conformal_distance; }
    else if (pba->sgnK == 1) { comoving_radius = sin(sqrt(pba->K)*conformal_distance)/sqrt(pba->K); }
    else if (pba->sgnK == -1) { comoving_radius = sinh(sqrt(-pba->K)*conformal_distance)/sqrt(-pba->K); }


    if(pba->scf_potential == axion || pba->scf_potential == phi_2n){
     /* Scalar field critical redshift and fractional energy density at z_c calculations */
     z_c_new = pba->z_table[index_loga];
     f_ede_new = pba->background_table[index_loga*pba->bg_size+pba->index_bg_Omega_scf];
     // printf("f_ede_new %e old fede %e z_c_new %e\n", f_ede_new,pba->f_ede,z_c_new);
     if(f_ede_new > pba->f_ede){//there's a small problem when axion behaves like DM
       pba->log10_z_c = log10(z_c_new);
       // pba->axion_ac = 1/z_c_new-1;
       pba->f_ede = f_ede_new;
       pba->phi_scf_c = pba->background_table[index_loga*pba->bg_size+pba->index_bg_phi_scf];
       // printf("z %e pba->f_ede %e\n", pba->z_table[i],pba->f_ede);
     }else{
       if(f_ede_new > pba->f_ede && pba->m_scf*pba->H0/pba->background_table[index_loga*pba->bg_size+pba->index_bg_H] <= pba->threshold_scf_fluid_m_over_H){
         pba->f_ede = f_ede_new;
         pba->phi_scf_c = pba->background_table[index_loga*pba->bg_size+pba->index_bg_phi_scf];
         pba->log10_z_c = log10(z_c_new);

       }
     }


    }

    /* EDE pheno_axion fluid calculations to determine f_ede_peak */
    if( pba->has_fld && pba->fluid_equation_of_state == EDE){
      if(pba->ede_parametrization == pheno_axion || pba->ede_parametrization == pheno_ADE ){
          z_peak_new = pba->z_table[index_loga];
          f_ede_new = pba->background_table[index_loga*pba->bg_size+pba->index_bg_Omega_fld];
          if(f_ede_new > pba->f_ede_peak){
            pba->a_peak = 1./(1+z_peak_new);
            pba->f_ede_peak = f_ede_new;
            if(pba->background_verbose>8) printf("f_ede_peak = %.2e \t>= %.2e = f_ede_now\n", pba->f_ede_peak, f_ede_new);
          }
          if(pba->background_verbose>2)printf(" -> early dark energy parameters z_peak_ede = %e\tf_ede(z_peak) = %.3e \n", 1/pba->a_peak-1,pba->f_ede_peak);
      }
    }


  // if(pba->log10_axion_ac == -30 && pba->has_scf == _TRUE_ && pba->scf_potential == axion){
  //   pba->log10_axion_ac = -1*pba->log10_z_c;
  //   pba->a_c = pow(10,pba->log10_axion_ac);
  //   printf("pba->log10_axion_ac %e w_scf %e\n", pba->log10_axion_ac,pba->w_scf);
  // }

    pba->background_table[index_loga*pba->bg_size+pba->index_bg_ang_distance] = comoving_radius/(1.+pba->z_table[index_loga]);
    pba->background_table[index_loga*pba->bg_size+pba->index_bg_lum_distance] = comoving_radius*(1.+pba->z_table[index_loga]);
  }

  /** - fill tables of second derivatives (in view of spline interpolation) */
  class_call(array_spline_table_lines(pba->z_table,
                                      pba->bt_size,
                                      pba->tau_table,
                                      1,
                                      pba->d2tau_dz2_table,
                                      _SPLINE_EST_DERIV_,
                                      pba->error_message),
             pba->error_message,
             pba->error_message);

  class_call(array_spline_table_lines(pba->tau_table,
                                      pba->bt_size,
                                      pba->z_table,
                                      1,
                                      pba->d2z_dtau2_table,
                                      _SPLINE_EST_DERIV_,
                                      pba->error_message),
             pba->error_message,
             pba->error_message);

  class_call(array_spline_table_lines(pba->loga_table,
                                      pba->bt_size,
                                      pba->background_table,
                                      pba->bg_size,
                                      pba->d2background_dloga2_table,
                                      _SPLINE_EST_DERIV_,
                                      pba->error_message),
             pba->error_message,
             pba->error_message);

  /** - compute remaining "related parameters" */

  /**  - so-called "effective neutrino number", computed at earliest
       time in interpolation table. This should be seen as a
       definition: Neff is the equivalent number of
       instantaneously-decoupled neutrinos accounting for the
       radiation density, beyond photons */

  pba->Neff = (pba->background_table[pba->index_bg_Omega_r]
               *pba->background_table[pba->index_bg_rho_crit]
               -pba->background_table[pba->index_bg_rho_g])
    /(7./8.*pow(4./11.,4./3.)*pba->background_table[pba->index_bg_rho_g]);

  /** - send information to standard output */
  if (pba->background_verbose > 0) {
    printf(" -> age = %f Gyr\n",pba->age);
    printf(" -> conformal age = %f Mpc\n",pba->conformal_age);
    printf(" -> H0 = %f km/s/Mpc\n",pba->H0/(1.e3 / _c_));
    printf(" -> N_eff = %g (summed over all species that are non-relativistic at early times) \n",pba->Neff);
  }

  if (pba->background_verbose > 2) {
    if ((pba->has_dcdm == _TRUE_)&&(pba->has_dr == _TRUE_)) {
      printf("    Decaying Cold Dark Matter details: (DCDM --> DR)\n");
      printf("     -> Omega0_dcdm = %f\n",pba->Omega0_dcdm);
      printf("     -> Omega0_dr = %f\n",pba->Omega0_dr);
      printf("     -> Omega0_dr+Omega0_dcdm = %f, input value = %f\n",
             pba->Omega0_dr+pba->Omega0_dcdm,pba->Omega0_dcdmdr);
      printf("     -> Omega_ini_dcdm/Omega_b = %f\n",pba->Omega_ini_dcdm/pba->Omega0_b);
    }
    if (pba->has_scf == _TRUE_) {
      printf("    Scalar field details:\n");
      printf("     -> Omega_scf = %g, wished %g\n",
      pba->background_table[(pba->bt_size-1)*pba->bg_size+pba->index_bg_rho_scf]/pba->background_table[(pba->bt_size-1)*pba->bg_size+pba->index_bg_rho_crit], pba->Omega0_scf);

      if(pba->scf_potential == axionquad){
      printf("Additional scf parameters used: \n");
      // printf("m_a = %g eV\n",(pba->scf_parameters[0]*pba->H0/1.5638e29));
      printf("m_a = %g eV\n",(pba->scf_parameters[0]));
      printf("H_0 = %g eV\n",pba->H0/_eV_over_Mpc_);
      if (pba->has_cdm == _TRUE_) printf("     -> scf fraction of cdm today = %g \n", (pba->background_table[(pba->bt_size-1)*pba->bg_size+pba->index_bg_rho_scf]) / (pba->background_table[(pba->bt_size-1)*pba->bg_size+pba->index_bg_rho_scf] + pba->background_table[(pba->bt_size-1)*pba->bg_size+pba->index_bg_rho_cdm]) );
      // printf("     -> for reference, rho_crit today = %g \n",pba->background_table[(pba->bt_size-1)*pba->bg_size+pba->index_bg_rho_crit]);

      }
      if(pba->scf_potential == axion){
      printf("Additional scf parameters used: \n");
      printf("n = %e m_a = %e eV, f_a/mpl = %e\n",pba->n_axion,(pba->m_scf*pba->H0/1.5638e29),pba->f_axion);
      if (pba->theta_axion == 0.0)
      {
        pba->theta_axion = pba->phi_ini_scf/pba->f_axion;
      }
      
      printf("     -> theta_ini = %e \t phi_ini = %e \n",pba->theta_axion , pba->phi_ini_scf);
      printf("     -> Exact log10(z_c) = %e \t f_ede = %e log10 f_ede = %e\n", pba->log10_z_c, pba->f_ede, log10(pba->f_ede));
      if(pba->log10_axion_ac > -30)printf("     -> approx log10(z_c) = %e pba->log10_axion_ac %e\n", log10(1/pow(10,pba->log10_axion_ac)-1),pba->log10_axion_ac);
      printf("     -> phi(z_c) = %e \n", pba->phi_scf_c);
      }
      if(pba->scf_potential ==phi_2n){
        printf("     -> approximate log10(z_c) = %e \t f_ede = %e\n", log10(1/pow(10,pba->log10_axion_ac)-1), pow(10,pba->log10_fraction_axion_ac));
        printf("     -> Exact log10(z_c) = %e \t f_ede = %e log10 f_ede = %e\n", pba->log10_z_c, pba->f_ede, log10(pba->f_ede));
        printf("     -> V0 = %e \t phi_i = %e => m_fld = %e pba->H0 %e\n", pba->V0_phi2n, pba->phi_ini_scf,pow(pow(2,pba->n_axion)*pba->V0_phi2n,0.5)/pba->H0,pba->H0);
      }

      if (pba->has_lambda == _TRUE_) {
        printf("     -> Omega_Lambda = %g, wished %g\n",
               pba->background_table[(pba->bt_size-1)*pba->bg_size+pba->index_bg_rho_lambda]/pba->background_table[(pba->bt_size-1)*pba->bg_size+pba->index_bg_rho_crit], pba->Omega0_lambda);
      }
      if(pba->scf_potential==pol_times_exp || pba->scf_potential==double_exp )
      {
        printf("     -> parameters: [lambda, alpha, A, B] = \n");
        printf("                    [");
        for (index_scf=0; index_scf<pba->scf_parameters_size-1; index_scf++) {
          printf("%.3f, ",pba->scf_parameters[index_scf]);
        }
        printf("%.3f]\n",pba->scf_parameters[pba->scf_parameters_size-1]);
      }

    }
  }

  /**  - store information in the background structure */
  pba->Omega0_m = pba->background_table[(pba->bt_size-1)*pba->bg_size+pba->index_bg_Omega_m];
  pba->Omega0_r = pba->background_table[(pba->bt_size-1)*pba->bg_size+pba->index_bg_Omega_r];
  pba->Omega0_de = 1. - (pba->Omega0_m + pba->Omega0_r + pba->Omega0_k);

  /* Compute the density fraction of non-free-streaming matter (in the minimal LambdaCDM model, this would be just Omega_b + Omega_cdm). This definition takes into account interating, decaying and warm dark matter, but it would need to be refined if some part of the matter component was modelled by the fluid (fld) or the scalar field (scf). */
  pba->Omega0_nfsm =  pba->Omega0_b;
  if (pba->has_cdm == _TRUE_)
    pba->Omega0_nfsm += pba->Omega0_cdm;
  if (pba->has_idm == _TRUE_)
    pba->Omega0_nfsm += pba->Omega0_idm;
  if (pba->has_dcdm == _TRUE_)
    pba->Omega0_nfsm += pba->Omega0_dcdm;
  for (n_ncdm=0;n_ncdm<pba->N_ncdm; n_ncdm++) {
    /* here we define non-free-streaming matter as: any non-relatistic species with a dimensionless ratio m/T bigger than a threshold ppr->M_nfsm_threshold; if this threshold is of the order of 10^4, this corresponds to the condition "becoming non-relativistic during radiation domination". Beware: this definition won't work in the case in which the user passes a customised p.s.d. for ncdm, such that M_ncdm is not defined.  */
    if (pba->M_ncdm[n_ncdm] > ppr->M_nfsm_threshold) {
      pba->Omega0_nfsm += pba->Omega0_ncdm[n_ncdm];
    }
  }

  free(pvecback);
  free(pvecback_integration);

  pba->scf_kg_eq = _TRUE_; // COpertchange
  free(used_in_output);

  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1068, %rsp           # imm = 0x1068
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, 0x50(%rsp)
movslq 0x43c(%rsi), %r13
movq %r13, %rdi
shlq $0x3, %rdi
callq 0x8490
pushq $0x1
popq %rbp
testq %rax, %rax
je 0x5c340
movq %rax, %r15
movq %rax, 0x58(%rsp)
movq %r14, 0x30(%rsp)
movslq 0x8(%r14), %r12
movl %r12d, 0x440(%rbx)
movq %r12, %r14
shlq $0x3, %r14
movq %r14, %rdi
callq 0x8490
movq %rax, 0x450(%rbx)
testq %rax, %rax
je 0x5c387
movq %r14, %rdi
callq 0x8490
movq %rax, 0x458(%rbx)
testq %rax, %rax
je 0x5c3ce
movq %r14, %rdi
callq 0x8490
movq %rax, 0x468(%rbx)
testq %rax, %rax
je 0x5c415
movq %r14, %rdi
callq 0x8490
movq %rax, 0x470(%rbx)
testq %rax, %rax
je 0x5c45c
imull %r13d, %r12d
movslq %r12d, %r14
shlq $0x3, %r14
movq %r14, %rdi
callq 0x8490
movq %rax, 0x460(%rbx)
testq %rax, %rax
je 0x5c4a3
movq %r14, %rdi
callq 0x8490
movq %rax, 0x478(%rbx)
testq %rax, %rax
je 0x5c4e6
movq 0x30(%rsp), %r12
movl 0xc(%r12), %eax
cmpl $0x1, %eax
movq %r15, 0x38(%rsp)
je 0x5c545
testl %eax, %eax
jne 0x5c569
leaq -0x50bd1(%rip), %rax    # 0xb750
movq %rax, 0x8(%rsp)
cmpw $0x1, 0xd1a(%rbx)
jle 0x5c575
leaq 0xa6da7(%rip), %rdi     # 0x1030e2
jmp 0x5c562
leal (,%r13,8), %ecx
leaq 0x88cb5(%rip), %rsi     # 0xe5004
leaq 0xafddc(%rip), %rdx     # 0x10c132
leaq 0x60(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0xd1c, %rbx            # imm = 0xD1C
leaq 0x88cc1(%rip), %rsi     # 0xe5034
leaq 0xa6cdc(%rip), %rdx     # 0x103056
movq %rbx, %rdi
movl $0x8ee, %ecx            # imm = 0x8EE
jmp 0x5c527
leal (,%r12,8), %ecx
leaq 0x88c6e(%rip), %rsi     # 0xe5004
leaq 0xa6cca(%rip), %rdx     # 0x103067
leaq 0x60(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0xd1c, %rbx            # imm = 0xD1C
leaq 0x88c7a(%rip), %rsi     # 0xe5034
leaq 0xa6c95(%rip), %rdx     # 0x103056
movq %rbx, %rdi
movl $0x8f8, %ecx            # imm = 0x8F8
jmp 0x5c527
leal (,%r12,8), %ecx
leaq 0x88c27(%rip), %rsi     # 0xe5004
leaq 0xa6c92(%rip), %rdx     # 0x103076
leaq 0x60(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0xd1c, %rbx            # imm = 0xD1C
leaq 0x88c33(%rip), %rsi     # 0xe5034
leaq 0xa6c4e(%rip), %rdx     # 0x103056
movq %rbx, %rdi
movl $0x8f9, %ecx            # imm = 0x8F9
jmp 0x5c527
leal (,%r12,8), %ecx
leaq 0x88be0(%rip), %rsi     # 0xe5004
leaq 0xa6c58(%rip), %rdx     # 0x103083
leaq 0x60(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0xd1c, %rbx            # imm = 0xD1C
leaq 0x88bec(%rip), %rsi     # 0xe5034
leaq 0xa6c07(%rip), %rdx     # 0x103056
movq %rbx, %rdi
movl $0x8fb, %ecx            # imm = 0x8FB
jmp 0x5c527
leal (,%r12,8), %ecx
leaq 0x88b99(%rip), %rsi     # 0xe5004
leaq 0xa6c26(%rip), %rdx     # 0x103098
leaq 0x60(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0xd1c, %rbx            # imm = 0xD1C
leaq 0x88ba5(%rip), %rsi     # 0xe5034
leaq 0xa6bc0(%rip), %rdx     # 0x103056
movq %rbx, %rdi
movl $0x8fc, %ecx            # imm = 0x8FC
jmp 0x5c527
shll $0x3, %r12d
leaq 0x88b56(%rip), %rsi     # 0xe5004
leaq 0xa6bf8(%rip), %rdx     # 0x1030ad
leaq 0x60(%rsp), %r14
movq %r14, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2e014
addq $0xd1c, %rbx            # imm = 0xD1C
leaq 0x88b5f(%rip), %rsi     # 0xe5034
leaq 0xa6b7a(%rip), %rdx     # 0x103056
movq %rbx, %rdi
movl $0x8fe, %ecx            # imm = 0x8FE
jmp 0x5c527
shll $0x3, %r12d
leaq 0x88b13(%rip), %rsi     # 0xe5004
leaq 0xa6bcb(%rip), %rdx     # 0x1030c3
leaq 0x60(%rsp), %r14
movq %r14, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2e014
addq $0xd1c, %rbx            # imm = 0xD1C
leaq 0x88b1c(%rip), %rsi     # 0xe5034
leaq 0xa6b37(%rip), %rdx     # 0x103056
movq %rbx, %rdi
movl $0x8ff, %ecx            # imm = 0x8FF
movq %r14, %r8
xorl %eax, %eax
callq 0x2e014
movl %ebp, %eax
addq $0x1068, %rsp           # imm = 0x1068
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x50770(%rip), %rax    # 0xbddc
movq %rax, 0x8(%rsp)
cmpw $0x2, 0xd1a(%rbx)
jl 0x5c575
leaq 0xa6b9c(%rip), %rdi     # 0x1030fe
callq 0x8540
jmp 0x5c575
leaq -0x50794(%rip), %rax    # 0xbddc
movq %rax, 0x8(%rsp)
movsd 0x128(%rbx), %xmm0
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm2
cmpeqsd %xmm1, %xmm2
andnpd %xmm0, %xmm2
movapd %xmm2, 0x10(%rsp)
leaq 0xd1c(%rbx), %r15
movb $0x1, %al
testb $0x1, %al
je 0x5c851
movslq 0x4b0(%rbx), %r14
leaq (,%r14,8), %rdi
callq 0x8490
testq %rax, %rax
je 0x5ccdd
movq %r12, %rdi
movq %rbx, %rsi
movq 0x38(%rsp), %rdx
movq %rax, 0x28(%rsp)
movq %rax, %rcx
leaq 0x48(%rsp), %r8
callq 0x5fae6
testl %eax, %eax
jne 0x5cd1c
movslq 0x440(%rbx), %r12
leaq (,%r12,8), %rdi
callq 0x8490
movq %rax, 0x448(%rbx)
testq %rax, %rax
je 0x5cd57
movq %rax, %r14
leaq (,%r12,4), %rdi
callq 0x8490
testq %rax, %rax
je 0x5cd96
movq %rax, %r13
movsd 0x48(%rsp), %xmm0
xorpd %xmm1, %xmm1
subsd %xmm0, %xmm1
leal -0x1(%r12), %eax
cvtsi2sd %eax, %xmm2
testl %r12d, %r12d
movl $0x0, %eax
cmovgl %r12d, %eax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x5c675
cvtsi2sd %ecx, %xmm3
mulsd %xmm1, %xmm3
divsd %xmm2, %xmm3
addsd %xmm0, %xmm3
movsd %xmm3, (%r14,%rcx,8)
movl $0x1, (%r13,%rcx,4)
incq %rcx
jmp 0x5c64c
movl 0x4b0(%rbx), %ecx
movq 0x30(%rsp), %rax
movsd 0xa28(%rax), %xmm3
movsd 0x10(%rax), %xmm2
movsd 0x18(%rax), %xmm4
subq $0x8, %rsp
xorpd %xmm1, %xmm1
leaq 0x3f31(%rip), %rdi      # 0x605d2
movq 0x30(%rsp), %rsi
movq %r13, %rdx
leaq 0x58(%rsp), %r8
leaq 0x4431(%rip), %r9       # 0x60ae6
pushq %r15
pushq $0x0
pushq 0xe68d1(%rip)           # 0x142f90
pushq %r12
pushq %r14
callq *0x38(%rsp)
addq $0x30, %rsp
cmpl $0x1, %eax
je 0x5cdd5
xorl %eax, %eax
cmpw $0x1, 0x23a(%rbx)
movq 0x30(%rsp), %r12
jne 0x5c59d
movl 0x160(%rbx), %ecx
cmpl $0x4, %ecx
je 0x5c6ff
xorl %eax, %eax
cmpl $0x2, %ecx
jne 0x5c59d
movsd 0x128(%rbx), %xmm0
xorl %eax, %eax
ucomisd 0x88b47(%rip), %xmm0    # 0xe5258
ja 0x5c59d
cmpw $0x0, 0x4bc(%rbx)
je 0x5cef8
movslq 0x48c(%rbx), %rax
movq 0x28(%rsp), %rcx
movsd (%rcx,%rax,8), %xmm1
movsd (%rbx), %xmm0
divsd %xmm0, %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x1e0(%rbx)
cmpw $0x1, 0x4c0(%rbx)
jne 0x5c7b4
movsd 0x30(%rbx), %xmm0
subsd %xmm1, %xmm0
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x30(%rbx)
cmpw $0x0, 0xd1a(%rbx)
jle 0x5c7ea
leaq 0xa6c1a(%rip), %rdi     # 0x103393
movb $0x1, %al
callq 0x8030
cmpw $0xa, 0xd1a(%rbx)
jl 0x5c7ea
movsd 0x1e0(%rbx), %xmm0
movapd %xmm0, %xmm2
movapd 0x10(%rsp), %xmm1
subsd %xmm1, %xmm2
divsd %xmm0, %xmm2
leaq 0xa6c3f(%rip), %rdi     # 0x1033ea
movb $0x3, %al
callq 0x8030
jmp 0x5c7ea
cmpw $0x1, 0x4c2(%rbx)
jne 0x5c7ea
movsd 0x38(%rbx), %xmm0
subsd %xmm1, %xmm0
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x38(%rbx)
cmpw $0x0, 0xd1a(%rbx)
jle 0x5c7ea
leaq 0xa6c2e(%rip), %rdi     # 0x103411
movb $0x1, %al
callq 0x8030
movsd 0x1e0(%rbx), %xmm2
movsd 0x240(%rbx), %xmm0
movapd %xmm2, %xmm1
subsd 0x10(%rsp), %xmm1
andpd 0x88a34(%rip), %xmm1    # 0xe5240
divsd %xmm2, %xmm1
xorl %eax, %eax
ucomisd %xmm1, %xmm0
ja 0x5c59d
movq 0x28(%rsp), %rdi
movsd %xmm2, 0x10(%rsp)
callq 0x8430
movq 0x448(%rbx), %rdi
callq 0x8430
movq %r13, %rdi
callq 0x8430
movsd 0x10(%rsp), %xmm0
movapd %xmm0, 0x10(%rsp)
jmp 0x5c59b
movslq 0x498(%rbx), %rax
movq 0x28(%rsp), %rcx
movsd (%rcx,%rax,8), %xmm0
divsd 0xa510e(%rip), %xmm0    # 0x101978
movsd %xmm0, 0x308(%rbx)
movslq 0x4a0(%rbx), %rax
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x310(%rbx)
cmpw $0x1, 0x4b8(%rbx)
jne 0x5c8b0
movslq 0x480(%rbx), %rax
movsd (%rcx,%rax,8), %xmm0
movsd (%rbx), %xmm1
divsd %xmm1, %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x330(%rbx)
cmpw $0x1, 0x4ba(%rbx)
jne 0x5c8da
movslq 0x484(%rbx), %rax
movsd (%rcx,%rax,8), %xmm0
movsd (%rbx), %xmm1
divsd %xmm1, %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x338(%rbx)
movslq 0x4a4(%rbx), %rax
movsd (%rcx,%rax,8), %xmm0
cmpw $0x1, 0x4bc(%rbx)
jne 0x5c8f8
andq $0x0, 0x200(%rbx)
movsd 0x88960(%rip), %xmm1    # 0xe5260
divsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
xorl %r14d, %r14d
leaq 0xa6b78(%rip), %rbp     # 0x10348c
xorpd %xmm3, %xmm3
movslq 0x440(%rbx), %rsi
cmpq %rsi, %r14
jge 0x5cc6f
movq 0x460(%rbx), %rax
movslq 0x43c(%rbx), %rcx
movslq %r14d, %rdx
imulq %rcx, %rdx
movslq 0x424(%rbx), %rcx
addq %rdx, %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movsd 0x310(%rbx), %xmm2
movq 0x450(%rbx), %rcx
subsd (%rcx,%r14,8), %xmm2
movslq 0x410(%rbx), %rcx
movslq %edx, %rdx
addq %rcx, %rdx
movsd %xmm2, (%rax,%rdx,8)
movl 0x320(%rbx), %eax
cmpl $-0x1, %eax
je 0x5c9ba
testl %eax, %eax
je 0x5c9b1
cmpl $0x1, %eax
jne 0x5ca6d
movsd 0x318(%rbx), %xmm0
ucomisd 0x888b2(%rip), %xmm0    # 0xe5258
jb 0x5ca24
sqrtsd %xmm0, %xmm0
jmp 0x5ca35
movapd %xmm2, %xmm3
jmp 0x5ca6d
movsd 0x318(%rbx), %xmm0
movsd 0x8bafe(%rip), %xmm1    # 0xe84c8
ucomisd %xmm0, %xmm1
xorpd 0x8885a(%rip), %xmm0    # 0xe5230
jb 0x5c9de
sqrtsd %xmm0, %xmm0
jmp 0x5c9ef
movsd %xmm2, 0x8(%rsp)
callq 0x82d0
movsd 0x8(%rsp), %xmm2
mulsd %xmm0, %xmm2
movapd %xmm2, %xmm0
callq 0x8390
movapd %xmm0, %xmm3
movsd 0x318(%rbx), %xmm0
movsd 0x8bab8(%rip), %xmm1    # 0xe84c8
ucomisd %xmm0, %xmm1
xorpd 0x88814(%rip), %xmm0    # 0xe5230
jb 0x5ca58
sqrtsd %xmm0, %xmm0
jmp 0x5ca69
movsd %xmm2, 0x8(%rsp)
callq 0x82d0
movsd 0x8(%rsp), %xmm2
mulsd %xmm0, %xmm2
movapd %xmm2, %xmm0
callq 0x80a0
movapd %xmm0, %xmm3
movsd 0x318(%rbx), %xmm0
ucomisd 0x88802(%rip), %xmm0    # 0xe5258
jae 0x5ca1e
movsd %xmm3, 0x8(%rsp)
callq 0x82d0
movsd 0x8(%rsp), %xmm3
divsd %xmm0, %xmm3
movl 0x160(%rbx), %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0x5cb13
movq 0x460(%rbx), %rax
movslq 0x43c(%rbx), %rcx
movslq %r14d, %rdx
imulq %rcx, %rdx
movslq 0x3d4(%rbx), %rcx
addq %rdx, %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd 0x200(%rbx), %xmm0
jbe 0x5cb13
movq 0x458(%rbx), %rax
movsd %xmm0, 0x40(%rsp)
movsd (%rax,%r14,8), %xmm0
movsd %xmm3, 0x8(%rsp)
callq 0x81f0
movsd 0x8(%rsp), %xmm3
movsd %xmm0, 0x1f0(%rbx)
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x200(%rbx)
movq 0x460(%rbx), %rax
movslq 0x43c(%rbx), %rcx
movslq %r14d, %rdx
imulq %rcx, %rdx
movslq 0x3bc(%rbx), %rcx
addq %rdx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x208(%rbx)
cmpw $0x0, 0x4c2(%rbx)
je 0x5cc02
cmpl $0x1, 0x40(%rbx)
jne 0x5cc02
movl 0x44(%rbx), %eax
decl %eax
cmpl $0x1, %eax
ja 0x5cc02
movq 0x460(%rbx), %rax
movslq 0x43c(%rbx), %rcx
movslq %r14d, %rdx
imulq %rcx, %rdx
movslq 0x3a8(%rbx), %rcx
addq %rdx, %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd 0xc0(%rbx), %xmm0
movzwl 0xd1a(%rbx), %eax
jbe 0x5cbc6
movq 0x458(%rbx), %rcx
movsd (%rcx,%r14,8), %xmm1
movsd 0x886dd(%rip), %xmm2    # 0xe5260
addsd %xmm2, %xmm1
divsd %xmm1, %xmm2
movsd %xmm2, 0xb8(%rbx)
movsd %xmm0, 0xc0(%rbx)
cmpw $0x9, %ax
jl 0x5cbc6
leaq 0xa68bc(%rip), %rdi     # 0x103464
movapd %xmm0, %xmm1
movb $0x2, %al
movsd %xmm3, 0x8(%rsp)
callq 0x8030
movsd 0x8(%rsp), %xmm3
movzwl 0xd1a(%rbx), %eax
cmpw $0x3, %ax
jl 0x5cc02
movsd 0x8868c(%rip), %xmm0    # 0xe5260
divsd 0xb8(%rbx), %xmm0
addsd 0x88c04(%rip), %xmm0    # 0xe57e8
movsd 0xc0(%rbx), %xmm1
movq %rbp, %rdi
movb $0x2, %al
movsd %xmm3, 0x8(%rsp)
callq 0x8030
movsd 0x8(%rsp), %xmm3
movq 0x458(%rbx), %rax
movq 0x460(%rbx), %rcx
movsd (%rax,%r14,8), %xmm0
movsd 0x88642(%rip), %xmm2    # 0xe5260
addsd %xmm2, %xmm0
movapd %xmm3, %xmm1
divsd %xmm0, %xmm1
movslq 0x43c(%rbx), %rdx
movslq %r14d, %rsi
imulq %rdx, %rsi
movslq 0x414(%rbx), %rdx
addq %rsi, %rdx
movsd %xmm1, (%rcx,%rdx,8)
movsd (%rax,%r14,8), %xmm0
addsd %xmm2, %xmm0
mulsd %xmm3, %xmm0
movslq 0x418(%rbx), %rax
movslq %esi, %rdx
addq %rax, %rdx
movsd %xmm0, (%rcx,%rdx,8)
incq %r14
jmp 0x5c918
movq 0x450(%rbx), %rdx
movq 0x458(%rbx), %rdi
movq 0x468(%rbx), %r8
subq $0x8, %rsp
pushq $0x1
popq %rbp
movl %ebp, %ecx
movl %ebp, %r9d
pushq %r15
callq 0x125a5
popq %rcx
popq %rdx
cmpl $0x1, %eax
jne 0x5ce10
leaq 0x88747(%rip), %rsi     # 0xe53f0
leaq 0xa6824(%rip), %rdx     # 0x1034d4
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x8836b(%rip), %rsi     # 0xe5034
leaq 0xa6386(%rip), %rdx     # 0x103056
movq %r15, %rdi
movl $0x9cd, %ecx            # imm = 0x9CD
jmp 0x5cef0
shll $0x3, %r14d
leaq 0x8831c(%rip), %rsi     # 0xe5004
leaq 0xa642e(%rip), %rdx     # 0x10311d
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movl %r14d, %ecx
xorl %eax, %eax
callq 0x2e014
leaq 0x8832c(%rip), %rsi     # 0xe5034
leaq 0xa6347(%rip), %rdx     # 0x103056
movq %r15, %rdi
movl $0x91c, %ecx            # imm = 0x91C
jmp 0x5cef0
leaq 0x886cd(%rip), %rsi     # 0xe53f0
leaq 0xa6408(%rip), %rdx     # 0x103132
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x882f1(%rip), %rsi     # 0xe5034
leaq 0xa630c(%rip), %rdx     # 0x103056
movq %r15, %rdi
movl $0x921, %ecx            # imm = 0x921
jmp 0x5cef0
shll $0x3, %r12d
leaq 0x882a2(%rip), %rsi     # 0xe5004
leaq 0xa641a(%rip), %rdx     # 0x103183
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2e014
leaq 0x882b2(%rip), %rsi     # 0xe5034
leaq 0xa62cd(%rip), %rdx     # 0x103056
movq %r15, %rdi
movl $0x923, %ecx            # imm = 0x923
jmp 0x5cef0
shll $0x2, %r12d
leaq 0x88263(%rip), %rsi     # 0xe5004
leaq 0xa9b5b(%rip), %rdx     # 0x106903
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2e014
leaq 0x88273(%rip), %rsi     # 0xe5034
leaq 0xa628e(%rip), %rdx     # 0x103056
movq %r15, %rdi
movl $0x924, %ecx            # imm = 0x924
jmp 0x5cef0
leaq 0x88614(%rip), %rsi     # 0xe53f0
leaq 0xa63b0(%rip), %rdx     # 0x103193
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x88238(%rip), %rsi     # 0xe5034
leaq 0xa6253(%rip), %rdx     # 0x103056
movq %r15, %rdi
movl $0x93f, %ecx            # imm = 0x93F
jmp 0x5cef0
movq 0x450(%rbx), %rdi
movl 0x440(%rbx), %esi
movq 0x458(%rbx), %rdx
movq 0x470(%rbx), %r8
subq $0x8, %rsp
pushq $0x1
popq %rbp
movl %ebp, %ecx
movl %ebp, %r9d
pushq %r15
callq 0x125a5
popq %rcx
popq %rdx
cmpl $0x1, %eax
jne 0x5ce7d
leaq 0x885a4(%rip), %rsi     # 0xe53f0
leaq 0xa66f6(%rip), %rdx     # 0x103549
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x881c8(%rip), %rsi     # 0xe5034
leaq 0xa61e3(%rip), %rdx     # 0x103056
movq %r15, %rdi
movl $0x9d7, %ecx            # imm = 0x9D7
jmp 0x5cef0
movq 0x448(%rbx), %rdi
movl 0x43c(%rbx), %ecx
movl 0x440(%rbx), %esi
movq 0x460(%rbx), %rdx
movq 0x478(%rbx), %r8
subq $0x8, %rsp
pushq $0x1
popq %rbp
movl %ebp, %r9d
pushq %r15
callq 0x125a5
popq %rcx
popq %rdx
cmpl $0x1, %eax
jne 0x5cf4c
leaq 0x8852f(%rip), %rsi     # 0xe53f0
leaq 0xa66f6(%rip), %rdx     # 0x1035be
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x88153(%rip), %rsi     # 0xe5034
leaq 0xa616e(%rip), %rdx     # 0x103056
movq %r15, %rdi
movl $0x9e1, %ecx            # imm = 0x9E1
movq %rbx, %r8
jmp 0x5c52a
leaq 0xa63d9(%rip), %rsi     # 0x1032d8
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x8816d(%rip), %rsi     # 0xe5082
leaq 0xa645f(%rip), %rdx     # 0x10337b
leaq 0x860(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x880fc(%rip), %rsi     # 0xe5034
leaq 0xa6117(%rip), %rdx     # 0x103056
movq %r15, %rdi
movl $0x94a, %ecx            # imm = 0x94A
jmp 0x5c527
movq 0x460(%rbx), %rax
movslq 0x404(%rbx), %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x408(%rbx), %rcx
movslq 0x38c(%rbx), %rdx
mulsd (%rax,%rcx,8), %xmm0
movsd (%rax,%rdx,8), %xmm1
subsd %xmm1, %xmm0
mulsd 0xa49fd(%rip), %xmm1    # 0x101980
divsd %xmm1, %xmm0
movsd %xmm0, 0x328(%rbx)
cmpw $0x0, 0xd1a(%rbx)
movq 0x38(%rsp), %r14
jle 0x5d4d3
movsd 0x308(%rbx), %xmm0
leaq 0xa66a1(%rip), %rdi     # 0x103652
movb $0x1, %al
callq 0x8030
movsd 0x310(%rbx), %xmm0
leaq 0xa669d(%rip), %rdi     # 0x103664
movb $0x1, %al
callq 0x8030
movsd (%rbx), %xmm0
divsd 0x8cb36(%rip), %xmm0    # 0xe9b10
leaq 0xa669f(%rip), %rdi     # 0x103680
movb $0x1, %al
callq 0x8030
movsd 0x328(%rbx), %xmm0
leaq 0xa669f(%rip), %rdi     # 0x103696
movb $0x1, %al
callq 0x8030
cmpw $0x3, 0xd1a(%rbx)
jl 0x5d4d3
cmpw $0x1, 0x4b8(%rbx)
jne 0x5d09d
cmpw $0x1, 0x4ba(%rbx)
jne 0x5d09d
leaq 0xa7311(%rip), %rdi     # 0x10433c
callq 0x8540
movsd 0x330(%rbx), %xmm0
leaq 0xa66ab(%rip), %rdi     # 0x1036ea
movb $0x1, %al
callq 0x8030
movsd 0x338(%rbx), %xmm0
leaq 0xa66af(%rip), %rdi     # 0x103704
movb $0x1, %al
callq 0x8030
movsd 0x338(%rbx), %xmm0
addsd 0x330(%rbx), %xmm0
movsd 0x108(%rbx), %xmm1
leaq 0xa66a1(%rip), %rdi     # 0x10371c
movb $0x2, %al
callq 0x8030
movsd 0x120(%rbx), %xmm0
divsd 0x20(%rbx), %xmm0
leaq 0xa66bc(%rip), %rdi     # 0x103752
movb $0x1, %al
callq 0x8030
cmpw $0x1, 0x4bc(%rbx)
jne 0x5d4d3
leaq 0xa72bf(%rip), %rdi     # 0x104371
callq 0x8540
movq 0x460(%rbx), %rax
movslq 0x440(%rbx), %rcx
decq %rcx
movslq 0x43c(%rbx), %rdx
imulq %rcx, %rdx
movslq 0x3d0(%rbx), %rcx
addq %rdx, %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x408(%rbx), %rcx
movslq %edx, %rdx
addq %rcx, %rdx
divsd (%rax,%rdx,8), %xmm0
movsd 0x128(%rbx), %xmm1
leaq 0xa6674(%rip), %rdi     # 0x103777
movb $0x2, %al
callq 0x8030
movl 0x160(%rbx), %eax
cmpl $0x4, %eax
jne 0x5d1bb
leaq 0xa726b(%rip), %rdi     # 0x10438b
callq 0x8540
movq 0x168(%rbx), %rax
movsd (%rax), %xmm0
leaq 0xa6663(%rip), %rdi     # 0x10379a
movb $0x1, %al
callq 0x8030
movsd (%rbx), %xmm0
divsd 0x8c8d6(%rip), %xmm0    # 0xe9a20
leaq 0xa6656(%rip), %rdi     # 0x1037a7
movb $0x1, %al
callq 0x8030
cmpw $0x1, 0x4b4(%rbx)
jne 0x5d1b5
movq 0x460(%rbx), %rax
movslq 0x440(%rbx), %rcx
decq %rcx
movslq 0x43c(%rbx), %rdx
imulq %rcx, %rdx
movslq 0x3d0(%rbx), %rcx
addq %rdx, %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x394(%rbx), %rcx
movslq %edx, %rdx
addq %rcx, %rdx
movsd (%rax,%rdx,8), %xmm1
addsd %xmm0, %xmm1
divsd %xmm1, %xmm0
leaq 0xa6606(%rip), %rdi     # 0x1037b4
movb $0x1, %al
callq 0x8030
movl 0x160(%rbx), %eax
cmpl $0x2, %eax
jne 0x5d2f2
leaq 0xa71c0(%rip), %rdi     # 0x10438b
callq 0x8540
movsd 0x210(%rbx), %xmm0
movsd 0x188(%rbx), %xmm1
movsd 0x190(%rbx), %xmm2
mulsd (%rbx), %xmm1
divsd 0xa4794(%rip), %xmm1    # 0x101988
leaq 0xa65e2(%rip), %rdi     # 0x1037dd
movb $0x3, %al
callq 0x8030
movsd 0x150(%rbx), %xmm1
movsd 0x178(%rbx), %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jne 0x5d232
jp 0x5d232
movapd %xmm1, %xmm0
divsd 0x190(%rbx), %xmm0
movsd %xmm0, 0x178(%rbx)
leaq 0xa65c6(%rip), %rdi     # 0x1037ff
movb $0x2, %al
callq 0x8030
movsd 0x1f0(%rbx), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x200(%rbx), %xmm0
movsd %xmm0, 0x10(%rsp)
callq 0x81f0
movapd %xmm0, %xmm2
leaq 0xa65bb(%rip), %rdi     # 0x103827
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movb $0x3, %al
callq 0x8030
movsd 0x1b8(%rbx), %xmm1
ucomisd 0x8c7a1(%rip), %xmm1    # 0xe9a30
jbe 0x5d2d1
movsd 0x88557(%rip), %xmm0    # 0xe57f0
callq 0x8650
movsd 0x87fba(%rip), %xmm1    # 0xe5260
divsd %xmm0, %xmm1
addsd 0x88536(%rip), %xmm1    # 0xe57e8
movapd %xmm1, %xmm0
callq 0x81f0
movsd 0x1b8(%rbx), %xmm1
leaq 0xa659a(%rip), %rdi     # 0x103864
movb $0x2, %al
callq 0x8030
movsd 0x208(%rbx), %xmm0
leaq 0xa65bb(%rip), %rdi     # 0x10389b
movb $0x1, %al
callq 0x8030
movl 0x160(%rbx), %eax
movq 0x30(%rsp), %r12
cmpl $0x3, %eax
jne 0x5d401
movsd 0x1b8(%rbx), %xmm1
movsd 0x884e5(%rip), %xmm0    # 0xe57f0
callq 0x8650
movsd 0x87f48(%rip), %xmm1    # 0xe5260
divsd %xmm0, %xmm1
addsd 0x884c4(%rip), %xmm1    # 0xe57e8
movapd %xmm1, %xmm0
callq 0x81f0
movsd %xmm0, 0x8(%rsp)
movsd 0x1d0(%rbx), %xmm1
movsd 0x884ad(%rip), %xmm0    # 0xe57f0
callq 0x8650
movaps %xmm0, %xmm1
leaq 0xa6561(%rip), %rdi     # 0x1038b3
movsd 0x8(%rsp), %xmm0
movb $0x2, %al
callq 0x8030
movsd 0x1f0(%rbx), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x200(%rbx), %xmm0
movsd %xmm0, 0x10(%rsp)
callq 0x81f0
movaps %xmm0, %xmm2
leaq 0xa649d(%rip), %rdi     # 0x103827
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movb $0x3, %al
callq 0x8030
movsd 0x150(%rbx), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x1c0(%rbx), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x210(%rbx), %xmm0
callq 0x8330
mulsd 0x1c0(%rbx), %xmm0
movsd 0x888da(%rip), %xmm1    # 0xe5cb0
callq 0x8650
movapd %xmm0, %xmm2
movsd (%rbx), %xmm3
divsd %xmm3, %xmm2
leaq 0xa64f7(%rip), %rdi     # 0x1038e5
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movb $0x4, %al
callq 0x8030
cmpw $0x1, 0x4c0(%rbx)
jne 0x5d45b
movq 0x460(%rbx), %rax
movslq 0x440(%rbx), %rcx
decq %rcx
movslq 0x43c(%rbx), %rdx
imulq %rcx, %rdx
movslq 0x39c(%rbx), %rcx
addq %rdx, %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x408(%rbx), %rcx
movslq %edx, %rdx
addq %rcx, %rdx
divsd (%rax,%rdx,8), %xmm0
movsd 0x30(%rbx), %xmm1
leaq 0xa64c8(%rip), %rdi     # 0x10391c
movb $0x2, %al
callq 0x8030
cmpl $0x1, 0x160(%rbx)
ja 0x5d4d3
movq %r14, %r15
leaq 0xa6f3e(%rip), %rdi     # 0x1043ac
callq 0x8540
leaq 0xa64c8(%rip), %rdi     # 0x103942
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x8030
leaq 0xa64cd(%rip), %r14     # 0x103958
movslq 0x170(%rbx), %rax
leaq -0x1(%rax), %rdx
movq 0x168(%rbx), %rcx
cmpq %rdx, %r12
jge 0x5d4b7
movsd (%rcx,%r12,8), %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x8030
incq %r12
jmp 0x5d48b
movsd -0x8(%rcx,%rax,8), %xmm0
leaq 0xa649b(%rip), %rdi     # 0x10395f
movb $0x1, %al
callq 0x8030
movq 0x30(%rsp), %r12
movq %r15, %r14
movq 0x460(%rbx), %rax
movslq 0x440(%rbx), %rcx
decq %rcx
movslq 0x43c(%rbx), %rdx
imulq %rcx, %rdx
movslq 0x40c(%rbx), %rcx
addq %rdx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x340(%rbx)
movslq 0x404(%rbx), %rcx
movslq %edx, %rdx
addq %rcx, %rdx
movsd (%rax,%rdx,8), %xmm1
movsd %xmm1, 0x348(%rbx)
addsd %xmm1, %xmm0
addsd 0x2d0(%rbx), %xmm0
movsd 0x87d2c(%rip), %xmm1    # 0xe5260
subsd %xmm0, %xmm1
movsd %xmm1, 0x350(%rbx)
movsd 0x20(%rbx), %xmm0
movsd %xmm0, 0x358(%rbx)
cmpw $0x1, 0x4b4(%rbx)
jne 0x5d564
addsd 0x28(%rbx), %xmm0
movsd %xmm0, 0x358(%rbx)
cmpw $0x1, 0x4b6(%rbx)
jne 0x5d57e
addsd 0xf0(%rbx), %xmm0
movsd %xmm0, 0x358(%rbx)
cmpw $0x1, 0x4b8(%rbx)
jne 0x5d598
addsd 0x330(%rbx), %xmm0
movsd %xmm0, 0x358(%rbx)
movl 0x248(%rbx), %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
cmpq %rcx, %rax
je 0x5d5db
movq 0x270(%rbx), %rdx
movsd (%rdx,%rcx,8), %xmm1
ucomisd 0x88(%r12), %xmm1
jbe 0x5d5d6
movq 0x280(%rbx), %rdx
addsd (%rdx,%rcx,8), %xmm0
movsd %xmm0, 0x358(%rbx)
incq %rcx
jmp 0x5d5a5
movq %r14, %rdi
callq 0x8430
movq 0x28(%rsp), %rdi
callq 0x8430
movw $0x1, 0x230(%rbx)
movq %r13, %rdi
callq 0x8430
xorl %ebp, %ebp
jmp 0x5c531