// File: /workspace/github_cpp_makefile_star2_O3/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 $0x58, %rsp
movl %edi, -0x74(%rbp)
callq 0x587be
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0x7f9c6
leaq 0x1bf5ad(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
movl %eax, %r12d
cmpl $0x100, %eax            # imm = 0x100
jb 0x7f9df
leaq 0x1bf594(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
movl %eax, %r15d
cmpl $0x100, %eax            # imm = 0x100
jb 0x7f9f8
leaq 0x1bf57b(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
movl %eax, %r13d
cmpl $0x100, %eax            # imm = 0x100
jb 0x7fa11
leaq 0x1bf562(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
movzbl %bl, %r14d
movzbl %r12b, %eax
movl %eax, -0x60(%rbp)
movzbl %r15b, %eax
movl %eax, -0x5c(%rbp)
callq 0x588d2
movw %ax, -0x3e(%rbp)
testb $0x40, %r12b
movl %r15d, -0x70(%rbp)
jne 0x7fa41
xorl %r15d, %r15d
xorps %xmm0, %xmm0
jmp 0x7fc24
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x7fa57
leaq 0x1bf51c(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
cvtsi2sd %eax, %xmm0
mulsd 0x8bf02(%rip), %xmm0    # 0x10b968
movsd %xmm0, -0x58(%rbp)
callq 0x58b08
movsd %xmm0, -0x30(%rbp)
callq 0x58b08
movsd %xmm0, -0x50(%rbp)
callq 0x58a30
cvtss2sd %xmm0, %xmm3
leal -0x1(%rbx), %eax
cmpb $0x1f, %al
ja 0x7fbc7
movss %xmm0, -0x6c(%rbp)
movsd %xmm3, -0x38(%rbp)
movl %r13d, -0x3c(%rbp)
movl %r14d, %eax
imulq $0x348, %rax, %r15      # imm = 0x348
leaq 0x1bf4fe(%rip), %r13    # 0x23efb0
leaq (%r15,%r13), %rax
movq %rax, -0x68(%rbp)
movl $0x1, 0x1c(%r13,%r15)
xorps %xmm0, %xmm0
cvtsd2ss -0x58(%rbp), %xmm0
movss %xmm0, 0x20(%r13,%r15)
movl %r14d, %edi
callq 0xdc1dd
leaq 0x28d86b(%rip), %rcx    # 0x30d34c
orl %eax, (%rcx)
movl %r14d, %edi
callq 0x5cdab
xorps %xmm0, %xmm0
xorpd %xmm1, %xmm1
subsd -0x50(%rbp), %xmm1
movsd %xmm1, 0x28(%r13,%r15)
ucomisd %xmm0, %xmm1
movsd %xmm1, -0x50(%rbp)
jne 0x7fb0b
jnp 0x7fb24
movl %r14d, %edi
callq 0xdc1dd
xorps %xmm0, %xmm0
movsd -0x50(%rbp), %xmm1
leaq 0x28d822(%rip), %rcx    # 0x30d344
orl %eax, (%rcx)
movsd -0x30(%rbp), %xmm2
movq -0x68(%rbp), %rcx
movsd %xmm2, 0x38(%rcx)
ucomisd %xmm0, %xmm2
movsd -0x38(%rbp), %xmm3
jne 0x7fb3f
jnp 0x7fb63
movl %r14d, %edi
callq 0xdc1dd
movsd -0x50(%rbp), %xmm1
movsd -0x38(%rbp), %xmm3
movsd -0x30(%rbp), %xmm2
leaq 0x28d7eb(%rip), %rcx    # 0x30d348
orl %eax, (%rcx)
movq -0x68(%rbp), %rcx
movsd %xmm3, 0x30(%rcx)
xorps %xmm0, %xmm0
movss -0x6c(%rbp), %xmm4
ucomiss %xmm0, %xmm4
movl -0x3c(%rbp), %r13d
jne 0x7fb7b
jnp 0x7fb9f
movl %r14d, %edi
callq 0xdc1dd
movsd -0x50(%rbp), %xmm1
movsd -0x38(%rbp), %xmm3
movsd -0x30(%rbp), %xmm2
leaq 0x28d7a7(%rip), %rcx    # 0x30d340
orl %eax, (%rcx)
movq -0x68(%rbp), %rcx
xorps %xmm0, %xmm0
movapd %xmm2, %xmm4
cmpneqsd %xmm0, %xmm4
movq %xmm4, %r15
andl $0x1, %r15d
movl %r12d, %eax
shll $0x5, %eax
shll $0x6, %r15d
andl %eax, %r15d
movl %r15d, 0x68(%rcx)
jmp 0x7fbd4
xorl %r15d, %r15d
movsd -0x50(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
leaq 0x2bc645(%rip), %rdi    # 0x33c220
leaq 0xa2fb5(%rip), %rsi     # 0x122b97
movl %r14d, %edx
movsd -0x58(%rbp), %xmm0
movl -0x60(%rbp), %ecx
movl -0x5c(%rbp), %r8d
movl %r15d, %r9d
movb $0x4, %al
callq 0x9060
leaq 0x1be78e(%rip), %rax    # 0x23e390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x7fc1f
leaq 0xa5ec6(%rip), %rsi     # 0x125ad7
leaq 0x2bc608(%rip), %rdx    # 0x33c220
xorl %eax, %eax
callq 0x9560
movsd -0x58(%rbp), %xmm0
testb $0x1, %r12b
movsd %xmm0, -0x58(%rbp)
je 0x7fe32
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x7fc49
leaq 0x1bf32a(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x8bd0d(%rip), %xmm0    # 0x10b968
movsd %xmm0, -0x30(%rbp)
callq 0x58b08
movsd %xmm0, -0x50(%rbp)
callq 0x58a30
xorps %xmm2, %xmm2
cvtss2sd %xmm0, %xmm2
leal -0x1(%rbx), %eax
cmpb $0x1f, %al
ja 0x7fd01
movsd %xmm2, -0x38(%rbp)
xorps %xmm0, %xmm0
cvtsd2ss -0x30(%rbp), %xmm0
movl %r14d, %eax
imulq $0x348, %rax, %rax      # imm = 0x348
leaq 0x1bf311(%rip), %rcx    # 0x23efb0
leaq (%rcx,%rax), %r15
movss %xmm0, 0xb0(%rcx,%rax)
movl $0x11, 0xac(%rcx,%rax)
movl %r14d, %edi
callq 0xdc1dd
leaq 0x28d6a6(%rip), %rcx    # 0x30d36c
orl %eax, (%rcx)
xorps %xmm2, %xmm2
xorpd %xmm1, %xmm1
subsd -0x50(%rbp), %xmm1
testb $0x20, %r12b
movl %r13d, -0x3c(%rbp)
jne 0x7fd10
xorps %xmm0, %xmm0
testb $0x10, %r12b
je 0x7fcf3
andpd 0x894a1(%rip), %xmm1    # 0x109190
movapd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
xorpd %xmm1, %xmm1
subsd %xmm0, %xmm1
jmp 0x7fd32
movsd -0x50(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
jmp 0x7fde9
movsd -0x38(%rbp), %xmm2
addsd 0x38(%r15), %xmm2
testb $0x10, %r12b
jne 0x7fd32
movq $0x0, 0xb8(%r15)
xorpd %xmm1, %xmm1
jmp 0x7fd6c
movsd %xmm1, 0xb8(%r15)
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x7fd47
jnp 0x7fd6c
movl %r14d, %edi
movapd %xmm1, -0x50(%rbp)
movsd %xmm2, -0x38(%rbp)
callq 0xdc1dd
movapd -0x50(%rbp), %xmm1
leaq 0x28d5ff(%rip), %rcx    # 0x30d364
orl %eax, (%rcx)
movsd -0x38(%rbp), %xmm2
movsd -0x30(%rbp), %xmm0
movsd %xmm2, 0xc8(%r15)
xorl %eax, %eax
xorps %xmm3, %xmm3
ucomisd %xmm3, %xmm2
movq %r15, %r13
jne 0x7fd8a
jnp 0x7fdc2
movl %r14d, %edi
movapd %xmm1, -0x50(%rbp)
movsd %xmm2, -0x38(%rbp)
callq 0xdc1dd
xorps %xmm3, %xmm3
movsd -0x38(%rbp), %xmm2
movapd -0x50(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
leaq 0x28d5b3(%rip), %rcx    # 0x30d368
orl %eax, (%rcx)
shll $0x4, %r12d
andl $0x40, %r12d
movl %r12d, %eax
movl %eax, %ecx
orl $0x10, %ecx
ucomisd %xmm3, %xmm2
movl %eax, %r15d
cmovnel %ecx, %r15d
cmovpl %ecx, %r15d
testb $0x4, -0x70(%rbp)
cmovel %eax, %r15d
movl %r15d, 0xe8(%r13)
movl -0x3c(%rbp), %r13d
leaq 0x2bc430(%rip), %rdi    # 0x33c220
leaq 0xa2dfa(%rip), %rsi     # 0x122bf1
xorps %xmm3, %xmm3
movl %r14d, %edx
movl -0x60(%rbp), %ecx
movl -0x5c(%rbp), %r8d
movl %r15d, %r9d
movb $0x4, %al
callq 0x9060
leaq 0x1be57b(%rip), %rax    # 0x23e390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x7fe32
leaq 0xa5cb3(%rip), %rsi     # 0x125ad7
leaq 0x2bc3f5(%rip), %rdx    # 0x33c220
xorl %eax, %eax
callq 0x9560
testb $0x2, -0x74(%rbp)
je 0x7fe7a
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x7fe4e
leaq 0x1bf125(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x7fe64
leaq 0x1bf10f(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x7fe7a
leaq 0x1bf0f9(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
decb %bl
cmpb $0x1f, %bl
ja 0x7fed9
movswl -0x3e(%rbp), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movsbl %r13b, %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
movl %r14d, %edi
callq 0x5ace1
movl %r14d, %eax
imulq $0x348, %rax, %rax      # imm = 0x348
xorps %xmm0, %xmm0
movsd -0x58(%rbp), %xmm1
ucomisd %xmm0, %xmm1
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmoval %r14d, %ecx
leaq 0x1bf0eb(%rip), %rdx    # 0x23efb0
movl %ecx, 0x218(%rdx,%rax)
leaq 0x28d3c1(%rip), %rax    # 0x30d294
movl $0x11, (%rax)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq