// File: 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
subq $0x20, %rsp
leaq 0x1bbf91(%rip), %rax    # 0x29d570
cmpq $0x0, (%rax)
je 0xe1604
leaq 0x1bbf84(%rip), %rax    # 0x29d570
movq (%rax), %rdi
leaq 0xa79f7(%rip), %rsi     # 0x188fed
leaq 0x2b9413(%rip), %rdx    # 0x39aa10
movb $0x0, %al
callq 0x9550
leaq 0x2b9405(%rip), %rax    # 0x39aa10
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0xe1618
jmp 0xe18b0
leaq 0x2b93f1(%rip), %rax    # 0x39aa10
movsbl (%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xe1632
jmp 0xe1632
movl -0x4(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xe163f
jmp 0xe163f
leaq 0x1bca92(%rip), %rax    # 0x29e0d8
leaq 0xa13c9(%rip), %rcx     # 0x182a16
movq %rcx, (%rax)
leaq 0x2b93b9(%rip), %rax    # 0x39aa10
cmpb $0x0, 0x1(%rax)
je 0xe18b0
leaq 0x2b93a8(%rip), %rax    # 0x39aa10
movsbl 0x1(%rax), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0x7, %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0xe1687
movl $0x0, -0x8(%rbp)
jmp 0xe16da
cmpl $0x1, -0x8(%rbp)
jne 0xe1696
movl $0x1e, -0x8(%rbp)
jmp 0xe16d8
cmpl $0x2, -0x8(%rbp)
jne 0xe16a5
movl $0x23, -0x8(%rbp)
jmp 0xe16d6
cmpl $0x3, -0x8(%rbp)
jne 0xe16b4
movl $0x28, -0x8(%rbp)
jmp 0xe16d4
cmpl $0x4, -0x8(%rbp)
jne 0xe16c3
movl $0x2d, -0x8(%rbp)
jmp 0xe16d2
cmpl $0x5, -0x8(%rbp)
jl 0xe16d0
movl $0x32, -0x8(%rbp)
jmp 0xe16d2
jmp 0xe16d4
jmp 0xe16d6
jmp 0xe16d8
jmp 0xe16da
cmpl $0x32, -0x8(%rbp)
jle 0xe16e7
movl $0x32, -0x8(%rbp)
leaq 0x28aac2(%rip), %rax    # 0x36c1b0
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xe1715
jp 0xe1715
leaq 0x28aab4(%rip), %rax    # 0x36c1b8
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xe1715
jp 0xe1715
jmp 0xe177c
movsd 0x8d95b(%rip), %xmm2    # 0x16f078
leaq 0x28aa8c(%rip), %rax    # 0x36c1b0
mulsd (%rax), %xmm2
movsd 0x8fe98(%rip), %xmm0    # 0x1715c8
divsd %xmm0, %xmm2
movsd 0x8d93c(%rip), %xmm3    # 0x16f078
leaq 0x28aa75(%rip), %rax    # 0x36c1b8
mulsd (%rax), %xmm3
movsd 0x8fe79(%rip), %xmm0    # 0x1715c8
divsd %xmm0, %xmm3
movsd 0xa194d(%rip), %xmm0    # 0x1830a8
movsd 0xa194d(%rip), %xmm1    # 0x1830b0
callq 0xe1450
movsd %xmm0, -0x20(%rbp)
movsd 0x8d8f3(%rip), %xmm0    # 0x16f068
movsd %xmm0, -0x18(%rbp)
jmp 0xe1796
movsd 0x8d8e4(%rip), %xmm0    # 0x16f068
movsd %xmm0, -0x20(%rbp)
movsd 0xa190f(%rip), %xmm0    # 0x1830a0
movsd %xmm0, -0x18(%rbp)
movl $0x1, -0xc(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x1bc9e8(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movl $0x6f, 0x1c(%rax)
movl -0xc(%rbp), %edi
movsd -0x20(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movsd -0x18(%rbp), %xmm1
cvtsd2ss %xmm1, %xmm1
callq 0x7d450
cvtsi2ssl -0x8(%rbp), %xmm0
movslq -0xc(%rbp), %rcx
leaq 0x1bc9ad(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movss %xmm0, 0x20(%rax)
cmpl $0x0, -0x8(%rbp)
jle 0xe1818
movl -0xc(%rbp), %ecx
movslq -0xc(%rbp), %rdx
leaq 0x1bc98a(%rip), %rax    # 0x29e190
imulq $0x348, %rdx, %rdx      # imm = 0x348
addq %rdx, %rax
movl %ecx, 0x218(%rax)
jmp 0xe1837
movslq -0xc(%rbp), %rcx
leaq 0x1bc96d(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movl $0xffffffff, 0x218(%rax) # imm = 0xFFFFFFFF
leaq 0x28ac36(%rip), %rax    # 0x36c474
movl $0x2, (%rax)
movl -0xc(%rbp), %edi
callq 0x12d280
movl %eax, %ecx
leaq 0x28acd7(%rip), %rax    # 0x36c52c
orl (%rax), %ecx
leaq 0x28acce(%rip), %rax    # 0x36c52c
movl %ecx, (%rax)
movl -0xc(%rbp), %edi
callq 0x80340
leaq 0x1bc87d(%rip), %rax    # 0x29e0ec
movl $0x1, (%rax)
leaq 0x1bc870(%rip), %rax    # 0x29e0ec
movl (%rax), %edi
callq 0x82080
leaq 0x1bbce6(%rip), %rax    # 0x29d570
cmpq $0x0, (%rax)
je 0xe18ae
leaq 0x1bbcd9(%rip), %rax    # 0x29d570
movq (%rax), %rdi
movl -0x8(%rbp), %edx
movl -0x4(%rbp), %ecx
leaq 0xa7757(%rip), %rsi     # 0x188ffe
movb $0x0, %al
callq 0x9550
jmp 0xe18b0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)