// File: /workspace/github_cpp_makefile_star2_O3/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 0x17c7a6(%rip), %rax    # 0x2234e4
movl $0x0, (%rax)
leaq 0x772b0(%rip), %rax     # 0x11dffb
leaq 0x1981a6(%rip), %rcx    # 0x23eef8
movq %rax, (%rcx)
movss 0x66307(%rip), %xmm0    # 0x10d064
leaq 0x2cb2ac(%rip), %r14    # 0x372010
leaq 0x294cd5(%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 0xa71b1
movq %rbx, %rdi
callq 0xa6568
movq %rax, %rbx
movq %r14, %rdi
movq %r15, %rsi
callq 0x9340
cmpb $0x0, 0x2cb264(%rip)    # 0x372010
je 0xa6d86
movq %rbx, %rdi
callq 0xa6568
movq %rax, %rbx
callq 0xa6663
movl 0x2cb24c(%rip), %eax    # 0x372010
movl $0x4f444722, %ecx       # imm = 0x4F444722
xorl %ecx, %eax
movl 0x2cb242(%rip), %ecx    # 0x372013
xorl %r13d, %ecx
orl %eax, %ecx
je 0xa6f91
movl 0x2cb22e(%rip), %eax    # 0x372010
movl $0x4f444822, %ecx       # imm = 0x4F444822
xorl %ecx, %eax
movl 0x2cb224(%rip), %ecx    # 0x372013
xorl %r13d, %ecx
orl %eax, %ecx
je 0xa6fbb
movl 0x2cb210(%rip), %eax    # 0x372010
movl $0x4f445022, %ecx       # imm = 0x4F445022
xorl %ecx, %eax
movl 0x2cb206(%rip), %ecx    # 0x372013
xorl %r13d, %ecx
orl %eax, %ecx
je 0xa6fe5
movl 0x2cb1f2(%rip), %eax    # 0x372010
movl $0x4f445422, %ecx       # imm = 0x4F445422
xorl %ecx, %eax
movl 0x2cb1e8(%rip), %ecx    # 0x372013
xorl %r13d, %ecx
orl %eax, %ecx
je 0xa700f
movl 0x2cb1d4(%rip), %eax    # 0x372010
movl $0x4f445622, %ecx       # imm = 0x4F445622
xorl %ecx, %eax
movl 0x2cb1ca(%rip), %ecx    # 0x372013
xorl %r13d, %ecx
orl %eax, %ecx
je 0xa7039
movl 0x2cb1b6(%rip), %eax    # 0x372010
movl $0x4f445822, %ecx       # imm = 0x4F445822
xorl %ecx, %eax
movl 0x2cb1ac(%rip), %ecx    # 0x372013
xorl %r13d, %ecx
orl %eax, %ecx
je 0xa7063
movl 0x2cb198(%rip), %eax    # 0x372010
movl $0x4f445922, %ecx       # imm = 0x4F445922
xorl %ecx, %eax
movl 0x2cb18e(%rip), %ecx    # 0x372013
xorl %r13d, %ecx
orl %eax, %ecx
je 0xa708d
movq 0x2cb179(%rip), %rax    # 0x372010
movabsq $0x494c4c4554415322, %rcx # imm = 0x494C4C4554415322
xorq %rcx, %rax
movq 0x2cb16a(%rip), %rcx    # 0x372015
movabsq $0x22534554494c4c, %rdx # imm = 0x22534554494C4C
xorq %rdx, %rcx
orq %rax, %rcx
je 0xa70b8
movl 0x2cb149(%rip), %eax    # 0x372010
movl $0x4e525022, %ecx       # imm = 0x4E525022
xorl %ecx, %eax
movzwl 0x2cb13f(%rip), %ecx    # 0x372014
xorl $0x22, %ecx
orl %eax, %ecx
je 0xa70e6
movl 0x2cb12a(%rip), %eax    # 0x372010
movl $0x224c4522, %ecx       # imm = 0x224C4522
xorl %ecx, %eax
movzbl 0x2cb120(%rip), %ecx    # 0x372014
orl %eax, %ecx
je 0xa7112
movl 0x2cb10e(%rip), %eax    # 0x372010
movl $0x225a4122, %ecx       # imm = 0x225A4122
xorl %ecx, %eax
movzbl 0x2cb104(%rip), %ecx    # 0x372014
orl %eax, %ecx
je 0xa7135
movl 0x2cb0f2(%rip), %eax    # 0x372010
movl $0x22535322, %ecx       # imm = 0x22535322
xorl %ecx, %eax
movzbl 0x2cb0e8(%rip), %ecx    # 0x372014
orl %eax, %ecx
je 0xa7158
movl 0x2cb0d6(%rip), %eax    # 0x372010
movl $0x45535522, %ecx       # imm = 0x45535522
xorl %ecx, %eax
movl 0x2cb0cc(%rip), %ecx    # 0x372013
movl $0x224445, %edx         # imm = 0x224445
xorl %edx, %ecx
orl %eax, %ecx
jne 0xa6d86
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 0x198038(%rip), %rax    # 0x23efb0
leaq 0x218(%rax,%rdx), %rax
je 0xa71a6
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
jmp 0xa6d86
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x17c558(%rip), %rax    # 0x223500
movsd %xmm0, (%rax)
leaq 0x17c531(%rip), %rax    # 0x2234e4
orb $0x8, (%rax)
jmp 0xa6d86
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x17c51e(%rip), %rax    # 0x2234f0
movsd %xmm0, (%rax)
leaq 0x17c507(%rip), %rax    # 0x2234e4
orb $0x2, (%rax)
jmp 0xa6d86
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x17c4ec(%rip), %rax    # 0x2234e8
movsd %xmm0, (%rax)
leaq 0x17c4dd(%rip), %rax    # 0x2234e4
orb $0x1, (%rax)
jmp 0xa6d86
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x17c4e2(%rip), %rax    # 0x223508
movsd %xmm0, (%rax)
leaq 0x17c4b3(%rip), %rax    # 0x2234e4
orb $0x10, (%rax)
jmp 0xa6d86
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x17c4a8(%rip), %rax    # 0x2234f8
movsd %xmm0, (%rax)
leaq 0x17c489(%rip), %rax    # 0x2234e4
orb $0x4, (%rax)
jmp 0xa6d86
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x17c4a6(%rip), %rax    # 0x223520
movsd %xmm0, (%rax)
leaq 0x17c45f(%rip), %rax    # 0x2234e4
orb $-0x80, (%rax)
jmp 0xa6d86
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x17c484(%rip), %rax    # 0x223528
movsd %xmm0, (%rax)
leaq 0x17c435(%rip), %rax    # 0x2234e4
orb $0x1, 0x1(%rax)
jmp 0xa6d86
movl $0x218, %eax            # imm = 0x218
leaq 0x197eec(%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 0xa70c4
jmp 0xa6d86
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 0xa6d86
movq %r15, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x2c(%rbp)
leaq 0x26616a(%rip), %rax    # 0x30d294
movl $0x15, (%rax)
jmp 0xa6d86
movq %r15, %rdi
callq 0x95e0
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x30(%rbp)
leaq 0x266147(%rip), %rax    # 0x30d294
movl $0x14, (%rax)
jmp 0xa6d86
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 0x197e34(%rip), %rcx    # 0x23efb0
movss %xmm0, 0x20(%rcx,%rax)
movl $0x37, 0x1c(%rcx,%rax)
callq 0xdc1dd
leaq 0x2661b6(%rip), %rcx    # 0x30d34c
orl %eax, (%rcx)
movq -0x38(%rbp), %rdi
callq 0x5cdab
jmp 0xa6d86
movl $0x1, (%rax)
jmp 0xa6d86
movss 0x65eab(%rip), %xmm0    # 0x10d064
ucomiss -0x30(%rbp), %xmm0
jbe 0xa71d8
ucomiss -0x2c(%rbp), %xmm0
jbe 0xa71d8
movq -0x38(%rbp), %rdi
movss -0x30(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
callq 0x5ace1
leaq 0x197d2d(%rip), %rax    # 0x23ef0c
movl %r12d, (%rax)
leaq 0x26612f(%rip), %rax    # 0x30d318
movl $0x7, (%rax)
leaq 0x19719a(%rip), %rax    # 0x23e390
movq (%rax), %rdi
testq %rdi, %rdi
je 0xa720f
leaq 0x7ec1c(%rip), %rsi     # 0x125e21
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 0x5e390