// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_raw_data()
void get_raw_data()
{
int prn;
double obs_time;
float dop;
float sig_level;
static int last_prn = (-1);

   log_packet_id("Packet 0x5A (Raw measurement data)");

   prn = tsip_byte();
   if(prn < 1) prn = 0;
   else if(prn > MAX_PRN) prn = 0;  // !!!! max_sat_check - put any bogus data in unused entry in array
   if(prn == last_prn) prn = 0;  // filter duplicate message  ACU_GG - rnx
   else last_prn = prn;

   sat[prn].sample_len = tsip_single();
   if(1 || (log_db == 0)) {
      sig_level = tsip_single();
      if(0 && SV6_FAMILY) {
         if(amu_mode == 0) {
            sat[prn].sig_level = amu_to_dbc(sat[prn].sig_level);
            sat[prn].level_msg = 0x5A;
            have_snr |= rinex_gnss(prn);
         }
      }
   }
   else tsip_single();

   sat[prn].last_cp = sat[prn].code_phase;
   sat[prn].code_phase = tsip_single();
   dop = tsip_single();
   sat[prn].doppler = dop;
   sat[prn].raw_time = tsip_double();    // gps time-of-week
   check_tsip_end(1);

if(0 && debug_file) fprintf(debug_file, "prn:%02d  time:%.7f\n", prn,sat[prn].raw_time);  //rnx3


   if(sat[prn].doppler != 0.0F) {
      if(have_doppler == 0) need_redraw = 2002;
      have_doppler |= rinex_gnss(prn);
   }

   if(raw_msg_rate && sat[prn].eph_valid && sat[prn].eph_flag) { // raw Hz !!!!
      obs_time = sat[prn].raw_time;
      if((((int) (obs_time + 0.005) % raw_msg_rate) == 0) || (res_t == RES_T)) {  // round up is for ACU_360  rnx
         obs_tow = (obs_time + rollover);
         jd_obs = GPS_EPOCH + ((double) gps_week * 7.0) + jtime(0,0,0,obs_time+rollover);
      }
   }

   if(0 && (sat[prn].code_phase != 0.0F)) {  //rnx
      if(have_phase == 0) need_redraw = 2003;
      have_phase |= rinex_gnss(prn);
   }
   if(raw_msg_rate) {
      calc_sat_posn(prn);  // calculate pesduorange from ephemeris data
   }

   if(tsip_error) return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
leaq 0xad879(%rip), %rdi     # 0x121c78
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x7441a
leaq 0x1cab59(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
xorl %ebx, %ebx
cmpl 0xf6163(%rip), %eax     # 0x16a588
je 0x7442f
movl %eax, 0xf615b(%rip)     # 0x16a588
movl %eax, %ebx
callq 0x58aae
movl %ebx, %eax
imulq $0x348, %rax, %r12      # imm = 0x348
leaq 0x1cab6c(%rip), %r14    # 0x23efb0
movss %xmm0, 0x4(%r14,%r12)
callq 0x58aae
movsd 0x28(%r14,%r12), %xmm0
movsd %xmm0, 0x48(%r14,%r12)
callq 0x58aae
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x28(%r14,%r12)
callq 0x58aae
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x30(%r14,%r12)
callq 0x58b86
movsd %xmm0, 0x10(%r14,%r12)
xorl %edi, %edi
callq 0x58f50
movsd 0x30(%r14,%r12), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x744a4
jnp 0x744c8
leaq 0x298e95(%rip), %r15    # 0x30d340
cmpl $0x0, (%r15)
jne 0x744be
leaq 0x1a438c(%rip), %rax    # 0x218844
movl $0x7d2, (%rax)          # imm = 0x7D2
movl %ebx, %edi
callq 0xdbb74
orl %eax, (%r15)
leaq 0x1a6ea9(%rip), %r15    # 0x21b378
movl (%r15), %ecx
testl %ecx, %ecx
je 0x74579
addq %r12, %r14
cmpl $0x0, 0x244(%r14)
je 0x74579
cmpb $0x0, 0x202(%r14)
je 0x74579
movsd 0x10(%r14), %xmm0
movsd 0xa9c99(%rip), %xmm1    # 0x11e1a0
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
cltd
idivl %ecx
testl %edx, %edx
je 0x74522
leaq 0x1a43e7(%rip), %rax    # 0x218904
cmpb $0x1, (%rax)
jne 0x74579
leaq 0x1a6f37(%rip), %rax    # 0x21b460
addsd (%rax), %xmm0
leaq 0x299044(%rip), %rax    # 0x30d578
movsd %xmm0, (%rax)
leaq 0x2991f9(%rip), %rax    # 0x30d738
movzwl (%rax), %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
mulsd 0x973af(%rip), %xmm1    # 0x10b900
addsd 0x9732f(%rip), %xmm1    # 0x10b888
movsd %xmm1, -0x28(%rbp)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd41e0
addsd -0x28(%rbp), %xmm0
leaq 0x298ffb(%rip), %rax    # 0x30d570
movsd %xmm0, (%rax)
cmpl $0x0, (%r15)
je 0x74592
movl %ebx, %edi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x73a11
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq