// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x818, %rsp            # imm = 0x818
movq %r8, %r15
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r12
movq %rsp, %rsi
callq 0x5efb7
cmpl $0x1, %eax
jne 0xe6c57
addq $0xd1c, %r12            # imm = 0xD1C
leaq 0xa7e3(%rip), %rsi      # 0xf13f0
leaq 0x2e1db(%rip), %rdx     # 0x114def
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0xa400(%rip), %rsi      # 0xf1034
leaq 0x49a5b(%rip), %rdx     # 0x130696
movq %rbx, %rdi
movl $0x692, %ecx            # imm = 0x692
movq %r14, %r8
xorl %eax, %eax
callq 0x30c2c
movl $0x1, %ebp
jmp 0xe6d4b
movl 0x140(%rbx), %r9d
cmpl $0x1, %r9d
jne 0xe6c7f
movq 0x38(%r15), %rax
movslq 0x54(%rbx), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
movsd %xmm0, (%r13)
jmp 0xe6d13
movq 0x148(%rbx), %rdi
movq 0x38(%r15), %rax
movslq 0x54(%rbx), %rcx
movq (%rax,%rcx,8), %rcx
movsd (%rsp), %xmm0
leaq 0x192(%rbx), %rax
subq $0x8, %rsp
movl $0x1, %ebp
movl $0x1, %esi
xorl %edx, %edx
movl $0x1, %r8d
movq %rax, 0x10(%rsp)
pushq %rax
pushq $0x1
pushq %r13
callq 0x19f67
addq $0x20, %rsp
cmpl $0x1, %eax
jne 0xe6d13
leaq 0xa71d(%rip), %rsi      # 0xf13f0
leaq 0x499d2(%rip), %rdx     # 0x1306ac
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0xa33c(%rip), %rsi      # 0xf1034
leaq 0x49997(%rip), %rdx     # 0x130696
movq %r14, %rdi
movl $0x6a3, %ecx            # imm = 0x6A3
movq %rbx, %r8
xorl %eax, %eax
callq 0x30c2c
jmp 0xe6d4b
cmpw $0x1, 0x4be(%r12)
jne 0xe6d3e
movl 0x140(%rbx), %r9d
cmpl $0x1, %r9d
jne 0xe6d5f
movq 0x38(%r15), %rax
movslq 0x58(%rbx), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
jmp 0xe6d44
movsd (%r13), %xmm0
movsd %xmm0, (%r14)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x818, %rsp            # imm = 0x818
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x148(%rbx), %rdi
movq 0x38(%r15), %rax
movslq 0x58(%rbx), %rcx
movq (%rax,%rcx,8), %rcx
movsd (%rsp), %xmm0
addq $0x192, %rbx            # imm = 0x192
subq $0x8, %rsp
xorl %ebp, %ebp
movl $0x1, %esi
xorl %edx, %edx
movl $0x1, %r8d
pushq %rbx
pushq $0x1
pushq %r14
callq 0x19f67
addq $0x20, %rsp
cmpl $0x1, %eax
jne 0xe6d4b
leaq 0xa645(%rip), %rsi      # 0xf13f0
leaq 0x4997c(%rip), %rdx     # 0x13072e
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0xa269(%rip), %rsi      # 0xf1034
leaq 0x498c4(%rip), %rdx     # 0x130696
movq %rbx, %rdi
movl $0x6b7, %ecx            # imm = 0x6B7
jmp 0xe6c43