// File: /workspace/github_c_makefile_star2_O2/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 0x695e9
testl %eax, %eax
je 0x668d4
addq $0x1064, %rbx           # imm = 0x1064
leaq 0x7eb50(%rip), %rsi     # 0xe53f0
leaq 0x9fa18(%rip), %rdx     # 0x1062bf
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x7e774(%rip), %rsi     # 0xe5034
leaq 0x9fa37(%rip), %rdx     # 0x1062fe
movq %rbx, %rdi
movl $0x6cf, %ecx            # imm = 0x6CF
jmp 0x669db
cmpw $0x1, 0x32(%rbx)
jne 0x6692f
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6987a
testl %eax, %eax
je 0x6692f
addq $0x1064, %rbx           # imm = 0x1064
leaq 0x7eaf5(%rip), %rsi     # 0xe53f0
leaq 0x9fa2a(%rip), %rdx     # 0x10632c
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x7e719(%rip), %rsi     # 0xe5034
leaq 0x9f9dc(%rip), %rdx     # 0x1062fe
movq %rbx, %rdi
movl $0x6d4, %ecx            # imm = 0x6D4
jmp 0x669db
movq %r13, %rdi
movq %rbx, %rsi
callq 0x69cac
testl %eax, %eax
je 0x6697d
addq $0x1064, %rbx           # imm = 0x1064
leaq 0x7eaa4(%rip), %rsi     # 0xe53f0
leaq 0x9fa12(%rip), %rdx     # 0x106365
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x7e6c8(%rip), %rsi     # 0xe5034
leaq 0x9f98b(%rip), %rdx     # 0x1062fe
movq %rbx, %rdi
movl $0x6d9, %ecx            # imm = 0x6D9
jmp 0x669db
cmpw $0x1, 0x4c6(%r15)
je 0x6698f
cmpw $0x1, 0x34(%rbx)
jne 0x669fc
movq %r13, %rdi
movq %rbx, %rdx
callq 0x6a3b7
testl %eax, %eax
je 0x669fc
addq $0x1064, %rbx           # imm = 0x1064
leaq 0x7ea44(%rip), %rsi     # 0xe53f0
leaq 0x9f9dd(%rip), %rdx     # 0x106390
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x7e668(%rip), %rsi     # 0xe5034
leaq 0x9f92b(%rip), %rdx     # 0x1062fe
movq %rbx, %rdi
movl $0x6df, %ecx            # imm = 0x6DF
movq %r14, %r8
xorl %eax, %eax
callq 0x2e014
pushq $0x1
popq %rbp
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)
pushq $0x1
popq %rbp
movl %ebp, %r9d
callq 0x125a5
cmpl $0x1, %eax
jne 0x66a73
leaq 0x7e9b1(%rip), %rsi     # 0xe53f0
leaq 0x9f990(%rip), %rdx     # 0x1063d6
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x7e5d5(%rip), %rsi     # 0xe5034
leaq 0x9f898(%rip), %rdx     # 0x1062fe
movq %r12, %rdi
movl $0x6eb, %ecx            # imm = 0x6EB
jmp 0x66b08
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x6aa15
testl %eax, %eax
je 0x66ac0
leaq 0x7e961(%rip), %rsi     # 0xe53f0
leaq 0x9f9d6(%rip), %rdx     # 0x10646c
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x7e585(%rip), %rsi     # 0xe5034
leaq 0x9f848(%rip), %rdx     # 0x1062fe
movq %r12, %rdi
movl $0x6ef, %ecx            # imm = 0x6EF
jmp 0x66b08
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x6b2d0
testl %eax, %eax
je 0x66b17
leaq 0x7e917(%rip), %rsi     # 0xe53f0
leaq 0x9f9d4(%rip), %rdx     # 0x1064b4
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x7e53b(%rip), %rsi     # 0xe5034
leaq 0x9f7fe(%rip), %rdx     # 0x1062fe
movq %r12, %rdi
movl $0x6f3, %ecx            # imm = 0x6F3
movq %rbx, %r8
xorl %eax, %eax
callq 0x2e014
jmp 0x669e8
xorl %ebp, %ebp
jmp 0x669e8