// File: /workspace/github_c_makefile_star2_O3/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 0x6db26
testl %eax, %eax
je 0x6aca9
addq $0x1064, %rbx           # imm = 0x1064
leaq 0x8377b(%rip), %rsi     # 0xee3f0
leaq 0xa47a3(%rip), %rdx     # 0x10f41f
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x8339f(%rip), %rsi     # 0xee034
leaq 0xa47c2(%rip), %rdx     # 0x10f45e
movq %rbx, %rdi
movl $0x6cf, %ecx            # imm = 0x6CF
jmp 0x6adb0
cmpw $0x1, 0x32(%rbx)
jne 0x6ad04
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6ddd2
testl %eax, %eax
je 0x6ad04
addq $0x1064, %rbx           # imm = 0x1064
leaq 0x83720(%rip), %rsi     # 0xee3f0
leaq 0xa47b5(%rip), %rdx     # 0x10f48c
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x83344(%rip), %rsi     # 0xee034
leaq 0xa4767(%rip), %rdx     # 0x10f45e
movq %rbx, %rdi
movl $0x6d4, %ecx            # imm = 0x6D4
jmp 0x6adb0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x6e20e
testl %eax, %eax
je 0x6ad52
addq $0x1064, %rbx           # imm = 0x1064
leaq 0x836cf(%rip), %rsi     # 0xee3f0
leaq 0xa479d(%rip), %rdx     # 0x10f4c5
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x832f3(%rip), %rsi     # 0xee034
leaq 0xa4716(%rip), %rdx     # 0x10f45e
movq %rbx, %rdi
movl $0x6d9, %ecx            # imm = 0x6D9
jmp 0x6adb0
cmpw $0x1, 0x4c6(%r15)
je 0x6ad64
cmpw $0x1, 0x34(%rbx)
jne 0x6add3
movq %r13, %rdi
movq %rbx, %rdx
callq 0x6e951
testl %eax, %eax
je 0x6add3
addq $0x1064, %rbx           # imm = 0x1064
leaq 0x8366f(%rip), %rsi     # 0xee3f0
leaq 0xa4768(%rip), %rdx     # 0x10f4f0
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x83293(%rip), %rsi     # 0xee034
leaq 0xa46b6(%rip), %rdx     # 0x10f45e
movq %rbx, %rdi
movl $0x6df, %ecx            # imm = 0x6DF
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
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 0x142a8
cmpl $0x1, %eax
jne 0x6ae59
leaq 0x835d5(%rip), %rsi     # 0xee3f0
leaq 0xa4714(%rip), %rdx     # 0x10f536
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x831f9(%rip), %rsi     # 0xee034
leaq 0xa461c(%rip), %rdx     # 0x10f45e
movq %r12, %rdi
movl $0x6eb, %ecx            # imm = 0x6EB
movq %rbx, %r8
xorl %eax, %eax
callq 0x30af0
jmp 0x6adbf
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x6efc6
testl %eax, %eax
je 0x6aea6
leaq 0x8357b(%rip), %rsi     # 0xee3f0
leaq 0xa4750(%rip), %rdx     # 0x10f5cc
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x8319f(%rip), %rsi     # 0xee034
leaq 0xa45c2(%rip), %rdx     # 0x10f45e
movq %r12, %rdi
movl $0x6ef, %ecx            # imm = 0x6EF
jmp 0x6aeee
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x6f8d2
testl %eax, %eax
je 0x6aef6
leaq 0x83531(%rip), %rsi     # 0xee3f0
leaq 0xa474e(%rip), %rdx     # 0x10f614
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x83155(%rip), %rsi     # 0xee034
leaq 0xa4578(%rip), %rdx     # 0x10f45e
movq %r12, %rdi
movl $0x6f3, %ecx            # imm = 0x6F3
movq %rbx, %r8
jmp 0x6adb3
xorl %ebp, %ebp
jmp 0x6adbf