// File: jkingan[P]ladyheather/heathmsc.cpp
// Function: write_log_comment(int)
void write_log_comment(int spaces)
{
   if(log_file == 0) return;
   if(log_comments == 0) return;

   if(log_fmt == HEATHER) {
      fprintf(log_file, "%s", log_text);
      while(spaces--) fprintf(log_file, "\n");
   }
   else if(log_fmt == KML) {
      if(filter_log_text()) {
         fprintf(log_file, "<!-- %s -->", log_text);
      }
      while(spaces--) fprintf(log_file, "\n");
   }
   else if(log_fmt == RINEX) {  // don't output anything until the RINEX header has been output
      if(rinex_header_written) {
         write_rinex_line(log_file, log_text, "COMMENT");
      }
   }
   else if(log_fmt == XML) {  // !!!! does this work when sending to a GPX viewer?
      if(filter_log_text()) {
         fprintf(log_file, "<!-- %s -->", log_text);
      }
      else {  // blank line
//       fprintf(log_file, "<!--  -->");
      }

      while(spaces--) {
         fprintf(log_file, "\n");
      }
   }

   if(debug_file) {
      if(log_text[1] == '!') fprintf(debug_file, "Event: %s\n", log_text);
      fflush(debug_file);
   }

   if(log_flush_mode && log_file) fflush(log_file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
leaq 0x19094e(%rip), %rax    # 0x29d540
cmpq $0x0, (%rax)
jne 0x10cbfd
jmp 0x10cdeb
leaq 0x1909f0(%rip), %rax    # 0x29d5f4
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x10cc11
jmp 0x10cdeb
leaq 0x190a10(%rip), %rax    # 0x29d628
cmpl $0x0, (%rax)
jne 0x10cc6b
leaq 0x19091c(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x83eff(%rip), %rsi     # 0x190b2d
leaq 0x18ff0b(%rip), %rdx    # 0x29cb40
movb $0x0, %al
callq 0x9550
movl -0x4(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x4(%rbp)
cmpl $0x0, %eax
je 0x10cc66
leaq 0x1908ed(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x8b9c9(%rip), %rsi     # 0x198626
movb $0x0, %al
callq 0x9550
jmp 0x10cc3c
jmp 0x10cd78
leaq 0x1909b6(%rip), %rax    # 0x29d628
cmpl $0x1e, (%rax)
jne 0x10ccd1
callq 0x10d680
cmpl $0x0, %eax
je 0x10cca0
leaq 0x1908b8(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x8360e(%rip), %rsi     # 0x1902a0
leaq 0x18fea7(%rip), %rdx    # 0x29cb40
movb $0x0, %al
callq 0x9550
jmp 0x10cca2
movl -0x4(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x4(%rbp)
cmpl $0x0, %eax
je 0x10cccc
leaq 0x190887(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x8b963(%rip), %rsi     # 0x198626
movb $0x0, %al
callq 0x9550
jmp 0x10cca2
jmp 0x10cd76
leaq 0x190950(%rip), %rax    # 0x29d628
cmpl $0x12e, (%rax)          # imm = 0x12E
jne 0x10cd0b
leaq 0x1908e5(%rip), %rax    # 0x29d5cc
cmpl $0x0, (%rax)
je 0x10cd09
leaq 0x19084d(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x18fe43(%rip), %rsi    # 0x29cb40
leaq 0x835a8(%rip), %rdx     # 0x1902ac
callq 0x10d750
jmp 0x10cd74
leaq 0x190916(%rip), %rax    # 0x29d628
cmpl $0xa, (%rax)
jne 0x10cd72
callq 0x10d680
cmpl $0x0, %eax
je 0x10cd42
leaq 0x190818(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x8356e(%rip), %rsi     # 0x1902a0
leaq 0x18fe07(%rip), %rdx    # 0x29cb40
movb $0x0, %al
callq 0x9550
jmp 0x10cd44
jmp 0x10cd44
jmp 0x10cd46
movl -0x4(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x4(%rbp)
cmpl $0x0, %eax
je 0x10cd70
leaq 0x1907e3(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x8b8bf(%rip), %rsi     # 0x198626
movb $0x0, %al
callq 0x9550
jmp 0x10cd46
jmp 0x10cd72
jmp 0x10cd74
jmp 0x10cd76
jmp 0x10cd78
leaq 0x1907f1(%rip), %rax    # 0x29d570
cmpq $0x0, (%rax)
je 0x10cdc3
leaq 0x18fdb4(%rip), %rax    # 0x29cb40
movsbl 0x1(%rax), %eax
cmpl $0x21, %eax
jne 0x10cdb4
leaq 0x1907d4(%rip), %rax    # 0x29d570
movq (%rax), %rdi
leaq 0x8350e(%rip), %rsi     # 0x1902b4
leaq 0x18fd93(%rip), %rdx    # 0x29cb40
movb $0x0, %al
callq 0x9550
leaq 0x1907b5(%rip), %rax    # 0x29d570
movq (%rax), %rdi
callq 0x9430
leaq 0x190836(%rip), %rax    # 0x29d600
cmpl $0x0, (%rax)
je 0x10cdeb
leaq 0x19076a(%rip), %rax    # 0x29d540
cmpq $0x0, (%rax)
je 0x10cdeb
leaq 0x19075d(%rip), %rax    # 0x29d540
movq (%rax), %rdi
callq 0x9430
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)