// File: /workspace/github_c_makefile_star2_O1/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, %r15
movq (%rax,%r15,8), %rax
movsd (%rax,%rcx,8), %xmm2
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
jne 0x7d023
jp 0x7d023
leaq 0x75d7f(%rip), %rsi     # 0xf2d2d
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x740bb(%rip), %rsi     # 0xf1082
leaq 0x9d6fb(%rip), %rdx     # 0x11a6c9
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x74043(%rip), %rsi     # 0xf1034
leaq 0x9b2bf(%rip), %rdx     # 0x1182b7
movq %rbx, %rdi
movl $0xbf3, %ecx            # imm = 0xBF3
movq %r15, %r8
xorl %eax, %eax
callq 0x30c2c
movl $0x1, %ebp
movl %ebp, %eax
addq $0x1088, %rsp           # imm = 0x1088
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r8d, %r13d
movq %rsi, %r12
movq %rdi, 0x10(%rsp)
movl %r9d, 0x44(%rsp)
movq %rdx, 0x48(%rsp)
movq %rcx, 0x68(%rsp)
leaq 0x158(%r14), %rax
movq %rax, 0x20(%rsp)
cmpw $0x1, 0x4c8(%rsi)
movsd %xmm2, 0x38(%rsp)
jne 0x7d0eb
cmpl $0x0, 0x188(%r14)
js 0x7d0eb
xorl %ebp, %ebp
movsd 0x741eb(%rip), %xmm3    # 0xf1260
xorpd %xmm4, %xmm4
movl %ebp, %eax
imull %ebp, %eax
decl %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x318(%r12), %xmm0
divsd %xmm2, %xmm0
divsd %xmm2, %xmm0
movapd %xmm3, %xmm1
subsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
maxsd %xmm1, %xmm0
ucomisd %xmm4, %xmm0
jb 0x7d0b5
sqrtsd %xmm0, %xmm0
jmp 0x7d0cc
callq 0x82b0
xorpd %xmm4, %xmm4
movsd 0x7419a(%rip), %xmm3    # 0xf1260
movsd 0x38(%rsp), %xmm2
movq 0x190(%r14), %rax
movsd %xmm0, (%rax,%rbp,8)
leaq 0x1(%rbp), %rax
movslq 0x188(%r14), %rcx
cmpq %rcx, %rbp
movq %rax, %rbp
jl 0x7d079
movl 0x9f8(%rbx), %eax
movq %rax, 0x58(%rsp)
movq 0x450(%r12), %rax
movsd (%rax), %xmm0
movq 0x30(%r14), %r8
movl $0x1, %ebp
movq %r12, %rdi
movsd %xmm0, 0x8(%rsp)
movl $0x1, %esi
xorl %edx, %edx
movq 0x20(%rsp), %rcx
callq 0x5ed53
cmpl $0x1, %eax
jne 0x7d180
addq $0xd1c, %r12            # imm = 0xD1C
leaq 0x742b8(%rip), %rsi     # 0xf13f0
leaq 0x9b18c(%rip), %rdx     # 0x1182cb
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x73ed2(%rip), %rsi     # 0xf1034
leaq 0x9b14e(%rip), %rdx     # 0x1182b7
movq %rbx, %rdi
movl $0xc0e, %ecx            # imm = 0xC0E
movq %r14, %r8
xorl %eax, %eax
callq 0x30c2c
jmp 0x7d00f
movq %r15, 0x60(%rsp)
leaq 0x15c(%r14), %rbp
movslq 0x380(%r12), %rax
movq 0x30(%r14), %r8
movq 0x38(%r14), %r9
movsd 0x740bc(%rip), %xmm0    # 0xf1260
divsd (%r8,%rax,8), %xmm0
addsd 0x74636(%rip), %xmm0    # 0xf17e8
movq %r12, %rdi
movq 0x48(%rsp), %r15
movq %r15, %rsi
xorl %edx, %edx
movq %rbp, %rcx
callq 0x68bbc
cmpl $0x1, %eax
jne 0x7d21b
addq $0x1064, %r15           # imm = 0x1064
leaq 0x74216(%rip), %rsi     # 0xf13f0
leaq 0x9b14f(%rip), %rdx     # 0x118330
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x73e30(%rip), %rsi     # 0xf1034
leaq 0x9b0ac(%rip), %rdx     # 0x1182b7
movq %rbx, %rdi
movl $0xc18, %ecx            # imm = 0xC18
movq %r14, %r8
jmp 0x7d003
movq 0x30(%r14), %rax
movq 0x38(%r14), %rsi
movslq 0x380(%r12), %rdx
movsd (%rax,%rdx,8), %xmm0
movslq 0x384(%r12), %rcx
movsd (%rax,%rcx,8), %xmm1
movapd %xmm0, %xmm2
mulsd %xmm1, %xmm2
movslq 0xe80(%r15), %rdi
divsd (%rsi,%rdi,8), %xmm2
movq 0x10(%rsp), %r8
ucomisd 0x568(%r8), %xmm2
jbe 0x7d2ce
movsd (%rax,%rdx,8), %xmm0
mulsd (%rax,%rcx,8), %xmm0
divsd (%rsi,%rdi,8), %xmm0
leaq 0x9b146(%rip), %rsi     # 0x1183bd
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movb $0x1, %al
callq 0x30c2c
leaq 0x73df2(%rip), %rsi     # 0xf1082
leaq 0x9b237(%rip), %rdx     # 0x1184ce
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x73d7a(%rip), %rsi     # 0xf1034
leaq 0x9aff6(%rip), %rdx     # 0x1182b7
movq %rbx, %rdi
movl $0xc23, %ecx            # imm = 0xC23
jmp 0x7d000
movsd 0x38(%rsp), %xmm2
divsd %xmm0, %xmm2
divsd %xmm1, %xmm2
ucomisd 0x570(%r8), %xmm2
jbe 0x7d374
movq 0x9c8(%rbx), %rsi
movq 0x9d0(%rbx), %rdi
movq 0x60(%rsp), %r8
movq (%rdi,%r8,8), %rdi
movslq (%rsi,%r8,4), %rsi
movsd -0x8(%rdi,%rsi,8), %xmm0
divsd (%rax,%rdx,8), %xmm0
divsd (%rax,%rcx,8), %xmm0
leaq 0x9b240(%rip), %rsi     # 0x11855d
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movb $0x1, %al
callq 0x30c2c
leaq 0x73d4c(%rip), %rsi     # 0xf1082
leaq 0x9b331(%rip), %rdx     # 0x11866e
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x73cd4(%rip), %rsi     # 0xf1034
leaq 0x9af50(%rip), %rdx     # 0x1182b7
movq %rbx, %rdi
movl $0xc29, %ecx            # imm = 0xC29
jmp 0x7d000
cmpw $0x1, 0x4be(%r12)
jne 0x7d3e1
movslq 0x248(%r12), %rcx
testq %rcx, %rcx
jle 0x7d3e1
movslq 0x3f0(%r12), %rdx
movslq 0x3ec(%r12), %rsi
movsd 0x50(%r8), %xmm0
leaq (%rax,%rsi,8), %rsi
leaq (%rax,%rdx,8), %rax
xorl %edx, %edx
movsd 0x7875b(%rip), %xmm1    # 0xf5b10
movapd 0x73e83(%rip), %xmm2    # 0xf1240
movsd (%rax,%rdx,8), %xmm3
divsd (%rsi,%rdx,8), %xmm3
addsd %xmm1, %xmm3
andpd %xmm2, %xmm3
ucomisd %xmm0, %xmm3
ja 0x7d6db
incq %rdx
cmpq %rdx, %rcx
jne 0x7d3bd
movq 0x9f0(%rbx), %rax
movsd (%rax), %xmm1
movsd 0x8(%rsp), %xmm2
movapd %xmm2, %xmm0
addsd %xmm1, %xmm0
mulsd 0x748ce(%rip), %xmm0    # 0xf1cd0
movsd %xmm1, 0x18(%rsp)
subsd %xmm2, %xmm1
divsd %xmm2, %xmm1
ucomisd 0x618(%r8), %xmm1
jbe 0x7d5d2
movq %rbp, 0x28(%rsp)
xorl %ebp, %ebp
movq 0x48(%rsp), %r15
movsd %xmm2, 0x8(%rsp)
movq 0x30(%r14), %r8
movq %r12, %rdi
movsd %xmm0, 0x30(%rsp)
movl $0x1, %esi
xorl %edx, %edx
movq 0x20(%rsp), %rcx
callq 0x5ed53
cmpl $0x1, %eax
je 0x7d74b
cmpw $0x1, 0x4be(%r12)
jne 0x7d4d8
movslq 0x248(%r12), %rax
testq %rax, %rax
jle 0x7d4d8
movq 0x30(%r14), %rdx
movslq 0x3f0(%r12), %rcx
movslq 0x3ec(%r12), %rsi
movq 0x10(%rsp), %rdi
movsd 0x50(%rdi), %xmm0
leaq (%rdx,%rcx,8), %rcx
leaq (%rdx,%rsi,8), %rsi
movl $0x1, %edx
xorl %edi, %edi
movsd 0x7866a(%rip), %xmm2    # 0xf5b10
movapd 0x73d92(%rip), %xmm3    # 0xf1240
movsd (%rcx,%rdi,8), %xmm1
divsd (%rsi,%rdi,8), %xmm1
addsd %xmm2, %xmm1
andpd %xmm3, %xmm1
ucomisd %xmm0, %xmm1
cmoval %ebp, %edx
incq %rdi
cmpq %rdi, %rax
jne 0x7d4ae
cmpl $0x1, %edx
jne 0x7d57d
movslq 0x380(%r12), %rax
movq 0x30(%r14), %r8
movq 0x38(%r14), %r9
movsd 0x73d70(%rip), %xmm0    # 0xf1260
divsd (%r8,%rax,8), %xmm0
addsd 0x742ea(%rip), %xmm0    # 0xf17e8
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq 0x28(%rsp), %rcx
callq 0x68bbc
cmpl $0x1, %eax
je 0x7d8c4
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(%r15), %rax
divsd (%rdx,%rax,8), %xmm2
movq 0x10(%rsp), %rax
ucomisd 0x568(%rax), %xmm2
ja 0x7d57d
movsd 0x38(%rsp), %xmm2
divsd %xmm0, %xmm2
divsd %xmm1, %xmm2
movb $0x1, %al
movq 0x10(%rsp), %rcx
ucomisd 0x570(%rcx), %xmm2
jbe 0x7d57f
xorl %eax, %eax
testb %al, %al
jne 0x7d595
movsd 0x30(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
movapd %xmm2, %xmm0
jmp 0x7d5a5
movsd 0x30(%rsp), %xmm0
movapd %xmm0, %xmm2
movsd 0x18(%rsp), %xmm1
addsd %xmm1, %xmm0
mulsd 0x7471f(%rip), %xmm0    # 0xf1cd0
movsd %xmm1, 0x18(%rsp)
subsd %xmm2, %xmm1
divsd %xmm2, %xmm1
movq 0x10(%rsp), %rax
ucomisd 0x618(%rax), %xmm1
ja 0x7d42b
movsd %xmm0, 0x30(%rsp)
movslq 0x178(%r14), %rbp
leaq (,%rbp,4), %rdi
callq 0x8460
testq %rax, %rax
je 0x7d694
movq %rax, %r15
movslq 0x58(%rsp), %rbp
movw $0x0, 0x154(%r14)
movq 0x9f0(%rbx), %rax
movsd -0x8(%rax,%rbp,8), %xmm2
leaq 0x54(%rsp), %rax
movq 0x10(%rsp), %rdi
movq %r12, %rsi
movq 0x48(%rsp), %rdx
movq %rbx, %rcx
movl %r13d, %r8d
movsd 0x38(%rsp), %xmm0
movq %r14, %r9
movsd 0x30(%rsp), %xmm1
pushq %r15
pushq %rax
callq 0x7dd5e
addq $0x10, %rsp
testl %eax, %eax
je 0x7d797
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x73d93(%rip), %rsi     # 0xf13f0
leaq 0x9b22d(%rip), %rdx     # 0x118891
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x739b4(%rip), %rsi     # 0xf1034
leaq 0x9ac30(%rip), %rdx     # 0x1182b7
movq %rbx, %rdi
movl $0xc86, %ecx            # imm = 0xC86
jmp 0x7d213
shll $0x2, %ebp
leaq 0x73966(%rip), %rsi     # 0xf1004
leaq 0x9b1d9(%rip), %rdx     # 0x11887e
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x7396d(%rip), %rsi     # 0xf1034
leaq 0x9abe9(%rip), %rdx     # 0x1182b7
movq %rbx, %rdi
movl $0xc76, %ecx            # imm = 0xC76
jmp 0x7d213
movsd (%rax,%rdx,8), %xmm1
movsd (%rsi,%rdx,8), %xmm2
movapd %xmm1, %xmm0
divsd %xmm2, %xmm0
leaq 0x9afe3(%rip), %rsi     # 0x1186d7
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movb $0x3, %al
callq 0x30c2c
leaq 0x73975(%rip), %rsi     # 0xf1082
leaq 0x9b089(%rip), %rdx     # 0x11879d
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x738fd(%rip), %rsi     # 0xf1034
leaq 0x9ab79(%rip), %rdx     # 0x1182b7
movq %rbx, %rdi
movl $0xc33, %ecx            # imm = 0xC33
jmp 0x7d000
addq $0xd1c, %r12            # imm = 0xD1C
leaq 0x73c97(%rip), %rsi     # 0xf13f0
leaq 0x9b0bb(%rip), %rdx     # 0x11881b
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x738b1(%rip), %rsi     # 0xf1034
leaq 0x9ab2d(%rip), %rdx     # 0x1182b7
movq %rbx, %rdi
movl $0xc48, %ecx            # imm = 0xC48
jmp 0x7d213
movq %rbp, 0x78(%rsp)
movq %r15, 0x28(%rsp)
movslq 0x54(%rsp), %rbp
leaq 0x8(,%rbp,8), %rdi
callq 0x8460
testq %rax, %rax
je 0x7d910
movq %rax, %r15
leaq (,%rbp,8), %rdi
callq 0x8460
testq %rax, %rax
je 0x7d959
movq %r15, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movq %rbp, 0x8(%rsp)
testl %ebp, %ebp
jle 0x7d81e
movslq 0x178(%r14), %r15
movq %r15, 0x70(%rsp)
shlq $0x2, %r15
xorl %ebp, %ebp
movq %r15, %rdi
callq 0x8460
movq 0x20(%rsp), %rcx
movq %rax, (%rcx,%rbp,8)
testq %rax, %rax
je 0x7d9a0
incq %rbp
cmpq %rbp, 0x8(%rsp)
jne 0x7d7fa
movq 0x9f0(%rbx), %rax
movq 0x78(%rsp), %rcx
movsd -0x8(%rax,%rcx,8), %xmm2
movq 0x10(%rsp), %rdi
movsd 0x618(%rdi), %xmm3
movq %r12, %rsi
movq 0x18(%rsp), %rax
movq 0x48(%rsp), %rdx
movq %rbx, %rcx
movl %r13d, %r8d
movsd 0x38(%rsp), %xmm0
movq %r14, %r9
movsd 0x30(%rsp), %xmm1
pushq 0x20(%rsp)
pushq %rax
movq 0x38(%rsp), %rbp
pushq %rbp
pushq 0x20(%rsp)
callq 0x7df7e
addq $0x20, %rsp
testl %eax, %eax
je 0x7d9ee
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x73b63(%rip), %rsi     # 0xf13f0
leaq 0x9b0cc(%rip), %rdx     # 0x118960
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x73784(%rip), %rsi     # 0xf1034
leaq 0x9aa00(%rip), %rdx     # 0x1182b7
movq %rbx, %rdi
movl $0xc9e, %ecx            # imm = 0xC9E
jmp 0x7d213
addq $0x1064, %r15           # imm = 0x1064
leaq 0x73b1e(%rip), %rsi     # 0xf13f0
leaq 0x9aa57(%rip), %rdx     # 0x118330
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x73738(%rip), %rsi     # 0xf1034
leaq 0x9a9b4(%rip), %rdx     # 0x1182b7
movq %rbx, %rdi
movl $0xc5d, %ecx            # imm = 0xC5D
jmp 0x7d213
leal 0x8(,%rbp,8), %ecx
leaq 0x736e6(%rip), %rsi     # 0xf1004
leaq 0x9478b(%rip), %rdx     # 0x1120b0
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x736ef(%rip), %rsi     # 0xf1034
leaq 0x9a96b(%rip), %rdx     # 0x1182b7
movq %rbx, %rdi
movl $0xc88, %ecx            # imm = 0xC88
jmp 0x7d213
shll $0x3, %ebp
leaq 0x736a1(%rip), %rsi     # 0xf1004
leaq 0x9afc6(%rip), %rdx     # 0x118930
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x736a8(%rip), %rsi     # 0xf1034
leaq 0x9a924(%rip), %rdx     # 0x1182b7
movq %rbx, %rdi
movl $0xc8a, %ecx            # imm = 0xC8A
jmp 0x7d213
movq 0x70(%rsp), %rax
leal (,%rax,4), %ecx
leaq 0x73651(%rip), %rsi     # 0xf1004
leaq 0x9af86(%rip), %rdx     # 0x118940
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x7365a(%rip), %rsi     # 0xf1034
leaq 0x9a8d6(%rip), %rdx     # 0x1182b7
movq %rbx, %rdi
movl $0xc8d, %ecx            # imm = 0xC8D
jmp 0x7d213
movq %rbp, %rdi
callq 0x8410
movq 0x10(%rsp), %rax
movq %rax, 0x880(%rsp)
movq %r12, 0x888(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x890(%rsp)
movq %rbx, 0x898(%rsp)
movl %r13d, 0x8a0(%rsp)
movl 0x44(%rsp), %eax
movl %eax, 0x8a4(%rsp)
movq 0x68(%rsp), %rdi
movl %edi, 0x8a8(%rsp)
movsd 0x38(%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 0x7dac8
movl %eax, %ecx
imull %r13d, %ecx
movslq %ecx, %rcx
shlq $0x2, %rcx
addq 0xa78(%rbx), %rcx
xorl %edx, %edx
leaq 0xffe(%rip), %rsi       # 0x7ea9d
movq $0x0, 0x8(%rsp)
movq 0x18(%rsp), %r15
cmpl %edi, (%rcx,%rdx,4)
jne 0x7dabe
movl %edx, 0x150(%r14)
movq %rsi, 0x8(%rsp)
incq %rdx
cmpq %rdx, %rax
jne 0x7daad
jmp 0x7dad6
movq $0x0, 0x8(%rsp)
movq 0x18(%rsp), %r15
leaq 0x6c8a(%rbx), %rax
movq %rax, 0x28(%rsp)
xorl %ebp, %ebp
movslq 0x54(%rsp), %rax
cmpq %rax, %rbp
jge 0x7dc5d
cmpl $0x0, 0x178(%r14)
jle 0x7db23
movq 0x20(%rsp), %rax
movq (%rax,%rbp,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 0x7db0e
testq %rbp, %rbp
je 0x7db34
movq 0x20(%rsp), %rax
movq -0x8(%rax,%rbp,8), %rax
jmp 0x7db36
xorl %eax, %eax
movsd (%r15,%rbp,8), %xmm1
movq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
movq 0x48(%rsp), %rdx
movq %rbx, %rcx
movl %r13d, %r8d
movl 0x44(%rsp), %r9d
movsd %xmm1, 0x30(%rsp)
pushq %rax
pushq %r14
callq 0x815eb
addq $0x10, %rsp
testl %eax, %eax
jne 0x7dd18
cmpl $0x0, 0x678(%r15)
leaq -0x705ac(%rip), %rax    # 0xd5d4
jne 0x7db89
leaq -0x70c3d(%rip), %rax    # 0xcf4c
movq 0x18(%rsp), %r15
movsd 0x8(%r15,%rbp,8), %xmm1
incq %rbp
movq 0x48(%r14), %rcx
movq 0xf0(%rcx), %rsi
movq 0x100(%rcx), %rdx
movl 0xe8(%rcx), %ecx
movq 0x10(%rsp), %rdi
movsd 0x5f0(%rdi), %xmm4
movsd 0x608(%rdi), %xmm2
movsd 0xa28(%rdi), %xmm3
subq $0x8, %rsp
leaq 0x72af(%rip), %rdi      # 0x84e87
movsd 0x38(%rsp), %xmm0
leaq 0x888(%rsp), %r8
leaq 0xccc4(%rip), %r9       # 0x8a8b1
pushq 0x30(%rsp)
pushq 0x18(%rsp)
pushq 0xce36d(%rip)           # 0x14bf68
pushq 0x78(%rsp)
pushq 0x9f0(%rbx)
callq *%rax
addq $0x30, %rsp
cmpl $0x1, %eax
movsd 0x38(%rsp), %xmm0
jne 0x7dae4
leaq 0x737cf(%rip), %rsi     # 0xf13f0
leaq 0x9ae89(%rip), %rdx     # 0x118ab1
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
movq 0x28(%rsp), %r14
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x733eb(%rip), %rsi     # 0xf1034
leaq 0x9a667(%rip), %rdx     # 0x1182b7
movq %r14, %rdi
movl $0xd02, %ecx            # imm = 0xD02
jmp 0x7dd56
movq %rax, %r12
movl 0x9f8(%rbx), %eax
movq 0x58(%rsp), %r15
cmpl %eax, %r15d
movq 0x68(%rsp), %r10
movq 0x60(%rsp), %r11
jge 0x7dcd9
movq 0x998(%rbx), %rcx
movl (%rcx,%r11,4), %ecx
movl 0x44(%rsp), %edx
imull %ecx, %edx
movslq %edx, %rdx
shlq $0x3, %rdx
testl %ecx, %ecx
jle 0x7dcd1
movq 0x9c8(%rbx), %rsi
movq 0xa38(%rbx), %rdi
movl (%rsi,%r11,4), %esi
imull %r15d, %esi
addl %r10d, %esi
movslq %esi, %rsi
movq (%rdi,%r11,8), %rdi
addq %rdx, %rdi
xorl %r8d, %r8d
movq (%rdi,%r8,8), %r9
movq $0x0, (%r9,%rsi,8)
incq %r8
cmpq %r8, %rcx
jne 0x7dcbd
incl %r15d
cmpl %eax, %r15d
jne 0x7dc93
movq 0x48(%r14), %rdi
callq 0x8d65b
testl %r12d, %r12d
movq 0x20(%rsp), %r14
jle 0x7dcff
xorl %ebx, %ebx
movq (%r14,%rbx,8), %rdi
callq 0x8410
incq %rbx
cmpq %rbx, %r12
jne 0x7dcee
movq %r14, %rdi
callq 0x8410
movq 0x18(%rsp), %rdi
callq 0x8410
xorl %ebp, %ebp
jmp 0x7d00f
leaq 0x736d1(%rip), %rsi     # 0xf13f0
leaq 0x9ad10(%rip), %rdx     # 0x118a36
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
movq 0x28(%rsp), %r14
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x732ed(%rip), %rsi     # 0xf1034
leaq 0x9a569(%rip), %rdx     # 0x1182b7
movq %r14, %rdi
movl $0xce5, %ecx            # imm = 0xCE5
movq %rbx, %r8
jmp 0x7d003