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

  /** Summary: */

  /** - define local variables */

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

  /** - check that \f$ tau \f$ is in the pre-computed range */
  class_test(tau < pba->tau_table[0],
             pba->error_message,
             "out of range: tau=%e < tau_min=%e\n",tau,pba->tau_table[0]);

  class_test(tau > pba->tau_table[pba->bt_size-1],
             pba->error_message,
             "out of range: tau=%e > tau_max=%e\n",tau,pba->tau_table[pba->bt_size-1]);

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

  return _SUCCESS_;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rdi, %rbx
movq 0x450(%rdi), %rdi
movsd (%rdi), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x5eeb4
movsd (%rdi), %xmm1
leaq 0xaf1a4(%rip), %rsi     # 0x10e009
leaq 0x800(%rsp), %r14
movq %r14, %rdi
movb $0x2, %al
callq 0x30c2c
leaq 0x92204(%rip), %rsi     # 0xf1082
leaq 0xaf1a7(%rip), %rdx     # 0x10e02c
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0xd1c, %rbx            # imm = 0xD1C
leaq 0x92191(%rip), %rsi     # 0xf1034
leaq 0xaf19a(%rip), %rdx     # 0x10e044
movq %rbx, %rdi
movl $0x150, %ecx            # imm = 0x150
jmp 0x5ef20
movq %rsi, %rax
movslq 0x440(%rbx), %rsi
ucomisd -0x8(%rdi,%rsi,8), %xmm0
jbe 0x5ef3c
movsd -0x8(%rdi,%rsi,8), %xmm1
leaq 0xaf185(%rip), %rsi     # 0x10e058
leaq 0x800(%rsp), %r14
movq %r14, %rdi
movb $0x2, %al
callq 0x30c2c
leaq 0x92196(%rip), %rsi     # 0xf1082
leaq 0xaf188(%rip), %rdx     # 0x10e07b
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0xd1c, %rbx            # imm = 0xD1C
leaq 0x92123(%rip), %rsi     # 0xf1034
leaq 0xaf12c(%rip), %rdx     # 0x10e044
movq %rbx, %rdi
movl $0x154, %ecx            # imm = 0x154
movq %r15, %r8
xorl %eax, %eax
callq 0x30c2c
movl $0x1, %eax
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %r15
retq
movq 0x458(%rbx), %rdx
movq 0x470(%rbx), %rcx
addq $0xd1c, %rbx            # imm = 0xD1C
subq $0x8, %rsp
leaq 0x8(%rsp), %r9
movl $0x1, %r8d
pushq %rbx
pushq $0x1
pushq %rax
callq 0x17ee6
addq $0x20, %rsp
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
jne 0x5ef2f
leaq 0x92473(%rip), %rsi     # 0xf13f0
leaq 0xaf11c(%rip), %rdx     # 0x10e0a0
leaq 0x800(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x92094(%rip), %rsi     # 0xf1034
leaq 0xaf09d(%rip), %rdx     # 0x10e044
movq %rbx, %rdi
movl $0x163, %ecx            # imm = 0x163
movq %r14, %r8
jmp 0x5ef23