// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_brandy_t()
void parse_brandy_t()
{
double val;
char c1,c2;
int status;

   log_packet_id("time");

   if(use_a_time) return;

   if(get_msg_field()) {  // time
      c1 = c2 = 0;
      sscanf(msg_field, "%d%c%d%c%lf", &pri_hours,&c1,&pri_minutes,&c2,&val);
      if(c1 != ':') return;
      if(c2 != ':') return;

      hours = pri_hours;
      minutes = pri_minutes;
      seconds = pri_seconds = (int) val;
      pri_frac = val - (double) pri_seconds;
//pri_frac = 0.0;  // prevent time code sequence errors
   }

   if(get_msg_field()) {  // date
      c1 = c2 = 0;
      sscanf(msg_field, "%d%c%d%c%d", &pri_day,&c1,&pri_month,&c2,&pri_year);
      if(c1 != '/') return;
      if(c2 != '/') return;
      if(pri_year < 80) pri_year += 2000;
      else              pri_year += 1900;
      month = pri_month;
      day = pri_day;
      year = pri_year;
   }

   if(timing_mode == TMODE_GPS) {  // convert utc time to gps time
      utc_to_gps();
   }

   get_msg_field();  // day of year
   get_msg_field();  // day of week

   if(get_msg_field()) {  // status  (hex number)
      status = atohex(msg_field);
      time_flags &= (~TFLAGS_INVALID);
      if(status & 0x08) {  // time ok
         time_flags &= (~TFLAGS_INVALID);
      }
      else { // time bad
//!!!!!! time_flags |= (TFLAGS_INVALID);
      }
   }

   drive_nmea_screen(GPS, 8089);  // aaattt update screen 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0xb62b9(%rip), %rdi     # 0x1727c8
callq 0x7add0
cmpl $0x0, 0x30f8b1(%rip)    # 0x3cbdcc
je 0xbc522
jmp 0xbc73e
callq 0xb0bd0
cmpl $0x0, %eax
je 0xbc5e1
movb $0x0, -0xa(%rbp)
movb $0x0, -0x9(%rbp)
leaq 0x2de6e1(%rip), %rdi    # 0x39ac20
leaq 0xd9370(%rip), %rsi     # 0x1958b6
leaq 0x2b019b(%rip), %rdx    # 0x36c6e8
leaq -0x9(%rbp), %rcx
leaq 0x2b018c(%rip), %r8     # 0x36c6e4
leaq -0xa(%rbp), %r9
leaq -0x8(%rbp), %rax
movq %rax, (%rsp)
movb $0x0, %al
callq 0x9370
movsbl -0x9(%rbp), %eax
cmpl $0x3a, %eax
je 0xbc579
jmp 0xbc73e
movsbl -0xa(%rbp), %eax
cmpl $0x3a, %eax
je 0xbc587
jmp 0xbc73e
leaq 0x2b015a(%rip), %rax    # 0x36c6e8
movl (%rax), %ecx
leaq 0x2b0119(%rip), %rax    # 0x36c6b0
movl %ecx, (%rax)
leaq 0x2b0144(%rip), %rax    # 0x36c6e4
movl (%rax), %ecx
leaq 0x2b0103(%rip), %rax    # 0x36c6ac
movl %ecx, (%rax)
cvttsd2si -0x8(%rbp), %ecx
leaq 0x2b0129(%rip), %rax    # 0x36c6e0
movl %ecx, (%rax)
leaq 0x2b00e8(%rip), %rax    # 0x36c6a8
movl %ecx, (%rax)
movsd -0x8(%rbp), %xmm0
leaq 0x2b0112(%rip), %rax    # 0x36c6e0
cvtsi2sdl (%rax), %xmm1
subsd %xmm1, %xmm0
leaq 0x2b011b(%rip), %rax    # 0x36c6f8
movsd %xmm0, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xbc6bd
movb $0x0, -0xa(%rbp)
movb $0x0, -0x9(%rbp)
leaq 0x2de622(%rip), %rdi    # 0x39ac20
leaq 0xc64e2(%rip), %rsi     # 0x182ae7
leaq 0x2b00e0(%rip), %rdx    # 0x36c6ec
leaq -0x9(%rbp), %rcx
leaq 0x2b00d9(%rip), %r8     # 0x36c6f0
leaq -0xa(%rbp), %r9
leaq 0x2b00d2(%rip), %rax    # 0x36c6f4
movq %rax, (%rsp)
movb $0x0, %al
callq 0x9370
movsbl -0x9(%rbp), %eax
cmpl $0x2f, %eax
je 0xbc63b
jmp 0xbc73e
movsbl -0xa(%rbp), %eax
cmpl $0x2f, %eax
je 0xbc649
jmp 0xbc73e
leaq 0x2b00a4(%rip), %rax    # 0x36c6f4
cmpl $0x50, (%rax)
jge 0xbc66f
leaq 0x2b0098(%rip), %rax    # 0x36c6f4
movl (%rax), %ecx
addl $0x7d0, %ecx            # imm = 0x7D0
leaq 0x2b0089(%rip), %rax    # 0x36c6f4
movl %ecx, (%rax)
jmp 0xbc687
leaq 0x2b007e(%rip), %rax    # 0x36c6f4
movl (%rax), %ecx
addl $0x76c, %ecx            # imm = 0x76C
leaq 0x2b006f(%rip), %rax    # 0x36c6f4
movl %ecx, (%rax)
leaq 0x2b0062(%rip), %rax    # 0x36c6f0
movl (%rax), %ecx
leaq 0x2b0021(%rip), %rax    # 0x36c6b8
movl %ecx, (%rax)
leaq 0x2b004c(%rip), %rax    # 0x36c6ec
movl (%rax), %ecx
leaq 0x2b000b(%rip), %rax    # 0x36c6b4
movl %ecx, (%rax)
leaq 0x2b0042(%rip), %rax    # 0x36c6f4
movl (%rax), %ecx
leaq 0x2b0001(%rip), %rax    # 0x36c6bc
movl %ecx, (%rax)
leaq 0x2affd9(%rip), %rax    # 0x36c69d
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0xbc6d1
callq 0x7fc70
callq 0xb0bd0
callq 0xb0bd0
callq 0xb0bd0
cmpl $0x0, %eax
je 0xbc72f
leaq 0x2de534(%rip), %rdi    # 0x39ac20
callq 0x98d0
movl %eax, -0x10(%rbp)
leaq 0x2aff89(%rip), %rax    # 0x36c684
movl (%rax), %ecx
andl $-0x5, %ecx
leaq 0x2aff7d(%rip), %rax    # 0x36c684
movl %ecx, (%rax)
movl -0x10(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xbc72b
leaq 0x2aff69(%rip), %rax    # 0x36c684
movl (%rax), %ecx
andl $-0x5, %ecx
leaq 0x2aff5d(%rip), %rax    # 0x36c684
movl %ecx, (%rax)
jmp 0xbc72d
jmp 0xbc72d
jmp 0xbc72f
movl $0x1, %edi
movl $0x1f99, %esi           # imm = 0x1F99
callq 0xb1ef0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)