// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/output.c
// Function: output_heating
int output_heating(struct injection* pin, struct noninjection* pni, struct output * pop) {

  /** Local variables*/
  FileName file_name_injection;
  FILE * out_injection;
  FileName file_name_noninjection;
  FILE * out_noninjection;

  char titles_injection[_MAXTITLESTRINGLENGTH_]={0};

  double * data_injection;
  int size_data_injection;
  int number_of_titles_injection;

  char titles_noninjection[_MAXTITLESTRINGLENGTH_]={0};

  double * data_noninjection;
  int size_data_noninjection;
  int number_of_titles_noninjection;

  if (pop->write_exotic_injection == _TRUE_){

    /* File name */
    class_sprintf(file_name_injection,"%s%s",pop->root,"exotic_injection.dat");

    /* Titles */
    class_call(injection_output_titles(pin,titles_injection),
               pin->error_message,
               pin->error_message);
    number_of_titles_injection = get_number_of_titles(titles_injection);

    /* Data array */
    size_data_injection = number_of_titles_injection*pin->z_size;
    class_alloc(data_injection,
                sizeof(double)*size_data_injection,
                pop->error_message);
    class_call(injection_output_data(pin,
                                     number_of_titles_injection,
                                     data_injection),
               pin->error_message,
               pop->error_message);

    /* File IO */
    class_open(out_injection,
               file_name_injection,
               "w",
               pop->error_message);

    if (pop->write_header == _TRUE_){
      fprintf(out_injection,"# Table of energy injection and deposition from exotic processes \n");
      fprintf(out_injection,"# Heat is dE/dt|dep_h\n");
    }

    output_print_data(out_injection,
                      titles_injection,
                      data_injection,
                      size_data_injection);
    free(data_injection);
    fclose(out_injection);

  }

  if (pop->write_noninjection == _TRUE_){

    /* File name */
    class_sprintf(file_name_noninjection,"%s%s",pop->root,"photon_noninjection.dat");

    /* Titles */
    class_call(noninjection_output_titles(pni,titles_noninjection),
               pni->error_message,
               pni->error_message);
    number_of_titles_noninjection = get_number_of_titles(titles_noninjection);

    /* Data array */
    size_data_noninjection = number_of_titles_noninjection*pin->z_size;
    class_alloc(data_noninjection,
                sizeof(double)*size_data_noninjection,
                pop->error_message);
    class_call(noninjection_output_data(pni,
                                        number_of_titles_noninjection,
                                        data_noninjection),
               pni->error_message,
               pop->error_message);

    /* File IO */
    class_open(out_noninjection,
               file_name_noninjection,
               "w",
               pop->error_message);

    if (pop->write_header == _TRUE_){
      fprintf(out_noninjection,"# Table of non-injected energy influencing the photon spectral distortions \n");
    }

    output_print_data(out_noninjection,
                      titles_noninjection,
                      data_noninjection,
                      size_data_noninjection);
    free(data_noninjection);
    fclose(out_noninjection);

  }

  return _SUCCESS_;
}

// Assembly:
subq $0x8128, %rsp           # imm = 0x8128
movq %rdi, 0x8118(%rsp)
movq %rsi, 0x8110(%rsp)
movq %rdx, 0x8108(%rsp)
leaq 0x5fa0(%rsp), %rdi
xorl %esi, %esi
movl $0x1f40, %edx           # imm = 0x1F40
callq 0x8210
leaq 0x4050(%rsp), %rdi
xorl %esi, %esi
movl $0x1f40, %edx           # imm = 0x1F40
callq 0x8210
movq 0x8108(%rsp), %rax
movswl 0x418(%rax), %eax
cmpl $0x1, %eax
jne 0x1ceb72
jmp 0x1ce821
movq 0x8108(%rsp), %rcx
xorl %eax, %eax
movl %eax, %esi
leaq 0x458d1(%rip), %rdx     # 0x214105
leaq 0x464c9(%rip), %r8      # 0x214d04
movq %rsi, %rdi
movb $0x0, %al
callq 0x8540
movl %eax, 0x403c(%rsp)
leaq 0x8000(%rsp), %rdi
movl 0x403c(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movq 0x8108(%rsp), %rcx
leaq 0x45895(%rip), %rdx     # 0x214105
leaq 0x4648d(%rip), %r8      # 0x214d04
movb $0x0, %al
callq 0x8540
movq 0x8118(%rsp), %rdi
leaq 0x5fa0(%rsp), %rsi
callq 0x1a3560
cmpl $0x1, %eax
jne 0x1ce905
leaq 0x3830(%rsp), %rdi
movq 0x8118(%rsp), %rcx
addq $0x570, %rcx            # imm = 0x570
leaq 0x3b22(%rip), %rsi      # 0x1d23d8
leaq 0x4645c(%rip), %rdx     # 0x214d19
movb $0x0, %al
callq 0x5b9c0
movq 0x8118(%rsp), %rdi
addq $0x570, %rdi            # imm = 0x570
leaq 0x3830(%rsp), %r8
leaq 0x3752(%rip), %rsi      # 0x1d2034
leaq 0x4645e(%rip), %rdx     # 0x214d47
movl $0x57f, %ecx            # imm = 0x57F
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x8124(%rsp)
jmp 0x1ceec5
leaq 0x5fa0(%rsp), %rdi
callq 0x5bba0
movl %eax, 0x5f90(%rsp)
movl 0x5f90(%rsp), %eax
movq 0x8118(%rsp), %rcx
imull 0x450(%rcx), %eax
movl %eax, 0x5f94(%rsp)
movslq 0x5f94(%rsp), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, 0x5f98(%rsp)
cmpq $0x0, 0x5f98(%rsp)
jne 0x1ce9d2
movslq 0x5f94(%rsp), %rax
shlq $0x3, %rax
movl %eax, 0x382c(%rsp)
leaq 0x3020(%rsp), %rdi
movl 0x382c(%rsp), %ecx
leaq 0x3681(%rip), %rsi      # 0x1d2004
leaq 0x463cc(%rip), %rdx     # 0x214d56
movb $0x0, %al
callq 0x5b9c0
movq 0x8108(%rsp), %rdi
addq $0x420, %rdi            # imm = 0x420
leaq 0x3020(%rsp), %r8
leaq 0x3685(%rip), %rsi      # 0x1d2034
leaq 0x46391(%rip), %rdx     # 0x214d47
movl $0x586, %ecx            # imm = 0x586
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x8124(%rsp)
jmp 0x1ceec5
movq 0x8118(%rsp), %rdi
movl 0x5f90(%rsp), %esi
movq 0x5f98(%rsp), %rdx
callq 0x1a3620
cmpl $0x1, %eax
jne 0x1cea60
leaq 0x2820(%rsp), %rdi
movq 0x8118(%rsp), %rcx
addq $0x570, %rcx            # imm = 0x570
leaq 0x39c7(%rip), %rsi      # 0x1d23d8
leaq 0x4634d(%rip), %rdx     # 0x214d65
movb $0x0, %al
callq 0x5b9c0
movq 0x8108(%rsp), %rdi
addq $0x420, %rdi            # imm = 0x420
leaq 0x2820(%rsp), %r8
leaq 0x35f7(%rip), %rsi      # 0x1d2034
leaq 0x46303(%rip), %rdx     # 0x214d47
movl $0x58b, %ecx            # imm = 0x58B
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x8124(%rsp)
jmp 0x1ceec5
leaq 0x8000(%rsp), %rdi
leaq 0x69ba(%rip), %rsi      # 0x1d5429
callq 0x8410
movq %rax, 0x7ff8(%rsp)
cmpq $0x0, 0x7ff8(%rsp)
jne 0x1ceaf4
leaq 0x2020(%rsp), %rdi
leaq 0x8000(%rsp), %rcx
leaq 0x5f32(%rip), %rsi      # 0x1d49d0
leaq 0x46307(%rip), %rdx     # 0x214dac
leaq 0x1fa9c(%rip), %r8      # 0x1ee548
movb $0x0, %al
callq 0x5b9c0
movq 0x8108(%rsp), %rdi
addq $0x420, %rdi            # imm = 0x420
leaq 0x2020(%rsp), %r8
leaq 0x3563(%rip), %rsi      # 0x1d2034
leaq 0x4626f(%rip), %rdx     # 0x214d47
movl $0x591, %ecx            # imm = 0x591
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x8124(%rsp)
jmp 0x1ceec5
movq 0x8108(%rsp), %rax
movswl 0x408(%rax), %eax
cmpl $0x1, %eax
jne 0x1ceb34
movq 0x7ff8(%rsp), %rdi
leaq 0x462a3(%rip), %rsi     # 0x214dba
movb $0x0, %al
callq 0x84e0
movq 0x7ff8(%rsp), %rdi
leaq 0x462d0(%rip), %rsi     # 0x214dfd
movb $0x0, %al
callq 0x84e0
movq 0x7ff8(%rsp), %rdi
leaq 0x5fa0(%rsp), %rsi
movq 0x5f98(%rsp), %rdx
movl 0x5f94(%rsp), %ecx
callq 0x1d1430
movq 0x5f98(%rsp), %rdi
callq 0x8420
movq 0x7ff8(%rsp), %rdi
callq 0x83c0
movq 0x8108(%rsp), %rax
movswl 0x41a(%rax), %eax
cmpl $0x1, %eax
jne 0x1ceeba
jmp 0x1ceb8c
movq 0x8108(%rsp), %rcx
xorl %eax, %eax
movl %eax, %esi
leaq 0x45566(%rip), %rdx     # 0x214105
leaq 0x4626e(%rip), %r8      # 0x214e14
movq %rsi, %rdi
movb $0x0, %al
callq 0x8540
movl %eax, 0x201c(%rsp)
leaq 0x7ef0(%rsp), %rdi
movl 0x201c(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movq 0x8108(%rsp), %rcx
leaq 0x4552a(%rip), %rdx     # 0x214105
leaq 0x46232(%rip), %r8      # 0x214e14
movb $0x0, %al
callq 0x8540
movq 0x8110(%rsp), %rdi
leaq 0x4050(%rsp), %rsi
callq 0x1a5530
cmpl $0x1, %eax
jne 0x1cec70
leaq 0x1810(%rsp), %rdi
movq 0x8110(%rsp), %rcx
addq $0x110, %rcx            # imm = 0x110
leaq 0x37b7(%rip), %rsi      # 0x1d23d8
leaq 0x46204(%rip), %rdx     # 0x214e2c
movb $0x0, %al
callq 0x5b9c0
movq 0x8110(%rsp), %rdi
addq $0x110, %rdi            # imm = 0x110
leaq 0x1810(%rsp), %r8
leaq 0x33e7(%rip), %rsi      # 0x1d2034
leaq 0x460f3(%rip), %rdx     # 0x214d47
movl $0x5a9, %ecx            # imm = 0x5A9
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x8124(%rsp)
jmp 0x1ceec5
leaq 0x4050(%rsp), %rdi
callq 0x5bba0
movl %eax, 0x4040(%rsp)
movl 0x4040(%rsp), %eax
movq 0x8118(%rsp), %rcx
imull 0x450(%rcx), %eax
movl %eax, 0x4044(%rsp)
movslq 0x4044(%rsp), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, 0x4048(%rsp)
cmpq $0x0, 0x4048(%rsp)
jne 0x1ced3d
movslq 0x4044(%rsp), %rax
shlq $0x3, %rax
movl %eax, 0x180c(%rsp)
leaq 0x1000(%rsp), %rdi
movl 0x180c(%rsp), %ecx
leaq 0x3316(%rip), %rsi      # 0x1d2004
leaq 0x4616b(%rip), %rdx     # 0x214e60
movb $0x0, %al
callq 0x5b9c0
movq 0x8108(%rsp), %rdi
addq $0x420, %rdi            # imm = 0x420
leaq 0x1000(%rsp), %r8
leaq 0x331a(%rip), %rsi      # 0x1d2034
leaq 0x46026(%rip), %rdx     # 0x214d47
movl $0x5b0, %ecx            # imm = 0x5B0
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x8124(%rsp)
jmp 0x1ceec5
movq 0x8110(%rsp), %rdi
movl 0x4040(%rsp), %esi
movq 0x4048(%rsp), %rdx
callq 0x1a5590
cmpl $0x1, %eax
jne 0x1cedcb
leaq 0x800(%rsp), %rdi
movq 0x8110(%rsp), %rcx
addq $0x110, %rcx            # imm = 0x110
leaq 0x365c(%rip), %rsi      # 0x1d23d8
leaq 0x460ef(%rip), %rdx     # 0x214e72
movb $0x0, %al
callq 0x5b9c0
movq 0x8108(%rsp), %rdi
addq $0x420, %rdi            # imm = 0x420
leaq 0x800(%rsp), %r8
leaq 0x328c(%rip), %rsi      # 0x1d2034
leaq 0x45f98(%rip), %rdx     # 0x214d47
movl $0x5b5, %ecx            # imm = 0x5B5
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x8124(%rsp)
jmp 0x1ceec5
leaq 0x7ef0(%rsp), %rdi
leaq 0x664f(%rip), %rsi      # 0x1d5429
callq 0x8410
movq %rax, 0x7ee8(%rsp)
cmpq $0x0, 0x7ee8(%rsp)
jne 0x1cee52
movq %rsp, %rdi
leaq 0x7ef0(%rsp), %rcx
leaq 0x5bcc(%rip), %rsi      # 0x1d49d0
leaq 0x460b7(%rip), %rdx     # 0x214ec2
leaq 0x1f736(%rip), %r8      # 0x1ee548
movb $0x0, %al
callq 0x5b9c0
movq 0x8108(%rsp), %rdi
addq $0x420, %rdi            # imm = 0x420
movq %rsp, %r8
leaq 0x3202(%rip), %rsi      # 0x1d2034
leaq 0x45f0e(%rip), %rdx     # 0x214d47
movl $0x5bb, %ecx            # imm = 0x5BB
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x8124(%rsp)
jmp 0x1ceec5
movq 0x8108(%rsp), %rax
movswl 0x408(%rax), %eax
cmpl $0x1, %eax
jne 0x1cee7c
movq 0x7ee8(%rsp), %rdi
leaq 0x4605e(%rip), %rsi     # 0x214ed3
movb $0x0, %al
callq 0x84e0
movq 0x7ee8(%rsp), %rdi
leaq 0x4050(%rsp), %rsi
movq 0x4048(%rsp), %rdx
movl 0x4044(%rsp), %ecx
callq 0x1d1430
movq 0x4048(%rsp), %rdi
callq 0x8420
movq 0x7ee8(%rsp), %rdi
callq 0x83c0
movl $0x0, 0x8124(%rsp)
movl 0x8124(%rsp), %eax
addq $0x8128, %rsp           # imm = 0x8128
retq
nopw %cs:(%rax,%rax)