// File: /workspace/github_cpp_makefile_star2_O1/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 $0x18, %rsp
movq %rdi, %rbx
leaq 0x17c9b7(%rip), %rax    # 0x2234e4
movl $0x0, (%rax)
leaq 0x77436(%rip), %rax     # 0x11df70
leaq 0x1983b7(%rip), %rcx    # 0x23eef8
movq %rax, (%rcx)
movss 0x66480(%rip), %xmm0    # 0x10cfcc
leaq 0x2cb4bd(%rip), %r14    # 0x372010
leaq 0x294ee6(%rip), %r15    # 0x33ba40
movl $0x22504f, %r13d        # imm = 0x22504F
movss %xmm0, -0x30(%rbp)
movss %xmm0, -0x2c(%rbp)
xorl %r12d, %r12d
movq $0x0, -0x38(%rbp)
testq %rbx, %rbx
je 0xa6fa0
movq %rbx, %rdi
callq 0xa637e
movq %rax, %rbx
movq %r14, %rdi
movq %r15, %rsi
callq 0x9340
cmpb $0x0, 0x2cb475(%rip)    # 0x372010
je 0xa6b75
movq %rbx, %rdi
callq 0xa637e
movq %rax, %rbx
callq 0xa646a
movl 0x2cb45d(%rip), %eax    # 0x372010
movl $0x4f444722, %ecx       # imm = 0x4F444722
xorl %ecx, %eax
movl 0x2cb453(%rip), %ecx    # 0x372013
xorl %r13d, %ecx
orl %eax, %ecx
je 0xa6d80
movl 0x2cb43f(%rip), %eax    # 0x372010
movl $0x4f444822, %ecx       # imm = 0x4F444822
xorl %ecx, %eax
movl 0x2cb435(%rip), %ecx    # 0x372013
xorl %r13d, %ecx
orl %eax, %ecx
je 0xa6daa
movl 0x2cb421(%rip), %eax    # 0x372010
movl $0x4f445022, %ecx       # imm = 0x4F445022
xorl %ecx, %eax
movl 0x2cb417(%rip), %ecx    # 0x372013
xorl %r13d, %ecx
orl %eax, %ecx
je 0xa6dd4
movl 0x2cb403(%rip), %eax    # 0x372010
movl $0x4f445422, %ecx       # imm = 0x4F445422
xorl %ecx, %eax
movl 0x2cb3f9(%rip), %ecx    # 0x372013
xorl %r13d, %ecx
orl %eax, %ecx
je 0xa6dfe
movl 0x2cb3e5(%rip), %eax    # 0x372010
movl $0x4f445622, %ecx       # imm = 0x4F445622
xorl %ecx, %eax
movl 0x2cb3db(%rip), %ecx    # 0x372013
xorl %r13d, %ecx
orl %eax, %ecx
je 0xa6e28
movl 0x2cb3c7(%rip), %eax    # 0x372010
movl $0x4f445822, %ecx       # imm = 0x4F445822
xorl %ecx, %eax
movl 0x2cb3bd(%rip), %ecx    # 0x372013
xorl %r13d, %ecx
orl %eax, %ecx
je 0xa6e52
movl 0x2cb3a9(%rip), %eax    # 0x372010
movl $0x4f445922, %ecx       # imm = 0x4F445922
xorl %ecx, %eax
movl 0x2cb39f(%rip), %ecx    # 0x372013
xorl %r13d, %ecx
orl %eax, %ecx
je 0xa6e7c
movq 0x2cb38a(%rip), %rax    # 0x372010
movabsq $0x494c4c4554415322, %rcx # imm = 0x494C4C4554415322
xorq %rcx, %rax
movq 0x2cb37b(%rip), %rcx    # 0x372015
movabsq $0x22534554494c4c, %rdx # imm = 0x22534554494C4C
xorq %rdx, %rcx
orq %rax, %rcx
je 0xa6ea7
movl 0x2cb35a(%rip), %eax    # 0x372010
movl $0x4e525022, %ecx       # imm = 0x4E525022
xorl %ecx, %eax
movzwl 0x2cb350(%rip), %ecx    # 0x372014
xorl $0x22, %ecx
orl %eax, %ecx
je 0xa6ed5
movl 0x2cb33b(%rip), %eax    # 0x372010
movl $0x224c4522, %ecx       # imm = 0x224C4522
xorl %ecx, %eax
movzbl 0x2cb331(%rip), %ecx    # 0x372014
orl %eax, %ecx
je 0xa6f01
movl 0x2cb31f(%rip), %eax    # 0x372010
movl $0x225a4122, %ecx       # imm = 0x225A4122
xorl %ecx, %eax
movzbl 0x2cb315(%rip), %ecx    # 0x372014
orl %eax, %ecx
je 0xa6f24
movl 0x2cb303(%rip), %eax    # 0x372010
movl $0x22535322, %ecx       # imm = 0x22535322
xorl %ecx, %eax
movzbl 0x2cb2f9(%rip), %ecx    # 0x372014
orl %eax, %ecx
je 0xa6f47
movl 0x2cb2e7(%rip), %eax    # 0x372010
movl $0x45535522, %ecx       # imm = 0x45535522
xorl %ecx, %eax
movl 0x2cb2dd(%rip), %ecx    # 0x372013
movl $0x224445, %edx         # imm = 0x224445
xorl %edx, %ecx
orl %eax, %ecx
jne 0xa6b75
movl (%r15), %eax
movl $0x45555254, %ecx       # imm = 0x45555254
xorl %ecx, %eax
movzbl 0x4(%r15), %ecx
movl -0x38(%rbp), %edx
imulq $0x348, %rdx, %rdx      # imm = 0x348
orl %eax, %ecx
leaq 0x198249(%rip), %rax    # 0x23efb0
leaq 0x218(%rax,%rdx), %rax
je 0xa6f95
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
jmp 0xa6b75
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x17c769(%rip), %rax    # 0x223500
movsd %xmm0, (%rax)
leaq 0x17c742(%rip), %rax    # 0x2234e4
orb $0x8, (%rax)
jmp 0xa6b75
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x17c72f(%rip), %rax    # 0x2234f0
movsd %xmm0, (%rax)
leaq 0x17c718(%rip), %rax    # 0x2234e4
orb $0x2, (%rax)
jmp 0xa6b75
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x17c6fd(%rip), %rax    # 0x2234e8
movsd %xmm0, (%rax)
leaq 0x17c6ee(%rip), %rax    # 0x2234e4
orb $0x1, (%rax)
jmp 0xa6b75
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x17c6f3(%rip), %rax    # 0x223508
movsd %xmm0, (%rax)
leaq 0x17c6c4(%rip), %rax    # 0x2234e4
orb $0x10, (%rax)
jmp 0xa6b75
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x17c6b9(%rip), %rax    # 0x2234f8
movsd %xmm0, (%rax)
leaq 0x17c69a(%rip), %rax    # 0x2234e4
orb $0x4, (%rax)
jmp 0xa6b75
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x17c6b7(%rip), %rax    # 0x223520
movsd %xmm0, (%rax)
leaq 0x17c670(%rip), %rax    # 0x2234e4
orb $-0x80, (%rax)
jmp 0xa6b75
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x17c695(%rip), %rax    # 0x223528
movsd %xmm0, (%rax)
leaq 0x17c646(%rip), %rax    # 0x2234e4
orb $0x1, 0x1(%rax)
jmp 0xa6b75
movl $0x218, %eax            # imm = 0x218
leaq 0x1980fd(%rip), %rcx    # 0x23efb0
xorl %r12d, %r12d
movl %r12d, (%rcx,%rax)
movl %r12d, -0x1fc(%rcx,%rax)
addq $0x348, %rax            # imm = 0x348
cmpq $0xcd358, %rax          # imm = 0xCD358
jne 0xa6eb3
jmp 0xa6b75
movq %r15, %rdi
callq 0x95e0
movl %eax, %ecx
leal -0x1(%rcx), %eax
cmpl $0x3e7, %eax            # imm = 0x3E7
adcl $0x0, %r12d
cmpl $0x3e7, %eax            # imm = 0x3E7
movl $0x0, %eax
cmovael %eax, %ecx
movq %rcx, -0x38(%rbp)
jmp 0xa6b75
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x2c(%rbp)
leaq 0x26637b(%rip), %rax    # 0x30d294
movl $0x15, (%rax)
jmp 0xa6b75
movq %r15, %rdi
callq 0x95e0
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x30(%rbp)
leaq 0x266358(%rip), %rax    # 0x30d294
movl $0x14, (%rax)
jmp 0xa6b75
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
movq -0x38(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movl %edi, %eax
imulq $0x348, %rax, %rax      # imm = 0x348
leaq 0x198045(%rip), %rcx    # 0x23efb0
movss %xmm0, 0x20(%rcx,%rax)
movl $0x37, 0x1c(%rcx,%rax)
callq 0xdbb74
leaq 0x2663c7(%rip), %rcx    # 0x30d34c
orl %eax, (%rcx)
movq -0x38(%rbp), %rdi
callq 0x5ced3
jmp 0xa6b75
movl $0x1, (%rax)
jmp 0xa6b75
movss 0x66024(%rip), %xmm0    # 0x10cfcc
ucomiss -0x30(%rbp), %xmm0
jbe 0xa6fc7
ucomiss -0x2c(%rbp), %xmm0
jbe 0xa6fc7
movq -0x38(%rbp), %rdi
movss -0x30(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
callq 0x5ad98
leaq 0x197f3e(%rip), %rax    # 0x23ef0c
movl %r12d, (%rax)
leaq 0x266340(%rip), %rax    # 0x30d318
movl $0x7, (%rax)
leaq 0x1973ab(%rip), %rax    # 0x23e390
movq (%rax), %rdi
testq %rdi, %rdi
je 0xa6ffe
leaq 0x7ed4d(%rip), %rsi     # 0x125d41
movl %r12d, %edx
xorl %eax, %eax
callq 0x9560
movl %r12d, %edi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5e411