// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gpgga(int)
void parse_gpgga(int system)
{
int fix;

   if((system & system_mask) == 0) return;

   last_was_gsv = 0;
   if((rcvr_type == BRANDY_RCVR) && (have_gpgga = 0)) {
      new_queue(RESET_ALL_QUEUES, 1504);
   }
   have_gpgga = system;

   if     (TIME_FILTER && have_gpzda) get_msg_field();
   else if(TIME_FILTER && have_gprmc) get_msg_field();
   else                               get_nmea_time();  // was get_msg_field();

   get_nmea_lat();
   get_nmea_lon();

   get_msg_field();  // fix status   zzzzz - verify fix is good
   if(msg_field[0]) fix = atoi(msg_field);
   else             fix = 0;

   if(get_msg_field()) { // sat count
      sat_count = atoi(msg_field);
      have_count = 3;
   }

   if(get_msg_field()) { // hdop
      hdop = (float) atof(msg_field);
      have_dops |= HDOP;
   }

   get_nmea_alt();

   get_msg_field();  // geiod height
   get_msg_field();  // dgps time
   get_msg_field();  // dgps station

   config_sat_count(sat_count);

   check_nmea_date();

   if     (TIME_FILTER && have_gpzda) ;
   else if(TIME_FILTER && have_gprmc) ;
   else if(rcvr_type == BRANDY_RCVR) {
      return;  // Brandywine gets date/time from a different message
   }
   else drive_nmea_screen(system, NMEA_GGA);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
leaq 0x11dc5b(%rip), %rcx    # 0x1cfe50
andl (%rcx), %eax
cmpl $0x0, %eax
jne 0xb2201
jmp 0xb237d
movl $0x0, 0x31ede9(%rip)    # 0x3d0ff4
leaq 0x1c589e(%rip), %rax    # 0x277ab0
cmpq $0x40000, (%rax)        # imm = 0x40000
jne 0xb223f
leaq 0x1c8092(%rip), %rax    # 0x27a2b4
movl $0x0, (%rax)
xorl %eax, %eax
testb $0x1, %al
jne 0xb2230
jmp 0xb223f
movl $0x7, %edi
movl $0x5e0, %esi            # imm = 0x5E0
callq 0x14df0
movl -0x4(%rbp), %ecx
leaq 0x1c806b(%rip), %rax    # 0x27a2b4
movl %ecx, (%rax)
leaq 0x1c806e(%rip), %rax    # 0x27a2c0
cmpl $0x0, (%rax)
je 0xb225e
callq 0xb0bd0
jmp 0xb2278
leaq 0x1c8053(%rip), %rax    # 0x27a2b8
cmpl $0x0, (%rax)
je 0xb2271
callq 0xb0bd0
jmp 0xb2276
callq 0xb1730
jmp 0xb2278
callq 0xb14a0
callq 0xb15b0
callq 0xb0bd0
leaq 0x2e8992(%rip), %rax    # 0x39ac20
cmpb $0x0, (%rax)
je 0xb22a4
leaq 0x2e8986(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0x8(%rbp)
jmp 0xb22ab
movl $0x0, -0x8(%rbp)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb22d9
leaq 0x2e8964(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x1ebe22(%rip), %rax    # 0x29e0ec
movl %ecx, (%rax)
leaq 0x2ba225(%rip), %rax    # 0x36c4f8
movl $0x3, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb2317
leaq 0x2e8936(%rip), %rdi    # 0x39ac20
callq 0x9480
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1d03d2(%rip), %rax    # 0x2826d0
movsd %xmm0, (%rax)
leaq 0x1d03bb(%rip), %rax    # 0x2826c4
movl (%rax), %ecx
orl $0x2, %ecx
leaq 0x1d03af(%rip), %rax    # 0x2826c4
movl %ecx, (%rax)
callq 0xb16c0
callq 0xb0bd0
callq 0xb0bd0
callq 0xb0bd0
leaq 0x1ebdba(%rip), %rax    # 0x29e0ec
movl (%rax), %edi
callq 0x82080
callq 0xb19e0
leaq 0x1c7f7b(%rip), %rax    # 0x27a2c0
cmpl $0x0, (%rax)
je 0xb234c
jmp 0xb237d
leaq 0x1c7f65(%rip), %rax    # 0x27a2b8
cmpl $0x0, (%rax)
je 0xb235a
jmp 0xb237b
leaq 0x1c574f(%rip), %rax    # 0x277ab0
cmpq $0x40000, (%rax)        # imm = 0x40000
jne 0xb236c
jmp 0xb237d
movl -0x4(%rbp), %edi
movl $0x3, %esi
callq 0xb1ef0
jmp 0xb237b
jmp 0xb237d
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)