// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_zy_pavg()
void parse_zy_pavg()
{
double val;

   // position averaging
   log_packet_id("position averaging");

   val = 0.0;
   if(get_msg_field()) val = atof(msg_field);
   else return;

   if(get_msg_field()) val += atof(msg_field)/ 60.0;
   else return;

   if(get_msg_field()) {
      if(msg_field[0] == 'N') ;
      else if(msg_field[0] == 'S') val = 0.0 - val;
      else return;
      lat = val * PI / 180.0;
   }
   else return;

   val = 0.0;
   if(get_msg_field()) val = atof(msg_field);
   else return;

   if(get_msg_field()) val += atof(msg_field)/ 60.0;
   else return;

   if(get_msg_field()) {
      if(msg_field[0] == 'E') ;
      else if(msg_field[0] == 'W') val = 0.0 - val;
      else return;
      lon = val * PI / 180.0;
   }
   else return;

   if(get_msg_field()) {
      alt = atof(msg_field);
   }
   else return;

   if(get_msg_field()) {  // averaging count
      val = atoi(msg_field);
      survey_progress = (int) (val / 3600.0 * 100.0);
      have_progress = 8;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0xa2d78(%rip), %rdi     # 0x189447
callq 0x7add0
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe66f9
leaq 0x2b4533(%rip), %rdi    # 0x39ac20
callq 0x9480
movsd %xmm0, -0x8(%rbp)
jmp 0xe66fe
jmp 0xe68dc
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe672c
leaq 0x2b4511(%rip), %rdi    # 0x39ac20
callq 0x9480
movsd 0x888fc(%rip), %xmm1    # 0x16f018
divsd %xmm1, %xmm0
addsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0xe6731
jmp 0xe68dc
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe6797
leaq 0x2b44de(%rip), %rax    # 0x39ac20
movsbl (%rax), %eax
cmpl $0x4e, %eax
jne 0xe674c
jmp 0xe6771
leaq 0x2b44cd(%rip), %rax    # 0x39ac20
movsbl (%rax), %eax
cmpl $0x53, %eax
jne 0xe676a
xorps %xmm0, %xmm0
subsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0xe676f
jmp 0xe68dc
jmp 0xe6771
movsd 0x8ae4f(%rip), %xmm0    # 0x1715c8
mulsd -0x8(%rbp), %xmm0
movsd 0x888f2(%rip), %xmm1    # 0x16f078
divsd %xmm1, %xmm0
leaq 0x285a1f(%rip), %rax    # 0x36c1b0
movsd %xmm0, (%rax)
jmp 0xe679c
jmp 0xe68dc
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe67c1
leaq 0x2b446b(%rip), %rdi    # 0x39ac20
callq 0x9480
movsd %xmm0, -0x8(%rbp)
jmp 0xe67c6
jmp 0xe68dc
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe67f4
leaq 0x2b4449(%rip), %rdi    # 0x39ac20
callq 0x9480
movsd 0x88834(%rip), %xmm1    # 0x16f018
divsd %xmm1, %xmm0
addsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0xe67f9
jmp 0xe68dc
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe685f
leaq 0x2b4416(%rip), %rax    # 0x39ac20
movsbl (%rax), %eax
cmpl $0x45, %eax
jne 0xe6814
jmp 0xe6839
leaq 0x2b4405(%rip), %rax    # 0x39ac20
movsbl (%rax), %eax
cmpl $0x57, %eax
jne 0xe6832
xorps %xmm0, %xmm0
subsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0xe6837
jmp 0xe68dc
jmp 0xe6839
movsd 0x8ad87(%rip), %xmm0    # 0x1715c8
mulsd -0x8(%rbp), %xmm0
movsd 0x8882a(%rip), %xmm1    # 0x16f078
divsd %xmm1, %xmm0
leaq 0x28595f(%rip), %rax    # 0x36c1b8
movsd %xmm0, (%rax)
jmp 0xe6861
jmp 0xe68dc
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe6884
leaq 0x2b43ae(%rip), %rdi    # 0x39ac20
callq 0x9480
leaq 0x285942(%rip), %rax    # 0x36c1c0
movsd %xmm0, (%rax)
jmp 0xe6886
jmp 0xe68dc
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe68dc
leaq 0x2b4389(%rip), %rdi    # 0x39ac20
callq 0x95c0
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
movsd 0x8875e(%rip), %xmm1    # 0x16f010
divsd %xmm1, %xmm0
movsd 0x88792(%rip), %xmm1    # 0x16f050
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
leaq 0x28679f(%rip), %rax    # 0x36d06c
movl %ecx, (%rax)
leaq 0x28679a(%rip), %rax    # 0x36d070
movl $0x8, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)