// File: /workspace/github_cpp_makefile_star2_O3/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 0x8410e(%rip), %rdi     # 0x10de6b
callq 0x58dc2
cmpl $0x0, 0x2e2e93(%rip)    # 0x36cbfc
jne 0x89f23
callq 0x810b1
testl %eax, %eax
je 0x89e1d
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 0x2b1ca5(%rip), %rdi    # 0x33ba40
leaq 0xa8fb0(%rip), %rsi     # 0x132d52
leaq 0x28375f(%rip), %r14    # 0x30d508
leaq 0x283754(%rip), %rbx    # 0x30d504
movq %r14, %rdx
movq %r15, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x9360
cmpb $0x3a, (%r15)
jne 0x89f23
cmpb $0x3a, -0x21(%rbp)
jne 0x89f23
movl (%r14), %eax
leaq 0x2836f2(%rip), %rcx    # 0x30d4d0
movl %eax, (%rcx)
movl (%rbx), %eax
leaq 0x2836e3(%rip), %rcx    # 0x30d4cc
movsd -0x30(%rbp), %xmm0
cvttsd2si %xmm0, %edx
movl %eax, (%rcx)
leaq 0x283705(%rip), %rax    # 0x30d500
movl %edx, (%rax)
leaq 0x2836c4(%rip), %rax    # 0x30d4c8
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
movl %edx, (%rax)
subsd %xmm1, %xmm0
leaq 0x2836ff(%rip), %rax    # 0x30d518
movsd %xmm0, (%rax)
callq 0x810b1
testl %eax, %eax
je 0x89ebf
xorl %eax, %eax
leaq -0x21(%rbp), %r9
movb %al, (%r9)
leaq -0x22(%rbp), %r15
movb %al, (%r15)
leaq 0x2836d3(%rip), %r12    # 0x30d514
movq %r12, (%rsp)
leaq 0x2b1bf4(%rip), %rdi    # 0x33ba40
leaq 0x94279(%rip), %rsi     # 0x11e0cc
leaq 0x2836b2(%rip), %rbx    # 0x30d50c
leaq 0x2836af(%rip), %r14    # 0x30d510
movq %rbx, %rdx
movq %r15, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x9360
cmpb $0x2f, (%r15)
jne 0x89f23
cmpb $0x2f, -0x21(%rbp)
jne 0x89f23
movl (%r12), %eax
leal 0x76c(%rax), %ecx
leal 0x7d0(%rax), %edx
cmpl $0x50, %eax
cmovgel %ecx, %edx
movl %edx, (%r12)
movl (%r14), %eax
leaq 0x28362f(%rip), %rcx    # 0x30d4d8
movl %eax, (%rcx)
movl (%rbx), %eax
leaq 0x283620(%rip), %rcx    # 0x30d4d4
movl %eax, (%rcx)
leaq 0x28361f(%rip), %rax    # 0x30d4dc
movl %edx, (%rax)
leaq 0x2835f7(%rip), %rax    # 0x30d4bd
cmpb $0x0, (%rax)
jne 0x89ef5
leaq 0x283856(%rip), %rax    # 0x30d728
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
callq 0x5c7ed
leaq 0x2835bf(%rip), %rax    # 0x30d4a4
andb $-0x2, (%rax)
leaq 0x2834dd(%rip), %rax    # 0x30d3cc
movl $0x1, (%rax)
callq 0x810b1
callq 0x810b1
callq 0x810b1
testl %eax, %eax
je 0x89f1e
leaq 0x2b1b31(%rip), %rdi    # 0x33ba40
callq 0x98c6
leaq 0x283589(%rip), %rax    # 0x30d4a4
andb $-0x5, (%rax)
callq 0x81f3d
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq