// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x9bdbe(%rip), %rdi     # 0x123287
callq 0x58e77
callq 0x587d1
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0x874e6
leaq 0x1b7a8d(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
movl $0x218, %eax            # imm = 0x218
leaq 0x1b7abe(%rip), %rdx    # 0x23efb0
xorl %ecx, %ecx
movl %ecx, (%rdx,%rax)
movl %ecx, -0x1fc(%rdx,%rax)
addq $0x348, %rax            # imm = 0x348
cmpq $0xcd358, %rax          # imm = 0xCD358
jne 0x874f4
andl $0xf, %ebx
je 0x87678
callq 0x587d1
movl %eax, %r13d
cmpl $0x100, %eax            # imm = 0x100
jb 0x8752e
leaq 0x1b7a45(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
movl %eax, -0x30(%rbp)
cmpl $0x100, %eax            # imm = 0x100
jb 0x87547
leaq 0x1b7a2c(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
movl %eax, -0x2c(%rbp)
cmpl $0x100, %eax            # imm = 0x100
jb 0x87560
leaq 0x1b7a13(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
movl %eax, %r15d
cmpl $0x100, %eax            # imm = 0x100
jb 0x87579
leaq 0x1b79fa(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
movl %r13d, %eax
andl $0x1f, %eax
incl %eax
movl %r15d, %r14d
shrl %r14d
andl $0x7f, %r14d
addl $0x57, %r14d
testb $-0x2, %r15b
cmovel %eax, %r14d
callq 0x587d1
movl %eax, %r12d
cmpl $0x100, %eax            # imm = 0x100
jb 0x875b0
leaq 0x1b79c3(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
shrl $0x5, %r13d
andl $0x3, %r13d
movl %r14d, %eax
cmpl $0x3, %r13d
je 0x875d5
cmpl $0x1, %r13d
leaq 0x1b79e4(%rip), %r13    # 0x23efb0
jne 0x875f0
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
jmp 0x875e1
movl $0x1, %ecx
leaq 0x1b79cf(%rip), %r13    # 0x23efb0
imulq $0x348, %rax, %rdx      # imm = 0x348
movl %ecx, 0x218(%r13,%rdx)
movsbl -0x30(%rbp), %ecx
cvtsi2ss %ecx, %xmm1
movzbl -0x2c(%rbp), %ecx
shll $0x7, %r15d
movzbl %r15b, %edx
addl %ecx, %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
decl %ebx
imulq $0x348, %rax, %r15      # imm = 0x348
movl $0xde, 0x1c(%r13,%r15)
movl %r14d, %edi
callq 0x5ad98
movzbl %r12b, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x20(%r13,%r15)
movl %r14d, %edi
callq 0xdbb74
leaq 0x285d04(%rip), %rcx    # 0x30d34c
orl %eax, (%rcx)
leaq 0x285c43(%rip), %rax    # 0x30d294
movl $0x2, (%rax)
movl %r14d, %edi
callq 0x5ced3
leaq 0x9a594(%rip), %rax     # 0x121bfa
leaq 0x1b788b(%rip), %rcx    # 0x23eef8
movq %rax, (%rcx)
testl %ebx, %ebx
jne 0x87515
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq