// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gpgsa(int)
void parse_gpgsa(int system)
{
int mode_flag;
int fix_status;
int prn;
int i;

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

   last_was_gsv = 0;
   if(get_msg_field()) mode_flag = msg_field[0];

   if(get_msg_field()) {
      if(0 && (rcvr_type == BRANDY_RCVR)) ;  // we get rvcr_mode from the Brandywine ",A" message
      else if(rcvr_type == ESIP_RCVR) ;  // we get rvcr_mode from the CRY message
      else {
         fix_status = atoi(msg_field);
         i = rcvr_mode;
         if(fix_status == 1) {
            rcvr_mode = RCVR_MODE_NO_SATS;  
            if((rcvr_type == FURUNO_RCVR) && have_furuno_fix_mode) {
               if((furuno_fix_mode == 2) || (furuno_fix_mode == 4)) {  // !!!! fix mode 4?
                  rcvr_mode = RCVR_MODE_HOLD;
               }
            }
         }
         else if(fix_status == 2) rcvr_mode = RCVR_MODE_2D;
         else if(fix_status == 3) rcvr_mode = RCVR_MODE_3D;
         else                     rcvr_mode = RCVR_MODE_UNKNOWN;
         have_tracking = 1;

         minor_alarms &= (~MINOR_NO_TRACK);
         if(rcvr_mode == RCVR_MODE_NO_SATS) { 
            if(rcvr_type == BRANDY_RCVR) rcvr_mode = i;  // Brandywine GPSDO sends fix_mode == 1 in position hold mode?
            else minor_alarms |= MINOR_NO_TRACK;
         }
         have_rcvr_mode = 2;
      }
   }

   for(i=1; i<=12; i++) {   // list of sats being tracked
      if(get_msg_field()) {
         prn = atoi(msg_field);
         if((prn >= 1) && (prn <= MAX_PRN)) { 
            sat[prn].tracking = prn;
            sat[prn].level_msg = 2;
            have_snr |= rinex_gnss(prn);
         }
      }
   }

// have_dops = 0;
   if(get_msg_field()) {
      pdop = (float) atof(msg_field);
      have_dops |= PDOP;
   }
   if(get_msg_field()) {
      hdop = (float) atof(msg_field);
      have_dops |= HDOP;
   }
   if(get_msg_field()) {
      vdop = (float) atof(msg_field);
      have_dops |= VDOP;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0xe52f7(%rip), %rax     # 0x15ac70
testl %edi, (%rax)
je 0x75b4f
andl $0x0, 0x2e649c(%rip)    # 0x35be24
callq 0x75767
callq 0x75767
testl %eax, %eax
sete %al
leaq 0x18cf32(%rip), %rcx    # 0x2028d0
movq (%rcx), %rbx
movl $0x80000000, %ecx       # imm = 0x80000000
cmpq %rcx, %rbx
sete %cl
orb %al, %cl
jne 0x75a5c
leaq 0x2b0085(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x281709(%rip), %rcx    # 0x2f70d0
movb (%rcx), %dl
cmpl $0x3, %eax
je 0x75a0f
cmpl $0x2, %eax
je 0x75a0a
cmpl $0x1, %eax
jne 0x75a14
movb $0x2, (%rcx)
movb $0x1, %al
cmpq $0x20000000, %rbx       # imm = 0x20000000
jne 0x75a1c
leaq 0x2b18b7(%rip), %rsi    # 0x3272a4
cmpl $0x0, (%rsi)
je 0x75a1c
leaq 0x2b18a7(%rip), %rsi    # 0x3272a0
movl (%rsi), %edi
movb $0x7, %sil
cmpl $0x2, %edi
je 0x75a17
cmpl $0x4, %edi
je 0x75a17
jmp 0x75a1c
movb $0x3, %sil
jmp 0x75a17
movb $0x4, %sil
jmp 0x75a17
movb $0x63, %sil
movb %sil, (%rcx)
xorl %eax, %eax
leaq 0x28186d(%rip), %rsi    # 0x2f7290
movl $0x1, (%rsi)
leaq 0x2817a8(%rip), %rsi    # 0x2f71d8
movl (%rsi), %edi
movl %edi, %r8d
andl $-0x9, %r8d
movl %r8d, (%rsi)
testb %al, %al
je 0x75a52
cmpq $0x40000, %rbx          # imm = 0x40000
jne 0x75a4d
movb %dl, (%rcx)
jmp 0x75a52
orl $0x8, %edi
movl %edi, (%rsi)
leaq 0x2819b4(%rip), %rax    # 0x2f740d
movb $0x2, (%rax)
pushq $0xc
popq %r14
leaq 0x2affd9(%rip), %rbx    # 0x325a40
leaq 0x1b3542(%rip), %r15    # 0x228fb0
leaq 0x2818d7(%rip), %r12    # 0x2f734c
callq 0x75767
subl $0x1, %r14d
jb 0x75abe
testl %eax, %eax
je 0x75a75
movq %rbx, %rdi
callq 0x95e0
leal -0x1(%rax), %ecx
cmpl $0x3e6, %ecx            # imm = 0x3E6
ja 0x75a75
movl %eax, %ecx
imulq $0x348, %rcx, %rcx      # imm = 0x348
movl %eax, 0x218(%r15,%rcx)
movl $0x2, 0x1c(%r15,%rcx)
movl %eax, %edi
callq 0xca4da
orl %eax, (%r12)
jmp 0x75a75
testl %eax, %eax
je 0x75aeb
leaq 0x2aff77(%rip), %rdi    # 0x325a40
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x197a0b(%rip), %rax    # 0x20d4e8
movsd %xmm0, (%rax)
leaq 0x1979fc(%rip), %rax    # 0x20d4e4
orb $0x1, (%rax)
callq 0x75767
testl %eax, %eax
je 0x75b1d
leaq 0x2aff45(%rip), %rdi    # 0x325a40
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1979e1(%rip), %rax    # 0x20d4f0
movsd %xmm0, (%rax)
leaq 0x1979ca(%rip), %rax    # 0x20d4e4
orb $0x2, (%rax)
callq 0x75767
testl %eax, %eax
je 0x75b4f
leaq 0x2aff13(%rip), %rdi    # 0x325a40
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1979b7(%rip), %rax    # 0x20d4f8
movsd %xmm0, (%rax)
leaq 0x197998(%rip), %rax    # 0x20d4e4
orb $0x4, (%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq