// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/thermodynamics.c
// Function: thermodynamics_lists
int thermodynamics_lists(
                         struct precision * ppr,
                         struct background* pba,
                         struct thermodynamics* pth,
                         struct thermo_workspace* ptw
                         ) {

  /** Summary: */

  /** Define local variables */
  int index_tau, index_z;
  double zinitial,zlinear;

  pth->tt_size = ptw->Nz_tot;

  /** - allocate tables*/
  class_alloc(pth->tau_table,pth->tt_size*sizeof(double),pth->error_message);
  class_alloc(pth->z_table,pth->tt_size*sizeof(double),pth->error_message);
  class_alloc(pth->thermodynamics_table,pth->th_size*pth->tt_size*sizeof(double),pth->error_message);
  class_alloc(pth->d2thermodynamics_dz2_table,pth->th_size*pth->tt_size*sizeof(double),pth->error_message);

  /** - define time sampling */

  /* Initial z, and the z at which we switch to linear sampling */
  zinitial = ppr->thermo_z_initial;
  zlinear  = ppr->thermo_z_linear;

  /* -> Between z_initial and z_linear, we use the spacing of recombination sampling */
  for (index_z=0; index_z <ptw->Nz_reco_log; index_z++) {
    pth->z_table[(pth->tt_size-1) - index_z] = -(-exp((log(zinitial)-log(zlinear))*(double)(ptw->Nz_reco_log-1-index_z) / (double)(ptw->Nz_reco_log-1)+log(zlinear)));
  }

  /* -> Between z_linear and reionization_z_start_max, we use the spacing of recombination sampling */
  for (index_z=0; index_z <ptw->Nz_reco_lin; index_z++) {
    pth->z_table[(pth->tt_size-1)-(index_z+ptw->Nz_reco_log)] = -(-(zlinear-ppr->reionization_z_start_max) * (double)(ptw->Nz_reco_lin-1-index_z) / (double)(ptw->Nz_reco_lin) - ppr->reionization_z_start_max);
  }

  /* -> Between reionization_z_start_max and 0, we use the spacing of reionization sampling, leaving out the first point to not double-count it */
  for (index_z=0; index_z <ptw->Nz_reio; index_z++) {
    pth->z_table[(pth->tt_size-1)-(index_z+ptw->Nz_reco)] = -(-ppr->reionization_z_start_max * (double)(ptw->Nz_reio-1-index_z) / (double)(ptw->Nz_reio));
  }

  for (index_tau=0; index_tau < pth->tt_size; index_tau++) {
    class_call(background_tau_of_z(pba,
                                   pth->z_table[index_tau],
                                   pth->tau_table+index_tau),
               pba->error_message,
               pth->error_message);
  }

  /** - store initial value of conformal time in the structure */
  pth->tau_ini = pth->tau_table[pth->tt_size-1];

  return _SUCCESS_;
}

// Assembly:
subq $0x2888, %rsp           # imm = 0x2888
movq %rdi, 0x2878(%rsp)
movq %rsi, 0x2870(%rsp)
movq %rdx, 0x2868(%rsp)
movq %rcx, 0x2860(%rsp)
movq 0x2860(%rsp), %rax
movl 0x10(%rax), %ecx
movq 0x2868(%rsp), %rax
movl %ecx, 0xf08(%rax)
movq 0x2868(%rsp), %rax
movslq 0xf08(%rax), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x2868(%rsp), %rax
movq %rcx, 0xf18(%rax)
movq 0x2868(%rsp), %rax
cmpq $0x0, 0xf18(%rax)
jne 0xb715b
movq 0x2868(%rsp), %rax
movslq 0xf08(%rax), %rax
shlq $0x3, %rax
movl %eax, 0x2844(%rsp)
leaq 0x2040(%rsp), %rdi
movl 0x2844(%rsp), %ecx
leaq 0x11aef8(%rip), %rsi    # 0x1d2004
leaq 0x13b56f(%rip), %rdx    # 0x1f2682
movb $0x0, %al
callq 0x5b9c0
movq 0x2868(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x2040(%rsp), %r8
leaq 0x11aefc(%rip), %rsi    # 0x1d2034
leaq 0x13b552(%rip), %rdx    # 0x1f2691
movl $0x45f, %ecx            # imm = 0x45F
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2884(%rsp)
jmp 0xb782d
movq 0x2868(%rsp), %rax
movslq 0xf08(%rax), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x2868(%rsp), %rax
movq %rcx, 0xf10(%rax)
movq 0x2868(%rsp), %rax
cmpq $0x0, 0xf10(%rax)
jne 0xb7216
movq 0x2868(%rsp), %rax
movslq 0xf08(%rax), %rax
shlq $0x3, %rax
movl %eax, 0x203c(%rsp)
leaq 0x1830(%rsp), %rdi
movl 0x203c(%rsp), %ecx
leaq 0x11ae3d(%rip), %rsi    # 0x1d2004
leaq 0x13b4d8(%rip), %rdx    # 0x1f26a6
movb $0x0, %al
callq 0x5b9c0
movq 0x2868(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x1830(%rsp), %r8
leaq 0x11ae41(%rip), %rsi    # 0x1d2034
leaq 0x13b497(%rip), %rdx    # 0x1f2691
movl $0x460, %ecx            # imm = 0x460
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2884(%rsp)
jmp 0xb782d
movq 0x2868(%rsp), %rax
movl 0xf04(%rax), %eax
movq 0x2868(%rsp), %rcx
imull 0xf08(%rcx), %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x2868(%rsp), %rax
movq %rcx, 0xf20(%rax)
movq 0x2868(%rsp), %rax
cmpq $0x0, 0xf20(%rax)
jne 0xb72f6
movq 0x2868(%rsp), %rax
movl 0xf04(%rax), %eax
movq 0x2868(%rsp), %rcx
imull 0xf08(%rcx), %eax
cltq
shlq $0x3, %rax
movl %eax, 0x182c(%rsp)
leaq 0x1020(%rsp), %rdi
movl 0x182c(%rsp), %ecx
leaq 0x11ad5d(%rip), %rsi    # 0x1d2004
leaq 0x13b405(%rip), %rdx    # 0x1f26b3
movb $0x0, %al
callq 0x5b9c0
movq 0x2868(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x1020(%rsp), %r8
leaq 0x11ad61(%rip), %rsi    # 0x1d2034
leaq 0x13b3b7(%rip), %rdx    # 0x1f2691
movl $0x461, %ecx            # imm = 0x461
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2884(%rsp)
jmp 0xb782d
movq 0x2868(%rsp), %rax
movl 0xf04(%rax), %eax
movq 0x2868(%rsp), %rcx
imull 0xf08(%rcx), %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x2868(%rsp), %rax
movq %rcx, 0xf28(%rax)
movq 0x2868(%rsp), %rax
cmpq $0x0, 0xf28(%rax)
jne 0xb73d6
movq 0x2868(%rsp), %rax
movl 0xf04(%rax), %eax
movq 0x2868(%rsp), %rcx
imull 0xf08(%rcx), %eax
cltq
shlq $0x3, %rax
movl %eax, 0x101c(%rsp)
leaq 0x810(%rsp), %rdi
movl 0x101c(%rsp), %ecx
leaq 0x11ac7d(%rip), %rsi    # 0x1d2004
leaq 0x13b33f(%rip), %rdx    # 0x1f26cd
movb $0x0, %al
callq 0x5b9c0
movq 0x2868(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x810(%rsp), %r8
leaq 0x11ac81(%rip), %rsi    # 0x1d2034
leaq 0x13b2d7(%rip), %rdx    # 0x1f2691
movl $0x462, %ecx            # imm = 0x462
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2884(%rsp)
jmp 0xb782d
movq 0x2878(%rsp), %rax
movsd 0x190(%rax), %xmm0
movsd %xmm0, 0x2850(%rsp)
movq 0x2878(%rsp), %rax
movsd 0x1a0(%rax), %xmm0
movsd %xmm0, 0x2848(%rsp)
movl $0x0, 0x2858(%rsp)
movl 0x2858(%rsp), %eax
movq 0x2860(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jge 0xb7524
movsd 0x2850(%rsp), %xmm0
callq 0x82f0
movsd %xmm0, (%rsp)
movsd 0x2848(%rsp), %xmm0
callq 0x82f0
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
subsd %xmm1, %xmm0
movq 0x2860(%rsp), %rax
movl 0x4(%rax), %eax
subl $0x1, %eax
subl 0x2858(%rsp), %eax
cvtsi2sd %eax, %xmm1
mulsd %xmm1, %xmm0
movq 0x2860(%rsp), %rax
movl 0x4(%rax), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x2848(%rsp), %xmm0
callq 0x82f0
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
addsd %xmm1, %xmm0
callq 0x8670
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq 0x2868(%rsp), %rax
movq 0xf10(%rax), %rax
movq 0x2868(%rsp), %rcx
movl 0xf08(%rcx), %ecx
subl $0x1, %ecx
subl 0x2858(%rsp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x2858(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2858(%rsp)
jmp 0xb7413
movl $0x0, 0x2858(%rsp)
movl 0x2858(%rsp), %eax
movq 0x2860(%rsp), %rcx
cmpl (%rcx), %eax
jge 0xb761b
movsd 0x2848(%rsp), %xmm0
movq 0x2878(%rsp), %rax
subsd 0x3e8(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq 0x2860(%rsp), %rax
movl (%rax), %eax
subl $0x1, %eax
subl 0x2858(%rsp), %eax
cvtsi2sd %eax, %xmm1
mulsd %xmm1, %xmm0
movq 0x2860(%rsp), %rax
cvtsi2sdl (%rax), %xmm1
divsd %xmm1, %xmm0
movq 0x2878(%rsp), %rax
subsd 0x3e8(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq 0x2868(%rsp), %rax
movq 0xf10(%rax), %rax
movq 0x2868(%rsp), %rcx
movl 0xf08(%rcx), %ecx
subl $0x1, %ecx
movl 0x2858(%rsp), %edx
movq 0x2860(%rsp), %rsi
addl 0x4(%rsi), %edx
subl %edx, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x2858(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2858(%rsp)
jmp 0xb752f
movl $0x0, 0x2858(%rsp)
movl 0x2858(%rsp), %eax
movq 0x2860(%rsp), %rcx
cmpl 0xc(%rcx), %eax
jge 0xb76fc
movq 0x2878(%rsp), %rax
movsd 0x3e8(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq 0x2860(%rsp), %rax
movl 0xc(%rax), %eax
subl $0x1, %eax
subl 0x2858(%rsp), %eax
cvtsi2sd %eax, %xmm1
mulsd %xmm1, %xmm0
movq 0x2860(%rsp), %rax
cvtsi2sdl 0xc(%rax), %xmm1
divsd %xmm1, %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq 0x2868(%rsp), %rax
movq 0xf10(%rax), %rax
movq 0x2868(%rsp), %rcx
movl 0xf08(%rcx), %ecx
subl $0x1, %ecx
movl 0x2858(%rsp), %edx
movq 0x2860(%rsp), %rsi
addl 0x8(%rsi), %edx
subl %edx, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x2858(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2858(%rsp)
jmp 0xb7626
movl $0x0, 0x285c(%rsp)
movl 0x285c(%rsp), %eax
movq 0x2868(%rsp), %rcx
cmpl 0xf08(%rcx), %eax
jge 0xb77ea
movq 0x2870(%rsp), %rdi
movq 0x2868(%rsp), %rax
movq 0xf10(%rax), %rax
movslq 0x285c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x2868(%rsp), %rax
movq 0xf18(%rax), %rsi
movslq 0x285c(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x9ee00
cmpl $0x1, %eax
jne 0xb77d2
leaq 0x10(%rsp), %rdi
movq 0x2870(%rsp), %rcx
addq $0xd1c, %rcx            # imm = 0xD1C
leaq 0x11ac4f(%rip), %rsi    # 0x1d23d8
leaq 0x13af5d(%rip), %rdx    # 0x1f26ed
movb $0x0, %al
callq 0x5b9c0
movq 0x2868(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x10(%rsp), %r8
leaq 0x11a882(%rip), %rsi    # 0x1d2034
leaq 0x13aed8(%rip), %rdx    # 0x1f2691
movl $0x47e, %ecx            # imm = 0x47E
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2884(%rsp)
jmp 0xb782d
jmp 0xb77d4
movl 0x285c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x285c(%rsp)
jmp 0xb7707
movq 0x2868(%rsp), %rax
movq 0xf18(%rax), %rax
movq 0x2868(%rsp), %rcx
movl 0xf08(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x2868(%rsp), %rax
movsd %xmm0, 0xff8(%rax)
movl $0x0, 0x2884(%rsp)
movl 0x2884(%rsp), %eax
addq $0x2888, %rsp           # imm = 0x2888
retq
nopl (%rax)