// File: /workspace/github_c_makefile_star2_O3/PoulinV[P]AxiCLASS/build/../source/transfer.c
// Function: transfer_lensing_sampling
int transfer_lensing_sampling(
                              struct precision * ppr,
                              struct background * pba,
                              struct perturbations * ppt,
                              struct transfer * ptr,
                              int bin,
                              double tau0,
                              double * tau0_minus_tau,
                              int tau_size) {

  /* running index on time */
  int index_tau;

  /* minimum and maximal value of time in new sampled interval */
  double tau_min,tau_mean,tau_max;

  /* time interval for this bin */
  class_call(transfer_selection_times(ppr,
                                      pba,
                                      ppt,
                                      ptr,
                                      bin,
                                      &tau_min,
                                      &tau_mean,
                                      &tau_max),
             ptr->error_message,
             ptr->error_message);

  for (index_tau=0; index_tau<tau_size; index_tau++) {
    //tau0_minus_tau[index_tau]=pba->conformal_age-tau_min-((double)index_tau)/((double)tau_size-1.)*(tau0-tau_min);
    tau0_minus_tau[index_tau]=((double)(tau_size-1-index_tau))/((double)(tau_size-1))*(tau0-tau_min);
  }

  return _SUCCESS_;

}

// Assembly:
pushq %r14
pushq %rbx
subq $0x828, %rsp            # imm = 0x828
movq %r9, %rbx
movsd %xmm0, (%rsp)
movq %rcx, %r14
leaq 0x10(%rsp), %rax
leaq 0x18(%rsp), %rcx
leaq 0x8(%rsp), %r9
pushq %rax
pushq %rcx
callq 0xaa83f
addq $0x10, %rsp
testl %eax, %eax
je 0xad0c1
addq $0x96a, %r14            # imm = 0x96A
leaq 0x41372(%rip), %rsi     # 0xee3f0
leaq 0x7219b(%rip), %rdx     # 0x11f220
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x40f96(%rip), %rsi     # 0xee034
leaq 0x7291f(%rip), %rdx     # 0x11f9c4
movq %r14, %rdi
movl $0xb6d, %ecx            # imm = 0xB6D
movq %rbx, %r8
xorl %eax, %eax
callq 0x30af0
movl $0x1, %eax
jmp 0xad1ac
movsd (%rsp), %xmm9
movl 0x840(%rsp), %eax
testl %eax, %eax
jle 0xad1aa
leal -0x1(%rax), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
subsd 0x8(%rsp), %xmm9
movl %eax, %edx
leal 0x1(%rax), %ecx
decq %rdx
movq %rdx, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
shrl %ecx
shlq $0x4, %rcx
addl $-0x2, %eax
movdqa 0x41b76(%rip), %xmm2    # 0xeec80
xorl %edx, %edx
movdqa 0x41b7c(%rip), %xmm3    # 0xeec90
pxor %xmm3, %xmm1
pcmpeqd %xmm4, %xmm4
movdqa 0x4266c(%rip), %xmm5    # 0xef790
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm1, %xmm7
pcmpeqd %xmm1, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %esi
notl %esi
testb $0x1, %sil
je 0xad171
leal 0x1(%rax), %esi
xorps %xmm7, %xmm7
cvtsi2sd %esi, %xmm7
divsd %xmm0, %xmm7
mulsd %xmm9, %xmm7
movsd %xmm7, (%rbx,%rdx)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0xad196
xorps %xmm6, %xmm6
cvtsi2sd %eax, %xmm6
divsd %xmm0, %xmm6
mulsd %xmm9, %xmm6
movsd %xmm6, 0x8(%rbx,%rdx)
paddq %xmm5, %xmm2
addq $0x10, %rdx
addl $-0x2, %eax
cmpq %rdx, %rcx
jne 0xad124
xorl %eax, %eax
addq $0x828, %rsp            # imm = 0x828
popq %rbx
popq %r14
retq