LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_prs_to(int)
void set_prs_to(int val)
{
   if(read_only) return;

   sprintf(out, "TO%d", val);
   queue_prs_cmd(out, PRS_TO_MSG);
   queue_prs_cmd("TO?", PRS_TO_MSG);
   queue_prs_cmd("TT?", PRS_TT_MSG);
}

// Assembly:
leaq 0x2a96ab(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x8d975
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %edx
leaq 0x2ae89c(%rip), %rbx    # 0x33c220
leaq 0x96279(%rip), %rsi     # 0x123c04
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x208, %esi            # imm = 0x208
callq 0x5ee52
leaq 0x9603e(%rip), %rdi     # 0x1239e7
movl $0x208, %esi            # imm = 0x208
callq 0x5ee52
leaq 0x95ffe(%rip), %rdi     # 0x1239b8
movl $0x206, %esi            # imm = 0x206
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5ee52
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: update_x72_screen()
void update_x72_screen()
{
int i;

   // update the screen every second.  When the seconds tick, request the
   // high priority messages.

   i = get_norcvr_message();   // returns true if seconds just ticked
   if(i && (prs_poll_tick == 0)) prs_poll_tick = 1;  // trigger high priority message polls

   if(i) {
      if(x72_tic_timer > 0) {  // tic reg changed, wait for it to take effect
         --x72_tic_timer;
         return;
      }
      else x72_tic_timer = 0;

      if(have_x72_pps && x72_state_set && x72_user_dis) {
         x72_sw_discipline();  // do disciplining
      }
      else if(x72_fw_discipline()) {
      }
      else {
         discipline_mode = DIS_MODE_NORMAL;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x82578
testl %eax, %eax
je 0x8df64
cmpl $0x0, 0x2deca0(%rip)    # 0x36cbf8
jne 0x8df64
movl $0x1, 0x2dec94(%rip)    # 0x36cbf8
testl %eax, %eax
je 0x8df79
leaq 0x18cfc9(%rip), %rax    # 0x21af38
movl (%rax), %ecx
testl %ecx, %ecx
jle 0x8df7b
decl %ecx
movl %ecx, (%rax)
popq %rbp
retq
movl $0x0, (%rax)
leaq 0x18cd48(%rip), %rax    # 0x21acd0
cmpl $0x0, (%rax)
je 0x8dfab
leaq 0x18cd7c(%rip), %rax    # 0x21ad10
cmpl $0x0, (%rax)
je 0x8dfab
leaq 0x18cf50(%rip), %rax    # 0x21aef0
cmpl $0x0, (%rax)
je 0x8dfab
popq %rbp
jmp 0x8dfc0
callq 0x6cc14
testl %eax, %eax
jne 0x8df79
leaq 0x27f4dc(%rip), %rax    # 0x30d497
movb $0x0, (%rax)
jmp 0x8df79
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: x72_sw_discipline()
void x72_sw_discipline()
{
   // X72 software discipline algorithm state dispatcher

   if(x72_restore_timeout > 0) {  // message sync lost, pause disciplining
      --x72_restore_timeout;
      return;
   }

   if(x72_user_dis == 0) {
//    x72_user_state = x72_state = X72_STATE_DISCIPLINE;
      return;  // not doing software disciplning
   }


//sprintf(debug_text, "X72 state: %d  disci:%d  rblock:%04X  have_pps:%d  x72_pps:%d  dds:%g", x72_user_state, x72_user_dis, x72_creg & 0x0002, have_x72_pps, x72_pps, last_x72_dds);
   discipline_mode = DIS_MODE_AUTO_HOLD;
   if(x72_creg & 0x0002) {
      return;  // Rb not locked
   }
   if(x72_creg & 0x0008) {
      discipline_mode = DIS_MODE_NORMAL;
      return;  // PPS output not enabled
   }

   x72_state = x72_user_state;  // so firmware diciplining state display code works with software disciplining
   have_x72_state = 1;

   // dispatch to X72 sw discipline state handler
   if     (x72_user_state == X72_STATE_START0)     x72_init_state0();
   else if(x72_user_state == X72_STATE_START1)     x72_init_state1();
   else if(x72_user_state == X72_STATE_START2)     ;  // not used
   else if(x72_user_state == X72_STATE_HOLDOVER)   x72_holdover_state();  // not used
   else if(x72_user_state == X72_STATE_JAM1)       x72_jam1_state();      // not used
   else if(x72_user_state == X72_STATE_JAM2) {
      discipline_mode = DIS_MODE_NORMAL;  // !!! comment out to show TIC updates as holdover marks at the top of the plot
      x72_jam2_state();
   }
   else if(x72_user_state == X72_STATE_DISCIPLINE) {
      discipline_mode = DIS_MODE_NORMAL;
      x72_discipline_state();
   }
   else if(x72_user_state == X72_STATE_PIDCALC)    ;  // not used
   else if(x72_user_state == X72_STATE_PIDUPDATE)  ;  // not used
   else if(x72_user_state == X72_STATE_SLOPECALC)  x72_slopecalc_state();  // not used
   else x72_init_state0();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x2dec0a(%rip), %eax    # 0x36cbd4
testl %eax, %eax
jle 0x8dfd8
decl %eax
movl %eax, 0x2debfe(%rip)    # 0x36cbd4
popq %rbp
retq
leaq 0x18cf11(%rip), %rax    # 0x21aef0
cmpl $0x0, (%rax)
je 0x8dfd6
leaq 0x27f4ac(%rip), %rax    # 0x30d497
movb $0x2, (%rax)
leaq 0x18cde3(%rip), %rcx    # 0x21add8
movl (%rcx), %ecx
testb $0x2, %cl
jne 0x8dfd6
testb $0x8, %cl
jne 0x8e039
movl 0x2debdd(%rip), %ecx    # 0x36cbe4
leaq 0x18cdf2(%rip), %rdx    # 0x21ae00
movl %ecx, (%rdx)
leaq 0x18ccbd(%rip), %rdx    # 0x21acd4
movl $0x1, (%rdx)
cmpq $0x6, %rcx
ja 0x8e050
leaq 0x91546(%rip), %rdx     # 0x11f570
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
popq %rbp
jmp 0xc11c6
movb $0x0, (%rax)
jmp 0x8dfd6
popq %rbp
jmp 0xc1450
popq %rbp
jmp 0xc1278
popq %rbp
jmp 0xc12b8
leal -0x7(%rcx), %eax
cmpl $0x2, %eax
jb 0x8dfd6
cmpl $0x9, %ecx
jne 0x8e033
popq %rbp
jmp 0xc1379
movb $0x0, (%rax)
popq %rbp
jmp 0xc14b4
movb $0x0, (%rax)
popq %rbp
jmp 0xc14fc
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_x72_response(int)
void parse_x72_response(int id)
{
   // prepare to decode the multi-line query response

   x72_response = id;
// if(debug_file) fprintf(debug_file, "X72 %d start (%s)\n", id, nmea_msg);
   x72_line = 0;
   scpi_col = 0;
   scpi_status_line[0] = 0;

   strcpy(scpi_status_line, nmea_msg);  // record the first line of the response
   parse_x72_val(x72_response);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl %edi, 0x2deb45(%rip)    # 0x36cbcc
xorl %eax, %eax
movl %eax, 0x2deb41(%rip)    # 0x36cbd0
movl %eax, 0x2deb2f(%rip)    # 0x36cbc4
movb $0x0, 0x2deaa4(%rip)    # 0x36cb40
leaq 0x2dea9d(%rip), %rdi    # 0x36cb40
leaq 0x2ad786(%rip), %rsi    # 0x33b830
callq 0x9340
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x8e0bc
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: info_param(char*)
char *info_param(char *param)
{
int len;
char *s;

   if(param == 0) return 0;

   len = strlen(param);
   s = strstr(scpi_status_line, param);
   if(s) {
      return (s+len+1);
   }

   return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x8f429
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x2dd739(%rip), %rdi    # 0x36cb40
movq %rbx, %rsi
callq 0x9090
testq %rax, %rax
je 0x8f42c
movq %rax, %r14
movq %rbx, %rdi
callq 0x9120
cltq
addq %r14, %rax
incq %rax
jmp 0x8f42e
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: decode_x72_creg()
void decode_x72_creg()
{
   // set various flags based upon the control reg value

   if(x72_creg & 0x0008) pps_enabled = 0;
   else                  pps_enabled = 1;

   if(x72_creg & 0x0040) x72_sine_level = 0;
   else {
      x72_sine_level = 40;
      if(x72_creg & 0x0080) x72_sine_level += 30;
      if(x72_creg & 0x0100) x72_sine_level += 20;
      if(x72_creg & 0x0200) x72_sine_level += 10;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x18b630(%rip), %rax    # 0x21add8
movl (%rax), %eax
testb $0x8, %al
leaq 0x27e56d(%rip), %rcx    # 0x30dd20
sete (%rcx)
xorl %ecx, %ecx
testb $0x40, %al
jne 0x8f7e9
testb %al, %al
movl $0x28, %ecx
movl $0x46, %edx
cmovnsl %ecx, %edx
leal 0x14(%rdx), %esi
btl $0x8, %eax
cmovael %edx, %esi
leaq 0x18b61c(%rip), %rcx    # 0x21adf8
movl %esi, (%rcx)
btl $0x9, %eax
jae 0x8f7f2
movl (%rcx), %ecx
addl $0xa, %ecx
leaq 0x18b608(%rip), %rax    # 0x21adf8
movl %ecx, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: x72_sync_fail(int)
int x72_sync_fail(int id)
{
int flag;
   // return true is message response is not valid for the requested message
   // !!!!! this routines needs to be more robust...  we currently only
   //       check for health response to a non-health request

   flag = 0;
   if(strstr(scpi_status_line, "ADATA") && (id != X72_HEALTH_MSG)) {  // health response
      need_x72_resync = id;
      flag = 1;
   }
   else if(strstr(scpi_status_line, "CONTROL REG") && (id != X72_GET_CREG_MSG)) {  // health response
      need_x72_resync = id;
      flag = 1;
   }
   else if(strstr(scpi_status_line, "DELTA REG") && (id != X72_GET_PPS_MSG)) {  // health response
      need_x72_resync = id;
      flag = 1;
   }

   if(flag) {  // unexpected response to a query was seen
      if(debug_file) fprintf(debug_file, "\n###! x72 msg %d sync fail! (%s)\n\n", id, scpi_status_line);
      return 1;
   }

   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x2dd33c(%rip), %rdi    # 0x36cb40
leaq 0x944ee(%rip), %rsi     # 0x123cf9
callq 0x9090
cmpl $0x2c9, %ebx            # imm = 0x2C9
je 0x8f81d
testq %rax, %rax
jne 0x8f860
leaq 0x2dd31c(%rip), %rdi    # 0x36cb40
leaq 0x944d4(%rip), %rsi     # 0x123cff
callq 0x9090
cmpl $0x2c5, %ebx            # imm = 0x2C5
je 0x8f83d
testq %rax, %rax
jne 0x8f860
leaq 0x2dd2fc(%rip), %rdi    # 0x36cb40
leaq 0x944c0(%rip), %rsi     # 0x123d0b
callq 0x9090
xorl %r14d, %r14d
cmpl $0x2c1, %ebx            # imm = 0x2C1
je 0x8f892
testq %rax, %rax
je 0x8f892
movl %ebx, 0x2dd372(%rip)    # 0x36cbd8
leaq 0x1aeb23(%rip), %rax    # 0x23e390
movq (%rax), %rdi
movl $0x1, %r14d
testq %rdi, %rdi
je 0x8f892
leaq 0x94493(%rip), %rsi     # 0x123d15
leaq 0x2dd2b7(%rip), %rcx    # 0x36cb40
movl %ebx, %edx
xorl %eax, %eax
callq 0x9560
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_x72_message()
void get_x72_message()
{
u08 c;
static int row=0;

   // This routine buffers up an incoming X72 message.  When the end of the
   // message is seen, the message is parsed and decoded with decode_x72_msg()

   if(SERIAL_DATA_AVAILABLE(RCVR_PORT) == 0) {
      check_com_timer(RCVR_PORT);
      return;
   }
   else {
      reset_com_timer(RCVR_PORT);
   }

   c = get_com_char();
   if(c == 0x0D) return;  // ignore CR,  we end if LF char

   if(x72_response) {     // we are reading multi-line response query results
      get_x72_response(c);
      return;
   }

   if(com[RCVR_PORT].rcv_error) {      // parity/framing/overrun errors
      com[RCVR_PORT].rcv_error = 0;
//!!!!!qqqq    goto rst_msg;
   }

   if(tsip_sync == 0) {    // syncing to start of message
      tsip_sync = 1;
      get_sync_time();

      tsip_wptr = 0;
      tsip_rptr = 0;
      goto get_msg;
   }
   else if(tsip_sync == 1) { // message start has been seen, now build the message
      get_msg:
      if(c == 0x0A) goto x72_end; 
      else if(c == 0x0D) goto x72_end; 

      if(tsip_wptr < (MAX_TSIP-2)) {  // add char to the message buffer
         tsip_buf[tsip_wptr++] = c;
         tsip_buf[tsip_wptr] = 0;
         if((tsip_buf[0] == 'r') && (tsip_buf[1] == '>')) {  // command prompt
            goto x72_end;
         }
      }
      else {  // buffer overlow
         goto rst_msg;
      }
   }
   else {
      x72_end:
      if(tsip_wptr > 0) {
         decode_x72_msg(2);
         packet_end = 1;
      }

      rst_msg:
      tsip_sync = 0;
      tsip_rptr = 0;
      tsip_wptr = 0;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl $0xa, %edi
callq 0xb9c3
movl $0xa, %edi
testl %eax, %eax
je 0x8fa39
callq 0x1ea2c
callq 0x584d5
cmpl $0xd, %eax
je 0x8fb10
movl %eax, %ebx
cmpl $0x0, 0x2dd1a1(%rip)    # 0x36cbcc
je 0x8fa42
movsbl %bl, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x8f8bf
popq %rbx
popq %r14
popq %rbp
jmp 0x1e6a0
leaq 0x27e897(%rip), %rax    # 0x30e2e0
cmpb $0x0, 0x17a12(%rax)
je 0x8fa59
movb $0x0, 0x17a12(%rax)
leaq 0x2a87f6(%rip), %r14    # 0x338256
movzwl (%r14), %eax
testw %ax, %ax
je 0x8fa7c
cmpw $0x1, %ax
setne %al
cmpl $0xa, %ebx
sete %cl
orb %al, %cl
je 0x8faa2
jmp 0x8fad5
movw $0x1, (%r14)
callq 0x58682
leaq 0x2a87c4(%rip), %rax    # 0x338252
xorl %ecx, %ecx
movw %cx, (%rax)
leaq 0x2a87ba(%rip), %rax    # 0x338254
movw %cx, (%rax)
cmpl $0xa, %ebx
je 0x8fad5
leaq 0x2a87a9(%rip), %rcx    # 0x338252
movzwl (%rcx), %eax
cmpq $0xffd, %rax            # imm = 0xFFD
ja 0x8faf6
leaq 0x1(%rax), %rdx
movw %dx, (%rcx)
leaq 0x2a778e(%rip), %rcx    # 0x337250
movb %bl, (%rcx,%rax)
movb $0x0, 0x1(%rcx,%rax)
cmpb $0x72, (%rcx)
jne 0x8fb10
cmpb $0x3e, 0x1(%rcx)
jne 0x8fb10
leaq 0x2a8776(%rip), %rax    # 0x338252
cmpw $0x0, (%rax)
je 0x8faf6
movl $0x2, %edi
callq 0x8ef4c
movl $0x1, 0x2dc19e(%rip)    # 0x36bc94
xorl %eax, %eax
movw %ax, (%r14)
leaq 0x2a8751(%rip), %rcx    # 0x338254
movw %ax, (%rcx)
leaq 0x2a8745(%rip), %rcx    # 0x338252
movw %ax, (%rcx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_x72_efc(int)
void set_x72_efc(int val)
{
   // set the X72 EFC input enabled
   if(read_only) return;

   last_x72_efc = val;
   user_set_x72_efc = 1;
   save_x72_state();

   val &= 1;
   sprintf(out, "a%d", val);
   queue_x72_cmd(out, X72_SET_FC_MSG);
///   queue_x72_cmd("i", X72_INFO_MSG);
}

// Assembly:
leaq 0x2a74fe(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x8fb22
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x18b39e(%rip), %rax    # 0x21aed0
movl %edi, (%rax)
leaq 0x18b389(%rip), %rax    # 0x21aec4
movl $0x1, (%rax)
callq 0x6bcbc
andl $0x1, %ebx
leaq 0x2ac6d0(%rip), %r14    # 0x33c220
leaq 0x942e9(%rip), %rsi     # 0x123e40
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
movl $0x2bc, %esi            # imm = 0x2BC
popq %rbx
popq %r14
popq %rbp
jmp 0x5ee52
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_x72_tic(int)
void set_x72_tic(int val)
{
   // set the X72 PPS TIC offset value
   if(read_only) return;

   if(val < 0) {
      val = IABS(val) % ((int) x72_osc);
      if(val) val = ((int) x72_osc) - val;
   }
   else {
      val = (val % (int) x72_osc);
   }

   last_x72_tic = val;
   user_set_x72_tic = 1;
   save_x72_state();

   sprintf(out, "k%d", val);
   queue_x72_cmd(out, X72_SET_TIC_MSG);
   x72_tic_timer = 6;  // it takes 6 seconds for a TIC change to take effect
   x72_tic_changed = 1;
}

// Assembly:
leaq 0x2a749f(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x8fb81
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x18b0d6(%rip), %rax    # 0x21ac68
cvttsd2si (%rax), %ecx
movl %edi, %eax
cltd
idivl %ecx
movl %edx, %ebx
addl %edx, %ecx
testl %edx, %edx
cmovel %edx, %ecx
testl %edi, %edi
cmovsl %ecx, %ebx
leaq 0x18b328(%rip), %rax    # 0x21aed8
movl %ebx, (%rax)
leaq 0x18b307(%rip), %rax    # 0x21aec0
movl $0x1, %r15d
movl %r15d, (%rax)
callq 0x6bcbc
leaq 0x2ac652(%rip), %r14    # 0x33c220
leaq 0x9426f(%rip), %rsi     # 0x123e44
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
movl $0x2c2, %esi            # imm = 0x2C2
callq 0x5ee52
leaq 0x18b343(%rip), %rax    # 0x21af38
movl $0x6, (%rax)
movl %r15d, 0x2dcff2(%rip)   # 0x36cbf4
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_x72_acmos_freq(int)
void set_x72_acmos_freq(int val)
{
   // set the X72 ACMOS freq
   if(read_only) return;

   last_x72_acmos_freq = val;
   user_set_x72_acmos_freq = 1;
   save_x72_state();

   sprintf(out, "o%d", val);
   queue_x72_cmd(out, X72_SET_FREQ_MSG);
}

// Assembly:
leaq 0x2a7406(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x8fc1a
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x18b2a2(%rip), %rax    # 0x21aecc
movl %edi, (%rax)
leaq 0x18b285(%rip), %rax    # 0x21aeb8
movl $0x1, (%rax)
callq 0x6bcbc
leaq 0x2ac5db(%rip), %r14    # 0x33c220
leaq 0x94202(%rip), %rsi     # 0x123e4e
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
movl $0x2c4, %esi            # imm = 0x2C4
popq %rbx
popq %r14
popq %rbp
jmp 0x5ee52
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_x72_srvc(int)
void set_x72_srvc(int val)
{
   // set the X72 service pin polarity
   if(read_only) return;

   last_x72_srvc = val;
   user_set_x72_srvc = 1;
   save_x72_state();

   val &= 1;
   sprintf(out, "l%d", val);
   queue_x72_cmd(out, X72_SET_SRVC_MSG);
///   queue_x72_cmd("i", X72_INFO_MSG);
}

// Assembly:
leaq 0x2a73aa(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x8fc76
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x18b256(%rip), %rax    # 0x21aedc
movl %edi, (%rax)
leaq 0x18b239(%rip), %rax    # 0x21aec8
movl $0x1, (%rax)
callq 0x6bcbc
andl $0x1, %ebx
leaq 0x2ac57c(%rip), %r14    # 0x33c220
leaq 0x941ad(%rip), %rsi     # 0x123e58
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
movl $0x2c3, %esi            # imm = 0x2C3
popq %rbx
popq %r14
popq %rbp
jmp 0x5ee52
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: x72_start_discipline()
void x72_start_discipline()
{
   // enable X72 discipline algorithm... based upon the outline in the
   // X72 manual

   x72_user_dis = 1;  // we are doing software disciplining
   x72_user_state = X72_STATE_START0;
   x72_init_done = 0;
   x72_1pps_present = 0;
   x72_start_timer = 0;

   if(pps_enabled == 0) {  // PPS output must be enabled in order for TIC command to work
      user_pps_enable = 1;
      set_pps(user_pps_enable, pps_polarity,  delay_value, pps1_delay,  pps_threshold, 4);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x18b21d(%rip), %rax    # 0x21aef0
movl $0x1, (%rax)
xorl %eax, %eax
movl %eax, 0x2dcf03(%rip)    # 0x36cbe4
movl %eax, 0x2e6931(%rip)    # 0x376618
movl %eax, 0x2e692f(%rip)    # 0x37661c
movl %eax, 0x2e6965(%rip)    # 0x376658
leaq 0x27e026(%rip), %rax    # 0x30dd20
cmpb $0x0, (%rax)
je 0x8fd01
popq %rbp
retq
leaq 0x27e019(%rip), %rax    # 0x30dd21
movb $0x1, (%rax)
leaq 0x27e006(%rip), %rax    # 0x30dd18
movzbl (%rax), %esi
leaq 0x27e0a4(%rip), %rax    # 0x30ddc0
movsd (%rax), %xmm0
leaq 0x27e0b1(%rip), %rax    # 0x30ddd8
movsd (%rax), %xmm1
leaq 0x27dfea(%rip), %rax    # 0x30dd1c
movss (%rax), %xmm2
movl $0x1, %edi
movl $0x4, %edx
popq %rbp
jmp 0x6ad1d
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: x72_reset_filter()
void x72_reset_filter(void)
{
   x72_dds_count = 0;
   x72_dds_list[0] = 0.0;
   x72_dds_in = x72_dds_out = 0;
   x72_dds_sum = 0.0;
   filtered_dds = 0.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x18b1d7(%rip), %rax    # 0x21af28
xorl %ecx, %ecx
movl %ecx, (%rax)
movq %rcx, 0x2e69d4(%rip)    # 0x376730
movl %ecx, 0x2e9fce(%rip)    # 0x379d30
movl %ecx, 0x2e9fcc(%rip)    # 0x379d34
movq %rcx, 0x2e9fb9(%rip)    # 0x379d28
movq %rcx, 0x2e9fc2(%rip)    # 0x379d38
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: zpad(char*, int)
void zpad(char *s, int n)
{
int i;
int minus;

   // replace blanks in a string with '0'

   if(s == 0) return;

   minus = 0;
   for(i=0; i<n; i++) {
      if(s[i] == 0) return;
      if(s[i] == ' ') s[i] = '0';
      if(s[i] == '-') {
         s[i] = '0';
         minus = 1;
      }
   }
   if(minus && (s[0] == '0')) s[0] = '-';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
sete %al
testl %esi, %esi
setle %cl
orb %al, %cl
jne 0x8fdc7
movl %esi, %eax
xorl %ecx, %ecx
xorl %edx, %edx
movzbl (%rdi,%rcx), %esi
cmpl $0x20, %esi
je 0x8fda0
testl %esi, %esi
jne 0x8fda4
jmp 0x8fdc7
movb $0x30, (%rdi,%rcx)
cmpb $0x2d, (%rdi,%rcx)
jne 0x8fdb3
movb $0x30, (%rdi,%rcx)
movl $0x1, %edx
incq %rcx
cmpq %rcx, %rax
jne 0x8fd91
testl %edx, %edx
je 0x8fdc7
cmpb $0x30, (%rdi)
jne 0x8fdc7
movb $0x2d, (%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_star_hbsq()
void parse_star_hbsq()  
{
char *s;

   // output squelch control

   log_packet_id("Star HBSQ");
   user_hbsq = current_hbsq = (-1);

   if(get_msg_field()) { 
      user_hbsq = atoi(msg_field);
      have_star_hbsq |= 0x01;
   }

   if(star_type == OSA_TYPE) {
      s = strchr(nmea_msg, '/');
      if(s) {
         s = s + 1;
         zpad(s,4);
         current_hbsq = atoi(s);
         have_star_hbsq |= 0x02;
      }
   }
   else {
      if(get_msg_field()) { 
         current_hbsq = atoi(msg_field);
         have_star_hbsq |= 0x02;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x93b8c(%rip), %rdi     # 0x124095
callq 0x58e77
leaq 0x2ad82f(%rip), %r14    # 0x33dd44
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, (%r14)
leaq 0x2ad81c(%rip), %rbx    # 0x33dd40
movl %eax, (%rbx)
callq 0x811da
testl %eax, %eax
je 0x90547
leaq 0x2ab50a(%rip), %rdi    # 0x33ba40
callq 0x95e0
movl %eax, (%rbx)
leaq 0x2ad804(%rip), %rax    # 0x33dd48
orb $0x1, (%rax)
leaq 0x18aa9a(%rip), %rax    # 0x21afe8
cmpl $0x4f, (%rax)
jne 0x9057e
leaq 0x2ab2d6(%rip), %rdi    # 0x33b830
movl $0x2f, %esi
callq 0x9100
testq %rax, %rax
je 0x905a3
movq %rax, %rbx
incq %rbx
movq %rbx, %rdi
movl $0x4, %esi
callq 0x8fd78
jmp 0x9058e
callq 0x811da
testl %eax, %eax
je 0x905a3
leaq 0x2ab4b2(%rip), %rbx    # 0x33ba40
movq %rbx, %rdi
callq 0x95e0
movl %eax, (%r14)
leaq 0x2ad7a8(%rip), %rax    # 0x33dd48
orb $0x2, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: fake_second_check(int)
void fake_second_check(int why)
{
double this_msec;

   // This routine checks to see if we need to fake a time message for receivers
   // that only send time every other second or for SCPI type receivers that
   // take a long time to process the SYST:STAT? message

if((why < 10) && (rcvr_type == UCCM_RCVR)) return;

   if(fake_msec) {                     // fake time stamp enabled
      this_msec = GetMsecs();
if(0 && debug_file) fprintf(debug_file, "fsc %d: this:%f fake:%f  count:%d\n", why, this_msec, fake_msec, fake_count);
      if(this_msec >= (fake_msec)) {  // it's time to fake it
         fake_missing_second(-1.000);  // negative value adds a second
         fake_msec += 1000.0;  // !!!! (1000.0 / nav_rate)?
         if(++fake_count > MAX_FAKE_COUNT) {
if(0 && debug_file) fprintf(debug_file, "fsc reset!  count=%d\n", fake_count);
            fake_count = 0;
            fake_msec = 0.0;  // limit number of consecutive faked seconds
         }
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0xa, %edi
setge %al
leaq 0x187df5(%rip), %rcx    # 0x2188d0
cmpq $0x8, (%rcx)
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x90b4d
leaq 0x27cc08(%rip), %rbx    # 0x30d6f8
movsd (%rbx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x90b00
jnp 0x90b4d
callq 0xaea1
ucomisd (%rbx), %xmm0
jb 0x90b4d
movsd 0x785e5(%rip), %xmm0    # 0x1090f8
callq 0x908b0
movsd (%rbx), %xmm0
addsd 0x78514(%rip), %xmm0    # 0x109038
movsd %xmm0, (%rbx)
movl 0x2e132a(%rip), %eax    # 0x371e58
leal 0x1(%rax), %ecx
movl %ecx, 0x2e1321(%rip)    # 0x371e58
cmpl $0xa, %eax
jl 0x90b4d
movl $0x0, 0x2e1312(%rip)    # 0x371e58
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_star_output()
void parse_star_output()
{
   // !!!! 4531
   log_packet_id("Star output");
   if(get_msg_field()) {
      if(strstr(msg_field, "E1")) {
         osa_output_type = 1;
         have_osa_output = 1;
      }
      else if(strstr(msg_field, "FR")) {
         osa_output_type = 2;
         have_osa_output = 1;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x92ab1(%rip), %rdi     # 0x1241e0
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0x9178d
leaq 0x2aa2fc(%rip), %rdi    # 0x33ba40
leaq 0x92bb6(%rip), %rsi     # 0x124301
callq 0x9090
movl $0x1, %ecx
testq %rax, %rax
jne 0x91777
leaq 0x2aa2df(%rip), %rdi    # 0x33ba40
leaq 0x92ba8(%rip), %rsi     # 0x124310
callq 0x9090
movl $0x2, %ecx
testq %rax, %rax
je 0x9178d
leaq 0x2ac5ee(%rip), %rax    # 0x33dd6c
movl %ecx, (%rax)
leaq 0x2ac5e1(%rip), %rax    # 0x33dd68
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_star_prior()
void parse_star_prior()
{
   // !!!! 4531
   log_packet_id("Star priority");
   if(get_msg_field()) {
      osa_gps_prior = msg_field[0] - '0';
      osa_aux_prior = msg_field[1] - '0';
      have_osa_prior = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x92a52(%rip), %rdi     # 0x1241ec
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0x917db
leaq 0x2aa291(%rip), %rax    # 0x33ba40
movsbl (%rax), %ecx
addl $-0x30, %ecx
leaq 0x2ac5a4(%rip), %rdx    # 0x33dd60
movl %ecx, (%rdx)
movsbl 0x1(%rax), %eax
addl $-0x30, %eax
leaq 0x2ac598(%rip), %rcx    # 0x33dd64
movl %eax, (%rcx)
leaq 0x2ac587(%rip), %rax    # 0x33dd5c
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_star_aux_inp()
void parse_star_aux_inp()
{
   // !!!! 4531
   log_packet_id("Star aux time");
   if(get_msg_field()) {
      osa_aux_c = msg_field[0] - '0';
      osa_aux_t = msg_field[1] - '0';
      have_osa_aux = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x92a12(%rip), %rdi     # 0x1241fa
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0x91829
leaq 0x2aa243(%rip), %rax    # 0x33ba40
movsbl (%rax), %ecx
addl $-0x30, %ecx
leaq 0x2ac56a(%rip), %rdx    # 0x33dd74
movl %ecx, (%rdx)
movsbl 0x1(%rax), %eax
addl $-0x30, %eax
leaq 0x2ac55e(%rip), %rcx    # 0x33dd78
movl %eax, (%rcx)
leaq 0x2ac54d(%rip), %rax    # 0x33dd70
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_star_adm()
void parse_star_adm()
{
   // !!!! 4531
   log_packet_id("Star adm");
   if(get_msg_field()) {
      osa_gps_adm = msg_field[0] - '0';
      osa_aux_adm = msg_field[1] - '0';
      have_osa_adm = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x929d2(%rip), %rdi     # 0x124208
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0x91877
leaq 0x2aa1f5(%rip), %rax    # 0x33ba40
movsbl (%rax), %ecx
addl $-0x30, %ecx
leaq 0x2ac528(%rip), %rdx    # 0x33dd80
movl %ecx, (%rdx)
movsbl 0x1(%rax), %eax
addl $-0x30, %eax
leaq 0x2ac51c(%rip), %rcx    # 0x33dd84
movl %eax, (%rcx)
leaq 0x2ac50b(%rip), %rax    # 0x33dd7c
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_star_perf()
void parse_star_perf()
{
   // holdover performance

   log_packet_id("Star perf");
   if(get_msg_field()) {
      star_hold_perf = atoi(msg_field);  // 0=disable  1=enable
      have_star_perf = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x92179(%rip), %rdi     # 0x1242d2
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0x92186
leaq 0x2a98d2(%rip), %rdi    # 0x33ba40
callq 0x95e0
movl %eax, 0x2daaa3(%rip)    # 0x36cc1c
leaq 0x27b254(%rip), %rax    # 0x30d3d4
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_star_wtr()
void parse_star_wtr()
{
char *s;

   // wait to restore
   log_packet_id("Star WTR");

   if(get_msg_field()) {
      star_wtr = atoi(msg_field) * 10;
      have_star_wtr |= 0x01;
   }

   s = strchr(nmea_msg, '/');
   if(s) {
      ++s;
      zpad(s, 4);
      star_wtr_timer = atoi(s);
      have_star_wtr |= 0x02;
   }

   s = strchr(s, '/');
   if(s) { // !!!! 4531 aux timer
      ++s;
      zpad(s, 4);
      star_aux_timer = atoi(s);
      have_star_wtr |= 0x04;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x92146(%rip), %rdi     # 0x1242dc
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0x921c8
leaq 0x2a9895(%rip), %rdi    # 0x33ba40
callq 0x95e0
addl %eax, %eax
leal (%rax,%rax,4), %eax
leaq 0x2abb74(%rip), %rcx    # 0x33dd30
movl %eax, (%rcx)
leaq 0x27b213(%rip), %rax    # 0x30d3d8
orb $0x1, (%rax)
leaq 0x2a9661(%rip), %rdi    # 0x33b830
movl $0x2f, %esi
callq 0x9100
leaq 0x1(%rax), %rbx
movq %rbx, %rdi
movl $0x4, %esi
callq 0x8fd78
movq %rbx, %rdi
callq 0x95e0
leaq 0x2abb3b(%rip), %rcx    # 0x33dd34
movl %eax, (%rcx)
leaq 0x27b1d6(%rip), %r14    # 0x30d3d8
orb $0x2, (%r14)
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x9100
testq %rax, %rax
je 0x92240
movq %rax, %rbx
incq %rbx
movq %rbx, %rdi
movl $0x4, %esi
callq 0x8fd78
movq %rbx, %rdi
callq 0x95e0
leaq 0x2abafe(%rip), %rcx    # 0x33dd38
movl %eax, (%rcx)
orb $0x4, (%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_star_hbsq(int)
void set_star_hbsq(int secs)
{
   if(read_only) return;

   sprintf(out, "HBSQ=%d;", secs);
   queue_star_cmd(out, STAR_HBSQ_MSG);

   sprintf(out, "HBSQ;");
   queue_star_cmd(out, STAR_WTR_MSG);
}

// Assembly:
leaq 0x2a4dce(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x92252
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %edx
leaq 0x2a9fbf(%rip), %rbx    # 0x33c220
leaq 0x9207d(%rip), %rsi     # 0x1242e5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0xcc, %esi
callq 0x5ee52
movw $0x3b, 0x4(%rbx)
movl $0x51534248, (%rbx)     # imm = 0x51534248
movq %rbx, %rdi
movl $0xda, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5ee52
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_star_wtr(int)
void set_star_wtr(int secs)
{
   if(read_only) return;

   sprintf(out, "WTR=%d", secs/10);
   queue_star_cmd(out, STAR_WTR_MSG);

   sprintf(out, "WTR");
   queue_star_cmd(out, STAR_WTR_MSG);
}

// Assembly:
leaq 0x2a4d75(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x922ab
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movslq %edi, %rax
imulq $0x66666667, %rax, %rdx # imm = 0x66666667
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x22, %rdx
addl %eax, %edx
leaq 0x2a9f51(%rip), %rbx    # 0x33c220
leaq 0x92018(%rip), %rsi     # 0x1242ee
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0xda, %esi
callq 0x5ee52
movl $0x525457, (%rbx)       # imm = 0x525457
movq %rbx, %rdi
movl $0xda, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5ee52
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_star_output(int)
void set_star_output(int mode)
{
   // !!!! 4531
   if(read_only) return;

   if(mode == 1) sprintf(out, "OUTPUT_TYPE=E1");
   else if(mode == 2) sprintf(out, "OUTPUT_TYPE=FR");
   else return;
   queue_star_cmd(out, STAR_OUTPUT_MSG);
   queue_star_cmd("OUTPUT_TYPE", STAR_OUTPUT_MSG);
}

// Assembly:
leaq 0x2a4d0d(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x92313
retq
cmpl $0x2, %edi
je 0x92330
cmpl $0x1, %edi
jne 0x92312
leaq 0x2a9efc(%rip), %rax    # 0x33c220
movabsq $0x31453d45505954, %rcx # imm = 0x31453D45505954
jmp 0x92341
leaq 0x2a9ee9(%rip), %rax    # 0x33c220
movabsq $0x52463d45505954, %rcx # imm = 0x52463D45505954
movq %rcx, 0x7(%rax)
movabsq $0x545f54555054554f, %rcx # imm = 0x545F54555054554F
movq %rcx, (%rax)
pushq %rbp
movq %rsp, %rbp
leaq 0x2a9ec3(%rip), %rdi    # 0x33c220
movl $0xe0, %esi
callq 0x5ee52
leaq 0x91fa5(%rip), %rdi     # 0x124313
movl $0xe0, %esi
popq %rbp
jmp 0x5ee52
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_star_prior(int, int)
void set_star_prior(int p1, int p2)
{
   // !!!! 4531
   if(read_only) return;

   sprintf(out, "PRIOR_TABLE=%d%d", p1, p2);
   queue_star_cmd(out, STAR_PRIOR_MSG);
   queue_star_cmd("PRIOR_TABLE", STAR_PRIOR_MSG);
}

// Assembly:
leaq 0x2a4c9a(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x92386
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %esi, %ecx
movl %edi, %edx
leaq 0x2a9e89(%rip), %rbx    # 0x33c220
leaq 0x91f81(%rip), %rsi     # 0x12431f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0xe1, %esi
callq 0x5ee52
leaq 0x91f74(%rip), %rdi     # 0x124330
movl $0xe1, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5ee52
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_star_aux_inp(int, int)
void set_star_aux_inp(int c, int t)
{
   // !!!! 4531
   if(read_only) return;

   sprintf(out, "AUX_INPUT=%d%d", c, t);
   queue_star_cmd(out, STAR_AUX_MSG);
   queue_star_cmd("AUX_INPUT", STAR_AUX_MSG);
}

// Assembly:
leaq 0x2a4c47(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x923d9
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %esi, %ecx
movl %edi, %edx
leaq 0x2a9e36(%rip), %rbx    # 0x33c220
leaq 0x91f4b(%rip), %rsi     # 0x12433c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0xde, %esi
callq 0x5ee52
leaq 0x91f3c(%rip), %rdi     # 0x12434b
movl $0xde, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5ee52
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_star_adm(int, int)
void set_star_adm(int gps, int aux)
{
   // !!!! 4531
   if(read_only) return;

   sprintf(out, "ADM_STATE=%d%d", gps, aux);
   queue_star_cmd(out, STAR_ADM_MSG);
   queue_star_cmd("ADM_STATE", STAR_ADM_MSG);
}

// Assembly:
leaq 0x2a4bf4(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x9242c
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %esi, %ecx
movl %edi, %edx
leaq 0x2a9de3(%rip), %rbx    # 0x33c220
leaq 0x91f11(%rip), %rsi     # 0x124355
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0xe2, %esi
callq 0x5ee52
leaq 0x91f02(%rip), %rdi     # 0x124364
movl $0xe2, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5ee52
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: clear_star_wtr()
void clear_star_wtr()
{
   // clear wait to restore timer
   if(read_only) return;

   sprintf(out, "CLEAR_WTR_GPS");
   queue_star_cmd(out, STAR_CLEAR_GPS_MSG);
   if(osa_model != 4530) {
      sprintf(out, "CLEAR_WTR_AUX");
      queue_star_cmd(out, STAR_CLEAR_AUX_MSG);  // !!!! 4531
   }

   sprintf(out, "WTR");
   queue_star_cmd(out, STAR_WTR_MSG);
}

// Assembly:
leaq 0x2a4ba1(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x9247f
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x2a9d93(%rip), %rbx    # 0x33c220
movabsq $0x5350475f525457, %rax # imm = 0x5350475F525457
movq %rax, 0x6(%rbx)
movabsq $0x54575f5241454c43, %r14 # imm = 0x54575F5241454C43
movq %r14, (%rbx)
movq %rbx, %rdi
movl $0xdb, %esi
callq 0x5ee52
leaq 0x188b30(%rip), %rax    # 0x21afec
cmpl $0x11b2, (%rax)         # imm = 0x11B2
je 0x924e2
movabsq $0x5855415f525457, %rax # imm = 0x5855415F525457
movq %rax, 0x6(%rbx)
movq %r14, (%rbx)
movq %rbx, %rdi
movl $0xdc, %esi
callq 0x5ee52
movl $0x525457, (%rbx)       # imm = 0x525457
movq %rbx, %rdi
movl $0xda, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x5ee52
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_star_atdc()
void parse_star_atdc()
{
   // atdc (automatic temperature and drift compensation) status
   log_packet_id("Star ATDC");

   if(get_msg_field()) {
      star_atdc_on = atoi(msg_field);  // 0=atdc active  1=atdc in progress
      have_star_atdc |= 0x01;
   }
   if(get_msg_field()) {
      star_atdc_time = atoi(msg_field); 
      have_star_atdc |= 0x02;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x91e86(%rip), %rdi     # 0x12438a
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0x9252e
leaq 0x2a9527(%rip), %rdi    # 0x33ba40
callq 0x95e0
movl %eax, 0x2da6fc(%rip)    # 0x36cc20
leaq 0x27aeb1(%rip), %rax    # 0x30d3dc
orb $0x1, (%rax)
callq 0x811da
testl %eax, %eax
je 0x92553
leaq 0x2a9502(%rip), %rdi    # 0x33ba40
callq 0x95e0
movl %eax, 0x2da6db(%rip)    # 0x36cc24
leaq 0x27ae8c(%rip), %rax    # 0x30d3dc
orb $0x2, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_star_temp()
void parse_star_temp()   
{
   // device temperature
   log_packet_id("Star temperature");

   if(get_msg_field()) {
      temperature = (float) atof(msg_field);
      have_temperature = 106;
   } 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x91e34(%rip), %rdi     # 0x124394
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0x9259a
leaq 0x2a94cb(%rip), %rdi    # 0x33ba40
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x27a48f(%rip), %rax    # 0x30ca18
movsd %xmm0, (%rax)
leaq 0x27acb8(%rip), %rax    # 0x30d24c
movl $0x6a, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_star_tod()
void parse_star_tod()    
{
   // time-of-day output enable/disable (not on NEC GPSDO)
   log_packet_id("Star TOD");

   if(get_msg_field()) {
      if(strstr(msg_field, "OK")) ;
      else if(star_type == OSA_TYPE) {
         strupr(msg_field);
         if(strstr(msg_field, "E")) star_tod = 1;
         else if(strstr(msg_field, "D")) star_tod = 0;
         else star_tod = 2;
         have_pps_rate = 89;
         pps_enabled = 1;
      }
      else {
         star_tod = atoi(msg_field);  // 0=disable  1=enabke
         have_pps_rate = 88;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x91dfc(%rip), %rdi     # 0x1243a5
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0x92662
leaq 0x2a947e(%rip), %rdi    # 0x33ba40
leaq 0x94f85(%rip), %rsi     # 0x12754e
callq 0x9090
testq %rax, %rax
jne 0x92662
leaq 0x188a0a(%rip), %rax    # 0x21afe8
cmpl $0x4f, (%rax)
jne 0x92643
leaq 0x2a9456(%rip), %rbx    # 0x33ba40
movq %rbx, %rdi
callq 0x9899
movq %rbx, %rdi
movl $0x45, %esi
callq 0x9100
movl $0x1, %ecx
testq %rax, %rax
jne 0x92624
leaq 0x2a9430(%rip), %rdi    # 0x33ba40
movl $0x44, %esi
callq 0x9100
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
addl %ecx, %ecx
movl %ecx, 0x2da5ee(%rip)    # 0x36cc18
leaq 0x27ac9f(%rip), %rax    # 0x30d2d0
movl $0x59, (%rax)
leaq 0x27b6e2(%rip), %rax    # 0x30dd20
movb $0x1, (%rax)
jmp 0x92662
leaq 0x2a93f6(%rip), %rdi    # 0x33ba40
callq 0x95e0
movl %eax, 0x2da5c3(%rip)    # 0x36cc18
leaq 0x27ac74(%rip), %rax    # 0x30d2d0
movl $0x58, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_star_type()
void parse_star_type()   
{
   // module type info
   log_packet_id("Star type");

   star_family[0] = star_variant[0] = 0;

   if(get_msg_field()) {
      msg_field[12] = 0;
      strcpy(star_family, msg_field);
   }

   if(get_msg_field()) {
      msg_field[12] = 0;
      strcpy(star_variant, msg_field);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x91d3a(%rip), %rdi     # 0x1243ae
callq 0x58e77
leaq 0x2ab69f(%rip), %rax    # 0x33dd1f
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x2ab687(%rip), %rax    # 0x33dd12
movb %cl, (%rax)
callq 0x811da
testl %eax, %eax
je 0x926ad
leaq 0x2a93a3(%rip), %rsi    # 0x33ba40
movb $0x0, 0xc(%rsi)
leaq 0x2ab66a(%rip), %rdi    # 0x33dd12
callq 0x9340
callq 0x811da
testl %eax, %eax
je 0x926ce
leaq 0x2a9383(%rip), %rsi    # 0x33ba40
movb $0x0, 0xc(%rsi)
leaq 0x2ab657(%rip), %rdi    # 0x33dd1f
popq %rbp
jmp 0x9340
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_star_elmask()
void parse_star_elmask()
{
float el_val;

   // antenna elevation mask
   log_packet_id("Star elmask");

   if(get_msg_field()) {
      el_val = (float) atof(msg_field);
      if((el_val >= 0.0) && (el_val <= 90.0)) {
         el_mask = el_val;
         have_el_mask = 1;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x919c2(%rip), %rdi     # 0x1243f2
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0x92a7b
leaq 0x2a8ffb(%rip), %rdi    # 0x33ba40
callq 0x9470
cvtsd2ss %xmm0, %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x92a7b
movss 0x7a592(%rip), %xmm1    # 0x10cff0
ucomiss %xmm0, %xmm1
jb 0x92a7b
leaq 0x27a64a(%rip), %rax    # 0x30d0b4
movss %xmm0, (%rax)
leaq 0x27a987(%rip), %rax    # 0x30d3fc
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_star_inp_type()
void parse_star_inp_type() 
{
   // input ref type: GPS or PPS (not on Star-4 ATDC devices)
   log_packet_id("Star input");

   if(get_msg_field()) {
      if(strstr(msg_field, "GPS")) {
         gpsdo_ref = 0;
         have_gpsdo_ref = 1;
      }
      else if(strstr(msg_field, "AUX")) {
         gpsdo_ref = 1;
         have_gpsdo_ref = 1;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x91976(%rip), %rdi     # 0x1243fe
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0x92ae3
leaq 0x2a8fa3(%rip), %rdi    # 0x33ba40
leaq 0xa0d5d(%rip), %rsi     # 0x133801
callq 0x9090
xorl %ecx, %ecx
testq %rax, %rax
jne 0x92acd
leaq 0x2a8f89(%rip), %rdi    # 0x33ba40
leaq 0x9507f(%rip), %rsi     # 0x127b3d
callq 0x9090
movl $0x1, %ecx
testq %rax, %rax
je 0x92ae3
leaq 0x27a1ac(%rip), %rax    # 0x30cc80
movl %ecx, (%rax)
leaq 0x27a1a7(%rip), %rax    # 0x30cc84
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_ubx_nav()
void parse_ubx_nav()
{
S32 msec;

   // get lat/lon/alt
   log_packet_id("UBX_NAV");

   msec = tsip_dword();
   lon = (double) (S32) tsip_dword();
   lat = (double) (S32) tsip_dword();
   alt = (double) (S32) tsip_dword();
   tsip_dword();
   tsip_dword();
   tsip_dword();

   lat = (lat / 1.0E7);
   lon = (lon / 1.0E7);
   alt = alt / 1000.0;

   lat = lat * PI / 180.0;
   lon = lon * PI / 180.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x91136(%rip), %rdi     # 0x124575
callq 0x58e77
callq 0x589b0
callq 0x589b0
cvtsi2sd %eax, %xmm0
leaq 0x279b7f(%rip), %rbx    # 0x30cfd8
movsd %xmm0, (%rbx)
callq 0x589b0
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
leaq 0x279b60(%rip), %r14    # 0x30cfd0
movsd %xmm0, (%r14)
callq 0x589b0
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
leaq 0x279b58(%rip), %r15    # 0x30cfe0
movsd %xmm0, (%r15)
callq 0x589b0
callq 0x589b0
callq 0x589b0
movsd (%r14), %xmm0
movsd 0x7841f(%rip), %xmm1    # 0x10b8c8
divsd %xmm1, %xmm0
movsd (%rbx), %xmm2
divsd %xmm1, %xmm2
movsd (%r15), %xmm1
divsd 0x75b76(%rip), %xmm1    # 0x109038
movsd %xmm1, (%r15)
movsd 0x78349(%rip), %xmm1    # 0x10b818
mulsd %xmm1, %xmm0
movsd 0x78345(%rip), %xmm3    # 0x10b820
divsd %xmm3, %xmm0
movsd %xmm0, (%r14)
mulsd %xmm1, %xmm2
divsd %xmm3, %xmm2
movsd %xmm2, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_ubx_status()
void parse_ubx_status()
{
int mode;

   // get receiver operating mode
   log_packet_id("UBX_STATUS");

   tsip_dword();  // tow
   mode = tsip_byte();
   tsip_byte();
   tsip_byte();
   tsip_byte();
   tsip_double();

if(debug_file) fprintf(debug_file, "rcvr mode:%d\n", mode);

   if     (mode == 0) rcvr_mode = RCVR_MODE_ACQUIRE;
   else if(mode == 1) rcvr_mode = RCVR_MODE_UNKNOWN;  // dead reckoning
   else if(mode == 2) rcvr_mode = RCVR_MODE_2D;
   else if(mode == 3) rcvr_mode = RCVR_MODE_3D;
   else if(mode == 4) rcvr_mode = RCVR_MODE_3D;       // gps+dead reckonong
   else if(mode == 5) rcvr_mode = RCVR_MODE_HOLD;     // (time only fix)
   else               rcvr_mode = RCVR_MODE_UNKNOWN;
   have_rcvr_mode = 3;

   have_tracking = 1;
   if     (rcvr_mode == RCVR_MODE_NO_SATS) minor_alarms |= MINOR_NO_TRACK;
   else if(rcvr_mode == RCVR_MODE_2D_3D)   minor_alarms |= MINOR_NO_TRACK;
   else                                    minor_alarms &= (~MINOR_NO_TRACK);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x91075(%rip), %rdi     # 0x12457d
callq 0x58e77
callq 0x589b0
callq 0x587d1
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0x9352a
leaq 0x1aba49(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x93540
leaq 0x1aba33(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x93556
leaq 0x1aba1d(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9356c
leaq 0x1aba07(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x58b86
leaq 0x1aae18(%rip), %rax    # 0x23e390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x93591
movzbl %bl, %edx
leaq 0x90ffe(%rip), %rsi     # 0x124588
xorl %eax, %eax
callq 0x9560
movl %ebx, %ecx
shll $0x3, %ecx
movabsq $0x70404036309, %rax    # imm = 0x70404036309
shrq %cl, %rax
cmpb $0x6, %bl
movl $0x63, %edx
cmovbl %eax, %edx
leaq 0x279b1b(%rip), %rax    # 0x30d0d0
movb %dl, (%rax)
leaq 0x279e4f(%rip), %rax    # 0x30d40d
movb $0x3, (%rax)
leaq 0x279cc8(%rip), %rax    # 0x30d290
movl $0x1, (%rax)
leaq 0x279c03(%rip), %rax    # 0x30d1d8
movl (%rax), %ecx
testb %dl, %dl
je 0x935e3
movzbl %dl, %edx
cmpl $0x2, %edx
jne 0x935e8
orl $0x8, %ecx
jmp 0x935eb
andl $-0x9, %ecx
movl %ecx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_ubx_dop()
void parse_ubx_dop()
{
   // get DOP info
   log_packet_id("UBX_DOPPLER");

   tsip_dword();  // tow
   have_dops = 0;
   gdop = ((DATA_SIZE) tsip_word()) / (DATA_SIZE) 100.0;   // pdop
   pdop = ((DATA_SIZE) tsip_word()) / (DATA_SIZE) 100.0;   // pdop
   tdop = ((DATA_SIZE) tsip_word()) / (DATA_SIZE) 100.0;   // tdop
   vdop = ((DATA_SIZE) tsip_word()) / (DATA_SIZE) 100.0;   // tdop
   hdop = ((DATA_SIZE) tsip_word()) / (DATA_SIZE) 100.0;   // tdop
   ndop = ((DATA_SIZE) tsip_word()) / (DATA_SIZE) 100.0;   // tdop
   edop = ((DATA_SIZE) tsip_word()) / (DATA_SIZE) 100.0;   // tdop
   have_dops |= (GDOP | PDOP | TDOP | VDOP | NDOP | EDOP);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x90f75(%rip), %rdi     # 0x1245a0
callq 0x58e77
callq 0x589b0
leaq 0x18fea8(%rip), %rbx    # 0x2234e4
movl $0x0, (%rbx)
callq 0x588f0
movzwl %ax, %eax
cvtsi2sd %eax, %xmm0
divsd 0x75a0a(%rip), %xmm0    # 0x109060
leaq 0x18fea3(%rip), %rax    # 0x223500
movsd %xmm0, (%rax)
callq 0x588f0
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x759e8(%rip), %xmm0    # 0x109060
leaq 0x18fe69(%rip), %rax    # 0x2234e8
movsd %xmm0, (%rax)
callq 0x588f0
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x759c6(%rip), %xmm0    # 0x109060
leaq 0x18fe67(%rip), %rax    # 0x223508
movsd %xmm0, (%rax)
callq 0x588f0
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x759a4(%rip), %xmm0    # 0x109060
leaq 0x18fe35(%rip), %rax    # 0x2234f8
movsd %xmm0, (%rax)
callq 0x588f0
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x75982(%rip), %xmm0    # 0x109060
leaq 0x18fe0b(%rip), %rax    # 0x2234f0
movsd %xmm0, (%rax)
callq 0x588f0
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x75960(%rip), %xmm0    # 0x109060
leaq 0x18fe09(%rip), %rax    # 0x223510
movsd %xmm0, (%rax)
callq 0x588f0
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x7593e(%rip), %xmm0    # 0x109060
leaq 0x18fdef(%rip), %rax    # 0x223518
movsd %xmm0, (%rax)
orb $0x7d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq