// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_zod_snr()
void parse_zod_snr()
{
int i;
int flags;
int prn;
int snr;

   log_packet_id("sig levels");

   get_zod_seq(1);
   
   gps_week = tsip_word();
   faked_tow = 0;
   if(have_week == 0) need_redraw = 2033;
   have_week = 6;

   pri_tow = tow = this_tow = tsip_dword();
   if(have_tow == 0) need_redraw = 2034;
   have_tow = 6;
   survey_tow = tow;

   tsip_dword(); // epoch nanoseconds

   reset_sat_tracking();

   for(i=0; i<12; i++) {
      flags = tsip_word();
      prn = tsip_word();
      snr = tsip_word();
      if((prn >= 1) && (prn <= MAX_PRN)) { 
         sat[prn].sig_level = (float) snr;
         sat[prn].level_msg = 9;
         have_snr |= rinex_gnss(prn);
         if(flags & 0x0001) sat[prn].tracking = 1;
         else               sat[prn].tracking = (-1);
         record_sig_levels(prn);
      }
   }

   level_type = "SNR";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0xb7cad(%rip), %rdi     # 0x187e2c
callq 0x7add0
movl $0x1, %edi
callq 0xd0040
callq 0x7a560
movw %ax, %cx
leaq 0x29c77b(%rip), %rax    # 0x36c918
movw %cx, (%rax)
leaq 0x29c781(%rip), %rax    # 0x36c928
movl $0x0, (%rax)
leaq 0x29c358(%rip), %rax    # 0x36c50c
cmpl $0x0, (%rax)
jne 0xd01c6
leaq 0x1a7864(%rip), %rax    # 0x277a24
movl $0x7f1, (%rax)          # imm = 0x7F1
leaq 0x29c33f(%rip), %rax    # 0x36c50c
movl $0x6, (%rax)
callq 0x7a680
movl %eax, %ecx
leaq 0x29c73f(%rip), %rax    # 0x36c920
movl %ecx, (%rax)
leaq 0x29c732(%rip), %rax    # 0x36c91c
movl %ecx, (%rax)
leaq 0x29c731(%rip), %rax    # 0x36c924
movl %ecx, (%rax)
leaq 0x29c30c(%rip), %rax    # 0x36c508
cmpl $0x0, (%rax)
jne 0xd020e
leaq 0x1a781c(%rip), %rax    # 0x277a24
movl $0x7f2, (%rax)          # imm = 0x7F2
leaq 0x29c2f3(%rip), %rax    # 0x36c508
movl $0x6, (%rax)
leaq 0x29c6fa(%rip), %rax    # 0x36c91c
movl (%rax), %eax
movl %eax, %ecx
leaq 0x29c703(%rip), %rax    # 0x36c930
movq %rcx, (%rax)
callq 0x7a680
callq 0x81c10
movl $0x0, -0x4(%rbp)
cmpl $0xc, -0x4(%rbp)
jge 0xd033d
callq 0x7a560
movzwl %ax, %eax
movl %eax, -0x8(%rbp)
callq 0x7a560
movzwl %ax, %eax
movl %eax, -0xc(%rbp)
callq 0x7a560
movzwl %ax, %eax
movl %eax, -0x10(%rbp)
cmpl $0x1, -0xc(%rbp)
jl 0xd032d
cmpl $0x3e7, -0xc(%rbp)      # imm = 0x3E7
jg 0xd032d
cvtsi2ssl -0x10(%rbp), %xmm0
movslq -0xc(%rbp), %rcx
leaq 0x1cdefd(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movss %xmm0, 0x20(%rax)
movslq -0xc(%rbp), %rcx
leaq 0x1cdee3(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movl $0x9, 0x1c(%rax)
movl -0xc(%rbp), %edi
callq 0x12d280
movl %eax, %ecx
leaq 0x29c25d(%rip), %rax    # 0x36c52c
orl (%rax), %ecx
leaq 0x29c254(%rip), %rax    # 0x36c52c
movl %ecx, (%rax)
movl -0x8(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xd0306
movslq -0xc(%rbp), %rcx
leaq 0x1cdea0(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movl $0x1, 0x218(%rax)
jmp 0xd0325
movslq -0xc(%rbp), %rcx
leaq 0x1cde7f(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movl $0xffffffff, 0x218(%rax) # imm = 0xFFFFFFFF
movl -0xc(%rbp), %edi
callq 0x80340
jmp 0xd032f
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xd0241
leaq 0x1cdd94(%rip), %rax    # 0x29e0d8
leaq 0xb26cb(%rip), %rcx     # 0x182a16
movq %rcx, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)