// File: /workspace/github_cpp_makefile_star2_O2/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 0x1917db(%rip), %rax    # 0x228390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x96bd2
leaq 0x79043(%rip), %rsi     # 0x10fc07
leaq 0x28ec65(%rip), %rdx    # 0x325830
xorl %eax, %eax
callq 0x9560
leaq 0x28ec57(%rip), %rax    # 0x325830
movsbl (%rax), %ebx
testl %ebx, %ebx
je 0x96d51
leaq 0x7148b(%rip), %rcx     # 0x108076
leaq 0x192306(%rip), %rdx    # 0x228ef8
movq %rcx, (%rdx)
movb 0x1(%rax), %r13b
testb %r13b, %r13b
je 0x96d51
andb $0x7, %r13b
je 0x96c1f
cmpb $0x4, %r13b
ja 0x96c24
leal -0x1(%r13), %eax
movzbl %al, %eax
leal (%rax,%rax,4), %r14d
addl $0x1e, %r14d
jmp 0x96c28
xorl %r14d, %r14d
jmp 0x96c28
pushq $0x32
popq %r14
leaq 0x2603a1(%rip), %rax    # 0x2f6fd0
movsd (%rax), %xmm2
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
leaq 0x260396(%rip), %rax    # 0x2f6fd8
movsd (%rax), %xmm3
jne 0x96c64
jp 0x96c64
ucomisd %xmm0, %xmm3
jne 0x96c64
jp 0x96c64
movss 0x60492(%rip), %xmm0    # 0xf70ec
movss 0x71d8a(%rip), %xmm1    # 0x1089ec
jmp 0x96ca5
movsd 0x5ec3c(%rip), %xmm0    # 0xf58a8
mulsd %xmm0, %xmm2
movsd 0x5ec28(%rip), %xmm1    # 0xf58a0
divsd %xmm1, %xmm2
mulsd %xmm0, %xmm3
divsd %xmm1, %xmm3
movsd 0x71abc(%rip), %xmm0    # 0x108748
movsd 0x71abc(%rip), %xmm1    # 0x108750
callq 0x96a9c
cvtsd2ss %xmm0, %xmm0
movss 0x60447(%rip), %xmm1    # 0xf70ec
leaq 0x192304(%rip), %r12    # 0x228fb0
movl $0x6f, 0x364(%r12)
pushq $0x1
popq %r15
movl %r15d, %edi
callq 0x53b74
cvtsi2ss %r14d, %xmm0
movss %xmm0, 0x368(%r12)
xorl %eax, %eax
cmpb $0x1, %r13b
sbbl %eax, %eax
orl $0x1, %eax
movl %eax, 0x560(%r12)
leaq 0x2605a7(%rip), %rax    # 0x2f7294
movl $0x2, (%rax)
movl %r15d, %edi
callq 0xca4da
leaq 0x26064a(%rip), %rcx    # 0x2f734c
orl %eax, (%rcx)
movl %r15d, %edi
callq 0x559ba
leaq 0x1921f9(%rip), %rax    # 0x228f0c
movl $0x1, (%rax)
movl %r15d, %edi
callq 0x56d93
leaq 0x191668(%rip), %rax    # 0x228390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x96d51
leaq 0x78ee1(%rip), %rsi     # 0x10fc18
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