// File: jkingan[P]ladyheather/heathgps.cpp
// Function: record_sig_levels(int)
void record_sig_levels(int prn)
{
float sig;

   // check the signal level for sat PRN "prn", update the sats' max signal
   // level,  and update the signal level map info

   if(prn < 0) return;
   if(prn > MAX_PRN) return;
   if(rcvr_type == RFTG_RCVR) ; 
   else if((lat == 0.0) && (lon == 0.0)) return;

#ifdef SIG_LEVELS
   if(sat[prn].level_msg != 0) { 
      sig = sat[prn].sig_level;
      if(sig < 0.0F) sig = 0.0F - sig;

      if(sat[prn].sig_level > max_sat_db[prn]) {
         max_sat_db[prn] = sig;
      }

      if(sig > max_sig_level) {
         max_sig_level = sig;
      }
      if(sig) {
         if(sig < min_sig_level) {
            min_sig_level = sig;
         }
      }

      sig_level_sum += sig;
      ++sig_level_count;

      if(pause_data) ;
      else if(reading_signals == 0) {
         log_signal(sat[prn].azimuth+0.5F, sat[prn].elevation+0.5F, sig, amu_mode);
      }
      have_snr |= rinex_gnss(prn);
   }
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jge 0x80356
jmp 0x8056c
cmpl $0x3e7, -0x4(%rbp)      # imm = 0x3E7
jle 0x80364
jmp 0x8056c
leaq 0x1f7745(%rip), %rax    # 0x277ab0
cmpq $0x400000, (%rax)       # imm = 0x400000
jne 0x80376
jmp 0x803a9
leaq 0x2ebe33(%rip), %rax    # 0x36c1b0
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x803a7
jp 0x803a7
leaq 0x2ebe25(%rip), %rax    # 0x36c1b8
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x803a7
jp 0x803a7
jmp 0x8056c
jmp 0x803a9
movslq -0x4(%rbp), %rcx
leaq 0x21dddc(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
cmpl $0x0, 0x1c(%rax)
je 0x8056c
movslq -0x4(%rbp), %rcx
leaq 0x21ddbd(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movss 0x20(%rax), %xmm0
movss %xmm0, -0x8(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x8(%rbp), %xmm0
jbe 0x803fd
xorps %xmm0, %xmm0
subss -0x8(%rbp), %xmm0
movss %xmm0, -0x8(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x21dd88(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movss 0x20(%rax), %xmm0
movslq -0x4(%rbp), %rcx
leaq 0x19207e(%rip), %rax    # 0x2124a0
ucomiss (%rax,%rcx,4), %xmm0
jbe 0x8043d
movss -0x8(%rbp), %xmm0
movslq -0x4(%rbp), %rcx
leaq 0x192068(%rip), %rax    # 0x2124a0
movss %xmm0, (%rax,%rcx,4)
movss -0x8(%rbp), %xmm0
leaq 0x192fff(%rip), %rax    # 0x213448
ucomiss (%rax), %xmm0
jbe 0x8045e
movss -0x8(%rbp), %xmm0
leaq 0x192fee(%rip), %rax    # 0x213448
movss %xmm0, (%rax)
movss -0x8(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x8046f
jp 0x8046f
jmp 0x80496
movss -0x8(%rbp), %xmm1
leaq 0x192fd1(%rip), %rax    # 0x21344c
movss (%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x80494
movss -0x8(%rbp), %xmm0
leaq 0x192fbc(%rip), %rax    # 0x21344c
movss %xmm0, (%rax)
jmp 0x80496
movss -0x8(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x192faa(%rip), %rax    # 0x213450
addsd (%rax), %xmm0
leaq 0x192f9f(%rip), %rax    # 0x213450
movsd %xmm0, (%rax)
movsd 0xeebab(%rip), %xmm0    # 0x16f068
leaq 0x192f94(%rip), %rax    # 0x213458
addsd (%rax), %xmm0
leaq 0x192f89(%rip), %rax    # 0x213458
movsd %xmm0, (%rax)
leaq 0x1f9f3a(%rip), %rax    # 0x27a414
cmpb $0x0, (%rax)
je 0x804e1
jmp 0x80550
leaq 0x319fd0(%rip), %rax    # 0x39a4b8
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x8054e
movslq -0x4(%rbp), %rcx
leaq 0x21dc95(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movss 0xf1433(%rip), %xmm0    # 0x171940
addss 0x208(%rax), %xmm0
movslq -0x4(%rbp), %rcx
leaq 0x21dc70(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movss 0xf140e(%rip), %xmm1    # 0x171940
addss 0x20c(%rax), %xmm1
movss -0x8(%rbp), %xmm2
leaq 0x21db8a(%rip), %rax    # 0x29e0d0
movzbl (%rax), %edi
callq 0x157800
jmp 0x80550
movl -0x4(%rbp), %edi
callq 0x12d280
movl %eax, %ecx
leaq 0x2ebfcb(%rip), %rax    # 0x36c52c
orl (%rax), %ecx
leaq 0x2ebfc2(%rip), %rax    # 0x36c52c
movl %ecx, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)