// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_acron_time()
void parse_acron_time()
{
int dow;
int leap;
int status;
static int last_sec = 99;

   msg_col = 0;

   get_fixed_field(2);
   hours = pri_hours = atoi(msg_field);
   get_fixed_field(2);
   minutes = pri_minutes = atoi(msg_field);
   get_fixed_field(2);
   seconds = pri_seconds = atoi(msg_field);
   pri_frac = 0.0;

   get_fixed_field(1);
   dow = atoi(msg_field);

   get_fixed_field(2);
   day = pri_day = atoi(msg_field);
   get_fixed_field(2);
   month = pri_month = atoi(msg_field);
   get_fixed_field(2);
   year = pri_year = atoi(msg_field) + 2000;

if(debug_file) fprintf(debug_file, "acron time(%s) -> %02d/%02d/%02d %02d:%02d:%02d\n", nmea_msg, year,month,day,hours,minutes,seconds);

   get_fixed_field(1);
   leap = atoi(msg_field);

   if(leap & 0x04) {  // leap pending
      minor_alarms |= MINOR_LEAP_PEND;
   }
   else {
      minor_alarms &= (~MINOR_LEAP_PEND);
   }
   have_leap_info = 33;

   get_fixed_field(1);
   status = atoi(msg_field);

   if(timing_mode == TMODE_GPS) {     // convert utc time to gps time
      utc_to_gps();
   }
   else {
      adjust_rcvr_time(0.0);  // incorporarte possibly negative fractional second into time variables
   }

   if(FAKE_ACRON_RCVR && (seconds == last_sec)) {
   }
   else {
      last_sec = seconds;
      update_gps_screen(1556);
   }
if(debug_file) {
   gregorian(0, jd_local);
if(debug_file) fprintf(debug_file, "local: %02d/%02d/%02d %02d:%02d:%02d %f\n", g_year,g_month,g_day,g_hours,g_minutes,g_seconds, g_frac);
}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0x2b9df5(%rip), %rax    # 0x39ae24
movl $0x0, (%rax)
movl $0x2, %edi
callq 0xb4d60
leaq 0x2b9bda(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x28b694(%rip), %rax    # 0x36c6e8
movl %ecx, (%rax)
leaq 0x28b653(%rip), %rax    # 0x36c6b0
movl %ecx, (%rax)
movl $0x2, %edi
callq 0xb4d60
leaq 0x2b9bb0(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x28b666(%rip), %rax    # 0x36c6e4
movl %ecx, (%rax)
leaq 0x28b625(%rip), %rax    # 0x36c6ac
movl %ecx, (%rax)
movl $0x2, %edi
callq 0xb4d60
leaq 0x2b9b86(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x28b638(%rip), %rax    # 0x36c6e0
movl %ecx, (%rax)
leaq 0x28b5f7(%rip), %rax    # 0x36c6a8
movl %ecx, (%rax)
leaq 0x28b63e(%rip), %rax    # 0x36c6f8
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movl $0x1, %edi
callq 0xb4d60
leaq 0x2b9b4e(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0x4(%rbp)
movl $0x2, %edi
callq 0xb4d60
leaq 0x2b9b35(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x28b5f3(%rip), %rax    # 0x36c6ec
movl %ecx, (%rax)
leaq 0x28b5b2(%rip), %rax    # 0x36c6b4
movl %ecx, (%rax)
movl $0x2, %edi
callq 0xb4d60
leaq 0x2b9b0b(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x28b5cd(%rip), %rax    # 0x36c6f0
movl %ecx, (%rax)
leaq 0x28b58c(%rip), %rax    # 0x36c6b8
movl %ecx, (%rax)
movl $0x2, %edi
callq 0xb4d60
leaq 0x2b9ae1(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
addl $0x7d0, %ecx            # imm = 0x7D0
leaq 0x28b5a1(%rip), %rax    # 0x36c6f4
movl %ecx, (%rax)
leaq 0x28b560(%rip), %rax    # 0x36c6bc
movl %ecx, (%rax)
leaq 0x1bc40b(%rip), %rax    # 0x29d570
cmpq $0x0, (%rax)
je 0xe11d1
leaq 0x1bc3fe(%rip), %rax    # 0x29d570
movq (%rax), %rdi
leaq 0x28b540(%rip), %rax    # 0x36c6bc
movl (%rax), %ecx
leaq 0x28b533(%rip), %rax    # 0x36c6b8
movl (%rax), %r8d
leaq 0x28b525(%rip), %rax    # 0x36c6b4
movl (%rax), %r9d
leaq 0x28b517(%rip), %rax    # 0x36c6b0
movl (%rax), %r11d
leaq 0x28b509(%rip), %rax    # 0x36c6ac
movl (%rax), %r10d
leaq 0x28b4fb(%rip), %rax    # 0x36c6a8
movl (%rax), %eax
leaq 0xa7dcd(%rip), %rsi     # 0x188f83
leaq 0x2b9853(%rip), %rdx    # 0x39aa10
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movb $0x0, %al
callq 0x9550
movl $0x1, %edi
callq 0xb4d60
leaq 0x2b9a3e(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xe120f
leaq 0x28b1bc(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
orl $0x80, %ecx
leaq 0x28b1ad(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
jmp 0xe1227
leaq 0x28b1a2(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
leaq 0x28b193(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
leaq 0x28b24a(%rip), %rax    # 0x36c478
movl $0x21, (%rax)
movl $0x1, %edi
callq 0xb4d60
leaq 0x2b99db(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0xc(%rbp)
leaq 0x28b449(%rip), %rax    # 0x36c69d
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0xe1263
callq 0x7fc70
jmp 0xe126b
xorps %xmm0, %xmm0
callq 0x7fbf0
leaq 0x28b436(%rip), %rax    # 0x36c6a8
movl (%rax), %eax
movl %eax, 0xe83ae(%rip)     # 0x1c9628
movl $0x614, %edi            # imm = 0x614
callq 0x9d790
leaq 0x1bc2e5(%rip), %rax    # 0x29d570
cmpq $0x0, (%rax)
je 0xe131a
leaq 0x28b48c(%rip), %rax    # 0x36c728
movsd (%rax), %xmm0
xorl %edi, %edi
callq 0x11dd00
leaq 0x1bc2c2(%rip), %rax    # 0x29d570
cmpq $0x0, (%rax)
je 0xe1318
leaq 0x1bc2b5(%rip), %rax    # 0x29d570
movq (%rax), %rdi
leaq 0x28b5bf(%rip), %rax    # 0x36c884
movl (%rax), %edx
leaq 0x28b5ae(%rip), %rax    # 0x36c87c
movl (%rax), %ecx
leaq 0x28b5a9(%rip), %rax    # 0x36c880
movl (%rax), %r8d
leaq 0x28b5a7(%rip), %rax    # 0x36c888
movl (%rax), %r9d
leaq 0x28b5a1(%rip), %rax    # 0x36c88c
movl (%rax), %r10d
leaq 0x28b59b(%rip), %rax    # 0x36c890
movl (%rax), %eax
leaq 0x28b59a(%rip), %rsi    # 0x36c898
movsd (%rsi), %xmm0
leaq 0xa7cab(%rip), %rsi     # 0x188fb4
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x1, %al
callq 0x9550
jmp 0xe131a
addq $0x30, %rsp
popq %rbp
retq