// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/perturbations.c
// Function: perturbations_output_data_at_index_tau
int perturbations_output_data_at_index_tau(
                                           struct background * pba,
                                           struct perturbations * ppt,
                                           enum file_format output_format,
                                           int index_tau,
                                           int number_of_titles,
                                           double *data
                                           ) {

  double * tkfull=NULL;  /* array with argument tkfull[(index_k * ppt->ic_size[index_md] + index_ic) * ppt->tp_size[index_md] + index_tp] */

  int index_md = ppt->index_md_scalars;
  int index_ic;
  int index_k;
  int index_tp;

  class_test((index_tau < 0) || (index_tau >= ppt->ln_tau_size),
             ppt->error_message,
             "index_tau outside of array range");

  /** - allocate and fill tkfull */

  if (ppt->k_size[index_md]*ppt->ic_size[index_md]*ppt->tp_size[index_md] > 0) {
    class_alloc(tkfull,
                ppt->k_size[index_md]*ppt->ic_size[index_md]*ppt->tp_size[index_md]*sizeof(double),
                ppt->error_message);
  }

  for (index_k=0; index_k<ppt->k_size[index_md]; index_k++) {
    for (index_tp=0; index_tp<ppt->tp_size[index_md]; index_tp++) {
      for (index_ic=0; index_ic<ppt->ic_size[index_md]; index_ic++) {
        tkfull[(index_k * ppt->ic_size[index_md] + index_ic) * ppt->tp_size[index_md] + index_tp]
          = ppt->late_sources[index_md][index_ic * ppt->tp_size[index_md] + index_tp][index_tau * ppt->k_size[index_md] + index_k];
      }
    }
  }

  /** - store data */

  class_call(perturbations_output_data(pba,ppt,output_format,tkfull,number_of_titles,data),
             ppt->error_message,
             ppt->error_message);

  /** - free tkfull */
  // condition necessary because the size could be zero (if ppt->tp_size is zero)
  if (tkfull != NULL)
    free(tkfull);

  return _SUCCESS_;
}

// Assembly:
subq $0x2058, %rsp           # imm = 0x2058
movq %rdi, 0x2048(%rsp)
movq %rsi, 0x2040(%rsp)
movl %edx, 0x203c(%rsp)
movl %ecx, 0x2038(%rsp)
movl %r8d, 0x2034(%rsp)
movq %r9, 0x2028(%rsp)
movq $0x0, 0x2020(%rsp)
movq 0x2040(%rsp), %rax
movl 0x848(%rax), %eax
movl %eax, 0x201c(%rsp)
cmpl $0x0, 0x2038(%rsp)
jl 0xc9807
movl 0x2038(%rsp), %eax
movq 0x2040(%rsp), %rcx
cmpl 0xa60(%rcx), %eax
jl 0xc9883
leaq 0x1810(%rsp), %rdi
leaq 0x12d6c3(%rip), %rsi    # 0x1f6ed9
movb $0x0, %al
callq 0x5b9c0
leaq 0x1010(%rsp), %rdi
leaq 0x1810(%rsp), %rcx
leaq 0x10884e(%rip), %rsi    # 0x1d2082
leaq 0x12d6bf(%rip), %rdx    # 0x1f6efa
movb $0x0, %al
callq 0x5b9c0
movq 0x2040(%rsp), %rdi
addq $0x6c8a, %rdi           # imm = 0x6C8A
leaq 0x1010(%rsp), %r8
leaq 0x1087d4(%rip), %rsi    # 0x1d2034
leaq 0x12d6c6(%rip), %rdx    # 0x1f6f2d
movl $0x17c, %ecx            # imm = 0x17C
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2054(%rsp)
jmp 0xc9c82
movq 0x2040(%rsp), %rax
movq 0x9c8(%rax), %rax
movslq 0x201c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x2040(%rsp), %rcx
movq 0x870(%rcx), %rcx
movslq 0x201c(%rsp), %rdx
imull (%rcx,%rdx,4), %eax
movq 0x2040(%rsp), %rcx
movq 0x998(%rcx), %rcx
movslq 0x201c(%rsp), %rdx
imull (%rcx,%rdx,4), %eax
cmpl $0x0, %eax
jle 0xc9a13
movq 0x2040(%rsp), %rax
movq 0x9c8(%rax), %rax
movslq 0x201c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x2040(%rsp), %rcx
movq 0x870(%rcx), %rcx
movslq 0x201c(%rsp), %rdx
imull (%rcx,%rdx,4), %eax
movq 0x2040(%rsp), %rcx
movq 0x998(%rcx), %rcx
movslq 0x201c(%rsp), %rdx
imull (%rcx,%rdx,4), %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, 0x2020(%rsp)
cmpq $0x0, 0x2020(%rsp)
jne 0xc9a11
movq 0x2040(%rsp), %rax
movq 0x9c8(%rax), %rax
movslq 0x201c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x2040(%rsp), %rcx
movq 0x870(%rcx), %rcx
movslq 0x201c(%rsp), %rdx
imull (%rcx,%rdx,4), %eax
movq 0x2040(%rsp), %rcx
movq 0x998(%rcx), %rcx
movslq 0x201c(%rsp), %rdx
imull (%rcx,%rdx,4), %eax
cltq
shlq $0x3, %rax
movl %eax, 0x100c(%rsp)
leaq 0x800(%rsp), %rdi
movl 0x100c(%rsp), %ecx
leaq 0x108642(%rip), %rsi    # 0x1d2004
leaq 0x12d3da(%rip), %rdx    # 0x1f6da3
movb $0x0, %al
callq 0x5b9c0
movq 0x2040(%rsp), %rdi
addq $0x6c8a, %rdi           # imm = 0x6C8A
leaq 0x800(%rsp), %r8
leaq 0x108646(%rip), %rsi    # 0x1d2034
leaq 0x12d538(%rip), %rdx    # 0x1f6f2d
movl $0x183, %ecx            # imm = 0x183
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2054(%rsp)
jmp 0xc9c82
jmp 0xc9a13
movl $0x0, 0x2014(%rsp)
movl 0x2014(%rsp), %eax
movq 0x2040(%rsp), %rcx
movq 0x9c8(%rcx), %rcx
movslq 0x201c(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0xc9bc6
movl $0x0, 0x2010(%rsp)
movl 0x2010(%rsp), %eax
movq 0x2040(%rsp), %rcx
movq 0x998(%rcx), %rcx
movslq 0x201c(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0xc9bae
movl $0x0, 0x2018(%rsp)
movl 0x2018(%rsp), %eax
movq 0x2040(%rsp), %rcx
movq 0x870(%rcx), %rcx
movslq 0x201c(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0xc9b96
movq 0x2040(%rsp), %rax
movq 0xa68(%rax), %rax
movslq 0x201c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x2018(%rsp), %ecx
movq 0x2040(%rsp), %rdx
movq 0x998(%rdx), %rdx
movslq 0x201c(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x2010(%rsp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x2038(%rsp), %ecx
movq 0x2040(%rsp), %rdx
movq 0x9c8(%rdx), %rdx
movslq 0x201c(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x2014(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x2020(%rsp), %rax
movl 0x2014(%rsp), %ecx
movq 0x2040(%rsp), %rdx
movq 0x870(%rdx), %rdx
movslq 0x201c(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x2018(%rsp), %ecx
movq 0x2040(%rsp), %rdx
movq 0x998(%rdx), %rdx
movslq 0x201c(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x2010(%rsp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x2018(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2018(%rsp)
jmp 0xc9a82
jmp 0xc9b98
movl 0x2010(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2010(%rsp)
jmp 0xc9a50
jmp 0xc9bb0
movl 0x2014(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2014(%rsp)
jmp 0xc9a1e
movq 0x2048(%rsp), %rdi
movq 0x2040(%rsp), %rsi
movl 0x203c(%rsp), %edx
movq 0x2020(%rsp), %rcx
movl 0x2034(%rsp), %r8d
movq 0x2028(%rsp), %r9
callq 0xc8940
cmpl $0x1, %eax
jne 0xc9c5f
movq %rsp, %rdi
movq 0x2040(%rsp), %rcx
addq $0x6c8a, %rcx           # imm = 0x6C8A
leaq 0x1087c0(%rip), %rsi    # 0x1d23d8
leaq 0x12d26c(%rip), %rdx    # 0x1f6e8b
movb $0x0, %al
callq 0x5b9c0
movq 0x2040(%rsp), %rdi
addq $0x6c8a, %rdi           # imm = 0x6C8A
movq %rsp, %r8
leaq 0x1083f5(%rip), %rsi    # 0x1d2034
leaq 0x12d2e7(%rip), %rdx    # 0x1f6f2d
movl $0x193, %ecx            # imm = 0x193
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2054(%rsp)
jmp 0xc9c82
cmpq $0x0, 0x2020(%rsp)
je 0xc9c77
movq 0x2020(%rsp), %rdi
callq 0x8420
movl $0x0, 0x2054(%rsp)
movl 0x2054(%rsp), %eax
addq $0x2058, %rsp           # imm = 0x2058
retq
nopw %cs:(%rax,%rax)