// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gpwav()
void parse_gpwav()
{
int geo_sat;
int i;
int prn;
int el;
int az;
int snr;

   // SBAS sat info - from GPint,wav00
   for(i=120; i<140; i++) {
      sat[i].level_msg = (0);
   }

   if(get_msg_field()) {
      geo_sat = atoi(msg_field);
   }
   else return;

   for(i=0; i<geo_sat; i++) {
      if(get_msg_field()) {
         prn = atoi(msg_field);
      }
      else break;

      if(get_msg_field()) {
         el = atoi(msg_field);
      }
      else break;

      if(get_msg_field()) {
         az = atoi(msg_field);
      } 
      else break;

      if(get_msg_field()) {
         snr = atoi(msg_field);
      }
      else break;

      if((prn >= 1) && (prn <= MAX_PRN)) {
         sat[prn].level_msg = 111;
         set_sat_azel(prn, (float) az, (float) el);
         sat[prn].sig_level = (float) snr;
         have_snr |= rinex_gnss(prn);
         if(snr > 0) sat[prn].tracking = prn;
         else        sat[prn].tracking = (-1);
         have_sat_azel = 2;

         record_sig_levels(prn);
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x78, -0x8(%rbp)
cmpl $0x8c, -0x8(%rbp)
jge 0xb456f
movslq -0x8(%rbp), %rcx
leaq 0x1e9c3d(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movl $0x0, 0x1c(%rax)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0xb453f
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb458a
leaq 0x2e66a0(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0x4(%rbp)
jmp 0xb458f
jmp 0xb470c
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0xb470c
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb45bd
leaq 0x2e666d(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0xc(%rbp)
jmp 0xb45c2
jmp 0xb470c
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb45dd
leaq 0x2e664d(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0x10(%rbp)
jmp 0xb45e2
jmp 0xb470c
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb45fd
leaq 0x2e662d(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0x14(%rbp)
jmp 0xb4602
jmp 0xb470c
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb461d
leaq 0x2e660d(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0x18(%rbp)
jmp 0xb4622
jmp 0xb470c
cmpl $0x1, -0xc(%rbp)
jl 0xb46fc
cmpl $0x3e7, -0xc(%rbp)      # imm = 0x3E7
jg 0xb46fc
movslq -0xc(%rbp), %rcx
leaq 0x1e9b4c(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movl $0x6f, 0x1c(%rax)
movl -0xc(%rbp), %edi
cvtsi2ssl -0x14(%rbp), %xmm0
cvtsi2ssl -0x10(%rbp), %xmm1
callq 0x7d450
cvtsi2ssl -0x18(%rbp), %xmm0
movslq -0xc(%rbp), %rcx
leaq 0x1e9b19(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movss %xmm0, 0x20(%rax)
movl -0xc(%rbp), %edi
callq 0x12d280
movl %eax, %ecx
leaq 0x2b7e95(%rip), %rax    # 0x36c52c
orl (%rax), %ecx
leaq 0x2b7e8c(%rip), %rax    # 0x36c52c
movl %ecx, (%rax)
cmpl $0x0, -0x18(%rbp)
jle 0xb46c8
movl -0xc(%rbp), %ecx
movslq -0xc(%rbp), %rdx
leaq 0x1e9ada(%rip), %rax    # 0x29e190
imulq $0x348, %rdx, %rdx      # imm = 0x348
addq %rdx, %rax
movl %ecx, 0x218(%rax)
jmp 0xb46e7
movslq -0xc(%rbp), %rcx
leaq 0x1e9abd(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movl $0xffffffff, 0x218(%rax) # imm = 0xFFFFFFFF
leaq 0x2b7d86(%rip), %rax    # 0x36c474
movl $0x2, (%rax)
movl -0xc(%rbp), %edi
callq 0x80340
jmp 0xb46fe
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0xb4596
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)