// File: /workspace/github_cpp_makefile_star2_O1/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 $0x48, %rsp
movl %edi, -0x6c(%rbp)
callq 0x587d1
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0x7fb91
leaq 0x1bf3e2(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
movl %eax, %r12d
cmpl $0x100, %eax            # imm = 0x100
jb 0x7fbaa
leaq 0x1bf3c9(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
movl %eax, %r15d
cmpl $0x100, %eax            # imm = 0x100
jb 0x7fbc3
leaq 0x1bf3b0(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
movl %eax, %r13d
cmpl $0x100, %eax            # imm = 0x100
jb 0x7fbdc
leaq 0x1bf397(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
movzbl %bl, %r14d
movzbl %r12b, %eax
movl %eax, -0x58(%rbp)
movzbl %r15b, %eax
movl %eax, -0x54(%rbp)
callq 0x588f0
movw %ax, -0x46(%rbp)
testb $0x40, %r12b
movl %r15d, -0x68(%rbp)
jne 0x7fc0c
xorl %r15d, %r15d
xorps %xmm0, %xmm0
jmp 0x7fdef
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x7fc22
leaq 0x1bf351(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
cvtsi2sd %eax, %xmm0
mulsd 0x8bd2f(%rip), %xmm0    # 0x10b960
movsd %xmm0, -0x50(%rbp)
callq 0x58b86
movsd %xmm0, -0x30(%rbp)
callq 0x58b86
movsd %xmm0, -0x38(%rbp)
callq 0x58aae
cvtss2sd %xmm0, %xmm3
leal -0x1(%rbx), %eax
cmpb $0x1f, %al
ja 0x7fd92
movss %xmm0, -0x64(%rbp)
movsd %xmm3, -0x40(%rbp)
movl %r13d, -0x44(%rbp)
movzbl %bl, %eax
imulq $0x348, %rax, %r15      # imm = 0x348
leaq 0x1bf333(%rip), %r13    # 0x23efb0
leaq (%r15,%r13), %rax
movq %rax, -0x60(%rbp)
movl $0x1, 0x1c(%r13,%r15)
xorps %xmm0, %xmm0
cvtsd2ss -0x50(%rbp), %xmm0
movss %xmm0, 0x20(%r13,%r15)
movl %r14d, %edi
callq 0xdbb74
leaq 0x28d6a0(%rip), %rcx    # 0x30d34c
orl %eax, (%rcx)
movl %r14d, %edi
callq 0x5ced3
xorps %xmm0, %xmm0
xorpd %xmm1, %xmm1
subsd -0x38(%rbp), %xmm1
movsd %xmm1, 0x28(%r13,%r15)
ucomisd %xmm0, %xmm1
movsd %xmm1, -0x38(%rbp)
jne 0x7fcd6
jnp 0x7fcef
movl %r14d, %edi
callq 0xdbb74
xorps %xmm0, %xmm0
movsd -0x38(%rbp), %xmm1
leaq 0x28d657(%rip), %rcx    # 0x30d344
orl %eax, (%rcx)
movsd -0x30(%rbp), %xmm2
movq -0x60(%rbp), %rcx
movsd %xmm2, 0x38(%rcx)
ucomisd %xmm0, %xmm2
movsd -0x40(%rbp), %xmm3
jne 0x7fd0a
jnp 0x7fd2e
movl %r14d, %edi
callq 0xdbb74
movsd -0x38(%rbp), %xmm1
movsd -0x40(%rbp), %xmm3
movsd -0x30(%rbp), %xmm2
leaq 0x28d620(%rip), %rcx    # 0x30d348
orl %eax, (%rcx)
movq -0x60(%rbp), %rcx
movsd %xmm3, 0x30(%rcx)
xorps %xmm0, %xmm0
movss -0x64(%rbp), %xmm4
ucomiss %xmm0, %xmm4
movl -0x44(%rbp), %r13d
jne 0x7fd46
jnp 0x7fd6a
movl %r14d, %edi
callq 0xdbb74
movsd -0x38(%rbp), %xmm1
movsd -0x40(%rbp), %xmm3
movsd -0x30(%rbp), %xmm2
leaq 0x28d5dc(%rip), %rcx    # 0x30d340
orl %eax, (%rcx)
movq -0x60(%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 0x7fd9f
xorl %r15d, %r15d
movsd -0x38(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
leaq 0x2bc47a(%rip), %rdi    # 0x33c220
leaq 0xa2d0a(%rip), %rsi     # 0x122ab7
movl %r14d, %edx
movsd -0x50(%rbp), %xmm0
movl -0x58(%rbp), %ecx
movl -0x54(%rbp), %r8d
movl %r15d, %r9d
movb $0x4, %al
callq 0x9060
leaq 0x1be5c3(%rip), %rax    # 0x23e390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x7fdea
leaq 0xa5c1b(%rip), %rsi     # 0x1259f7
leaq 0x2bc43d(%rip), %rdx    # 0x33c220
xorl %eax, %eax
callq 0x9560
movsd -0x50(%rbp), %xmm0
testb $0x1, %r12b
movsd %xmm0, -0x50(%rbp)
je 0x7fffa
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x7fe14
leaq 0x1bf15f(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x8bb3a(%rip), %xmm0    # 0x10b960
movsd %xmm0, -0x30(%rbp)
callq 0x58b86
movsd %xmm0, -0x38(%rbp)
callq 0x58aae
xorps %xmm2, %xmm2
cvtss2sd %xmm0, %xmm2
leal -0x1(%rbx), %eax
cmpb $0x1f, %al
ja 0x7fec2
movsd %xmm2, -0x40(%rbp)
xorps %xmm0, %xmm0
cvtsd2ss -0x30(%rbp), %xmm0
movzbl %bl, %eax
imulq $0x348, %rax, %rax      # imm = 0x348
leaq 0x1bf14a(%rip), %rcx    # 0x23efb0
leaq (%rcx,%rax), %r15
movss %xmm0, 0xb0(%rcx,%rax)
movl $0x11, 0xac(%rcx,%rax)
movl %r14d, %edi
callq 0xdbb74
leaq 0x28d4df(%rip), %rcx    # 0x30d36c
orl %eax, (%rcx)
xorps %xmm0, %xmm0
xorpd %xmm1, %xmm1
subsd -0x38(%rbp), %xmm1
testb $0x20, %r12b
jne 0x7fecc
xorps %xmm2, %xmm2
testb $0x10, %r12b
je 0x7feb6
andpd 0x892ce(%rip), %xmm1    # 0x109180
movapd %xmm1, %xmm0
ucomisd %xmm2, %xmm0
jb 0x7feeb
sqrtsd %xmm0, %xmm0
jmp 0x7fef0
movsd -0x30(%rbp), %xmm1
jmp 0x7ffa9
testb $0x10, %r12b
je 0x7fed6
movapd %xmm1, %xmm0
movsd -0x40(%rbp), %xmm2
addsd 0x38(%r15), %xmm2
movaps %xmm0, %xmm3
movsd -0x30(%rbp), %xmm1
jmp 0x7ff00
callq 0x9270
movsd -0x30(%rbp), %xmm1
xorpd %xmm2, %xmm2
xorps %xmm3, %xmm3
subsd %xmm0, %xmm3
movl %r13d, -0x44(%rbp)
movsd %xmm3, 0xb8(%r15)
xorpd %xmm0, %xmm0
movsd %xmm3, -0x38(%rbp)
ucomisd %xmm0, %xmm3
movsd %xmm2, -0x40(%rbp)
jne 0x7ff23
jnp 0x7ff42
movl %r14d, %edi
callq 0xdbb74
xorpd %xmm0, %xmm0
movsd -0x40(%rbp), %xmm2
movsd -0x30(%rbp), %xmm1
leaq 0x28d424(%rip), %rcx    # 0x30d364
orl %eax, (%rcx)
movsd %xmm2, 0xc8(%r15)
xorl %eax, %eax
ucomisd %xmm0, %xmm2
movq %r15, %r13
jne 0x7ff58
jnp 0x7ff7e
movl %r14d, %edi
callq 0xdbb74
movsd -0x40(%rbp), %xmm2
movsd -0x30(%rbp), %xmm1
leaq 0x28d3f7(%rip), %rcx    # 0x30d368
orl %eax, (%rcx)
shll $0x4, %r12d
andl $0x40, %r12d
movl %r12d, %eax
movl %eax, %ecx
orl $0x10, %ecx
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
movl %eax, %r15d
cmovnel %ecx, %r15d
cmovpl %ecx, %r15d
testb $0x4, -0x68(%rbp)
cmovel %eax, %r15d
movl %r15d, 0xe8(%r13)
movl -0x44(%rbp), %r13d
leaq 0x2bc270(%rip), %rdi    # 0x33c220
leaq 0xa2b5a(%rip), %rsi     # 0x122b11
xorps %xmm3, %xmm3
movl %r14d, %edx
movaps %xmm1, %xmm0
movsd -0x38(%rbp), %xmm1
movl -0x58(%rbp), %ecx
movl -0x54(%rbp), %r8d
movl %r15d, %r9d
movb $0x4, %al
callq 0x9060
leaq 0x1be3b3(%rip), %rax    # 0x23e390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x7fffa
leaq 0xa5a0b(%rip), %rsi     # 0x1259f7
leaq 0x2bc22d(%rip), %rdx    # 0x33c220
xorl %eax, %eax
callq 0x9560
testb $0x2, -0x6c(%rbp)
je 0x80042
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x80016
leaq 0x1bef5d(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x8002c
leaq 0x1bef47(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x80042
leaq 0x1bef31(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
leal -0x1(%rbx), %eax
cmpb $0x1f, %al
ja 0x800a1
movswl -0x46(%rbp), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movsbl %r13b, %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
movl %r14d, %edi
callq 0x5ad98
movzbl %bl, %eax
imulq $0x348, %rax, %rax      # imm = 0x348
xorps %xmm0, %xmm0
movsd -0x50(%rbp), %xmm1
ucomisd %xmm0, %xmm1
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmoval %r14d, %ecx
leaq 0x1bef23(%rip), %rdx    # 0x23efb0
movl %ecx, 0x218(%rdx,%rax)
leaq 0x28d1f9(%rip), %rax    # 0x30d294
movl $0x11, (%rax)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq