// File: /workspace/github_cpp_makefile_star2_O1/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 0xc6439
leaq 0x1782be(%rip), %rax    # 0x23e414
cmpb $0x0, (%rax)
je 0xc6439
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
leaq 0x1781ec(%rip), %r15    # 0x23e360
movq (%r15), %r12
movq %rdi, (%r15)
leaq 0x1777df(%rip), %rbx    # 0x23d960
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc3105
leaq 0x1782b1(%rip), %rax    # 0x23e448
movl (%rax), %eax
cmpl $0x12e, %eax            # imm = 0x12E
je 0xc61ab
testl %eax, %eax
jne 0xc61b3
callq 0xc272c
jmp 0xc61b3
movq %r14, %rdi
callq 0xc643a
leaq 0x2477ba(%rip), %r14    # 0x30d974
testb $0x2, 0x1(%r14)
jne 0xc61cb
callq 0xc438a
orb $0x2, 0x1(%r14)
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc3105
leaq 0x27866f(%rip), %rax    # 0x33e850
cmpb $0x0, (%rax)
je 0xc622f
leaq 0x2790df(%rip), %rax    # 0x33f2cc
cmpl $0x2, (%rax)
jne 0xc622f
leaq 0x278657(%rip), %rdi    # 0x33e850
callq 0x17cda
leaq 0x5014a(%rip), %rsi     # 0x11634f
leaq 0x276014(%rip), %rdx    # 0x33c220
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc3105
leaq 0x27876a(%rip), %rax    # 0x33e9a0
cmpb $0x0, (%rax)
je 0xc6278
leaq 0x27875e(%rip), %rdi    # 0x33e9a0
callq 0x17cda
leaq 0x68aee(%rip), %rsi     # 0x12ed3c
leaq 0x275fcb(%rip), %rdx    # 0x33c220
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc3105
leaq 0x278871(%rip), %rax    # 0x33eaf0
cmpb $0x0, (%rax)
je 0xc62c1
leaq 0x278865(%rip), %rdi    # 0x33eaf0
callq 0x17cda
leaq 0x68ab1(%rip), %rsi     # 0x12ed48
leaq 0x275f82(%rip), %rdx    # 0x33c220
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc3105
leaq 0x278978(%rip), %rax    # 0x33ec40
cmpb $0x0, (%rax)
je 0xc630a
leaq 0x27896c(%rip), %rdi    # 0x33ec40
callq 0x17cda
leaq 0x68a74(%rip), %rsi     # 0x12ed54
leaq 0x275f39(%rip), %rdx    # 0x33c220
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc3105
leaq 0x278a7f(%rip), %rax    # 0x33ed90
cmpb $0x0, (%rax)
je 0xc6353
leaq 0x278a73(%rip), %rdi    # 0x33ed90
callq 0x17cda
leaq 0x68a37(%rip), %rsi     # 0x12ed60
leaq 0x275ef0(%rip), %rdx    # 0x33c220
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc3105
leaq 0x278b86(%rip), %rax    # 0x33eee0
cmpb $0x0, (%rax)
je 0xc639c
leaq 0x278b7a(%rip), %rdi    # 0x33eee0
callq 0x17cda
leaq 0x689fa(%rip), %rsi     # 0x12ed6c
leaq 0x275ea7(%rip), %rdx    # 0x33c220
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc3105
leaq 0x278c8d(%rip), %rax    # 0x33f030
cmpb $0x0, (%rax)
je 0xc63e5
leaq 0x278c81(%rip), %rdi    # 0x33f030
callq 0x17cda
leaq 0x689bd(%rip), %rsi     # 0x12ed78
leaq 0x275e5e(%rip), %rdx    # 0x33c220
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc3105
leaq 0x278d94(%rip), %rax    # 0x33f180
cmpb $0x0, (%rax)
je 0xc642e
leaq 0x278d88(%rip), %rdi    # 0x33f180
callq 0x17cda
leaq 0x68980(%rip), %rsi     # 0x12ed84
leaq 0x275e15(%rip), %rdx    # 0x33c220
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc3105
movq %r12, (%r15)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq