// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: rt17_concise(int)
void rt17_concise(int rif)
{
int prn;
int flags1, flags2;
int az, el;
double snr;
double l2_snr;
double prange;
double phase;
double doppler;
int lli;

   // parse concise format realtime observation info

   prn = tsip_byte();
   flags1 = tsip_byte();
   flags2 = tsip_byte();
   el = (int) (s08) tsip_byte();
   az = (int) (s16) tsip_word();

   snr = 0.0;
   prange = 0.0;
   phase = 0.0;
   doppler = 0.0;
   lli = 0;

   if(flags1 & 0x40) {  // L1 data
      snr = (double) (u08) tsip_byte();      // snr
      snr /= 4.0;
      prange = tsip_double();   // pseudorange
      phase = tsip_double();    // phase
      doppler = (double) tsip_single();  // doppler

      if((prn >= 1) && (prn <= 32)) {
         sat[prn].level_msg = 1;
         sat[prn].sig_level = (float) snr;
         have_snr |= rinex_gnss(prn);
         record_sig_levels(prn);

         phase = 0.0-phase;
         sat[prn].code_phase = phase;
         if(phase) {
            have_phase |= rinex_gnss(prn);
         }

         sat[prn].range = prange;
         if(prange) {
            have_range |= rinex_gnss(prn);
         }

         sat[prn].doppler = doppler;
         if(doppler) {
            have_doppler |= rinex_gnss(prn);
         }

         lli = 0;
         if(prange && (flags1 & 0x02)) lli |= CYCLE_SLIP;
         sat[prn].ca_lli = lli;
      }
sprintf(out, " -prn:%02d l1: snr:%f  phase:%f  range:%f  doppler:%f  flags1:%02X  flags2:%02X  lli:%02X", prn, snr, phase, prange, doppler, flags1,flags2, lli);
if(debug_file) fprintf(debug_file, "%s\n", out);
   }

   l2_snr = 0.0;
   prange = 0.0;
   phase = 0.0;
   doppler = 0.0;

   if(flags1 & 0x01) {  // L2 data
      l2_snr = (double) (u08) tsip_byte();      // snr
      l2_snr /= 4.0;
      phase = tsip_double();    // phase
      prange = (double) tsip_single();   // pseudorange

      if((prn >= 1) && (prn <= 32)) {
         sat[prn].l2_sig_level = (float) l2_snr;
         sat[prn].l2_level_msg = 17;
         have_l2_snr |= rinex_gnss(prn);

         if(flags1 & 0x10) phase = 0.0-phase;
         else phase = 0.0;

         if(flags1 & 0x20) prange = sat[prn].range + prange;
         else {
            prange = 0.0;
            phase = 0.0-sqrt(fabs(phase));
         }

         sat[prn].l2_code_phase = phase;
         if(phase) {
            have_l2_phase |= rinex_gnss(prn);
         }

         sat[prn].l2_range = prange;
         if(prange) {
            have_l2_range |= rinex_gnss(prn);
         }

         lli = 0;
         if(prange && (flags1 & 0x04)) lli |= CYCLE_SLIP;
         if(prange && (flags2 & 0x04)) lli |= P_TRACK;  // tracking encrypted code
         sat[prn].l2_lli = lli;
      }
sprintf(out, " -prn:%02d l2: snr:%f  phase:%f  range:%f  doppler:%f  flags1:%02X  flags2:%02X  lli:%02X", prn, l2_snr, phase, prange, doppler, flags1,flags2, lli);
if(debug_file) fprintf(debug_file, "%s\n", out);
   }

   if(rif & 0x02) {  // expanded format
      tsip_byte();    // iode
      tsip_byte();    // L1 slip counter
      tsip_byte();    // L2 slip counter
   }

   if((prn >= 1) && (prn <= 32)) {
      set_sat_azel(prn, (float) az, (float) el);
      if(snr > 0) sat[prn].tracking = prn;
      else        sat[prn].tracking = (-1);
      have_sat_azel = 17;
   }

   return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edi, -0x88(%rbp)
callq 0x51c47
movl %eax, %r14d
movzbl %al, %ebx
callq 0x51c47
movl %eax, %r13d
movzbl %al, %r12d
callq 0x51c47
movb %al, -0x29(%rbp)
movzbl %al, %eax
movl %eax, -0x5c(%rbp)
callq 0x51c47
movb %al, -0x2a(%rbp)
callq 0x51c63
movw %ax, -0x4a(%rbp)
movl %ebx, %r15d
movl %r12d, -0x70(%rbp)
testb $0x40, %r12b
jne 0x7442e
xorl %r12d, %r12d
xorps %xmm0, %xmm0
jmp 0x745fd
callq 0x51c47
movzbl %al, %eax
cvtsi2sd %eax, %xmm0
mulsd 0x8159e(%rip), %xmm0    # 0xf59e0
movsd %xmm0, -0x58(%rbp)
callq 0x51e6f
movsd %xmm0, -0x40(%rbp)
callq 0x51e6f
movsd %xmm0, -0x38(%rbp)
callq 0x51dc3
cvtss2sd %xmm0, %xmm3
leal -0x1(%r14), %eax
cmpb $0x1f, %al
ja 0x745a1
movss %xmm0, -0x84(%rbp)
movsd %xmm3, -0x48(%rbp)
movq %r15, -0x80(%rbp)
imulq $0x348, %r15, %r12      # imm = 0x348
leaq 0x1b4b21(%rip), %r15    # 0x228fb0
leaq (%r15,%r12), %rax
movq %rax, -0x78(%rbp)
movl $0x1, 0x1c(%r15,%r12)
cvtsd2ss -0x58(%rbp), %xmm0
movss %xmm0, 0x20(%r15,%r12)
movl %ebx, %edi
callq 0xca4da
leaq 0x282e92(%rip), %rcx    # 0x2f734c
orl %eax, (%rcx)
movl %ebx, %edi
callq 0x559ba
xorps %xmm0, %xmm0
xorpd %xmm1, %xmm1
subsd -0x38(%rbp), %xmm1
movsd %xmm1, 0x28(%r15,%r12)
ucomisd %xmm0, %xmm1
movsd %xmm1, -0x38(%rbp)
jne 0x744e3
jnp 0x744fb
movl %ebx, %edi
callq 0xca4da
xorps %xmm0, %xmm0
movsd -0x38(%rbp), %xmm1
leaq 0x282e4b(%rip), %rcx    # 0x2f7344
orl %eax, (%rcx)
movsd -0x40(%rbp), %xmm2
movq -0x78(%rbp), %rdx
movsd %xmm2, 0x38(%rdx)
ucomisd %xmm0, %xmm2
movsd -0x48(%rbp), %xmm3
jne 0x74516
jnp 0x74539
movl %ebx, %edi
callq 0xca4da
movsd -0x38(%rbp), %xmm1
movq -0x78(%rbp), %rdx
movsd -0x48(%rbp), %xmm3
movsd -0x40(%rbp), %xmm2
leaq 0x282e11(%rip), %rcx    # 0x2f7348
orl %eax, (%rcx)
movsd %xmm3, 0x30(%rdx)
xorps %xmm0, %xmm0
movss -0x84(%rbp), %xmm4
ucomiss %xmm0, %xmm4
movq -0x80(%rbp), %r15
jne 0x74554
jnp 0x74577
movl %ebx, %edi
callq 0xca4da
movsd -0x38(%rbp), %xmm1
movq -0x78(%rbp), %rdx
movsd -0x48(%rbp), %xmm3
movsd -0x40(%rbp), %xmm2
leaq 0x282dcb(%rip), %rcx    # 0x2f7340
orl %eax, (%rcx)
xorps %xmm0, %xmm0
movapd %xmm2, %xmm4
cmpneqsd %xmm0, %xmm4
movq %xmm4, %r12
andl $0x1, %r12d
movl -0x70(%rbp), %ecx
movl %ecx, %eax
shll $0x5, %eax
shll $0x6, %r12d
andl %eax, %r12d
movl %r12d, 0x68(%rdx)
jmp 0x745b1
xorl %r12d, %r12d
movsd -0x38(%rbp), %xmm1
movl -0x70(%rbp), %ecx
movsd -0x40(%rbp), %xmm2
leaq 0x2b1c68(%rip), %rdi    # 0x326220
leaq 0x98520(%rip), %rsi     # 0x10cadf
movl %ebx, %edx
movsd -0x58(%rbp), %xmm0
movl -0x5c(%rbp), %r8d
movl %r12d, %r9d
movb $0x4, %al
callq 0x9060
leaq 0x1b3db5(%rip), %rax    # 0x228390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x745f8
leaq 0x9b435(%rip), %rsi     # 0x10fa1f
leaq 0x2b1c2f(%rip), %rdx    # 0x326220
xorl %eax, %eax
callq 0x9560
movsd -0x58(%rbp), %xmm0
testb $0x1, %r13b
movsd %xmm0, -0x58(%rbp)
je 0x747f1
callq 0x51c47
movzbl %al, %eax
cvtsi2sd %eax, %xmm0
mulsd 0x813c0(%rip), %xmm0    # 0xf59e0
movsd %xmm0, -0x40(%rbp)
callq 0x51e6f
movsd %xmm0, -0x38(%rbp)
callq 0x51dc3
cvtss2sd %xmm0, %xmm2
leal -0x1(%r14), %eax
cmpb $0x1f, %al
ja 0x746b9
movsd %xmm2, -0x48(%rbp)
cvtsd2ss -0x40(%rbp), %xmm0
imulq $0x348, %r15, %rax      # imm = 0x348
leaq 0x1b4958(%rip), %rcx    # 0x228fb0
leaq (%rcx,%rax), %r12
movss %xmm0, 0xb0(%rcx,%rax)
movl $0x11, 0xac(%rcx,%rax)
movl %ebx, %edi
callq 0xca4da
leaq 0x282cee(%rip), %rcx    # 0x2f736c
orl %eax, (%rcx)
xorps %xmm2, %xmm2
xorpd %xmm1, %xmm1
subsd -0x38(%rbp), %xmm1
testb $0x20, %r13b
movq %r15, -0x80(%rbp)
jne 0x746cc
xorps %xmm0, %xmm0
testb $0x10, %r13b
je 0x746ab
andpd 0x7eae9(%rip), %xmm1    # 0xf3190
movapd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
xorpd %xmm1, %xmm1
subsd %xmm0, %xmm1
jmp 0x746f1
movsd -0x38(%rbp), %xmm1
movl -0x70(%rbp), %r13d
movsd -0x40(%rbp), %xmm0
jmp 0x747a9
movsd -0x48(%rbp), %xmm2
addsd 0x38(%r12), %xmm2
testb $0x10, %r13b
jne 0x746f1
andq $0x0, 0xb8(%r12)
xorpd %xmm1, %xmm1
movl -0x70(%rbp), %r13d
jmp 0x7472e
movl -0x70(%rbp), %r13d
movsd %xmm1, 0xb8(%r12)
xorps %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x7470a
jnp 0x7472e
movl %ebx, %edi
movapd %xmm1, -0x70(%rbp)
movsd %xmm2, -0x38(%rbp)
callq 0xca4da
movapd -0x70(%rbp), %xmm1
leaq 0x282c3d(%rip), %rcx    # 0x2f7364
orl %eax, (%rcx)
movsd -0x38(%rbp), %xmm2
movsd -0x40(%rbp), %xmm0
movsd %xmm2, 0xc8(%r12)
xorl %eax, %eax
xorps %xmm3, %xmm3
ucomisd %xmm3, %xmm2
movq %r12, %r15
jne 0x7474d
jnp 0x74782
movl %ebx, %edi
movapd %xmm1, -0x70(%rbp)
movsd %xmm2, -0x48(%rbp)
callq 0xca4da
xorps %xmm3, %xmm3
movsd -0x48(%rbp), %xmm2
movapd -0x70(%rbp), %xmm1
movsd -0x40(%rbp), %xmm0
leaq 0x282bf1(%rip), %rcx    # 0x2f7368
orl %eax, (%rcx)
movl %r13d, %eax
shll $0x4, %eax
andl $0x40, %eax
movl %eax, %ecx
orl $0x10, %ecx
ucomisd %xmm3, %xmm2
movl %eax, %r12d
cmovnel %ecx, %r12d
cmovpl %ecx, %r12d
testb $0x4, -0x29(%rbp)
cmovel %eax, %r12d
movl %r12d, 0xe8(%r15)
movq -0x80(%rbp), %r15
leaq 0x2b1a70(%rip), %rdi    # 0x326220
leaq 0x98382(%rip), %rsi     # 0x10cb39
xorps %xmm3, %xmm3
movl %ebx, %edx
movl %r13d, %ecx
movl -0x5c(%rbp), %r8d
movl %r12d, %r9d
movb $0x4, %al
callq 0x9060
leaq 0x1b3bbc(%rip), %rax    # 0x228390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x747f1
leaq 0x9b23c(%rip), %rsi     # 0x10fa1f
leaq 0x2b1a36(%rip), %rdx    # 0x326220
xorl %eax, %eax
callq 0x9560
testb $0x2, -0x88(%rbp)
je 0x74809
callq 0x51c47
callq 0x51c47
callq 0x51c47
decb %r14b
cmpb $0x1f, %r14b
ja 0x7485d
movswl -0x4a(%rbp), %eax
cvtsi2ss %eax, %xmm0
movsbl -0x2a(%rbp), %eax
cvtsi2ss %eax, %xmm1
movl %ebx, %edi
callq 0x53b74
imulq $0x348, %r15, %rax      # imm = 0x348
xorps %xmm0, %xmm0
movsd -0x58(%rbp), %xmm1
ucomisd %xmm0, %xmm1
pushq $-0x1
popq %rcx
cmoval %ebx, %ecx
leaq 0x1b4767(%rip), %rdx    # 0x228fb0
movl %ecx, 0x218(%rdx,%rax)
leaq 0x282a3d(%rip), %rax    # 0x2f7294
movl $0x11, (%rax)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq