// File: /workspace/github_c_makefile_star2_O2/PoulinV[P]AxiCLASS/build/../source/background.c
// Function: background_tau_of_z
int background_tau_of_z(
                        struct background *pba,
                        double z,
                        double * tau
                        ) {

  /** Summary: */

  /** - define local variables */

  /* necessary for calling array_interpolate(), but never used */
  int last_index;

  /** - check that \f$ z \f$ is in the pre-computed range */
  class_test(z < pba->z_table[pba->bt_size-1],
             pba->error_message,
             "out of range: z=%e < z_min=%e\n",z,pba->z_table[pba->bt_size-1]);

  class_test(z > pba->z_table[0],
             pba->error_message,
             "out of range: z=%e > z_max=%e\n",z,pba->z_table[0]);

  /** - interpolate from pre-computed table with array_interpolate() */
  class_call(array_interpolate_spline(
                                      pba->z_table,
                                      pba->bt_size,
                                      pba->tau_table,
                                      pba->d2tau_dz2_table,
                                      1,
                                      z,
                                      &last_index,
                                      tau,
                                      1,
                                      pba->error_message),
             pba->error_message,
             pba->error_message);
  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rsi, %rax
movq %rdi, %r14
movq 0x458(%rdi), %rdi
movslq 0x440(%r14), %rsi
movsd -0x8(%rdi,%rsi,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x58b5e
leaq 0xa92c8(%rip), %rsi     # 0x101dd7
leaq 0x800(%rsp), %rbx
movq %rbx, %rdi
movb $0x2, %al
callq 0x2e014
leaq 0x8c55a(%rip), %rsi     # 0xe5082
leaq 0xa92c7(%rip), %rdx     # 0x101df6
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0xd1c, %r14            # imm = 0xD1C
leaq 0x8c4e7(%rip), %rsi     # 0xe5034
leaq 0xa92c3(%rip), %rdx     # 0x101e17
movq %r14, %rdi
movl $0x11f, %ecx            # imm = 0x11F
jmp 0x58bbc
movsd (%rdi), %xmm1
leaq 0xd1c(%r14), %rbx
ucomisd %xmm1, %xmm0
jbe 0x58bd7
leaq 0xa92b5(%rip), %rsi     # 0x101e2b
leaq 0x800(%rsp), %r14
movq %r14, %rdi
movb $0x2, %al
callq 0x2e014
leaq 0x8c4f3(%rip), %rsi     # 0xe5082
leaq 0xa92b4(%rip), %rdx     # 0x101e4a
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x8c487(%rip), %rsi     # 0xe5034
leaq 0xa9263(%rip), %rdx     # 0x101e17
movq %rbx, %rdi
movl $0x123, %ecx            # imm = 0x123
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
pushq $0x1
popq %rax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x450(%r14), %rdx
movq 0x468(%r14), %rcx
subq $0x8, %rsp
pushq $0x1
popq %rbp
leaq 0x8(%rsp), %r9
movl %ebp, %r8d
pushq %rbx
pushq $0x1
pushq %rax
callq 0x1604b
addq $0x20, %rsp
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
jne 0x58bc9
leaq 0x8c7df(%rip), %rsi     # 0xe53f0
leaq 0xa9246(%rip), %rdx     # 0x101e5e
leaq 0x800(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x8c400(%rip), %rsi     # 0xe5034
leaq 0xa91dc(%rip), %rdx     # 0x101e17
movq %rbx, %rdi
movl $0x132, %ecx            # imm = 0x132
movq %r14, %r8
xorl %eax, %eax
callq 0x2e014
movl %ebp, %eax
jmp 0x58bc9