// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_acron_status()
void parse_acron_status()
{
int status;
int quality;
int prn;
double el;
double angle;

if(debug_file) fprintf(debug_file, "acron status:%s\n", nmea_msg);
   if(nmea_msg[0] == 0) return;

   status = nmea_msg[0];
   if(status & 0x01) {  // reception attempt in progress
   }
   if(status & 0x02) {  // port P51
   }
   
   level_type = "SNR";
   if(nmea_msg[1]) {    // signal quality
      quality = nmea_msg[1];
      quality &= 0x07;  // 5=good  <3=very poor  0=between reception trys

      if     (quality == 0) quality = 0;
      else if(quality == 1) quality = 30;
      else if(quality == 2) quality = 35;
      else if(quality == 3) quality = 40;
      else if(quality == 4) quality = 45;
      else if(quality >= 5) quality = 50;
      if(quality > 50) quality = 50;

      if(lat || lon) {  // az/el is bearing to Ft Collins WWVB site
         angle = bearing(WWVB_LAT,WWVB_LON, lat*180.0/PI,lon*180.0/PI);
         el = 1.0;
      }
      else {
         angle = 1.0;
         el = 89.0;
      }

      prn = 1;    // fake single sat at az=1 el=89
      sat[prn].level_msg = 111;
      set_sat_azel(prn, (float) angle, (float) el);
      sat[prn].sig_level = (float) quality;
      if(quality > 0) sat[prn].tracking = prn;
      else            sat[prn].tracking = (-1);
      have_sat_azel = 2;
      have_snr |= rinex_gnss(prn);

      record_sig_levels(prn);

      sat_count = 1;
      config_sat_count(sat_count);
if(debug_file) fprintf(debug_file, "status:%d quality:%d\n", quality, status);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x198435(%rip), %r15    # 0x23e390
movq (%r15), %rdi
testq %rdi, %rdi
je 0xa5f78
leaq 0x7fc78(%rip), %rsi     # 0x125be2
leaq 0x2958bf(%rip), %rdx    # 0x33b830
xorl %eax, %eax
callq 0x9560
leaq 0x2958b1(%rip), %rax    # 0x33b830
movsbl (%rax), %ebx
testl %ebx, %ebx
je 0xa60f5
leaq 0x77fdf(%rip), %rcx     # 0x11df70
leaq 0x198f60(%rip), %rdx    # 0x23eef8
movq %rcx, (%rdx)
movb 0x1(%rax), %r12b
testb %r12b, %r12b
je 0xa60f5
andb $0x7, %r12b
je 0xa5fcc
movl $0x32, %r14d
cmpb $0x4, %r12b
ja 0xa5fcf
leal -0x1(%r12), %eax
movzbl %al, %eax
leal (%rax,%rax,4), %r14d
addl $0x1e, %r14d
jmp 0xa5fcf
xorl %r14d, %r14d
leaq 0x266ffa(%rip), %rax    # 0x30cfd0
movsd (%rax), %xmm2
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
leaq 0x266fef(%rip), %rax    # 0x30cfd8
movsd (%rax), %xmm3
jne 0xa600b
jp 0xa600b
ucomisd %xmm0, %xmm3
jne 0xa600b
jp 0xa600b
movss 0x66fd3(%rip), %xmm0    # 0x10cfd4
movss 0x789bf(%rip), %xmm1    # 0x11e9c8
jmp 0xa604c
movsd 0x6580d(%rip), %xmm0    # 0x10b820
mulsd %xmm0, %xmm2
movsd 0x657f9(%rip), %xmm1    # 0x10b818
divsd %xmm1, %xmm2
mulsd %xmm0, %xmm3
divsd %xmm1, %xmm3
movsd 0x786ed(%rip), %xmm0    # 0x11e720
movsd 0x786ed(%rip), %xmm1    # 0x11e728
callq 0xa5e42
cvtsd2ss %xmm0, %xmm0
movss 0x66f88(%rip), %xmm1    # 0x10cfd4
leaq 0x198f5d(%rip), %r13    # 0x23efb0
movl $0x6f, 0x364(%r13)
movl $0x1, %edi
callq 0x5ad98
xorps %xmm0, %xmm0
cvtsi2ss %r14d, %xmm0
movss %xmm0, 0x368(%r13)
xorl %eax, %eax
cmpb $0x1, %r12b
sbbl %eax, %eax
orl $0x1, %eax
movl %eax, 0x560(%r13)
leaq 0x267202(%rip), %rax    # 0x30d294
movl $0x2, (%rax)
movl $0x1, %edi
callq 0xdbb74
leaq 0x2672a3(%rip), %rcx    # 0x30d34c
orl %eax, (%rcx)
movl $0x1, %edi
callq 0x5ced3
leaq 0x198e50(%rip), %rax    # 0x23ef0c
movl $0x1, (%rax)
movl $0x1, %edi
callq 0x5e411
movq (%r15), %rdi
testq %rdi, %rdi
je 0xa60f5
leaq 0x7fb18(%rip), %rsi     # 0x125bf3
movl %r14d, %edx
movl %ebx, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9560
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq