// File: /workspace/github_c_makefile_star2_O1/lesgourg[P]class_public/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.;
  /* 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;

  /** - 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);

  /** - 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->loga_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);

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

  /** - define values of loga at which results will be stored */
  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;
  }

  /** - 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;
  }

  /** - 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);

  /** - 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];

  /** - 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); }

    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(" -> 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->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);
      }
      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);
  free(used_in_output);

  return _SUCCESS_;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x848, %rsp            # imm = 0x848
movq %rsi, %rbx
movq %rdi, %r13
movq %rsi, 0x30(%rsp)
movslq 0x2b0(%rsi), %r15
leaq (,%r15,8), %rdi
callq 0x8460
testq %rax, %rax
je 0x5968b
movq %rax, %r14
movq %rax, 0x38(%rsp)
movslq 0x31c(%rbx), %r12
leaq (,%r12,8), %rdi
callq 0x8460
testq %rax, %rax
je 0x596ce
movq %rax, %r15
leaq 0x20(%rsp), %r8
movq %r13, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %rax, %rcx
callq 0x5c7e3
testl %eax, %eax
je 0x59732
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x87d99(%rip), %rsi     # 0xe13f0
leaq 0xa22de(%rip), %rdx     # 0xfb93c
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x879bd(%rip), %rsi     # 0xe1034
leaq 0xa2298(%rip), %rdx     # 0xfb916
movq %rbx, %rdi
movl $0x77f, %ecx            # imm = 0x77F
jmp 0x5970f
shll $0x3, %r15d
leaq 0x8796e(%rip), %rsi     # 0xe1004
leaq 0xaae2f(%rip), %rdx     # 0x1044cc
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x87977(%rip), %rsi     # 0xe1034
leaq 0xa2252(%rip), %rdx     # 0xfb916
movq %rbx, %rdi
movl $0x776, %ecx            # imm = 0x776
jmp 0x5970f
shll $0x3, %r12d
leaq 0x8792b(%rip), %rsi     # 0xe1004
leaq 0xa2247(%rip), %rdx     # 0xfb927
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x87934(%rip), %rsi     # 0xe1034
leaq 0xa220f(%rip), %rdx     # 0xfb916
movq %rbx, %rdi
movl $0x77a, %ecx            # imm = 0x77A
movq %r14, %r8
xorl %eax, %eax
callq 0x30c2c
movl $0x1, %ebp
movl %ebp, %eax
addq $0x848, %rsp            # imm = 0x848
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq 0x8(%r13), %rbp
movl %ebp, 0x2b4(%rbx)
leaq (,%rbp,8), %r12
movq %r12, %rdi
callq 0x8460
movq %rax, 0x2c0(%rbx)
testq %rax, %rax
je 0x598a0
movq %r12, %rdi
callq 0x8460
movq %rax, 0x2c8(%rbx)
testq %rax, %rax
je 0x598e4
movq %r13, 0x18(%rsp)
movq %r12, %rdi
callq 0x8460
movq %rax, 0x2b8(%rbx)
testq %rax, %rax
je 0x59928
movq %rax, %r13
movq %r12, %rdi
callq 0x8460
movq %rax, 0x2d8(%rbx)
testq %rax, %rax
je 0x5996c
movq %r12, %rdi
callq 0x8460
movq %rax, 0x2e0(%rbx)
testq %rax, %rax
je 0x599b0
movslq 0x2b0(%rbx), %r12
imulq %rbp, %r12
movq %r12, 0x10(%rsp)
shlq $0x3, %r12
movq %r12, %rdi
callq 0x8460
movq %rax, 0x2d0(%rbx)
testq %rax, %rax
je 0x599f4
movq %r12, %rdi
callq 0x8460
movq %rax, 0x2e8(%rbx)
testq %rax, %rax
je 0x59a3f
leaq (,%rbp,4), %rdi
callq 0x8460
testq %rax, %rax
je 0x59a8a
testl %ebp, %ebp
jle 0x59862
movsd 0x20(%rsp), %xmm0
xorpd %xmm1, %xmm1
subsd %xmm0, %xmm1
leal -0x1(%rbp), %ecx
cvtsi2sd %ecx, %xmm2
xorl %ecx, %ecx
xorps %xmm3, %xmm3
cvtsi2sd %ecx, %xmm3
mulsd %xmm1, %xmm3
divsd %xmm2, %xmm3
addsd %xmm0, %xmm3
movsd %xmm3, (%r13,%rcx,8)
movl $0x1, (%rax,%rcx,4)
incq %rcx
cmpq %rcx, %rbp
jne 0x59839
movq 0x18(%rsp), %r13
movl 0xc(%r13), %ecx
cmpl $0x1, %ecx
je 0x59ace
testl %ecx, %ecx
jne 0x59af3
leaq -0x4c937(%rip), %r12    # 0xcf4c
cmpw $0x1, 0xb82(%rbx)
jle 0x59afa
movq %rax, %rbp
leaq 0xa217d(%rip), %rdi     # 0xfba18
jmp 0x59ae9
shll $0x3, %ebp
leaq 0x8775a(%rip), %rsi     # 0xe1004
leaq 0xa20dc(%rip), %rdx     # 0xfb98d
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x87764(%rip), %rsi     # 0xe1034
leaq 0xa203f(%rip), %rdx     # 0xfb916
movq %rbx, %rdi
movl $0x786, %ecx            # imm = 0x786
jmp 0x5970f
shll $0x3, %ebp
leaq 0x87716(%rip), %rsi     # 0xe1004
leaq 0xa20a7(%rip), %rdx     # 0xfb99c
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x87720(%rip), %rsi     # 0xe1034
leaq 0xa1ffb(%rip), %rdx     # 0xfb916
movq %rbx, %rdi
movl $0x787, %ecx            # imm = 0x787
jmp 0x5970f
shll $0x3, %ebp
leaq 0x876d2(%rip), %rsi     # 0xe1004
leaq 0xa2070(%rip), %rdx     # 0xfb9a9
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x876dc(%rip), %rsi     # 0xe1034
leaq 0xa1fb7(%rip), %rdx     # 0xfb916
movq %rbx, %rdi
movl $0x788, %ecx            # imm = 0x788
jmp 0x5970f
shll $0x3, %ebp
leaq 0x8768e(%rip), %rsi     # 0xe1004
leaq 0xa203c(%rip), %rdx     # 0xfb9b9
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x87698(%rip), %rsi     # 0xe1034
leaq 0xa1f73(%rip), %rdx     # 0xfb916
movq %rbx, %rdi
movl $0x78a, %ecx            # imm = 0x78A
jmp 0x5970f
shll $0x3, %ebp
leaq 0x8764a(%rip), %rsi     # 0xe1004
leaq 0xa200d(%rip), %rdx     # 0xfb9ce
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x87654(%rip), %rsi     # 0xe1034
leaq 0xa1f2f(%rip), %rdx     # 0xfb916
movq %rbx, %rdi
movl $0x78b, %ecx            # imm = 0x78B
jmp 0x5970f
movq 0x10(%rsp), %rax
leal (,%rax,8), %ecx
leaq 0x875fd(%rip), %rsi     # 0xe1004
leaq 0xa1fd5(%rip), %rdx     # 0xfb9e3
leaq 0x40(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x87609(%rip), %rsi     # 0xe1034
leaq 0xa1ee4(%rip), %rdx     # 0xfb916
movq %rbx, %rdi
movl $0x78d, %ecx            # imm = 0x78D
jmp 0x5970f
movq 0x10(%rsp), %rax
leal (,%rax,8), %ecx
leaq 0x875b2(%rip), %rsi     # 0xe1004
leaq 0xa1fa0(%rip), %rdx     # 0xfb9f9
leaq 0x40(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x875be(%rip), %rsi     # 0xe1034
leaq 0xa1e99(%rip), %rdx     # 0xfb916
movq %rbx, %rdi
movl $0x78e, %ecx            # imm = 0x78E
jmp 0x5970f
shll $0x2, %ebp
leaq 0x87570(%rip), %rsi     # 0xe1004
leaq 0xa52c8(%rip), %rdx     # 0xfed63
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x8757a(%rip), %rsi     # 0xe1034
leaq 0xa1e55(%rip), %rdx     # 0xfb916
movq %rbx, %rdi
movl $0x790, %ecx            # imm = 0x790
jmp 0x5970f
leaq -0x4c501(%rip), %r12    # 0xd5d4
cmpw $0x2, 0xb82(%rbx)
jl 0x59afa
movq %rax, %rbp
leaq 0xa1f4b(%rip), %rdi     # 0xfba34
callq 0x8510
movq %rbp, %rax
jmp 0x59afa
leaq -0x4c526(%rip), %r12    # 0xd5d4
movsd 0x20(%rsp), %xmm0
movl 0x31c(%rbx), %ecx
movsd 0xa28(%r13), %xmm3
movsd 0x10(%r13), %xmm2
movsd 0x18(%r13), %xmm4
movl 0x2b4(%rbx), %r11d
leaq 0xb84(%rbx), %rbp
subq $0x8, %rsp
leaq 0x3a6a(%rip), %r10      # 0x5d59e
leaq 0x3674(%rip), %rdi      # 0x5d1af
leaq 0x3a4c(%rip), %r9       # 0x5d58e
leaq 0x38(%rsp), %r8
xorpd %xmm1, %xmm1
movq %r15, %rsi
movq %rax, 0x30(%rsp)
movq %rax, %rdx
pushq %rbp
pushq $0x0
pushq %r10
pushq %r11
pushq 0x2b8(%rbx)
callq *%r12
addq $0x30, %rsp
cmpl $0x1, %eax
jne 0x59bad
leaq 0x8787a(%rip), %rsi     # 0xe13f0
leaq 0xa1ed6(%rip), %rdx     # 0xfba53
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x8749e(%rip), %rsi     # 0xe1034
leaq 0xa1d79(%rip), %rdx     # 0xfb916
movq %rbp, %rdi
movl $0x7bc, %ecx            # imm = 0x7BC
movq %rbx, %r8
jmp 0x59712
movslq 0x304(%rbx), %rax
movsd (%r15,%rax,8), %xmm0
divsd 0xa07fe(%rip), %xmm0    # 0xfa3c0
movsd %xmm0, 0x190(%rbx)
movslq 0x30c(%rbx), %rax
movsd (%r15,%rax,8), %xmm0
movsd %xmm0, 0x198(%rbx)
cmpw $0x1, 0x324(%rbx)
jne 0x59c0a
movslq 0x2f0(%rbx), %rax
movsd (%r15,%rax,8), %xmm0
movsd (%rbx), %xmm1
divsd %xmm1, %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x1b8(%rbx)
cmpw $0x1, 0x326(%rbx)
movq %rbp, %r12
jne 0x59c38
movslq 0x2f4(%rbx), %rax
movsd (%r15,%rax,8), %xmm0
movsd (%rbx), %xmm1
divsd %xmm1, %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x1c0(%rbx)
movl 0x2b4(%rbx), %esi
testl %esi, %esi
jle 0x59e30
movslq 0x310(%rbx), %rax
movsd 0x8760b(%rip), %xmm2    # 0xe1260
movapd %xmm2, %xmm3
divsd (%r15,%rax,8), %xmm3
xorl %r12d, %r12d
xorpd %xmm4, %xmm4
movsd %xmm3, 0x10(%rsp)
movq 0x2d0(%rbx), %rax
movslq 0x2b0(%rbx), %rcx
movslq %r12d, %rdx
imulq %rcx, %rdx
movslq 0x298(%rbx), %rcx
addq %rdx, %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd %xmm3, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movsd 0x198(%rbx), %xmm5
movq 0x2c0(%rbx), %rcx
subsd (%rcx,%r12,8), %xmm5
movslq 0x284(%rbx), %rcx
movslq %edx, %rdx
addq %rcx, %rdx
movsd %xmm5, (%rax,%rdx,8)
movl 0x1a8(%rbx), %eax
cmpl $-0x1, %eax
je 0x59cfc
testl %eax, %eax
je 0x59cf3
cmpl $0x1, %eax
jne 0x59dbd
movsd 0x1a0(%rbx), %xmm0
ucomisd 0x87570(%rip), %xmm0    # 0xe1258
jb 0x59d66
sqrtsd %xmm0, %xmm0
jmp 0x59d77
movapd %xmm5, %xmm4
jmp 0x59dbd
movsd 0x1a0(%rbx), %xmm0
movsd 0x8a7ec(%rip), %xmm1    # 0xe44f8
ucomisd %xmm0, %xmm1
xorpd 0x87518(%rip), %xmm0    # 0xe1230
jb 0x59d20
sqrtsd %xmm0, %xmm0
jmp 0x59d31
movsd %xmm5, 0x8(%rsp)
callq 0x82b0
movsd 0x8(%rsp), %xmm5
mulsd %xmm0, %xmm5
movapd %xmm5, %xmm0
callq 0x8370
movapd %xmm0, %xmm4
movsd 0x1a0(%rbx), %xmm0
movsd 0x8a7a6(%rip), %xmm1    # 0xe44f8
ucomisd %xmm0, %xmm1
xorpd 0x874d2(%rip), %xmm0    # 0xe1230
jb 0x59d9a
sqrtsd %xmm0, %xmm0
jmp 0x59dab
movsd %xmm5, 0x8(%rsp)
callq 0x82b0
movsd 0x8(%rsp), %xmm5
mulsd %xmm0, %xmm5
movapd %xmm5, %xmm0
callq 0x80a0
movapd %xmm0, %xmm4
movsd 0x1a0(%rbx), %xmm0
ucomisd 0x874c0(%rip), %xmm0    # 0xe1258
jae 0x59d60
movsd %xmm4, 0x8(%rsp)
callq 0x82b0
movsd 0x8(%rsp), %xmm4
movsd 0x874ad(%rip), %xmm2    # 0xe1260
movsd 0x10(%rsp), %xmm3
divsd %xmm0, %xmm4
movq 0x2c8(%rbx), %rax
movq 0x2d0(%rbx), %rcx
movsd (%rax,%r12,8), %xmm0
addsd %xmm2, %xmm0
movapd %xmm4, %xmm1
divsd %xmm0, %xmm1
movslq 0x2b0(%rbx), %rdx
movslq %r12d, %rsi
imulq %rdx, %rsi
movslq 0x288(%rbx), %rdx
addq %rsi, %rdx
movsd %xmm1, (%rcx,%rdx,8)
movsd (%rax,%r12,8), %xmm0
addsd %xmm2, %xmm0
mulsd %xmm4, %xmm0
movslq 0x28c(%rbx), %rax
movslq %esi, %rdx
addq %rax, %rdx
movsd %xmm0, (%rcx,%rdx,8)
incq %r12
movslq 0x2b4(%rbx), %rsi
cmpq %rsi, %r12
jl 0x59c6c
movq %rbp, %r12
movq 0x2c0(%rbx), %rdx
movq 0x2c8(%rbx), %rdi
movq 0x2d8(%rbx), %r8
subq $0x8, %rsp
movl $0x1, %ebp
movl $0x1, %ecx
movl $0x1, %r9d
pushq %r12
callq 0x14191
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0x59ea4
leaq 0x87580(%rip), %rsi     # 0xe13f0
leaq 0xa1d21(%rip), %rdx     # 0xfbb98
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x871a4(%rip), %rsi     # 0xe1034
leaq 0xa1a7f(%rip), %rdx     # 0xfb916
movq %r12, %rdi
movl $0x7e8, %ecx            # imm = 0x7E8
jmp 0x59f91
movq 0x2c0(%rbx), %rdi
movl 0x2b4(%rbx), %esi
movq 0x2c8(%rbx), %rdx
movq 0x2e0(%rbx), %r8
subq $0x8, %rsp
movl $0x1, %ebp
movl $0x1, %ecx
movl $0x1, %r9d
pushq %r12
callq 0x14191
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0x59f1b
leaq 0x87506(%rip), %rsi     # 0xe13f0
leaq 0xa1d1c(%rip), %rdx     # 0xfbc0d
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x8712a(%rip), %rsi     # 0xe1034
leaq 0xa1a05(%rip), %rdx     # 0xfb916
movq %r12, %rdi
movl $0x7f2, %ecx            # imm = 0x7F2
jmp 0x59f91
movq 0x2b8(%rbx), %rdi
movl 0x2b0(%rbx), %ecx
movl 0x2b4(%rbx), %esi
movq 0x2d0(%rbx), %rdx
movq 0x2e8(%rbx), %r8
subq $0x8, %rsp
movl $0x1, %ebp
movl $0x1, %r9d
pushq %r12
callq 0x14191
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0x59fa0
leaq 0x8748e(%rip), %rsi     # 0xe13f0
leaq 0xa1d19(%rip), %rdx     # 0xfbc82
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x870b2(%rip), %rsi     # 0xe1034
leaq 0xa198d(%rip), %rdx     # 0xfb916
movq %r12, %rdi
movl $0x7fc, %ecx            # imm = 0x7FC
movq %rbx, %r8
xorl %eax, %eax
callq 0x30c2c
jmp 0x5971e
movq 0x2d0(%rbx), %rax
movslq 0x278(%rbx), %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x27c(%rbx), %rcx
movslq 0x214(%rbx), %rdx
mulsd (%rax,%rcx,8), %xmm0
movsd (%rax,%rdx,8), %xmm1
subsd %xmm1, %xmm0
mulsd 0xa03f1(%rip), %xmm1    # 0xfa3c8
divsd %xmm1, %xmm0
movsd %xmm0, 0x1b0(%rbx)
cmpw $0x0, 0xb82(%rbx)
jle 0x5a02f
movsd 0x190(%rbx), %xmm0
leaq 0xa1d1a(%rip), %rdi     # 0xfbd16
movb $0x1, %al
callq 0x8030
movsd 0x198(%rbx), %xmm0
leaq 0xa1d16(%rip), %rdi     # 0xfbd28
movb $0x1, %al
callq 0x8030
movsd 0x1b0(%rbx), %xmm0
leaq 0xa1d1c(%rip), %rdi     # 0xfbd44
movb $0x1, %al
callq 0x8030
cmpw $0x3, 0xb82(%rbx)
jl 0x5a20b
cmpw $0x1, 0x324(%rbx)
jne 0x5a0c4
cmpw $0x1, 0x326(%rbx)
jne 0x5a0c4
leaq 0xa2732(%rip), %rdi     # 0xfc78a
callq 0x8510
movsd 0x1b8(%rbx), %xmm0
leaq 0xa1d2c(%rip), %rdi     # 0xfbd98
movb $0x1, %al
callq 0x8030
movsd 0x1c0(%rbx), %xmm0
leaq 0xa1d30(%rip), %rdi     # 0xfbdb2
movb $0x1, %al
callq 0x8030
movsd 0x50(%rbx), %xmm1
movsd 0x1c0(%rbx), %xmm0
addsd 0x1b8(%rbx), %xmm0
leaq 0xa1d25(%rip), %rdi     # 0xfbdca
movb $0x2, %al
callq 0x8030
movsd 0x58(%rbx), %xmm0
divsd 0x20(%rbx), %xmm0
leaq 0xa1d43(%rip), %rdi     # 0xfbe00
movb $0x1, %al
callq 0x8030
cmpw $0x1, 0x328(%rbx)
jne 0x5a20b
leaq 0xa26e6(%rip), %rdi     # 0xfc7bf
callq 0x8510
movq 0x2d0(%rbx), %rax
movslq 0x2b4(%rbx), %rcx
decq %rcx
movslq 0x2b0(%rbx), %rdx
imulq %rcx, %rdx
movslq 0x254(%rbx), %rcx
addq %rdx, %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x27c(%rbx), %rcx
movslq %edx, %rdx
addq %rcx, %rdx
divsd (%rax,%rdx,8), %xmm0
movsd 0x108(%rbx), %xmm1
leaq 0xa1cfb(%rip), %rdi     # 0xfbe25
movb $0x2, %al
callq 0x8030
cmpw $0x1, 0x32c(%rbx)
jne 0x5a18e
movq 0x2d0(%rbx), %rax
movslq 0x2b4(%rbx), %rcx
decq %rcx
movslq 0x2b0(%rbx), %rdx
imulq %rcx, %rdx
movslq 0x224(%rbx), %rcx
addq %rdx, %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x27c(%rbx), %rcx
movslq %edx, %rdx
addq %rcx, %rdx
divsd (%rax,%rdx,8), %xmm0
movsd 0xf8(%rbx), %xmm1
leaq 0xa1cc1(%rip), %rdi     # 0xfbe48
movb $0x2, %al
callq 0x8030
leaq 0xa2644(%rip), %rdi     # 0xfc7d9
callq 0x8510
leaq 0xa1ccd(%rip), %rdi     # 0xfbe6e
xorl %eax, %eax
callq 0x8030
movl 0x168(%rbx), %eax
cmpl $0x2, %eax
jl 0x5a1e8
xorl %r13d, %r13d
leaq 0xa1cc7(%rip), %r12     # 0xfbe84
movq 0x148(%rbx), %rax
movsd (%rax,%r13,8), %xmm0
movq %r12, %rdi
movb $0x1, %al
callq 0x8030
incq %r13
movslq 0x168(%rbx), %rax
decq %rax
cmpq %rax, %r13
jl 0x5a1bd
jmp 0x5a1ea
decl %eax
movq 0x148(%rbx), %rcx
cltq
movsd (%rcx,%rax,8), %xmm0
leaq 0xa1c8c(%rip), %rdi     # 0xfbe8b
movb $0x1, %al
callq 0x8030
movq 0x18(%rsp), %r13
movq 0x2d0(%rbx), %rax
movslq 0x2b4(%rbx), %rcx
decq %rcx
movslq 0x2b0(%rbx), %rdx
imulq %rcx, %rdx
movslq 0x280(%rbx), %rcx
addq %rdx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x1c8(%rbx)
movslq 0x278(%rbx), %rcx
movslq %edx, %rdx
addq %rcx, %rdx
movsd (%rax,%rdx,8), %xmm1
movsd %xmm1, 0x1d0(%rbx)
addsd %xmm1, %xmm0
addsd 0xf0(%rbx), %xmm0
movsd 0x86ff4(%rip), %xmm1    # 0xe1260
subsd %xmm0, %xmm1
movsd %xmm1, 0x1d8(%rbx)
movsd 0x20(%rbx), %xmm0
movsd %xmm0, 0x1e0(%rbx)
cmpw $0x1, 0x320(%rbx)
jne 0x5a29c
addsd 0x30(%rbx), %xmm0
movsd %xmm0, 0x1e0(%rbx)
cmpw $0x1, 0x322(%rbx)
jne 0x5a2bb
movsd 0x38(%rbx), %xmm0
addsd 0x1e0(%rbx), %xmm0
movsd %xmm0, 0x1e0(%rbx)
cmpw $0x1, 0x324(%rbx)
jne 0x5a2dd
movsd 0x1b8(%rbx), %xmm0
addsd 0x1e0(%rbx), %xmm0
movsd %xmm0, 0x1e0(%rbx)
movslq 0x70(%rbx), %rax
testq %rax, %rax
jle 0x5a327
movq 0x90(%rbx), %rcx
movsd 0x88(%r13), %xmm0
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x5a31f
movq 0xa0(%rbx), %rsi
movsd (%rsi,%rdx,8), %xmm1
addsd 0x1e0(%rbx), %xmm1
movsd %xmm1, 0x1e0(%rbx)
incq %rdx
cmpq %rdx, %rax
jne 0x5a2f8
movq %r14, %rdi
callq 0x8410
movq %r15, %rdi
callq 0x8410
movq 0x28(%rsp), %rdi
callq 0x8410
xorl %ebp, %ebp
jmp 0x5971e