// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/output.c
// Function: output_thermodynamics
int output_thermodynamics(
                          struct background * pba,
                          struct thermodynamics * pth,
                          struct output * pop
                          ) {

  FileName file_name;
  FILE * thermofile;
  char titles[_MAXTITLESTRINGLENGTH_]={0};
  double * data;
  int size_data, number_of_titles;

  class_call(thermodynamics_output_titles(pba,pth,titles),
             pth->error_message,
             pop->error_message);
  number_of_titles = get_number_of_titles(titles);
  size_data = number_of_titles*pth->tt_size;
  class_alloc(data,sizeof(double)*size_data,pop->error_message);
  class_call(thermodynamics_output_data(pba,
                                        pth,
                                        number_of_titles,
                                        data),
             pth->error_message,
             pop->error_message);

  class_sprintf(file_name,"%s%s",pop->root,"thermodynamics.dat");
  class_open(thermofile,file_name,"w",pop->error_message);

  if (pop->write_header == _TRUE_) {
    fprintf(thermofile,"# Table of selected thermodynamics quantities\n");
    fprintf(thermofile,"# The following notation is used in column titles:\n");
    fprintf(thermofile,"#         x_e = electron ionization fraction\n");
    fprintf(thermofile,"#      -kappa = optical depth\n");
    fprintf(thermofile,"#      kappa' = Thomson scattering rate, prime denotes conformal time derivatives\n");
    fprintf(thermofile,"#           g = kappa' e^-kappa = visibility function \n");
    fprintf(thermofile,"#          Tb = baryon temperature \n");
    fprintf(thermofile,"#         w_b = baryon equation of state parameter \n");
    fprintf(thermofile,"#       c_b^2 = baryon sound speed squared \n");
    fprintf(thermofile,"#       tau_d = baryon drag optical depth \n");
    if (pth->compute_damping_scale == _TRUE_)
      fprintf(thermofile,"#         r_d = approximate comoving value of photon damping scale \n");
    if (pth->has_idm_dr == _TRUE_) {
      fprintf(thermofile,"#  dmu_idm_dr = scattering rate of idr with idm_dr (i.e. idr opacity to idm_dr scattering) (units 1/Mpc)\n");
      fprintf(thermofile,"# ddmu_idm_dr = derivative of this rate\n");
      fprintf(thermofile,"#  tau_idm_dr = optical depth of idm_dr (due to interactions with idr) \n");
      fprintf(thermofile,"#     tau_idr = optical depth of idr (due to self-interactions) \n");
      fprintf(thermofile,"#    g_idm_dr = visibility function of idm_idr \n");
      fprintf(thermofile,"#  c_idm_dr^2 = interacting dark matter squared sound speed \n");
      fprintf(thermofile,"#    T_idm_dr = temperature of DM interacting with DR \n");
      fprintf(thermofile,"#     dmu_idr = idr self-interaction rate \n");
    }
  }

  output_print_data(thermofile,
                    titles,
                    data,
                    size_data);

  free(data);
  fclose(thermofile);

  return _SUCCESS_;

}

// Assembly:
subq $0x40a8, %rsp           # imm = 0x40A8
movq %rdi, 0x4098(%rsp)
movq %rsi, 0x4090(%rsp)
movq %rdx, 0x4088(%rsp)
leaq 0x2030(%rsp), %rdi
xorl %esi, %esi
movl $0x1f40, %edx           # imm = 0x1F40
callq 0x8210
movq 0x4098(%rsp), %rdi
movq 0x4090(%rsp), %rsi
leaq 0x2030(%rsp), %rdx
callq 0xc6bd0
cmpl $0x1, %eax
jne 0x1cd8e2
leaq 0x1820(%rsp), %rdi
movq 0x4090(%rsp), %rcx
addq $0x1064, %rcx           # imm = 0x1064
leaq 0x4b45(%rip), %rsi      # 0x1d23d8
leaq 0x46e1b(%rip), %rdx     # 0x2146b5
movb $0x0, %al
callq 0x5b9c0
movq 0x4088(%rsp), %rdi
addq $0x420, %rdi            # imm = 0x420
leaq 0x1820(%rsp), %r8
leaq 0x4775(%rip), %rsi      # 0x1d2034
leaq 0x46e1c(%rip), %rdx     # 0x2146e2
movl $0x4ca, %ecx            # imm = 0x4CA
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x40a4(%rsp)
jmp 0x1cdd59
leaq 0x2030(%rsp), %rdi
callq 0x5bba0
movl %eax, 0x2020(%rsp)
movl 0x2020(%rsp), %eax
movq 0x4090(%rsp), %rcx
imull 0xf08(%rcx), %eax
movl %eax, 0x2024(%rsp)
movslq 0x2024(%rsp), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, 0x2028(%rsp)
cmpq $0x0, 0x2028(%rsp)
jne 0x1cd9af
movslq 0x2024(%rsp), %rax
shlq $0x3, %rax
movl %eax, 0x181c(%rsp)
leaq 0x1010(%rsp), %rdi
movl 0x181c(%rsp), %ecx
leaq 0x46a4(%rip), %rsi      # 0x1d2004
leaq 0x41f67(%rip), %rdx     # 0x20f8ce
movb $0x0, %al
callq 0x5b9c0
movq 0x4088(%rsp), %rdi
addq $0x420, %rdi            # imm = 0x420
leaq 0x1010(%rsp), %r8
leaq 0x46a8(%rip), %rsi      # 0x1d2034
leaq 0x46d4f(%rip), %rdx     # 0x2146e2
movl $0x4cd, %ecx            # imm = 0x4CD
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x40a4(%rsp)
jmp 0x1cdd59
movq 0x4098(%rsp), %rdi
movq 0x4090(%rsp), %rsi
movl 0x2020(%rsp), %edx
movq 0x2028(%rsp), %rcx
callq 0xc6f50
cmpl $0x1, %eax
jne 0x1cda45
leaq 0x810(%rsp), %rdi
movq 0x4090(%rsp), %rcx
addq $0x1064, %rcx           # imm = 0x1064
leaq 0x49e2(%rip), %rsi      # 0x1d23d8
leaq 0x46cfb(%rip), %rdx     # 0x2146f8
movb $0x0, %al
callq 0x5b9c0
movq 0x4088(%rsp), %rdi
addq $0x420, %rdi            # imm = 0x420
leaq 0x810(%rsp), %r8
leaq 0x4612(%rip), %rsi      # 0x1d2034
leaq 0x46cb9(%rip), %rdx     # 0x2146e2
movl $0x4d3, %ecx            # imm = 0x4D3
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x40a4(%rsp)
jmp 0x1cdd59
jmp 0x1cda47
movq 0x4088(%rsp), %rcx
xorl %eax, %eax
movl %eax, %esi
leaq 0x466ab(%rip), %rdx     # 0x214105
leaq 0x9167(%rip), %r8       # 0x1d6bc8
movq %rsi, %rdi
movb $0x0, %al
callq 0x8540
movl %eax, 0x80c(%rsp)
leaq 0x3f80(%rsp), %rdi
movl 0x80c(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movq 0x4088(%rsp), %rcx
leaq 0x4666f(%rip), %rdx     # 0x214105
leaq 0x912b(%rip), %r8       # 0x1d6bc8
movb $0x0, %al
callq 0x8540
leaq 0x3f80(%rsp), %rdi
leaq 0x7976(%rip), %rsi      # 0x1d5429
callq 0x8410
movq %rax, 0x3f78(%rsp)
cmpq $0x0, 0x3f78(%rsp)
jne 0x1cdb2e
movq %rsp, %rdi
leaq 0x3f80(%rsp), %rcx
leaq 0x6ef3(%rip), %rsi      # 0x1d49d0
leaq 0x46c51(%rip), %rdx     # 0x214735
leaq 0x20a5d(%rip), %r8      # 0x1ee548
movb $0x0, %al
callq 0x5b9c0
movq 0x4088(%rsp), %rdi
addq $0x420, %rdi            # imm = 0x420
movq %rsp, %r8
leaq 0x4529(%rip), %rsi      # 0x1d2034
leaq 0x46bd0(%rip), %rdx     # 0x2146e2
movl $0x4d6, %ecx            # imm = 0x4D6
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x40a4(%rsp)
jmp 0x1cdd59
movq 0x4088(%rsp), %rax
movswl 0x408(%rax), %eax
cmpl $0x1, %eax
jne 0x1cdd10
movq 0x3f78(%rsp), %rdi
leaq 0x46beb(%rip), %rsi     # 0x214740
movb $0x0, %al
callq 0x84e0
movq 0x3f78(%rsp), %rdi
leaq 0x46c04(%rip), %rsi     # 0x21476f
movb $0x0, %al
callq 0x84e0
movq 0x3f78(%rsp), %rdi
leaq 0x46c22(%rip), %rsi     # 0x2147a3
movb $0x0, %al
callq 0x84e0
movq 0x3f78(%rsp), %rdi
leaq 0x46c3a(%rip), %rsi     # 0x2147d1
movb $0x0, %al
callq 0x84e0
movq 0x3f78(%rsp), %rdi
leaq 0x46c43(%rip), %rsi     # 0x2147f0
movb $0x0, %al
callq 0x84e0
movq 0x3f78(%rsp), %rdi
leaq 0x46c80(%rip), %rsi     # 0x214843
movb $0x0, %al
callq 0x84e0
movq 0x3f78(%rsp), %rdi
leaq 0x46ca2(%rip), %rsi     # 0x21487b
movb $0x0, %al
callq 0x84e0
movq 0x3f78(%rsp), %rdi
leaq 0x46cb1(%rip), %rsi     # 0x2148a0
movb $0x0, %al
callq 0x84e0
movq 0x3f78(%rsp), %rdi
leaq 0x46cd0(%rip), %rsi     # 0x2148d5
movb $0x0, %al
callq 0x84e0
movq 0x3f78(%rsp), %rdi
leaq 0x46ce7(%rip), %rsi     # 0x214902
movb $0x0, %al
callq 0x84e0
movq 0x4090(%rsp), %rax
movswl 0x32(%rax), %eax
cmpl $0x1, %eax
jne 0x1cdc49
movq 0x3f78(%rsp), %rdi
leaq 0x46cec(%rip), %rsi     # 0x21492e
movb $0x0, %al
callq 0x84e0
movq 0x4090(%rsp), %rax
movswl 0x38(%rax), %eax
cmpl $0x1, %eax
jne 0x1cdd0e
movq 0x3f78(%rsp), %rdi
leaq 0x46d06(%rip), %rsi     # 0x214973
movb $0x0, %al
callq 0x84e0
movq 0x3f78(%rsp), %rdi
leaq 0x46d5a(%rip), %rsi     # 0x2149dd
movb $0x0, %al
callq 0x84e0
movq 0x3f78(%rsp), %rdi
leaq 0x46d6d(%rip), %rsi     # 0x214a06
movb $0x0, %al
callq 0x84e0
movq 0x3f78(%rsp), %rdi
leaq 0x46da0(%rip), %rsi     # 0x214a4f
movb $0x0, %al
callq 0x84e0
movq 0x3f78(%rsp), %rdi
leaq 0x46dcc(%rip), %rsi     # 0x214a91
movb $0x0, %al
callq 0x84e0
movq 0x3f78(%rsp), %rdi
leaq 0x46de7(%rip), %rsi     # 0x214ac2
movb $0x0, %al
callq 0x84e0
movq 0x3f78(%rsp), %rdi
leaq 0x46e0f(%rip), %rsi     # 0x214b00
movb $0x0, %al
callq 0x84e0
movq 0x3f78(%rsp), %rdi
leaq 0x46e31(%rip), %rsi     # 0x214b38
movb $0x0, %al
callq 0x84e0
jmp 0x1cdd10
movq 0x3f78(%rsp), %rdi
leaq 0x2030(%rsp), %rsi
movq 0x2028(%rsp), %rdx
movl 0x2024(%rsp), %ecx
callq 0x1d1430
movq 0x2028(%rsp), %rdi
callq 0x8420
movq 0x3f78(%rsp), %rdi
callq 0x83c0
movl $0x0, 0x40a4(%rsp)
movl 0x40a4(%rsp), %eax
addq $0x40a8, %rsp           # imm = 0x40A8
retq
nopl (%rax,%rax)