// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../external/HMcode/hmcode.c
// Function: hmcode_sigmadisp_at_z
int hmcode_sigmadisp_at_z(
                          struct background *pba,
                          struct fourier *pfo,
                          double z,
                          double *sigma_disp,
                          double *sigma_disp_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_disp = phw->sigma_disp[pfo->index_pk_m][0];
  }
  else {
    class_call(array_interpolate_two(pfo->tau,
                                     1,
                                     0,
                                     phw->sigma_disp[pfo->index_pk_m],
                                     1,
                                     pfo->tau_size,
                                     tau,
                                     sigma_disp,
                                     1,
                                     pfo->error_message),
               pfo->error_message,
               pfo->error_message);
  }

  if (pba->has_ncdm == _TRUE_){

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

  }
  else{
    *sigma_disp_cb = *sigma_disp;
  }

  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 0x1bf918
leaq 0x1020(%rsp), %rdi
movq 0x1858(%rsp), %rcx
addq $0xd1c, %rcx            # imm = 0xD1C
leaq 0x12b0f(%rip), %rsi     # 0x1d23d8
leaq 0x36495(%rip), %rdx     # 0x1f5d65
movb $0x0, %al
callq 0x5b9c0
movq 0x1850(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x1020(%rsp), %r8
leaq 0x1273f(%rip), %rsi     # 0x1d2034
leaq 0x522b3(%rip), %rdx     # 0x211baf
movl $0x692, %ecx            # imm = 0x692
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x1864(%rsp)
jmp 0x1bfbac
movq 0x1850(%rsp), %rax
cmpl $0x1, 0x140(%rax)
jne 0x1bf95a
movq 0x1830(%rsp), %rax
movq 0x38(%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 0x1bfa48
movq 0x1850(%rsp), %rax
movq 0x148(%rax), %rdi
movq 0x1830(%rsp), %rax
movq 0x38(%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 0x1bfa46
leaq 0x820(%rsp), %rdi
movq 0x1850(%rsp), %rcx
addq $0x192, %rcx            # imm = 0x192
leaq 0x129e1(%rip), %rsi     # 0x1d23d8
leaq 0x521c7(%rip), %rdx     # 0x211bc5
movb $0x0, %al
callq 0x5b9c0
movq 0x1850(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x820(%rsp), %r8
leaq 0x12611(%rip), %rsi     # 0x1d2034
leaq 0x52185(%rip), %rdx     # 0x211baf
movl $0x6a3, %ecx            # imm = 0x6A3
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x1864(%rsp)
jmp 0x1bfbac
jmp 0x1bfa48
movq 0x1858(%rsp), %rax
movswl 0x4be(%rax), %eax
cmpl $0x1, %eax
jne 0x1bfb89
movq 0x1850(%rsp), %rax
cmpl $0x1, 0x140(%rax)
jne 0x1bfaa2
movq 0x1830(%rsp), %rax
movq 0x38(%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 0x1bfb87
movq 0x1850(%rsp), %rax
movq 0x148(%rax), %rdi
movq 0x1830(%rsp), %rax
movq 0x38(%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 0x1bfb85
leaq 0x20(%rsp), %rdi
movq 0x1850(%rsp), %rcx
addq $0x192, %rcx            # imm = 0x192
leaq 0x1289c(%rip), %rsi     # 0x1d23d8
leaq 0x52104(%rip), %rdx     # 0x211c47
movb $0x0, %al
callq 0x5b9c0
movq 0x1850(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x20(%rsp), %r8
leaq 0x124cf(%rip), %rsi     # 0x1d2034
leaq 0x52043(%rip), %rdx     # 0x211baf
movl $0x6b7, %ecx            # imm = 0x6B7
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x1864(%rsp)
jmp 0x1bfbac
jmp 0x1bfb87
jmp 0x1bfba1
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)