// File: 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
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
callq 0xb2990
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb2bba
leaq 0x2e808f(%rip), %rdi    # 0x39ac20
callq 0x9480
movsd 0xbc4ca(%rip), %xmm1    # 0x16f068
divsd %xmm1, %xmm0
leaq 0x2b8def(%rip), %rax    # 0x36b998
movsd %xmm0, (%rax)
leaq 0x2b9864(%rip), %rax    # 0x36c418
movl $0x3b, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb2bc6
jmp 0xb2bc6
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb2bd2
jmp 0xb2bd2
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb2c59
leaq 0x2e803d(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0xb2bfd
leaq 0x2b9a7f(%rip), %rax    # 0x36c677
movb $0xa, (%rax)
jmp 0xb2c57
cmpl $0x1, -0x8(%rbp)
jne 0xb2c0f
leaq 0x2b9a6d(%rip), %rax    # 0x36c677
movb $0x2, (%rax)
jmp 0xb2c55
cmpl $0x2, -0x8(%rbp)
jne 0xb2c21
leaq 0x2b9a5b(%rip), %rax    # 0x36c677
movb $0x14, (%rax)
jmp 0xb2c53
cmpl $0x5, -0x8(%rbp)
jne 0xb2c33
leaq 0x2b9a49(%rip), %rax    # 0x36c677
movb $0x16, (%rax)
jmp 0xb2c51
cmpl $0x6, -0x8(%rbp)
jne 0xb2c45
leaq 0x2b9a37(%rip), %rax    # 0x36c677
movb $0x0, (%rax)
jmp 0xb2c4f
leaq 0x2b9a2b(%rip), %rax    # 0x36c677
movb $-0x1, (%rax)
jmp 0xb2c51
jmp 0xb2c53
jmp 0xb2c55
jmp 0xb2c57
jmp 0xb2c59
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb2c65
jmp 0xb2c65
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb2c93
leaq 0x2e7faa(%rip), %rdi    # 0x39ac20
callq 0x9480
leaq 0x2b8f5e(%rip), %rax    # 0x36bbe0
movsd %xmm0, (%rax)
leaq 0x2b984f(%rip), %rax    # 0x36c4dc
movl $0x4d, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb2ccd
leaq 0x2e7f7c(%rip), %rdi    # 0x39ac20
callq 0x9480
movsd 0xbc377(%rip), %xmm1    # 0x16f028
mulsd %xmm1, %xmm0
leaq 0x2b8ce4(%rip), %rax    # 0x36b9a0
movsd %xmm0, (%rax)
leaq 0x2b974d(%rip), %rax    # 0x36c414
movl $0x3b, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb2cee
leaq 0x2e7f42(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x2b994c(%rip), %rax    # 0x36c638
movl %ecx, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb2d33
leaq 0x2b98a5(%rip), %rax    # 0x36c5a4
cmpl $0x0, (%rax)
jne 0xb2d31
leaq 0x2e7f15(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x1eb3d7(%rip), %rax    # 0x29e0f0
movl %ecx, (%rax)
leaq 0x1eb3ca(%rip), %rax    # 0x29e0ec
movl %ecx, (%rax)
leaq 0x2b97cd(%rip), %rax    # 0x36c4f8
movl $0x14d, (%rax)          # imm = 0x14D
jmp 0xb2d33
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb2f0f
leaq 0x2e7ed8(%rip), %rdi    # 0x39ac20
callq 0x98d0
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0xb2d72
leaq 0x2b964e(%rip), %rax    # 0x36c3b0
movl (%rax), %ecx
orl $0x10, %ecx
leaq 0x2b9642(%rip), %rax    # 0x36c3b0
movl %ecx, (%rax)
jmp 0xb2d87
leaq 0x2b9637(%rip), %rax    # 0x36c3b0
movl (%rax), %ecx
andl $-0x11, %ecx
leaq 0x2b962b(%rip), %rax    # 0x36c3b0
movl %ecx, (%rax)
leaq 0x2b96fa(%rip), %rax    # 0x36c488
movl $0x56, (%rax)
movl -0x8(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xb2db9
leaq 0x2b9612(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
orl $0x10000, %ecx          # imm = 0x10000
leaq 0x2b9603(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
jmp 0xb2dd1
leaq 0x2b95f8(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
andl $0xfffeffff, %ecx       # imm = 0xFFFEFFFF
leaq 0x2b95e9(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
movl -0x8(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xb2df6
leaq 0x2b95d5(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
orl $0x20000, %ecx          # imm = 0x20000
leaq 0x2b95c6(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
jmp 0xb2e0e
leaq 0x2b95bb(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
andl $0xfffdffff, %ecx       # imm = 0xFFFDFFFF
leaq 0x2b95ac(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
movl -0x8(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xb2e33
leaq 0x2b9598(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
orl $0x40000, %ecx          # imm = 0x40000
leaq 0x2b9589(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
jmp 0xb2e4b
leaq 0x2b957e(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
andl $0xfffbffff, %ecx       # imm = 0xFFFBFFFF
leaq 0x2b956f(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
movl -0x8(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0xb2e70
leaq 0x2b955b(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
orl $0x80000, %ecx          # imm = 0x80000
leaq 0x2b954c(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
jmp 0xb2e88
leaq 0x2b9541(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
andl $0xfff7ffff, %ecx       # imm = 0xFFF7FFFF
leaq 0x2b9532(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
movl -0x8(%rbp), %eax
andl $0xc0, %eax
cmpl $0x0, %eax
je 0xb2eac
leaq 0x2b951c(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
orl $0x1, %ecx
leaq 0x2b9510(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
jmp 0xb2ec1
leaq 0x2b9505(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
andl $-0x2, %ecx
leaq 0x2b94f9(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
leaq 0x2b9548(%rip), %rax    # 0x36c410
movl $0x56, (%rax)
movl -0x8(%rbp), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0xb2ef5
leaq 0x2b94d6(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
orl $0x100000, %ecx         # imm = 0x100000
leaq 0x2b94c7(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
jmp 0xb2f0d
leaq 0x2b94bc(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
andl $0xffefffff, %ecx       # imm = 0xFFEFFFFF
leaq 0x2b94ad(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
jmp 0xb2f0f
leaq 0x1c729a(%rip), %rax    # 0x27a1b0
cmpl $0x1, (%rax)
jne 0xb2f20
callq 0xb2630
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)