// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/fourier.c
// Function: fourier_sigma_at_z
int fourier_sigma_at_z(
                       struct background * pba,
                       struct fourier * pfo,
                       double R,
                       double z,
                       int index_pk,
                       double k_per_decade,
                       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,
                            k_per_decade,
                            out_sigma,
                            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)
movsd %xmm0, 0x2858(%rsp)
movsd %xmm1, 0x2850(%rsp)
movl %edx, 0x284c(%rsp)
movsd %xmm2, 0x2840(%rsp)
movq %rcx, 0x2838(%rsp)
movq 0x2860(%rsp), %rax
movslq 0x6c(%rax), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, 0x2830(%rsp)
cmpq $0x0, 0x2830(%rsp)
jne 0x12f8d5
movq 0x2860(%rsp), %rax
movslq 0x6c(%rax), %rax
shlq $0x3, %rax
movl %eax, 0x2824(%rsp)
leaq 0x2020(%rsp), %rdi
movl 0x2824(%rsp), %ecx
leaq 0xa277e(%rip), %rsi     # 0x1d2004
leaq 0xd0df9(%rip), %rdx     # 0x200686
movb $0x0, %al
callq 0x5b9c0
movq 0x2860(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x2020(%rsp), %r8
leaq 0xa2782(%rip), %rsi     # 0x1d2034
leaq 0xd2cfd(%rip), %rdx     # 0x2025b6
movl $0xb29, %ecx            # imm = 0xB29
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2874(%rsp)
jmp 0x12fbb9
movq 0x2860(%rsp), %rax
movslq 0x6c(%rax), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, 0x2828(%rsp)
cmpq $0x0, 0x2828(%rsp)
jne 0x12f979
movq 0x2860(%rsp), %rax
movslq 0x6c(%rax), %rax
shlq $0x3, %rax
movl %eax, 0x201c(%rsp)
leaq 0x1810(%rsp), %rdi
movl 0x201c(%rsp), %ecx
leaq 0xa26da(%rip), %rsi     # 0x1d2004
leaq 0xd0d53(%rip), %rdx     # 0x200684
movb $0x0, %al
callq 0x5b9c0
movq 0x2860(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x1810(%rsp), %r8
leaq 0xa26de(%rip), %rsi     # 0x1d2034
leaq 0xd2c59(%rip), %rdx     # 0x2025b6
movl $0xb2a, %ecx            # imm = 0xB2A
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2874(%rsp)
jmp 0x12fbb9
movq 0x2868(%rsp), %rdi
movq 0x2860(%rsp), %rsi
movsd 0x2850(%rsp), %xmm0
movl 0x284c(%rsp), %r8d
movq 0x2830(%rsp), %r9
movl $0x1, %edx
xorl %ecx, %ecx
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0x1236f0
cmpl $0x1, %eax
jne 0x12fa2a
leaq 0x1010(%rsp), %rdi
movq 0x2860(%rsp), %rcx
addq $0x192, %rcx            # imm = 0x192
leaq 0xa29fd(%rip), %rsi     # 0x1d23d8
leaq 0xd0cab(%rip), %rdx     # 0x20068d
movb $0x0, %al
callq 0x5b9c0
movq 0x2860(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x1010(%rsp), %r8
leaq 0xa262d(%rip), %rsi     # 0x1d2034
leaq 0xd2ba8(%rip), %rdx     # 0x2025b6
movl $0xb37, %ecx            # imm = 0xB37
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2874(%rsp)
jmp 0x12fbb9
movq 0x2860(%rsp), %rax
movq 0x80(%rax), %rdi
movq 0x2860(%rsp), %rax
movl 0x6c(%rax), %esi
movq 0x2830(%rsp), %rdx
movq 0x2828(%rsp), %r8
movq 0x2860(%rsp), %rax
addq $0x192, %rax            # imm = 0x192
movl $0x1, %r9d
movl %r9d, %ecx
movq %rax, (%rsp)
callq 0x1f4b0
cmpl $0x1, %eax
jne 0x12fae6
leaq 0x810(%rsp), %rdi
movq 0x2860(%rsp), %rcx
addq $0x192, %rcx            # imm = 0x192
leaq 0xa2941(%rip), %rsi     # 0x1d23d8
leaq 0xd0c42(%rip), %rdx     # 0x2006e0
movb $0x0, %al
callq 0x5b9c0
movq 0x2860(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x810(%rsp), %r8
leaq 0xa2571(%rip), %rsi     # 0x1d2034
leaq 0xd2aec(%rip), %rdx     # 0x2025b6
movl $0xb43, %ecx            # imm = 0xB43
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2874(%rsp)
jmp 0x12fbb9
movq 0x2860(%rsp), %rdi
movsd 0x2858(%rsp), %xmm0
movq 0x2830(%rsp), %rsi
movq 0x2828(%rsp), %rdx
movq 0x2860(%rsp), %rax
movl 0x6c(%rax), %ecx
movsd 0x2840(%rsp), %xmm1
movq 0x2838(%rsp), %r9
xorl %r8d, %r8d
callq 0x127dc0
cmpl $0x1, %eax
jne 0x12fb94
leaq 0x10(%rsp), %rdi
movq 0x2860(%rsp), %rcx
addq $0x192, %rcx            # imm = 0x192
leaq 0xa288d(%rip), %rsi     # 0x1d23d8
leaq 0xd2a77(%rip), %rdx     # 0x2025c9
movb $0x0, %al
callq 0x5b9c0
movq 0x2860(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x10(%rsp), %r8
leaq 0xa24c0(%rip), %rsi     # 0x1d2034
leaq 0xd2a3b(%rip), %rdx     # 0x2025b6
movl $0xb50, %ecx            # imm = 0xB50
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2874(%rsp)
jmp 0x12fbb9
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)