// File: /workspace/github_c_makefile_star2_O3/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 0x5745c
movq %rax, %r14
movq %rax, 0x38(%rsp)
movslq 0x31c(%rbx), %r12
leaq (,%r12,8), %rdi
callq 0x8460
testq %rax, %rax
je 0x5749f
movq %rax, %r15
leaq 0x20(%rsp), %r8
movq %r13, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %rax, %rcx
callq 0x5a49f
testl %eax, %eax
je 0x57503
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x87fc8(%rip), %rsi     # 0xdf3f0
leaq 0xa253d(%rip), %rdx     # 0xf996c
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x87bec(%rip), %rsi     # 0xdf034
leaq 0xa24f7(%rip), %rdx     # 0xf9946
movq %rbx, %rdi
movl $0x77f, %ecx            # imm = 0x77F
jmp 0x574e0
shll $0x3, %r15d
leaq 0x87b9d(%rip), %rsi     # 0xdf004
leaq 0xab09e(%rip), %rdx     # 0x10250c
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x87ba6(%rip), %rsi     # 0xdf034
leaq 0xa24b1(%rip), %rdx     # 0xf9946
movq %rbx, %rdi
movl $0x776, %ecx            # imm = 0x776
jmp 0x574e0
shll $0x3, %r12d
leaq 0x87b5a(%rip), %rsi     # 0xdf004
leaq 0xa24a6(%rip), %rdx     # 0xf9957
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x87b63(%rip), %rsi     # 0xdf034
leaq 0xa246e(%rip), %rdx     # 0xf9946
movq %rbx, %rdi
movl $0x77a, %ecx            # imm = 0x77A
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
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 0x57671
movq %r12, %rdi
callq 0x8460
movq %rax, 0x2c8(%rbx)
testq %rax, %rax
je 0x576b5
movq %r13, 0x18(%rsp)
movq %r12, %rdi
callq 0x8460
movq %rax, 0x2b8(%rbx)
testq %rax, %rax
je 0x576f9
movq %rax, %r13
movq %r12, %rdi
callq 0x8460
movq %rax, 0x2d8(%rbx)
testq %rax, %rax
je 0x5773d
movq %r12, %rdi
callq 0x8460
movq %rax, 0x2e0(%rbx)
testq %rax, %rax
je 0x57781
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 0x577c5
movq %r12, %rdi
callq 0x8460
movq %rax, 0x2e8(%rbx)
testq %rax, %rax
je 0x57810
leaq (,%rbp,4), %rdi
callq 0x8460
testq %rax, %rax
je 0x5785b
testl %ebp, %ebp
jle 0x57633
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 0x5760a
movq 0x18(%rsp), %r13
movl 0xc(%r13), %ecx
cmpl $0x1, %ecx
je 0x5789f
testl %ecx, %ecx
jne 0x578c4
leaq -0x4a624(%rip), %r12    # 0xd030
cmpw $0x1, 0xb82(%rbx)
jle 0x578cb
movq %rax, %rbp
leaq 0xa23dc(%rip), %rdi     # 0xf9a48
jmp 0x578ba
shll $0x3, %ebp
leaq 0x87989(%rip), %rsi     # 0xdf004
leaq 0xa233b(%rip), %rdx     # 0xf99bd
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x87993(%rip), %rsi     # 0xdf034
leaq 0xa229e(%rip), %rdx     # 0xf9946
movq %rbx, %rdi
movl $0x786, %ecx            # imm = 0x786
jmp 0x574e0
shll $0x3, %ebp
leaq 0x87945(%rip), %rsi     # 0xdf004
leaq 0xa2306(%rip), %rdx     # 0xf99cc
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x8794f(%rip), %rsi     # 0xdf034
leaq 0xa225a(%rip), %rdx     # 0xf9946
movq %rbx, %rdi
movl $0x787, %ecx            # imm = 0x787
jmp 0x574e0
shll $0x3, %ebp
leaq 0x87901(%rip), %rsi     # 0xdf004
leaq 0xa22cf(%rip), %rdx     # 0xf99d9
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x8790b(%rip), %rsi     # 0xdf034
leaq 0xa2216(%rip), %rdx     # 0xf9946
movq %rbx, %rdi
movl $0x788, %ecx            # imm = 0x788
jmp 0x574e0
shll $0x3, %ebp
leaq 0x878bd(%rip), %rsi     # 0xdf004
leaq 0xa229b(%rip), %rdx     # 0xf99e9
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x878c7(%rip), %rsi     # 0xdf034
leaq 0xa21d2(%rip), %rdx     # 0xf9946
movq %rbx, %rdi
movl $0x78a, %ecx            # imm = 0x78A
jmp 0x574e0
shll $0x3, %ebp
leaq 0x87879(%rip), %rsi     # 0xdf004
leaq 0xa226c(%rip), %rdx     # 0xf99fe
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x87883(%rip), %rsi     # 0xdf034
leaq 0xa218e(%rip), %rdx     # 0xf9946
movq %rbx, %rdi
movl $0x78b, %ecx            # imm = 0x78B
jmp 0x574e0
movq 0x10(%rsp), %rax
leal (,%rax,8), %ecx
leaq 0x8782c(%rip), %rsi     # 0xdf004
leaq 0xa2234(%rip), %rdx     # 0xf9a13
leaq 0x40(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x87838(%rip), %rsi     # 0xdf034
leaq 0xa2143(%rip), %rdx     # 0xf9946
movq %rbx, %rdi
movl $0x78d, %ecx            # imm = 0x78D
jmp 0x574e0
movq 0x10(%rsp), %rax
leal (,%rax,8), %ecx
leaq 0x877e1(%rip), %rsi     # 0xdf004
leaq 0xa21ff(%rip), %rdx     # 0xf9a29
leaq 0x40(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x877ed(%rip), %rsi     # 0xdf034
leaq 0xa20f8(%rip), %rdx     # 0xf9946
movq %rbx, %rdi
movl $0x78e, %ecx            # imm = 0x78E
jmp 0x574e0
shll $0x2, %ebp
leaq 0x8779f(%rip), %rsi     # 0xdf004
leaq 0xa5557(%rip), %rdx     # 0xfcdc3
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x877a9(%rip), %rsi     # 0xdf034
leaq 0xa20b4(%rip), %rdx     # 0xf9946
movq %rbx, %rdi
movl $0x790, %ecx            # imm = 0x790
jmp 0x574e0
leaq -0x4a1ee(%rip), %r12    # 0xd6b8
cmpw $0x2, 0xb82(%rbx)
jl 0x578cb
movq %rax, %rbp
leaq 0xa21aa(%rip), %rdi     # 0xf9a64
callq 0x8510
movq %rbp, %rax
jmp 0x578cb
leaq -0x4a213(%rip), %r12    # 0xd6b8
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 0x3945(%rip), %r10      # 0x5b24a
leaq 0x3560(%rip), %rdi      # 0x5ae6c
leaq 0x3927(%rip), %r9       # 0x5b23a
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 0x5797e
leaq 0x87aa9(%rip), %rsi     # 0xdf3f0
leaq 0xa2135(%rip), %rdx     # 0xf9a83
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x876cd(%rip), %rsi     # 0xdf034
leaq 0xa1fd8(%rip), %rdx     # 0xf9946
movq %rbp, %rdi
movl $0x7bc, %ecx            # imm = 0x7BC
movq %rbx, %r8
jmp 0x574e3
movslq 0x304(%rbx), %rax
movsd (%r15,%rax,8), %xmm0
divsd 0xa0a5d(%rip), %xmm0    # 0xf83f0
movsd %xmm0, 0x190(%rbx)
movslq 0x30c(%rbx), %rax
movsd (%r15,%rax,8), %xmm0
movsd %xmm0, 0x198(%rbx)
cmpw $0x1, 0x324(%rbx)
jne 0x579db
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 0x57a09
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 0x57bff
movslq 0x310(%rbx), %rax
movsd 0x8783a(%rip), %xmm2    # 0xdf260
movapd %xmm2, %xmm3
divsd (%r15,%rax,8), %xmm3
movq 0x2d0(%rbx), %rax
movl 0x2b0(%rbx), %ecx
xorl %r12d, %r12d
xorpd %xmm4, %xmm4
movsd %xmm3, 0x10(%rsp)
movl %r12d, %edx
imull %ecx, %edx
movslq 0x298(%rbx), %rcx
movslq %edx, %rdx
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
addq %rdx, %rcx
movsd %xmm5, (%rax,%rcx,8)
movl 0x1a8(%rbx), %eax
cmpl $-0x1, %eax
je 0x57acb
testl %eax, %eax
je 0x57ac2
cmpl $0x1, %eax
jne 0x57b8c
movsd 0x1a0(%rbx), %xmm0
ucomisd 0x877a1(%rip), %xmm0    # 0xdf258
jb 0x57b35
sqrtsd %xmm0, %xmm0
jmp 0x57b46
movapd %xmm5, %xmm4
jmp 0x57b8c
movsd 0x1a0(%rbx), %xmm0
movsd 0x8aa2d(%rip), %xmm1    # 0xe2508
ucomisd %xmm0, %xmm1
xorpd 0x87749(%rip), %xmm0    # 0xdf230
jb 0x57aef
sqrtsd %xmm0, %xmm0
jmp 0x57b00
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 0x8a9e7(%rip), %xmm1    # 0xe2508
ucomisd %xmm0, %xmm1
xorpd 0x87703(%rip), %xmm0    # 0xdf230
jb 0x57b69
sqrtsd %xmm0, %xmm0
jmp 0x57b7a
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 0x876f1(%rip), %xmm0    # 0xdf258
jae 0x57b2f
movsd %xmm4, 0x8(%rsp)
callq 0x82b0
movsd 0x8(%rsp), %xmm4
movsd 0x876de(%rip), %xmm2    # 0xdf260
movsd 0x10(%rsp), %xmm3
divsd %xmm0, %xmm4
movq 0x2c8(%rbx), %rdi
movsd (%rdi,%r12,8), %xmm0
addsd %xmm2, %xmm0
movapd %xmm4, %xmm1
divsd %xmm0, %xmm1
movq 0x2d0(%rbx), %rax
movl 0x2b0(%rbx), %ecx
movl %r12d, %edx
imull %ecx, %edx
movslq 0x288(%rbx), %rsi
movslq %edx, %rdx
addq %rdx, %rsi
movsd %xmm1, (%rax,%rsi,8)
movsd (%rdi,%r12,8), %xmm0
addsd %xmm2, %xmm0
mulsd %xmm4, %xmm0
movslq 0x28c(%rbx), %rsi
addq %rdx, %rsi
movsd %xmm0, (%rax,%rsi,8)
incq %r12
movslq 0x2b4(%rbx), %rsi
cmpq %rsi, %r12
jl 0x57a4a
movq %rbp, %r12
jmp 0x57c06
movq 0x2c8(%rbx), %rdi
movq 0x2c0(%rbx), %rdx
movq 0x2d8(%rbx), %r8
subq $0x8, %rsp
movl $0x1, %ebp
movl $0x1, %ecx
movl $0x1, %r9d
pushq %r12
callq 0x142a8
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0x57c73
leaq 0x877b1(%rip), %rsi     # 0xdf3f0
leaq 0xa1f82(%rip), %rdx     # 0xf9bc8
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x873d5(%rip), %rsi     # 0xdf034
leaq 0xa1ce0(%rip), %rdx     # 0xf9946
movq %r12, %rdi
movl $0x7e8, %ecx            # imm = 0x7E8
jmp 0x57d60
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 0x142a8
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0x57cea
leaq 0x87737(%rip), %rsi     # 0xdf3f0
leaq 0xa1f7d(%rip), %rdx     # 0xf9c3d
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x8735b(%rip), %rsi     # 0xdf034
leaq 0xa1c66(%rip), %rdx     # 0xf9946
movq %r12, %rdi
movl $0x7f2, %ecx            # imm = 0x7F2
jmp 0x57d60
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 0x142a8
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0x57d6f
leaq 0x876bf(%rip), %rsi     # 0xdf3f0
leaq 0xa1f7a(%rip), %rdx     # 0xf9cb2
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x872e3(%rip), %rsi     # 0xdf034
leaq 0xa1bee(%rip), %rdx     # 0xf9946
movq %r12, %rdi
movl $0x7fc, %ecx            # imm = 0x7FC
movq %rbx, %r8
xorl %eax, %eax
callq 0x30af0
jmp 0x574ef
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 0xa0652(%rip), %xmm1    # 0xf83f8
divsd %xmm1, %xmm0
movsd %xmm0, 0x1b0(%rbx)
cmpw $0x0, 0xb82(%rbx)
jle 0x57fdf
movsd 0x190(%rbx), %xmm0
leaq 0xa1f77(%rip), %rdi     # 0xf9d46
movb $0x1, %al
callq 0x8030
movsd 0x198(%rbx), %xmm0
leaq 0xa1f73(%rip), %rdi     # 0xf9d58
movb $0x1, %al
callq 0x8030
movsd 0x1b0(%rbx), %xmm0
leaq 0xa1f79(%rip), %rdi     # 0xf9d74
movb $0x1, %al
callq 0x8030
cmpw $0x3, 0xb82(%rbx)
jl 0x57fdf
cmpw $0x1, 0x324(%rbx)
jne 0x57e97
cmpw $0x1, 0x326(%rbx)
jne 0x57e97
leaq 0xa298f(%rip), %rdi     # 0xfa7ba
callq 0x8510
movsd 0x1b8(%rbx), %xmm0
leaq 0xa1f89(%rip), %rdi     # 0xf9dc8
movb $0x1, %al
callq 0x8030
movsd 0x1c0(%rbx), %xmm0
leaq 0xa1f8d(%rip), %rdi     # 0xf9de2
movb $0x1, %al
callq 0x8030
movsd 0x50(%rbx), %xmm1
movsd 0x1c0(%rbx), %xmm0
addsd 0x1b8(%rbx), %xmm0
leaq 0xa1f82(%rip), %rdi     # 0xf9dfa
movb $0x2, %al
callq 0x8030
movsd 0x58(%rbx), %xmm0
divsd 0x20(%rbx), %xmm0
leaq 0xa1fa0(%rip), %rdi     # 0xf9e30
movb $0x1, %al
callq 0x8030
cmpw $0x1, 0x328(%rbx)
jne 0x57fdf
leaq 0xa2943(%rip), %rdi     # 0xfa7ef
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 0xa1f58(%rip), %rdi     # 0xf9e55
movb $0x2, %al
callq 0x8030
cmpw $0x1, 0x32c(%rbx)
jne 0x57f61
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 0xa1f1e(%rip), %rdi     # 0xf9e78
movb $0x2, %al
callq 0x8030
leaq 0xa28a1(%rip), %rdi     # 0xfa809
callq 0x8510
leaq 0xa1f2a(%rip), %rdi     # 0xf9e9e
xorl %eax, %eax
callq 0x8030
movslq 0x168(%rbx), %rax
cmpq $0x1, %rax
jle 0x57fbd
xorl %r13d, %r13d
leaq 0xa1f22(%rip), %r12     # 0xf9eb4
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 0x57f92
jmp 0x57fc0
decq %rax
movq 0x148(%rbx), %rcx
movsd (%rcx,%rax,8), %xmm0
leaq 0xa1ee8(%rip), %rdi     # 0xf9ebb
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 0x87220(%rip), %xmm1    # 0xdf260
subsd %xmm0, %xmm1
movsd %xmm1, 0x1d8(%rbx)
movsd 0x20(%rbx), %xmm0
movsd %xmm0, 0x1e0(%rbx)
cmpw $0x1, 0x320(%rbx)
jne 0x58070
addsd 0x30(%rbx), %xmm0
movsd %xmm0, 0x1e0(%rbx)
cmpw $0x1, 0x322(%rbx)
jne 0x58087
addsd 0x38(%rbx), %xmm0
movsd %xmm0, 0x1e0(%rbx)
cmpw $0x1, 0x324(%rbx)
jne 0x580a1
addsd 0x1b8(%rbx), %xmm0
movsd %xmm0, 0x1e0(%rbx)
movslq 0x70(%rbx), %rax
testq %rax, %rax
jle 0x580e3
movq 0x90(%rbx), %rcx
movsd 0x88(%r13), %xmm1
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm2
ucomisd %xmm1, %xmm2
jbe 0x580db
movq 0xa0(%rbx), %rsi
addsd (%rsi,%rdx,8), %xmm0
movsd %xmm0, 0x1e0(%rbx)
incq %rdx
cmpq %rdx, %rax
jne 0x580bc
movq %r14, %rdi
callq 0x8410
movq %r15, %rdi
callq 0x8410
movq 0x28(%rsp), %rdi
callq 0x8410
xorl %ebp, %ebp
jmp 0x574ef