// File: /workspace/github_c_makefile_star2_O2/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 $0x1098, %rsp           # imm = 0x1098
movq %rdx, %rbx
cmpw $0x0, (%rsi)
je 0x90101
movq %rsi, %r13
movq %rdi, %r15
cmpw $0x0, 0x328(%rbx)
jle 0x90041
leaq 0x7f795(%rip), %rdi     # 0x10f7cf
xorl %eax, %eax
callq 0x8030
leaq 0x10(%rbx), %rcx
leaq 0x9e8(%r13), %rax
cmpl $0x1, 0x8(%rbx)
cmoveq %rcx, %rax
movsd 0x9e0(%r13), %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm0, %xmm2
jae 0x90129
movsd (%rax), %xmm1
ucomisd %xmm1, %xmm2
jae 0x90187
xorpd %xmm3, %xmm3
ucomisd (%rbx), %xmm3
jae 0x901e5
movsd 0x680(%r15), %xmm2
ucomisd %xmm2, %xmm3
jae 0x90243
movsd 0x551be(%rip), %xmm3    # 0xe5260
ucomisd %xmm2, %xmm3
jae 0x9029e
movq %rbx, %rdi
callq 0x90f3a
testl %eax, %eax
je 0x9031c
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x55326(%rip), %rsi     # 0xe53f0
leaq 0x7f92b(%rip), %rdx     # 0x10f9fc
leaq 0x90(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x54f47(%rip), %rsi     # 0xe5034
leaq 0x7f73d(%rip), %rdx     # 0x10f831
movq %rbx, %rdi
movl $0x127, %ecx            # imm = 0x127
jmp 0x9036b
andl $0x0, 0x290(%rbx)
xorl %ebp, %ebp
cmpw $0x0, 0x328(%rbx)
jle 0x90308
leaq 0x81ff9(%rip), %rdi     # 0x112118
callq 0x8540
jmp 0x90308
leaq 0x7f6bc(%rip), %rsi     # 0x10f7ec
leaq 0x90(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x54f39(%rip), %rsi     # 0xe5082
leaq 0x7f6d5(%rip), %rdx     # 0x10f825
leaq 0x890(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x54ec1(%rip), %rsi     # 0xe5034
leaq 0x7f6b7(%rip), %rdx     # 0x10f831
movq %rbx, %rdi
movl $0x10c, %ecx            # imm = 0x10C
jmp 0x902fb
leaq 0x7f6b3(%rip), %rsi     # 0x10f841
leaq 0x90(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x54edb(%rip), %rsi     # 0xe5082
leaq 0x7f6cc(%rip), %rdx     # 0x10f87a
leaq 0x890(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x54e63(%rip), %rsi     # 0xe5034
leaq 0x7f659(%rip), %rdx     # 0x10f831
movq %rbx, %rdi
movl $0x110, %ecx            # imm = 0x110
jmp 0x902fb
leaq 0x7f69a(%rip), %rsi     # 0x10f886
leaq 0x90(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x54e7d(%rip), %rsi     # 0xe5082
leaq 0x7f6b5(%rip), %rdx     # 0x10f8c1
leaq 0x890(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x54e05(%rip), %rsi     # 0xe5034
leaq 0x7f5fb(%rip), %rdx     # 0x10f831
movq %rbx, %rdi
movl $0x114, %ecx            # imm = 0x114
jmp 0x902fb
leaq 0x7f68a(%rip), %rsi     # 0x10f8d4
leaq 0x90(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x54e1f(%rip), %rsi     # 0xe5082
leaq 0x7f6b5(%rip), %rdx     # 0x10f91f
leaq 0x890(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x54da7(%rip), %rsi     # 0xe5034
leaq 0x7f59d(%rip), %rdx     # 0x10f831
movq %rbx, %rdi
movl $0x118, %ecx            # imm = 0x118
jmp 0x902fb
leaq 0x7f69d(%rip), %rsi     # 0x10f942
leaq 0x90(%rsp), %r14
movq %r14, %rdi
movapd %xmm2, %xmm0
movb $0x1, %al
callq 0x2e014
leaq 0x54dc0(%rip), %rsi     # 0xe5082
leaq 0x7f6f5(%rip), %rdx     # 0x10f9be
leaq 0x890(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x54d48(%rip), %rsi     # 0xe5034
leaq 0x7f53e(%rip), %rdx     # 0x10f831
movq %rbx, %rdi
movl $0x11d, %ecx            # imm = 0x11D
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x1098, %rsp           # imm = 0x1098
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
movq %rbx, %rsi
callq 0x910b7
testl %eax, %eax
je 0x90370
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x550b7(%rip), %rsi     # 0xe53f0
leaq 0x7f706(%rip), %rdx     # 0x10fa46
leaq 0x90(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x54cd8(%rip), %rsi     # 0xe5034
leaq 0x7f4ce(%rip), %rdx     # 0x10f831
movq %rbx, %rdi
movl $0x12e, %ecx            # imm = 0x12E
movq %r14, %r8
jmp 0x902fe
movl 0x18(%rbx), %eax
leal -0x2(%rax), %ecx
cmpl $0x3, %ecx
movq %r13, 0x20(%rsp)
jae 0x903f6
movq %rbx, %rdi
callq 0x92004
cmpw $0x0, 0x328(%rbx)
jle 0x9039e
leaq 0x81d52(%rip), %rdi     # 0x1120eb
callq 0x8540
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x9207f
testl %eax, %eax
je 0x9096b
leaq 0x32a(%rbx), %r14
leaq 0x5502e(%rip), %rsi     # 0xe53f0
leaq 0x7f6c6(%rip), %rdx     # 0x10fa8f
leaq 0x90(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x54c4f(%rip), %rsi     # 0xe5034
leaq 0x7f445(%rip), %rdx     # 0x10f831
movq %r14, %rdi
movl $0x19c, %ecx            # imm = 0x19C
jmp 0x90470
cmpl $0x5, %eax
je 0x90487
testl %eax, %eax
jne 0x904fd
cmpw $0x0, 0x328(%rbx)
jle 0x9041d
leaq 0x81ceb(%rip), %rdi     # 0x112103
callq 0x8540
movq %r13, %rdi
movq %rbx, %rsi
callq 0x91488
testl %eax, %eax
je 0x905b9
leaq 0x32a(%rbx), %r14
leaq 0x54fb2(%rip), %rsi     # 0xe53f0
leaq 0x7f61e(%rip), %rdx     # 0x10fa63
leaq 0x90(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x54bd3(%rip), %rsi     # 0xe5034
leaq 0x7f3c9(%rip), %rdx     # 0x10f831
movq %r14, %rdi
movl $0x13b, %ecx            # imm = 0x13B
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
movq %rbx, %rdi
callq 0x91ee1
jmp 0x90305
cmpw $0x0, 0xe(%r13)
je 0x9055b
cmpw $0x1, 0x10(%r13)
jne 0x9087e
leaq 0x7f65d(%rip), %rsi     # 0x10fb03
leaq 0x90(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x54bc3(%rip), %rsi     # 0xe5082
leaq 0x6d833(%rip), %rdx     # 0xfdcf9
leaq 0x890(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x54b4b(%rip), %rsi     # 0xe5034
leaq 0x7f341(%rip), %rdx     # 0x10f831
movq %rbx, %rdi
movl $0x1aa, %ecx            # imm = 0x1AA
jmp 0x902fb
leaq 0x7f6dc(%rip), %rsi     # 0x10fbe0
leaq 0x90(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x54b65(%rip), %rsi     # 0xe5082
leaq 0x7f6e4(%rip), %rdx     # 0x10fc08
leaq 0x890(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x54aed(%rip), %rsi     # 0xe5034
leaq 0x7f2e3(%rip), %rdx     # 0x10f831
movq %rbx, %rdi
movl $0x1bd, %ecx            # imm = 0x1BD
jmp 0x902fb
leaq 0x7f55f(%rip), %rsi     # 0x10fac1
leaq 0x90(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x54b07(%rip), %rsi     # 0xe5082
leaq 0x6d71f(%rip), %rdx     # 0xfdca1
leaq 0x890(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x54a8f(%rip), %rsi     # 0xe5034
leaq 0x7f285(%rip), %rdx     # 0x10f831
movq %rbx, %rdi
movl $0x1a6, %ecx            # imm = 0x1A6
jmp 0x902fb
xorl %edx, %edx
movq %r15, 0x60(%rsp)
movslq 0x290(%rbx), %rax
cmpq %rax, %rdx
jge 0x9096b
movq 0x298(%rbx), %rax
movsd (%rax,%rdx,8), %xmm0
movq %rdx, 0x10(%rsp)
callq 0x86a0
movq 0x10(%rsp), %rdx
xorl %r15d, %r15d
movsd %xmm0, 0x18(%rsp)
movslq 0x854(%r13), %rax
cmpq %rax, %r15
jge 0x90871
movq 0x280(%rbx), %rax
movl (%rax,%r15,4), %r14d
xorl %ecx, %ecx
pushq $0x2
popq %rax
xorl %r13d, %r13d
cmpl %r14d, %r13d
jge 0x90864
movl %eax, 0x54(%rsp)
movl %ecx, 0x58(%rsp)
movl %ecx, %eax
shrl %eax
negl %eax
movq %rax, 0x68(%rsp)
leal 0x1(%r13), %eax
movl %eax, 0x50(%rsp)
imull %r13d, %eax
shrl %eax
movl %eax, 0x5c(%rsp)
xorl %r12d, %r12d
movl %r13d, %ebp
cmpl %r14d, %ebp
jge 0x9084b
cmpl %ebp, %r13d
jbe 0x9066d
imull %ebp, %r14d
addl %r13d, %r14d
leal 0x1(%rbp), %eax
imull %ebp, %eax
shrl %eax
subl %eax, %r14d
jmp 0x9067b
imull %r13d, %r14d
movq 0x68(%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 0x90813
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
movsd 0x18(%rsp), %xmm0
leaq 0x890(%rsp), %rcx
callq 0x8febd
testl %r12d, %r12d
je 0x90749
movq 0x280(%rbx), %rax
movl (%rax,%r15,4), %edx
incl %edx
imull %r13d, %edx
subl 0x5c(%rsp), %edx
movq %rbx, %rdi
movl %r15d, %esi
movsd 0x18(%rsp), %xmm0
leaq 0x88(%rsp), %rcx
callq 0x8febd
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 0x18(%rsp), %xmm0
leaq 0x80(%rsp), %rcx
callq 0x8febd
movsd 0x890(%rsp), %xmm1
movsd 0x88(%rsp), %xmm2
mulsd 0x80(%rsp), %xmm2
ucomisd 0x54b17(%rip), %xmm2    # 0xe5258
jb 0x90761
sqrtsd %xmm2, %xmm0
jmp 0x90782
movsd 0x890(%rsp), %xmm0
callq 0x82e0
movq 0x10(%rsp), %rdx
jmp 0x90813
movapd %xmm2, %xmm0
movsd %xmm1, 0x28(%rsp)
movsd %xmm2, 0x48(%rsp)
callq 0x82d0
movsd 0x48(%rsp), %xmm2
movsd 0x28(%rsp), %xmm1
movq 0x10(%rsp), %rdx
ucomisd %xmm0, %xmm1
movsd 0x54acd(%rip), %xmm0    # 0xe5260
ja 0x90813
ucomisd 0x54abb(%rip), %xmm2    # 0xe5258
jb 0x907a5
sqrtsd %xmm2, %xmm0
jmp 0x907cb
movapd %xmm2, %xmm0
movsd %xmm1, 0x28(%rsp)
movsd %xmm2, 0x48(%rsp)
callq 0x82d0
movsd 0x48(%rsp), %xmm2
movsd 0x28(%rsp), %xmm1
movq 0x10(%rsp), %rdx
xorpd 0x54a5d(%rip), %xmm0    # 0xe5230
ucomisd %xmm1, %xmm0
movsd 0x55009(%rip), %xmm0    # 0xe57e8
ja 0x90813
ucomisd 0x54a6f(%rip), %xmm2    # 0xe5258
jb 0x907f1
sqrtsd %xmm2, %xmm0
jmp 0x9080b
movapd %xmm2, %xmm0
movsd %xmm1, 0x28(%rsp)
callq 0x82d0
movsd 0x28(%rsp), %xmm1
movq 0x10(%rsp), %rdx
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 %edx, %eax
addl %r14d, %eax
cltq
movsd %xmm0, (%rcx,%rax,8)
incl %ebp
movq 0x280(%rbx), %rax
movl (%rax,%r15,4), %r14d
decl %r12d
jmp 0x9064b
movl 0x58(%rsp), %ecx
movl 0x54(%rsp), %eax
addl %eax, %ecx
addl $0x2, %eax
movl 0x50(%rsp), %esi
movl %esi, %r13d
jmp 0x90617
incq %r15
movq 0x20(%rsp), %r13
jmp 0x905f4
incq %rdx
movq 0x60(%rsp), %r15
jmp 0x905c0
cmpw $0x1, 0x16(%r13)
je 0x9089e
cmpw $0x1, 0x18(%r13)
je 0x9089e
cmpw $0x1, 0x1a(%r13)
je 0x9089e
cmpw $0x1, 0x1c(%r13)
jne 0x908fc
leaq 0x7f299(%rip), %rsi     # 0x10fb3e
leaq 0x90(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x547c4(%rip), %rsi     # 0xe5082
leaq 0x6d4f0(%rip), %rdx     # 0xfddb5
leaq 0x890(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x5474c(%rip), %rsi     # 0xe5034
leaq 0x7ef42(%rip), %rdx     # 0x10f831
movq %rbx, %rdi
movl $0x1ae, %ecx            # imm = 0x1AE
jmp 0x902fb
cmpw $0x0, 0x328(%rbx)
jle 0x90912
leaq 0x817c2(%rip), %rdi     # 0x1120cf
callq 0x8540
movq 0x20(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x92cfc
testl %eax, %eax
je 0x9096b
leaq 0x32a(%rbx), %r14
leaq 0x54abc(%rip), %rsi     # 0xe53f0
leaq 0x7f27a(%rip), %rdx     # 0x10fbb5
leaq 0x90(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x546dd(%rip), %rsi     # 0xe5034
leaq 0x7eed3(%rip), %rdx     # 0x10f831
movq %r14, %rdi
movl $0x1b6, %ecx            # imm = 0x1B6
jmp 0x90470
leaq 0x32a(%rbx), %r12
xorl %r14d, %r14d
pushq $0x1
popq %rbp
movslq 0x278(%rbx), %rax
cmpq %rax, %r14
jge 0x90a12
movq 0x298(%rbx), %rdi
movl 0x290(%rbx), %esi
movq 0x2a0(%rbx), %rax
movq (%rax,%r14,8), %rdx
movq 0x288(%rbx), %rax
movl (%rax,%r14,4), %ecx
movq 0x2a8(%rbx), %rax
movq (%rax,%r14,8), %r8
movq %r12, (%rsp)
movl %ebp, %r9d
callq 0x125a5
incq %r14
cmpl $0x1, %eax
jne 0x90978
leaq 0x54a1f(%rip), %rsi     # 0xe53f0
leaq 0x7f235(%rip), %rdx     # 0x10fc0d
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x54640(%rip), %rsi     # 0xe5034
leaq 0x7ee36(%rip), %rdx     # 0x10f831
movq %r12, %rdi
movl $0x1cd, %ecx            # imm = 0x1CD
movq %rbx, %r8
xorl %eax, %eax
callq 0x2e014
jmp 0x90308
cmpl $0x0, 0x18(%rbx)
je 0x90f2a
movsd 0x78904(%rip), %xmm0    # 0x109328
divsd 0x680(%r15), %xmm0
movsd %xmm0, 0x18(%rsp)
cmpw $0x1, 0xe(%r13)
jne 0x90d51
movl 0x848(%r13), %r14d
movsd (%rbx), %xmm0
callq 0x82e0
pushq $0x1
popq %rbp
leaq 0x30(%rsp), %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x8f820
testl %eax, %eax
je 0x90aa6
leaq 0x54981(%rip), %rsi     # 0xe53f0
leaq 0x7f227(%rip), %rdx     # 0x10fc9d
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x545a2(%rip), %rsi     # 0xe5034
leaq 0x7ed98(%rip), %rdx     # 0x10f831
movq %r12, %rdi
movl $0x1e0, %ecx            # imm = 0x1E0
jmp 0x90a03
movl 0x848(%r13), %r14d
movsd (%rbx), %xmm0
callq 0x82e0
addsd 0x18(%rsp), %xmm0
pushq $0x1
popq %rbp
leaq 0x38(%rsp), %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x8f820
testl %eax, %eax
je 0x90b13
leaq 0x54914(%rip), %rsi     # 0xe53f0
leaq 0x7f21c(%rip), %rdx     # 0x10fcff
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x54535(%rip), %rsi     # 0xe5034
leaq 0x7ed2b(%rip), %rdx     # 0x10f831
movq %r12, %rdi
movl $0x1e9, %ecx            # imm = 0x1E9
jmp 0x90a03
movq 0x20(%rsp), %rax
movl 0x848(%rax), %r14d
movsd (%rbx), %xmm0
callq 0x82e0
subsd 0x18(%rsp), %xmm0
pushq $0x1
popq %rbp
leaq 0x40(%rsp), %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x8f820
testl %eax, %eax
je 0x90b85
leaq 0x548a2(%rip), %rsi     # 0xe53f0
leaq 0x7f210(%rip), %rdx     # 0x10fd65
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x544c3(%rip), %rsi     # 0xe5034
leaq 0x7ecb9(%rip), %rdx     # 0x10f831
movq %r12, %rdi
movl $0x1f1, %ecx            # imm = 0x1F1
jmp 0x90a03
movsd 0x30(%rsp), %xmm0
callq 0x86a0
movsd %xmm0, 0x20(%rbx)
movsd 0x38(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
movsd 0x18(%rsp), %xmm3
movapd %xmm3, %xmm4
addsd %xmm3, %xmm4
movsd %xmm4, 0x10(%rsp)
divsd %xmm4, %xmm2
addsd 0x54697(%rip), %xmm2    # 0xe5260
movsd %xmm2, 0x28(%rbx)
movsd 0x30(%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 0x20(%rsp), %rax
movl 0x848(%rax), %r14d
movsd (%rbx), %xmm0
callq 0x82e0
addsd 0x10(%rsp), %xmm0
pushq $0x1
popq %rbp
leaq 0x70(%rsp), %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x8f820
testl %eax, %eax
je 0x90c63
leaq 0x547c4(%rip), %rsi     # 0xe53f0
leaq 0x7f199(%rip), %rdx     # 0x10fdcc
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x543e5(%rip), %rsi     # 0xe5034
leaq 0x7ebdb(%rip), %rdx     # 0x10f831
movq %r12, %rdi
movl $0x208, %ecx            # imm = 0x208
jmp 0x90a03
movq 0x20(%rsp), %rax
movl 0x848(%rax), %r14d
movsd (%rbx), %xmm0
callq 0x82e0
subsd 0x10(%rsp), %xmm0
pushq $0x1
popq %rbp
leaq 0x78(%rsp), %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x8f820
testl %eax, %eax
je 0x90cd5
leaq 0x54752(%rip), %rsi     # 0xe53f0
leaq 0x7f194(%rip), %rdx     # 0x10fe39
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x54373(%rip), %rsi     # 0xe5034
leaq 0x7eb69(%rip), %rdx     # 0x10f831
movq %r12, %rdi
movl $0x210, %ecx            # imm = 0x210
jmp 0x90a03
movsd 0x70(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
addsd %xmm1, %xmm1
subsd %xmm1, %xmm0
movsd 0x40(%rsp), %xmm1
addsd %xmm1, %xmm1
addsd %xmm0, %xmm1
subsd 0x78(%rsp), %xmm1
movsd %xmm1, 0x10(%rsp)
movsd 0x55a3d(%rip), %xmm1    # 0xe6748
movsd 0x18(%rsp), %xmm0
callq 0x8650
movsd 0x10(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x38(%rbx)
cmpw $0x0, 0x328(%rbx)
movq 0x20(%rsp), %r13
jle 0x90d51
movsd 0x20(%rbx), %xmm0
movsd 0x28(%rbx), %xmm1
movsd 0x30(%rbx), %xmm2
leaq 0x7f15e(%rip), %rdi     # 0x10fea8
movb $0x3, %al
callq 0x8030
cmpw $0x1, 0x12(%r13)
jne 0x90f2a
movl 0x84c(%r13), %r14d
movsd (%rbx), %xmm0
callq 0x82e0
pushq $0x1
popq %rbp
leaq 0x30(%rsp), %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x8f820
testl %eax, %eax
je 0x90dc4
leaq 0x54663(%rip), %rsi     # 0xe53f0
leaq 0x7f134(%rip), %rdx     # 0x10fec8
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x54284(%rip), %rsi     # 0xe5034
leaq 0x7ea7a(%rip), %rdx     # 0x10f831
movq %r12, %rdi
movl $0x229, %ecx            # imm = 0x229
jmp 0x90a03
movq 0x20(%rsp), %rax
movl 0x84c(%rax), %r14d
movsd (%rbx), %xmm0
callq 0x82e0
addsd 0x18(%rsp), %xmm0
pushq $0x1
popq %rbp
leaq 0x38(%rsp), %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x8f820
testl %eax, %eax
je 0x90e36
leaq 0x545f1(%rip), %rsi     # 0xe53f0
leaq 0x7f124(%rip), %rdx     # 0x10ff2a
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x54212(%rip), %rsi     # 0xe5034
leaq 0x7ea08(%rip), %rdx     # 0x10f831
movq %r12, %rdi
movl $0x231, %ecx            # imm = 0x231
jmp 0x90a03
movq 0x20(%rsp), %rax
movl 0x84c(%rax), %r14d
movsd (%rbx), %xmm0
callq 0x82e0
subsd 0x18(%rsp), %xmm0
pushq $0x1
popq %rbp
leaq 0x40(%rsp), %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x8f820
testl %eax, %eax
je 0x90ea8
leaq 0x5457f(%rip), %rsi     # 0xe53f0
leaq 0x7f118(%rip), %rdx     # 0x10ff90
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x541a0(%rip), %rsi     # 0xe5034
leaq 0x7e996(%rip), %rdx     # 0x10f831
movq %r12, %rdi
movl $0x239, %ecx            # imm = 0x239
jmp 0x90a03
movsd 0x30(%rsp), %xmm0
callq 0x86a0
movsd 0x38(%rsp), %xmm2
movsd 0x40(%rsp), %xmm1
movapd %xmm2, %xmm3
subsd %xmm1, %xmm3
movsd 0x18(%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 0x30(%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 0x90f2a
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
leaq 0x7f0d4(%rip), %rdi     # 0x10fff7
movb $0x3, %al
callq 0x8030
movw $0x1, 0xb48(%rbx)
xorl %ebp, %ebp
jmp 0x90308