// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../external/HMcode/hmcode.c
// Function: hmcode_sigma8_at_z
int hmcode_sigma8_at_z(
                       struct background *pba,
                       struct fourier *pfo,
                       double z,
                       double *sigma_8,
                       double *sigma_8_cb,
                       struct hmcode_workspace *phw
                       ) {

  double tau;

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

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


  if (pba->has_ncdm == _TRUE_){

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

  }
  else{
    *sigma_8_cb = *sigma_8;
  }

  return _SUCCESS_;
}

// Assembly:
subq $0x1868, %rsp           # imm = 0x1868
movq %rdi, 0x1858(%rsp)
movq %rsi, 0x1850(%rsp)
movsd %xmm0, 0x1848(%rsp)
movq %rdx, 0x1840(%rsp)
movq %rcx, 0x1838(%rsp)
movq %r8, 0x1830(%rsp)
movq 0x1858(%rsp), %rdi
movsd 0x1848(%rsp), %xmm0
leaq 0x1828(%rsp), %rsi
callq 0x9ee00
cmpl $0x1, %eax
jne 0x1bf5a8
leaq 0x1020(%rsp), %rdi
movq 0x1858(%rsp), %rcx
addq $0xd1c, %rcx            # imm = 0xD1C
leaq 0x12e7f(%rip), %rsi     # 0x1d23d8
leaq 0x36805(%rip), %rdx     # 0x1f5d65
movb $0x0, %al
callq 0x5b9c0
movq 0x1850(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x1020(%rsp), %r8
leaq 0x12aaf(%rip), %rsi     # 0x1d2034
leaq 0x52514(%rip), %rdx     # 0x211aa0
movl $0x646, %ecx            # imm = 0x646
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x1864(%rsp)
jmp 0x1bf83c
movq 0x1850(%rsp), %rax
cmpl $0x1, 0x140(%rax)
jne 0x1bf5ea
movq 0x1830(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x1850(%rsp), %rcx
movslq 0x54(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
movq 0x1840(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0x1bf6d8
movq 0x1850(%rsp), %rax
movq 0x148(%rax), %rdi
movq 0x1830(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x1850(%rsp), %rcx
movslq 0x54(%rcx), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x1850(%rsp), %rax
movl 0x140(%rax), %r9d
movsd 0x1828(%rsp), %xmm0
movq 0x1840(%rsp), %r10
movq 0x1850(%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 0x1bf6d6
leaq 0x820(%rsp), %rdi
movq 0x1850(%rsp), %rcx
addq $0x192, %rcx            # imm = 0x192
leaq 0x12d51(%rip), %rsi     # 0x1d23d8
leaq 0x52425(%rip), %rdx     # 0x211ab3
movb $0x0, %al
callq 0x5b9c0
movq 0x1850(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x820(%rsp), %r8
leaq 0x12981(%rip), %rsi     # 0x1d2034
leaq 0x523e6(%rip), %rdx     # 0x211aa0
movl $0x657, %ecx            # imm = 0x657
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x1864(%rsp)
jmp 0x1bf83c
jmp 0x1bf6d8
movq 0x1858(%rsp), %rax
movswl 0x4be(%rax), %eax
cmpl $0x1, %eax
jne 0x1bf819
movq 0x1850(%rsp), %rax
cmpl $0x1, 0x140(%rax)
jne 0x1bf732
movq 0x1830(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x1850(%rsp), %rcx
movslq 0x58(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
movq 0x1838(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0x1bf817
movq 0x1850(%rsp), %rax
movq 0x148(%rax), %rdi
movq 0x1830(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x1850(%rsp), %rcx
movslq 0x58(%rcx), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x1850(%rsp), %rax
movl 0x140(%rax), %r9d
movsd 0x1828(%rsp), %xmm0
movq 0x1838(%rsp), %r10
movq 0x1850(%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 0x1bf815
leaq 0x20(%rsp), %rdi
movq 0x1850(%rsp), %rcx
addq $0x192, %rcx            # imm = 0x192
leaq 0x12c0c(%rip), %rsi     # 0x1d23d8
leaq 0x5235c(%rip), %rdx     # 0x211b2f
movb $0x0, %al
callq 0x5b9c0
movq 0x1850(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x20(%rsp), %r8
leaq 0x1283f(%rip), %rsi     # 0x1d2034
leaq 0x522a4(%rip), %rdx     # 0x211aa0
movl $0x66c, %ecx            # imm = 0x66C
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x1864(%rsp)
jmp 0x1bf83c
jmp 0x1bf817
jmp 0x1bf831
movq 0x1840(%rsp), %rax
movsd (%rax), %xmm0
movq 0x1838(%rsp), %rax
movsd %xmm0, (%rax)
movl $0x0, 0x1864(%rsp)
movl 0x1864(%rsp), %eax
addq $0x1868, %rsp           # imm = 0x1868
retq
nopl (%rax,%rax)