// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
leaq 0x7abe0(%rip), %rdi     # 0xf7eeb
callq 0x520bf
cmpl $0x0, 0x2d98e5(%rip)    # 0x356bfc
jne 0x7d4a4
callq 0x75767
testl %eax, %eax
je 0x7d3cb
xorl %eax, %eax
leaq -0x21(%rbp), %r9
movb %al, (%r9)
leaq -0x22(%rbp), %r15
movb %al, (%r15)
leaq -0x30(%rbp), %rax
movq %rax, (%rsp)
leaq 0x2a86f7(%rip), %rdi    # 0x325a40
leaq 0x9f922(%rip), %rsi     # 0x11cc72
leaq 0x27a1b1(%rip), %r14    # 0x2f7508
leaq 0x27a1a6(%rip), %rbx    # 0x2f7504
movq %r14, %rdx
movq %r15, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x9350
cmpb $0x3a, (%r15)
jne 0x7d4a4
cmpb $0x3a, -0x21(%rbp)
jne 0x7d4a4
movl (%r14), %eax
leaq 0x27a144(%rip), %rcx    # 0x2f74d0
movl %eax, (%rcx)
movl (%rbx), %eax
leaq 0x27a135(%rip), %rcx    # 0x2f74cc
movsd -0x30(%rbp), %xmm0
cvttsd2si %xmm0, %edx
movl %eax, (%rcx)
leaq 0x27a157(%rip), %rax    # 0x2f7500
movl %edx, (%rax)
leaq 0x27a116(%rip), %rax    # 0x2f74c8
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
movl %edx, (%rax)
subsd %xmm1, %xmm0
leaq 0x27a151(%rip), %rax    # 0x2f7518
movsd %xmm0, (%rax)
callq 0x75767
testl %eax, %eax
je 0x7d465
xorl %eax, %eax
leaq -0x21(%rbp), %r9
movb %al, (%r9)
leaq -0x22(%rbp), %r15
movb %al, (%r15)
leaq 0x27a125(%rip), %r12    # 0x2f7514
movq %r12, (%rsp)
leaq 0x2a8646(%rip), %rdi    # 0x325a40
leaq 0x8ad46(%rip), %rsi     # 0x108147
leaq 0x27a104(%rip), %rbx    # 0x2f750c
leaq 0x27a101(%rip), %r14    # 0x2f7510
movq %rbx, %rdx
movq %r15, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x9350
cmpb $0x2f, (%r15)
jne 0x7d4a4
cmpb $0x2f, -0x21(%rbp)
jne 0x7d4a4
movl (%r12), %eax
leal 0x76c(%rax), %ecx
leal 0x7d0(%rax), %edx
cmpl $0x50, %eax
cmovgel %ecx, %edx
movl %edx, (%r12)
movl (%r14), %eax
leaq 0x27a089(%rip), %rcx    # 0x2f74d8
movl %eax, (%rcx)
movl (%rbx), %eax
leaq 0x27a07a(%rip), %rcx    # 0x2f74d4
movl %eax, (%rcx)
leaq 0x27a079(%rip), %rax    # 0x2f74dc
movl %edx, (%rax)
leaq 0x27a051(%rip), %rax    # 0x2f74bd
cmpb $0x0, (%rax)
jne 0x7d476
callq 0x554d3
callq 0x75767
callq 0x75767
callq 0x75767
testl %eax, %eax
je 0x7d49f
leaq 0x2a85b0(%rip), %rdi    # 0x325a40
callq 0x98b2
leaq 0x27a008(%rip), %rax    # 0x2f74a4
andb $-0x5, (%rax)
callq 0x7650a
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq