// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x2848, %rsp           # imm = 0x2848
movq %rdi, 0x2838(%rsp)
movsd %xmm0, 0x2830(%rsp)
movq %rsi, 0x2828(%rsp)
movsd 0x2830(%rsp), %xmm1
movq 0x2838(%rsp), %rax
movq 0x450(%rax), %rax
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x9ec0e
leaq 0x2020(%rsp), %rdi
movsd 0x2830(%rsp), %xmm0
movq 0x2838(%rsp), %rax
movq 0x450(%rax), %rax
movsd (%rax), %xmm1
leaq 0x14ffe0(%rip), %rsi    # 0x1eeb81
movb $0x2, %al
callq 0x5b9c0
leaq 0x1820(%rsp), %rdi
leaq 0x2020(%rsp), %rcx
leaq 0x1334c3(%rip), %rsi    # 0x1d2082
leaq 0x14ffde(%rip), %rdx    # 0x1eeba4
movb $0x0, %al
callq 0x5b9c0
movq 0x2838(%rsp), %rdi
addq $0xd1c, %rdi            # imm = 0xD1C
leaq 0x1820(%rsp), %r8
leaq 0x133449(%rip), %rsi    # 0x1d2034
leaq 0x14ffca(%rip), %rdx    # 0x1eebbc
movl $0x150, %ecx            # imm = 0x150
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2844(%rsp)
jmp 0x9ede4
movsd 0x2830(%rsp), %xmm0
movq 0x2838(%rsp), %rax
movq 0x450(%rax), %rax
movq 0x2838(%rsp), %rcx
movl 0x440(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
ucomisd (%rax,%rcx,8), %xmm0
jbe 0x9ecf2
leaq 0x1020(%rsp), %rdi
movsd 0x2830(%rsp), %xmm0
movq 0x2838(%rsp), %rax
movq 0x450(%rax), %rax
movq 0x2838(%rsp), %rcx
movl 0x440(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm1
leaq 0x14ff4b(%rip), %rsi    # 0x1eebd0
movb $0x2, %al
callq 0x5b9c0
leaq 0x820(%rsp), %rdi
leaq 0x1020(%rsp), %rcx
leaq 0x1333df(%rip), %rsi    # 0x1d2082
leaq 0x14ff49(%rip), %rdx    # 0x1eebf3
movb $0x0, %al
callq 0x5b9c0
movq 0x2838(%rsp), %rdi
addq $0xd1c, %rdi            # imm = 0xD1C
leaq 0x820(%rsp), %r8
leaq 0x133365(%rip), %rsi    # 0x1d2034
leaq 0x14fee6(%rip), %rdx    # 0x1eebbc
movl $0x154, %ecx            # imm = 0x154
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2844(%rsp)
jmp 0x9ede4
movq 0x2838(%rsp), %rax
movq 0x450(%rax), %rdi
movq 0x2838(%rsp), %rax
movl 0x440(%rax), %esi
movq 0x2838(%rsp), %rax
movq 0x458(%rax), %rdx
movq 0x2838(%rsp), %rax
movq 0x470(%rax), %rcx
movsd 0x2830(%rsp), %xmm0
movq 0x2828(%rsp), %r10
movq 0x2838(%rsp), %rax
addq $0xd1c, %rax            # imm = 0xD1C
movl $0x1, %r8d
leaq 0x2824(%rsp), %r9
movq %r10, (%rsp)
movl $0x1, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x24220
cmpl $0x1, %eax
jne 0x9edd9
leaq 0x20(%rsp), %rdi
movq 0x2838(%rsp), %rcx
addq $0xd1c, %rcx            # imm = 0xD1C
leaq 0x133648(%rip), %rsi    # 0x1d23d8
leaq 0x14fe81(%rip), %rdx    # 0x1eec18
movb $0x0, %al
callq 0x5b9c0
movq 0x2838(%rsp), %rdi
addq $0xd1c, %rdi            # imm = 0xD1C
leaq 0x20(%rsp), %r8
leaq 0x13327b(%rip), %rsi    # 0x1d2034
leaq 0x14fdfc(%rip), %rdx    # 0x1eebbc
movl $0x163, %ecx            # imm = 0x163
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2844(%rsp)
jmp 0x9ede4
movl $0x0, 0x2844(%rsp)
movl 0x2844(%rsp), %eax
addq $0x2848, %rsp           # imm = 0x2848
retq
nopw %cs:(%rax,%rax)