// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_star_conf()
void parse_star_conf()   
{
char *s;

   // device configuration info
   log_packet_id("Star config");

   if(star_type == OSA_TYPE) {
      s = strstr(nmea_msg, "PPS_CABLE_DELAY:");
      if(s) {
         s = s+16;
         zpad(s,6);
         cable_delay = atof(s) / 1.0E9;
         have_cable_delay = 1;
      }

      s = strstr(nmea_msg, "PPS_OFFSET:");
      if(s) {
         s = s+11;
         zpad(s,9);
         pps1_delay = atof(s) / 1.0E9;
         have_pps_delay |= 0x01;
      }

      s = strstr(nmea_msg, "TAU:");
      if(s) {
         s = s+4;
         zpad(s,5);
         time_constant = (float) atof(s);  // user time const
         have_osc_params |= PARAM_TC;
         have_tc |= 0x01;

         s = s + 5 + 1;
         zpad(s,5);
         real_time_constant = (float) atof(s);
         have_tc |= 0x02;
      }

      if     (strstr(nmea_msg, "/INIT"))             discipline_mode = DIS_MODE_POWERUP;
      else if(strstr(nmea_msg, "/WARM-UP"))          discipline_mode = DIS_MODE_WARMUP;
      else if(strstr(nmea_msg, "/TRACKED-FAST"))     discipline_mode = DIS_MODE_FAST_RECOVERY;
      else if(strstr(nmea_msg, "/TRACKED"))          discipline_mode = DIS_MODE_NORMAL;
      else if(strstr(nmea_msg, "/HOLDOVER")) {
         if(strstr(nmea_msg, "MODE:HOLDOVER"))       discipline_mode = DIS_MODE_MANUAL_HOLD;
         else if(strstr(nmea_msg, "MODE:AUTOMATIC")) discipline_mode = DIS_MODE_AUTO_HOLD;
         else                                        discipline_mode = DIS_MODE_UNKNOWN;
      }
      else                                           discipline_mode = DIS_MODE_UNKNOWN;
   }
   else {
      if(get_msg_field()) {  // user time constant
         time_constant = (float) atof(msg_field);
         have_osc_params |= PARAM_TC;
         have_tc |= 0x01;
      }

      if(get_msg_field()) {  // real pll time constant
         real_time_constant = (float) atof(msg_field);
         have_tc |= 0x02;
      }

      if(get_msg_field()) {  // user mode (A)utomatic or (H)oldover
         if(msg_field[0] == 'H') rcvr_mode = RCVR_MODE_PROP;       // user holdover
         else if(msg_field[0] == 'A') {
            if(minor_alarms & MINOR_SURVEY) rcvr_mode = RCVR_MODE_3D;
            else rcvr_mode = RCVR_MODE_HOLD;  // position hold
         }
         else rcvr_mode = RCVR_MODE_UNKNOWN;
      }

      if(get_msg_field()) {  // time zone - !!!! we don't do this
      }

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x93e61(%rip), %rdi     # 0x12401a
callq 0x58e77
leaq 0x18ae23(%rip), %rax    # 0x21afe8
cmpl $0x4f, (%rax)
jne 0x9032a
leaq 0x2ab65b(%rip), %rdi    # 0x33b830
leaq 0x93e4a(%rip), %rsi     # 0x124026
callq 0x9090
testq %rax, %rax
je 0x90222
movq %rax, %rbx
addq $0x10, %rbx
movq %rbx, %rdi
movl $0x6, %esi
callq 0x8fd78
movq %rbx, %rdi
callq 0x9470
divsd 0x78e1e(%rip), %xmm0    # 0x109028
leaq 0x27dbb7(%rip), %rax    # 0x30ddc8
movsd %xmm0, (%rax)
leaq 0x27d098(%rip), %rax    # 0x30d2b4
movl $0x1, (%rax)
leaq 0x2ab607(%rip), %rdi    # 0x33b830
leaq 0x93e07(%rip), %rsi     # 0x124037
callq 0x9090
testq %rax, %rax
je 0x90273
movq %rax, %rbx
addq $0xb, %rbx
movq %rbx, %rdi
movl $0x9, %esi
callq 0x8fd78
movq %rbx, %rdi
callq 0x9470
divsd 0x78dca(%rip), %xmm0    # 0x109028
leaq 0x27db73(%rip), %rax    # 0x30ddd8
movsd %xmm0, (%rax)
leaq 0x27d048(%rip), %rax    # 0x30d2b8
orb $0x1, (%rax)
leaq 0x2ab5b6(%rip), %rdi    # 0x33b830
leaq 0x93dc2(%rip), %rsi     # 0x124043
callq 0x9090
testq %rax, %rax
je 0x902ff
movq %rax, %rbx
leaq 0x4(%rax), %r14
movq %r14, %rdi
movl $0x5, %esi
callq 0x8fd78
movq %r14, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x27ce3a(%rip), %rax    # 0x30d0f0
movsd %xmm0, (%rax)
leaq 0x27db3b(%rip), %rax    # 0x30ddfc
orb $0x1, (%rax)
leaq 0x27d025(%rip), %r14    # 0x30d2f0
orb $0x1, (%r14)
addq $0xa, %rbx
movq %rbx, %rdi
movl $0x5, %esi
callq 0x8fd78
movq %rbx, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x27ce01(%rip), %rax    # 0x30d0f8
movsd %xmm0, (%rax)
orb $0x2, (%r14)
leaq 0x2ab52a(%rip), %rdi    # 0x33b830
leaq 0x93d3b(%rip), %rsi     # 0x124048
callq 0x9090
testq %rax, %rax
je 0x903cc
leaq 0x27d175(%rip), %rax    # 0x30d497
movb $0x1, (%rax)
jmp 0x90439
callq 0x811da
testl %eax, %eax
je 0x90366
leaq 0x2ab706(%rip), %rdi    # 0x33ba40
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x27cda2(%rip), %rax    # 0x30d0f0
movsd %xmm0, (%rax)
leaq 0x27daa3(%rip), %rax    # 0x30ddfc
orb $0x1, (%rax)
leaq 0x27cf8d(%rip), %rax    # 0x30d2f0
orb $0x1, (%rax)
callq 0x811da
testl %eax, %eax
je 0x90398
leaq 0x2ab6ca(%rip), %rdi    # 0x33ba40
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x27cd6e(%rip), %rax    # 0x30d0f8
movsd %xmm0, (%rax)
leaq 0x27cf5b(%rip), %rax    # 0x30d2f0
orb $0x2, (%rax)
callq 0x811da
testl %eax, %eax
je 0x903ff
leaq 0x2ab698(%rip), %rax    # 0x33ba40
movzbl (%rax), %eax
cmpl $0x48, %eax
je 0x903f0
cmpl $0x41, %eax
jne 0x903f4
leaq 0x27ce1c(%rip), %rax    # 0x30d1d8
xorl %ecx, %ecx
testb $0x20, (%rax)
sete %cl
leal (%rcx,%rcx,2), %eax
addl $0x4, %eax
jmp 0x903f6
leaq 0x2ab45d(%rip), %rdi    # 0x33b830
leaq 0x93c74(%rip), %rsi     # 0x12404e
callq 0x9090
testq %rax, %rax
je 0x9043e
leaq 0x27d0ac(%rip), %rax    # 0x30d497
movb $0xa, (%rax)
jmp 0x90439
movb $0x8, %al
jmp 0x903f6
movb $0x63, %al
leaq 0x27ccd3(%rip), %rcx    # 0x30d0d0
movb %al, (%rcx)
callq 0x811da
callq 0x811da
testl %eax, %eax
je 0x90439
leaq 0x2ab62c(%rip), %rdi    # 0x33ba40
callq 0x9470
divsd 0x78c07(%rip), %xmm0    # 0x109028
leaq 0x27d9a0(%rip), %rax    # 0x30ddc8
movsd %xmm0, (%rax)
leaq 0x27ce81(%rip), %rax    # 0x30d2b4
movl $0x16, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x2ab3eb(%rip), %rdi    # 0x33b830
leaq 0x93c0b(%rip), %rsi     # 0x124057
callq 0x9090
testq %rax, %rax
je 0x90462
leaq 0x27d03a(%rip), %rax    # 0x30d497
movb $0x5, (%rax)
jmp 0x90439
leaq 0x2ab3c7(%rip), %rdi    # 0x33b830
leaq 0x93bf5(%rip), %rsi     # 0x124065
callq 0x9090
testq %rax, %rax
je 0x90486
leaq 0x27d016(%rip), %rax    # 0x30d497
movb $0x0, (%rax)
jmp 0x90439
leaq 0x2ab3a3(%rip), %rdi    # 0x33b830
leaq 0x93bda(%rip), %rsi     # 0x12406e
callq 0x9090
testq %rax, %rax
je 0x904ec
leaq 0x2ab38b(%rip), %rdi    # 0x33b830
leaq 0x93bcc(%rip), %rsi     # 0x124078
callq 0x9090
testq %rax, %rax
je 0x904c5
leaq 0x27cfda(%rip), %rax    # 0x30d497
movb $0x3, (%rax)
jmp 0x90439
leaq 0x2ab364(%rip), %rdi    # 0x33b830
leaq 0x93bb3(%rip), %rsi     # 0x124086
callq 0x9090
testq %rax, %rax
je 0x904ec
leaq 0x27cfb3(%rip), %rax    # 0x30d497
movb $0x2, (%rax)
jmp 0x90439
leaq 0x27cfa4(%rip), %rax    # 0x30d497
movb $-0x1, (%rax)
jmp 0x90439