// File: /workspace/github_cpp_makefile_star2_O1/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 0x84049(%rip), %rdi     # 0x10ddd7
callq 0x58e77
cmpl $0x0, 0x2e2e62(%rip)    # 0x36cbfc
jne 0x89f54
callq 0x811da
testl %eax, %eax
je 0x89e4e
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 0x2b1c74(%rip), %rdi    # 0x33ba40
leaq 0xa8e8f(%rip), %rsi     # 0x132c62
leaq 0x28372e(%rip), %r14    # 0x30d508
leaq 0x283723(%rip), %rbx    # 0x30d504
movq %r14, %rdx
movq %r15, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x9360
cmpb $0x3a, (%r15)
jne 0x89f54
cmpb $0x3a, -0x21(%rbp)
jne 0x89f54
movl (%r14), %eax
leaq 0x2836c1(%rip), %rcx    # 0x30d4d0
movl %eax, (%rcx)
movl (%rbx), %eax
leaq 0x2836b2(%rip), %rcx    # 0x30d4cc
movsd -0x30(%rbp), %xmm0
cvttsd2si %xmm0, %edx
movl %eax, (%rcx)
leaq 0x2836d4(%rip), %rax    # 0x30d500
movl %edx, (%rax)
leaq 0x283693(%rip), %rax    # 0x30d4c8
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
movl %edx, (%rax)
subsd %xmm1, %xmm0
leaq 0x2836ce(%rip), %rax    # 0x30d518
movsd %xmm0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x89ef0
xorl %eax, %eax
leaq -0x21(%rbp), %r9
movb %al, (%r9)
leaq -0x22(%rbp), %r15
movb %al, (%r15)
leaq 0x2836a2(%rip), %r12    # 0x30d514
movq %r12, (%rsp)
leaq 0x2b1bc3(%rip), %rdi    # 0x33ba40
leaq 0x941bd(%rip), %rsi     # 0x11e041
leaq 0x283681(%rip), %rbx    # 0x30d50c
leaq 0x28367e(%rip), %r14    # 0x30d510
movq %rbx, %rdx
movq %r15, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x9360
cmpb $0x2f, (%r15)
jne 0x89f54
cmpb $0x2f, -0x21(%rbp)
jne 0x89f54
movl (%r12), %eax
leal 0x76c(%rax), %ecx
leal 0x7d0(%rax), %edx
cmpl $0x50, %eax
cmovgel %ecx, %edx
movl %edx, (%r12)
movl (%r14), %eax
leaq 0x2835fe(%rip), %rcx    # 0x30d4d8
movl %eax, (%rcx)
movl (%rbx), %eax
leaq 0x2835ef(%rip), %rcx    # 0x30d4d4
movl %eax, (%rcx)
leaq 0x2835ee(%rip), %rax    # 0x30d4dc
movl %edx, (%rax)
leaq 0x2835c6(%rip), %rax    # 0x30d4bd
cmpb $0x0, (%rax)
jne 0x89f26
leaq 0x283825(%rip), %rax    # 0x30d728
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
callq 0x5c907
leaq 0x28358e(%rip), %rax    # 0x30d4a4
andb $-0x2, (%rax)
leaq 0x2834ac(%rip), %rax    # 0x30d3cc
movl $0x1, (%rax)
callq 0x811da
callq 0x811da
callq 0x811da
testl %eax, %eax
je 0x89f4f
leaq 0x2b1b00(%rip), %rdi    # 0x33ba40
callq 0x98c6
leaq 0x283558(%rip), %rax    # 0x30d4a4
andb $-0x5, (%rax)
callq 0x8201e
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq