// File: /workspace/github_c_makefile_star2_O3/PoulinV[P]AxiCLASS/build/../source/primordial.c
// Function: primordial_init
int primordial_init(
                    struct precision  * ppr,
                    struct perturbations   * ppt,
                    struct primordial * ppm
                    ) {

  /** Summary: */

  /** - define local variables */

  double k,k_min,k_max;
  int index_md,index_ic1,index_ic2,index_ic1_ic2,index_k;
  double pk,pk1,pk2;
  double dlnk,lnpk_pivot,lnpk_minus,lnpk_plus,lnpk_minusminus,lnpk_plusplus;
  /* uncomment if you use optional test below
     (for correlated isocurvature modes) */
  //double cos_delta_k;

  /** - check that we really need to compute the primordial spectra */

  if (ppt->has_perturbations == _FALSE_) {
    ppm->lnk_size=0;
    if (ppm->primordial_verbose > 0)
      printf("No perturbations requested. Primordial module skipped.\n");
    return _SUCCESS_;
  }
  else {
    if (ppm->primordial_verbose > 0)
      printf("Computing primordial spectra");
  }

  /** - get kmin and kmax from perturbation structure. Test that they make sense. */

  k_min = ppt->k_min; /* first value, inferred from perturbations structure */
  if (ppm->has_k_max_for_primordial_pk == _TRUE_){
    k_max = ppm->k_max_for_primordial_pk; /* last value, user-defined (i.e. if specified in .ini file) */
  }
  else{
    k_max = ppt->k_max; /* last value, inferred from perturbations structure */
  }

  class_test(k_min <= 0.,
             ppm->error_message,
             "k_min negative or null: stop to avoid segmentation fault");

  class_test(k_max <= 0.,
             ppm->error_message,
             "k_max negative or null: stop to avoid segmentation fault");

  class_test(ppm->k_pivot <= 0.,
             ppm->error_message,
             "k_pivot negative or null: stop to avoid segmentation fault");

  class_test(ppr->k_per_decade_primordial <= 0.,
             ppm->error_message,
             "k_per_decade_primordial negative or null: stop to avoid segmentation fault");

  class_test(ppr->k_per_decade_primordial <= _K_PER_DECADE_PRIMORDIAL_MIN_,
             ppm->error_message,
             "k_per_decade_primordial = %e: you ask for such a sparse sampling of the primordial spectrum that this is probably a mistake",
             ppr->k_per_decade_primordial);

  /** - allocate and fill values of \f$ \ln{k}\f$'s */

  class_call(primordial_get_lnk_list(ppm,
                                     k_min,
                                     k_max,
                                     ppr->k_per_decade_primordial
                                     ),
             ppm->error_message,
             ppm->error_message);

  /** - define indices and allocate tables in primordial structure */

  class_call(primordial_indices(ppt,
                                ppm),
             ppm->error_message,
             ppm->error_message);

  /** - deal with case of analytic primordial spectra (with amplitudes, tilts, runnings, etc.) */

  if (ppm->primordial_spec_type == analytic_Pk) {

    if (ppm->primordial_verbose > 0)
      printf(" (analytic spectrum)\n");

    class_call_except(primordial_analytic_spectrum_init(ppt,
                                                        ppm),
                      ppm->error_message,
                      ppm->error_message,
                      primordial_free(ppm));

    for (index_k = 0; index_k < ppm->lnk_size; index_k++) {

      k=exp(ppm->lnk[index_k]);

      for (index_md = 0; index_md < ppt->md_size; index_md++) {
        for (index_ic1 = 0; index_ic1 < ppm->ic_size[index_md]; index_ic1++) {
          for (index_ic2 = index_ic1; index_ic2 < ppm->ic_size[index_md]; index_ic2++) {

            index_ic1_ic2 = index_symmetric_matrix(index_ic1,index_ic2,ppm->ic_size[index_md]);

            if (ppm->is_non_zero[index_md][index_ic1_ic2] == _TRUE_) {

              class_call(primordial_analytic_spectrum(ppm,
                                                      index_md,
                                                      index_ic1_ic2,
                                                      k,
                                                      &pk),
                         ppm->error_message,
                         ppm->error_message);

              if (index_ic1 == index_ic2) {

                /* diagonal coefficients: ln[P(k)] */

                ppm->lnpk[index_md][index_k*ppm->ic_ic_size[index_md]+index_ic1_ic2] = log(pk);
              }
              else {

                /* non-diagonal coefficients: cosDelta(k) = P(k)_12/sqrt[P(k)_1 P(k)_2] */

                class_call(primordial_analytic_spectrum(ppm,
                                                        index_md,
                                                        index_symmetric_matrix(index_ic1,index_ic1,ppm->ic_size[index_md]),
                                                        k,
                                                        &pk1),
                           ppm->error_message,
                           ppm->error_message);

                class_call(primordial_analytic_spectrum(ppm,
                                                        index_md,
                                                        index_symmetric_matrix(index_ic2,index_ic2,ppm->ic_size[index_md]),
                                                        k,
                                                        &pk2),
                           ppm->error_message,
                           ppm->error_message);

                /* either return an error if correlation is too large... */
                /*
                  cos_delta_k = pk/sqrt(pk1*pk2);
                  class_test_except((cos_delta_k < -1.) || (cos_delta_k > 1.),
                  ppm->error_message,
                  primordial_free(ppm),
                  "correlation angle between IC's takes unphysical values");

                  ppm->lnpk[index_md][index_k*ppm->ic_ic_size[index_md]+index_ic1_ic2] = cos_delta_k;
                */

                /* ... or enforce definite positive correlation matrix */

                if (pk > sqrt(pk1*pk2))
                  ppm->lnpk[index_md][index_k*ppm->ic_ic_size[index_md]+index_ic1_ic2] = 1.;
                else if (pk < -sqrt(pk1*pk2))
                  ppm->lnpk[index_md][index_k*ppm->ic_ic_size[index_md]+index_ic1_ic2] = -1.;
                else
                  ppm->lnpk[index_md][index_k*ppm->ic_ic_size[index_md]+index_ic1_ic2] = pk/sqrt(pk1*pk2);


              }
            }
            else {

              /* non-diagonal coefficients when ic's are uncorrelated */

              ppm->lnpk[index_md][index_k*ppm->ic_ic_size[index_md]+index_ic1_ic2] = 0.;
            }
          }
        }
      }
    }
  }

  /** - deal with case of inflation with given \f$V(\phi)\f$ or \f$H(\phi)\f$ */

  else if ((ppm->primordial_spec_type == inflation_V) || (ppm->primordial_spec_type == inflation_H) || (ppm->primordial_spec_type == inflation_V_end)) {

    class_call(primordial_inflation_indices(ppm),
               ppm->error_message,
               ppm->error_message);

    if (ppm->primordial_verbose > 0)
      printf(" (simulating inflation)\n");

    class_call_except(primordial_inflation_solve_inflation(ppt,ppm,ppr),
                      ppm->error_message,
                      ppm->error_message,
                      primordial_free(ppm));

  }

  /** - deal with the case of external calculation of \f$ P_k \f$*/

  else if (ppm->primordial_spec_type == external_Pk) {

    class_test(ppt->has_scalars == _FALSE_,
               ppm->error_message,
               "external Pk module cannot work if you do not ask for scalar modes");

    class_test(ppt->has_vectors == _TRUE_,
               ppm->error_message,
               "external Pk module cannot work if you ask for vector modes");

    class_test(ppt->has_bi == _TRUE_ || ppt->has_cdi == _TRUE_ || ppt->has_nid == _TRUE_ || ppt->has_niv == _TRUE_,
               ppm->error_message,
               "external Pk module cannot work if you ask for isocurvature modes (but that could be implemented easily in the future!)");

    if (ppm->primordial_verbose > 0)
      printf(" (Pk calculated externally)\n");

    class_call_except(primordial_external_spectrum_init(ppt,ppm),
                      ppm->error_message,
                      ppm->error_message,
                      primordial_free(ppm));
  }

  else {

    class_test(0==0,
               ppm->error_message,
               "primordial spectrum type not recognized");

  }

  /** - compute second derivative of each \f$ \ln{P_k} \f$ versus lnk with spline, in view of interpolation */

  for (index_md = 0; index_md < ppm->md_size; index_md++) {

    class_call(array_spline_table_lines(ppm->lnk,
                                        ppm->lnk_size,
                                        ppm->lnpk[index_md],
                                        ppm->ic_ic_size[index_md],
                                        ppm->ddlnpk[index_md],
                                        _SPLINE_EST_DERIV_,
                                        ppm->error_message),
               ppm->error_message,
               ppm->error_message);

  }

  /** - derive spectral parameters from numerically computed spectra
      (not used by the rest of the code, but useful to keep in memory for several types of investigation) */

  if (ppm->primordial_spec_type != analytic_Pk) {

    dlnk = log(10.)/ppr->k_per_decade_primordial;

    if (ppt->has_scalars == _TRUE_) {

      class_call(primordial_spectrum_at_k(ppm,
                                          ppt->index_md_scalars,
                                          logarithmic,
                                          log(ppm->k_pivot),
                                          &lnpk_pivot),
                 ppm->error_message,
                 ppm->error_message);

      class_call(primordial_spectrum_at_k(ppm,
                                          ppt->index_md_scalars,
                                          logarithmic,
                                          log(ppm->k_pivot)+dlnk,

                                          &lnpk_plus),
                 ppm->error_message,
                 ppm->error_message);

      class_call(primordial_spectrum_at_k(ppm,
                                          ppt->index_md_scalars,
                                          logarithmic,
                                          log(ppm->k_pivot)-dlnk,
                                          &lnpk_minus),
                 ppm->error_message,
                 ppm->error_message);

      ppm->A_s = exp(lnpk_pivot);
      ppm->n_s = (lnpk_plus-lnpk_minus)/(2.*dlnk)+1.;
      ppm->alpha_s = (lnpk_plus-2.*lnpk_pivot+lnpk_minus)/pow(dlnk,2);

      /** - expression for alpha_s comes from:

          `ns_2 = (lnpk_plus-lnpk_pivot)/(dlnk)+1`

          `ns_1 = (lnpk_pivot-lnpk_minus)/(dlnk)+1`

          `alpha_s = dns/dlnk = (ns_2-ns_1)/dlnk = (lnpk_plus-lnpk_pivot-lnpk_pivot+lnpk_minus)/(dlnk)/(dlnk)`

      **/

      class_call(primordial_spectrum_at_k(ppm,
                                          ppt->index_md_scalars,
                                          logarithmic,
                                          log(ppm->k_pivot)+2.*dlnk,

                                          &lnpk_plusplus),
                 ppm->error_message,
                 ppm->error_message);

      class_call(primordial_spectrum_at_k(ppm,
                                          ppt->index_md_scalars,
                                          logarithmic,
                                          log(ppm->k_pivot)-2.*dlnk,
                                          &lnpk_minusminus),
                 ppm->error_message,
                 ppm->error_message);

      /** - expression for beta_s:

          `ppm->beta_s = (alpha_plus-alpha_minus)/dlnk = (lnpk_plusplus-2.*lnpk_plus+lnpk_pivot -
          (lnpk_pivot-2.*lnpk_minus+lnpk_minusminus)/pow(dlnk,3)`
      **/

      /* Simplification of the beta_s expression: */

      ppm->beta_s = (lnpk_plusplus-2.*lnpk_plus+2.*lnpk_minus-lnpk_minusminus)/pow(dlnk,3);

      if (ppm->primordial_verbose > 0)
        printf(" -> A_s=%g  n_s=%g  alpha_s=%g\n",ppm->A_s,ppm->n_s,ppm->alpha_s);

    }

    if (ppt->has_tensors == _TRUE_) {

      class_call(primordial_spectrum_at_k(ppm,
                                          ppt->index_md_tensors,
                                          logarithmic,
                                          log(ppm->k_pivot),
                                          &lnpk_pivot),
                 ppm->error_message,
                 ppm->error_message);

      class_call(primordial_spectrum_at_k(ppm,
                                          ppt->index_md_tensors,
                                          logarithmic,
                                          log(ppm->k_pivot)+dlnk,
                                          &lnpk_plus),
                 ppm->error_message,
                 ppm->error_message);

      class_call(primordial_spectrum_at_k(ppm,
                                          ppt->index_md_tensors,
                                          logarithmic,
                                          log(ppm->k_pivot)-dlnk,
                                          &lnpk_minus),
                 ppm->error_message,
                 ppm->error_message);

      ppm->r = exp(lnpk_pivot)/ppm->A_s;
      ppm->n_t = (lnpk_plus-lnpk_minus)/(2.*dlnk);
      ppm->alpha_t = (lnpk_plus-2.*lnpk_pivot+lnpk_minus)/pow(dlnk,2);

      if (ppm->primordial_verbose > 0)
        printf(" -> r=%g  n_t=%g  alpha_t=%g\n",ppm->r,ppm->n_t,ppm->alpha_t);

    }

  }

  ppm->is_allocated = _TRUE_;

  return _SUCCESS_;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1088, %rsp           # imm = 0x1088
movq %rdx, %rbx
cmpw $0x0, (%rsi)
je 0x94d1e
movq %rsi, %r12
movq %rdi, %r14
cmpw $0x0, 0x328(%rbx)
jle 0x94c5c
leaq 0x83cda(%rip), %rdi     # 0x11892f
xorl %eax, %eax
callq 0x8030
leaq 0x10(%rbx), %rcx
leaq 0x9e8(%r12), %rax
cmpl $0x1, 0x8(%rbx)
cmoveq %rcx, %rax
movsd 0x9e0(%r12), %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm0, %xmm2
jae 0x94d49
movsd (%rax), %xmm1
ucomisd %xmm1, %xmm2
jae 0x94da7
xorpd %xmm3, %xmm3
ucomisd (%rbx), %xmm3
jae 0x94e05
movsd 0x680(%r14), %xmm2
ucomisd %xmm2, %xmm3
jae 0x94e63
movsd 0x595a1(%rip), %xmm3    # 0xee260
ucomisd %xmm2, %xmm3
jae 0x94ebe
movq %rbx, %rdi
callq 0x95bf7
testl %eax, %eax
je 0x94f3e
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x59709(%rip), %rsi     # 0xee3f0
leaq 0x83e6e(%rip), %rdx     # 0x118b5c
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x5932a(%rip), %rsi     # 0xee034
leaq 0x83c80(%rip), %rdx     # 0x118991
movq %rbx, %rdi
movl $0x127, %ecx            # imm = 0x127
jmp 0x94f8d
movl $0x0, 0x290(%rbx)
xorl %ebp, %ebp
cmpw $0x0, 0x328(%rbx)
jle 0x94f2a
leaq 0x86539(%rip), %rdi     # 0x11b278
callq 0x8510
jmp 0x94f2a
leaq 0x83bfc(%rip), %rsi     # 0x11894c
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0x59319(%rip), %rsi     # 0xee082
leaq 0x83c15(%rip), %rdx     # 0x118985
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x592a1(%rip), %rsi     # 0xee034
leaq 0x83bf7(%rip), %rdx     # 0x118991
movq %rbx, %rdi
movl $0x10c, %ecx            # imm = 0x10C
jmp 0x94f1b
leaq 0x83bf3(%rip), %rsi     # 0x1189a1
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0x592bb(%rip), %rsi     # 0xee082
leaq 0x83c0c(%rip), %rdx     # 0x1189da
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x59243(%rip), %rsi     # 0xee034
leaq 0x83b99(%rip), %rdx     # 0x118991
movq %rbx, %rdi
movl $0x110, %ecx            # imm = 0x110
jmp 0x94f1b
leaq 0x83bda(%rip), %rsi     # 0x1189e6
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0x5925d(%rip), %rsi     # 0xee082
leaq 0x83bf5(%rip), %rdx     # 0x118a21
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x591e5(%rip), %rsi     # 0xee034
leaq 0x83b3b(%rip), %rdx     # 0x118991
movq %rbx, %rdi
movl $0x114, %ecx            # imm = 0x114
jmp 0x94f1b
leaq 0x83bca(%rip), %rsi     # 0x118a34
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0x591ff(%rip), %rsi     # 0xee082
leaq 0x83bf5(%rip), %rdx     # 0x118a7f
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x59187(%rip), %rsi     # 0xee034
leaq 0x83add(%rip), %rdx     # 0x118991
movq %rbx, %rdi
movl $0x118, %ecx            # imm = 0x118
jmp 0x94f1b
leaq 0x83bdd(%rip), %rsi     # 0x118aa2
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movapd %xmm2, %xmm0
movb $0x1, %al
callq 0x30af0
leaq 0x591a0(%rip), %rsi     # 0xee082
leaq 0x83c35(%rip), %rdx     # 0x118b1e
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x59128(%rip), %rsi     # 0xee034
leaq 0x83a7e(%rip), %rdx     # 0x118991
movq %rbx, %rdi
movl $0x11d, %ecx            # imm = 0x11D
movq %r15, %r8
xorl %eax, %eax
callq 0x30af0
movl $0x1, %ebp
movl %ebp, %eax
addq $0x1088, %rsp           # imm = 0x1088
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
movq %rbx, %rsi
callq 0x95d86
testl %eax, %eax
je 0x94f92
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x59495(%rip), %rsi     # 0xee3f0
leaq 0x83c44(%rip), %rdx     # 0x118ba6
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x590b6(%rip), %rsi     # 0xee034
leaq 0x83a0c(%rip), %rdx     # 0x118991
movq %rbx, %rdi
movl $0x12e, %ecx            # imm = 0x12E
movq %r14, %r8
jmp 0x94f1e
movl 0x18(%rbx), %eax
leal -0x2(%rax), %ecx
cmpl $0x3, %ecx
movq %r12, 0x18(%rsp)
jae 0x9501d
movq %rbx, %rdi
callq 0x96d55
cmpw $0x0, 0x328(%rbx)
jle 0x94fc0
leaq 0x86290(%rip), %rdi     # 0x11b24b
callq 0x8510
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, 0x40(%rsp)
movq %r14, %rdx
callq 0x96dd3
testl %eax, %eax
je 0x954b0
leaq 0x32a(%rbx), %r14
leaq 0x59407(%rip), %rsi     # 0xee3f0
leaq 0x83bff(%rip), %rdx     # 0x118bef
leaq 0x80(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x59028(%rip), %rsi     # 0xee034
leaq 0x8397e(%rip), %rdx     # 0x118991
movq %r14, %rdi
movl $0x19c, %ecx            # imm = 0x19C
jmp 0x95097
cmpl $0x5, %eax
je 0x950ae
testl %eax, %eax
jne 0x95126
cmpw $0x0, 0x328(%rbx)
jle 0x95044
leaq 0x86224(%rip), %rdi     # 0x11b263
callq 0x8510
movq %r12, %rdi
movq %rbx, %rsi
callq 0x96162
testl %eax, %eax
je 0x951e2
leaq 0x32a(%rbx), %r14
leaq 0x5938b(%rip), %rsi     # 0xee3f0
leaq 0x83b57(%rip), %rdx     # 0x118bc3
leaq 0x80(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x58fac(%rip), %rsi     # 0xee034
leaq 0x83902(%rip), %rdx     # 0x118991
movq %r14, %rdi
movl $0x13b, %ecx            # imm = 0x13B
movq %r15, %r8
xorl %eax, %eax
callq 0x30af0
movq %rbx, %rdi
callq 0x96c17
jmp 0x94f25
cmpw $0x0, 0xe(%r12)
je 0x95184
cmpw $0x1, 0x10(%r12)
jne 0x95603
leaq 0x83b94(%rip), %rsi     # 0x118c63
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0x58f9a(%rip), %rsi     # 0xee082
leaq 0x71d42(%rip), %rdx     # 0x106e31
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x58f22(%rip), %rsi     # 0xee034
leaq 0x83878(%rip), %rdx     # 0x118991
movq %rbx, %rdi
movl $0x1aa, %ecx            # imm = 0x1AA
jmp 0x94f1b
leaq 0x83c13(%rip), %rsi     # 0x118d40
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0x58f3c(%rip), %rsi     # 0xee082
leaq 0x83c1b(%rip), %rdx     # 0x118d68
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x58ec4(%rip), %rsi     # 0xee034
leaq 0x8381a(%rip), %rdx     # 0x118991
movq %rbx, %rdi
movl $0x1bd, %ecx            # imm = 0x1BD
jmp 0x94f1b
leaq 0x83a96(%rip), %rsi     # 0x118c21
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0x58ede(%rip), %rsi     # 0xee082
leaq 0x71c2e(%rip), %rdx     # 0x106dd9
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x58e66(%rip), %rsi     # 0xee034
leaq 0x837bc(%rip), %rdx     # 0x118991
movq %rbx, %rdi
movl $0x1a6, %ecx            # imm = 0x1A6
jmp 0x94f1b
movq %r14, 0x40(%rsp)
cmpl $0x0, 0x290(%rbx)
jle 0x954b0
xorl %esi, %esi
movq %rsi, 0x8(%rsp)
movq 0x298(%rbx), %rax
movsd (%rax,%rsi,8), %xmm0
callq 0x8670
movq 0x8(%rsp), %rsi
movl 0x854(%r12), %ecx
testl %ecx, %ecx
jle 0x9549d
movq 0x280(%rbx), %rax
xorl %r15d, %r15d
movsd %xmm0, 0x10(%rsp)
movl (%rax,%r15,4), %r14d
testl %r14d, %r14d
jle 0x9548e
xorl %r13d, %r13d
cmpl %r14d, %r13d
jge 0x9546b
leal 0x1(%r13), %eax
movl %eax, 0x50(%rsp)
imull %r13d, %eax
shrl %eax
movl %eax, 0x54(%rsp)
negl %eax
movq %rax, 0x58(%rsp)
xorl %r12d, %r12d
movl %r13d, %ebp
cmpl %ebp, %r13d
jbe 0x95282
imull %ebp, %r14d
addl %r13d, %r14d
leal 0x1(%rbp), %eax
imull %ebp, %eax
shrl %eax
subl %eax, %r14d
jmp 0x95290
imull %r13d, %r14d
movq 0x58(%rsp), %rax
addl %ebp, %eax
addl %eax, %r14d
movq 0x2b0(%rbx), %rax
movq (%rax,%r15,8), %rax
movslq %r14d, %rcx
xorpd %xmm0, %xmm0
cmpw $0x1, (%rax,%rcx,2)
jne 0x95429
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
movsd 0x10(%rsp), %xmm0
leaq 0x880(%rsp), %rcx
callq 0x94ad8
testl %r12d, %r12d
je 0x95355
movq 0x280(%rbx), %rax
movl (%rax,%r15,4), %edx
incl %edx
imull %r13d, %edx
subl 0x54(%rsp), %edx
movq %rbx, %rdi
movl %r15d, %esi
movsd 0x10(%rsp), %xmm0
leaq 0x78(%rsp), %rcx
callq 0x94ad8
movq 0x280(%rbx), %rax
movl (%rax,%r15,4), %edx
incl %edx
imull %ebp, %edx
leal 0x1(%rbp), %eax
imull %ebp, %eax
shrl %eax
subl %eax, %edx
movq %rbx, %rdi
movl %r15d, %esi
movsd 0x10(%rsp), %xmm0
leaq 0x70(%rsp), %rcx
callq 0x94ad8
movsd 0x880(%rsp), %xmm1
movsd 0x78(%rsp), %xmm2
mulsd 0x70(%rsp), %xmm2
ucomisd 0x58f0e(%rip), %xmm2    # 0xee258
jb 0x9536d
xorps %xmm0, %xmm0
sqrtsd %xmm2, %xmm0
jmp 0x9538e
movsd 0x880(%rsp), %xmm0
callq 0x82c0
movq 0x8(%rsp), %rsi
jmp 0x95429
movapd %xmm2, %xmm0
movsd %xmm1, 0x20(%rsp)
movsd %xmm2, 0x48(%rsp)
callq 0x82b0
movsd 0x48(%rsp), %xmm2
movsd 0x20(%rsp), %xmm1
movq 0x8(%rsp), %rsi
ucomisd %xmm0, %xmm1
movsd 0x58ec1(%rip), %xmm0    # 0xee260
ja 0x95429
ucomisd 0x58eab(%rip), %xmm2    # 0xee258
jb 0x953b8
xorps %xmm0, %xmm0
sqrtsd %xmm2, %xmm0
jmp 0x953de
movapd %xmm2, %xmm0
movsd %xmm1, 0x20(%rsp)
movsd %xmm2, 0x48(%rsp)
callq 0x82b0
movsd 0x48(%rsp), %xmm2
movsd 0x20(%rsp), %xmm1
movq 0x8(%rsp), %rsi
xorpd 0x58e4a(%rip), %xmm0    # 0xee230
ucomisd %xmm1, %xmm0
movsd 0x593f6(%rip), %xmm0    # 0xee7e8
ja 0x95429
ucomisd 0x58e5c(%rip), %xmm2    # 0xee258
jb 0x95407
xorps %xmm0, %xmm0
sqrtsd %xmm2, %xmm0
jmp 0x95421
movapd %xmm2, %xmm0
movsd %xmm1, 0x20(%rsp)
callq 0x82b0
movsd 0x20(%rsp), %xmm1
movq 0x8(%rsp), %rsi
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movq 0x288(%rbx), %rax
movq 0x2a0(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
movl (%rax,%r15,4), %eax
imull %esi, %eax
addl %r14d, %eax
cltq
movsd %xmm0, (%rcx,%rax,8)
incl %ebp
movq 0x280(%rbx), %rax
movl (%rax,%r15,4), %r14d
decl %r12d
cmpl %r14d, %ebp
jl 0x95269
movl 0x50(%rsp), %ecx
jmp 0x95475
movl (%rax,%r15,4), %r14d
incl %r13d
movl %r13d, %ecx
movl %ecx, %r13d
cmpl %r14d, %ecx
jl 0x95241
movq 0x18(%rsp), %r12
movl 0x854(%r12), %ecx
incq %r15
movslq %ecx, %rdx
cmpq %rdx, %r15
jl 0x95231
incq %rsi
movslq 0x290(%rbx), %rax
cmpq %rax, %rsi
jl 0x951f6
cmpl $0x0, 0x278(%rbx)
jle 0x95518
leaq 0x32a(%rbx), %r14
xorl %r15d, %r15d
movq 0x298(%rbx), %rdi
movl 0x290(%rbx), %esi
movq 0x2a0(%rbx), %rax
movq (%rax,%r15,8), %rdx
movq 0x288(%rbx), %rax
movl (%rax,%r15,4), %ecx
movq 0x2a8(%rbx), %rax
movq (%rax,%r15,8), %r8
movq %r14, (%rsp)
movl $0x1, %r9d
callq 0x142a8
cmpl $0x1, %eax
je 0x955c2
incq %r15
movslq 0x278(%rbx), %rax
cmpq %rax, %r15
jl 0x954c3
cmpl $0x0, 0x18(%rbx)
je 0x95be7
movsd 0x7cf5e(%rip), %xmm0    # 0x112488
movq 0x40(%rsp), %rax
divsd 0x680(%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
cmpw $0x1, 0xe(%r12)
jne 0x959e1
movl 0x848(%r12), %r14d
movsd (%rbx), %xmm0
callq 0x82c0
movl $0x1, %ebp
leaq 0x28(%rsp), %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0x943b4
testl %eax, %eax
je 0x95689
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x58e65(%rip), %rsi     # 0xee3f0
leaq 0x8386b(%rip), %rdx     # 0x118dfd
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x58a86(%rip), %rsi     # 0xee034
leaq 0x833dc(%rip), %rdx     # 0x118991
movq %rbx, %rdi
movl $0x1e0, %ecx            # imm = 0x1E0
jmp 0x95b56
leaq 0x58e27(%rip), %rsi     # 0xee3f0
leaq 0x8379d(%rip), %rdx     # 0x118d6d
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x58a48(%rip), %rsi     # 0xee034
leaq 0x8339e(%rip), %rdx     # 0x118991
movq %r14, %rdi
movl $0x1cd, %ecx            # imm = 0x1CD
movq %rbx, %r8
jmp 0x94f1e
cmpw $0x1, 0x16(%r12)
je 0x9562b
cmpw $0x1, 0x18(%r12)
je 0x9562b
cmpw $0x1, 0x1a(%r12)
je 0x9562b
cmpw $0x1, 0x1c(%r12)
jne 0x95785
leaq 0x8366c(%rip), %rsi     # 0x118c9e
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0x58a37(%rip), %rsi     # 0xee082
leaq 0x7189b(%rip), %rdx     # 0x106eed
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x589bf(%rip), %rsi     # 0xee034
leaq 0x83315(%rip), %rdx     # 0x118991
movq %rbx, %rdi
movl $0x1ae, %ecx            # imm = 0x1AE
jmp 0x94f1b
movl 0x848(%r12), %r14d
movsd (%rbx), %xmm0
callq 0x82c0
addsd 0x10(%rsp), %xmm0
movl $0x1, %ebp
leaq 0x30(%rsp), %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0x943b4
testl %eax, %eax
je 0x95703
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x58d24(%rip), %rsi     # 0xee3f0
leaq 0x8378c(%rip), %rdx     # 0x118e5f
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x58945(%rip), %rsi     # 0xee034
leaq 0x8329b(%rip), %rdx     # 0x118991
movq %rbx, %rdi
movl $0x1e9, %ecx            # imm = 0x1E9
jmp 0x95b56
movq 0x18(%rsp), %rax
movl 0x848(%rax), %r14d
movsd (%rbx), %xmm0
callq 0x82c0
subsd 0x10(%rsp), %xmm0
movl $0x1, %ebp
leaq 0x38(%rsp), %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0x943b4
testl %eax, %eax
je 0x957fd
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x58ca2(%rip), %rsi     # 0xee3f0
leaq 0x83770(%rip), %rdx     # 0x118ec5
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x588c3(%rip), %rsi     # 0xee034
leaq 0x83219(%rip), %rdx     # 0x118991
movq %rbx, %rdi
movl $0x1f1, %ecx            # imm = 0x1F1
jmp 0x95b56
movq %r14, 0x40(%rsp)
cmpw $0x0, 0x328(%rbx)
jle 0x957a0
leaq 0x85a94(%rip), %rdi     # 0x11b22f
callq 0x8510
movq 0x18(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x97a3b
testl %eax, %eax
je 0x954b0
leaq 0x32a(%rbx), %r14
leaq 0x58c2a(%rip), %rsi     # 0xee3f0
leaq 0x83548(%rip), %rdx     # 0x118d15
leaq 0x80(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x5884b(%rip), %rsi     # 0xee034
leaq 0x831a1(%rip), %rdx     # 0x118991
movq %r14, %rdi
movl $0x1b6, %ecx            # imm = 0x1B6
jmp 0x95097
movsd 0x28(%rsp), %xmm0
callq 0x8670
movsd %xmm0, 0x20(%rbx)
movsd 0x30(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
movsd 0x10(%rsp), %xmm3
movapd %xmm3, %xmm4
addsd %xmm3, %xmm4
movsd %xmm4, 0x8(%rsp)
divsd %xmm4, %xmm2
addsd 0x58a1f(%rip), %xmm2    # 0xee260
movsd %xmm2, 0x28(%rbx)
movsd 0x28(%rsp), %xmm2
addsd %xmm2, %xmm2
subsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movapd %xmm3, %xmm1
mulsd %xmm3, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x30(%rbx)
movq 0x18(%rsp), %rax
movl 0x848(%rax), %r14d
movsd (%rbx), %xmm0
callq 0x82c0
addsd 0x8(%rsp), %xmm0
movl $0x1, %ebp
leaq 0x60(%rsp), %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0x943b4
testl %eax, %eax
je 0x958e7
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x58b40(%rip), %rsi     # 0xee3f0
leaq 0x83675(%rip), %rdx     # 0x118f2c
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x58761(%rip), %rsi     # 0xee034
leaq 0x830b7(%rip), %rdx     # 0x118991
movq %rbx, %rdi
movl $0x208, %ecx            # imm = 0x208
jmp 0x95b56
movq 0x18(%rsp), %rax
movl 0x848(%rax), %r14d
movsd (%rbx), %xmm0
callq 0x82c0
subsd 0x8(%rsp), %xmm0
movl $0x1, %ebp
leaq 0x68(%rsp), %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0x943b4
testl %eax, %eax
je 0x95965
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x58ac2(%rip), %rsi     # 0xee3f0
leaq 0x83664(%rip), %rdx     # 0x118f99
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x586e3(%rip), %rsi     # 0xee034
leaq 0x83039(%rip), %rdx     # 0x118991
movq %rbx, %rdi
movl $0x210, %ecx            # imm = 0x210
jmp 0x95b56
movsd 0x60(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
addsd %xmm1, %xmm1
subsd %xmm1, %xmm0
movsd 0x38(%rsp), %xmm1
addsd %xmm1, %xmm1
addsd %xmm0, %xmm1
subsd 0x68(%rsp), %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x59ce5(%rip), %xmm1    # 0xef680
movsd 0x10(%rsp), %xmm0
callq 0x8620
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x38(%rbx)
cmpw $0x0, 0x328(%rbx)
movq 0x18(%rsp), %r12
jle 0x959e1
movsd 0x20(%rbx), %xmm0
movsd 0x28(%rbx), %xmm1
movsd 0x30(%rbx), %xmm2
leaq 0x8362e(%rip), %rdi     # 0x119008
movb $0x3, %al
callq 0x8030
cmpw $0x1, 0x12(%r12)
jne 0x95be7
movl 0x84c(%r12), %r14d
movsd (%rbx), %xmm0
callq 0x82c0
movl $0x1, %ebp
leaq 0x28(%rsp), %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0x943b4
testl %eax, %eax
je 0x95a62
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x589c5(%rip), %rsi     # 0xee3f0
leaq 0x835f6(%rip), %rdx     # 0x119028
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x585e6(%rip), %rsi     # 0xee034
leaq 0x82f3c(%rip), %rdx     # 0x118991
movq %rbx, %rdi
movl $0x229, %ecx            # imm = 0x229
jmp 0x95b56
movq 0x18(%rsp), %rax
movl 0x84c(%rax), %r14d
movsd (%rbx), %xmm0
callq 0x82c0
addsd 0x10(%rsp), %xmm0
movl $0x1, %ebp
leaq 0x30(%rsp), %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0x943b4
testl %eax, %eax
je 0x95add
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x58947(%rip), %rsi     # 0xee3f0
leaq 0x835da(%rip), %rdx     # 0x11908a
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x58568(%rip), %rsi     # 0xee034
leaq 0x82ebe(%rip), %rdx     # 0x118991
movq %rbx, %rdi
movl $0x231, %ecx            # imm = 0x231
jmp 0x95b56
movq 0x18(%rsp), %rax
movl 0x84c(%rax), %r14d
movsd (%rbx), %xmm0
callq 0x82c0
subsd 0x10(%rsp), %xmm0
movl $0x1, %ebp
leaq 0x38(%rsp), %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0x943b4
testl %eax, %eax
je 0x95b65
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x588cc(%rip), %rsi     # 0xee3f0
leaq 0x835c5(%rip), %rdx     # 0x1190f0
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x584ed(%rip), %rsi     # 0xee034
leaq 0x82e43(%rip), %rdx     # 0x118991
movq %rbx, %rdi
movl $0x239, %ecx            # imm = 0x239
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
jmp 0x94f2a
movsd 0x28(%rsp), %xmm0
callq 0x8670
movsd 0x30(%rsp), %xmm2
movsd 0x38(%rsp), %xmm1
movapd %xmm2, %xmm3
subsd %xmm1, %xmm3
movsd 0x10(%rsp), %xmm5
movapd %xmm5, %xmm4
addsd %xmm5, %xmm4
unpcklpd %xmm3, %xmm0            # xmm0 = xmm0[0],xmm3[0]
movsd 0x20(%rbx), %xmm3
unpcklpd %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0]
divpd %xmm3, %xmm0
movupd %xmm0, 0x40(%rbx)
movsd 0x28(%rsp), %xmm3
addsd %xmm3, %xmm3
subsd %xmm3, %xmm2
addsd %xmm1, %xmm2
mulsd %xmm5, %xmm5
divsd %xmm5, %xmm2
movsd %xmm2, 0x50(%rbx)
cmpw $0x0, 0x328(%rbx)
jle 0x95be7
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
leaq 0x83577(%rip), %rdi     # 0x119157
movb $0x3, %al
callq 0x8030
movw $0x1, 0xb48(%rbx)
xorl %ebp, %ebp
jmp 0x94f2a