// File: /workspace/github_cpp_makefile_star2_O3/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 0x19824b(%rip), %r15    # 0x23e390
movq (%r15), %rdi
testq %rdi, %rdi
je 0xa6162
leaq 0x7fb6e(%rip), %rsi     # 0x125cc2
leaq 0x2956d5(%rip), %rdx    # 0x33b830
xorl %eax, %eax
callq 0x9560
leaq 0x2956c7(%rip), %rax    # 0x33b830
movsbl (%rax), %ebx
testl %ebx, %ebx
je 0xa62df
leaq 0x77e80(%rip), %rcx     # 0x11dffb
leaq 0x198d76(%rip), %rdx    # 0x23eef8
movq %rcx, (%rdx)
movb 0x1(%rax), %r12b
testb %r12b, %r12b
je 0xa62df
andb $0x7, %r12b
je 0xa61b6
movl $0x32, %r14d
cmpb $0x4, %r12b
ja 0xa61b9
leal -0x1(%r12), %eax
movzbl %al, %eax
leal (%rax,%rax,4), %r14d
addl $0x1e, %r14d
jmp 0xa61b9
xorl %r14d, %r14d
leaq 0x266e10(%rip), %rax    # 0x30cfd0
movsd (%rax), %xmm2
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
leaq 0x266e05(%rip), %rax    # 0x30cfd8
movsd (%rax), %xmm3
jne 0xa61f5
jp 0xa61f5
ucomisd %xmm0, %xmm3
jne 0xa61f5
jp 0xa61f5
movss 0x66e81(%rip), %xmm0    # 0x10d06c
movss 0x78881(%rip), %xmm1    # 0x11ea74
jmp 0xa6236
movsd 0x65633(%rip), %xmm0    # 0x10b830
mulsd %xmm0, %xmm2
movsd 0x6561f(%rip), %xmm1    # 0x10b828
divsd %xmm1, %xmm2
mulsd %xmm0, %xmm3
divsd %xmm1, %xmm3
movsd 0x785b3(%rip), %xmm0    # 0x11e7d0
movsd 0x785b3(%rip), %xmm1    # 0x11e7d8
callq 0xa602c
cvtsd2ss %xmm0, %xmm0
movss 0x66e36(%rip), %xmm1    # 0x10d06c
leaq 0x198d73(%rip), %r13    # 0x23efb0
movl $0x6f, 0x364(%r13)
movl $0x1, %edi
callq 0x5ace1
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 0x267018(%rip), %rax    # 0x30d294
movl $0x2, (%rax)
movl $0x1, %edi
callq 0xdc1dd
leaq 0x2670b9(%rip), %rcx    # 0x30d34c
orl %eax, (%rcx)
movl $0x1, %edi
callq 0x5cdab
leaq 0x198c66(%rip), %rax    # 0x23ef0c
movl $0x1, (%rax)
movl $0x1, %edi
callq 0x5e390
movq (%r15), %rdi
testq %rdi, %rdi
je 0xa62df
leaq 0x7fa0e(%rip), %rsi     # 0x125cd3
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