// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_ss_sats()
void parse_ss_sats()
{
int count;
int prn;
int status;
int i, j;
float el;
float az;
int snr;

   log_packet_id("Satellite info");
   count = tsip_byte() & 0x0F;
   reset_sat_tracking();

   while(count--) {
      status = tsip_byte();
      prn = (status & 0x1F) + 1;
      i = tsip_byte();
      el = (float) (char) i;
      i = tsip_byte();
      j = tsip_byte();
      if(j & 1) i += 128;
      az = (float) i;
      j = (j >> 1) & 0x7F;
      if(j) prn = (87 + j);

      snr = tsip_byte();  // snr

      status = (status >> 5) & 0x03;
      if(status == 3) sat[prn].tracking = 1;
      else if(status == 1) sat[prn].tracking = (-1);

      sat[prn].level_msg = 222;
      set_sat_azel(prn, az,el);
      sat[prn].sig_level = (float) snr;
      have_snr |= rinex_gnss(prn);
      have_sat_azel = 2;

      record_sig_levels(prn);
      level_type = "dBc";
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0xccebf(%rip), %rdi     # 0x18664e
callq 0x7add0
callq 0x7a510
movzbl %al, %eax
andl $0xf, %eax
movl %eax, -0x4(%rbp)
callq 0x81c10
movl -0x4(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x4(%rbp)
cmpl $0x0, %eax
je 0xb9932
callq 0x7a510
movzbl %al, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
andl $0x1f, %eax
incl %eax
movl %eax, -0x8(%rbp)
callq 0x7a510
movzbl %al, %eax
movl %eax, -0x10(%rbp)
movsbl -0x10(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x18(%rbp)
callq 0x7a510
movzbl %al, %eax
movl %eax, -0x10(%rbp)
callq 0x7a510
movzbl %al, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xb9815
movl -0x10(%rbp), %eax
addl $0x80, %eax
movl %eax, -0x10(%rbp)
cvtsi2ssl -0x10(%rbp), %xmm0
movss %xmm0, -0x1c(%rbp)
movl -0x14(%rbp), %eax
sarl %eax
andl $0x7f, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0xb9839
movl -0x14(%rbp), %eax
addl $0x57, %eax
movl %eax, -0x8(%rbp)
callq 0x7a510
movzbl %al, %eax
movl %eax, -0x20(%rbp)
movl -0xc(%rbp), %eax
sarl $0x5, %eax
andl $0x3, %eax
movl %eax, -0xc(%rbp)
cmpl $0x3, -0xc(%rbp)
jne 0xb9877
movslq -0x8(%rbp), %rcx
leaq 0x1e492f(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movl $0x1, 0x218(%rax)
jmp 0xb989e
cmpl $0x1, -0xc(%rbp)
jne 0xb989c
movslq -0x8(%rbp), %rcx
leaq 0x1e4908(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movl $0xffffffff, 0x218(%rax) # imm = 0xFFFFFFFF
jmp 0xb989e
movslq -0x8(%rbp), %rcx
leaq 0x1e48e7(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movl $0xde, 0x1c(%rax)
movl -0x8(%rbp), %edi
movss -0x1c(%rbp), %xmm0
movss -0x18(%rbp), %xmm1
callq 0x7d450
cvtsi2ssl -0x20(%rbp), %xmm0
movslq -0x8(%rbp), %rcx
leaq 0x1e48b4(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movss %xmm0, 0x20(%rax)
movl -0x8(%rbp), %edi
callq 0x12d280
movl %eax, %ecx
leaq 0x2b2c30(%rip), %rax    # 0x36c52c
orl (%rax), %ecx
leaq 0x2b2c27(%rip), %rax    # 0x36c52c
movl %ecx, (%rax)
leaq 0x2b2b66(%rip), %rax    # 0x36c474
movl $0x2, (%rax)
movl -0x8(%rbp), %edi
callq 0x80340
leaq 0x1e47b5(%rip), %rax    # 0x29e0d8
leaq 0xcb640(%rip), %rcx     # 0x184f6a
movq %rcx, (%rax)
jmp 0xb97a7
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)