// File: /workspace/github_c_makefile_star2_O2/PoulinV[P]AxiCLASS/build/../source/perturbations.c
// Function: perturbations_solve
int perturbations_solve(
                        struct precision * ppr,
                        struct background * pba,
                        struct thermodynamics * pth,
                        struct perturbations * ppt,
                        int index_md,
                        int index_ic,
                        int index_k,
                        struct perturbations_workspace * ppw
                        ) {

  /** Summary: */

  /** - define local variables */

  /* contains all fixed parameters, indices and workspaces used by the perturbations_derivs function */
  struct perturbations_parameters_and_workspace ppaw;

  /* conformal time */
  double tau,tau_lower,tau_upper,tau_mid;

  /* multipole */
  int l;

  /* index running over time */
  int index_tau;

  /* number of values in the tau_sampling array that should be considered for a given mode */
  int tau_actual_size;

  /* running index over types (temperature, etc) */
  int index_tp;

  /* Fourier mode */
  double k;

  /* number of time intervals where the approximation scheme is uniform */
  int interval_number;

  /* index running over such time intervals */
  int index_interval;

  /* number of time intervals where each particular approximation is uniform */
  int * interval_number_of;

  /* edge of intervals where approximation scheme is uniform: tau_ini, tau_switch_1, ..., tau_end */
  double * interval_limit;

  /* array of approximation scheme within each interval: interval_approx[index_interval][index_ap] */
  int ** interval_approx;

  /* index running over approximations */
  int index_ap;

  /* approximation scheme within previous interval: previous_approx[index_ap] */
  int * previous_approx;

  int n_ncdm,is_early_enough;

  /* function pointer to ODE evolver and names of possible evolvers */


  auto generic_evolver = &(evolver_ndf15);


  /* Related to the perturbation output */
  int (*perhaps_print_variables)(double, double*, double*, void*, char*);
  int index_ikout;

  /** - initialize indices relevant for back/thermo tables search */
  ppw->last_index_back=0;
  ppw->last_index_thermo=0;
  ppw->inter_mode = inter_normal;

  /** - get wavenumber value */
  k = ppt->k[index_md][index_k];

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

  /** - If non-zero curvature, update array of free-streaming coefficients ppw->s_l */
  if (pba->has_curvature == _TRUE_){
    for (l = 0; l<=ppw->max_l_max; l++){
      ppw->s_l[l] = sqrt(MAX(1.0-pba->K*(l*l-1.0)/k/k,0.));
    }
  }

  /** - maximum value of tau for which sources are calculated for this wavenumber */

  /* by default, today */
  tau_actual_size = ppt->tau_size;

  /** - using bisection, compute minimum value of tau for which this
      wavenumber is integrated */

  /* will be at least the first time in the background table */
  tau_lower = pba->tau_table[0];

  class_call(background_at_tau(pba,
                               tau_lower,
                               normal_info,
                               inter_normal,
                               &(ppw->last_index_back),
                               ppw->pvecback),
             pba->error_message,
             ppt->error_message);

  class_call(thermodynamics_at_z(pba,
                                 pth,
                                 1./ppw->pvecback[pba->index_bg_a]-1.,
                                 inter_normal,
                                 &(ppw->last_index_thermo),
                                 ppw->pvecback,
                                 ppw->pvecthermo),
             pth->error_message,
             ppt->error_message);

  /* check that this initial time is indeed OK given imposed
     conditions on kappa' and on k/aH */

  class_test(ppw->pvecback[pba->index_bg_a]*
             ppw->pvecback[pba->index_bg_H]/
             ppw->pvecthermo[pth->index_th_dkappa] >
             ppr->start_small_k_at_tau_c_over_tau_h, ppt->error_message, "your choice of initial time for integrating wavenumbers is inappropriate: it corresponds to a time before that at which the background has been integrated. You should increase 'start_small_k_at_tau_c_over_tau_h' up to at least %g, or decrease 'a_ini_over_a_today_default'\n",
             ppw->pvecback[pba->index_bg_a]*
             ppw->pvecback[pba->index_bg_H]/
             ppw->pvecthermo[pth->index_th_dkappa]);

  class_test(k/ppw->pvecback[pba->index_bg_a]/ppw->pvecback[pba->index_bg_H] >
             ppr->start_large_k_at_tau_h_over_tau_k,
             ppt->error_message,
             "your choice of initial time for integrating wavenumbers is inappropriate: it corresponds to a time before that at which the background has been integrated. You should increase 'start_large_k_at_tau_h_over_tau_k' up to at least %g, or decrease 'a_ini_over_a_today_default'\n",
             ppt->k[index_md][ppt->k_size[index_md]-1]/ppw->pvecback[pba->index_bg_a]/ ppw->pvecback[pba->index_bg_H]);

  if (pba->has_ncdm == _TRUE_) {
    for (n_ncdm=0; n_ncdm < pba->N_ncdm; n_ncdm++) {
      class_test(fabs(ppw->pvecback[pba->index_bg_p_ncdm1+n_ncdm]/ppw->pvecback[pba->index_bg_rho_ncdm1+n_ncdm]-1./3.)>ppr->tol_ncdm_initial_w,
                 ppt->error_message,
                 "your choice of initial time for integrating wavenumbers is inappropriate: it corresponds to a time at which the ncdm species number %d is not ultra-relativistic anymore, with w=%g, p=%g and rho=%g\n",
                 n_ncdm,
                 ppw->pvecback[pba->index_bg_p_ncdm1+n_ncdm]/ppw->pvecback[pba->index_bg_rho_ncdm1+n_ncdm],
                 ppw->pvecback[pba->index_bg_p_ncdm1+n_ncdm],
                 ppw->pvecback[pba->index_bg_rho_ncdm1+n_ncdm]);
    }
  }

  /* is at most the time at which sources must be sampled */
  tau_upper = ppt->tau_sampling[0];

  /* start bisection */
  tau_mid = 0.5*(tau_lower + tau_upper);

  while ((tau_upper - tau_lower)/tau_lower > ppr->tol_tau_approx) {

    is_early_enough = _TRUE_;

    class_call(background_at_tau(pba,
                                 tau_mid,
                                 normal_info,
                                 inter_normal,
                                 &(ppw->last_index_back),
                                 ppw->pvecback),
               pba->error_message,
               ppt->error_message);

    /* if there are non-cold relics, check that they are relativistic enough */
    if (pba->has_ncdm == _TRUE_) {
      for (n_ncdm=0; n_ncdm < pba->N_ncdm; n_ncdm++) {
        if (fabs(ppw->pvecback[pba->index_bg_p_ncdm1+n_ncdm]/ppw->pvecback[pba->index_bg_rho_ncdm1+n_ncdm]-1./3.) > ppr->tol_ncdm_initial_w)
          is_early_enough = _FALSE_;
      }
    }

    /* also check that the two conditions on (aH/kappa') and (aH/k) are fulfilled */
    if (is_early_enough == _TRUE_) {

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

      if ((ppw->pvecback[pba->index_bg_a]*
           ppw->pvecback[pba->index_bg_H]/
           ppw->pvecthermo[pth->index_th_dkappa] >
           ppr->start_small_k_at_tau_c_over_tau_h) ||
          (k/ppw->pvecback[pba->index_bg_a]/ppw->pvecback[pba->index_bg_H] >
           ppr->start_large_k_at_tau_h_over_tau_k))

        is_early_enough = _FALSE_;
    }

    if (is_early_enough == _TRUE_)
      tau_lower = tau_mid;
    else
      tau_upper = tau_mid;

    tau_mid = 0.5*(tau_lower + tau_upper);

  }

  tau = tau_mid;

  /** - find the number of intervals over which approximation scheme is constant */

  class_alloc(interval_number_of,ppw->ap_size*sizeof(int),ppt->error_message);

  ppw->inter_mode = inter_normal;

  class_call(perturbations_find_approximation_number(ppr,
                                                     pba,
                                                     pth,
                                                     ppt,
                                                     index_md,
                                                     k,
                                                     ppw,
                                                     tau,
                                                     ppt->tau_sampling[tau_actual_size-1],
                                                     &interval_number,
                                                     interval_number_of),
             ppt->error_message,
             ppt->error_message);

  class_alloc(interval_limit,(interval_number+1)*sizeof(double),ppt->error_message);

  class_alloc(interval_approx,interval_number*sizeof(int*),ppt->error_message);

  for (index_interval=0; index_interval<interval_number; index_interval++)
    class_alloc(interval_approx[index_interval],ppw->ap_size*sizeof(int),ppt->error_message);

  class_call(perturbations_find_approximation_switches(ppr,
                                                       pba,
                                                       pth,
                                                       ppt,
                                                       index_md,
                                                       k,
                                                       ppw,
                                                       tau,
                                                       ppt->tau_sampling[tau_actual_size-1],
                                                       ppr->tol_tau_approx,
                                                       interval_number,
                                                       interval_number_of,
                                                       interval_limit,
                                                       interval_approx),
             ppt->error_message,
             ppt->error_message);

  free(interval_number_of);

  /** - fill the structure containing all fixed parameters, indices
      and workspaces needed by perturbations_derivs */

  ppaw.ppr = ppr;
  ppaw.pba = pba;
  ppaw.pth = pth;
  ppaw.ppt = ppt;
  ppaw.index_md = index_md;
  ppaw.index_ic = index_ic;
  ppaw.index_k = index_k;
  ppaw.k = k;
  ppaw.ppw = ppw;
  ppaw.ppw->inter_mode = inter_closeby;
  ppaw.ppw->last_index_back = 0;
  ppaw.ppw->last_index_thermo = 0;

  /** - check whether we need to print perturbations to a file for this wavenumber */

  perhaps_print_variables = NULL;
  ppw->index_ikout = -1;
  for (index_ikout=0; index_ikout<ppt->k_output_values_num; index_ikout++){
    if (ppt->index_k_output_values[index_md*ppt->k_output_values_num+index_ikout] == index_k){
      ppw->index_ikout = index_ikout;
      perhaps_print_variables = perturbations_print_variables;
    }
  }

  /** - loop over intervals over which approximation scheme is uniform. For each interval: */

  for (index_interval=0; index_interval<interval_number; index_interval++) {

    /** - --> (a) fix the approximation scheme */

    for (index_ap=0; index_ap<ppw->ap_size; index_ap++)
      ppw->approx[index_ap]=interval_approx[index_interval][index_ap];

    /** - --> (b) get the previous approximation scheme. If the current
        interval starts from the initial time tau_ini, the previous
        approximation is set to be a NULL pointer, so that the
        function perturbations_vector_init() knows that perturbations must
        be initialized */

    if (index_interval==0) {
      previous_approx=NULL;
    }
    else {
      previous_approx=interval_approx[index_interval-1];
    }

    /** - --> (c) define the vector of perturbations to be integrated
        over. If the current interval starts from the initial time
        tau_ini, fill the vector with initial conditions for each
        mode. If it starts from an approximation switching point,
        redistribute correctly the perturbations from the previous to
        the new vector of perturbations. */

    class_call(perturbations_vector_init(ppr,
                                         pba,
                                         pth,
                                         ppt,
                                         index_md,
                                         index_ic,
                                         k,
                                         interval_limit[index_interval],
                                         ppw,
                                         previous_approx),
               ppt->error_message,
               ppt->error_message);

    /** - --> (d) integrate the perturbations over the current interval. */

    if (ppr->evolver == rk){
      generic_evolver = evolver_rk;
    }
    else {
      generic_evolver = evolver_ndf15;
    }


    class_call(generic_evolver(perturbations_derivs,
                               interval_limit[index_interval],
                               interval_limit[index_interval+1],
                               ppw->pv->y,
                               ppw->pv->used_in_sources,
                               ppw->pv->pt_size,
                               &ppaw,
                               ppr->tol_perturbations_integration,
                               ppr->smallest_allowed_variation,
                               perturbations_timescale,
                               ppr->perturbations_integration_stepsize,
                               ppt->tau_sampling,
                               tau_actual_size,
                               perturbations_sources,
                               perhaps_print_variables,
                               ppt->error_message),
               ppt->error_message,
               ppt->error_message);

  }

  /** - if perturbations were printed in a file, close the file */

  //if (perhaps_print_variables != NULL)
  //  fclose(ppw->perturbations_output_file);

  /** - fill the source terms array with zeros for all times between
      the last integrated time tau_max and tau_today. */

  for (index_tau = tau_actual_size; index_tau < ppt->tau_size; index_tau++) {
    for (index_tp = 0; index_tp < ppt->tp_size[index_md]; index_tp++) {
      ppt->sources[index_md]
        [index_ic * ppt->tp_size[index_md] + index_tp]
        [index_tau * ppt->k_size[index_md] + index_k] = 0.;
    }
  }

  /** - free quantities allocated at the beginning of the routine */

  class_call(perturbations_vector_free(ppw->pv),
             ppt->error_message,
             ppt->error_message);

  for (index_interval=0; index_interval<interval_number; index_interval++)
    free(interval_approx[index_interval]);

  free(interval_approx);

  free(interval_limit);

  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1088, %rsp           # imm = 0x1088
movq %rcx, %rbx
movq %rsi, %r12
movq 0x10c8(%rsp), %r14
andq $0x0, 0x158(%r14)
andw $0x0, 0x154(%r14)
movslq 0x10c0(%rsp), %rsi
movq 0x9d0(%rcx), %rax
movslq %r8d, %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax,%rsi,8), %xmm3
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm3
jne 0x75bd3
jp 0x75bd3
pushq $0x1
popq %rbp
leaq 0x7118b(%rip), %rsi     # 0xe6cfd
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x6f4f7(%rip), %rsi     # 0xe5082
leaq 0x98a17(%rip), %rdx     # 0x10e5a9
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x6f47f(%rip), %rsi     # 0xe5034
leaq 0x965db(%rip), %rdx     # 0x10c197
movq %rbx, %rdi
movl $0xbf3, %ecx            # imm = 0xBF3
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
jmp 0x75ec6
movl %r9d, %r15d
movq %rdi, %rbp
movq %rcx, 0x60(%rsp)
leaq 0x158(%r14), %r13
cmpw $0x1, 0x4c8(%r12)
jne 0x75c49
movslq 0x188(%r14), %rax
xorl %ecx, %ecx
movsd 0x6f65e(%rip), %xmm0    # 0xe5260
cmpq %rax, %rcx
jg 0x75c49
movl %ecx, %edi
imull %ecx, %edi
decl %edi
cvtsi2sd %edi, %xmm1
mulsd 0x318(%r12), %xmm1
divsd %xmm3, %xmm1
divsd %xmm3, %xmm1
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
xorpd %xmm1, %xmm1
maxsd %xmm2, %xmm1
sqrtsd %xmm1, %xmm1
movq 0x190(%r14), %rdi
movsd %xmm1, (%rdi,%rcx,8)
incq %rcx
jmp 0x75c02
movsd %xmm3, 0x30(%rsp)
movl %r8d, 0x14(%rsp)
movq %rdx, 0x48(%rsp)
movq %rsi, 0x70(%rsp)
movl 0x9f8(%rbx), %eax
movq %rax, 0x58(%rsp)
movq 0x450(%r12), %rax
movsd (%rax), %xmm0
movq 0x30(%r14), %r8
pushq $0x1
popq %rsi
movq %r12, %rdi
movsd %xmm0, 0x18(%rsp)
xorl %edx, %edx
movq %r13, %rcx
callq 0x5887d
cmpl $0x1, %eax
jne 0x75ce0
addq $0xd1c, %r12            # imm = 0xD1C
leaq 0x6f74e(%rip), %rsi     # 0xe53f0
leaq 0x96502(%rip), %rdx     # 0x10c1ab
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x6f368(%rip), %rsi     # 0xe5034
leaq 0x964c4(%rip), %rdx     # 0x10c197
movq %rbx, %rdi
movl $0xc0e, %ecx            # imm = 0xC0E
jmp 0x75d75
movq %r13, 0x8(%rsp)
leaq 0x15c(%r14), %rcx
movslq 0x380(%r12), %rax
movq 0x30(%r14), %r8
movq 0x38(%r14), %r9
movsd 0x6f55c(%rip), %xmm0    # 0xe5260
divsd (%r8,%rax,8), %xmm0
addsd 0x6fad6(%rip), %xmm0    # 0xe57e8
movq %r12, %rdi
movq 0x48(%rsp), %r13
movq %r13, %rsi
xorl %edx, %edx
movq %rcx, 0x40(%rsp)
callq 0x61ff8
cmpl $0x1, %eax
jne 0x75d7d
addq $0x1064, %r13           # imm = 0x1064
leaq 0x6f6b4(%rip), %rsi     # 0xe53f0
leaq 0x964cd(%rip), %rdx     # 0x10c210
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x6f2ce(%rip), %rsi     # 0xe5034
leaq 0x9642a(%rip), %rdx     # 0x10c197
movq %rbx, %rdi
movl $0xc18, %ecx            # imm = 0xC18
movq %r14, %r8
jmp 0x75ebc
movq 0x30(%r14), %rax
movq 0x38(%r14), %rcx
movslq 0x380(%r12), %rdx
movsd (%rax,%rdx,8), %xmm1
movslq 0x384(%r12), %rdx
movsd (%rax,%rdx,8), %xmm2
movapd %xmm1, %xmm0
mulsd %xmm2, %xmm0
movslq 0xe80(%r13), %rdx
divsd (%rcx,%rdx,8), %xmm0
ucomisd 0x568(%rbp), %xmm0
jbe 0x75e1b
leaq 0x964d9(%rip), %rsi     # 0x10c29d
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movb $0x1, %al
callq 0x2e014
leaq 0x6f2a5(%rip), %rsi     # 0xe5082
leaq 0x965ca(%rip), %rdx     # 0x10c3ae
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x6f22d(%rip), %rsi     # 0xe5034
leaq 0x96389(%rip), %rdx     # 0x10c197
movq %rbx, %rdi
movl $0xc23, %ecx            # imm = 0xC23
jmp 0x75eb9
movsd 0x30(%rsp), %xmm0
divsd %xmm1, %xmm0
divsd %xmm2, %xmm0
ucomisd 0x570(%rbp), %xmm0
jbe 0x75eda
movq 0x9c8(%rbx), %rax
movq 0x9d0(%rbx), %rcx
movq 0x60(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq (%rax,%rdx,4), %rax
movsd -0x8(%rcx,%rax,8), %xmm0
divsd %xmm1, %xmm0
divsd %xmm2, %xmm0
leaq 0x965d6(%rip), %rsi     # 0x10c43d
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movb $0x1, %al
callq 0x2e014
leaq 0x6f202(%rip), %rsi     # 0xe5082
leaq 0x966c7(%rip), %rdx     # 0x10c54e
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x6f18a(%rip), %rsi     # 0xe5034
leaq 0x962e6(%rip), %rdx     # 0x10c197
movq %rbx, %rdi
movl $0xc29, %ecx            # imm = 0xC29
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x1088, %rsp           # imm = 0x1088
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpw $0x1, 0x4be(%r12)
movq 0x8(%rsp), %r13
jne 0x75f52
movl 0x248(%r12), %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
movsd 0x73afe(%rip), %xmm3    # 0xe9a00
movapd 0x6f336(%rip), %xmm4    # 0xe5240
cmpl %edx, %ecx
je 0x75f52
movslq 0x3f0(%r12), %rsi
addq %rdx, %rsi
movsd (%rax,%rsi,8), %xmm1
movslq 0x3ec(%r12), %rsi
addq %rdx, %rsi
movsd (%rax,%rsi,8), %xmm2
movapd %xmm1, %xmm0
divsd %xmm2, %xmm0
movapd %xmm0, %xmm5
addsd %xmm3, %xmm5
andpd %xmm4, %xmm5
ucomisd 0x50(%rbp), %xmm5
ja 0x76226
incq %rdx
jmp 0x75f0a
movl %r15d, 0x2c(%rsp)
movslq 0x58(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x9f0(%rbx), %rax
movsd (%rax), %xmm2
movsd 0x18(%rsp), %xmm3
movapd %xmm3, %xmm0
addsd %xmm2, %xmm0
xorl %r15d, %r15d
mulsd 0x6fd2b(%rip), %xmm0    # 0xe5cb0
movapd %xmm2, %xmm1
subsd %xmm3, %xmm1
divsd %xmm3, %xmm1
ucomisd 0x618(%rbp), %xmm1
movsd %xmm0, 0x20(%rsp)
jbe 0x76121
movsd %xmm2, 0x38(%rsp)
movsd %xmm3, 0x18(%rsp)
movq 0x30(%r14), %r8
movq %r12, %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
movq %r13, %rcx
callq 0x5887d
cmpl $0x1, %eax
je 0x761da
cmpw $0x1, 0x4be(%r12)
jne 0x76044
movl 0x248(%r12), %eax
testl %eax, %eax
cmovlel %r15d, %eax
xorl %edx, %edx
pushq $0x1
popq %rcx
movsd 0x73a0b(%rip), %xmm1    # 0xe9a00
movapd 0x6f243(%rip), %xmm2    # 0xe5240
cmpl %edx, %eax
je 0x7603b
movq 0x30(%r14), %rsi
movslq 0x3f0(%r12), %rdi
addq %rdx, %rdi
movsd (%rsi,%rdi,8), %xmm0
movslq 0x3ec(%r12), %rdi
addq %rdx, %rdi
divsd (%rsi,%rdi,8), %xmm0
addsd %xmm1, %xmm0
andpd %xmm2, %xmm0
ucomisd 0x50(%rbp), %xmm0
cmoval %r15d, %ecx
incq %rdx
jmp 0x75ffd
cmpl $0x1, %ecx
jne 0x760f5
movslq 0x380(%r12), %rax
movq 0x30(%r14), %r8
movq 0x38(%r14), %r9
movsd 0x6f204(%rip), %xmm0    # 0xe5260
divsd (%r8,%rax,8), %xmm0
addsd 0x6f77e(%rip), %xmm0    # 0xe57e8
movq %r12, %rdi
movq 0x48(%rsp), %r13
movq %r13, %rsi
xorl %edx, %edx
movq 0x40(%rsp), %rcx
callq 0x61ff8
cmpl $0x1, %eax
je 0x76284
movslq 0x380(%r12), %rax
movq 0x30(%r14), %rcx
movq 0x38(%r14), %rdx
movsd (%rcx,%rax,8), %xmm0
movslq 0x384(%r12), %rax
movsd (%rcx,%rax,8), %xmm1
movapd %xmm0, %xmm2
mulsd %xmm1, %xmm2
movslq 0xe80(%r13), %rax
divsd (%rdx,%rax,8), %xmm2
ucomisd 0x568(%rbp), %xmm2
movsd 0x30(%rsp), %xmm2
movsd 0x18(%rsp), %xmm3
ja 0x760e8
divsd %xmm0, %xmm2
divsd %xmm1, %xmm2
ucomisd 0x570(%rbp), %xmm2
jbe 0x76103
movsd 0x20(%rsp), %xmm2
movq 0x8(%rsp), %r13
jmp 0x76114
movsd 0x20(%rsp), %xmm2
movsd 0x18(%rsp), %xmm3
jmp 0x76114
movsd 0x20(%rsp), %xmm3
movq 0x8(%rsp), %r13
movsd 0x38(%rsp), %xmm2
movapd %xmm2, %xmm0
addsd %xmm3, %xmm0
jmp 0x75f7d
movslq 0x178(%r14), %r13
leaq (,%r13,4), %rdi
callq 0x8490
testq %rax, %rax
je 0x762d0
movq %rax, %r15
andw $0x0, 0x154(%r14)
movq 0x9f0(%rbx), %rax
movq 0x68(%rsp), %rcx
movsd -0x8(%rax,%rcx,8), %xmm2
leaq 0x54(%rsp), %rax
movq %rbp, %rdi
movq %r12, %rsi
movq 0x48(%rsp), %rdx
movq %rbx, %rcx
movl 0x14(%rsp), %r8d
movsd 0x30(%rsp), %xmm0
movq %r14, %r9
movsd 0x20(%rsp), %xmm1
pushq %r15
pushq %rax
callq 0x76867
popq %rcx
popq %rdx
testl %eax, %eax
je 0x76319
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x6f24d(%rip), %rsi     # 0xe53f0
leaq 0x965c7(%rip), %rdx     # 0x10c771
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x6ee6e(%rip), %rsi     # 0xe5034
leaq 0x95fca(%rip), %rdx     # 0x10c197
movq %rbx, %rdi
movl $0xc86, %ecx            # imm = 0xC86
jmp 0x75d75
addq $0xd1c, %r12            # imm = 0xD1C
leaq 0x6f208(%rip), %rsi     # 0xe53f0
leaq 0x9650c(%rip), %rdx     # 0x10c6fb
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x6ee22(%rip), %rsi     # 0xe5034
leaq 0x95f7e(%rip), %rdx     # 0x10c197
movq %rbx, %rdi
movl $0xc48, %ecx            # imm = 0xC48
jmp 0x75d75
leaq 0x9638a(%rip), %rsi     # 0x10c5b7
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movb $0x3, %al
callq 0x2e014
leaq 0x6ee3c(%rip), %rsi     # 0xe5082
leaq 0x96430(%rip), %rdx     # 0x10c67d
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x6edc4(%rip), %rsi     # 0xe5034
leaq 0x95f20(%rip), %rdx     # 0x10c197
movq %rbx, %rdi
movl $0xc33, %ecx            # imm = 0xC33
jmp 0x75eb9
addq $0x1064, %r13           # imm = 0x1064
leaq 0x6f15e(%rip), %rsi     # 0xe53f0
leaq 0x95f77(%rip), %rdx     # 0x10c210
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x6ed78(%rip), %rsi     # 0xe5034
leaq 0x95ed4(%rip), %rdx     # 0x10c197
movq %rbx, %rdi
movl $0xc5d, %ecx            # imm = 0xC5D
jmp 0x75d75
shll $0x2, %r13d
leaq 0x6ed29(%rip), %rsi     # 0xe5004
leaq 0x9647c(%rip), %rdx     # 0x10c75e
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x6ed2f(%rip), %rsi     # 0xe5034
leaq 0x95e8b(%rip), %rdx     # 0x10c197
movq %rbx, %rdi
movl $0xc76, %ecx            # imm = 0xC76
jmp 0x75d75
movslq 0x54(%rsp), %r13
leaq 0x8(,%r13,8), %rdi
callq 0x8490
testq %rax, %rax
je 0x763f8
movq %rax, 0x38(%rsp)
leaq (,%r13,8), %rdi
callq 0x8490
testq %rax, %rax
je 0x76442
movq %rax, %r10
movq %r15, 0x78(%rsp)
xorl %r15d, %r15d
testl %r13d, %r13d
movl $0x0, %eax
cmovgl %r13d, %eax
movq %rax, 0x8(%rsp)
movq %r10, 0x18(%rsp)
movq %r13, %r11
cmpq %r15, 0x8(%rsp)
je 0x7648b
movslq 0x178(%r14), %rax
movq %rax, 0x40(%rsp)
leaq (,%rax,4), %rdi
movq %r11, %r13
callq 0x8490
movq %r13, %r11
movq 0x18(%rsp), %r10
movq %rax, (%r10,%r15,8)
incq %r15
testq %rax, %rax
jne 0x76373
movq 0x40(%rsp), %rcx
shll $0x2, %ecx
leaq 0x6ec47(%rip), %rsi     # 0xe5004
leaq 0x9645c(%rip), %rdx     # 0x10c820
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x6ec50(%rip), %rsi     # 0xe5034
leaq 0x95dac(%rip), %rdx     # 0x10c197
movq %rbx, %rdi
movl $0xc8d, %ecx            # imm = 0xC8D
jmp 0x75d75
leal 0x8(,%r13,8), %ecx
leaq 0x6ebfd(%rip), %rsi     # 0xe5004
leaq 0x8fb92(%rip), %rdx     # 0x105fa0
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x6ec06(%rip), %rsi     # 0xe5034
leaq 0x95d62(%rip), %rdx     # 0x10c197
movq %rbx, %rdi
movl $0xc88, %ecx            # imm = 0xC88
jmp 0x75d75
shll $0x3, %r13d
leaq 0x6ebb7(%rip), %rsi     # 0xe5004
leaq 0x963bc(%rip), %rdx     # 0x10c810
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x2e014
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x6ebbd(%rip), %rsi     # 0xe5034
leaq 0x95d19(%rip), %rdx     # 0x10c197
movq %rbx, %rdi
movl $0xc8a, %ecx            # imm = 0xC8A
jmp 0x75d75
movq 0x9f0(%rbx), %rax
movq 0x68(%rsp), %rcx
movsd -0x8(%rax,%rcx,8), %xmm2
movsd 0x618(%rbp), %xmm3
movq %rbp, %rdi
movq %r12, %rsi
movq 0x48(%rsp), %r15
movq %r15, %rdx
movq %rbx, %rcx
movl 0x14(%rsp), %r8d
movsd 0x30(%rsp), %xmm0
movq %r14, %r9
movsd 0x20(%rsp), %xmm1
pushq %r10
pushq 0x40(%rsp)
movq 0x88(%rsp), %r13
pushq %r13
pushq %r11
callq 0x76a7e
addq $0x20, %rsp
testl %eax, %eax
je 0x7652e
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x6eef9(%rip), %rsi     # 0xe53f0
leaq 0x96342(%rip), %rdx     # 0x10c840
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x6eb1a(%rip), %rsi     # 0xe5034
leaq 0x95c76(%rip), %rdx     # 0x10c197
movq %rbx, %rdi
movl $0xc9e, %ecx            # imm = 0xC9E
jmp 0x75d75
movq %r13, %rdi
callq 0x8430
movq %rbp, 0x880(%rsp)
movq %r12, 0x888(%rsp)
movq %r15, 0x890(%rsp)
movq %rbx, 0x898(%rsp)
movl 0x14(%rsp), %ecx
movl %ecx, 0x8a0(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x8a4(%rsp)
movq 0x70(%rsp), %r8
movl %r8d, 0x8a8(%rsp)
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x8b0(%rsp)
movq %r14, 0x8b8(%rsp)
movw $0x1, 0x154(%r14)
andq $0x0, 0x158(%r14)
orl $-0x1, 0x150(%r14)
movl 0x6d4(%rbx), %eax
movl %eax, %edx
imull %ecx, %edx
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
movslq %edx, %rdx
shlq $0x2, %rdx
leaq 0xebc(%rip), %rsi       # 0x77486
xorl %r9d, %r9d
cmpq %rcx, %rax
je 0x765f1
movq 0xa78(%rbx), %rdi
addq %rdx, %rdi
cmpl %r8d, (%rdi,%rcx,4)
jne 0x765ec
movl %ecx, 0x150(%r14)
movq %rsi, %r9
incq %rcx
jmp 0x765cd
movq %r9, 0x40(%rsp)
leaq 0x6c8a(%rbx), %rax
movq %rax, 0x8(%rsp)
xorl %r15d, %r15d
movq 0x38(%rsp), %r13
movslq 0x54(%rsp), %rax
cmpq %rax, %r15
movq 0x48(%rsp), %rdx
movl 0x14(%rsp), %r8d
movsd 0x30(%rsp), %xmm0
movq 0x18(%rsp), %rdi
jge 0x76767
xorl %eax, %eax
movslq 0x178(%r14), %rcx
cmpq %rcx, %rax
jge 0x76651
movq (%rdi,%r15,8), %rcx
movl (%rcx,%rax,4), %ecx
movq 0x180(%r14), %rsi
movl %ecx, (%rsi,%rax,4)
incq %rax
jmp 0x7662f
testq %r15, %r15
je 0x7665d
movq -0x8(%rdi,%r15,8), %rax
jmp 0x7665f
xorl %eax, %eax
movsd (%r13,%r15,8), %xmm1
movq %rbp, %rdi
movq %r12, %rsi
movq %rbx, %rcx
movl 0x2c(%rsp), %r9d
movsd %xmm1, 0x20(%rsp)
pushq %rax
pushq %r14
callq 0x79e0f
popq %rcx
popq %rdx
testl %eax, %eax
jne 0x76821
cmpl $0x0, 0x678(%rbp)
leaq -0x6a8be(%rip), %rax    # 0xbddc
jne 0x766a3
leaq -0x6af53(%rip), %rax    # 0xb750
movsd 0x8(%r13,%r15,8), %xmm1
incq %r15
movq 0x48(%r14), %rcx
movq 0xf0(%rcx), %rsi
movq 0x100(%rcx), %rdx
movl 0xe8(%rcx), %ecx
movsd 0x5f0(%rbp), %xmm4
movsd 0x608(%rbp), %xmm2
movsd 0xa28(%rbp), %xmm3
subq $0x8, %rsp
leaq 0x7046(%rip), %rdi      # 0x7d72e
movsd 0x28(%rsp), %xmm0
leaq 0x888(%rsp), %r8
leaq 0xc5ad(%rip), %r9       # 0x82caa
pushq 0x10(%rsp)
pushq 0x50(%rsp)
pushq 0xcc865(%rip)           # 0x142f70
pushq 0x78(%rsp)
pushq 0x9f0(%rbx)
callq *%rax
addq $0x30, %rsp
cmpl $0x1, %eax
jne 0x7660a
leaq 0x6ecc5(%rip), %rsi     # 0xe53f0
leaq 0x9625f(%rip), %rdx     # 0x10c991
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x6e8e1(%rip), %rsi     # 0xe5034
leaq 0x95a3d(%rip), %rdx     # 0x10c197
movq %r14, %rdi
movl $0xd02, %ecx            # imm = 0xD02
jmp 0x7685f
movq %rax, %r12
movl 0x9f8(%rbx), %eax
xorl %ecx, %ecx
movl 0x2c(%rsp), %r9d
movq 0x70(%rsp), %r11
movq 0x58(%rsp), %r15
movq 0x60(%rsp), %r10
cmpl %eax, %r15d
jge 0x767e1
movq 0x998(%rbx), %rdx
movq 0x60(%rsp), %rsi
movl (%rdx,%rsi,4), %edx
movl %edx, %esi
imull %r9d, %esi
movslq %esi, %rsi
testl %edx, %edx
cmovlel %ecx, %edx
subq $0x1, %rdx
jb 0x767dc
movq 0x9c8(%rbx), %rdi
movq 0xa38(%rbx), %r8
movq (%r8,%r10,8), %r8
movq (%r8,%rsi,8), %r8
movl (%rdi,%r10,4), %edi
imull %r15d, %edi
addl %r11d, %edi
movslq %edi, %rdi
andq $0x0, (%r8,%rdi,8)
incq %rsi
jmp 0x767a8
incl %r15d
jmp 0x76786
movq 0x48(%r14), %rdi
callq 0x85bd5
xorl %ebx, %ebx
testl %r12d, %r12d
cmovlel %ebx, %r12d
cmpq %rbx, %r12
movq 0x18(%rsp), %rdi
je 0x7680b
movq (%rdi,%rbx,8), %rdi
callq 0x8430
incq %rbx
jmp 0x767f3
callq 0x8430
movq 0x38(%rsp), %rdi
callq 0x8430
xorl %ebp, %ebp
jmp 0x75ec6
leaq 0x6ebc8(%rip), %rsi     # 0xe53f0
leaq 0x960e7(%rip), %rdx     # 0x10c916
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x6e7e4(%rip), %rsi     # 0xe5034
leaq 0x95940(%rip), %rdx     # 0x10c197
movq %r14, %rdi
movl $0xce5, %ecx            # imm = 0xCE5
movq %rbx, %r8
jmp 0x75ebc