// File: /workspace/github_c_makefile_star2_O2/PoulinV[P]AxiCLASS/build/../source/fourier.c
// Function: fourier_pk_at_z
int fourier_pk_at_z(
                    struct background * pba,
                    struct fourier *pfo,
                    enum linear_or_logarithmic mode,
                    enum pk_outputs pk_output,
                    double z,
                    int index_pk,
                    double * out_pk, // array out_pk[index_k]
                    double * out_pk_ic // array out_pk_ic[index_k * pfo->ic_ic_size + index_ic1_ic2]
                    ) {
  double tau;
  double ln_tau;
  int index_k;
  int index_ic1;
  int index_ic2;
  int index_ic1_ic1;
  int index_ic2_ic2;
  int index_ic1_ic2;
  int last_index;
  short do_ic = _FALSE_;

  /** - check whether we need the decomposition into contributions from each initial condition */

  if ((pk_output == pk_linear) && (pfo->ic_size > 1) && (out_pk_ic != NULL))
    do_ic = _TRUE_;

  class_test(pk_output == pk_nonlinear && pfo->method == nl_none, pfo->error_message, "Cannot get nonlinear power spectrum when no nonlinear method is employed");

  class_test(pk_output == pk_numerical_nowiggle && pfo->has_pk_numerical_nowiggle == _FALSE_, pfo->error_message, "Cannot get nowiggle power spectrum since it was not requested in input");

  class_test(pk_output == pk_analytic_nowiggle && pfo->has_pk_analytic_nowiggle == _FALSE_, pfo->error_message, "Cannot get analytic nowiggle power spectrum since it was not requested in input");

  /** - case z=0 requiring no interpolation in z. The
        pk_analytic_nowiggle can also be computed here because, in the
        current implementation, it is only computed at z=0. */
  if ((z == 0) || (pk_output == pk_analytic_nowiggle)) {

    for (index_k=0; index_k<pfo->k_size; index_k++) {

      switch (pk_output) {

      case pk_linear:
        out_pk[index_k] = pfo->ln_pk_l[index_pk][(pfo->ln_tau_size-1)*pfo->k_size+index_k];
        if (do_ic == _TRUE_) {
          for (index_ic1_ic2 = 0; index_ic1_ic2 < pfo->ic_ic_size; index_ic1_ic2++) {
            out_pk_ic[index_k * pfo->ic_ic_size + index_ic1_ic2] =
              pfo->ln_pk_ic_l[index_pk][((pfo->ln_tau_size-1)*pfo->k_size+index_k)*pfo->ic_ic_size+index_ic1_ic2];
          }
        }
        break;

      case pk_nonlinear:
        out_pk[index_k] = pfo->ln_pk_nl[index_pk][(pfo->ln_tau_size-1)*pfo->k_size+index_k];
        break;

      case pk_numerical_nowiggle:
        out_pk[index_k] = pfo->ln_pk_l_nw_extra[(pfo->ln_tau_size-1)*pfo->k_size_extra+index_k];
        break;

      case pk_analytic_nowiggle:
        out_pk[index_k] = pfo->ln_pk_l_an_extra[index_k];
        break;

      }
    }
  }

  /** - interpolation in z */
  else {

    class_test(pfo->ln_tau_size == 1,
               pfo->error_message,
               "You are asking for the matter power spectrum at z=%e but the code was asked to store it only at z=0. You probably forgot to pass the input parameter z_max_pk (see explanatory.ini)",z);

    /** --> get value of contormal time tau */
    class_call(background_tau_of_z(pba,
                                   z,
                                   &tau),
               pba->error_message,
               pfo->error_message);

    ln_tau = log(tau);
    last_index = pfo->ln_tau_size-1;

    /** -> check that tau is in pre-computed table */

    if (ln_tau <= pfo->ln_tau[0]) {

      /** --> if ln(tau) much too small, raise an error */
      class_test(ln_tau<pfo->ln_tau[0]-100.*_EPSILON_,
                 pfo->error_message,
                 "requested z was not inside of tau tabulation range (Requested ln(tau_=%.10e, Min %.10e). Solution might be to increase input parameter z_max_pk (see explanatory.ini)",ln_tau,pfo->ln_tau[0]);

      /** --> if ln(tau) too small but within tolerance, round it and get right values without interpolating */
      ln_tau = pfo->ln_tau[0];

      for (index_k = 0 ; index_k < pfo->k_size; index_k++) {
        if (pk_output == pk_linear) {
          out_pk[index_k] = pfo->ln_pk_l[index_pk][index_k];
          if (do_ic == _TRUE_) {
            for (index_ic1_ic2 = 0; index_ic1_ic2 < pfo->ic_ic_size; index_ic1_ic2++) {
              out_pk_ic[index_k * pfo->ic_ic_size + index_ic1_ic2] = pfo->ln_pk_ic_l[index_pk][index_k * pfo->ic_ic_size + index_ic1_ic2];
            }
          }
        }
        else if (pk_output == pk_nonlinear) {
          out_pk[index_k] = pfo->ln_pk_nl[index_pk][index_k];
        }
        else {
          out_pk[index_k] = pfo->ln_pk_l_nw_extra[index_k];
        }
      }
    }

    else if (ln_tau >= pfo->ln_tau[pfo->ln_tau_size-1]) {

      /** --> if ln(tau) much too large, raise an error */
      class_test(ln_tau>pfo->ln_tau[pfo->ln_tau_size-1]+_EPSILON_,
                 pfo->error_message,
                 "requested z was not inside of tau tabulation range (Requested ln(tau_=%.10e, Max %.10e) ",ln_tau,pfo->ln_tau[pfo->ln_tau_size-1]);

      /** --> if ln(tau) too large but within tolerance, round it and get right values without interpolating */
      ln_tau = pfo->ln_tau[pfo->ln_tau_size-1];

      for (index_k = 0 ; index_k < pfo->k_size; index_k++) {
        if (pk_output == pk_linear) {
          out_pk[index_k] = pfo->ln_pk_l[index_pk][(pfo->ln_tau_size-1) * pfo->k_size + index_k];
          if (do_ic == _TRUE_) {
            for (index_ic1_ic2 = 0; index_ic1_ic2 < pfo->ic_ic_size; index_ic1_ic2++) {
              out_pk_ic[index_k * pfo->ic_ic_size + index_ic1_ic2] = pfo->ln_pk_ic_l[index_pk][((pfo->ln_tau_size-1) * pfo->k_size + index_k) * pfo->ic_ic_size + index_ic1_ic2];
            }
          }
        }
        else if (pk_output == pk_nonlinear) {
          out_pk[index_k] = pfo->ln_pk_nl[index_pk][(pfo->ln_tau_size-1) * pfo->k_size + index_k];
        }
        else {
          out_pk[index_k] = pfo->ln_pk_l_nw_extra[(pfo->ln_tau_size-1) * pfo->k_size_extra + index_k];
        }
      }
    }

    /** -> tau is in pre-computed table: interpolate */
    else {

      if (pk_output == pk_linear) {

        /** --> interpolate P_l(k) at tau from pre-computed array */
        class_call(array_interpolate_spline(pfo->ln_tau,
                                            pfo->ln_tau_size,
                                            pfo->ln_pk_l[index_pk],
                                            pfo->ddln_pk_l[index_pk],
                                            pfo->k_size,
                                            ln_tau,
                                            &last_index,
                                            out_pk,
                                            pfo->k_size,
                                            pfo->error_message),
                   pfo->error_message,
                   pfo->error_message);

        /** --> interpolate P_ic_l(k) at tau from pre-computed array */
        if (do_ic == _TRUE_) {
          class_call(array_interpolate_spline(pfo->ln_tau,
                                              pfo->ln_tau_size,
                                              pfo->ln_pk_ic_l[index_pk],
                                              pfo->ddln_pk_ic_l[index_pk],
                                              pfo->k_size*pfo->ic_ic_size,
                                              ln_tau,
                                              &last_index,
                                              out_pk_ic,
                                              pfo->k_size*pfo->ic_ic_size,
                                              pfo->error_message),
                     pfo->error_message,
                     pfo->error_message);
        }
      }

      else if (pk_output == pk_nonlinear) {

        if (ln_tau < pfo->ln_tau[pfo->ln_tau_size-pfo->ln_tau_size_nl]) {
          /** --> we requested P_nl(k) at tau where P_l is computed but the NL correction is NOT -> Return P_l */
          class_call(array_interpolate_spline(pfo->ln_tau,
                                              pfo->ln_tau_size,
                                              pfo->ln_pk_l[index_pk],
                                              pfo->ddln_pk_l[index_pk],
                                              pfo->k_size,
                                              ln_tau,
                                              &last_index,
                                              out_pk,
                                              pfo->k_size,
                                              pfo->error_message),
                     pfo->error_message,
                     pfo->error_message);

        }
        else {
          /** --> interpolate P_nl(k) at tau from pre-computed array */
          class_call(array_interpolate_spline(pfo->ln_tau+(pfo->ln_tau_size-pfo->ln_tau_size_nl),
                                              pfo->ln_tau_size_nl,
                                              pfo->ln_pk_nl[index_pk]+(pfo->ln_tau_size-pfo->ln_tau_size_nl)*pfo->k_size,
                                              pfo->ddln_pk_nl[index_pk]+(pfo->ln_tau_size-pfo->ln_tau_size_nl)*pfo->k_size,
                                              pfo->k_size,
                                              ln_tau,
                                              &last_index,
                                              out_pk,
                                              pfo->k_size,
                                              pfo->error_message),
                     pfo->error_message,
                     pfo->error_message);
        }
      }
      else {

        /** --> interpolate P_l_nw(k) at tau from pre-computed array */
        class_call(array_interpolate_spline(pfo->ln_tau,
                                            pfo->ln_tau_size,
                                            pfo->ln_pk_l_nw_extra,
                                            pfo->ddln_pk_l_nw_extra,
                                            pfo->k_size_extra,
                                            ln_tau,
                                            &last_index,
                                            out_pk,
                                            pfo->k_size,
                                            pfo->error_message),
                   pfo->error_message,
                   pfo->error_message);
      }
    }
  }

  /** - so far, all output stored in logarithmic format. Eventually, convert to linear one. */

  if (mode == linear) {

    /** --> loop over k */
    for (index_k=0; index_k<pfo->k_size; index_k++) {

      /** --> convert total spectrum */
      out_pk[index_k] = exp(out_pk[index_k]);

      if (do_ic == _TRUE_) {
        /** --> convert contribution of each ic (diagonal elements) */
        for (index_ic1=0; index_ic1 < pfo->ic_size; index_ic1++) {
          index_ic1_ic1 = index_symmetric_matrix(index_ic1,index_ic1,pfo->ic_size);

          out_pk_ic[index_k * pfo->ic_ic_size + index_ic1_ic1] = exp(out_pk_ic[index_k * pfo->ic_ic_size + index_ic1_ic1]);
        }

        /** --> convert contribution of each ic (non-diagonal elements) */
        for (index_ic1=0; index_ic1 < pfo->ic_size; index_ic1++) {
          for (index_ic2=index_ic1+1; index_ic2 < pfo->ic_size; index_ic2++) {
            index_ic1_ic1 = index_symmetric_matrix(index_ic1,index_ic1,pfo->ic_size);
            index_ic2_ic2 = index_symmetric_matrix(index_ic2,index_ic2,pfo->ic_size);
            index_ic1_ic2 = index_symmetric_matrix(index_ic1,index_ic2,pfo->ic_size);

            /* P_ic1xic2 = cos(angle) * sqrt(P_ic1 * P_ic2) */
            out_pk_ic[index_k * pfo->ic_ic_size + index_ic1_ic2]
              = out_pk_ic[index_k * pfo->ic_ic_size + index_ic1_ic2]
              *sqrt(out_pk_ic[index_k * pfo->ic_ic_size + index_ic1_ic1]
                    *out_pk_ic[index_k * pfo->ic_ic_size + index_ic2_ic2]);
          }
        }
      }
    }
  }

  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1058, %rsp           # imm = 0x1058
movq %r9, %r14
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %rbx
movslq %r8d, %r12
testl %ecx, %ecx
movq %rsi, 0x10(%rsp)
movq %r9, 0x28(%rsp)
je 0x981e9
cmpl $0x3, %r15d
je 0x983e9
cmpl $0x2, %r15d
je 0x98207
cmpl $0x1, %r15d
jne 0x98212
cmpl $0x0, (%rbx)
je 0x985f8
movb $0x1, %r13b
jmp 0x98215
cmpl $0x2, 0x40(%rbx)
setge %al
cmpq $0x0, 0x1090(%rsp)
setne %dl
andb %al, %dl
movl %edx, 0xc(%rsp)
xorl %r13d, %r13d
jmp 0x9821d
cmpw $0x0, 0x3a(%rbx)
je 0x98551
xorl %r13d, %r13d
movl $0x0, 0xc(%rsp)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x98385
jp 0x98385
movl 0x6c(%rbx), %eax
xorl %ecx, %ecx
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
movl %r15d, %esi
leaq 0x79f96(%rip), %rdi     # 0x1121e0
cmpq %rdx, %rcx
je 0x98b76
cmpl $0x3, %r15d
ja 0x9837d
movslq (%rdi,%rsi,4), %r8
addq %rdi, %r8
jmpq *%r8
movq 0x10(%rsp), %r9
movq 0xa8(%r9), %r8
movq (%r8,%r12,8), %r8
movl 0x90(%r9), %r9d
decl %r9d
imull %eax, %r9d
leal (%rcx,%r9), %r10d
movslq %r10d, %r10
movsd (%r8,%r10,8), %xmm0
movsd %xmm0, (%r14,%rcx,8)
cmpb $0x0, 0xc(%rsp)
je 0x9837d
movq 0x10(%rsp), %r8
movl 0x44(%r8), %r10d
testl %r10d, %r10d
movl $0x0, %r8d
cmovgl %r10d, %r8d
addl %ecx, %r9d
imull %r10d, %r9d
imull %ecx, %r10d
movslq %r10d, %r10
movq 0x1090(%rsp), %r11
leaq (%r11,%r10,8), %r10
movslq %r9d, %r9
shlq $0x3, %r9
xorl %r11d, %r11d
cmpq %r11, %r8
je 0x9837d
movq 0x10(%rsp), %rbx
movq 0x98(%rbx), %rbx
movq (%rbx,%r12,8), %rbx
addq %r9, %rbx
movsd (%rbx,%r11,8), %xmm0
movsd %xmm0, (%r10,%r11,8)
incq %r11
jmp 0x982dd
movq 0x10(%rsp), %r9
movl 0x90(%r9), %r8d
decl %r8d
imull 0x104(%r9), %r8d
addl %ecx, %r8d
movslq %r8d, %r8
shlq $0x3, %r8
addq 0x130(%r9), %r8
jmp 0x98372
leaq (,%rcx,8), %r8
movq 0x10(%rsp), %r9
addq 0x118(%r9), %r8
jmp 0x98372
movq 0x10(%rsp), %r8
movq 0xb8(%r8), %r9
movl 0x90(%r8), %r8d
decl %r8d
imull %eax, %r8d
addl %ecx, %r8d
movslq %r8d, %r8
shlq $0x3, %r8
addq (%r9,%r12,8), %r8
movsd (%r8), %xmm0
movsd %xmm0, (%r14,%rcx,8)
incq %rcx
jmp 0x9824a
cmpl $0x1, 0x90(%rbx)
jne 0x98401
leaq 0x7a035(%rip), %rsi     # 0x1123ca
leaq 0x50(%rsp), %r14
movq %r14, %rdi
movb $0x1, %al
callq 0x2e014
leaq 0x4ccd7(%rip), %rsi     # 0xe5082
leaq 0x7a0cc(%rip), %rdx     # 0x11247e
leaq 0x850(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0x4cc5f(%rip), %rsi     # 0xe5034
leaq 0x79ea9(%rip), %rdx     # 0x112285
movq %rbx, %rdi
movl $0x8e, %ecx
jmp 0x9864c
cmpw $0x0, 0x38(%rbx)
je 0x985a6
movl $0x0, 0xc(%rsp)
jmp 0x98231
leaq 0x48(%rsp), %rsi
movq %rdi, %rbx
callq 0x58adb
cmpl $0x1, %eax
jne 0x98461
addq $0xd1c, %rbx            # imm = 0xD1C
leaq 0x4cfcf(%rip), %rsi     # 0xe53f0
leaq 0x708b7(%rip), %rdx     # 0x108cdf
leaq 0x50(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
movq 0x10(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x4cbe7(%rip), %rsi     # 0xe5034
leaq 0x79e31(%rip), %rdx     # 0x112285
movl $0x95, %ecx
movq %r14, %r8
jmp 0x9864f
movsd 0x48(%rsp), %xmm0
callq 0x82e0
movq 0x10(%rsp), %rbx
movslq 0x90(%rbx), %rsi
leal -0x1(%rsi), %r9d
movl %r9d, 0x1c(%rsp)
movq 0x88(%rbx), %rdi
movsd (%rdi), %xmm1
ucomisd %xmm0, %xmm1
jae 0x9865e
movsd -0x8(%rdi,%rsi,8), %xmm1
ucomisd %xmm1, %xmm0
jae 0x986d7
testl %r15d, %r15d
je 0x98937
testb %r13b, %r13b
je 0x989ba
movl 0x94(%rbx), %eax
movl %esi, %ecx
subl %eax, %ecx
movslq %ecx, %rcx
movsd (%rdi,%rcx,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x98ade
movq 0xa8(%rbx), %rax
movq (%rax,%r12,8), %rdx
movq 0xb0(%rbx), %rax
movq (%rax,%r12,8), %rcx
movl 0x6c(%rbx), %r8d
leaq 0x192(%rbx), %r15
subq $0x8, %rsp
leaq 0x24(%rsp), %r9
pushq %r15
pushq %r8
pushq %r14
callq 0x1604b
addq $0x20, %rsp
cmpl $0x1, %eax
jne 0x98b76
leaq 0x4ced3(%rip), %rsi     # 0xe53f0
leaq 0x7a0c5(%rip), %rdx     # 0x1125e9
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x4caf7(%rip), %rsi     # 0xe5034
leaq 0x79d41(%rip), %rdx     # 0x112285
movq %r15, %rdi
movl $0x107, %ecx            # imm = 0x107
jmp 0x98b66
leaq 0x79d3d(%rip), %rsi     # 0x112295
leaq 0x50(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x4cb14(%rip), %rsi     # 0xe5082
leaq 0x79d67(%rip), %rdx     # 0x1122dc
leaq 0x850(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0x4ca9c(%rip), %rsi     # 0xe5034
leaq 0x79ce6(%rip), %rdx     # 0x112285
pushq $0x62
jmp 0x98648
leaq 0x79d7f(%rip), %rsi     # 0x11232c
leaq 0x50(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x4cabf(%rip), %rsi     # 0xe5082
leaq 0x79db2(%rip), %rdx     # 0x11237c
leaq 0x850(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0x4ca47(%rip), %rsi     # 0xe5034
leaq 0x79c91(%rip), %rdx     # 0x112285
pushq $0x64
jmp 0x98648
leaq 0x79c09(%rip), %rsi     # 0x112208
leaq 0x50(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x4ca6d(%rip), %rsi     # 0xe5082
leaq 0x79c35(%rip), %rdx     # 0x112251
leaq 0x850(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0x4c9f5(%rip), %rsi     # 0xe5034
leaq 0x79c3f(%rip), %rdx     # 0x112285
pushq $0x60
popq %rcx
movq %rbx, %rdi
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
pushq $0x1
popq %rax
jmp 0x98d2d
movsd 0x79b4a(%rip), %xmm2    # 0x1121b0
addsd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
movq 0x1090(%rsp), %r10
jbe 0x98748
leaq 0x79e11(%rip), %rsi     # 0x112494
leaq 0x50(%rsp), %r14
movq %r14, %rdi
movb $0x2, %al
callq 0x2e014
leaq 0x4c9e9(%rip), %rsi     # 0xe5082
leaq 0x79e9a(%rip), %rdx     # 0x11253a
leaq 0x850(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0x4c971(%rip), %rsi     # 0xe5034
leaq 0x79bbb(%rip), %rdx     # 0x112285
movq %rbx, %rdi
movl $0xa1, %ecx
jmp 0x9864c
movsd 0x51459(%rip), %xmm2    # 0xe9b38
addsd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jbe 0x987f2
leaq 0x79e6b(%rip), %rsi     # 0x11255f
leaq 0x50(%rsp), %r14
movq %r14, %rdi
movb $0x2, %al
callq 0x2e014
leaq 0x4c978(%rip), %rsi     # 0xe5082
leaq 0x79ea7(%rip), %rdx     # 0x1125b8
leaq 0x850(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0x4c900(%rip), %rsi     # 0xe5034
leaq 0x79b4a(%rip), %rdx     # 0x112285
movq %rbx, %rdi
movl $0xbd, %ecx
jmp 0x9864c
movl 0x6c(%rbx), %eax
leaq 0x130(%rbx), %rcx
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
leaq (,%r12,8), %rsi
cmpq %rax, %rdx
je 0x98b76
testl %r15d, %r15d
je 0x98791
movq %rcx, %rdi
testb %r13b, %r13b
je 0x98781
movq 0xb8(%rbx), %rdi
addq %rsi, %rdi
movq (%rdi), %rdi
movsd (%rdi,%rdx,8), %xmm0
movsd %xmm0, (%r14,%rdx,8)
jmp 0x987ea
movq 0xa8(%rbx), %rdi
movq (%rdi,%r12,8), %rdi
movsd (%rdi,%rdx,8), %xmm0
movsd %xmm0, (%r14,%rdx,8)
cmpb $0x0, 0xc(%rsp)
je 0x987ea
movl 0x44(%rbx), %r8d
testl %r8d, %r8d
movl $0x0, %edi
cmovgl %r8d, %edi
movl %edx, %r9d
imull %r8d, %r9d
movslq %r9d, %r8
subq $0x1, %rdi
jb 0x987ea
movq 0x98(%rbx), %r9
movq (%r9,%r12,8), %r9
movsd (%r9,%r8,8), %xmm0
movsd %xmm0, (%r10,%r8,8)
incq %r8
jmp 0x987c8
incq %rdx
jmp 0x98761
movl 0x6c(%rbx), %eax
leaq 0x130(%rbx), %rcx
movq %rcx, 0x20(%rsp)
movl %eax, %edx
imull %r9d, %edx
movslq %edx, %rdx
xorl %esi, %esi
testl %eax, %eax
cmovlel %esi, %eax
leaq (,%rdx,8), %rdi
leaq (,%r12,8), %rcx
movq %rcx, 0x30(%rsp)
movslq %r9d, %r9
xorl %r10d, %r10d
movl %ebp, %ecx
movl %r13d, %r8d
cmpq %rax, %r10
je 0x9892d
testl %r15d, %r15d
movq 0x28(%rsp), %r14
je 0x98866
testb %r13b, %r13b
je 0x988e7
movq 0x10(%rsp), %r11
movq 0xb8(%r11), %r11
addq 0x30(%rsp), %r11
movq %rdx, %rbx
jmp 0x988fc
movq 0x10(%rsp), %r11
movq 0xa8(%r11), %r11
movq (%r11,%r12,8), %r11
leaq (%r10,%rdx), %rbx
movsd (%r11,%rbx,8), %xmm0
movsd %xmm0, (%r14,%r10,8)
cmpb $0x0, 0xc(%rsp)
je 0x98918
movq 0x10(%rsp), %r11
movslq 0x44(%r11), %r11
testl %r11d, %r11d
movl $0x0, %ebx
cmovgl %r11d, %ebx
movq %rsi, %r14
imulq %r11, %r14
addq 0x1090(%rsp), %r14
imulq %rdi, %r11
xorl %r13d, %r13d
cmpq %r13, %rbx
je 0x98918
movq 0x10(%rsp), %rbp
movq 0x98(%rbp), %rbp
movq (%rbp,%r12,8), %rbp
addq %r11, %rbp
movsd (%rbp,%r13,8), %xmm0
movsd %xmm0, (%r14,%r13,8)
incq %r13
jmp 0x988bc
movq 0x10(%rsp), %r11
movslq 0x104(%r11), %rbx
imulq %r9, %rbx
movq 0x20(%rsp), %r11
leaq (,%r10,8), %r14
addq (%r11), %r14
movsd (%r14,%rbx,8), %xmm0
movq 0x28(%rsp), %r11
movsd %xmm0, (%r11,%r10,8)
incq %r10
addq $0x8, %rsi
addq $0x8, %rdi
movl %ecx, %ebp
movl %r8d, %r13d
jmp 0x98831
movq 0x28(%rsp), %r14
jmp 0x98b76
movq 0xa8(%rbx), %rax
movq (%rax,%r12,8), %rdx
movq 0xb0(%rbx), %rax
movq (%rax,%r12,8), %rcx
movl 0x6c(%rbx), %r8d
leaq 0x192(%rbx), %r15
subq $0x8, %rsp
leaq 0x24(%rsp), %r9
movsd %xmm0, 0x28(%rsp)
pushq %r15
pushq %r8
pushq %r14
callq 0x1604b
addq $0x20, %rsp
cmpl $0x1, %eax
jne 0x98a34
leaq 0x4ca6a(%rip), %rsi     # 0xe53f0
leaq 0x79c5c(%rip), %rdx     # 0x1125e9
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x4c68e(%rip), %rsi     # 0xe5034
leaq 0x798d8(%rip), %rdx     # 0x112285
movq %r15, %rdi
movl $0xe5, %ecx
jmp 0x98b66
movq 0x130(%rbx), %rdx
movq 0x138(%rbx), %rcx
movl 0x6c(%rbx), %eax
movl 0x104(%rbx), %r8d
leaq 0x192(%rbx), %r15
subq $0x8, %rsp
leaq 0x24(%rsp), %r9
pushq %r15
pushq %rax
pushq %r14
callq 0x1604b
addq $0x20, %rsp
cmpl $0x1, %eax
jne 0x98b76
leaq 0x4c9f0(%rip), %rsi     # 0xe53f0
leaq 0x79ebc(%rip), %rdx     # 0x1128c3
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x4c614(%rip), %rsi     # 0xe5034
leaq 0x7985e(%rip), %rdx     # 0x112285
movq %r15, %rdi
movl $0x128, %ecx            # imm = 0x128
jmp 0x98b66
cmpb $0x0, 0xc(%rsp)
je 0x98b6e
movq 0x10(%rsp), %r9
movq 0x88(%r9), %rdi
movl 0x90(%r9), %esi
movq 0x98(%r9), %rax
movq (%rax,%r12,8), %rdx
movq 0xa0(%r9), %rax
movq (%rax,%r12,8), %rcx
movl 0x44(%r9), %r8d
imull 0x6c(%r9), %r8d
subq $0x8, %rsp
leaq 0x24(%rsp), %r9
movsd 0x28(%rsp), %xmm0
pushq %r15
pushq %r8
pushq 0x10a8(%rsp)
callq 0x1604b
addq $0x20, %rsp
movb $0x1, %cl
movl %ecx, 0xc(%rsp)
cmpl $0x1, %eax
jne 0x98b76
leaq 0x4c946(%rip), %rsi     # 0xe53f0
leaq 0x79bed(%rip), %rdx     # 0x11269e
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x4c56a(%rip), %rsi     # 0xe5034
leaq 0x797b4(%rip), %rdx     # 0x112285
movq %r15, %rdi
movl $0xf4, %ecx
jmp 0x98b66
leaq (%rdi,%rcx,8), %rdi
movq 0xb8(%rbx), %rdx
movl 0x6c(%rbx), %r8d
imull %r8d, %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
movq (%rdx,%r12,8), %rdx
addq %rcx, %rdx
movq 0xc0(%rbx), %rsi
addq (%rsi,%r12,8), %rcx
leaq 0x192(%rbx), %r15
subq $0x8, %rsp
leaq 0x24(%rsp), %r9
movl %eax, %esi
pushq %r15
pushq %r8
pushq %r14
callq 0x1604b
addq $0x20, %rsp
cmpl $0x1, %eax
jne 0x98b76
leaq 0x4c8b9(%rip), %rsi     # 0xe53f0
leaq 0x79c3e(%rip), %rdx     # 0x11277c
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x4c4dd(%rip), %rsi     # 0xe5034
leaq 0x79727(%rip), %rdx     # 0x112285
movq %r15, %rdi
movl $0x117, %ecx            # imm = 0x117
movq %rbx, %r8
jmp 0x9864f
movl $0x0, 0xc(%rsp)
xorl %eax, %eax
testl %ebp, %ebp
jne 0x98d2d
xorl %r12d, %r12d
movq 0x10(%rsp), %rsi
movslq 0x6c(%rsi), %rax
cmpq %rax, %r12
jge 0x98d2b
movsd (%r14,%r12,8), %xmm0
callq 0x86a0
movq 0x1090(%rsp), %rdi
movq 0x10(%rsp), %rsi
movsd %xmm0, (%r14,%r12,8)
cmpb $0x0, 0xc(%rsp)
je 0x98d1e
xorl %eax, %eax
movl 0x40(%rsi), %r15d
cmpl %r15d, %eax
jge 0x98c13
incl %r15d
imull %eax, %r15d
leal 0x1(%rax), %ebx
imull %ebx, %eax
shrl %eax
subl %eax, %r15d
movl 0x44(%rsi), %eax
imull %r12d, %eax
addl %r15d, %eax
cltq
movsd (%rdi,%rax,8), %xmm0
callq 0x86a0
movq 0x1090(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0x44(%rsi), %eax
imull %r12d, %eax
addl %r15d, %eax
cltq
movsd %xmm0, (%rdi,%rax,8)
movl %ebx, %eax
jmp 0x98bc0
xorl %ecx, %ecx
pushq $0x2
popq %rax
xorl %r14d, %r14d
cmpl %r15d, %r14d
jge 0x98d1e
movl %eax, 0x40(%rsp)
movl %ecx, 0x44(%rsp)
movl %ecx, %eax
shrl %eax
negl %eax
movq %rax, 0x30(%rsp)
leal 0x1(%r14), %eax
movl %eax, %r13d
imull %r14d, %r13d
shrl %r13d
movl %eax, 0x3c(%rsp)
cmpl %r15d, %eax
jge 0x98d05
leal 0x1(%rax), %ebx
movl %ebx, %ecx
imull %eax, %ecx
shrl %ecx
cmpl %eax, %r14d
jbe 0x98c6e
movl %r15d, %ebp
imull %eax, %ebp
addl %r14d, %ebp
subl %ecx, %ebp
jmp 0x98c7e
movl %r14d, %ebp
imull %r15d, %ebp
movq 0x30(%rsp), %rdx
addl %eax, %edx
addl %edx, %ebp
incl %r15d
movl %r15d, %edx
imull %r14d, %edx
subl %r13d, %edx
imull %eax, %r15d
subl %ecx, %r15d
movl 0x44(%rsi), %eax
imull %r12d, %eax
leal (%rax,%rbp), %ecx
movslq %ecx, %rcx
movsd (%rdi,%rcx,8), %xmm1
addl %eax, %edx
movslq %edx, %rcx
movsd (%rdi,%rcx,8), %xmm0
addl %r15d, %eax
cltq
mulsd (%rdi,%rax,8), %xmm0
ucomisd 0x4c598(%rip), %xmm0    # 0xe5258
jb 0x98cc8
sqrtsd %xmm0, %xmm0
jmp 0x98ce6
movsd %xmm1, 0x20(%rsp)
callq 0x82d0
movsd 0x20(%rsp), %xmm1
movq 0x1090(%rsp), %rdi
movq 0x10(%rsp), %rsi
mulsd %xmm0, %xmm1
movl 0x44(%rsi), %eax
imull %r12d, %eax
addl %ebp, %eax
cltq
movsd %xmm1, (%rdi,%rax,8)
movl 0x40(%rsi), %r15d
movl %ebx, %eax
jmp 0x98c49
movl 0x44(%rsp), %ecx
movl 0x40(%rsp), %eax
addl %eax, %ecx
addl $0x2, %eax
movl 0x3c(%rsp), %edx
movl %edx, %r14d
jmp 0x98c1b
incq %r12
movq 0x28(%rsp), %r14
jmp 0x98b88
xorl %eax, %eax
addq $0x1058, %rsp           # imm = 0x1058
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq