// File: /workspace/github_cpp_makefile_star2_O3/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 0x9bf2a(%rip), %rdi     # 0x123367
callq 0x58dc2
callq 0x587be
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0x8745a
leaq 0x1b7b19(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
movl $0x218, %eax            # imm = 0x218
leaq 0x1b7b4a(%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 0x87468
andl $0xf, %ebx
je 0x875ec
callq 0x587be
movl %eax, %r13d
cmpl $0x100, %eax            # imm = 0x100
jb 0x874a2
leaq 0x1b7ad1(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
movl %eax, -0x30(%rbp)
cmpl $0x100, %eax            # imm = 0x100
jb 0x874bb
leaq 0x1b7ab8(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
movl %eax, -0x2c(%rbp)
cmpl $0x100, %eax            # imm = 0x100
jb 0x874d4
leaq 0x1b7a9f(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
movl %eax, %r15d
cmpl $0x100, %eax            # imm = 0x100
jb 0x874ed
leaq 0x1b7a86(%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 0x587be
movl %eax, %r12d
cmpl $0x100, %eax            # imm = 0x100
jb 0x87524
leaq 0x1b7a4f(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
shrl $0x5, %r13d
andl $0x3, %r13d
movl %r14d, %eax
cmpl $0x3, %r13d
je 0x87549
cmpl $0x1, %r13d
leaq 0x1b7a70(%rip), %r13    # 0x23efb0
jne 0x87564
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
jmp 0x87555
movl $0x1, %ecx
leaq 0x1b7a5b(%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 0x5ace1
movzbl %r12b, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x20(%r13,%r15)
movl %r14d, %edi
callq 0xdc1dd
leaq 0x285d90(%rip), %rcx    # 0x30d34c
orl %eax, (%rcx)
leaq 0x285ccf(%rip), %rax    # 0x30d294
movl $0x2, (%rax)
movl %r14d, %edi
callq 0x5cdab
leaq 0x9a700(%rip), %rax     # 0x121cda
leaq 0x1b7917(%rip), %rcx    # 0x23eef8
movq %rax, (%rcx)
testl %ebx, %ebx
jne 0x87489
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq