// File: /workspace/github_cpp_makefile_star2_O2/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 0xa18b8(%rip), %rdi     # 0x10bca0
callq 0x520bf
callq 0x51c47
movzbl %al, %eax
xorl %ebx, %ebx
cmpl %eax, 0xea18b(%rip)     # 0x154588
je 0x6a407
movl %eax, 0xea183(%rip)     # 0x154588
movl %eax, %ebx
callq 0x51dc3
movl %ebx, %eax
imulq $0x348, %rax, %r12      # imm = 0x348
leaq 0x1beb94(%rip), %r14    # 0x228fb0
movss %xmm0, 0x4(%r14,%r12)
callq 0x51dc3
movsd 0x28(%r14,%r12), %xmm0
movsd %xmm0, 0x48(%r14,%r12)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x28(%r14,%r12)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x30(%r14,%r12)
callq 0x51e6f
movsd %xmm0, 0x10(%r14,%r12)
xorl %edi, %edi
callq 0x52194
movsd 0x30(%r14,%r12), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x6a47c
jnp 0x6a4a0
leaq 0x28cebd(%rip), %r15    # 0x2f7340
cmpl $0x0, (%r15)
jne 0x6a496
leaq 0x1983b4(%rip), %rax    # 0x202844
movl $0x7d2, (%rax)          # imm = 0x7D2
movl %ebx, %edi
callq 0xca4da
orl %eax, (%r15)
leaq 0x19aed1(%rip), %r15    # 0x205378
movl (%r15), %ecx
testl %ecx, %ecx
je 0x6a567
addq %r12, %r14
cmpl $0x0, 0x244(%r14)
je 0x6a554
cmpb $0x0, 0x202(%r14)
je 0x6a554
movsd 0x10(%r14), %xmm0
movsd 0x9dde1(%rip), %xmm1    # 0x1082c0
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
cltd
idivl %ecx
testl %edx, %edx
je 0x6a4fa
leaq 0x19840f(%rip), %rax    # 0x202904
cmpb $0x1, (%rax)
jne 0x6a554
leaq 0x19af5f(%rip), %rax    # 0x205460
addsd (%rax), %xmm0
leaq 0x28d06c(%rip), %rax    # 0x2f7578
movsd %xmm0, (%rax)
leaq 0x28d221(%rip), %rax    # 0x2f7738
movzwl (%rax), %eax
cvtsi2sd %eax, %xmm1
mulsd 0x8b45a(%rip), %xmm1    # 0xf5980
addsd 0x8b3e2(%rip), %xmm1    # 0xf5910
movsd %xmm1, -0x28(%rbp)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0xc2faf
addsd -0x28(%rbp), %xmm0
leaq 0x28d026(%rip), %rax    # 0x2f7570
movsd %xmm0, (%rax)
cmpl $0x0, (%r15)
je 0x6a567
movl %ebx, %edi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x69ba7
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq