// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: write_log_header(_IO_FILE*, int)
void write_log_header(FILE *file, int why)
{
FILE *old_file;

   // write the log file header comments

   if(file == 0) return;
   if(log_comments == 0) return;

   old_file = log_file;
   log_file = file;

   sprintf(log_text, "#");
   write_log_comment(1);

   if(log_fmt == HEATHER) {
      log_rcvr_type();
   }
   else if(log_fmt == RINEX) {
      write_rinex_header(file);
   }

   if((have_info & INFO_LOGGED) == 0) {
      write_log_id();
      have_info |= INFO_LOGGED;
   }

   sprintf(log_text, "#");
   write_log_comment(1);

   if(plot_title[0] && (title_type == USER)) {
      format_plot_title(plot_title);
      sprintf(log_text, "#TITLE: %s", out);
      write_log_comment(1);
      sprintf(log_text, "#");
      write_log_comment(1);
   }

   if(debug_text[0]) {
      format_plot_title(debug_text);
      sprintf(log_text, "#DEBUG1: %s", out);
      write_log_comment(1);
      sprintf(log_text, "#");
      write_log_comment(1);
   }
   if(debug_text2[0]) {
      format_plot_title(debug_text2);
      sprintf(log_text, "#DEBUG2: %s", out);
      write_log_comment(1);
      sprintf(log_text, "#");
      write_log_comment(1);
   }
   if(debug_text3[0]) {
      format_plot_title(debug_text3);
      sprintf(log_text, "#DEBUG3: %s", out);
      write_log_comment(1);
      sprintf(log_text, "#");
      write_log_comment(1);
   }
   if(debug_text4[0]) {
      format_plot_title(debug_text4);
      sprintf(log_text, "#DEBUG4: %s", out);
      write_log_comment(1);
      sprintf(log_text, "#");
      write_log_comment(1);
   }
   if(debug_text5[0]) {
      format_plot_title(debug_text5);
      sprintf(log_text, "#DEBUG5: %s", out);
      write_log_comment(1);
      sprintf(log_text, "#");
      write_log_comment(1);
   }
   if(debug_text6[0]) {
      format_plot_title(debug_text6);
      sprintf(log_text, "#DEBUG6: %s", out);
      write_log_comment(1);
      sprintf(log_text, "#");
      write_log_comment(1);
   }
   if(debug_text7[0]) {
      format_plot_title(debug_text7);
      sprintf(log_text, "#DEBUG7: %s", out);
      write_log_comment(1);
      sprintf(log_text, "#");
      write_log_comment(1);
   }

   log_file = old_file;
   return;
}

// Assembly:
testq %rdi, %rdi
je 0xc6a82
leaq 0x177c75(%rip), %rax    # 0x23e414
cmpb $0x0, (%rax)
je 0xc6a82
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
leaq 0x177ba3(%rip), %r15    # 0x23e360
movq (%r15), %r12
movq %rdi, (%r15)
leaq 0x177196(%rip), %rbx    # 0x23d960
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc36e2
leaq 0x177c68(%rip), %rax    # 0x23e448
movl (%rax), %eax
cmpl $0x12e, %eax            # imm = 0x12E
je 0xc67f4
testl %eax, %eax
jne 0xc67fc
callq 0xc2d0a
jmp 0xc67fc
movq %r14, %rdi
callq 0xc6a83
leaq 0x247171(%rip), %r14    # 0x30d974
testb $0x2, 0x1(%r14)
jne 0xc6814
callq 0xc49cd
orb $0x2, 0x1(%r14)
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc36e2
leaq 0x278026(%rip), %rax    # 0x33e850
cmpb $0x0, (%rax)
je 0xc6878
leaq 0x278a96(%rip), %rax    # 0x33f2cc
cmpl $0x2, (%rax)
jne 0xc6878
leaq 0x27800e(%rip), %rdi    # 0x33e850
callq 0x17d10
leaq 0x4fb95(%rip), %rsi     # 0x1163e3
leaq 0x2759cb(%rip), %rdx    # 0x33c220
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc36e2
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc36e2
leaq 0x278121(%rip), %rax    # 0x33e9a0
cmpb $0x0, (%rax)
je 0xc68c1
leaq 0x278115(%rip), %rdi    # 0x33e9a0
callq 0x17d10
leaq 0x68595(%rip), %rsi     # 0x12ee2c
leaq 0x275982(%rip), %rdx    # 0x33c220
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc36e2
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc36e2
leaq 0x278228(%rip), %rax    # 0x33eaf0
cmpb $0x0, (%rax)
je 0xc690a
leaq 0x27821c(%rip), %rdi    # 0x33eaf0
callq 0x17d10
leaq 0x68558(%rip), %rsi     # 0x12ee38
leaq 0x275939(%rip), %rdx    # 0x33c220
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc36e2
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc36e2
leaq 0x27832f(%rip), %rax    # 0x33ec40
cmpb $0x0, (%rax)
je 0xc6953
leaq 0x278323(%rip), %rdi    # 0x33ec40
callq 0x17d10
leaq 0x6851b(%rip), %rsi     # 0x12ee44
leaq 0x2758f0(%rip), %rdx    # 0x33c220
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc36e2
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc36e2
leaq 0x278436(%rip), %rax    # 0x33ed90
cmpb $0x0, (%rax)
je 0xc699c
leaq 0x27842a(%rip), %rdi    # 0x33ed90
callq 0x17d10
leaq 0x684de(%rip), %rsi     # 0x12ee50
leaq 0x2758a7(%rip), %rdx    # 0x33c220
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc36e2
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc36e2
leaq 0x27853d(%rip), %rax    # 0x33eee0
cmpb $0x0, (%rax)
je 0xc69e5
leaq 0x278531(%rip), %rdi    # 0x33eee0
callq 0x17d10
leaq 0x684a1(%rip), %rsi     # 0x12ee5c
leaq 0x27585e(%rip), %rdx    # 0x33c220
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc36e2
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc36e2
leaq 0x278644(%rip), %rax    # 0x33f030
cmpb $0x0, (%rax)
je 0xc6a2e
leaq 0x278638(%rip), %rdi    # 0x33f030
callq 0x17d10
leaq 0x68464(%rip), %rsi     # 0x12ee68
leaq 0x275815(%rip), %rdx    # 0x33c220
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc36e2
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc36e2
leaq 0x27874b(%rip), %rax    # 0x33f180
cmpb $0x0, (%rax)
je 0xc6a77
leaq 0x27873f(%rip), %rdi    # 0x33f180
callq 0x17d10
leaq 0x68427(%rip), %rsi     # 0x12ee74
leaq 0x2757cc(%rip), %rdx    # 0x33c220
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc36e2
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc36e2
movq %r12, (%r15)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq