// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gpsd_sky(char*)
void parse_gpsd_sky(char *s)
{
int saw_sats;
int prn;
float az, el;

   // decode the SKY message - used to display satellite position and signal
   // level data

   have_dops = 0;
   prn = 0;
   saw_sats = 0;
   level_type = "SNR";

   az = el = (999.0F);
   while(s) {
      s = get_json_field(s);
      strcpy(gpsd_cmd, msg_field);
      if(gpsd_cmd[0] == 0) continue; 

      s = get_json_field(s);
log_gpsd_cmd();

      if(!strcmp(gpsd_cmd, "\"GDOP\"")) {
         gdop = (float) atof(msg_field);
         have_dops |= GDOP;
      }
      else if(!strcmp(gpsd_cmd, "\"HDOP\"")) {
         hdop = (float) atof(msg_field);
         have_dops |= HDOP;
      }
      else if(!strcmp(gpsd_cmd, "\"PDOP\"")) {
         pdop = (float) atof(msg_field);
         have_dops |= PDOP;
      }
      else if(!strcmp(gpsd_cmd, "\"TDOP\"")) {
         tdop = (float) atof(msg_field);
         have_dops |= TDOP;
      }
      else if(!strcmp(gpsd_cmd, "\"VDOP\"")) {
         vdop = (float) atof(msg_field);
         have_dops |= VDOP;
      }
      else if(!strcmp(gpsd_cmd, "\"XDOP\"")) {
         xdop = (float) atof(msg_field);
         have_dops |= XDOP;
      }
      else if(!strcmp(gpsd_cmd, "\"YDOP\"")) {
         ydop = (float) atof(msg_field);
         have_dops |= YDOP;
      }
      else if(!strcmp(gpsd_cmd, "\"SATELLITES\"")) {
         saw_sats = 0;
         reset_sat_tracking();
      }
      else if(!strcmp(gpsd_cmd, "\"PRN\"")) {
         prn = atoi(msg_field);
         if(prn <= 0) prn = 0;
         else if(prn > MAX_PRN) prn = 0; 
         else ++saw_sats;
      }
      else if(!strcmp(gpsd_cmd, "\"EL\"")) {   
         el = (float) atof(msg_field);
         have_sat_azel = 21;
      }
      else if(!strcmp(gpsd_cmd, "\"AZ\"")) {
         az = (float) atoi(msg_field);
         have_sat_azel = 20;
      }
      else if(!strcmp(gpsd_cmd, "\"SS\"")) {
         sat[prn].sig_level = (float) atof(msg_field);
         sat[prn].level_msg = 55;
         have_snr |= rinex_gnss(prn);
         record_sig_levels(prn);
      }
      else if(!strcmp(gpsd_cmd, "\"USED\"")) {
         if(!strcmp(msg_field, "TRUE")) sat[prn].tracking = 1;
         else                            sat[prn].tracking = (-1);
      }

   }

   if((az < 999.0F) && (el < 999.0F)) {
      set_sat_azel(prn, (float) az, (float) el);
   }

   sat_count = saw_sats;
   have_count = 7;
if(debug_file) fprintf(debug_file, "sat count:%d\n", sat_count);
   config_sat_count(saw_sats);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x175e6b(%rip), %rax    # 0x20d4e4
andl $0x0, (%rax)
movq %rdi, %r14
leaq 0x709f0(%rip), %rax     # 0x108076
leaq 0x19186b(%rip), %rcx    # 0x228ef8
movq %rax, (%rcx)
movss 0x5fa4c(%rip), %xmm0    # 0xf70e4
leaq 0x2c4971(%rip), %rbx    # 0x35c010
leaq 0x28e39a(%rip), %r15    # 0x325a40
movss %xmm0, -0x34(%rbp)
movss %xmm0, -0x30(%rbp)
xorl %r12d, %r12d
xorl %edi, %edi
testq %r14, %r14
je 0x97aa7
movq %rdi, %r13
movq %r14, %rdi
callq 0x96fd1
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9330
movq %r13, %rdi
cmpb $0x0, 0x2c492f(%rip)    # 0x35c010
je 0x976b5
movl %r12d, -0x2c(%rbp)
movq %r14, %rdi
callq 0x96fd1
movq %rax, %r14
callq 0x970c3
movq %rbx, %rdi
leaq 0x78606(%rip), %rsi     # 0x10fd07
pushq $0x7
popq %r12
movq %r12, %rdx
callq 0x9380
testl %eax, %eax
je 0x978a0
movq %rbx, %rdi
leaq 0x785ef(%rip), %rsi     # 0x10fd0e
movq %r12, %rdx
callq 0x9380
testl %eax, %eax
je 0x978ca
movq %rbx, %rdi
leaq 0x785dc(%rip), %rsi     # 0x10fd15
movq %r12, %rdx
callq 0x9380
testl %eax, %eax
je 0x978f4
movq %rbx, %rdi
leaq 0x785c9(%rip), %rsi     # 0x10fd1c
movq %r12, %rdx
callq 0x9380
testl %eax, %eax
je 0x9791e
movq %rbx, %rdi
leaq 0x785b6(%rip), %rsi     # 0x10fd23
movq %r12, %rdx
callq 0x9380
testl %eax, %eax
je 0x97945
movq %rbx, %rdi
leaq 0x785a3(%rip), %rsi     # 0x10fd2a
movq %r12, %rdx
callq 0x9380
testl %eax, %eax
je 0x9796c
movq %rbx, %rdi
leaq 0x78590(%rip), %rsi     # 0x10fd31
movq %r12, %rdx
callq 0x9380
testl %eax, %eax
je 0x97993
movq %rbx, %rdi
leaq 0x7857d(%rip), %rsi     # 0x10fd38
pushq $0xd
popq %rdx
callq 0x9380
testl %eax, %eax
movl -0x2c(%rbp), %r12d
je 0x979c5
movq %rbx, %rdi
leaq 0x7856c(%rip), %rsi     # 0x10fd45
pushq $0x6
popq %rdx
callq 0x9380
testl %eax, %eax
je 0x979d5
movq %rbx, %rdi
leaq 0x78558(%rip), %rsi     # 0x10fd4b
pushq $0x5
popq %rdx
callq 0x9380
testl %eax, %eax
je 0x979fd
movq %rbx, %rdi
leaq 0x78543(%rip), %rsi     # 0x10fd50
pushq $0x5
popq %rdx
callq 0x9380
testl %eax, %eax
je 0x97a23
movq %rbx, %rdi
leaq 0x7852e(%rip), %rsi     # 0x10fd55
pushq $0x5
popq %rdx
callq 0x9380
movq %r13, %rcx
movq %r13, -0x40(%rbp)
movl %ecx, %ecx
testl %eax, %eax
je 0x97a49
movq %rcx, -0x48(%rbp)
movq %rbx, %rdi
leaq 0x7850c(%rip), %rsi     # 0x10fd5a
pushq $0x7
popq %rdx
callq 0x9380
testl %eax, %eax
movq -0x40(%rbp), %rdi
jne 0x976b5
movq %r15, %rdi
leaq 0x784f5(%rip), %rsi     # 0x10fd61
pushq $0x5
popq %rdx
callq 0x9380
imulq $0x348, -0x48(%rbp), %rcx # imm = 0x348
leaq 0x19172d(%rip), %rdx    # 0x228fb0
addq %rdx, %rcx
addq $0x218, %rcx            # imm = 0x218
testl %eax, %eax
je 0x97a99
orl $-0x1, (%rcx)
movq %r13, %rdi
jmp 0x976b5
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x175c49(%rip), %rax    # 0x20d500
movsd %xmm0, (%rax)
leaq 0x175c22(%rip), %rax    # 0x20d4e4
orb $0x8, (%rax)
jmp 0x979b9
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x175c0f(%rip), %rax    # 0x20d4f0
movsd %xmm0, (%rax)
leaq 0x175bf8(%rip), %rax    # 0x20d4e4
orb $0x2, (%rax)
jmp 0x979b9
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x175bdd(%rip), %rax    # 0x20d4e8
movsd %xmm0, (%rax)
leaq 0x175bce(%rip), %rax    # 0x20d4e4
orb $0x1, (%rax)
jmp 0x979b9
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x175bd3(%rip), %rax    # 0x20d508
movsd %xmm0, (%rax)
leaq 0x175ba4(%rip), %rax    # 0x20d4e4
orb $0x10, (%rax)
jmp 0x979b9
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x175b9c(%rip), %rax    # 0x20d4f8
movsd %xmm0, (%rax)
leaq 0x175b7d(%rip), %rax    # 0x20d4e4
orb $0x4, (%rax)
jmp 0x979b9
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x175b9d(%rip), %rax    # 0x20d520
movsd %xmm0, (%rax)
leaq 0x175b56(%rip), %rax    # 0x20d4e4
orb $-0x80, (%rax)
jmp 0x979b9
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x175b7e(%rip), %rax    # 0x20d528
movsd %xmm0, (%rax)
leaq 0x175b2f(%rip), %rax    # 0x20d4e4
orb $0x1, 0x1(%rax)
movq %r13, %rdi
movl -0x2c(%rbp), %r12d
jmp 0x976b5
callq 0x56b1c
xorl %r12d, %r12d
movq %r13, %rdi
jmp 0x976b5
movq %r15, %rdi
callq 0x95e0
movl %eax, %edi
leal -0x1(%rdi), %eax
cmpl $0x3e7, %eax            # imm = 0x3E7
adcl $0x0, %r12d
cmpl $0x3e7, %eax            # imm = 0x3E7
movl $0x0, %eax
cmovael %eax, %edi
jmp 0x976b5
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x30(%rbp)
leaq 0x25f87f(%rip), %rax    # 0x2f7294
movl $0x15, (%rax)
movq %r13, %rdi
jmp 0x976b5
movq %r15, %rdi
callq 0x95e0
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x34(%rbp)
leaq 0x25f859(%rip), %rax    # 0x2f7294
movl $0x14, (%rax)
movq %r13, %rdi
jmp 0x976b5
movq %r15, %rdi
movq %rcx, %r13
callq 0x9470
cvtsd2ss %xmm0, %xmm0
imulq $0x348, %r13, %rax      # imm = 0x348
leaq 0x19154a(%rip), %rcx    # 0x228fb0
movss %xmm0, 0x20(%rcx,%rax)
movl $0x37, 0x1c(%rcx,%rax)
movq -0x40(%rbp), %r13
movl %r13d, %edi
callq 0xca4da
leaq 0x25f8c5(%rip), %rcx    # 0x2f734c
orl %eax, (%rcx)
movl %r13d, %edi
callq 0x559ba
movq %r13, %rdi
jmp 0x976b5
movl $0x1, (%rcx)
movq %r13, %rdi
jmp 0x976b5
movss 0x5f635(%rip), %xmm0    # 0xf70e4
ucomiss -0x34(%rbp), %xmm0
jbe 0x97aca
ucomiss -0x30(%rbp), %xmm0
jbe 0x97aca
movss -0x34(%rbp), %xmm0
movss -0x30(%rbp), %xmm1
callq 0x53b74
leaq 0x19143b(%rip), %rax    # 0x228f0c
movl %r12d, (%rax)
leaq 0x25f83d(%rip), %rax    # 0x2f7318
movl $0x7, (%rax)
leaq 0x1908a8(%rip), %rax    # 0x228390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x97b01
leaq 0x7826f(%rip), %rsi     # 0x10fd66
movl %r12d, %edx
xorl %eax, %eax
callq 0x9560
movl %r12d, %edi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x56d93