// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_Ek(int)
void parse_moto_Ek(int num_chans)
{
u16 dop;
int i;
int bias;
int osc;

   if(num_chans == 6)      log_packet_id("6-chan position info");
   else if(num_chans == 8) log_packet_id("8-chan position info");
   else                    log_packet_id("unkn-chans position info");

   if((num_chans == 6) && have_moto_Ek) return;

   if(num_chans != moto_chans) {
      moto_chans = num_chans;
      config_msg_ofs();
   }

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

   tsip_word();  // mag variation
   tsip_word();  // north velocity
   tsip_word();  // east velocity
   tsip_word();  // up velocity

   tsip_word();  // differential age
   tsip_dword(); // ecef coords
   tsip_dword();
   tsip_dword();   

   for(i=0; i<num_chans; i++) {
      tsip_byte();  // r
   }

   for(i=0; i<10; i++) {
      tsip_word();  // a1 elements
   }

   bias = (int) (s16) tsip_word();  // clock bias
   osc_offset = bias;  // !!!! zzzzz
   have_osc_offset = 5;
   have_rcvr_osc = 5;
//adadad   if(jitter_adev == 0) do_osc_adev(osc_offset);
   osc = tsip_word();  // osc offset
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
cmpl $0x8, %edi
leaq 0x897e4(%rip), %rax     # 0x124cce
leaq 0x897f2(%rip), %rcx     # 0x124ce3
cmoveq %rax, %rcx
cmpl $0x6, %edi
leaq 0x897ba(%rip), %rdi     # 0x124cb9
cmovneq %rcx, %rdi
callq 0x58e77
cmpl $0x6, %ebx
jne 0x9b51e
leaq 0x271cf8(%rip), %rax    # 0x30d20c
cmpl $0x0, (%rax)
je 0x9b51e
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x17faff(%rip), %rax    # 0x21b024
cmpl %ebx, (%rax)
je 0x9b530
movl %ebx, (%rax)
callq 0x47650
leaq 0x187fad(%rip), %r14    # 0x2234e4
movl $0x0, (%r14)
callq 0x588f0
movzwl %ax, %eax
cvtsi2ss %eax, %xmm0
divss 0x71a8e(%rip), %xmm0    # 0x10cfe0
cvtss2sd %xmm0, %xmm0
leaq 0x187fa3(%rip), %rax    # 0x223500
movsd %xmm0, (%rax)
callq 0x588f0
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x71a68(%rip), %xmm0    # 0x10cfe0
cvtss2sd %xmm0, %xmm0
leaq 0x187f65(%rip), %rax    # 0x2234e8
movsd %xmm0, (%rax)
callq 0x588f0
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x71a42(%rip), %xmm0    # 0x10cfe0
cvtss2sd %xmm0, %xmm0
leaq 0x187f47(%rip), %rax    # 0x2234f0
movsd %xmm0, (%rax)
callq 0x588f0
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x71a1c(%rip), %xmm0    # 0x10cfe0
cvtss2sd %xmm0, %xmm0
leaq 0x187f29(%rip), %rax    # 0x2234f8
movsd %xmm0, (%rax)
callq 0x588f0
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x719f6(%rip), %xmm0    # 0x10cfe0
cvtss2sd %xmm0, %xmm0
leaq 0x187f13(%rip), %rax    # 0x223508
movsd %xmm0, (%rax)
orb $0x1f, (%r14)
callq 0x588f0
callq 0x588f0
callq 0x588f0
callq 0x588f0
callq 0x588f0
callq 0x589b0
callq 0x589b0
callq 0x589b0
testl %ebx, %ebx
jle 0x9b644
leaq 0x1a3940(%rip), %r14    # 0x23ef70
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9b640
orb $0x8, (%r14)
decl %ebx
jne 0x9b630
movl $0xa, %ebx
callq 0x588f0
decl %ebx
jne 0x9b649
callq 0x588f0
cwtl
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
leaq 0x27115a(%rip), %rax    # 0x30c7c0
movsd %xmm0, (%rax)
leaq 0x271bc3(%rip), %rax    # 0x30d234
movl $0x5, %ecx
movl %ecx, (%rax)
leaq 0x271bc9(%rip), %rax    # 0x30d248
movl %ecx, (%rax)
popq %rbx
popq %r14
popq %rbp
jmp 0x588f0