// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_rftg_sigs()
void parse_rftg_sigs()
{
int i;
int num_vis;
int num_tracked;
int prn;
float az;
int tracked;
int snr;
int chan;

   // satellite status
   log_packet_id("Packet 0x25 (satellite signals)");

   reset_sat_tracking();
   level_type = "SNR";

   num_vis = tsip_byte();
   num_tracked = tsip_byte();

   for(i=0; i<6; i++) {
      prn = tsip_byte();
      tracked = tsip_byte(); // 08=tracked   0=not tracked
      snr = tsip_byte();
      chan = tsip_byte();    // channel status: A2=tracked and used  01=not tracked
      if((prn >= 1) && (prn <= 32)) {
         az = (float) (prn*10);   // fake the az/el so sat sig levels show in the sat map
         set_sat_azel(prn, az, 20.0F);

         sat[prn].sig_level = (float) snr;
         sat[prn].level_msg = 0x25;
         have_snr |= rinex_gnss(prn);
         if(tracked & 0x08) {
            sat[prn].tracking = prn;
         }
         record_sig_levels(prn);
      }
   }

   tsip_byte();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x9aaa1(%rip), %rdi     # 0x12353f
callq 0x58dc2
movl $0x218, %eax            # imm = 0x218
leaq 0x1b6501(%rip), %r12    # 0x23efb0
xorl %ecx, %ecx
movl %ecx, (%r12,%rax)
movl %ecx, -0x1fc(%r12,%rax)
addq $0x348, %rax            # imm = 0x348
cmpq $0xcd358, %rax          # imm = 0xCD358
jne 0x88ab1
leaq 0x95529(%rip), %rax     # 0x11dffb
leaq 0x1b641f(%rip), %rcx    # 0x23eef8
movq %rax, (%rcx)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88af2
leaq 0x1b6481(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88b08
leaq 0x1b646b(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
movl $0x6, %r13d
callq 0x587be
movl %eax, %r14d
cmpl $0x100, %eax            # imm = 0x100
jb 0x88b27
leaq 0x1b644c(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0x88b3f
leaq 0x1b6434(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
movl %eax, %r15d
cmpl $0x100, %eax            # imm = 0x100
jb 0x88b58
leaq 0x1b641b(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88b6e
leaq 0x1b6405(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
leal -0x1(%r14), %eax
cmpb $0x1f, %al
ja 0x88be5
movzbl %r14b, %r14d
leal (%r14,%r14), %eax
leal (%rax,%rax,4), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movl %r14d, %edi
movss 0x95ebd(%rip), %xmm1    # 0x11ea50
callq 0x5ace1
movzbl %r15b, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movl %r14d, %eax
imulq $0x348, %rax, %r15      # imm = 0x348
movss %xmm0, 0x20(%r12,%r15)
movl $0x25, 0x1c(%r12,%r15)
movl %r14d, %edi
callq 0xdc1dd
leaq 0x284780(%rip), %rcx    # 0x30d34c
orl %eax, (%rcx)
testb $0x8, %bl
je 0x88bdd
addq %r12, %r15
movl %r14d, 0x218(%r15)
movl %r14d, %edi
callq 0x5cdab
decl %r13d
jne 0x88b0e
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88c04
leaq 0x1b636f(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq