// File: /workspace/github_cpp_makefile_star2_O1/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 0x82863
callq 0x811da
testl %eax, %eax
je 0x829e2
leaq 0x2b907b(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x289de7(%rip), %rax    # 0x30c7b8
movsd %xmm0, (%rax)
leaq 0x28a85c(%rip), %rax    # 0x30d238
movl $0x3b, (%rax)
callq 0x811da
callq 0x811da
callq 0x811da
testl %eax, %eax
je 0x82a29
leaq 0x2b9044(%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 0x28aa70(%rip), %rcx    # 0x30d497
movb %al, (%rcx)
callq 0x811da
callq 0x811da
testl %eax, %eax
je 0x82a5b
leaq 0x2b9002(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x289fb6(%rip), %rax    # 0x30ca00
movsd %xmm0, (%rax)
leaq 0x28a8a7(%rip), %rax    # 0x30d2fc
movl $0x4d, (%rax)
callq 0x811da
testl %eax, %eax
je 0x82a90
leaq 0x2b8fd5(%rip), %rdi    # 0x33ba40
callq 0x9470
mulsd 0x865b0(%rip), %xmm0    # 0x109028
leaq 0x289d41(%rip), %rax    # 0x30c7c0
movsd %xmm0, (%rax)
leaq 0x28a7aa(%rip), %rax    # 0x30d234
movl $0x3b, (%rax)
callq 0x811da
testl %eax, %eax
je 0x82aae
leaq 0x2b8fa0(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x28a9ac(%rip), %rcx    # 0x30d458
movl %eax, (%rcx)
callq 0x811da
testl %eax, %eax
je 0x82aee
leaq 0x28a906(%rip), %rax    # 0x30d3c4
cmpl $0x0, (%rax)
jne 0x82aee
leaq 0x2b8f76(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x1bc43a(%rip), %rcx    # 0x23ef10
movl %eax, (%rcx)
leaq 0x1bc42d(%rip), %rcx    # 0x23ef0c
movl %eax, (%rcx)
leaq 0x28a830(%rip), %rax    # 0x30d318
movl $0x14d, (%rax)          # imm = 0x14D
callq 0x811da
testl %eax, %eax
je 0x82b68
leaq 0x2b8f42(%rip), %rdi    # 0x33ba40
callq 0x98c6
xorl %ecx, %ecx
testb $0x3, %al
setne %cl
leaq 0x28a6bf(%rip), %rdx    # 0x30d1d0
movl (%rdx), %esi
andl $-0x11, %esi
shll $0x4, %ecx
orl %esi, %ecx
movl %ecx, (%rdx)
leaq 0x28a784(%rip), %rcx    # 0x30d2a8
movl $0x56, %edx
movl %edx, (%rcx)
leaq 0x28a6a6(%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 0x28a6d7(%rip), %rsi    # 0x30d230
movl %edx, (%rsi)
shll $0xb, %eax
andl $0x100000, %eax         # imm = 0x100000
orl %r8d, %eax
movl %eax, (%rcx)
leaq 0x198461(%rip), %rax    # 0x21afd0
cmpl $0x1, (%rax)
jne 0x82b7a
popq %rbp
jmp 0x82578
popq %rbp
retq