// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_crx()
void parse_crx()
{
int i;

   if(get_msg_field()) {  // eat the TPS2
   }

   if(get_msg_field()) {  // PPS status
      i = atoi(msg_field);
      if(i) pps_enabled = 1;
      else  pps_enabled = 0;
      have_pps_enable = 87;
   }

   if(get_msg_field()) {  // PPS mode
      i = atoi(msg_field);
   }

   if(get_msg_field()) {  // PPS period
      i = atoi(msg_field);
      if(i == 1) {
         pps_rate = RATE_PP2S;
         have_pps_rate = 87;
      }
      else if(i == 0) {
         pps_rate = RATE_1PPS;
         have_pps_rate = 87;
      }
   }

   if(get_msg_field()) {  // PPS pulse width (msecs)
      esip_pps_width  = atoi(msg_field);
      have_pps_duty = 87;
   }

   if(get_msg_field()) {  // cable delay
      cable_delay = atof(msg_field);
      cable_delay /= 1.0E9;
      have_cable_delay = 87;
   }

   if(get_msg_field()) {  // PPS polaity
      i = atoi(msg_field);
      pps_polarity = i;
      have_pps_polarity = 87;
   }

   if(get_msg_field()) {  // pps_type
      i = atoi(msg_field);
      esip_pps_type = i;
      have_esip_pps_type = 87;
   }

   if(get_msg_field()) {  // pps accuracy (ns)
      i = atoi(msg_field);
      pps_offset = ((OFS_SIZE) i);
      have_pps_offset = 87;
   }

   if(get_msg_field()) {  // sawtooth
      dac_voltage = (float) atof(msg_field);
      have_sawtooth = 87;
   }

   if(get_msg_field()) {  // accuracy theshold
      i = atoi(msg_field);
      if(0 && (i >= 5) && (i <= 9999)) {
         pps_threshold = (float) atoi(msg_field);
         have_pps_threshold = 87;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb4ea4
jmp 0xb4ea4
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb4ee6
leaq 0x2e5d6b(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
je 0xb4ecf
leaq 0x2b8036(%rip), %rax    # 0x36cf00
movb $0x1, (%rax)
jmp 0xb4ed9
leaq 0x2b802a(%rip), %rax    # 0x36cf00
movb $0x0, (%rax)
leaq 0x2b75dc(%rip), %rax    # 0x36c4bc
movl $0x57, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb4eff
leaq 0x2e5d29(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0x4(%rbp)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb4f58
leaq 0x2e5d10(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0x4(%rbp)
cmpl $0x1, -0x4(%rbp)
jne 0xb4f37
leaq 0x2b7fde(%rip), %rax    # 0x36cf03
movb $-0x7e, (%rax)
leaq 0x2b7581(%rip), %rax    # 0x36c4b0
movl $0x57, (%rax)
jmp 0xb4f56
cmpl $0x0, -0x4(%rbp)
jne 0xb4f54
leaq 0x2b7fbf(%rip), %rax    # 0x36cf03
movb $0x2, (%rax)
leaq 0x2b7562(%rip), %rax    # 0x36c4b0
movl $0x57, (%rax)
jmp 0xb4f56
jmp 0xb4f58
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb4f86
leaq 0x2e5cb7(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x2b7fd9(%rip), %rax    # 0x36cf50
movl %ecx, (%rax)
leaq 0x2b7fc4(%rip), %rax    # 0x36cf44
movl $0x57, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb4fd6
leaq 0x2e5c89(%rip), %rdi    # 0x39ac20
callq 0x9480
leaq 0x2b8005(%rip), %rax    # 0x36cfa8
movsd %xmm0, (%rax)
leaq 0x2b7ffa(%rip), %rax    # 0x36cfa8
movsd (%rax), %xmm0
movsd 0xba06e(%rip), %xmm1    # 0x16f028
divsd %xmm1, %xmm0
leaq 0x2b7fe3(%rip), %rax    # 0x36cfa8
movsd %xmm0, (%rax)
leaq 0x2b74c4(%rip), %rax    # 0x36c494
movl $0x57, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb5008
leaq 0x2e5c39(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %ecx
leaq 0x2b7eff(%rip), %rax    # 0x36cef8
movl %ecx, (%rax)
leaq 0x2b74be(%rip), %rax    # 0x36c4c0
movl $0x57, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb503a
leaq 0x2e5c07(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %ecx
leaq 0x2b7f29(%rip), %rax    # 0x36cf54
movl %ecx, (%rax)
leaq 0x2b7f24(%rip), %rax    # 0x36cf58
movl $0x57, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb5070
leaq 0x2e5bd5(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0x4(%rbp)
cvtsi2sdl -0x4(%rbp), %xmm0
leaq 0x2b6939(%rip), %rax    # 0x36b998
movsd %xmm0, (%rax)
leaq 0x2b73ae(%rip), %rax    # 0x36c418
movl $0x57, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb50a6
leaq 0x2e5b9f(%rip), %rdi    # 0x39ac20
callq 0x9480
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x2b6b4b(%rip), %rax    # 0x36bbe0
movsd %xmm0, (%rax)
leaq 0x2b7504(%rip), %rax    # 0x36c5a4
movl $0x57, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb50bf
leaq 0x2e5b69(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0x4(%rbp)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)