// File: /workspace/github_cpp_makefile_star2_O1/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 0x88a59(%rip), %rdi     # 0x124d8f
callq 0x58e77
leaq 0x17ece2(%rip), %rax    # 0x21b024
cmpl $0xc, (%rax)
je 0x9c352
movl $0xc, (%rax)
callq 0x47650
leaq 0x270ec3(%rip), %rax    # 0x30d21c
movl $0x1, (%rax)
xorl %edi, %edi
callq 0x9a094
callq 0x588f0
leaq 0x2713c6(%rip), %rbx    # 0x30d738
movw %ax, (%rbx)
leaq 0x2713cc(%rip), %rax    # 0x30d748
movl $0x0, (%rax)
leaq 0x270fa3(%rip), %rax    # 0x30d32c
cmpl $0x0, (%rax)
jne 0x9c39b
leaq 0x17c4af(%rip), %rcx    # 0x218844
movl $0x800, (%rcx)          # imm = 0x800
movl $0x8, (%rax)
callq 0x589b0
leaq 0x271393(%rip), %rcx    # 0x30d740
movl %eax, (%rcx)
leaq 0x271386(%rip), %rcx    # 0x30d73c
movl %eax, (%rcx)
leaq 0x271385(%rip), %rcx    # 0x30d744
movl %eax, (%rcx)
leaq 0x270f60(%rip), %rcx    # 0x30d328
cmpl $0x0, (%rcx)
jne 0x9c3da
leaq 0x17c470(%rip), %rdx    # 0x218844
movl $0x801, (%rdx)          # imm = 0x801
movl $0x8, (%rcx)
movl %eax, %eax
leaq 0x271367(%rip), %rcx    # 0x30d750
movq %rax, (%rcx)
cvtsi2sd %rax, %xmm0
leaq 0x271180(%rip), %rax    # 0x30d578
movsd %xmm0, (%rax)
movzwl (%rbx), %eax
cvtsi2sd %eax, %xmm1
mulsd 0x6f4f5(%rip), %xmm1    # 0x10b900
addsd 0x6f475(%rip), %xmm1    # 0x10b888
movsd %xmm1, -0x30(%rbp)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd41e0
addsd -0x30(%rbp), %xmm0
leaq 0x271141(%rip), %rax    # 0x30d570
movsd %xmm0, (%rax)
callq 0x99ffb
callq 0x588f0
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
leaq 0x270bd2(%rip), %rax    # 0x30d020
movsd %xmm0, (%rax)
callq 0x588f0
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
leaq 0x270bc0(%rip), %rax    # 0x30d028
movsd %xmm0, (%rax)
callq 0x588f0
movzwl %ax, %edi
callq 0x9a2f2
callq 0x588f0
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9c494
leaq 0x1a2adf(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9c4aa
leaq 0x1a2ac9(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588f0
leaq 0x270e82(%rip), %rax    # 0x30d338
movl $0x3, %ecx
movl %ecx, (%rax)
leaq 0x270e70(%rip), %rax    # 0x30d334
movl %ecx, (%rax)
movl $0xc, %r15d
leaq 0x1a2add(%rip), %r12    # 0x23efb0
leaq 0x1a2a96(%rip), %r13    # 0x23ef70
callq 0x587d1
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0x9c4ed
orb $0x8, (%r13)
callq 0x587d1
movl %eax, %r14d
cmpl $0x100, %eax            # imm = 0x100
jb 0x9c501
orb $0x8, (%r13)
callq 0x589b0
movl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x6cb48(%rip), %xmm0    # 0x109060
movsd %xmm0, -0x30(%rbp)
callq 0x589b0
testb %bl, %bl
je 0x9c56e
movzbl %bl, %eax
imulq $0x348, %rax, %rax      # imm = 0x348
movb %r14b, 0x1f1(%r12,%rax)
leaq 0x270ce1(%rip), %rcx    # 0x30d220
cmpl $0x0, (%rcx)
jne 0x9c56e
addq %r12, %rax
movsd -0x30(%rbp), %xmm0
movsd %xmm0, 0x38(%rax)
ucomisd 0x6cbbf(%rip), %xmm0    # 0x109118
jne 0x9c55d
jnp 0x9c56e
movzbl %bl, %edi
callq 0xdbb74
leaq 0x270ddc(%rip), %rcx    # 0x30d348
orl %eax, (%rcx)
decl %r15d
jne 0x9c4da
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9a400