// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/fourier.c
// Function: fourier_sigmas_at_z
int fourier_sigmas_at_z(
                        struct precision * ppr,
                        struct background * pba,
                        struct fourier * pfo,
                        double R,
                        double z,
                        int index_pk,
                        enum out_sigmas sigma_output,
                        double * result
                        ) {

  double * out_pk;
  double * ddout_pk;

  /** - allocate temporary array for P(k,z) as a function of k */

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

  /** - get P(k,z) as a function of k, for the right z */

  class_call(fourier_pk_at_z(pba,
                             pfo,
                             logarithmic,
                             pk_linear,
                             z,
                             index_pk,
                             out_pk,
                             NULL),
             pfo->error_message,
             pfo->error_message);

  /** - spline it along k */

  class_call(array_spline_table_columns(pfo->ln_k,
                                        pfo->k_size,
                                        out_pk,
                                        1,
                                        ddout_pk,
                                        _SPLINE_EST_DERIV_,
                                        pfo->error_message),
             pfo->error_message,
             pfo->error_message);

  /** - calll the function computing the sigmas */

  class_call(fourier_sigmas(pfo,
                            R,
                            out_pk,
                            ddout_pk,
                            pfo->k_size,
                            ppr->sigma_k_per_decade,
                            sigma_output,
                            result),
             pfo->error_message,
             pfo->error_message);

  /** - free allocated arrays */

  free(out_pk);
  free(ddout_pk);

  return _SUCCESS_;
}

// Assembly:
subq $0x2878, %rsp           # imm = 0x2878
movq %rdi, 0x2868(%rsp)
movq %rsi, 0x2860(%rsp)
movq %rdx, 0x2858(%rsp)
movsd %xmm0, 0x2850(%rsp)
movsd %xmm1, 0x2848(%rsp)
movl %ecx, 0x2844(%rsp)
movl %r8d, 0x2840(%rsp)
movq %r9, 0x2838(%rsp)
movq 0x2858(%rsp), %rax
movslq 0x6c(%rax), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, 0x2830(%rsp)
cmpq $0x0, 0x2830(%rsp)
jne 0x127abc
movq 0x2858(%rsp), %rax
movslq 0x6c(%rax), %rax
shlq $0x3, %rax
movl %eax, 0x2824(%rsp)
leaq 0x2020(%rsp), %rdi
movl 0x2824(%rsp), %ecx
leaq 0xaa597(%rip), %rsi     # 0x1d2004
leaq 0xd8c12(%rip), %rdx     # 0x200686
movb $0x0, %al
callq 0x5b9c0
movq 0x2858(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x2020(%rsp), %r8
leaq 0xaa59b(%rip), %rsi     # 0x1d2034
leaq 0xd8bd0(%rip), %rdx     # 0x200670
movl $0x461, %ecx            # imm = 0x461
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2874(%rsp)
jmp 0x127dac
movq 0x2858(%rsp), %rax
movslq 0x6c(%rax), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, 0x2828(%rsp)
cmpq $0x0, 0x2828(%rsp)
jne 0x127b60
movq 0x2858(%rsp), %rax
movslq 0x6c(%rax), %rax
shlq $0x3, %rax
movl %eax, 0x201c(%rsp)
leaq 0x1810(%rsp), %rdi
movl 0x201c(%rsp), %ecx
leaq 0xaa4f3(%rip), %rsi     # 0x1d2004
leaq 0xd8b6c(%rip), %rdx     # 0x200684
movb $0x0, %al
callq 0x5b9c0
movq 0x2858(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x1810(%rsp), %r8
leaq 0xaa4f7(%rip), %rsi     # 0x1d2034
leaq 0xd8b2c(%rip), %rdx     # 0x200670
movl $0x462, %ecx            # imm = 0x462
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2874(%rsp)
jmp 0x127dac
movq 0x2860(%rsp), %rdi
movq 0x2858(%rsp), %rsi
movsd 0x2848(%rsp), %xmm0
movl 0x2844(%rsp), %r8d
movq 0x2830(%rsp), %r9
movl $0x1, %edx
xorl %ecx, %ecx
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0x1236f0
cmpl $0x1, %eax
jne 0x127c11
leaq 0x1010(%rsp), %rdi
movq 0x2858(%rsp), %rcx
addq $0x192, %rcx            # imm = 0x192
leaq 0xaa816(%rip), %rsi     # 0x1d23d8
leaq 0xd8ac4(%rip), %rdx     # 0x20068d
movb $0x0, %al
callq 0x5b9c0
movq 0x2858(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x1010(%rsp), %r8
leaq 0xaa446(%rip), %rsi     # 0x1d2034
leaq 0xd8a7b(%rip), %rdx     # 0x200670
movl $0x46f, %ecx            # imm = 0x46F
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2874(%rsp)
jmp 0x127dac
movq 0x2858(%rsp), %rax
movq 0x80(%rax), %rdi
movq 0x2858(%rsp), %rax
movl 0x6c(%rax), %esi
movq 0x2830(%rsp), %rdx
movq 0x2828(%rsp), %r8
movq 0x2858(%rsp), %rax
addq $0x192, %rax            # imm = 0x192
movl $0x1, %r9d
movl %r9d, %ecx
movq %rax, (%rsp)
callq 0x1f4b0
cmpl $0x1, %eax
jne 0x127ccd
leaq 0x810(%rsp), %rdi
movq 0x2858(%rsp), %rcx
addq $0x192, %rcx            # imm = 0x192
leaq 0xaa75a(%rip), %rsi     # 0x1d23d8
leaq 0xd8a5b(%rip), %rdx     # 0x2006e0
movb $0x0, %al
callq 0x5b9c0
movq 0x2858(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x810(%rsp), %r8
leaq 0xaa38a(%rip), %rsi     # 0x1d2034
leaq 0xd89bf(%rip), %rdx     # 0x200670
movl $0x47b, %ecx            # imm = 0x47B
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2874(%rsp)
jmp 0x127dac
movq 0x2858(%rsp), %rdi
movsd 0x2850(%rsp), %xmm0
movq 0x2830(%rsp), %rsi
movq 0x2828(%rsp), %rdx
movq 0x2858(%rsp), %rax
movl 0x6c(%rax), %ecx
movq 0x2868(%rsp), %rax
movsd 0x830(%rax), %xmm1
movl 0x2840(%rsp), %r8d
movq 0x2838(%rsp), %r9
callq 0x127dc0
cmpl $0x1, %eax
jne 0x127d87
leaq 0x10(%rsp), %rdi
movq 0x2858(%rsp), %rcx
addq $0x192, %rcx            # imm = 0x192
leaq 0xaa69a(%rip), %rsi     # 0x1d23d8
leaq 0xd89fa(%rip), %rdx     # 0x20073f
movb $0x0, %al
callq 0x5b9c0
movq 0x2858(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x10(%rsp), %r8
leaq 0xaa2cd(%rip), %rsi     # 0x1d2034
leaq 0xd8902(%rip), %rdx     # 0x200670
movl $0x488, %ecx            # imm = 0x488
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2874(%rsp)
jmp 0x127dac
movq 0x2830(%rsp), %rdi
callq 0x8420
movq 0x2828(%rsp), %rdi
callq 0x8420
movl $0x0, 0x2874(%rsp)
movl 0x2874(%rsp), %eax
addq $0x2878, %rsp           # imm = 0x2878
retq
nopl (%rax,%rax)