// File: /workspace/github_c_makefile_star2_O1/PoulinV[P]AxiCLASS/build/../source/thermodynamics.c
// Function: thermodynamics_calculate_remaining_quantities
int thermodynamics_calculate_remaining_quantities(
                                                  struct precision * ppr,
                                                  struct background * pba,
                                                  struct thermodynamics* pth,
                                                  double* pvecback
                                                  ) {

  /** Summary: */

  /* The temporary quantities stored in columns ddkappa and dddkappa will not be used anymore, so they can and WILL be overwritten by other
     intermediate steps of other computations */

  class_call(thermodynamics_calculate_conformal_drag_time(pba,pth,pvecback),
             pth->error_message,
             pth->error_message);

  if (pth->compute_damping_scale == _TRUE_) {
    class_call(thermodynamics_calculate_damping_scale(pba,pth,pvecback),
               pth->error_message,
               pth->error_message);
  }

  class_call(thermodynamics_calculate_opticals(ppr,pth),
             pth->error_message,
             pth->error_message);

  /* Please note, this function has to be before the spline_table_lines to generate the correct d2thdz2_table */
  if (pba->has_idr == _TRUE_ || pth->has_idm_b == _TRUE_) {
    class_call(thermodynamics_calculate_idm_and_idr_quantities(ppr,pba,pth,pvecback),
               pth->error_message,
               pth->error_message);
  }

  /** - fill tables of second derivatives with respect to z (in view of spline interpolation) */
  class_call(array_spline_table_lines(pth->z_table,
                                      pth->tt_size,
                                      pth->thermodynamics_table,
                                      pth->th_size,
                                      pth->d2thermodynamics_dz2_table,
                                      _SPLINE_EST_DERIV_,
                                      pth->error_message),
             pth->error_message,
             pth->error_message);

  class_call(thermodynamics_calculate_recombination_quantities(ppr,pba,pth,pvecback),
             pth->error_message,
             pth->error_message);

  class_call(thermodynamics_calculate_drag_quantities(ppr,pba,pth,pvecback),
             pth->error_message,
             pth->error_message);


  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x818, %rsp            # imm = 0x818
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r13
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x705b1
testl %eax, %eax
je 0x6d611
addq $0x1064, %rbx           # imm = 0x1064
leaq 0x83e13(%rip), %rsi     # 0xf13f0
leaq 0xa4deb(%rip), %rdx     # 0x1123cf
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x83a37(%rip), %rsi     # 0xf1034
leaq 0xa4e0a(%rip), %rdx     # 0x11240e
movq %rbx, %rdi
movl $0x6cf, %ecx            # imm = 0x6CF
jmp 0x6d718
cmpw $0x1, 0x32(%rbx)
jne 0x6d66c
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x7085c
testl %eax, %eax
je 0x6d66c
addq $0x1064, %rbx           # imm = 0x1064
leaq 0x83db8(%rip), %rsi     # 0xf13f0
leaq 0xa4dfd(%rip), %rdx     # 0x11243c
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x839dc(%rip), %rsi     # 0xf1034
leaq 0xa4daf(%rip), %rdx     # 0x11240e
movq %rbx, %rdi
movl $0x6d4, %ecx            # imm = 0x6D4
jmp 0x6d718
movq %r13, %rdi
movq %rbx, %rsi
callq 0x70cb7
testl %eax, %eax
je 0x6d6ba
addq $0x1064, %rbx           # imm = 0x1064
leaq 0x83d67(%rip), %rsi     # 0xf13f0
leaq 0xa4de5(%rip), %rdx     # 0x112475
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x8398b(%rip), %rsi     # 0xf1034
leaq 0xa4d5e(%rip), %rdx     # 0x11240e
movq %rbx, %rdi
movl $0x6d9, %ecx            # imm = 0x6D9
jmp 0x6d718
cmpw $0x1, 0x4c6(%r15)
je 0x6d6cc
cmpw $0x1, 0x34(%rbx)
jne 0x6d73b
movq %r13, %rdi
movq %rbx, %rdx
callq 0x71423
testl %eax, %eax
je 0x6d73b
addq $0x1064, %rbx           # imm = 0x1064
leaq 0x83d07(%rip), %rsi     # 0xf13f0
leaq 0xa4db0(%rip), %rdx     # 0x1124a0
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x8392b(%rip), %rsi     # 0xf1034
leaq 0xa4cfe(%rip), %rdx     # 0x11240e
movq %rbx, %rdi
movl $0x6df, %ecx            # imm = 0x6DF
movq %r14, %r8
xorl %eax, %eax
callq 0x30c2c
movl $0x1, %ebp
movl %ebp, %eax
addq $0x818, %rsp            # imm = 0x818
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xf10(%rbx), %rdi
movl 0xf04(%rbx), %ecx
movl 0xf08(%rbx), %esi
movq 0xf20(%rbx), %rdx
movq 0xf28(%rbx), %r8
leaq 0x1064(%rbx), %r12
movq %r12, (%rsp)
movl $0x1, %ebp
movl $0x1, %r9d
callq 0x14191
cmpl $0x1, %eax
jne 0x6d7c1
leaq 0x83c6d(%rip), %rsi     # 0xf13f0
leaq 0xa4d5c(%rip), %rdx     # 0x1124e6
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x83891(%rip), %rsi     # 0xf1034
leaq 0xa4c64(%rip), %rdx     # 0x11240e
movq %r12, %rdi
movl $0x6eb, %ecx            # imm = 0x6EB
movq %rbx, %r8
xorl %eax, %eax
callq 0x30c2c
jmp 0x6d727
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x71aa5
testl %eax, %eax
je 0x6d80e
leaq 0x83c13(%rip), %rsi     # 0xf13f0
leaq 0xa4d98(%rip), %rdx     # 0x11257c
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x83837(%rip), %rsi     # 0xf1034
leaq 0xa4c0a(%rip), %rdx     # 0x11240e
movq %r12, %rdi
movl $0x6ef, %ecx            # imm = 0x6EF
jmp 0x6d856
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x723c0
testl %eax, %eax
je 0x6d85e
leaq 0x83bc9(%rip), %rsi     # 0xf13f0
leaq 0xa4d96(%rip), %rdx     # 0x1125c4
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x837ed(%rip), %rsi     # 0xf1034
leaq 0xa4bc0(%rip), %rdx     # 0x11240e
movq %r12, %rdi
movl $0x6f3, %ecx            # imm = 0x6F3
movq %rbx, %r8
jmp 0x6d71b
xorl %ebp, %ebp
jmp 0x6d727