// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_zod_vis()
void parse_zod_vis()
{
int i;
int prn;
double a, e;

   log_packet_id("sat visibility");

   get_zod_seq(0);

   gdop = ((float) tsip_word()) / 100.0F;
   pdop = ((float) tsip_word()) / 100.0F;
   hdop = ((float) tsip_word()) / 100.0F;
   vdop = ((float) tsip_word()) / 100.0F;
   tdop = ((float) tsip_word()) / 100.0F;
   have_dops = (GDOP | PDOP | HDOP | VDOP | TDOP);

   i = tsip_word();
   sat_count = i;
   have_count = 4;
   config_sat_count(i);

   if(i > 12) i = 12;
   else if(i < 0) i = 0;
   while(i--) {
      prn = tsip_word();
      a = (((double) (s16) tsip_word()) * 1.0E-4 * 180.0 / PI);
      if(a < 0.0) a += 360.0;
      e = (((double) (s16) tsip_word()) * 1.0E-4 * 180.0 / PI);

      if((prn >= 1) && (prn <= MAX_PRN)) { 
         set_sat_azel(prn, (float) a, (float) e);
         have_sat_azel = 6;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0xb7ac8(%rip), %rdi     # 0x187e37
callq 0x7add0
xorl %edi, %edi
callq 0xd0040
callq 0x7a560
movzwl %ax, %eax
cvtsi2ss %eax, %xmm0
movss 0xb2f95(%rip), %xmm1    # 0x183324
movss %xmm1, -0x1c(%rbp)
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1b233d(%rip), %rax    # 0x2826e0
movsd %xmm0, (%rax)
callq 0x7a560
movss -0x1c(%rbp), %xmm1
movzwl %ax, %eax
cvtsi2ss %eax, %xmm0
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1b2301(%rip), %rax    # 0x2826c8
movsd %xmm0, (%rax)
callq 0x7a560
movss -0x1c(%rbp), %xmm1
movzwl %ax, %eax
cvtsi2ss %eax, %xmm0
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1b22e5(%rip), %rax    # 0x2826d0
movsd %xmm0, (%rax)
callq 0x7a560
movss -0x1c(%rbp), %xmm1
movzwl %ax, %eax
cvtsi2ss %eax, %xmm0
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1b22c9(%rip), %rax    # 0x2826d8
movsd %xmm0, (%rax)
callq 0x7a560
movzwl %ax, %eax
cvtsi2ss %eax, %xmm0
movss 0xb2efd(%rip), %xmm1    # 0x183324
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1b22b2(%rip), %rax    # 0x2826e8
movsd %xmm0, (%rax)
leaq 0x1b2283(%rip), %rax    # 0x2826c4
movl $0x1f, (%rax)
callq 0x7a560
movzwl %ax, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %ecx
leaq 0x1cdc90(%rip), %rax    # 0x29e0ec
movl %ecx, (%rax)
leaq 0x29c093(%rip), %rax    # 0x36c4f8
movl $0x4, (%rax)
movl -0x4(%rbp), %edi
callq 0x82080
cmpl $0xc, -0x4(%rbp)
jle 0xd0482
movl $0xc, -0x4(%rbp)
jmp 0xd0491
cmpl $0x0, -0x4(%rbp)
jge 0xd048f
movl $0x0, -0x4(%rbp)
jmp 0xd0491
jmp 0xd0493
movl -0x4(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x4(%rbp)
cmpl $0x0, %eax
je 0xd056f
callq 0x7a560
movzwl %ax, %eax
movl %eax, -0x8(%rbp)
callq 0x7a560
cwtl
cvtsi2sd %eax, %xmm0
movsd 0xb2b9c(%rip), %xmm1    # 0x183060
mulsd %xmm1, %xmm0
movsd 0x9eba8(%rip), %xmm1    # 0x16f078
mulsd %xmm1, %xmm0
movsd 0xa10ec(%rip), %xmm1    # 0x1715c8
divsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x10(%rbp), %xmm0
jbe 0xd0501
movsd 0xb2639(%rip), %xmm0    # 0x182b30
addsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
callq 0x7a560
cwtl
cvtsi2sd %eax, %xmm0
movsd 0xb2b4d(%rip), %xmm1    # 0x183060
mulsd %xmm1, %xmm0
movsd 0x9eb59(%rip), %xmm1    # 0x16f078
mulsd %xmm1, %xmm0
movsd 0xa109d(%rip), %xmm1    # 0x1715c8
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
cmpl $0x1, -0x8(%rbp)
jl 0xd056a
cmpl $0x3e7, -0x8(%rbp)      # imm = 0x3E7
jg 0xd056a
movl -0x8(%rbp), %edi
movsd -0x10(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movsd -0x18(%rbp), %xmm1
cvtsd2ss %xmm1, %xmm1
callq 0x7d450
leaq 0x29bf10(%rip), %rax    # 0x36c474
movl $0x6, (%rax)
jmp 0xd0493
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)