// File: /workspace/github_cpp_makefile_star2_O3/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 0x9b6c8
cmpl $0x8, %ebx
jne 0x9b6e5
leaq 0x896e8(%rip), %rdi     # 0x124dae
jmp 0x9b6ec
leaq 0x896ca(%rip), %rdi     # 0x124d99
callq 0x58dc2
leaq 0x271b31(%rip), %rax    # 0x30d20c
cmpl $0x0, (%rax)
je 0x9b6f1
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x896d7(%rip), %rdi     # 0x124dc3
callq 0x58dc2
leaq 0x17f92c(%rip), %rax    # 0x21b024
cmpl %ebx, (%rax)
je 0x9b703
movl %ebx, (%rax)
callq 0x4771f
leaq 0x187dda(%rip), %r14    # 0x2234e4
movl $0x0, (%r14)
callq 0x588d2
movzwl %ax, %eax
cvtsi2ss %eax, %xmm0
divss 0x7192b(%rip), %xmm0    # 0x10d050
cvtss2sd %xmm0, %xmm0
leaq 0x187dd0(%rip), %rax    # 0x223500
movsd %xmm0, (%rax)
callq 0x588d2
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x71905(%rip), %xmm0    # 0x10d050
cvtss2sd %xmm0, %xmm0
leaq 0x187d92(%rip), %rax    # 0x2234e8
movsd %xmm0, (%rax)
callq 0x588d2
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x718df(%rip), %xmm0    # 0x10d050
cvtss2sd %xmm0, %xmm0
leaq 0x187d74(%rip), %rax    # 0x2234f0
movsd %xmm0, (%rax)
callq 0x588d2
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x718b9(%rip), %xmm0    # 0x10d050
cvtss2sd %xmm0, %xmm0
leaq 0x187d56(%rip), %rax    # 0x2234f8
movsd %xmm0, (%rax)
callq 0x588d2
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x71893(%rip), %xmm0    # 0x10d050
cvtss2sd %xmm0, %xmm0
leaq 0x187d40(%rip), %rax    # 0x223508
movsd %xmm0, (%rax)
orb $0x1f, (%r14)
callq 0x588d2
callq 0x588d2
callq 0x588d2
callq 0x588d2
callq 0x588d2
callq 0x58964
callq 0x58964
callq 0x58964
testl %ebx, %ebx
jle 0x9b817
leaq 0x1a376d(%rip), %r14    # 0x23ef70
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9b813
orb $0x8, (%r14)
decl %ebx
jne 0x9b803
movl $0xa, %ebx
callq 0x588d2
decl %ebx
jne 0x9b81c
callq 0x588d2
cwtl
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
leaq 0x270f87(%rip), %rax    # 0x30c7c0
movsd %xmm0, (%rax)
leaq 0x2719f0(%rip), %rax    # 0x30d234
movl $0x5, %ecx
movl %ecx, (%rax)
leaq 0x2719f6(%rip), %rax    # 0x30d248
movl %ecx, (%rax)
popq %rbx
popq %r14
popq %rbp
jmp 0x588d2