// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_pjlts(int)
void parse_pjlts(int system)
{
int i;

   // Jackson labs LTE Lite STATUS message

   config_jackson();

   if(get_msg_field()) {  // filtered UTC offset in ns
      pps_offset = (OFS_SIZE) (atof(msg_field) / 1.0);
      have_pps_offset = 59;
   }

   if(get_msg_field()) {  // raw UTC offset in ns
   }

   if(get_msg_field()) {  // captured PPS pulses
   }

   if(get_msg_field()) {  // lock status
      i = atoi(msg_field);
      if     (i == 0) discipline_mode = DIS_MODE_WARMUP;
      else if(i == 1) discipline_mode = DIS_MODE_AUTO_HOLD;
      else if(i == 2) discipline_mode = DIS_MODE_LEARNING;
      else if(i == 5) discipline_mode = DIS_MODE_SOFT_HOLD;
      else if(i == 6) discipline_mode = DIS_MODE_NORMAL;
      else            discipline_mode = DIS_MODE_UNKNOWN;
   }

   if(get_msg_field()) {  // EFC voltage
   }

   if(get_msg_field()) {  // EFC %
      dac_voltage = (DATA_SIZE) atof(msg_field);
      have_dac = 77;
   }

   if(get_msg_field()) {  // freq accuracy
      osc_offset = (OFS_SIZE) (atof(msg_field) * 1.0E9);
      have_osc_offset = 59;
   }

   if(get_msg_field()) {  // holdover seconds
      holdover = (u32) atoi(msg_field);
   }

   if(get_msg_field()) {  // tracked sats
      if(have_sawtooth == 0) {
         sat_count = jackson_sat_count = atoi(msg_field);
         have_count = 333;
      }
   }

   if(get_msg_field()) {  // health status
      i = atohex(msg_field);

      if(i & 0x03) critical_alarms |= CRIT_OCXO;
      else         critical_alarms &= (~CRIT_OCXO);
      have_critical_alarms = 86;

      if(i & 0x04) minor_alarms |= MINOR_JL_PHASE;
      else         minor_alarms &= (~MINOR_JL_PHASE);

      if(i & 0x08) minor_alarms |= MINOR_JL_RUNTIME;
      else         minor_alarms &= (~MINOR_JL_RUNTIME);

      if(i & 0x10) minor_alarms |= MINOR_JL_HOLD;
      else         minor_alarms &= (~MINOR_JL_HOLD);

      if(i & 0x20) minor_alarms |= MINOR_JL_FREQ;
      else         minor_alarms &= (~MINOR_JL_FREQ);

      if(i & 0xC0) minor_alarms |= (MINOR_OSC_AGE);
      else         minor_alarms &= (~MINOR_OSC_AGE);
      have_osc_age = 86;

      if(i & 0x200) minor_alarms |= MINOR_JL_CHANGE;
      else          minor_alarms &= (~MINOR_JL_CHANGE);
   }

   if(lte_lite == 1) {  // device is only sending $PJLTS message
      get_norcvr_message();  // drive screen uodate
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x76cfc
callq 0x75767
testl %eax, %eax
je 0x76e77
leaq 0x2aebe6(%rip), %rdi    # 0x325a40
callq 0x9470
leaq 0x27f952(%rip), %rax    # 0x2f67b8
movsd %xmm0, (%rax)
leaq 0x2803c7(%rip), %rax    # 0x2f7238
movl $0x3b, (%rax)
callq 0x75767
callq 0x75767
callq 0x75767
testl %eax, %eax
je 0x76ebe
leaq 0x2aebaf(%rip), %rdi    # 0x325a40
callq 0x95e0
leal (,%rax,8), %ecx
movabsq $0x16ffff14020a, %rdx   # imm = 0x16FFFF14020A
shrq %cl, %rdx
cmpl $0x7, %eax
movl $0xff, %eax
cmovbl %edx, %eax
leaq 0x2805db(%rip), %rcx    # 0x2f7497
movb %al, (%rcx)
callq 0x75767
callq 0x75767
testl %eax, %eax
je 0x76ef0
leaq 0x2aeb6d(%rip), %rdi    # 0x325a40
callq 0x9470
leaq 0x27fb21(%rip), %rax    # 0x2f6a00
movsd %xmm0, (%rax)
leaq 0x280412(%rip), %rax    # 0x2f72fc
movl $0x4d, (%rax)
callq 0x75767
testl %eax, %eax
je 0x76f25
leaq 0x2aeb40(%rip), %rdi    # 0x325a40
callq 0x9470
mulsd 0x7c11b(%rip), %xmm0    # 0xf3028
leaq 0x27f8ac(%rip), %rax    # 0x2f67c0
movsd %xmm0, (%rax)
leaq 0x280315(%rip), %rax    # 0x2f7234
movl $0x3b, (%rax)
callq 0x75767
testl %eax, %eax
je 0x76f43
leaq 0x2aeb0b(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x280517(%rip), %rcx    # 0x2f7458
movl %eax, (%rcx)
callq 0x75767
testl %eax, %eax
je 0x76f83
leaq 0x280471(%rip), %rax    # 0x2f73c4
cmpl $0x0, (%rax)
jne 0x76f83
leaq 0x2aeae1(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x1b1fa5(%rip), %rcx    # 0x228f10
movl %eax, (%rcx)
leaq 0x1b1f98(%rip), %rcx    # 0x228f0c
movl %eax, (%rcx)
leaq 0x28039b(%rip), %rax    # 0x2f7318
movl $0x14d, (%rax)          # imm = 0x14D
callq 0x75767
testl %eax, %eax
je 0x76ffb
leaq 0x2aeaad(%rip), %rdi    # 0x325a40
callq 0x98b2
xorl %ecx, %ecx
testb $0x3, %al
setne %cl
leaq 0x28022a(%rip), %rdx    # 0x2f71d0
movl (%rdx), %esi
andl $-0x11, %esi
shll $0x4, %ecx
orl %esi, %ecx
movl %ecx, (%rdx)
leaq 0x2802ef(%rip), %rcx    # 0x2f72a8
pushq $0x56
popq %rdx
movl %edx, (%rcx)
leaq 0x280213(%rip), %rcx    # 0x2f71d8
movl $0xffe0fffe, %esi       # imm = 0xFFE0FFFE
andl (%rcx), %esi
xorl %edi, %edi
testb $-0x40, %al
setne %dil
movl %eax, %r8d
andl $0x3c, %r8d
shll $0xe, %r8d
orl %edi, %r8d
orl %esi, %r8d
leaq 0x280244(%rip), %rsi    # 0x2f7230
movl %edx, (%rsi)
shll $0xb, %eax
andl $0x100000, %eax         # imm = 0x100000
orl %r8d, %eax
movl %eax, (%rcx)
leaq 0x18dfce(%rip), %rax    # 0x204fd0
cmpl $0x1, (%rax)
jne 0x7700d
popq %rbp
jmp 0x76a3e
popq %rbp
retq