// File: /workspace/github_cpp_makefile_star2_O2/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 $0x6, %edi
je 0x8cd92
cmpl $0x8, %ebx
jne 0x8cdaf
leaq 0x81f66(%rip), %rdi     # 0x10ecf6
jmp 0x8cdb6
leaq 0x81f48(%rip), %rdi     # 0x10ece1
callq 0x520bf
leaq 0x26a467(%rip), %rax    # 0x2f720c
cmpl $0x0, (%rax)
je 0x8cdbb
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x81f55(%rip), %rdi     # 0x10ed0b
callq 0x520bf
leaq 0x178262(%rip), %rax    # 0x205024
cmpl %ebx, (%rax)
je 0x8cdcd
movl %ebx, (%rax)
callq 0x43898
leaq 0x180710(%rip), %r14    # 0x20d4e4
andl $0x0, (%r14)
callq 0x51c63
movzwl %ax, %eax
cvtsi2ss %eax, %xmm0
divss 0x6a2e4(%rip), %xmm0    # 0xf70d0
cvtss2sd %xmm0, %xmm0
leaq 0x180709(%rip), %rax    # 0x20d500
movsd %xmm0, (%rax)
callq 0x51c63
movzwl %ax, %eax
cvtsi2ss %eax, %xmm0
divss 0x6a2c1(%rip), %xmm0    # 0xf70d0
cvtss2sd %xmm0, %xmm0
leaq 0x1806ce(%rip), %rax    # 0x20d4e8
movsd %xmm0, (%rax)
callq 0x51c63
movzwl %ax, %eax
cvtsi2ss %eax, %xmm0
divss 0x6a29e(%rip), %xmm0    # 0xf70d0
cvtss2sd %xmm0, %xmm0
leaq 0x1806b3(%rip), %rax    # 0x20d4f0
movsd %xmm0, (%rax)
callq 0x51c63
movzwl %ax, %eax
cvtsi2ss %eax, %xmm0
divss 0x6a27b(%rip), %xmm0    # 0xf70d0
cvtss2sd %xmm0, %xmm0
leaq 0x180698(%rip), %rax    # 0x20d4f8
movsd %xmm0, (%rax)
callq 0x51c63
movzwl %ax, %eax
cvtsi2ss %eax, %xmm0
divss 0x6a258(%rip), %xmm0    # 0xf70d0
cvtss2sd %xmm0, %xmm0
leaq 0x180685(%rip), %rax    # 0x20d508
movsd %xmm0, (%rax)
orb $0x1f, (%r14)
callq 0x51c63
callq 0x51c63
callq 0x51c63
callq 0x51c63
callq 0x51c63
callq 0x51cf3
callq 0x51cf3
callq 0x51cf3
xorl %r14d, %r14d
testl %ebx, %ebx
cmovgl %ebx, %r14d
subl $0x1, %r14d
jb 0x8cec9
callq 0x51c47
jmp 0x8cebc
pushq $0xb
popq %rbx
callq 0x51c63
decl %ebx
jne 0x8cecc
cwtl
cvtsi2sd %eax, %xmm0
leaq 0x2698df(%rip), %rax    # 0x2f67c0
movsd %xmm0, (%rax)
leaq 0x26a348(%rip), %rax    # 0x2f7234
pushq $0x5
popq %rcx
movl %ecx, (%rax)
leaq 0x26a350(%rip), %rax    # 0x2f7248
movl %ecx, (%rax)
popq %rbx
popq %r14
popq %rbp
jmp 0x51c63