// File: /workspace/github_cpp_makefile_star2_O3/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 0x8276b
callq 0x810b1
testl %eax, %eax
je 0x828ea
leaq 0x2b9173(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x289edf(%rip), %rax    # 0x30c7b8
movsd %xmm0, (%rax)
leaq 0x28a954(%rip), %rax    # 0x30d238
movl $0x3b, (%rax)
callq 0x810b1
callq 0x810b1
callq 0x810b1
testl %eax, %eax
je 0x82931
leaq 0x2b913c(%rip), %rdi    # 0x33ba40
callq 0x95e0
leal (,%rax,8), %ecx
movabsq $0x16ffff14020a, %rdx   # imm = 0x16FFFF14020A
shrq %cl, %rdx
cmpl $0x7, %eax
movl $0xff, %eax
cmovbl %edx, %eax
leaq 0x28ab68(%rip), %rcx    # 0x30d497
movb %al, (%rcx)
callq 0x810b1
callq 0x810b1
testl %eax, %eax
je 0x82963
leaq 0x2b90fa(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x28a0ae(%rip), %rax    # 0x30ca00
movsd %xmm0, (%rax)
leaq 0x28a99f(%rip), %rax    # 0x30d2fc
movl $0x4d, (%rax)
callq 0x810b1
testl %eax, %eax
je 0x82998
leaq 0x2b90cd(%rip), %rdi    # 0x33ba40
callq 0x9470
mulsd 0x866a8(%rip), %xmm0    # 0x109028
leaq 0x289e39(%rip), %rax    # 0x30c7c0
movsd %xmm0, (%rax)
leaq 0x28a8a2(%rip), %rax    # 0x30d234
movl $0x3b, (%rax)
callq 0x810b1
testl %eax, %eax
je 0x829b6
leaq 0x2b9098(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x28aaa4(%rip), %rcx    # 0x30d458
movl %eax, (%rcx)
callq 0x810b1
testl %eax, %eax
je 0x829f6
leaq 0x28a9fe(%rip), %rax    # 0x30d3c4
cmpl $0x0, (%rax)
jne 0x829f6
leaq 0x2b906e(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x1bc532(%rip), %rcx    # 0x23ef10
movl %eax, (%rcx)
leaq 0x1bc525(%rip), %rcx    # 0x23ef0c
movl %eax, (%rcx)
leaq 0x28a928(%rip), %rax    # 0x30d318
movl $0x14d, (%rax)          # imm = 0x14D
callq 0x810b1
testl %eax, %eax
je 0x82a70
leaq 0x2b903a(%rip), %rdi    # 0x33ba40
callq 0x98c6
xorl %ecx, %ecx
testb $0x3, %al
setne %cl
leaq 0x28a7b7(%rip), %rdx    # 0x30d1d0
movl (%rdx), %esi
andl $-0x11, %esi
shll $0x4, %ecx
orl %esi, %ecx
movl %ecx, (%rdx)
leaq 0x28a87c(%rip), %rcx    # 0x30d2a8
movl $0x56, %edx
movl %edx, (%rcx)
leaq 0x28a79e(%rip), %rcx    # 0x30d1d8
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 0x28a7cf(%rip), %rsi    # 0x30d230
movl %edx, (%rsi)
shll $0xb, %eax
andl $0x100000, %eax         # imm = 0x100000
orl %r8d, %eax
movl %eax, (%rcx)
leaq 0x198559(%rip), %rax    # 0x21afd0
cmpl $0x1, (%rax)
jne 0x82a82
popq %rbp
jmp 0x8247a
popq %rbp
retq