// File: /workspace/github_cpp_makefile_star2_O3/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 0xadb32(%rip), %rdi     # 0x121d58
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x74241
leaq 0x1cad32(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
xorl %ebx, %ebx
cmpl 0xf633c(%rip), %eax     # 0x16a588
je 0x74256
movl %eax, 0xf6334(%rip)     # 0x16a588
movl %eax, %ebx
callq 0x58a30
movl %ebx, %eax
imulq $0x348, %rax, %r12      # imm = 0x348
leaq 0x1cad45(%rip), %r14    # 0x23efb0
movss %xmm0, 0x4(%r14,%r12)
callq 0x58a30
movsd 0x28(%r14,%r12), %xmm0
movsd %xmm0, 0x48(%r14,%r12)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x28(%r14,%r12)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x30(%r14,%r12)
callq 0x58b08
movsd %xmm0, 0x10(%r14,%r12)
xorl %edi, %edi
callq 0x58e9b
movsd 0x30(%r14,%r12), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x742cb
jnp 0x742ef
leaq 0x29906e(%rip), %r15    # 0x30d340
cmpl $0x0, (%r15)
jne 0x742e5
leaq 0x1a4565(%rip), %rax    # 0x218844
movl $0x7d2, (%rax)          # imm = 0x7D2
movl %ebx, %edi
callq 0xdc1dd
orl %eax, (%r15)
leaq 0x1a7082(%rip), %r15    # 0x21b378
movl (%r15), %ecx
testl %ecx, %ecx
je 0x743b9
addq %r12, %r14
cmpl $0x0, 0x244(%r14)
je 0x743a6
cmpb $0x0, 0x202(%r14)
je 0x743a6
movsd 0x10(%r14), %xmm0
movsd 0xa9f1a(%rip), %xmm1    # 0x11e248
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
cltd
idivl %ecx
testl %edx, %edx
je 0x74349
leaq 0x1a45c0(%rip), %rax    # 0x218904
cmpb $0x1, (%rax)
jne 0x743a6
leaq 0x1a7110(%rip), %rax    # 0x21b460
addsd (%rax), %xmm0
leaq 0x29921d(%rip), %rax    # 0x30d578
movsd %xmm0, (%rax)
leaq 0x2993d2(%rip), %rax    # 0x30d738
movzwl (%rax), %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
mulsd 0x97590(%rip), %xmm1    # 0x10b908
addsd 0x97518(%rip), %xmm1    # 0x10b898
movsd %xmm1, -0x28(%rbp)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd492e
addsd -0x28(%rbp), %xmm0
leaq 0x2991d4(%rip), %rax    # 0x30d570
movsd %xmm0, (%rax)
cmpl $0x0, (%r15)
je 0x743b9
movl %ebx, %edi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x73848
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq