// File: /workspace/github_c_makefile_star2_O3/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
movslq 0x10c0(%rsp), %rcx
movq 0x10c8(%rsp), %r14
movq $0x0, 0x158(%r14)
movw $0x0, 0x154(%r14)
movq 0x9d0(%rbx), %rax
movslq %r8d, %rbp
movq (%rax,%rbp,8), %rax
movsd (%rax,%rcx,8), %xmm3
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm3
jne 0x7a487
jp 0x7a487
leaq 0x7592d(%rip), %rsi     # 0xefd3d
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0x73c59(%rip), %rsi     # 0xee082
leaq 0x9d2d9(%rip), %rdx     # 0x117709
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x73be1(%rip), %rsi     # 0xee034
leaq 0x9ae9d(%rip), %rdx     # 0x1152f7
movq %rbx, %rdi
movl $0xbf3, %ecx            # imm = 0xBF3
movq %r15, %r8
xorl %eax, %eax
callq 0x30af0
movl $0x1, %r15d
movl %r15d, %eax
addq $0x1088, %rsp           # imm = 0x1088
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r9d, %r13d
movq %rsi, %r12
movq %rdi, 0x28(%rsp)
movl %r8d, 0x14(%rsp)
movq %rdx, 0x48(%rsp)
movq %rcx, 0x68(%rsp)
leaq 0x158(%r14), %rcx
cmpw $0x1, 0x4c8(%rsi)
jne 0x7a512
movl 0x188(%r14), %eax
testl %eax, %eax
js 0x7a512
movq 0x190(%r14), %rdi
incq %rax
xorl %edx, %edx
movsd 0x73d8f(%rip), %xmm0    # 0xee260
movl %edx, %esi
imull %edx, %esi
decl %esi
xorps %xmm1, %xmm1
cvtsi2sd %esi, %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
movsd %xmm1, (%rdi,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x7a4d1
movsd %xmm3, 0x40(%rsp)
movl 0x9f8(%rbx), %eax
movq %rax, 0x60(%rsp)
movq 0x450(%r12), %rax
movsd (%rax), %xmm0
movq 0x30(%r14), %r8
movl $0x1, %r15d
movq %r12, %rdi
movsd %xmm0, 0x20(%rsp)
movl $0x1, %esi
xorl %edx, %edx
movq %rcx, 0x8(%rsp)
callq 0x5c63f
cmpl $0x1, %eax
jne 0x7a5ae
addq $0xd1c, %r12            # imm = 0xD1C
leaq 0x73e8a(%rip), %rsi     # 0xee3f0
leaq 0x9ad9e(%rip), %rdx     # 0x11530b
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x73aa4(%rip), %rsi     # 0xee034
leaq 0x9ad60(%rip), %rdx     # 0x1152f7
movq %rbx, %rdi
movl $0xc0e, %ecx            # imm = 0xC0E
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
jmp 0x7a472
leaq 0x15c(%r14), %rcx
movslq 0x380(%r12), %rax
movq 0x30(%r14), %r8
movq 0x38(%r14), %r9
movsd 0x73c93(%rip), %xmm0    # 0xee260
divsd (%r8,%rax,8), %xmm0
addsd 0x7420d(%rip), %xmm0    # 0xee7e8
movq %r12, %rdi
movq 0x48(%rsp), %r15
movq %r15, %rsi
xorl %edx, %edx
movq %rcx, 0x30(%rsp)
callq 0x662ac
cmpl $0x1, %eax
jne 0x7a646
addq $0x1064, %r15           # imm = 0x1064
leaq 0x73deb(%rip), %rsi     # 0xee3f0
leaq 0x9ad64(%rip), %rdx     # 0x115370
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x73a05(%rip), %rsi     # 0xee034
leaq 0x9acc1(%rip), %rdx     # 0x1152f7
movq %rbx, %rdi
movl $0xc18, %ecx            # imm = 0xC18
movq %r14, %r8
jmp 0x7a465
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(%r15), %rdx
divsd (%rcx,%rdx,8), %xmm0
movq 0x28(%rsp), %r8
ucomisd 0x568(%r8), %xmm0
jbe 0x7a6ea
leaq 0x9ad6a(%rip), %rsi     # 0x1153fd
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movb $0x1, %al
callq 0x30af0
leaq 0x739d6(%rip), %rsi     # 0xee082
leaq 0x9ae5b(%rip), %rdx     # 0x11550e
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x7395e(%rip), %rsi     # 0xee034
leaq 0x9ac1a(%rip), %rdx     # 0x1152f7
movq %rbx, %rdi
movl $0xc23, %ecx            # imm = 0xC23
jmp 0x7a462
movsd 0x40(%rsp), %xmm0
divsd %xmm1, %xmm0
divsd %xmm2, %xmm0
ucomisd 0x570(%r8), %xmm0
jbe 0x7a789
movq 0x9c8(%rbx), %rax
movq 0x9d0(%rbx), %rcx
movq (%rcx,%rbp,8), %rcx
movslq (%rax,%rbp,4), %rax
movsd -0x8(%rcx,%rax,8), %xmm0
divsd %xmm1, %xmm0
divsd %xmm2, %xmm0
leaq 0x9ae6b(%rip), %rsi     # 0x11559d
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movb $0x1, %al
callq 0x30af0
leaq 0x73937(%rip), %rsi     # 0xee082
leaq 0x9af5c(%rip), %rdx     # 0x1156ae
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x738bf(%rip), %rsi     # 0xee034
leaq 0x9ab7b(%rip), %rdx     # 0x1152f7
movq %rbx, %rdi
movl $0xc29, %ecx            # imm = 0xC29
jmp 0x7a462
cmpw $0x1, 0x4be(%r12)
movq 0x8(%rsp), %rcx
jne 0x7a807
movslq 0x248(%r12), %r9
testq %r9, %r9
jle 0x7a807
movslq 0x3f0(%r12), %rdx
movslq 0x3ec(%r12), %rdi
movsd 0x50(%r8), %xmm3
leaq (%rax,%rdx,8), %rsi
leaq (%rax,%rdi,8), %rax
xorl %edx, %edx
movsd 0x78371(%rip), %xmm4    # 0xf2b40
movapd 0x73a69(%rip), %xmm5    # 0xee240
movsd (%rsi,%rdx,8), %xmm1
movsd (%rax,%rdx,8), %xmm2
movapd %xmm1, %xmm0
divsd %xmm2, %xmm0
movapd %xmm0, %xmm6
addsd %xmm4, %xmm6
andpd %xmm5, %xmm6
ucomisd %xmm3, %xmm6
ja 0x7ab1a
incq %rdx
cmpq %rdx, %r9
jne 0x7a7d7
movq 0x9f0(%rbx), %rax
movsd (%rax), %xmm3
movsd 0x20(%rsp), %xmm1
movapd %xmm1, %xmm0
addsd %xmm3, %xmm0
mulsd 0x744a8(%rip), %xmm0    # 0xeecd0
movapd %xmm3, %xmm2
subsd %xmm1, %xmm2
divsd %xmm1, %xmm2
ucomisd 0x618(%r8), %xmm2
jbe 0x7aa0a
xorl %r15d, %r15d
movsd %xmm3, 0x38(%rsp)
movq 0x30(%r14), %r8
movq %r12, %rdi
movsd %xmm0, 0x18(%rsp)
movl $0x1, %esi
xorl %edx, %edx
callq 0x5c63f
cmpl $0x1, %eax
je 0x7ab78
cmpw $0x1, 0x4be(%r12)
jne 0x7a8ef
movslq 0x248(%r12), %rax
testq %rax, %rax
jle 0x7a8ef
movq 0x30(%r14), %rdx
movslq 0x3f0(%r12), %rcx
movslq 0x3ec(%r12), %rsi
movq 0x28(%rsp), %rdi
movsd 0x50(%rdi), %xmm0
leaq (%rdx,%rcx,8), %rcx
leaq (%rdx,%rsi,8), %rsi
movl $0x1, %edx
xorl %edi, %edi
movsd 0x78284(%rip), %xmm2    # 0xf2b40
movapd 0x7397c(%rip), %xmm3    # 0xee240
movsd (%rcx,%rdi,8), %xmm1
divsd (%rsi,%rdi,8), %xmm1
addsd %xmm2, %xmm1
andpd %xmm3, %xmm1
ucomisd %xmm0, %xmm1
cmoval %r15d, %edx
incq %rdi
cmpq %rdi, %rax
jne 0x7a8c4
cmpl $0x1, %edx
jne 0x7a9f8
movl %r13d, %r15d
movq %rbp, %r13
movslq 0x380(%r12), %rax
movq 0x30(%r14), %r8
movq 0x38(%r14), %r9
movsd 0x73953(%rip), %xmm0    # 0xee260
divsd (%r8,%rax,8), %xmm0
addsd 0x73ecd(%rip), %xmm0    # 0xee7e8
movq %r12, %rdi
movq 0x48(%rsp), %rbp
movq %rbp, %rsi
xorl %edx, %edx
movq 0x30(%rsp), %rcx
callq 0x662ac
cmpl $0x1, %eax
je 0x7acf7
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(%rbp), %rax
divsd (%rdx,%rax,8), %xmm2
movq 0x28(%rsp), %rax
ucomisd 0x568(%rax), %xmm2
movq 0x8(%rsp), %rcx
ja 0x7a99d
movsd 0x40(%rsp), %xmm2
divsd %xmm0, %xmm2
divsd %xmm1, %xmm2
ucomisd 0x570(%rax), %xmm2
jbe 0x7a9ab
movsd 0x18(%rsp), %xmm3
movq %r13, %rbp
movl %r15d, %r13d
jmp 0x7a9c3
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movq %r13, %rbp
movl %r15d, %r13d
movsd 0x38(%rsp), %xmm3
xorl %r15d, %r15d
movapd %xmm3, %xmm0
movsd 0x20(%rsp), %xmm1
addsd %xmm1, %xmm0
mulsd 0x742f4(%rip), %xmm0    # 0xeecd0
movapd %xmm3, %xmm2
subsd %xmm1, %xmm2
divsd %xmm1, %xmm2
ucomisd 0x618(%rax), %xmm2
ja 0x7a846
jmp 0x7aa0a
movsd 0x18(%rsp), %xmm3
movq 0x28(%rsp), %rax
movq 0x8(%rsp), %rcx
jmp 0x7a9c6
movsd %xmm0, 0x18(%rsp)
movslq 0x178(%r14), %r15
leaq (,%r15,4), %rdi
callq 0x8460
testq %rax, %rax
je 0x7aad1
movslq 0x60(%rsp), %r15
movw $0x0, 0x154(%r14)
movq 0x9f0(%rbx), %rcx
movsd -0x8(%rcx,%r15,8), %xmm2
leaq 0x5c(%rsp), %r10
movq 0x28(%rsp), %rdi
movq %r12, %rsi
movq 0x48(%rsp), %rdx
movq %rbx, %rcx
movl 0x14(%rsp), %r8d
movsd 0x40(%rsp), %xmm0
movq %r14, %r9
movsd 0x18(%rsp), %xmm1
pushq %rax
pushq %r10
movq %rax, 0x60(%rsp)
callq 0x7b19d
addq $0x10, %rsp
testl %eax, %eax
je 0x7abc4
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x73956(%rip), %rsi     # 0xee3f0
leaq 0x9ae30(%rip), %rdx     # 0x1158d1
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x73577(%rip), %rsi     # 0xee034
leaq 0x9a833(%rip), %rdx     # 0x1152f7
movq %rbx, %rdi
movl $0xc86, %ecx            # imm = 0xC86
jmp 0x7a63e
shll $0x2, %r15d
leaq 0x73528(%rip), %rsi     # 0xee004
leaq 0x9addb(%rip), %rdx     # 0x1158be
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x7352e(%rip), %rsi     # 0xee034
leaq 0x9a7ea(%rip), %rdx     # 0x1152f7
movq %rbx, %rdi
movl $0xc76, %ecx            # imm = 0xC76
jmp 0x7a63e
leaq 0x9abf6(%rip), %rsi     # 0x115717
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movb $0x3, %al
callq 0x30af0
leaq 0x73548(%rip), %rsi     # 0xee082
leaq 0x9ac9c(%rip), %rdx     # 0x1157dd
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x734d0(%rip), %rsi     # 0xee034
leaq 0x9a78c(%rip), %rdx     # 0x1152f7
movq %rbx, %rdi
movl $0xc33, %ecx            # imm = 0xC33
jmp 0x7a462
addq $0xd1c, %r12            # imm = 0xD1C
leaq 0x7386a(%rip), %rsi     # 0xee3f0
leaq 0x9acce(%rip), %rdx     # 0x11585b
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x73484(%rip), %rsi     # 0xee034
leaq 0x9a740(%rip), %rdx     # 0x1152f7
movq %rbx, %rdi
movl $0xc48, %ecx            # imm = 0xC48
jmp 0x7a63e
movq %r15, 0x78(%rsp)
movslq 0x5c(%rsp), %r15
leaq 0x8(,%r15,8), %rdi
callq 0x8460
testq %rax, %rax
je 0x7ad43
movq %rax, 0x38(%rsp)
leaq (,%r15,8), %rdi
callq 0x8460
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x7ad8d
testl %r15d, %r15d
movq %r15, %r10
jle 0x7ac52
movslq 0x178(%r14), %rcx
movq %rcx, 0x70(%rsp)
shlq $0x2, %rcx
movq %rcx, 0x8(%rsp)
xorl %r15d, %r15d
movq %r10, 0x30(%rsp)
movq 0x8(%rsp), %rdi
callq 0x8460
movq 0x20(%rsp), %rcx
movq %rax, (%rcx,%r15,8)
testq %rax, %rax
je 0x7add6
incq %r15
movq 0x30(%rsp), %r10
cmpq %r15, %r10
jne 0x7ac29
movq 0x9f0(%rbx), %rax
movq 0x78(%rsp), %rcx
movsd -0x8(%rax,%rcx,8), %xmm2
movq 0x28(%rsp), %rdi
movsd 0x618(%rdi), %xmm3
movq %r12, %rsi
movq 0x48(%rsp), %rdx
movq %rbx, %rcx
movl 0x14(%rsp), %r8d
movsd 0x40(%rsp), %xmm0
movq %r14, %r9
movsd 0x18(%rsp), %xmm1
pushq 0x20(%rsp)
pushq 0x40(%rsp)
movq 0x60(%rsp), %r15
pushq %r15
pushq %r10
callq 0x7b3bd
addq $0x20, %rsp
testl %eax, %eax
je 0x7ae24
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x73730(%rip), %rsi     # 0xee3f0
leaq 0x9acd9(%rip), %rdx     # 0x1159a0
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x73351(%rip), %rsi     # 0xee034
leaq 0x9a60d(%rip), %rdx     # 0x1152f7
movq %rbx, %rdi
movl $0xc9e, %ecx            # imm = 0xC9E
jmp 0x7a63e
addq $0x1064, %rbp           # imm = 0x1064
leaq 0x736eb(%rip), %rsi     # 0xee3f0
leaq 0x9a664(%rip), %rdx     # 0x115370
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x73305(%rip), %rsi     # 0xee034
leaq 0x9a5c1(%rip), %rdx     # 0x1152f7
movq %rbx, %rdi
movl $0xc5d, %ecx            # imm = 0xC5D
jmp 0x7a63e
leal 0x8(,%r15,8), %ecx
leaq 0x732b2(%rip), %rsi     # 0xee004
leaq 0x943a7(%rip), %rdx     # 0x10f100
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x732bb(%rip), %rsi     # 0xee034
leaq 0x9a577(%rip), %rdx     # 0x1152f7
movq %rbx, %rdi
movl $0xc88, %ecx            # imm = 0xC88
jmp 0x7a63e
shll $0x3, %r15d
leaq 0x7326c(%rip), %rsi     # 0xee004
leaq 0x9abd1(%rip), %rdx     # 0x115970
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x73272(%rip), %rsi     # 0xee034
leaq 0x9a52e(%rip), %rdx     # 0x1152f7
movq %rbx, %rdi
movl $0xc8a, %ecx            # imm = 0xC8A
jmp 0x7a63e
movq 0x70(%rsp), %rax
leal (,%rax,4), %ecx
leaq 0x7321b(%rip), %rsi     # 0xee004
leaq 0x9ab90(%rip), %rdx     # 0x115980
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x73224(%rip), %rsi     # 0xee034
leaq 0x9a4e0(%rip), %rdx     # 0x1152f7
movq %rbx, %rdi
movl $0xc8d, %ecx            # imm = 0xC8D
jmp 0x7a63e
movq %r15, %rdi
callq 0x8410
movq 0x28(%rsp), %rax
movq %rax, 0x880(%rsp)
movq %r12, 0x888(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x890(%rsp)
movq %rbx, 0x898(%rsp)
movl 0x14(%rsp), %edx
movl %edx, 0x8a0(%rsp)
movl %r13d, 0x8a4(%rsp)
movq 0x68(%rsp), %rdi
movl %edi, 0x8a8(%rsp)
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x8b0(%rsp)
movq %r14, 0x8b8(%rsp)
movw $0x1, 0x154(%r14)
movq $0x0, 0x158(%r14)
movl $0xffffffff, 0x150(%r14) # imm = 0xFFFFFFFF
movslq 0x6d4(%rbx), %rax
testq %rax, %rax
jle 0x7aefd
movl %eax, %ecx
imull %edx, %ecx
movslq %ecx, %rcx
shlq $0x2, %rcx
addq 0xa78(%rbx), %rcx
xorl %edx, %edx
leaq 0x100e(%rip), %rsi      # 0x7bee2
movq $0x0, 0x30(%rsp)
movq 0x60(%rsp), %r15
cmpl %edi, (%rcx,%rdx,4)
jne 0x7aef3
movl %edx, 0x150(%r14)
movq %rsi, 0x30(%rsp)
incq %rdx
cmpq %rdx, %rax
jne 0x7aee2
jmp 0x7af0b
movq $0x0, 0x30(%rsp)
movq 0x60(%rsp), %r15
leaq 0x6c8a(%rbx), %rax
movq %rax, 0x50(%rsp)
xorl %r9d, %r9d
movslq 0x5c(%rsp), %rax
cmpq %rax, %r9
jge 0x7b0aa
cmpl $0x0, 0x178(%r14)
movq 0x28(%rsp), %r15
movq 0x20(%rsp), %r8
jle 0x7af5e
movq (%r8,%r9,8), %rax
movq 0x180(%r14), %rcx
xorl %edx, %edx
movl (%rax,%rdx,4), %esi
movl %esi, (%rcx,%rdx,4)
incq %rdx
movslq 0x178(%r14), %rsi
cmpq %rsi, %rdx
jl 0x7af49
testq %r9, %r9
movq 0x38(%rsp), %rcx
je 0x7af6f
movq -0x8(%r8,%r9,8), %rax
jmp 0x7af71
xorl %eax, %eax
movq %r9, 0x8(%rsp)
movsd (%rcx,%r9,8), %xmm1
movq %r15, %rdi
movq %r12, %rsi
movq 0x48(%rsp), %rdx
movq %rbx, %rcx
movl 0x14(%rsp), %r8d
movl %r13d, %r9d
movsd %xmm1, 0x18(%rsp)
pushq %rax
pushq %r14
callq 0x7e924
addq $0x10, %rsp
testl %eax, %eax
jne 0x7b157
cmpl $0x0, 0x678(%r15)
leaq -0x6d903(%rip), %rax    # 0xd6b8
jne 0x7afc4
leaq -0x6df94(%rip), %rax    # 0xd030
movq 0x38(%rsp), %rcx
movq 0x8(%rsp), %rdx
movsd 0x8(%rcx,%rdx,8), %xmm1
incq %rdx
movq %rdx, 0x8(%rsp)
movq 0x48(%r14), %rcx
movq 0xf0(%rcx), %rsi
movq 0x100(%rcx), %rdx
movl 0xe8(%rcx), %ecx
movsd 0x5f0(%r15), %xmm4
movsd 0x608(%r15), %xmm2
movsd 0xa28(%r15), %xmm3
subq $0x8, %rsp
leaq 0x768f(%rip), %rdi      # 0x826a9
movsd 0x20(%rsp), %xmm0
leaq 0x888(%rsp), %r8
leaq 0xce7b(%rip), %r9       # 0x87eaa
pushq 0x58(%rsp)
pushq 0x40(%rsp)
pushq 0xcdf33(%rip)           # 0x148f70
movq 0x80(%rsp), %r15
pushq %r15
pushq 0x9f0(%rbx)
callq *%rax
movq 0x38(%rsp), %r9
addq $0x30, %rsp
cmpl $0x1, %eax
movsd 0x40(%rsp), %xmm0
jne 0x7af1a
leaq 0x73382(%rip), %rsi     # 0xee3f0
leaq 0x9aa7c(%rip), %rdx     # 0x115af1
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
movq 0x50(%rsp), %r14
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x72f9e(%rip), %rsi     # 0xee034
leaq 0x9a25a(%rip), %rdx     # 0x1152f7
movq %r14, %rdi
movl $0xd02, %ecx            # imm = 0xD02
jmp 0x7b195
movq %rax, %r12
movl 0x9f8(%rbx), %eax
cmpl %eax, %r15d
movq 0x68(%rsp), %r10
jge 0x7b117
movq 0x998(%rbx), %rcx
movl (%rcx,%rbp,4), %ecx
imull %ecx, %r13d
movslq %r13d, %rdx
shlq $0x3, %rdx
testl %ecx, %ecx
jle 0x7b10f
movq 0x9c8(%rbx), %rsi
movq 0xa38(%rbx), %rdi
movl (%rsi,%rbp,4), %esi
imull %r15d, %esi
addl %r10d, %esi
movslq %esi, %rsi
movq (%rdi,%rbp,8), %rdi
addq %rdx, %rdi
xorl %r8d, %r8d
movq (%rdi,%r8,8), %r9
movq $0x0, (%r9,%rsi,8)
incq %r8
cmpq %r8, %rcx
jne 0x7b0fb
incl %r15d
cmpl %eax, %r15d
jne 0x7b0d2
movq 0x48(%r14), %rdi
callq 0x8aacb
testl %r12d, %r12d
movq 0x20(%rsp), %r14
jle 0x7b13d
xorl %ebx, %ebx
movq (%r14,%rbx,8), %rdi
callq 0x8410
incq %rbx
cmpq %rbx, %r12
jne 0x7b12c
movq %r14, %rdi
callq 0x8410
movq 0x38(%rsp), %rdi
callq 0x8410
xorl %r15d, %r15d
jmp 0x7a472
leaq 0x73292(%rip), %rsi     # 0xee3f0
leaq 0x9a911(%rip), %rdx     # 0x115a76
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
movq 0x50(%rsp), %r14
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x72eae(%rip), %rsi     # 0xee034
leaq 0x9a16a(%rip), %rdx     # 0x1152f7
movq %r14, %rdi
movl $0xce5, %ecx            # imm = 0xCE5
movq %rbx, %r8
jmp 0x7a465