// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/fourier.c
// Function: fourier_k_nl_at_z
int fourier_k_nl_at_z(
                      struct background *pba,
                      struct fourier * pfo,
                      double z,
                      double * k_nl,
                      double * k_nl_cb
                      ) {

  double tau;

  /** - convert input redshift into a conformal time */

  class_call(background_tau_of_z(pba,
                                 z,
                                 &tau),
             pba->error_message,
             pfo->error_message);

  /** - interpolate the precomputed k_nl array at the needed valuetime */

  if (pfo->has_pk_m == _TRUE_) {

    if (pfo->tau_size == 1) {
      *k_nl = pfo->k_nl[pfo->index_pk_m][0];
    }
    else {
      class_call(array_interpolate_two(pfo->tau,
                                       1,
                                       0,
                                       pfo->k_nl[pfo->index_pk_m],
                                       1,
                                       pfo->tau_size,
                                       tau,
                                       k_nl,
                                       1,
                                       pfo->error_message),
                 pfo->error_message,
                 pfo->error_message);
    }
  }

  /** - if needed, do the same for the baryon part only */

  if (pfo->has_pk_cb == _TRUE_) {

    if (pfo->tau_size == 1) {
      *k_nl_cb = pfo->k_nl[pfo->index_pk_cb][0];
    }
    else {
      class_call(array_interpolate_two(pfo->tau,
                                       1,
                                       0,
                                       pfo->k_nl[pfo->index_pk_cb],
                                       1,
                                       pfo->tau_size,
                                       tau,
                                       k_nl_cb,
                                       1,
                                       pfo->error_message),
                 pfo->error_message,
                 pfo->error_message);
    }
  }

  /* otherwise, return the same for k_nl_cb as for k_nl */

  else{
    *k_nl_cb = *k_nl;
  }

  return _SUCCESS_;
}

// Assembly:
subq $0x1858, %rsp           # imm = 0x1858
movq %rdi, 0x1848(%rsp)
movq %rsi, 0x1840(%rsp)
movsd %xmm0, 0x1838(%rsp)
movq %rdx, 0x1830(%rsp)
movq %rcx, 0x1828(%rsp)
movq 0x1848(%rsp), %rdi
movsd 0x1838(%rsp), %xmm0
leaq 0x1820(%rsp), %rsi
callq 0x9ee00
cmpl $0x1, %eax
jne 0x128b70
leaq 0x1020(%rsp), %rdi
movq 0x1848(%rsp), %rcx
addq $0xd1c, %rcx            # imm = 0xD1C
leaq 0xa98b7(%rip), %rsi     # 0x1d23d8
leaq 0xcd23d(%rip), %rdx     # 0x1f5d65
movb $0x0, %al
callq 0x5b9c0
movq 0x1840(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x1020(%rsp), %r8
leaq 0xa94e7(%rip), %rsi     # 0x1d2034
leaq 0xd7c50(%rip), %rdx     # 0x2007a4
movl $0x4ad, %ecx            # imm = 0x4AD
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x1854(%rsp)
jmp 0x128e24
movq 0x1840(%rsp), %rax
movswl 0x50(%rax), %eax
cmpl $0x1, %eax
jne 0x128cbd
movq 0x1840(%rsp), %rax
cmpl $0x1, 0x140(%rax)
jne 0x128bca
movq 0x1840(%rsp), %rax
movq 0x158(%rax), %rax
movq 0x1840(%rsp), %rcx
movslq 0x54(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
movq 0x1830(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0x128cbb
movq 0x1840(%rsp), %rax
movq 0x148(%rax), %rdi
movq 0x1840(%rsp), %rax
movq 0x158(%rax), %rax
movq 0x1840(%rsp), %rcx
movslq 0x54(%rcx), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x1840(%rsp), %rax
movl 0x140(%rax), %r9d
movsd 0x1820(%rsp), %xmm0
movq 0x1830(%rsp), %r10
movq 0x1840(%rsp), %rax
addq $0x192, %rax            # imm = 0x192
movl $0x1, %r8d
xorl %edx, %edx
movl %r8d, %esi
movq %r10, (%rsp)
movl $0x1, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x28200
cmpl $0x1, %eax
jne 0x128cb9
leaq 0x820(%rsp), %rdi
movq 0x1840(%rsp), %rcx
addq $0x192, %rcx            # imm = 0x192
leaq 0xa976e(%rip), %rsi     # 0x1d23d8
leaq 0xd7b45(%rip), %rdx     # 0x2007b6
movb $0x0, %al
callq 0x5b9c0
movq 0x1840(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x820(%rsp), %r8
leaq 0xa939e(%rip), %rsi     # 0x1d2034
leaq 0xd7b07(%rip), %rdx     # 0x2007a4
movl $0x4c2, %ecx            # imm = 0x4C2
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x1854(%rsp)
jmp 0x128e24
jmp 0x128cbb
jmp 0x128cbd
movq 0x1840(%rsp), %rax
movswl 0x52(%rax), %eax
cmpl $0x1, %eax
jne 0x128e01
movq 0x1840(%rsp), %rax
cmpl $0x1, 0x140(%rax)
jne 0x128d17
movq 0x1840(%rsp), %rax
movq 0x158(%rax), %rax
movq 0x1840(%rsp), %rcx
movslq 0x58(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
movq 0x1828(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0x128dff
movq 0x1840(%rsp), %rax
movq 0x148(%rax), %rdi
movq 0x1840(%rsp), %rax
movq 0x158(%rax), %rax
movq 0x1840(%rsp), %rcx
movslq 0x58(%rcx), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x1840(%rsp), %rax
movl 0x140(%rax), %r9d
movsd 0x1820(%rsp), %xmm0
movq 0x1828(%rsp), %r10
movq 0x1840(%rsp), %rax
addq $0x192, %rax            # imm = 0x192
movl $0x1, %r8d
xorl %edx, %edx
movl %r8d, %esi
movq %r10, (%rsp)
movl $0x1, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x28200
cmpl $0x1, %eax
jne 0x128dfd
leaq 0x20(%rsp), %rdi
movq 0x1840(%rsp), %rcx
addq $0x192, %rcx            # imm = 0x192
leaq 0xa9624(%rip), %rsi     # 0x1d23d8
leaq 0xd7a71(%rip), %rdx     # 0x20082c
movb $0x0, %al
callq 0x5b9c0
movq 0x1840(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x20(%rsp), %r8
leaq 0xa9257(%rip), %rsi     # 0x1d2034
leaq 0xd79c0(%rip), %rdx     # 0x2007a4
movl $0x4d9, %ecx            # imm = 0x4D9
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x1854(%rsp)
jmp 0x128e24
jmp 0x128dff
jmp 0x128e19
movq 0x1830(%rsp), %rax
movsd (%rax), %xmm0
movq 0x1828(%rsp), %rax
movsd %xmm0, (%rax)
movl $0x0, 0x1854(%rsp)
movl 0x1854(%rsp), %eax
addq $0x1858, %rsp           # imm = 0x1858
retq
nopw %cs:(%rax,%rax)