// File: jkingan[P]ladyheather/heathmsc.cpp
// Function: start_log_track()
void start_log_track()
{
int color;

   if(log_file == 0) return;

   ++gpx_track_number;
   if((log_fmt == GPX) || (log_fmt == XML)) {
      fprintf(log_file, "  <trk>\n");
      fprintf(log_file, "    <name>Lady Heather data</name>\n");
      fprintf(log_file, "    <number>%d</number>\n", gpx_track_number);
      fprintf(log_file, "    <trkseg>\n\n");
   }
   else if(log_fmt == KML) {
      color = (gpx_track_number % 15) + 8;  // 1..15
      if(color > 15) color = color - 15;

      fprintf(log_file, "\n");
      fprintf(log_file, "    <Folder>\n");
      fprintf(log_file, "      <name>Track %04d/%02d/%02d  %02d:%02d:%02d</name>\n", pri_year,pri_month,pri_day, pri_hours,pri_minutes,pri_seconds);
      fprintf(log_file, "      <description>Lady Heather Track</description>\n");
      fprintf(log_file, "      <visibility>1</visibility>\n");
      fprintf(log_file, "      <open>0</open>\n");
      fprintf(log_file, "\n");
      fprintf(log_file, "      <Placemark>\n");
      fprintf(log_file, "        <visibility>0</visibility>\n");
      fprintf(log_file, "        <open>0</open>\n");
      fprintf(log_file, "        <styleUrl>color%d</styleUrl>\n", color);
      fprintf(log_file, "        <name>Track %d</name>\n", gpx_track_number);
      fprintf(log_file, "        <description>Track coordinates</description>\n");
      fprintf(log_file, "\n");
      fprintf(log_file, "        <LineString>\n");
      fprintf(log_file, "        <extrude>1</extrude>\n");
      fprintf(log_file, "        <tessellate>1</tessellate>\n");
//    fprintf(log_file, "        <altitudeMode>clampToGround</altitudeMode>\n");
      fprintf(log_file, "        <altitudeMode>absolute</altitudeMode>\n");
      fprintf(log_file, "          <coordinates>\n");
   }
   if(log_flush_mode && log_file) fflush(log_file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x191751(%rip), %rax    # 0x29d540
cmpq $0x0, (%rax)
jne 0x10bdfa
jmp 0x10c10a
leaq 0x19182b(%rip), %rax    # 0x29d62c
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x19181f(%rip), %rax    # 0x29d62c
movl %ecx, (%rax)
leaq 0x191812(%rip), %rax    # 0x29d628
cmpl $0x14, (%rax)
je 0x10be27
leaq 0x191806(%rip), %rax    # 0x29d628
cmpl $0xa, (%rax)
jne 0x10be95
leaq 0x191712(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x8380e(%rip), %rsi     # 0x18f646
movb $0x0, %al
callq 0x9550
leaq 0x1916fa(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x837ff(%rip), %rsi     # 0x18f64f
movb $0x0, %al
callq 0x9550
leaq 0x1916e2(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x1917c4(%rip), %rax    # 0x29d62c
movl (%rax), %edx
leaq 0x83802(%rip), %rsi     # 0x18f673
movb $0x0, %al
callq 0x9550
leaq 0x1916c1(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x83803(%rip), %rsi     # 0x18f68c
movb $0x0, %al
callq 0x9550
jmp 0x10c0e2
leaq 0x19178c(%rip), %rax    # 0x29d628
cmpl $0x1e, (%rax)
jne 0x10c0e0
leaq 0x191780(%rip), %rax    # 0x29d62c
movl (%rax), %eax
movl $0xf, %ecx
cltd
idivl %ecx
addl $0x8, %edx
movl %edx, -0x4(%rbp)
cmpl $0xf, -0x4(%rbp)
jle 0x10becb
movl -0x4(%rbp), %eax
subl $0xf, %eax
movl %eax, -0x4(%rbp)
leaq 0x19166e(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x8c74a(%rip), %rsi     # 0x198626
movb $0x0, %al
callq 0x9550
leaq 0x191656(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x837a7(%rip), %rsi     # 0x18f69b
movb $0x0, %al
callq 0x9550
leaq 0x19163e(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x2607e8(%rip), %rax    # 0x36c6f4
movl (%rax), %edx
leaq 0x2607db(%rip), %rax    # 0x36c6f0
movl (%rax), %ecx
leaq 0x2607ce(%rip), %rax    # 0x36c6ec
movl (%rax), %r8d
leaq 0x2607c0(%rip), %rax    # 0x36c6e8
movl (%rax), %r9d
leaq 0x2607b2(%rip), %rax    # 0x36c6e4
movl (%rax), %r10d
leaq 0x2607a4(%rip), %rax    # 0x36c6e0
movl (%rax), %eax
leaq 0x83764(%rip), %rsi     # 0x18f6a9
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x9550
leaq 0x1915e5(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x8377d(%rip), %rsi     # 0x18f6e2
movb $0x0, %al
callq 0x9550
leaq 0x1915cd(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x8379a(%rip), %rsi     # 0x18f717
movb $0x0, %al
callq 0x9550
leaq 0x1915b5(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x837dd(%rip), %rsi     # 0x18f772
movb $0x0, %al
callq 0x9550
leaq 0x19159d(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x8c679(%rip), %rsi     # 0x198626
movb $0x0, %al
callq 0x9550
leaq 0x191585(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x83774(%rip), %rsi     # 0x18f739
movb $0x0, %al
callq 0x9550
leaq 0x19156d(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x8376f(%rip), %rsi     # 0x18f74c
movb $0x0, %al
callq 0x9550
leaq 0x191555(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x8377b(%rip), %rsi     # 0x18f770
movb $0x0, %al
callq 0x9550
leaq 0x19153d(%rip), %rax    # 0x29d540
movq (%rax), %rdi
movl -0x4(%rbp), %edx
leaq 0x83778(%rip), %rsi     # 0x18f788
movb $0x0, %al
callq 0x9550
leaq 0x191522(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x191604(%rip), %rax    # 0x29d62c
movl (%rax), %edx
leaq 0x8377d(%rip), %rsi     # 0x18f7ae
movb $0x0, %al
callq 0x9550
leaq 0x191501(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x83784(%rip), %rsi     # 0x18f7cd
movb $0x0, %al
callq 0x9550
leaq 0x1914e9(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x8c5c5(%rip), %rsi     # 0x198626
movb $0x0, %al
callq 0x9550
leaq 0x1914d1(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x8378a(%rip), %rsi     # 0x18f803
movb $0x0, %al
callq 0x9550
leaq 0x1914b9(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x83788(%rip), %rsi     # 0x18f819
movb $0x0, %al
callq 0x9550
leaq 0x1914a1(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x8378e(%rip), %rsi     # 0x18f837
movb $0x0, %al
callq 0x9550
leaq 0x191489(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x8379a(%rip), %rsi     # 0x18f85b
movb $0x0, %al
callq 0x9550
leaq 0x191471(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x837b1(%rip), %rsi     # 0x18f88a
movb $0x0, %al
callq 0x9550
jmp 0x10c0e2
leaq 0x191517(%rip), %rax    # 0x29d600
cmpl $0x0, (%rax)
je 0x10c10a
leaq 0x19144b(%rip), %rax    # 0x29d540
cmpq $0x0, (%rax)
je 0x10c10a
leaq 0x19143e(%rip), %rax    # 0x29d540
movq (%rax), %rdi
callq 0x9430
addq $0x20, %rsp
popq %rbp
retq