// File: /workspace/github_cpp_makefile_star2_O3/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 0x88964(%rip), %rdi     # 0x124e6f
callq 0x58dc2
leaq 0x17eb0d(%rip), %rax    # 0x21b024
cmpl $0xc, (%rax)
je 0x9c527
movl $0xc, (%rax)
callq 0x4771f
leaq 0x270cee(%rip), %rax    # 0x30d21c
movl $0x1, (%rax)
xorl %edi, %edi
callq 0x9a242
callq 0x588d2
leaq 0x2711f1(%rip), %rbx    # 0x30d738
movw %ax, (%rbx)
leaq 0x2711f7(%rip), %rax    # 0x30d748
movl $0x0, (%rax)
leaq 0x270dce(%rip), %rax    # 0x30d32c
cmpl $0x0, (%rax)
jne 0x9c570
leaq 0x17c2da(%rip), %rcx    # 0x218844
movl $0x800, (%rcx)          # imm = 0x800
movl $0x8, (%rax)
callq 0x58964
leaq 0x2711be(%rip), %rcx    # 0x30d740
movl %eax, (%rcx)
leaq 0x2711b1(%rip), %rcx    # 0x30d73c
movl %eax, (%rcx)
leaq 0x2711b0(%rip), %rcx    # 0x30d744
movl %eax, (%rcx)
leaq 0x270d8b(%rip), %rcx    # 0x30d328
cmpl $0x0, (%rcx)
jne 0x9c5af
leaq 0x17c29b(%rip), %rdx    # 0x218844
movl $0x801, (%rdx)          # imm = 0x801
movl $0x8, (%rcx)
movl %eax, %eax
leaq 0x271192(%rip), %rcx    # 0x30d750
movq %rax, (%rcx)
cvtsi2sd %rax, %xmm0
leaq 0x270fab(%rip), %rax    # 0x30d578
movsd %xmm0, (%rax)
movzwl (%rbx), %eax
cvtsi2sd %eax, %xmm1
mulsd 0x6f328(%rip), %xmm1    # 0x10b908
addsd 0x6f2b0(%rip), %xmm1    # 0x10b898
movsd %xmm1, -0x30(%rbp)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd492e
addsd -0x30(%rbp), %xmm0
leaq 0x270f6c(%rip), %rax    # 0x30d570
movsd %xmm0, (%rax)
callq 0x9a1a9
callq 0x588d2
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
leaq 0x2709fd(%rip), %rax    # 0x30d020
movsd %xmm0, (%rax)
callq 0x588d2
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
leaq 0x2709eb(%rip), %rax    # 0x30d028
movsd %xmm0, (%rax)
callq 0x588d2
movzwl %ax, %edi
callq 0x9a4a0
callq 0x588d2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9c669
leaq 0x1a290a(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9c67f
leaq 0x1a28f4(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588d2
leaq 0x270cad(%rip), %rax    # 0x30d338
movl $0x3, %ecx
movl %ecx, (%rax)
leaq 0x270c9b(%rip), %rax    # 0x30d334
movl %ecx, (%rax)
movl $0xc, %r15d
leaq 0x1a2908(%rip), %r12    # 0x23efb0
leaq 0x1a28c1(%rip), %r13    # 0x23ef70
callq 0x587be
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0x9c6c2
orb $0x8, (%r13)
callq 0x587be
movl %eax, %r14d
cmpl $0x100, %eax            # imm = 0x100
jb 0x9c6d6
orb $0x8, (%r13)
movzbl %bl, %ebx
callq 0x58964
movl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x6c970(%rip), %xmm0    # 0x109060
movsd %xmm0, -0x30(%rbp)
callq 0x58964
testl %ebx, %ebx
je 0x9c744
movl %ebx, %eax
imulq $0x348, %rax, %rax      # imm = 0x348
movb %r14b, 0x1f1(%r12,%rax)
leaq 0x270b0a(%rip), %rcx    # 0x30d220
cmpl $0x0, (%rcx)
jne 0x9c744
addq %r12, %rax
movsd -0x30(%rbp), %xmm0
movsd %xmm0, 0x38(%rax)
ucomisd 0x6c9e8(%rip), %xmm0    # 0x109118
jne 0x9c734
jnp 0x9c744
movl %ebx, %edi
callq 0xdc1dd
leaq 0x270c06(%rip), %rcx    # 0x30d348
orl %eax, (%rcx)
decl %r15d
jne 0x9c6af
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9a5a9