// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: close_log_file()
void close_log_file()
{
   if(log_file) {
      if(log_fmt == GPX) {
         end_log_track();
         fprintf(log_file, "</gpx>\n");
         gpx_track_number = 0;
      }
      else if(log_fmt == KML) {
         end_log_track();

         if(1) {
            fprintf(log_file, "\n");
            fprintf(log_file, "    <LookAt>\n");
            fprintf(log_file, "      <longitude>%.9f</longitude>\n", lon*180.0/PI);            
            fprintf(log_file, "      <latitude>%.9f</latitude>\n", lat*180.0/PI);             
            fprintf(log_file, "      <altitude>%.2f</altitude>\n", alt);               
            fprintf(log_file, "      <altitudeMode>absolute</altitudeMode>\n");
//               <heading>0</heading>               
//               <tilt>45</tilt>
//               <range>175</range>                    
            fprintf(log_file, "    </LookAt>\n");
         }

         fprintf(log_file, "\n");
         fprintf(log_file, "  </Document>\n");
         fprintf(log_file, "</kml>\n");
         gpx_track_number = 0;
      }
      else if(log_fmt == RINEX) {
         rinex_header_written = 0;
         rinex_obs_written = 0;
      }
      else if(log_fmt == XML) {
         end_log_track();
         fprintf(log_file, "</gpx>\n");
         gpx_track_number = 0;
      }

      if(log_fmt != RINEX) {
         fprintf(log_file, "\n");
         fprintf(log_file, "\n");
      }

      fclose(log_file);
   }

   log_file = 0;
   if(log_header) log_written = 0;
   show_log_state();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x17acae(%rip), %rbx    # 0x23e360
cmpq $0x0, (%rbx)
je 0xc385e
leaq 0x17ad85(%rip), %r14    # 0x23e448
movl (%r14), %eax
cmpl $0x1d, %eax
jg 0xc36ed
cmpl $0xa, %eax
je 0xc36d9
cmpl $0x14, %eax
jne 0xc3833
callq 0xc2640
movq (%rbx), %rcx
leaq 0x69f1a(%rip), %rdi     # 0x12d602
jmp 0xc3817
cmpl $0x1e, %eax
je 0xc3716
cmpl $0x12e, %eax            # imm = 0x12E
jne 0xc3833
leaq 0x17ace8(%rip), %rax    # 0x23e3ec
movl $0x0, (%rax)
leaq 0x17acdf(%rip), %rax    # 0x23e3f0
jmp 0xc382d
callq 0xc2640
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x9480
movq (%rbx), %rcx
leaq 0x69ed8(%rip), %rdi     # 0x12d60a
movl $0xd, %esi
movl $0x1, %edx
callq 0x9750
movq (%rbx), %rdi
leaq 0x24988d(%rip), %rax    # 0x30cfd8
movsd (%rax), %xmm0
mulsd 0x480c9(%rip), %xmm0    # 0x10b820
divsd 0x480b9(%rip), %xmm0    # 0x10b818
leaq 0x69eb2(%rip), %rsi     # 0x12d618
movb $0x1, %al
callq 0x9560
movq (%rbx), %rdi
leaq 0x249859(%rip), %rax    # 0x30cfd0
movsd 0x480a1(%rip), %xmm0    # 0x10b820
mulsd (%rax), %xmm0
divsd 0x4808d(%rip), %xmm0    # 0x10b818
leaq 0x69ea9(%rip), %rsi     # 0x12d63b
movb $0x1, %al
callq 0x9560
movq (%rbx), %rdi
leaq 0x24983d(%rip), %rax    # 0x30cfe0
movsd (%rax), %xmm0
leaq 0x69eae(%rip), %rsi     # 0x12d65c
movb $0x1, %al
callq 0x9560
movq (%rbx), %rcx
leaq 0x694b2(%rip), %rdi     # 0x12cc71
movl $0x2c, %esi
movl $0x1, %edx
callq 0x9750
movq (%rbx), %rcx
leaq 0x69ea5(%rip), %rdi     # 0x12d67d
movl $0xe, %esi
movl $0x1, %edx
callq 0x9750
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x9480
movq (%rbx), %rcx
leaq 0x69e8e(%rip), %rdi     # 0x12d68c
movl $0xe, %esi
movl $0x1, %edx
callq 0x9750
movq (%rbx), %rcx
leaq 0x69e84(%rip), %rdi     # 0x12d69b
movl $0x7, %esi
movl $0x1, %edx
callq 0x9750
leaq 0x17ac1f(%rip), %rax    # 0x23e44c
movl $0x0, (%rax)
cmpl $0x12e, (%r14)          # imm = 0x12E
je 0xc3856
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x9480
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x9480
movq (%rbx), %rdi
callq 0x9370
movq $0x0, (%rbx)
leaq 0x17ab8c(%rip), %rax    # 0x23e3f8
cmpb $0x0, (%rax)
je 0xc387b
leaq 0x17ab72(%rip), %rax    # 0x23e3ea
movb $0x0, (%rax)
popq %rbx
popq %r14
popq %rbp
jmp 0xc1a24