// File: /workspace/github_c_makefile_star2_O3/PoulinV[P]AxiCLASS/build/../source/fourier.c
// Function: fourier_pk_at_k_and_z
int fourier_pk_at_k_and_z(
                          struct background * pba,
                          struct primordial * ppm,
                          struct fourier *pfo,
                          enum pk_outputs pk_output,
                          double k,
                          double z,
                          int index_pk,
                          double * out_pk, // number *out_pk_l
                          double * out_pk_ic // array out_pk_ic_l[index_ic_ic]
                          ) {

  double * out_pk_at_z;
  double * out_pk_ic_at_z = NULL;
  double * ddout_pk_at_z;
  double * ddout_pk_ic_at_z;
  int last_index;
  int index_ic1;
  int index_ic2;
  int index_ic1_ic1;
  int index_ic2_ic2;
  int index_ic1_ic2;
  double kmin;
  double * pk_primordial_k;
  double * pk_primordial_kmin;
  short do_ic = _FALSE_;

  /** - preliminary: 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_;

  /** - first step: check that k is in valid range [0:kmax]
      (the test for z will be done when calling fourier_pk_linear_at_z()) */

  class_test((k < 0.) || (k > exp(pfo->ln_k[pfo->k_size-1])),
             pfo->error_message,
             "k=%e out of bounds [%e:%e]",k,0.,exp(pfo->ln_k[pfo->k_size-1]));

  /** - deal with case k = 0 for which P(k) is set to zero
      (this non-physical result can be useful for interpolations) */

  if (k == 0.) {
    *out_pk = 0.;

    if (do_ic == _TRUE_) {
      for (index_ic1_ic2=0; index_ic1_ic2<pfo->ic_ic_size; index_ic1_ic2++) {
        out_pk_ic[index_ic1_ic2] = 0.;
      }
    }
  }

  /** - deal with 0 < k <= kmax */

  else {

    class_alloc(out_pk_at_z,
                pfo->k_size*sizeof(double),
                pfo->error_message);

    if (do_ic == _TRUE_) {
      class_alloc(out_pk_ic_at_z,
                  pfo->k_size*pfo->ic_ic_size*sizeof(double),
                  pfo->error_message);
    }

    /** - deal with standard case kmin <= k <= kmax */

    if (k > exp(pfo->ln_k[0])) {

      /** --> First, get P(k) at the right z (in logarithmic format for more accurate interpolation, and then convert to linear format) */

      class_call(fourier_pk_at_z(pba,
                                 pfo,
                                 logarithmic,
                                 pk_output,
                                 z,
                                 index_pk,
                                 out_pk_at_z,
                                 out_pk_ic_at_z
                                 ),
                 pfo->error_message,
                 pfo->error_message);

      /** --> interpolate total spectrum */

      class_alloc(ddout_pk_at_z,
                  pfo->k_size*sizeof(double),
                  pfo->error_message);

      class_call(array_spline_table_lines(pfo->ln_k,
                                          pfo->k_size,
                                          out_pk_at_z,
                                          1,
                                          ddout_pk_at_z,
                                          _SPLINE_NATURAL_,
                                          pfo->error_message),
                 pfo->error_message,
                 pfo->error_message);

      class_call(array_interpolate_spline(pfo->ln_k,
                                          pfo->k_size,
                                          out_pk_at_z,
                                          ddout_pk_at_z,
                                          1,
                                          log(k),
                                          &last_index,
                                          out_pk,
                                          1,
                                          pfo->error_message),
                 pfo->error_message,
                 pfo->error_message);

      free(ddout_pk_at_z);

      // uncomment this part if you prefer a linear interpolation

      /*
        class_call(array_interpolate_linear(pfo->ln_k,
        pfo->k_size,
        out_pk_at_z,
        1,
        log(k),
        &last_index,
        out_pk,
        1,
        pfo->error_message),
        pfo->error_message,
        pfo->error_message);
      */

      /** --> convert from logarithmic to linear format */

      *out_pk = exp(*out_pk);

      /** --> interpolate each ic component */

      if (do_ic == _TRUE_) {

        class_alloc(ddout_pk_ic_at_z,
                    pfo->k_size*pfo->ic_ic_size*sizeof(double),
                    pfo->error_message);

        class_call(array_spline_table_lines(pfo->ln_k,
                                            pfo->k_size,
                                            out_pk_ic_at_z,
                                            pfo->ic_ic_size,
                                            ddout_pk_ic_at_z,
                                            _SPLINE_NATURAL_,
                                            pfo->error_message),
                   pfo->error_message,
                   pfo->error_message);

        class_call(array_interpolate_spline(pfo->ln_k,
                                            pfo->k_size,
                                            out_pk_ic_at_z,
                                            ddout_pk_ic_at_z,
                                            pfo->ic_ic_size,
                                            log(k),
                                            &last_index,
                                            out_pk_ic,
                                            pfo->ic_ic_size,
                                            pfo->error_message),
                   pfo->error_message,
                   pfo->error_message);

        free(ddout_pk_ic_at_z);

        /** --> convert each ic component from logarithmic to linear format */

        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_ic1_ic1] = exp(out_pk_ic[index_ic1_ic1]);
        }
        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);
            out_pk_ic[index_ic1_ic2]
              = out_pk_ic[index_ic1_ic2]*sqrt(out_pk_ic[index_ic1_ic1]*out_pk_ic[index_ic2_ic2]);
          }
        }
      }
    }

    /** --> deal with case 0 < k < kmin that requires extrapolation
     *    P(k) = [some number] * k  * P_primordial(k)
     *    so
     *    P(k) = P(kmin) * (k P_primordial(k)) / (kmin P_primordial(kmin))
     *    (note that the result is accurate only if kmin is such that [a0 kmin] << H0)
     *
     *    This is accurate for the synchronous gauge; TODO: write
     *    newtonian gauge case. Also, In presence of isocurvature
     *    modes, we assumes for simplicity that the mode with
     *    index_ic1_ic2=0 dominates at small k: exact treatment should be
     *    written if needed.
     */

    else {

      /** --> First, get P(k) at the right z (in linear format) */

      class_call(fourier_pk_at_z(pba,
                                 pfo,
                                 linear,
                                 pk_output,
                                 z,
                                 index_pk,
                                 out_pk_at_z,
                                 out_pk_ic_at_z
                                 ),
                 pfo->error_message,
                 pfo->error_message);

      /* get P(kmin) */
      *out_pk = out_pk_at_z[0];

      if (do_ic == _TRUE_) {
        for (index_ic1_ic2=0; index_ic1_ic2<pfo->ic_ic_size; index_ic1_ic2++) {
          out_pk_ic[index_ic1_ic2] = out_pk_ic_at_z[index_ic1_ic2];
        }
      }

      /* compute P_primordial(k) */

      class_alloc(pk_primordial_k,
                  sizeof(double)*pfo->ic_ic_size,
                  pfo->error_message);

      ppm->calling_from_pk = _TRUE_;
      class_call(primordial_spectrum_at_k(ppm,
                                          pfo->index_md_scalars,
                                          linear,
                                          k,
                                          pk_primordial_k),
                 ppm->error_message,
                 pfo->error_message);
      ppm->calling_from_pk = _FALSE_;
      /* compute P_primordial(kmin) */

      kmin = exp(pfo->ln_k[0]);

      class_alloc(pk_primordial_kmin,
                  sizeof(double)*pfo->ic_ic_size,
                  pfo->error_message);

      ppm->calling_from_pk = _TRUE_;
      class_call(primordial_spectrum_at_k(ppm,
                                          pfo->index_md_scalars,
                                          linear,
                                          kmin,
                                          pk_primordial_kmin),
                 ppm->error_message,
                 pfo->error_message);
      ppm->calling_from_pk = _FALSE_;
      /* finally, infer P(k) */

      *out_pk *= (k*pk_primordial_k[0]/kmin/pk_primordial_kmin[0]);

      if (do_ic == _TRUE_) {
        for (index_ic1_ic2=0; index_ic1_ic2<pfo->ic_ic_size; index_ic1_ic2++) {
          out_pk_ic[index_ic1_ic2] *= (k*pk_primordial_k[index_ic1_ic2]
                                       /kmin/pk_primordial_kmin[index_ic1_ic2]);
        }
      }

      free(pk_primordial_k);
      free(pk_primordial_kmin);
    }

    free(out_pk_at_z);
    if (do_ic == _TRUE_) {
      free(out_pk_ic_at_z);
    }
  }

  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1058, %rsp           # imm = 0x1058
movl %r8d, %r12d
movsd %xmm1, 0x20(%rsp)
movapd %xmm0, %xmm1
movl %ecx, %r15d
movq %rdx, %rbx
movq %rsi, %rbp
movq %rdi, %r14
movq 0x1090(%rsp), %r13
testl %ecx, %ecx
je 0x9ddb7
movl $0x0, 0x1c(%rsp)
jmp 0x9ddca
cmpl $0x2, 0x40(%rbx)
setge %al
testq %r13, %r13
setne %cl
andb %al, %cl
movl %ecx, 0x1c(%rsp)
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
movsd %xmm1, 0x28(%rsp)
ja 0x9de0a
movq 0x80(%rbx), %rax
movslq 0x6c(%rbx), %rcx
movsd -0x8(%rax,%rcx,8), %xmm0
movq %r9, 0x38(%rsp)
callq 0x8670
movq 0x38(%rsp), %rax
movsd 0x28(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x9dea7
movq 0x80(%rbx), %rax
movslq 0x6c(%rbx), %rcx
movsd -0x8(%rax,%rcx,8), %xmm0
callq 0x8670
movapd %xmm0, %xmm2
leaq 0x7dd6f(%rip), %rsi     # 0x11bb9a
leaq 0x50(%rsp), %r14
xorpd %xmm1, %xmm1
movq %r14, %rdi
movsd 0x28(%rsp), %xmm0
movb $0x3, %al
callq 0x30af0
leaq 0x50237(%rip), %rsi     # 0xee082
leaq 0x7dd63(%rip), %rdx     # 0x11bbb5
leaq 0x850(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0x501bf(%rip), %rsi     # 0xee034
leaq 0x7dd69(%rip), %rdx     # 0x11bbe5
movq %rbx, %rdi
movl $0x1e5, %ecx            # imm = 0x1E5
movq %r15, %r8
xorl %eax, %eax
callq 0x30af0
movl $0x1, %ebp
movl %ebp, %eax
addq $0x1058, %rsp           # imm = 0x1058
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x9dede
jp 0x9dede
movq $0x0, (%rax)
xorl %ebp, %ebp
cmpb $0x0, 0x1c(%rsp)
je 0x9de93
movslq 0x44(%rbx), %rdx
testq %rdx, %rdx
jle 0x9de93
shlq $0x3, %rdx
xorl %ebp, %ebp
movq %r13, %rdi
xorl %esi, %esi
callq 0x8200
jmp 0x9de93
movslq 0x6c(%rbx), %r13
leaq (,%r13,8), %rdi
callq 0x8460
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0x9df76
cmpb $0x0, 0x1c(%rsp)
je 0x9dfbc
movslq 0x44(%rbx), %rax
imulq %r13, %rax
movq %rax, 0x30(%rsp)
leaq (,%rax,8), %rdi
callq 0x8460
testq %rax, %rax
movq 0x1090(%rsp), %r13
jne 0x9dfc6
movq 0x30(%rsp), %rcx
shll $0x3, %ecx
leaq 0x500c6(%rip), %rsi     # 0xee004
leaq 0x7de0e(%rip), %rdx     # 0x11bd53
leaq 0x50(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0x500d2(%rip), %rsi     # 0xee034
leaq 0x7dc7c(%rip), %rdx     # 0x11bbe5
movq %rbx, %rdi
movl $0x1ff, %ecx            # imm = 0x1FF
jmp 0x9e0e0
shll $0x3, %r13d
leaq 0x50083(%rip), %rsi     # 0xee004
leaq 0x7dcd2(%rip), %rdx     # 0x11bc5a
leaq 0x50(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0x5008c(%rip), %rsi     # 0xee034
leaq 0x7dc36(%rip), %rdx     # 0x11bbe5
movq %rbx, %rdi
movl $0x1fa, %ecx            # imm = 0x1FA
jmp 0x9e0e0
xorl %eax, %eax
movq 0x1090(%rsp), %r13
movq %rax, 0x30(%rsp)
movq 0x80(%rbx), %rax
movsd (%rax), %xmm0
callq 0x8670
movsd 0x28(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x9e071
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movl $0x1, %ebp
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
movl %r15d, %ecx
movsd 0x20(%rsp), %xmm0
movl %r12d, %r8d
movq 0x40(%rsp), %r12
movq %r12, %r9
callq 0x9d04c
testl %eax, %eax
je 0x9e0e8
addq $0x192, %rbx            # imm = 0x192
leaq 0x503bd(%rip), %rsi     # 0xee3f0
leaq 0x7dbc1(%rip), %rdx     # 0x11bbfb
leaq 0x50(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x4ffe1(%rip), %rsi     # 0xee034
leaq 0x7db8b(%rip), %rdx     # 0x11bbe5
movq %rbx, %rdi
movl $0x212, %ecx            # imm = 0x212
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
jmp 0x9de93
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movl %r15d, %ecx
movsd 0x20(%rsp), %xmm0
movl %r12d, %r8d
movq 0x40(%rsp), %r14
movq %r14, %r9
callq 0x9d04c
testl %eax, %eax
je 0x9e175
addq $0x192, %rbx            # imm = 0x192
leaq 0x5033f(%rip), %rsi     # 0xee3f0
leaq 0x7ddce(%rip), %rdx     # 0x11be86
leaq 0x50(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x4ff63(%rip), %rsi     # 0xee034
leaq 0x7db0d(%rip), %rdx     # 0x11bbe5
movq %rbx, %rdi
movl $0x295, %ecx            # imm = 0x295
movq %r14, %r8
jmp 0x9de87
movslq 0x6c(%rbx), %r15
movq %r15, %rdi
shlq $0x3, %rdi
callq 0x8460
testq %rax, %rax
je 0x9e238
movq %rax, %r14
movq 0x80(%rbx), %rdi
leaq 0x192(%rbx), %r13
movq %r13, (%rsp)
movl $0x1, %ebp
movl %r15d, %esi
movq %r12, %rdx
movl $0x1, %ecx
movq %rax, %r8
xorl %r9d, %r9d
callq 0x142a8
cmpl $0x1, %eax
jne 0x9e2c5
leaq 0x502af(%rip), %rsi     # 0xee3f0
leaq 0x7db1e(%rip), %rdx     # 0x11bc66
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x4fed3(%rip), %rsi     # 0xee034
leaq 0x7da7d(%rip), %rdx     # 0x11bbe5
movq %r13, %rdi
movl $0x222, %ecx            # imm = 0x222
jmp 0x9e360
movsd (%r14), %xmm0
movq 0x38(%rsp), %rax
movsd %xmm0, (%rax)
movl 0x44(%rbx), %eax
movslq %eax, %r15
movl %r15d, %r14d
testl %r15d, %r15d
setg %al
andb 0x1c(%rsp), %al
cmpb $0x1, %al
jne 0x9e1af
leaq (,%r14,8), %rdx
movq %r13, %rdi
movq 0x30(%rsp), %rsi
callq 0x82d0
shlq $0x3, %r15
movq %r15, %rdi
callq 0x8460
testq %rax, %rax
je 0x9e27f
movq %rax, %r15
movw $0x1, 0xb2c(%rbp)
movl 0x3c(%rbx), %esi
movq %rbp, %rdi
xorl %edx, %edx
movsd 0x28(%rsp), %xmm0
movq %rax, %rcx
callq 0x943b4
cmpl $0x1, %eax
jne 0x9e368
addq $0x32a, %rbp            # imm = 0x32A
leaq 0x501f3(%rip), %rsi     # 0xee3f0
leaq 0x7dcda(%rip), %rdx     # 0x11bede
leaq 0x50(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0x4fe10(%rip), %rsi     # 0xee034
leaq 0x7d9ba(%rip), %rdx     # 0x11bbe5
movq %rbx, %rdi
movl $0x2ad, %ecx            # imm = 0x2AD
jmp 0x9e0e0
leal (,%r15,8), %ecx
leaq 0x4fdbd(%rip), %rsi     # 0xee004
leaq 0x7da0a(%rip), %rdx     # 0x11bc58
leaq 0x50(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0x4fdc9(%rip), %rsi     # 0xee034
leaq 0x7d973(%rip), %rdx     # 0x11bbe5
movq %rbx, %rdi
movl $0x218, %ecx            # imm = 0x218
jmp 0x9e062
shll $0x3, %r14d
leaq 0x4fd7a(%rip), %rsi     # 0xee004
leaq 0x8b915(%rip), %rdx     # 0x129ba6
leaq 0x50(%rsp), %r15
movq %r15, %rdi
movl %r14d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0x4fd83(%rip), %rsi     # 0xee034
leaq 0x7d92d(%rip), %rdx     # 0x11bbe5
movq %rbx, %rdi
movl $0x2a4, %ecx            # imm = 0x2A4
jmp 0x9de84
movq 0x80(%rbx), %rax
movq %rax, 0x20(%rsp)
movl 0x6c(%rbx), %r12d
movsd 0x28(%rsp), %xmm0
callq 0x82c0
movq %r13, 0x10(%rsp)
movq 0x38(%rsp), %r15
movq %r15, (%rsp)
movl $0x1, 0x8(%rsp)
movl $0x1, %ebp
leaq 0x850(%rsp), %r9
movq 0x20(%rsp), %rdi
movl %r12d, %esi
movq 0x40(%rsp), %r12
movq %r12, %rdx
movq %r14, %rcx
movl $0x1, %r8d
callq 0x18071
cmpl $0x1, %eax
jne 0x9e415
leaq 0x500bf(%rip), %rsi     # 0xee3f0
leaq 0x7d995(%rip), %rdx     # 0x11bccd
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x4fce3(%rip), %rsi     # 0xee034
leaq 0x7d88d(%rip), %rdx     # 0x11bbe5
movq %r13, %rdi
movl $0x22f, %ecx            # imm = 0x22F
movq %rbx, %r8
jmp 0x9e065
movw $0x0, 0xb2c(%rbp)
movq 0x80(%rbx), %rax
movsd (%rax), %xmm0
callq 0x8670
movsd %xmm0, 0x20(%rsp)
movslq 0x44(%rbx), %r12
leaq (,%r12,8), %rdi
callq 0x8460
testq %rax, %rax
je 0x9e4c6
movq %rax, %r14
movw $0x1, 0xb2c(%rbp)
movl 0x3c(%rbx), %esi
movq %rbp, %rdi
xorl %edx, %edx
movsd 0x20(%rsp), %xmm0
movq %rax, %rcx
callq 0x943b4
cmpl $0x1, %eax
jne 0x9e50c
addq $0x32a, %rbp            # imm = 0x32A
leaq 0x50016(%rip), %rsi     # 0xee3f0
leaq 0x7db61(%rip), %rdx     # 0x11bf42
leaq 0x50(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0x4fc33(%rip), %rsi     # 0xee034
leaq 0x7d7dd(%rip), %rdx     # 0x11bbe5
movq %rbx, %rdi
movl $0x2be, %ecx            # imm = 0x2BE
jmp 0x9e0e0
movq %r14, %rdi
callq 0x8410
movsd (%r15), %xmm0
callq 0x8670
movsd %xmm0, (%r15)
cmpb $0x0, 0x1c(%rsp)
je 0x9e5aa
movl 0x44(%rbx), %r15d
movl 0x6c(%rbx), %r12d
movl %r15d, %ebp
imull %r12d, %ebp
movslq %ebp, %rdi
shlq $0x3, %rdi
callq 0x8460
testq %rax, %rax
je 0x9e5b9
movq %rax, %r14
movq 0x80(%rbx), %rdi
movq %r13, (%rsp)
movl %r12d, %esi
movq 0x30(%rsp), %rbp
movq %rbp, %rdx
movl %r15d, %ecx
movq %rax, %r8
xorl %r9d, %r9d
callq 0x142a8
cmpl $0x1, %eax
jne 0x9e5f6
leaq 0x4ff5e(%rip), %rsi     # 0xee3f0
leaq 0x7d8c9(%rip), %rdx     # 0x11bd62
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x4fb82(%rip), %rsi     # 0xee034
leaq 0x7d72c(%rip), %rdx     # 0x11bbe5
movq %r13, %rdi
movl $0x257, %ecx            # imm = 0x257
jmp 0x9e684
shll $0x3, %r12d
leaq 0x4fb33(%rip), %rsi     # 0xee004
leaq 0x7da57(%rip), %rdx     # 0x11bf2f
leaq 0x50(%rsp), %r14
movq %r14, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0x4fb3c(%rip), %rsi     # 0xee034
leaq 0x7d6e6(%rip), %rdx     # 0x11bbe5
movq %rbx, %rdi
movl $0x2b5, %ecx            # imm = 0x2B5
jmp 0x9e0e0
movw $0x0, 0xb2c(%rbp)
movsd (%r15), %xmm0
movsd 0x28(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd 0x20(%rsp), %xmm2
divsd %xmm2, %xmm0
divsd (%r14), %xmm0
movq 0x38(%rsp), %rax
mulsd (%rax), %xmm0
movsd %xmm0, (%rax)
cmpb $0x0, 0x1c(%rsp)
je 0x9e57c
movslq 0x44(%rbx), %rax
testq %rax, %rax
jle 0x9e57c
xorl %ecx, %ecx
movsd (%r15,%rcx,8), %xmm0
mulsd %xmm1, %xmm0
divsd %xmm2, %xmm0
divsd (%r14,%rcx,8), %xmm0
mulsd (%r13,%rcx,8), %xmm0
movsd %xmm0, (%r13,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x9e552
movq %r15, %rdi
callq 0x8410
movq %r14, %rdi
callq 0x8410
movq 0x40(%rsp), %rdi
callq 0x8410
xorl %ebp, %ebp
cmpb $0x0, 0x1c(%rsp)
je 0x9de93
movq 0x30(%rsp), %rdi
jmp 0x9e5ad
movq %r12, %rdi
callq 0x8410
xorl %ebp, %ebp
jmp 0x9de93
shll $0x3, %ebp
leaq 0x4fa41(%rip), %rsi     # 0xee004
leaq 0x7d787(%rip), %rdx     # 0x11bd51
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30af0
leaq 0x4fa52(%rip), %rsi     # 0xee034
leaq 0x7d5fc(%rip), %rdx     # 0x11bbe5
movq %r13, %rdi
movl $0x24d, %ecx            # imm = 0x24D
jmp 0x9e684
movq 0x80(%rbx), %r15
movl 0x44(%rbx), %eax
movl %eax, 0x20(%rsp)
movl 0x6c(%rbx), %r12d
movsd 0x28(%rsp), %xmm0
callq 0x82c0
movl 0x44(%rbx), %eax
movq %r13, 0x10(%rsp)
movl %eax, 0x8(%rsp)
movq 0x1090(%rsp), %rax
movq %rax, (%rsp)
leaq 0x850(%rsp), %r9
movq %r15, %rdi
movl %r12d, %esi
movq %rbp, %rdx
movq %r14, %rcx
movl 0x20(%rsp), %r8d
callq 0x18071
cmpl $0x1, %eax
jne 0x9e68c
leaq 0x4fd9b(%rip), %rsi     # 0xee3f0
leaq 0x7d781(%rip), %rdx     # 0x11bddd
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x4f9bf(%rip), %rsi     # 0xee034
leaq 0x7d569(%rip), %rdx     # 0x11bbe5
movq %r13, %rdi
movl $0x264, %ecx            # imm = 0x264
movq %rbx, %r8
jmp 0x9de87
movq %r14, %rdi
callq 0x8410
movl 0x40(%rbx), %eax
testl %eax, %eax
jle 0x9e7cf
xorl %ecx, %ecx
movq 0x1090(%rsp), %r15
incl %eax
imull %ecx, %eax
leal 0x1(%rcx), %ebp
imull %ebp, %ecx
shrl %ecx
subl %ecx, %eax
movslq %eax, %r14
movsd (%r15,%r14,8), %xmm0
callq 0x8670
movsd %xmm0, (%r15,%r14,8)
movl 0x40(%rbx), %eax
movl %ebp, %ecx
cmpl %eax, %ebp
jl 0x9e6a9
testl %eax, %eax
jle 0x9e58c
movl $0x2, %ecx
xorl %edx, %edx
xorpd %xmm1, %xmm1
xorl %esi, %esi
movl %ecx, 0x20(%rsp)
movl %esi, %r12d
leal 0x1(%r12), %ecx
cmpl %eax, %ecx
movl %edx, 0x38(%rsp)
movl %ecx, 0x4c(%rsp)
jge 0x9e7b1
movl %edx, %r13d
shrl %r13d
negl %r13d
movl %ecx, %r15d
imull %r12d, %r15d
shrl %r15d
leal 0x1(%rcx), %r14d
movl %r14d, %edx
imull %ecx, %edx
shrl %edx
cmpl %ecx, %r12d
jbe 0x9e736
movl %eax, %esi
imull %ecx, %esi
addl %r12d, %esi
subl %edx, %esi
jmp 0x9e741
movl %r12d, %esi
imull %eax, %esi
addl %r13d, %esi
addl %ecx, %esi
incl %eax
movl %eax, %edi
imull %r12d, %edi
subl %r15d, %edi
imull %ecx, %eax
subl %edx, %eax
movslq %esi, %rbp
movq 0x1090(%rsp), %rdx
movsd (%rdx,%rbp,8), %xmm2
movslq %edi, %rcx
movsd (%rdx,%rcx,8), %xmm0
cltq
mulsd (%rdx,%rax,8), %xmm0
ucomisd %xmm1, %xmm0
jb 0x9e77c
sqrtsd %xmm0, %xmm0
jmp 0x9e791
movsd %xmm2, 0x28(%rsp)
callq 0x82b0
movsd 0x28(%rsp), %xmm2
xorpd %xmm1, %xmm1
mulsd %xmm0, %xmm2
movq 0x1090(%rsp), %rax
movsd %xmm2, (%rax,%rbp,8)
movl 0x40(%rbx), %eax
movl %r14d, %ecx
cmpl %eax, %r14d
jl 0x9e719
movl 0x20(%rsp), %ecx
movl 0x38(%rsp), %edx
addl %ecx, %edx
addl $0x2, %ecx
movl 0x4c(%rsp), %esi
cmpl %eax, %esi
jl 0x9e6ea
jmp 0x9e58c
movq 0x40(%rsp), %rdi
callq 0x8410
jmp 0x9e5a3