// File: jkingan[P]ladyheather/heathgps.cpp
// Function: drive_nmea_screen(int, int)
void drive_nmea_screen(int system, int why)
{
static int last_hours = 0;
static int last_minutes = 0;
static int last_seconds = 0;
static int last_month = 0;
static int last_day = 0;
static int last_year = 0;
static double last_frac;
static int last_why;

   // update the screen for NMEA receivers and polled receivers that can
   // send multiple time messages per second.  This routine filters out
   // duplicated time stamps
   if(lte_lite == 1) lte_lite = 2;     // LTE Lite with both NMEA and STATUS messages


   if     (hours != last_hours) ;      // filter out duplicate time stamps since
   else if(minutes != last_minutes) ;  // ... NMEA sends the time in several 
   else if(seconds != last_seconds) ;  // ... different messages and different
   else if(month != last_month) ;      // ... receivers send different sets
   else if(day != last_day) ;          // ... of messages that may have the
   else if(year != last_year) ;        // ... same time stamps.
   else if((nav_rate != 1.0) && (last_frac != raw_frac)) ;
   else return;

   last_hours = hours;
   last_minutes = minutes;
   last_seconds = seconds;
   last_month = month;
   last_day = day;
   last_year = year;
   last_frac = raw_frac;

   update_gps_screen(system);
   last_why = why;

   if(rcvr_type == BRANDY_RCVR) {
      if(pri_seconds == SCPI_STATUS_SECOND) {
         queue_brandy_cmd("l", BRANDY_SATINFO_MSG);
      }
      else {
         queue_polled_cmd("f", BRANDY_FREQ_MSG);  // request freq controller info
      }
   }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
leaq 0x1c82ab(%rip), %rax    # 0x27a1b0
cmpl $0x1, (%rax)
jne 0xb1f17
leaq 0x1c829f(%rip), %rax    # 0x27a1b0
movl $0x2, (%rax)
leaq 0x2ba792(%rip), %rax    # 0x36c6b0
movl (%rax), %eax
cmpl 0x31f10e(%rip), %eax    # 0x3d1034
je 0xb1f2d
jmp 0xb1fd8
leaq 0x2ba778(%rip), %rax    # 0x36c6ac
movl (%rax), %eax
cmpl 0x31f0fc(%rip), %eax    # 0x3d1038
je 0xb1f43
jmp 0xb1fd6
leaq 0x2ba75e(%rip), %rax    # 0x36c6a8
movl (%rax), %eax
cmpl 0x31f0ea(%rip), %eax    # 0x3d103c
je 0xb1f56
jmp 0xb1fd4
leaq 0x2ba75b(%rip), %rax    # 0x36c6b8
movl (%rax), %eax
cmpl 0x31f0db(%rip), %eax    # 0x3d1040
je 0xb1f69
jmp 0xb1fd2
leaq 0x2ba744(%rip), %rax    # 0x36c6b4
movl (%rax), %eax
cmpl 0x31f0cc(%rip), %eax    # 0x3d1044
je 0xb1f7c
jmp 0xb1fd0
leaq 0x2ba739(%rip), %rax    # 0x36c6bc
movl (%rax), %eax
cmpl 0x31f0bd(%rip), %eax    # 0x3d1048
je 0xb1f8f
jmp 0xb1fce
leaq 0x1c85a2(%rip), %rax    # 0x27a538
movsd (%rax), %xmm0
movsd 0xbd0c6(%rip), %xmm1    # 0x16f068
ucomisd %xmm1, %xmm0
jne 0xb1fac
jp 0xb1fac
jmp 0xb1fc7
movsd 0x31f09c(%rip), %xmm0   # 0x3d1050
leaq 0x2ba705(%rip), %rax    # 0x36c6c0
ucomisd (%rax), %xmm0
jne 0xb1fc5
jp 0xb1fc5
jmp 0xb1fc7
jmp 0xb1fcc
jmp 0xb2098
jmp 0xb1fce
jmp 0xb1fd0
jmp 0xb1fd2
jmp 0xb1fd4
jmp 0xb1fd6
jmp 0xb1fd8
leaq 0x2ba6d1(%rip), %rax    # 0x36c6b0
movl (%rax), %eax
movl %eax, 0x31f04d(%rip)    # 0x3d1034
leaq 0x2ba6be(%rip), %rax    # 0x36c6ac
movl (%rax), %eax
movl %eax, 0x31f042(%rip)    # 0x3d1038
leaq 0x2ba6ab(%rip), %rax    # 0x36c6a8
movl (%rax), %eax
movl %eax, 0x31f037(%rip)    # 0x3d103c
leaq 0x2ba6ac(%rip), %rax    # 0x36c6b8
movl (%rax), %eax
movl %eax, 0x31f02c(%rip)    # 0x3d1040
leaq 0x2ba699(%rip), %rax    # 0x36c6b4
movl (%rax), %eax
movl %eax, 0x31f021(%rip)    # 0x3d1044
leaq 0x2ba692(%rip), %rax    # 0x36c6bc
movl (%rax), %eax
movl %eax, 0x31f016(%rip)    # 0x3d1048
leaq 0x2ba687(%rip), %rax    # 0x36c6c0
movsd (%rax), %xmm0
movsd %xmm0, 0x31f00b(%rip)   # 0x3d1050
movl -0x4(%rbp), %edi
callq 0x9d790
movl -0x8(%rbp), %eax
movl %eax, 0x31f002(%rip)    # 0x3d1058
leaq 0x1c5a53(%rip), %rax    # 0x277ab0
cmpq $0x40000, (%rax)        # imm = 0x40000
jne 0xb2098
leaq 0x2ba673(%rip), %rax    # 0x36c6e0
cmpl $0x20, (%rax)
jne 0xb2085
leaq 0xc942f(%rip), %rdi     # 0x17b4a8
movl $0x196, %esi            # imm = 0x196
callq 0x82fd0
jmp 0xb2096
leaq 0xc75ab(%rip), %rdi     # 0x179637
movl $0x193, %esi            # imm = 0x193
callq 0x82fd0
jmp 0xb2098
addq $0x10, %rsp
popq %rbp
retq
nop