// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_Hr()
void parse_moto_Hr()
{
int i;
int prn;
u08 iode;
double pr;

   log_packet_id("inverse differential");
   if(moto_chans != 12) {
      moto_chans = 12;
      config_msg_ofs();
   }
   have_moto_Hr = 1;

   get_moto_time(0);                  

   gps_week = tsip_word();  // these are what we really want from this message         
   faked_tow = 0;
   if(have_week == 0) need_redraw = 2048;
   have_week = 8;
   pri_tow = tow = this_tow = tsip_dword();               
   if(have_tow == 0) need_redraw = 2049;
   have_tow = 8;
   survey_tow = tow;

   obs_tow = (double) tow;
   jd_obs = GPS_EPOCH + ((double) gps_week * 7.0) + jtime(0,0,0,tow);

   get_moto_lla();    // lat/lon/alt               
   speed = tsip_word();   // speed          
   heading = tsip_word(); // heading        
   get_moto_status();                
   tsip_word();       // dop            
   tsip_byte();       // dop type       

   tsip_byte();       // vis count      
   tsip_word();       // fix vector     

   have_speed = 3;
   have_heading = 3;
                                     
   for(i=0; i<12; i++) {
      prn = tsip_byte();    // prn
      iode = tsip_byte();   // iode
      pr = (double) (unsigned) tsip_dword();   // pseudorange in cm
      pr /= 100.0;    // meters
      tsip_dword();   // range rate

      if((prn >= 1) && (prn <= MAX_PRN)) { 
         sat[prn].iode = (u08) iode;
         if(have_moto_range == 0) {  // use the @@Bg/@@Eg message
            sat[prn].range = pr;
            if(pr) {
               have_range |= rinex_gnss(prn);
            }
         }
      }
   }
                                     
   get_moto_tag();    // id tag         
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x8158f(%rip), %rdi     # 0x10edb7
callq 0x520bf
leaq 0x1777f0(%rip), %rax    # 0x205024
cmpl $0xc, (%rax)
je 0x8d844
movl $0xc, (%rax)
callq 0x43898
leaq 0x2699d1(%rip), %rax    # 0x2f721c
movl $0x1, (%rax)
xorl %edi, %edi
callq 0x8bdf5
callq 0x51c63
leaq 0x269ed4(%rip), %rbx    # 0x2f7738
leaq 0x269edd(%rip), %rcx    # 0x2f7748
andl $0x0, (%rcx)
movw %ax, (%rbx)
leaq 0x269ab4(%rip), %rax    # 0x2f732c
cmpl $0x0, (%rax)
jne 0x8d88a
leaq 0x174fc0(%rip), %rcx    # 0x202844
movl $0x800, (%rcx)          # imm = 0x800
movl $0x8, (%rax)
callq 0x51cf3
leaq 0x269ea4(%rip), %rcx    # 0x2f7740
movl %eax, (%rcx)
leaq 0x269e97(%rip), %rcx    # 0x2f773c
movl %eax, (%rcx)
leaq 0x269e96(%rip), %rcx    # 0x2f7744
movl %eax, (%rcx)
leaq 0x269a71(%rip), %rcx    # 0x2f7328
cmpl $0x0, (%rcx)
jne 0x8d8c9
leaq 0x174f81(%rip), %rdx    # 0x202844
movl $0x801, (%rdx)          # imm = 0x801
movl $0x8, (%rcx)
movl %eax, %eax
leaq 0x269e78(%rip), %rcx    # 0x2f7750
movq %rax, (%rcx)
cvtsi2sd %rax, %xmm0
leaq 0x269c91(%rip), %rax    # 0x2f7578
movsd %xmm0, (%rax)
movzwl (%rbx), %eax
cvtsi2sd %eax, %xmm1
mulsd 0x68086(%rip), %xmm1    # 0xf5980
addsd 0x6800e(%rip), %xmm1    # 0xf5910
movsd %xmm1, -0x30(%rbp)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0xc2faf
addsd -0x30(%rbp), %xmm0
leaq 0x269c52(%rip), %rax    # 0x2f7570
movsd %xmm0, (%rax)
callq 0x8bd62
callq 0x51c63
movzwl %ax, %eax
cvtsi2sd %eax, %xmm0
leaq 0x2696e6(%rip), %rax    # 0x2f7020
movsd %xmm0, (%rax)
callq 0x51c63
movzwl %ax, %eax
cvtsi2sd %eax, %xmm0
leaq 0x2696d7(%rip), %rax    # 0x2f7028
movsd %xmm0, (%rax)
callq 0x8c064
callq 0x51c63
callq 0x51c47
callq 0x51c47
callq 0x51c63
leaq 0x2699c3(%rip), %rax    # 0x2f7338
pushq $0x3
popq %rcx
movl %ecx, (%rax)
leaq 0x2699b3(%rip), %rax    # 0x2f7334
movl %ecx, (%rax)
pushq $0xc
popq %r15
leaq 0x19b622(%rip), %r12    # 0x228fb0
leaq 0x26988b(%rip), %r13    # 0x2f7220
subl $0x1, %r15d
jb 0x8da12
callq 0x51c47
movl %eax, %r14d
callq 0x51c47
movl %eax, %ebx
callq 0x51cf3
movl %eax, %eax
cvtsi2sd %rax, %xmm0
divsd 0x656a2(%rip), %xmm0    # 0xf3060
movsd %xmm0, -0x30(%rbp)
callq 0x51cf3
testb %r14b, %r14b
je 0x8d995
movzbl %r14b, %edi
movl %edi, %eax
imulq $0x348, %rax, %rax      # imm = 0x348
movb %bl, 0x1f1(%r12,%rax)
cmpl $0x0, (%r13)
jne 0x8d995
addq %r12, %rax
movsd -0x30(%rbp), %xmm0
movsd %xmm0, 0x38(%rax)
ucomisd 0x6571a(%rip), %xmm0    # 0xf3118
jne 0x8da02
jnp 0x8d995
callq 0xca4da
leaq 0x26993a(%rip), %rcx    # 0x2f7348
orl %eax, (%rcx)
jmp 0x8d995
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8c082