// File: /workspace/github_cpp_makefile_star2_O3/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 0x17a67e(%rip), %rbx    # 0x23e360
movq (%rbx), %rsi
testq %rsi, %rsi
je 0xc3e91
leaq 0x17a753(%rip), %r14    # 0x23e448
movl (%r14), %eax
cmpl $0x1d, %eax
jg 0xc3d1c
cmpl $0xa, %eax
je 0xc3d0b
cmpl $0x14, %eax
jne 0xc3e68
callq 0xc2c1e
leaq 0x699db(%rip), %rdi     # 0x12d6f2
jmp 0xc3e43
cmpl $0x1e, %eax
je 0xc3d45
cmpl $0x12e, %eax            # imm = 0x12E
jne 0xc3e68
leaq 0x17a6b9(%rip), %rax    # 0x23e3ec
xorl %ecx, %ecx
movl %ecx, (%rax)
leaq 0x17a6b2(%rip), %rax    # 0x23e3f0
movl %ecx, (%rax)
jmp 0xc3e89
callq 0xc2c1e
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x9480
movq (%rbx), %rcx
leaq 0x69999(%rip), %rdi     # 0x12d6fa
movl $0xd, %esi
movl $0x1, %edx
callq 0x9750
movq (%rbx), %rdi
leaq 0x24925e(%rip), %rax    # 0x30cfd8
movsd (%rax), %xmm0
mulsd 0x47aaa(%rip), %xmm0    # 0x10b830
divsd 0x47a9a(%rip), %xmm0    # 0x10b828
leaq 0x69973(%rip), %rsi     # 0x12d708
movb $0x1, %al
callq 0x9560
movq (%rbx), %rdi
leaq 0x24922a(%rip), %rax    # 0x30cfd0
movsd 0x47a82(%rip), %xmm0    # 0x10b830
mulsd (%rax), %xmm0
divsd 0x47a6e(%rip), %xmm0    # 0x10b828
leaq 0x6996a(%rip), %rsi     # 0x12d72b
movb $0x1, %al
callq 0x9560
movq (%rbx), %rdi
leaq 0x24920e(%rip), %rax    # 0x30cfe0
movsd (%rax), %xmm0
leaq 0x6996f(%rip), %rsi     # 0x12d74c
movb $0x1, %al
callq 0x9560
movq (%rbx), %rcx
leaq 0x68f73(%rip), %rdi     # 0x12cd61
movl $0x2c, %esi
movl $0x1, %edx
callq 0x9750
movq (%rbx), %rcx
leaq 0x69966(%rip), %rdi     # 0x12d76d
movl $0xe, %esi
movl $0x1, %edx
callq 0x9750
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x9480
movq (%rbx), %rcx
leaq 0x6994f(%rip), %rdi     # 0x12d77c
movl $0xe, %esi
movl $0x1, %edx
callq 0x9750
leaq 0x69948(%rip), %rdi     # 0x12d78b
movq (%rbx), %rcx
movl $0x7, %esi
movl $0x1, %edx
callq 0x9750
leaq 0x17a5f0(%rip), %rax    # 0x23e44c
movl $0x0, (%rax)
movl (%r14), %eax
movq (%rbx), %rsi
cmpl $0x12e, %eax            # imm = 0x12E
je 0xc3e89
movl $0xa, %edi
callq 0x9480
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x9480
movq (%rbx), %rsi
movq %rsi, %rdi
callq 0x9370
movq $0x0, (%rbx)
leaq 0x17a559(%rip), %rax    # 0x23e3f8
cmpb $0x0, (%rax)
je 0xc3eae
leaq 0x17a53f(%rip), %rax    # 0x23e3ea
movb $0x0, (%rax)
popq %rbx
popq %r14
popq %rbp
jmp 0xc1ff4