LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_cs_message()
void get_cs_message()
{
u08 c;
static int row = 0;

   // This routine buffers up an incoming 5071A message.  When the end of the
   // message is seen, the message is parsed and decoded with decode_cs_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(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, search for a '>'
      if(c == '>') {
         tsip_sync = 1;
         get_sync_time();
      }
      else {
         tsip_sync = 1;
         get_sync_time();
      }

      rst_msg:
      tsip_wptr = 0;
      tsip_rptr = 0;
      return;
   }
   else if(tsip_sync == 1) { // '>' has been seen, now build the message
      if(c == 0x0D) goto cs_end; 
      else if(c == 0x0A) goto cs_end; 
      else if(c == '>')  {  // null response to command
         decode_cs_msg();
         packet_end = 1;
         tsip_sync = 1; 
         tsip_rptr = 0;
         tsip_wptr = 0;
         return;
      }

      if(tsip_wptr < MAX_TSIP) {  // so add it to the message buffer
         tsip_buf[tsip_wptr++] = c;
      }
      else {
         tsip_sync = 0;
         goto rst_msg;
      }
   }
   else {
      cs_end:
      decode_cs_msg();
      packet_end = 1;
      tsip_sync = 0;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0xa, %edi
callq 0xb9c3
movl $0xa, %edi
testl %eax, %eax
je 0xa1ac0
callq 0x1ea2c
callq 0x584d5
leaq 0x26c869(%rip), %rcx    # 0x30e2e0
cmpb $0x0, 0x17a12(%rcx)
je 0xa1a87
movb $0x0, 0x17a12(%rcx)
leaq 0x2967c8(%rip), %rbx    # 0x338256
movzwl (%rbx), %ecx
cmpw $0x1, %cx
je 0xa1acb
movzwl %cx, %eax
testl %eax, %eax
jne 0xa1b03
movw $0x1, (%rbx)
callq 0x58682
leaq 0x2967a3(%rip), %rax    # 0x338252
xorl %ecx, %ecx
movw %cx, (%rax)
leaq 0x296799(%rip), %rax    # 0x338254
movw %cx, (%rax)
jmp 0xa1b17
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1e6a0
cmpl $0xa, %eax
je 0xa1b03
cmpl $0xd, %eax
je 0xa1b03
cmpl $0x3e, %eax
jne 0xa1b1e
callq 0xa1b4d
movl $0x1, 0x2ca1ab(%rip)    # 0x36bc94
movw $0x1, (%rbx)
leaq 0x29675f(%rip), %rax    # 0x338254
xorl %ecx, %ecx
movw %cx, (%rax)
leaq 0x296751(%rip), %rax    # 0x338252
jmp 0xa1abb
callq 0xa1b4d
movl $0x1, 0x2ca182(%rip)    # 0x36bc94
movw $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x29672d(%rip), %rdx    # 0x338252
movzwl (%rdx), %ecx
cmpq $0xfff, %rcx            # imm = 0xFFF
ja 0xa1b43
leal 0x1(%rcx), %esi
movw %si, (%rdx)
leaq 0x295712(%rip), %rdx    # 0x337250
movb %al, (%rdx,%rcx)
jmp 0xa1b17
movw $0x0, (%rbx)
jmp 0xa1aa8
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: poll_cs_log()
void poll_cs_log()
{
static int log_req_tick;
static int all_log_req = 0;
static int last_log_req = 0;
int i;

   if(cs_log_count <= CS_LOG_SHOW) {
      send_polled_cmd("DIAG:LOG?", CS_LOGINFO_MSG);
   }
   else if(log_req_tick & 1) {  // alternate requests for all log entries and last log entries
      if(all_log_req >= cs_log_count) all_log_req = 0;
      sprintf(out, "DIAG:LOG?  %d", all_log_req);
      send_polled_cmd(out, CS_LOGINFO_MSG);
      all_log_req = (all_log_req + 1) % MAX_CS_LOGS;
   }
   else {
      i = cs_log_count - last_log_req - 1;
      if(i >= 0) {
         sprintf(out, "DIAG:LOG? %d", i);
         send_polled_cmd(out, CS_LOGINFO_MSG);
      }
      last_log_req = (last_log_req + 1) % CS_LOG_SHOW;
   }

   ++log_req_tick;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x1784e8(%rip), %rax    # 0x21a8f4
movl (%rax), %edx
cmpl $0x8, %edx
jg 0xa2429
leaq 0x832d7(%rip), %rdi     # 0x1256f1
movl $0x14b, %esi            # imm = 0x14B
callq 0x6e3bc
jmp 0xa24e4
testb $0x1, 0x2cfbc0(%rip)    # 0x371ff0
jne 0xa2474
movl 0x2cfbc0(%rip), %eax    # 0x371ff8
notl %eax
addl %eax, %edx
leaq 0x299ddd(%rip), %rbx    # 0x33c220
leaq 0x832bf(%rip), %rsi     # 0x125709
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x14b, %esi            # imm = 0x14B
callq 0x6e3bc
movl 0x2cfb91(%rip), %eax    # 0x371ff8
incl %eax
andl $0x7, %eax
movl %eax, 0x2cfb86(%rip)    # 0x371ff8
jmp 0xa24e4
cmpl %edx, 0x2cfb7a(%rip)    # 0x371ff4
jl 0xa2486
movl $0x0, 0x2cfb6e(%rip)    # 0x371ff4
movl 0x2cfb68(%rip), %edx    # 0x371ff4
leaq 0x299d8d(%rip), %rbx    # 0x33c220
leaq 0x83261(%rip), %rsi     # 0x1256fb
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x14b, %esi            # imm = 0x14B
callq 0x6e3bc
movl 0x2cfb3d(%rip), %eax    # 0x371ff4
movl %eax, %ecx
incl %ecx
movslq %ecx, %rcx
imulq $0x2aaaaaab, %rcx, %rcx # imm = 0x2AAAAAAB
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x25, %rcx
addl %edx, %ecx
shll $0x6, %ecx
leal (%rcx,%rcx,2), %ecx
negl %ecx
addl %ecx, %eax
incl %eax
movl %eax, 0x2cfb10(%rip)    # 0x371ff4
incl 0x2cfb06(%rip)          # 0x371ff0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_cs_cont()
void parse_cs_cont() 
{
   if(get_msg_field()) {
      if(strstr(msg_field, "OFF")) cs_cont = 0;
      else if(strstr(msg_field, "ENAB")) cs_cont = 1;
      else if(strstr(msg_field, "ON")) cs_cont = 2;
      have_cs_cont = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x811da
testl %eax, %eax
je 0xa2902
leaq 0x2991a1(%rip), %rdi    # 0x33ba40
leaq 0x8d631(%rip), %rsi     # 0x12fed7
callq 0x9090
xorl %ecx, %ecx
testq %rax, %rax
jne 0xa28ec
leaq 0x299187(%rip), %rdi    # 0x33ba40
leaq 0x7e7d1(%rip), %rsi     # 0x121091
callq 0x9090
movl $0x1, %ecx
testq %rax, %rax
jne 0xa28ec
leaq 0x29916a(%rip), %rdi    # 0x33ba40
leaq 0x8d5ea(%rip), %rsi     # 0x12fec7
callq 0x9090
movl $0x2, %ecx
testq %rax, %rax
je 0xa28f5
leaq 0x1780dd(%rip), %rax    # 0x21a9d0
movl %ecx, (%rax)
leaq 0x178120(%rip), %rax    # 0x21aa1c
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_cs_pump()
void parse_cs_pump() 
{
   if(get_msg_field()) {
      cs_pump = atof(msg_field) * 1.0E6; 
      have_cs_pump = 1;
      pps_offset = cs_pump;
      have_pps_offset = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x811da
testl %eax, %eax
je 0xa29c8
leaq 0x2990b2(%rip), %rdi    # 0x33ba40
callq 0x9470
mulsd 0x666b5(%rip), %xmm0    # 0x109050
leaq 0x177f6e(%rip), %rax    # 0x21a910
movsd %xmm0, (%rax)
leaq 0x17807b(%rip), %rax    # 0x21aa28
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x269dfd(%rip), %rax    # 0x30c7b8
movsd %xmm0, (%rax)
leaq 0x26a872(%rip), %rax    # 0x30d238
movl %ecx, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_cs_rfam()
void parse_cs_rfam() 
{
   if(get_msg_field()) {
      cs_rfam1 = atof(msg_field) * 100.0; 
      have_cs_rfam |= 0x01;
   }
   if(get_msg_field()) {
      cs_rfam2 = atof(msg_field) * 100.0; 
      have_cs_rfam |= 0x02;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x811da
testl %eax, %eax
je 0xa2a3b
leaq 0x299027(%rip), %rdi    # 0x33ba40
callq 0x9470
mulsd 0x6663a(%rip), %xmm0    # 0x109060
leaq 0x177ef3(%rip), %rax    # 0x21a920
movsd %xmm0, (%rax)
leaq 0x177ff8(%rip), %rax    # 0x21aa30
orb $0x1, (%rax)
callq 0x811da
testl %eax, %eax
je 0xa2a6d
leaq 0x298ff5(%rip), %rdi    # 0x33ba40
callq 0x9470
mulsd 0x66608(%rip), %xmm0    # 0x109060
leaq 0x177ec9(%rip), %rax    # 0x21a928
movsd %xmm0, (%rax)
leaq 0x177fc6(%rip), %rax    # 0x21aa30
orb $0x2, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_cs_sync()
void parse_cs_sync() 
{
   if(get_msg_field()) {
      if     (strstr(msg_field, "OFF"))   cs_sync = "OFF";
      else if(strstr(msg_field, "FRON"))  cs_sync = "FRONT";
      else if(strstr(msg_field, "REAR"))  cs_sync = "REAR";
      have_cs_sync = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x811da
testl %eax, %eax
je 0xa2b4e
leaq 0x298f59(%rip), %rdi    # 0x33ba40
leaq 0x8d3e9(%rip), %rbx     # 0x12fed7
movq %rbx, %rsi
callq 0x9090
testq %rax, %rax
jne 0xa2b37
leaq 0x298f3e(%rip), %rdi    # 0x33ba40
leaq 0x7319d(%rip), %rsi     # 0x115ca6
callq 0x9090
testq %rax, %rax
je 0xa2b1c
leaq 0x75fd7(%rip), %rbx     # 0x118af1
jmp 0xa2b37
leaq 0x298f1d(%rip), %rdi    # 0x33ba40
leaq 0x7aa85(%rip), %rbx     # 0x11d5af
movq %rbx, %rsi
callq 0x9090
testq %rax, %rax
je 0xa2b41
leaq 0x177eba(%rip), %rax    # 0x21a9f8
movq %rbx, (%rax)
leaq 0x177f1c(%rip), %rax    # 0x21aa64
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_cs_supply()
void parse_cs_supply() 
{
   if(get_msg_field()) {
      if     (strstr(msg_field, "AC"))   cs_supply = "AC";
      else if(strstr(msg_field, "DC"))   cs_supply = "DC";
      else if(strstr(msg_field, "BATT")) cs_supply = "BATT";
      else if(strstr(msg_field, "LOW"))  cs_supply = "LOW";
      else                               cs_supply = "UNKN";
      have_cs_supply = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
callq 0x811da
testl %eax, %eax
je 0xa2c2a
leaq 0x298e9b(%rip), %rdi    # 0x33ba40
leaq 0x8493f(%rip), %rbx     # 0x1274eb
movq %rbx, %rsi
callq 0x9090
testq %rax, %rax
jne 0xa2c13
leaq 0x298e80(%rip), %rdi    # 0x33ba40
leaq 0x817ca(%rip), %rbx     # 0x124391
movq %rbx, %rsi
callq 0x9090
testq %rax, %rax
jne 0xa2c13
leaq 0x298e65(%rip), %rdi    # 0x33ba40
leaq 0x82c8d(%rip), %rbx     # 0x12586f
movq %rbx, %rsi
callq 0x9090
testq %rax, %rax
jne 0xa2c13
leaq 0x298e4a(%rip), %rdi    # 0x33ba40
leaq 0x847f0(%rip), %r14     # 0x1273ed
movq %r14, %rsi
callq 0x9090
testq %rax, %rax
leaq 0x84533(%rip), %rbx     # 0x127142
cmovneq %r14, %rbx
leaq 0x177dd6(%rip), %rax    # 0x21a9f0
movq %rbx, (%rax)
leaq 0x177e14(%rip), %rax    # 0x21aa38
movl $0x1, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_cs_temp()
void parse_cs_temp() 
{
   if(get_msg_field()) {
      cs_temp = atof(msg_field); 
      have_cs_temp = 1;

      temperature = (float) cs_temp;
      have_temperature = 113;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x811da
testl %eax, %eax
je 0xa2c80
leaq 0x298dfd(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x177ce1(%rip), %rax    # 0x21a930
movsd %xmm0, (%rax)
leaq 0x177db2(%rip), %rax    # 0x21aa0c
movl $0x1, (%rax)
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x269da9(%rip), %rax    # 0x30ca18
movsd %xmm0, (%rax)
leaq 0x26a5d2(%rip), %rax    # 0x30d24c
movl $0x71, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_cs_emul()
void parse_cs_emul() 
{
   if(get_msg_field()) {
      cs_emul = atof(msg_field); 
      have_cs_emul = 1;
      osc_offset = cs_emul;
      have_osc_offset = 68;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x811da
testl %eax, %eax
je 0xa2cfe
leaq 0x298d77(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x177c73(%rip), %rax    # 0x21a948
movsd %xmm0, (%rax)
leaq 0x177d64(%rip), %rax    # 0x21aa44
movl $0x1, (%rax)
leaq 0x269ad3(%rip), %rax    # 0x30c7c0
movsd %xmm0, (%rax)
leaq 0x26a53c(%rip), %rax    # 0x30d234
movl $0x44, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_cs_pll()
void parse_cs_pll() 
{ 
   if(get_msg_field()) {
      cs_pll_dro = atof(msg_field); 
      have_cs_pll |= 0x01;
   }
   if(get_msg_field()) {
      cs_pll_saw = atof(msg_field); 
      have_cs_pll |= 0x02;
   }
   if(get_msg_field()) {
      cs_pll_87 = atof(msg_field); 
      have_cs_pll |= 0x04;
   }
   if(get_msg_field()) {
      cs_pll_up = atof(msg_field); 
      have_cs_pll |= 0x08;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x811da
testl %eax, %eax
je 0xa2d94
leaq 0x298cc6(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x177bda(%rip), %rax    # 0x21a960
movsd %xmm0, (%rax)
leaq 0x177cbf(%rip), %rax    # 0x21aa50
orb $0x1, (%rax)
callq 0x811da
testl %eax, %eax
je 0xa2dbe
leaq 0x298c9c(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x177bb8(%rip), %rax    # 0x21a968
movsd %xmm0, (%rax)
leaq 0x177c95(%rip), %rax    # 0x21aa50
orb $0x2, (%rax)
callq 0x811da
testl %eax, %eax
je 0xa2de8
leaq 0x298c72(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x177b96(%rip), %rax    # 0x21a970
movsd %xmm0, (%rax)
leaq 0x177c6b(%rip), %rax    # 0x21aa50
orb $0x4, (%rax)
callq 0x811da
testl %eax, %eax
je 0xa2e12
leaq 0x298c48(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x177b74(%rip), %rax    # 0x21a978
movsd %xmm0, (%rax)
leaq 0x177c41(%rip), %rax    # 0x21aa50
orb $0x8, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_cs_leapstat()
void parse_cs_leapstat()
{
int leap;


   if(get_msg_field()) {
      if     (strstr(msg_field, "1")) leap = 1;
      else if(strstr(msg_field, "ON")) leap = 1;
      else leap = 0;
      cs_leap_state = leap;
      have_cs_leapstate = 1;

      if(leap) {
         minor_alarms |= MINOR_LEAP_PEND;
      }
      else { 
         minor_alarms &= (~MINOR_LEAP_PEND);
      }
      have_leap_info = 33;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x811da
testl %eax, %eax
je 0xa2fe1
leaq 0x298ade(%rip), %rdi    # 0x33ba40
movl $0x31, %esi
callq 0x9100
testq %rax, %rax
je 0xa2f8a
leaq 0x177a54(%rip), %rax    # 0x21a9cc
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x177afa(%rip), %rax    # 0x21aa80
movl %ecx, (%rax)
jmp 0xa2fbd
leaq 0x298aaf(%rip), %rdi    # 0x33ba40
leaq 0x8cf2f(%rip), %rsi     # 0x12fec7
callq 0x9090
leaq 0x177adc(%rip), %rcx    # 0x21aa80
movl $0x1, (%rcx)
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
leaq 0x177a13(%rip), %rax    # 0x21a9cc
movl %ecx, (%rax)
je 0xa2fe3
leaq 0x26a214(%rip), %rcx    # 0x30d1d8
movl $0x80, %eax
orl (%rcx), %eax
leaq 0x26a206(%rip), %rcx    # 0x30d1d8
movl %eax, (%rcx)
leaq 0x26a2bd(%rip), %rax    # 0x30d298
movl $0x21, (%rax)
popq %rbp
retq
leaq 0x26a1ee(%rip), %rcx    # 0x30d1d8
movl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
andl (%rcx), %eax
jmp 0xa2fcb
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_cs_leapmjd()
void parse_cs_leapmjd()
{
   if(get_msg_field()) {
      cs_leapmjd = atof(msg_field);
      have_cs_leapmjd = 33;
      jd_leap = (cs_leapmjd + JD_MJD) + jtime(23,59,59,0.0);
      calc_jd_leap(57);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x811da
testl %eax, %eax
je 0xa30dd
leaq 0x2989fc(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x177970(%rip), %rax    # 0x21a9c0
movsd %xmm0, (%rax)
leaq 0x177a21(%rip), %rax    # 0x21aa7c
movl $0x21, (%rax)
addsd 0x7b6af(%rip), %xmm0    # 0x11e718
movsd %xmm0, -0x8(%rbp)
xorpd %xmm0, %xmm0
movl $0x17, %edi
movl $0x3b, %esi
movl $0x3b, %edx
callq 0xd41e0
addsd -0x8(%rbp), %xmm0
leaq 0x26a4ce(%rip), %rax    # 0x30d560
movsd %xmm0, (%rax)
leaq 0x26a493(%rip), %rax    # 0x30d530
subsd (%rax), %xmm0
xorl %eax, %eax
ucomisd 0x7b035(%rip), %xmm0    # 0x11e0e0
movl $0x39, %ecx
cmovael %eax, %ecx
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
cmoval %eax, %ecx
leaq 0x26a12b(%rip), %rax    # 0x30d1f0
movl %ecx, (%rax)
leaq 0x26a49a(%rip), %rax    # 0x30d568
movl %ecx, (%rax)
cvttsd2si %xmm0, %eax
leaq 0x26a111(%rip), %rcx    # 0x30d1ec
movl %eax, (%rcx)
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_cs_loginfo()
void parse_cs_loginfo()
{
int log_id;
int i;

   log_id = (-1);
   if(get_msg_field()) {
      have_cs_loginfo = 1;
      log_id = atoi(&msg_field[4]);
   }
   if(get_msg_field()) {
      msg_field[LOG_MSG_LEN] = 0;
      i = cs_log_count - log_id - 1;
i = log_id;
      if((log_id >= 0) && (i >= 0) && (i < MAX_CS_LOGS)) {
         sprintf(out, "%3d: %s", log_id,msg_field);
         strcpy(cs_log_msg[i], out);
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
callq 0x811da
testl %eax, %eax
je 0xa31be
leaq 0x177874(%rip), %rax    # 0x21aa18
movl $0x1, (%rax)
leaq 0x29888f(%rip), %rdi    # 0x33ba40
addq $0x4, %rdi
callq 0x95e0
movl %eax, %ebx
jmp 0xa31c3
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
callq 0x811da
testl %eax, %eax
je 0xa3220
leaq 0x29886d(%rip), %rax    # 0x33ba40
movb $0x0, 0x20(%rax)
cmpl $0xbf, %ebx
ja 0xa3220
leaq 0x29903a(%rip), %r14    # 0x33c220
leaq 0x82687(%rip), %rsi     # 0x125874
leaq 0x29884c(%rip), %rcx    # 0x33ba40
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movl %ebx, %eax
movq %rax, %rcx
shlq $0x5, %rcx
leaq (%rcx,%rax,2), %rdi
addq 0xacd1c(%rip), %rdi     # 0x14ff30
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x9340
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_cs_volt()
void parse_cs_volt() 
{
   if(get_msg_field()) {
      cs_volt1 = atof(msg_field); 
      have_cs_volt |= 0x01;
   }
   if(get_msg_field()) {
      cs_volt2 = atof(msg_field); 
      have_cs_volt |= 0x02;
   }
   if(get_msg_field()) {
      cs_volt3 = atof(msg_field); 
      have_cs_volt |= 0x04;
   }
   cs_volt_avg = (cs_volt1 + cs_volt2 + cs_volt3) / 3.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x811da
testl %eax, %eax
je 0xa3253
leaq 0x298807(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x17773b(%rip), %rax    # 0x21a980
movsd %xmm0, (%rax)
leaq 0x177804(%rip), %rax    # 0x21aa54
orb $0x1, (%rax)
callq 0x811da
testl %eax, %eax
je 0xa327d
leaq 0x2987dd(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x177719(%rip), %rax    # 0x21a988
movsd %xmm0, (%rax)
leaq 0x1777da(%rip), %rax    # 0x21aa54
orb $0x2, (%rax)
callq 0x811da
testl %eax, %eax
je 0xa32a7
leaq 0x2987b3(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x1776f7(%rip), %rax    # 0x21a990
movsd %xmm0, (%rax)
leaq 0x1777b0(%rip), %rax    # 0x21aa54
orb $0x4, (%rax)
leaq 0x1776d2(%rip), %rax    # 0x21a980
movsd (%rax), %xmm0
leaq 0x1776cf(%rip), %rax    # 0x21a988
addsd (%rax), %xmm0
leaq 0x1776cc(%rip), %rax    # 0x21a990
addsd (%rax), %xmm0
divsd 0x68738(%rip), %xmm0    # 0x10ba08
leaq 0x1776c1(%rip), %rax    # 0x21a998
movsd %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_cs_disp(int)
void set_cs_disp(int mode)
{
   if(read_only) return;

   if(rcvr_type == CS_RCVR) {
      set_cs_remote(1);
      if(mode) queue_cs_cmd("DISP:ENAB ON", CS_DISP_MSG);
      else     queue_cs_cmd("DISP:ENAB OFF", CS_DISP_MSG);
      restore_cs_remote();
      queue_cs_cmd("DISP:ENAB?", CS_DISP_MSG);
   }
}

// Assembly:
leaq 0x293d36(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0xa3353
leaq 0x1755e0(%rip), %rax    # 0x2188d0
cmpq $0x20000, (%rax)        # imm = 0x20000
jne 0xa3353
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x1, %edi
callq 0x63db5
testl %ebx, %ebx
leaq 0x825b3(%rip), %rax     # 0x1258c7
leaq 0x8259f(%rip), %rdi     # 0x1258ba
cmoveq %rax, %rdi
movl $0x145, %esi            # imm = 0x145
callq 0x5ee52
leaq 0x1776bc(%rip), %rax    # 0x21a9ec
cmpl $0x0, (%rax)
jne 0xa333c
xorl %edi, %edi
callq 0x63db5
leaq 0x823d4(%rip), %rdi     # 0x125717
movl $0x145, %esi            # imm = 0x145
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5ee52
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_cs_leap(double, int)
void set_cs_leap(double jd, int dur)
{
   if(read_only) return;

   if(rcvr_type == CS_RCVR) {
      set_cs_remote(1);
      if(((dur != 59) && (dur != 61)) || (jd == 0.0)) {
         queue_cs_cmd(":PTIM:LEAP:STAT OFF", CS_LEAPSTAT_MSG);
      }
      else {
         sprintf(out, ":PTIM:LEAP:MJD %d", (int) (jd + jtime(0,0,1, 0.0)));
         queue_cs_cmd(out, CS_LEAPMJD_MSG);

         sprintf(out, ":PTIM:LEAP:DUR %d", dur);  
         queue_cs_cmd(out, CS_LEAPDUR_MSG); 

         queue_cs_cmd(":PTIM:LEAP:STAT ON", CS_LEAPSTAT_MSG);
      }

      restore_cs_remote();

      queue_cs_cmd(":PTIM:LEAP:STAT?", CS_LEAPSTAT_MSG);
      queue_cs_cmd(":PTIM:LEAP:DUR?",  CS_LEAPDUR_MSG);
      queue_cs_cmd(":PTIM:LEAP:MJD?", CS_LEAPMJD_MSG);
   }
}

// Assembly:
leaq 0x293cbf(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0xa3476
leaq 0x175565(%rip), %rax    # 0x2188d0
cmpq $0x20000, (%rax)        # imm = 0x20000
jne 0xa3476
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
movl $0x1, %edi
movsd %xmm0, -0x18(%rbp)
callq 0x63db5
leal -0x3b(%rbx), %eax
testl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
setne %al
xorpd %xmm0, %xmm0
movsd -0x18(%rbp), %xmm1
ucomisd %xmm0, %xmm1
leaq 0x82522(%rip), %rdi     # 0x1258d5
jne 0xa33b7
jnp 0xa341e
testb %al, %al
jne 0xa341e
xorl %edi, %edi
xorl %esi, %esi
movl $0x1, %edx
callq 0xd41e0
addsd -0x18(%rbp), %xmm0
cvttsd2si %xmm0, %edx
leaq 0x298e47(%rip), %r14    # 0x33c220
leaq 0x82509(%rip), %rsi     # 0x1258e9
movq %r14, %rdi
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
movl $0x149, %esi            # imm = 0x149
callq 0x5ee52
leaq 0x824fd(%rip), %rsi     # 0x1258fb
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
movl $0x148, %esi            # imm = 0x148
callq 0x5ee52
leaq 0x824ef(%rip), %rdi     # 0x12590d
movl $0x147, %esi            # imm = 0x147
callq 0x5ee52
leaq 0x1775bd(%rip), %rax    # 0x21a9ec
cmpl $0x0, (%rax)
jne 0xa343b
xorl %edi, %edi
callq 0x63db5
leaq 0x823ed(%rip), %rdi     # 0x12582f
movl $0x147, %esi            # imm = 0x147
callq 0x5ee52
leaq 0x823ed(%rip), %rdi     # 0x125840
movl $0x148, %esi            # imm = 0x148
callq 0x5ee52
leaq 0x823ec(%rip), %rdi     # 0x125850
movl $0x149, %esi            # imm = 0x149
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x5ee52
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_cs_slew(double)
void set_cs_slew(double val)
{
   if(read_only) return;

   if(rcvr_type == CS_RCVR) {
      set_cs_remote(1);
      sprintf(out, ":PTIM:SLEW %g", val);
      queue_cs_cmd(out, CS_SLEW_MSG);
      restore_cs_remote();
   }
}

// Assembly:
leaq 0x293b9c(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0xa34e5
leaq 0x175446(%rip), %rax    # 0x2188d0
cmpq $0x20000, (%rax)        # imm = 0x20000
jne 0xa34e5
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x1, %edi
movsd %xmm0, -0x10(%rbp)
callq 0x63db5
leaq 0x298d71(%rip), %rbx    # 0x33c220
leaq 0x824a1(%rip), %rsi     # 0x125957
movq %rbx, %rdi
movsd -0x10(%rbp), %xmm0
movb $0x1, %al
callq 0x9060
movq %rbx, %rdi
movl $0x144, %esi            # imm = 0x144
callq 0x5ee52
leaq 0x177513(%rip), %rax    # 0x21a9ec
cmpl $0x0, (%rax)
leaq 0x8(%rsp), %rsp
popq %rbx
popq %rbp
je 0xa34e6
retq
xorl %edi, %edi
jmp 0x63db5
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_cs_standby(int)
void set_cs_standby(int mode)
{
   if(read_only) return;

   if(rcvr_type == CS_RCVR) {
      set_cs_remote(1);
      if(mode) queue_cs_cmd(":PTIM:STAN 1", CS_STANDBY_MSG);
      else     queue_cs_cmd(":PTIM:STAN 0", CS_STANDBY_MSG);
      restore_cs_remote();
   }
}

// Assembly:
leaq 0x293b26(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0xa354c
leaq 0x1753d0(%rip), %rax    # 0x2188d0
cmpq $0x20000, (%rax)        # imm = 0x20000
jne 0xa354c
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x1, %edi
callq 0x63db5
testl %ebx, %ebx
leaq 0x7de4c(%rip), %rax     # 0x121370
leaq 0x7d2ed(%rip), %rdi     # 0x120818
cmoveq %rax, %rdi
movl $0x143, %esi            # imm = 0x143
callq 0x5ee52
leaq 0x1774ac(%rip), %rax    # 0x21a9ec
cmpl $0x0, (%rax)
leaq 0x8(%rsp), %rsp
popq %rbx
popq %rbp
je 0xa354d
retq
xorl %edi, %edi
jmp 0x63db5
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_cs_ster(double)
void set_cs_ster(double offset)
{
   if(read_only) return;

   if(rcvr_type == CS_RCVR) {
      set_cs_remote(1);
      sprintf(out, ":ROSC:STE %g", offset);
      queue_cs_cmd(out, CS_STER_MSG);
      queue_cs_cmd("ROSC:STE?", CS_STER_MSG);
      restore_cs_remote();
   }
}

// Assembly:
leaq 0x293abf(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0xa35d3
leaq 0x175369(%rip), %rax    # 0x2188d0
cmpq $0x20000, (%rax)        # imm = 0x20000
jne 0xa35d3
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x1, %edi
movsd %xmm0, -0x10(%rbp)
callq 0x63db5
leaq 0x298c94(%rip), %rbx    # 0x33c220
leaq 0x823d2(%rip), %rsi     # 0x125965
movq %rbx, %rdi
movsd -0x10(%rbp), %xmm0
movb $0x1, %al
callq 0x9060
movq %rbx, %rdi
movl $0x141, %esi            # imm = 0x141
callq 0x5ee52
leaq 0x82263(%rip), %rdi     # 0x125819
movl $0x141, %esi            # imm = 0x141
callq 0x5ee52
leaq 0x177425(%rip), %rax    # 0x21a9ec
cmpl $0x0, (%rax)
leaq 0x8(%rsp), %rsp
popq %rbx
popq %rbp
je 0xa35d4
retq
xorl %edi, %edi
jmp 0x63db5
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_cs_sync(char*)
void set_cs_sync(char *s)
{
   // OFF FRONT REAR
   if(read_only) return;

   if(s == 0) return;

   if(rcvr_type == CS_RCVR) {
      set_cs_remote(1);
      sprintf(out, ":PTIM:SYNC %s", s);
      queue_cs_cmd(out, CS_SYNC_MSG);
      restore_cs_remote();
      queue_cs_cmd(":PTIM:SYNC?", CS_SYNC_MSG);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x293a31(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0xa35f3
popq %rbx
popq %r14
popq %rbp
retq
movq %rdi, %rbx
testq %rdi, %rdi
je 0xa35ee
leaq 0x1752ce(%rip), %rax    # 0x2188d0
cmpq $0x20000, (%rax)        # imm = 0x20000
jne 0xa35ee
movl $0x1, %edi
callq 0x63db5
leaq 0x298c04(%rip), %r14    # 0x33c220
leaq 0x8234f(%rip), %rsi     # 0x125972
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
movl $0x142, %esi            # imm = 0x142
callq 0x5ee52
leaq 0x1773a8(%rip), %rax    # 0x21a9ec
cmpl $0x0, (%rax)
jne 0xa3650
xorl %edi, %edi
callq 0x63db5
leaq 0x821cc(%rip), %rdi     # 0x125823
movl $0x142, %esi            # imm = 0x142
popq %rbx
popq %r14
popq %rbp
jmp 0x5ee52
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: clear_cs_log()
void clear_cs_log()
{
int i;

   if(read_only) return;

   if(rcvr_type == CS_RCVR) {
      set_cs_remote(1);
      queue_cs_cmd("DIAG:LOG:CLE", CS_CLEARLOG_MSG);
      restore_cs_remote();

      queue_cs_cmd("DIAG:LOG:COUN?", CS_LOGCOUNT_MSG);
      cs_log_count = 0;
      for(i=0; i<MAX_CS_LOGS; i++) {
         cs_log_msg[i][0] = 0;
      }
      need_redraw = 7865;
   }
}

// Assembly:
leaq 0x2939ae(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0xa36fc
leaq 0x175254(%rip), %rax    # 0x2188d0
cmpq $0x20000, (%rax)        # imm = 0x20000
jne 0xa36fc
pushq %rbp
movq %rsp, %rbp
movl $0x1, %edi
callq 0x63db5
leaq 0x82305(%rip), %rdi     # 0x12599f
movl $0x14c, %esi            # imm = 0x14C
callq 0x5ee52
leaq 0x177341(%rip), %rax    # 0x21a9ec
cmpl $0x0, (%rax)
jne 0xa36b7
xorl %edi, %edi
callq 0x63db5
leaq 0x821a2(%rip), %rdi     # 0x125860
movl $0x14a, %esi            # imm = 0x14A
callq 0x5ee52
leaq 0x177225(%rip), %rax    # 0x21a8f4
movl $0x0, (%rax)
xorl %eax, %eax
leaq 0x175872(%rip), %rcx    # 0x218f50
movb $0x0, (%rcx,%rax)
addq $0x22, %rax
cmpq $0x1980, %rax           # imm = 0x1980
jne 0xa36de
leaq 0x17514f(%rip), %rax    # 0x218844
movl $0x1eb9, (%rax)         # imm = 0x1EB9
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: send_taip_start(char*)
void send_taip_start(char *cmd)
{
   // start a TAIP message
   if(log_file && (log_stream & LOG_PACKET_START)) {
      if(cmd) fprintf(log_file, "\nSend taip start: %s\n", cmd);
      else    fprintf(log_file, "\nSend taip start: >\n");
   }

   eom_flag = 0;
   nmea_tx_cksum = 0;
   send_byte('>');
   if(cmd) send_nmea_string(cmd, 0);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x19ac53(%rip), %rax    # 0x23e360
movq (%rax), %rcx
testq %rcx, %rcx
je 0xa3752
leaq 0x19acf4(%rip), %rax    # 0x23e410
testb $0x4, (%rax)
je 0xa3752
testq %rbx, %rbx
je 0xa373c
leaq 0x8227f(%rip), %rsi     # 0x1259ac
movq %rcx, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x9560
jmp 0xa3752
leaq 0x8227f(%rip), %rdi     # 0x1259c2
movl $0x14, %esi
movl $0x1, %edx
callq 0x9750
movl $0x0, 0x2c86b4(%rip)    # 0x36be10
movb $0x0, 0x2c9353(%rip)    # 0x36cab6
movl $0x3e, %edi
callq 0x591af
testq %rbx, %rbx
je 0xa3782
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e92a
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: send_taip_end(int)
void send_taip_end(int do_cksum)
{
char cksum[10];

   // end a TAIP message

   if(do_cksum) {
      send_byte(';');
      send_byte('*');

      sprintf(cksum, "%02X", (nmea_tx_cksum & 0xFF));
      sendout(RCVR_PORT, cksum[0], ADD_CHAR);
      sendout(RCVR_PORT, cksum[1], ADD_CHAR);
   }
   sendout(RCVR_PORT, '<',  ADD_CHAR);
   sendout(RCVR_PORT, 0x0D, ADD_CHAR);
   sendout(RCVR_PORT, 0x0A, EOM);
   if(sim_file == 0) Sleep(50);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
testl %edi, %edi
je 0xa37e5
movl $0x3b, %edi
callq 0x591af
movl $0x2a, %edi
callq 0x591af
movzbl 0x2c9305(%rip), %edx    # 0x36cab6
leaq 0x871f8(%rip), %rsi     # 0x12a9b0
leaq -0x12(%rbp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movzbl (%rbx), %esi
movl $0xa, %edi
xorl %edx, %edx
callq 0xbcc0
movzbl 0x1(%rbx), %esi
movl $0xa, %edi
xorl %edx, %edx
callq 0xbcc0
movl $0xa, %edi
movl $0x3c, %esi
xorl %edx, %edx
callq 0xbcc0
movl $0xa, %edi
movl $0xd, %esi
xorl %edx, %edx
callq 0xbcc0
movl $0xa, %edi
movl $0xa, %esi
movl $0x1, %edx
callq 0xbcc0
leaq 0x19ab9e(%rip), %rax    # 0x23e3c0
cmpq $0x0, (%rax)
je 0xa382f
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
movl $0x32, %edi
addq $0x18, %rsp
popq %rbx
popq %rbp
jmp 0xaff7
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: send_taip_id(int)
void send_taip_id(int id)
{
char s[32];

   // send a TAIP device id

   if(id < 0) id = 0-id;
   id = (id % 10000);

   sprintf(s, ";ID=%04d", id);
   send_nmea_string(s, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
movl %edi, %edx
negl %edx
cmovsl %edi, %edx
movl $0xd1b71759, %eax       # imm = 0xD1B71759
imulq %rdx, %rax
shrq $0x2d, %rax
imull $0x2710, %eax, %eax     # imm = 0x2710
subl %eax, %edx
leaq 0x8216c(%rip), %rsi     # 0x1259d7
leaq -0x30(%rbp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5e92a
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_taip_status()
void parse_taip_status()
{
   get_fixed_field(1);
   if(get_fixed_field(1)) {  // tracking mode
      have_gps_status = 33;
      if     (msg_field[0] == '0') gps_status = GPS_FIXES;
      else if(msg_field[0] == '1') gps_status = GPS_NO_TIME;
      else if(msg_field[0] == '3') gps_status = GPS_PDOP_HIGH;
      else if(msg_field[0] == '8') gps_status = GPS_NO_SATS;
      else if(msg_field[0] == '9') gps_status = GPS_ONE_SAT;
      else if(msg_field[0] == 'A') gps_status = GPS_TWO_SATS;
      else if(msg_field[0] == 'B') gps_status = GPS_THREE_SATS;
      else if(msg_field[0] == 'C') gps_status = GPS_SAT_UNAVAIL;
      else                         gps_status = GPS_UNK_STATUS;
   }

   if(get_fixed_field(1)) {  // status nibble 1 - antenna
      if(msg_field[0] == '0')  minor_alarms &= (~(MINOR_ANT_NO_PWR)); 
      else                     minor_alarms |= (MINOR_ANT_NO_PWR);
      have_antenna = 33;
   }
   if(get_fixed_field(1)) {  // status nibble 2 - backup battery
   }

   if(get_fixed_field(2)) {  // machine id      - not used
   }

   if(get_fixed_field(1)) {  // status nibble 3 - not used
   }

   if(get_fixed_field(1)) {  // status nibble 4 - almanac / RTCC
      minor_alarms &= (~MINOR_ALMANAC);
      if     (msg_field[0] == '8')  minor_alarms |= (MINOR_ALMANAC); 
      else if(msg_field[0] == 'A')  minor_alarms |= (MINOR_ALMANAC); 
      have_almanac = 1;
   }

   if(get_fixed_field(2)) {  // reseved         - not used
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x1, %edi
callq 0x83e83
movl $0x1, %edi
callq 0x83e83
testl %eax, %eax
je 0xa3df0
leaq 0x2694f2(%rip), %rax    # 0x30d2b0
movl $0x21, (%rax)
leaq 0x297c75(%rip), %rax    # 0x33ba40
movb (%rax), %cl
addb $-0x30, %cl
movl $0xff, %eax
cmpb $0x13, %cl
ja 0xa3de7
movzbl %cl, %eax
leaq 0x7c1d8(%rip), %rcx     # 0x11ffbc
movl (%rcx,%rax,4), %eax
leaq 0x2696ae(%rip), %rcx    # 0x30d49c
movl %eax, (%rcx)
movl $0x1, %edi
callq 0x83e83
testl %eax, %eax
je 0xa3e2f
leaq 0x297c3b(%rip), %rax    # 0x33ba40
leaq 0x2693cc(%rip), %rcx    # 0x30d1d8
movl (%rcx), %edx
andl $-0x7, %edx
xorl %esi, %esi
cmpb $0x30, (%rax)
movl $0x6, %eax
cmovel %esi, %eax
orl %edx, %eax
movl %eax, (%rcx)
leaq 0x269403(%rip), %rax    # 0x30d22c
movl $0x21, (%rax)
movl $0x1, %edi
callq 0x83e83
movl $0x2, %edi
callq 0x83e83
movl $0x1, %edi
callq 0x83e83
movl $0x1, %edi
callq 0x83e83
testl %eax, %eax
je 0xa3e97
leaq 0x269376(%rip), %rax    # 0x30d1d8
movl (%rax), %ecx
movl %ecx, %edx
andl $0xfffff7ff, %edx       # imm = 0xFFFFF7FF
movl %edx, (%rax)
leaq 0x297bcb(%rip), %rdx    # 0x33ba40
movzbl (%rdx), %edx
cmpl $0x41, %edx
je 0xa3e82
cmpl $0x38, %edx
jne 0xa3e8a
orl $0x800, %ecx            # imm = 0x800
movl %ecx, (%rax)
leaq 0x269413(%rip), %rax    # 0x30d2a4
movl $0x1, (%rax)
movl $0x2, %edi
popq %rbp
jmp 0x83e83
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_taip_version()
void parse_taip_version()
{
   taip_product[0] = 0;
   taip_version[0] = 0; 
   taip_core[0] = 0; 
   taip_copr[0] = 0; 

   if(get_scpi_delim(';')) {  // product name
      strcpy(taip_product, msg_field);
   }
   if(get_scpi_delim(';')) {  // version
      strcpy(taip_version, msg_field);
   }
   if(get_scpi_delim(';')) {  // core
      strcpy(taip_core, msg_field);
   }
   if(get_scpi_delim(';')) {  // copright
      strcpy(taip_copr, msg_field);
   }

   have_info |= ALL_ID_INFO;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x29a003(%rip), %rax    # 0x33deb0
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x29a208(%rip), %rax    # 0x33e0c0
movb %cl, (%rax)
leaq 0x29a40f(%rip), %rax    # 0x33e2d0
movb %cl, (%rax)
leaq 0x29a616(%rip), %rax    # 0x33e4e0
movb %cl, (%rax)
movl $0x3b, %edi
callq 0x9d575
testl %eax, %eax
je 0xa3eed
leaq 0x299fcf(%rip), %rdi    # 0x33deb0
leaq 0x297b58(%rip), %rsi    # 0x33ba40
callq 0x9340
movl $0x3b, %edi
callq 0x9d575
testl %eax, %eax
je 0xa3f0e
leaq 0x29a1be(%rip), %rdi    # 0x33e0c0
leaq 0x297b37(%rip), %rsi    # 0x33ba40
callq 0x9340
movl $0x3b, %edi
callq 0x9d575
testl %eax, %eax
je 0xa3f2f
leaq 0x29a3ad(%rip), %rdi    # 0x33e2d0
leaq 0x297b16(%rip), %rsi    # 0x33ba40
callq 0x9340
movl $0x3b, %edi
callq 0x9d575
testl %eax, %eax
je 0xa3f50
leaq 0x29a59c(%rip), %rdi    # 0x33e4e0
leaq 0x297af5(%rip), %rsi    # 0x33ba40
callq 0x9340
leaq 0x269a1d(%rip), %rax    # 0x30d974
orb $0xf, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_tserve_message()
void get_tserve_message()
{
u08 c;

   // This routine buffers up an incoming TSERVE message.  When the end of the
   // message is seen, the message is parsed and decoded with decode_nmea_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(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, search for a '$'
      if(c == 0x01) {
         tsip_sync = 1;
         get_sync_time();
      }
      tsip_wptr = 0;
      tsip_rptr = 0;
      return;
   }
   else if(tsip_sync == 1) { // '>' has been seen, now build the message
      if((c == 0x0D) || (c == 0x0A)) goto tserve_end;  // message has no checksum

      if(tsip_wptr < MAX_TSIP) {   // add char to the message buffer
         tsip_buf[tsip_wptr++] = c;
      }
      else {
         tsip_error |= OVFL_ERROR;
         goto rst_msg;
      }
   }
   else if(tsip_sync) {  // end of message
      tserve_end:
      decode_tserve_msg(); 
      packet_end = 1;
      tsip_wptr = 0;     // prepare for next message
      tsip_rptr = 0;
      tsip_sync = 0;
   }
   else {     // should never happen, prepare for next message
      rst_msg:
      tsip_wptr = 0;
      tsip_rptr = 0;
      tsip_sync = 0;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0xa, %edi
callq 0xb9c3
movl $0xa, %edi
testl %eax, %eax
je 0xa44f7
callq 0x1ea2c
callq 0x584d5
leaq 0x269e33(%rip), %rcx    # 0x30e2e0
cmpb $0x0, 0x17a12(%rcx)
je 0xa44bd
movb $0x0, 0x17a12(%rcx)
leaq 0x293d92(%rip), %rbx    # 0x338256
movzwl (%rbx), %ecx
cmpl $0x1, %ecx
je 0xa4502
testl %ecx, %ecx
jne 0xa450c
cmpl $0x1, %eax
jne 0xa44df
movw $0x1, (%rbx)
callq 0x58682
leaq 0x293d6c(%rip), %rax    # 0x338252
xorl %ecx, %ecx
movw %cx, (%rax)
leaq 0x293d62(%rip), %rax    # 0x338254
movw %cx, (%rax)
jmp 0xa4534
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1e6a0
cmpl $0xa, %eax
je 0xa450c
cmpl $0xd, %eax
jne 0xa453b
callq 0xa4235
movl $0x1, 0x2c7779(%rip)    # 0x36bc94
leaq 0x293d30(%rip), %rax    # 0x338252
xorl %ecx, %ecx
movw %cx, (%rax)
leaq 0x293d26(%rip), %rax    # 0x338254
movw %cx, (%rax)
movw %cx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x293d10(%rip), %rcx    # 0x338252
movzwl (%rcx), %edx
cmpq $0xfff, %rdx            # imm = 0xFFF
ja 0xa4560
leal 0x1(%rdx), %esi
movw %si, (%rcx)
leaq 0x292cf5(%rip), %rcx    # 0x337250
movb %al, (%rcx,%rdx)
jmp 0xa4534
leaq 0x19aa09(%rip), %rax    # 0x23ef70
orb $-0x80, 0x1(%rax)
xorl %eax, %eax
movw %ax, (%rcx)
leaq 0x293cdd(%rip), %rcx    # 0x338254
movw %ax, (%rcx)
movw %ax, (%rbx)
jmp 0xa4534
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_time()
void parse_tm4_time()
{
   log_packet_id("time/date");

   if(get_msg_field()) {
      sscanf(msg_field, "%02d%02d%04d", &pri_month,&pri_day,&pri_year);
   }
   if(get_msg_field()) {
      sscanf(msg_field, "%02d%02d%02d", &pri_hours,&pri_minutes,&pri_seconds);
      pri_frac = 0.0;
   }

   if(timing_mode == TMODE_GPS) {     // convert utc time to gps time
      utc_to_gps();
   }
   else {
      adjust_rcvr_time(0.0);  // incorporarte possibly negative fractional second into time variables
   }

   update_gps_screen(5564);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x81460(%rip), %rdi     # 0x1259fb
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xa45d3
leaq 0x297490(%rip), %rdi    # 0x33ba40
leaq 0x8144e(%rip), %rsi     # 0x125a05
leaq 0x268f52(%rip), %rdx    # 0x30d510
leaq 0x268f47(%rip), %rcx    # 0x30d50c
leaq 0x268f48(%rip), %r8     # 0x30d514
xorl %eax, %eax
callq 0x9360
callq 0x811da
testl %eax, %eax
je 0xa4614
leaq 0x29745d(%rip), %rdi    # 0x33ba40
leaq 0x81428(%rip), %rsi     # 0x125a12
leaq 0x268f17(%rip), %rdx    # 0x30d508
leaq 0x268f0c(%rip), %rcx    # 0x30d504
leaq 0x268f01(%rip), %r8     # 0x30d500
xorl %eax, %eax
callq 0x9360
leaq 0x268f0b(%rip), %rax    # 0x30d518
movq $0x0, (%rax)
leaq 0x268ea2(%rip), %rax    # 0x30d4bd
cmpb $0x0, (%rax)
je 0xa462b
xorpd %xmm0, %xmm0
callq 0x5c907
jmp 0xa4652
leaq 0x2690f6(%rip), %rax    # 0x30d728
cvtsi2sdl (%rax), %xmm0
callq 0x5c907
leaq 0x268e62(%rip), %rax    # 0x30d4a4
andb $-0x2, (%rax)
leaq 0x268d80(%rip), %rax    # 0x30d3cc
movl $0x1, (%rax)
popq %rbp
jmp 0x7327e
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_alt()
void parse_tm4_alt()
{
   log_packet_id("altitude");
   if(have_tm4_enhanced) return;

   if(get_msg_field()) {
      alt = atof(msg_field);
   }

   get_msg_field(); // 'M' for meters
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x80244(%rip), %rdi     # 0x124b14
callq 0x58e77
leaq 0x297688(%rip), %rax    # 0x33bf64
cmpl $0x0, (%rax)
je 0xa48e3
popq %rbp
retq
callq 0x811da
testl %eax, %eax
je 0xa4903
leaq 0x29714d(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x2686e1(%rip), %rax    # 0x30cfe0
movsd %xmm0, (%rax)
popq %rbp
jmp 0x811da
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_elmask()
void parse_tm4_elmask()
{
int i;
int datum;

   log_packet_id("elmask/datum");

   if(get_msg_field()) {
      i = atoi(msg_field);
      if     (i == 0) i = 5;
      else if(i == 1) i = 15;
      else if(i == 2) i = 20;
      else i = 0;
      if((i > 0) && (i < 90)) {
         el_mask = (float) i;
         have_el_mask = 444;
      }
   }

   if(get_msg_field()) {
      datum = atoi(&msg_field[1]);
      have_datum = 444;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8110b(%rip), %rdi     # 0x125a1f
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xa497d
leaq 0x297117(%rip), %rdi    # 0x33ba40
callq 0x95e0
movb $0x1, %cl
testl %eax, %eax
je 0xa4952
cmpl $0x2, %eax
je 0xa4948
cmpl $0x1, %eax
jne 0xa495c
movss 0x7a07e(%rip), %xmm0    # 0x11e9c4
jmp 0xa4961
movss 0x7a050(%rip), %xmm0    # 0x11e9a0
jmp 0xa4961
movss 0x7a052(%rip), %xmm0    # 0x11e9ac
jmp 0xa4961
xorps %xmm0, %xmm0
xorl %ecx, %ecx
testb %cl, %cl
je 0xa497d
leaq 0x268748(%rip), %rax    # 0x30d0b4
movss %xmm0, (%rax)
leaq 0x268a85(%rip), %rax    # 0x30d3fc
movl $0x1bc, (%rax)          # imm = 0x1BC
callq 0x811da
testl %eax, %eax
je 0xa4993
leaq 0x269467(%rip), %rax    # 0x30ddf4
movl $0x1bc, (%rax)          # imm = 0x1BC
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_cable()
void parse_tm4_cable()
{
   log_packet_id("cable delay");

   if(get_msg_field()) {
      cable_delay = atof(msg_field);
      cable_delay /= 1.0E9;
      have_cable_delay = 444;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x801f8(%rip), %rdi     # 0x124b98
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xa49da
leaq 0x29708b(%rip), %rdi    # 0x33ba40
callq 0x9470
divsd 0x64666(%rip), %xmm0    # 0x109028
leaq 0x2693ff(%rip), %rax    # 0x30ddc8
movsd %xmm0, (%rax)
leaq 0x2688e0(%rip), %rax    # 0x30d2b4
movl $0x1bc, (%rax)          # imm = 0x1BC
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_tmode()
void parse_tm4_tmode()
{
int i;

   log_packet_id("timing mode");

   if(get_msg_field()) {
      i = atoi(msg_field);
      minor_alarms &= (~MINOR_SURVEY);
      if(i == 0) {
         if(tm4_gps) rcvr_mode = RCVR_MODE_3D;
         else        rcvr_mode = RCVR_MODE_NO_SATS;
      }
      else if(i == 1) {
         rcvr_mode = RCVR_MODE_HOLD;
      }
      else if(i == 3) {
         rcvr_mode = RCVR_MODE_SURVEY;
         minor_alarms |= MINOR_SURVEY;
      }
      else {
         rcvr_mode = RCVR_MODE_UNKNOWN;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x801a5(%rip), %rdi     # 0x124b8c
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xa4a67
leaq 0x297044(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x2687d0(%rip), %rcx    # 0x30d1d8
movl (%rcx), %edx
movl %edx, %esi
andl $-0x21, %esi
movl %esi, (%rcx)
cmpl $0x3, %eax
je 0xa4a40
cmpl $0x1, %eax
je 0xa4a34
testl %eax, %eax
jne 0xa4a51
cmpl $0x0, 0x2cd5d6(%rip)    # 0x371ffc
je 0xa4a5d
leaq 0x2686a1(%rip), %rax    # 0x30d0d0
movb $0x4, (%rax)
jmp 0xa4a67
leaq 0x268695(%rip), %rax    # 0x30d0d0
movb $0x7, (%rax)
jmp 0xa4a67
leaq 0x268689(%rip), %rax    # 0x30d0d0
movb $0xb, (%rax)
orl $0x20, %edx
movl %edx, (%rcx)
jmp 0xa4a67
leaq 0x268678(%rip), %rax    # 0x30d0d0
movb $0x63, (%rax)
jmp 0xa4a67
leaq 0x26866c(%rip), %rax    # 0x30d0d0
movb $0x2, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_dop()
void parse_tm4_dop()
{
int i;

   log_packet_id("dop/almanac");

   if(get_msg_field()) {  // GQ
      i = atoi(msg_field);
      if     (i == 9) pdop = 1.0;
      else if(i == 8) pdop = 3.0;
      else if(i == 7) pdop = 4.0;
      else if(i == 6) pdop = 5.0;
      else if(i == 5) pdop = 6.0;
      else if(i == 4) pdop = 8.0;
      else if(i == 3) pdop = 10.0;
      else if(i == 2) pdop = 15.0;
      else if(i == 1) pdop = 25.0;
      else if(i == 0) pdop = 50.0;
      have_dops |= PDOP;
   }

   if(get_msg_field()) {  // alm status
      i = atoi(msg_field);
      if(i == 0) minor_alarms &= (~MINOR_ALMANAC);
      else       minor_alarms |= MINOR_ALMANAC;
      have_almanac = 444;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x80fb8(%rip), %rdi     # 0x125a2c
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xa4ab6
leaq 0x296fb7(%rip), %rdi    # 0x33ba40
callq 0x95e0
cmpl $0x9, %eax
ja 0xa4aac
movl %eax, %eax
leaq 0x7b574(%rip), %rcx     # 0x120010
movsd (%rcx,%rax,8), %xmm0
leaq 0x17ea40(%rip), %rax    # 0x2234e8
movsd %xmm0, (%rax)
leaq 0x17ea31(%rip), %rax    # 0x2234e4
orb $0x1, (%rax)
callq 0x811da
testl %eax, %eax
je 0xa4af4
leaq 0x296f7a(%rip), %rdi    # 0x33ba40
callq 0x95e0
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq 0x2686ff(%rip), %rax    # 0x30d1d8
movl $0xfffff7ff, %edx       # imm = 0xFFFFF7FF
andl (%rax), %edx
shll $0xb, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
leaq 0x2687b6(%rip), %rax    # 0x30d2a4
movl $0x1bc, (%rax)          # imm = 0x1BC
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_mux1()
void parse_tm4_mux1()
{
   log_packet_id("mux1 status");

   if(get_msg_field()) {  // time port baud
      tm4_time_baud = atoi(msg_field);
      have_tm4_time_baud = 1;
   }

   if(get_msg_field()) {  // output type
      tm4_code1 = atoi(msg_field);
      if(tm4_code1 == 7) {
         pps_enabled = 1;
      }
      else pps_enabled = 0;

      have_tm4_code |= 0x01;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x80f37(%rip), %rdi     # 0x125a38
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xa4b31
leaq 0x296f2a(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x29734a(%rip), %rcx    # 0x33be6c
movl %eax, (%rcx)
leaq 0x297345(%rip), %rax    # 0x33be70
movl $0x1, (%rax)
callq 0x811da
testl %eax, %eax
je 0xa4b65
leaq 0x296eff(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x29731b(%rip), %rcx    # 0x33be68
movb %al, (%rcx)
cmpb $0x7, %al
leaq 0x2691c8(%rip), %rax    # 0x30dd20
sete (%rax)
leaq 0x297312(%rip), %rax    # 0x33be74
orb $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_validity()
void parse_tm4_validity()
{
int i;

   log_packet_id("time validity");

   if(get_msg_field()) {
      i = atoi(msg_field);
      if(i == 1) time_flags &= (~TFLAGS_INVALID);
      else if(i == 0) time_flags |= TFLAGS_INVALID;
   }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x80ed2(%rip), %rdi     # 0x125a44
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xa4bb8
leaq 0x296eb9(%rip), %rdi    # 0x33ba40
callq 0x95e0
testl %eax, %eax
je 0xa4ba3
cmpl $0x1, %eax
jne 0xa4bb8
leaq 0x268908(%rip), %rax    # 0x30d4a4
movl (%rax), %eax
andl $-0x5, %eax
jmp 0xa4baf
leaq 0x2688fa(%rip), %rax    # 0x30d4a4
movl (%rax), %eax
orl $0x4, %eax
leaq 0x2688ee(%rip), %rcx    # 0x30d4a4
movl %eax, (%rcx)
popq %rbp
retq