LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rbx
pushq %rax
pushq $0x1
popq %rbx
movl %ebx, %edi
callq 0x78198
movl %ebx, %edi
callq 0x78198
testl %eax, %eax
je 0x94c04
leaq 0x2626de(%rip), %rax    # 0x2f72b0
movl $0x21, (%rax)
leaq 0x290e61(%rip), %rax    # 0x325a40
movb (%rax), %cl
addb $-0x30, %cl
movl $0xff, %eax
cmpb $0x13, %cl
ja 0x94bfb
movzbl %cl, %eax
leaq 0x753e0(%rip), %rcx     # 0x109fd8
movl (%rcx,%rax,4), %eax
leaq 0x26289a(%rip), %rcx    # 0x2f749c
movl %eax, (%rcx)
pushq $0x1
popq %rdi
callq 0x78198
testl %eax, %eax
je 0x94c3f
leaq 0x290e29(%rip), %rax    # 0x325a40
leaq 0x2625ba(%rip), %rcx    # 0x2f71d8
movl (%rcx), %edx
andl $-0x7, %edx
xorl %esi, %esi
cmpb $0x30, (%rax)
pushq $0x6
popq %rax
cmovel %esi, %eax
orl %edx, %eax
movl %eax, (%rcx)
leaq 0x2625f3(%rip), %rax    # 0x2f722c
movl $0x21, (%rax)
movl %ebx, %edi
callq 0x78198
pushq $0x2
popq %rdi
callq 0x78198
movl %ebx, %edi
callq 0x78198
movl %ebx, %edi
callq 0x78198
testl %eax, %eax
je 0x94c9c
leaq 0x262571(%rip), %rax    # 0x2f71d8
movl (%rax), %ecx
movl %ecx, %edx
andl $0xfffff7ff, %edx       # imm = 0xFFFFF7FF
movl %edx, (%rax)
leaq 0x290dc6(%rip), %rdx    # 0x325a40
movzbl (%rdx), %edx
cmpl $0x41, %edx
je 0x94c87
cmpl $0x38, %edx
jne 0x94c8f
orl $0x800, %ecx            # imm = 0x800
movl %ecx, (%rax)
leaq 0x26260e(%rip), %rax    # 0x2f72a4
movl $0x1, (%rax)
pushq $0x2
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x78198
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2931fb(%rip), %rax    # 0x327eb0
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x293400(%rip), %rax    # 0x3280c0
movb %cl, (%rax)
leaq 0x293607(%rip), %rax    # 0x3282d0
movb %cl, (%rax)
leaq 0x29380e(%rip), %rax    # 0x3284e0
movb %cl, (%rax)
pushq $0x3b
popq %rdi
callq 0x8e9ce
testl %eax, %eax
je 0x94cf3
leaq 0x2931c9(%rip), %rdi    # 0x327eb0
leaq 0x290d52(%rip), %rsi    # 0x325a40
callq 0x9330
pushq $0x3b
popq %rdi
callq 0x8e9ce
testl %eax, %eax
je 0x94d12
leaq 0x2933ba(%rip), %rdi    # 0x3280c0
leaq 0x290d33(%rip), %rsi    # 0x325a40
callq 0x9330
pushq $0x3b
popq %rdi
callq 0x8e9ce
testl %eax, %eax
je 0x94d31
leaq 0x2935ab(%rip), %rdi    # 0x3282d0
leaq 0x290d14(%rip), %rsi    # 0x325a40
callq 0x9330
pushq $0x3b
popq %rdi
callq 0x8e9ce
testl %eax, %eax
je 0x94d50
leaq 0x29379c(%rip), %rdi    # 0x3284e0
leaq 0x290cf5(%rip), %rsi    # 0x325a40
callq 0x9330
leaq 0x262c1d(%rip), %rax    # 0x2f7974
orb $0xf, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0xa
popq %rdi
callq 0xb771
pushq $0xa
popq %rdi
testl %eax, %eax
je 0x95275
callq 0x1d93f
callq 0x51891
leaq 0x2630b5(%rip), %rcx    # 0x2f82e0
cmpb $0x0, 0x17a12(%rcx)
je 0x9523b
movb $0x0, 0x17a12(%rcx)
leaq 0x28d014(%rip), %rbx    # 0x322256
movzwl (%rbx), %ecx
cmpl $0x1, %ecx
je 0x95280
testl %ecx, %ecx
jne 0x9528c
cmpl $0x1, %eax
jne 0x9525d
movw $0x1, (%rbx)
callq 0x51a2f
leaq 0x28cfee(%rip), %rax    # 0x322252
andw $0x0, (%rax)
leaq 0x28cfe5(%rip), %rax    # 0x322254
andw $0x0, (%rax)
jmp 0x952b5
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1d61b
cmpb $0xa, %al
je 0x9528c
movzbl %al, %ecx
cmpl $0xd, %ecx
jne 0x952bc
callq 0x94ffd
leaq 0x28cfba(%rip), %rax    # 0x322252
andw $0x0, (%rax)
leaq 0x28cfb1(%rip), %rax    # 0x322254
andw $0x0, (%rax)
movl $0x1, 0x2c09e3(%rip)    # 0x355c94
andw $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x28cf8f(%rip), %rcx    # 0x322252
movzwl (%rcx), %edx
cmpq $0xfff, %rdx            # imm = 0xFFF
ja 0x952e1
leal 0x1(%rdx), %esi
movw %si, (%rcx)
leaq 0x28bf74(%rip), %rcx    # 0x321250
movb %al, (%rcx,%rdx)
jmp 0x952b5
leaq 0x193c88(%rip), %rax    # 0x228f70
orb $-0x80, 0x1(%rax)
andw $0x0, (%rcx)
leaq 0x28cf5d(%rip), %rax    # 0x322254
andw $0x0, (%rax)
jmp 0x952b1
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7a70a(%rip), %rdi     # 0x10fa23
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x95351
leaq 0x290712(%rip), %rdi    # 0x325a40
leaq 0x7a6f8(%rip), %rsi     # 0x10fa2d
leaq 0x2621d4(%rip), %rdx    # 0x2f7510
leaq 0x2621c9(%rip), %rcx    # 0x2f750c
leaq 0x2621ca(%rip), %r8     # 0x2f7514
xorl %eax, %eax
callq 0x9350
callq 0x75767
testl %eax, %eax
je 0x9538f
leaq 0x2906df(%rip), %rdi    # 0x325a40
leaq 0x7a6d2(%rip), %rsi     # 0x10fa3a
leaq 0x262199(%rip), %rdx    # 0x2f7508
leaq 0x26218e(%rip), %rcx    # 0x2f7504
leaq 0x262183(%rip), %r8     # 0x2f7500
xorl %eax, %eax
callq 0x9350
leaq 0x26218d(%rip), %rax    # 0x2f7518
andq $0x0, (%rax)
leaq 0x262127(%rip), %rax    # 0x2f74bd
cmpb $0x0, (%rax)
je 0x953a5
xorps %xmm0, %xmm0
callq 0x55462
jmp 0x953aa
callq 0x554d3
popq %rbp
jmp 0x694f6
// File: /workspace/github_cpp_makefile_star2_O2/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 0x79514(%rip), %rdi     # 0x10eb3c
callq 0x520bf
leaq 0x290930(%rip), %rax    # 0x325f64
cmpl $0x0, (%rax)
je 0x9563b
popq %rbp
retq
callq 0x75767
testl %eax, %eax
je 0x9565b
leaq 0x2903f5(%rip), %rdi    # 0x325a40
callq 0x9470
leaq 0x261989(%rip), %rax    # 0x2f6fe0
movsd %xmm0, (%rax)
popq %rbp
jmp 0x75767
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7a3db(%rip), %rdi     # 0x10fa47
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x956b1
leaq 0x2903bf(%rip), %rdi    # 0x325a40
callq 0x95e0
cmpl $0x2, %eax
ja 0x956b1
movl %eax, %eax
leaq 0x74994(%rip), %rcx     # 0x10a028
movss (%rcx,%rax,4), %xmm0
leaq 0x261a14(%rip), %rax    # 0x2f70b4
movss %xmm0, (%rax)
leaq 0x261d51(%rip), %rax    # 0x2f73fc
movl $0x1bc, (%rax)          # imm = 0x1BC
callq 0x75767
testl %eax, %eax
je 0x956c7
leaq 0x262733(%rip), %rax    # 0x2f7df4
movl $0x1bc, (%rax)          # imm = 0x1BC
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x794ec(%rip), %rdi     # 0x10ebc0
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x9570e
leaq 0x290357(%rip), %rdi    # 0x325a40
callq 0x9470
divsd 0x5d932(%rip), %xmm0    # 0xf3028
leaq 0x2626cb(%rip), %rax    # 0x2f7dc8
movsd %xmm0, (%rax)
leaq 0x261bac(%rip), %rax    # 0x2f72b4
movl $0x1bc, (%rax)          # imm = 0x1BC
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x79499(%rip), %rdi     # 0x10ebb4
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x9579b
leaq 0x290310(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x261a9c(%rip), %rcx    # 0x2f71d8
movl (%rcx), %edx
movl %edx, %esi
andl $-0x21, %esi
movl %esi, (%rcx)
cmpl $0x3, %eax
je 0x95774
cmpl $0x1, %eax
je 0x95768
testl %eax, %eax
jne 0x95785
cmpl $0x0, 0x2c68a2(%rip)    # 0x35bffc
je 0x95791
leaq 0x26196d(%rip), %rax    # 0x2f70d0
movb $0x4, (%rax)
jmp 0x9579b
leaq 0x261961(%rip), %rax    # 0x2f70d0
movb $0x7, (%rax)
jmp 0x9579b
leaq 0x261955(%rip), %rax    # 0x2f70d0
movb $0xb, (%rax)
orl $0x20, %edx
movl %edx, (%rcx)
jmp 0x9579b
leaq 0x261944(%rip), %rax    # 0x2f70d0
movb $0x63, (%rax)
jmp 0x9579b
leaq 0x261938(%rip), %rax    # 0x2f70d0
movb $0x2, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7a2ac(%rip), %rdi     # 0x10fa54
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x957ea
leaq 0x290283(%rip), %rdi    # 0x325a40
callq 0x95e0
cmpl $0x9, %eax
ja 0x957e0
movl %eax, %eax
leaq 0x74868(%rip), %rcx     # 0x10a038
movsd (%rcx,%rax,8), %xmm0
leaq 0x177d0c(%rip), %rax    # 0x20d4e8
movsd %xmm0, (%rax)
leaq 0x177cfd(%rip), %rax    # 0x20d4e4
orb $0x1, (%rax)
callq 0x75767
testl %eax, %eax
je 0x95828
leaq 0x290246(%rip), %rdi    # 0x325a40
callq 0x95e0
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq 0x2619cb(%rip), %rax    # 0x2f71d8
movl $0xfffff7ff, %edx       # imm = 0xFFFFF7FF
andl (%rax), %edx
shll $0xb, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
leaq 0x261a82(%rip), %rax    # 0x2f72a4
movl $0x1bc, (%rax)          # imm = 0x1BC
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7a22b(%rip), %rdi     # 0x10fa60
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x95865
leaq 0x2901f6(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x290616(%rip), %rcx    # 0x325e6c
movl %eax, (%rcx)
leaq 0x290611(%rip), %rax    # 0x325e70
movl $0x1, (%rax)
callq 0x75767
testl %eax, %eax
je 0x95899
leaq 0x2901cb(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x2905e7(%rip), %rcx    # 0x325e68
movb %al, (%rcx)
cmpb $0x7, %al
leaq 0x262494(%rip), %rax    # 0x2f7d20
sete (%rax)
leaq 0x2905de(%rip), %rax    # 0x325e74
orb $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7a1c6(%rip), %rdi     # 0x10fa6c
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x958ec
leaq 0x290185(%rip), %rdi    # 0x325a40
callq 0x95e0
testl %eax, %eax
je 0x958d7
cmpl $0x1, %eax
jne 0x958ec
leaq 0x261bd4(%rip), %rax    # 0x2f74a4
movl (%rax), %eax
andl $-0x5, %eax
jmp 0x958e3
leaq 0x261bc6(%rip), %rax    # 0x2f74a4
movl (%rax), %eax
orl $0x4, %eax
leaq 0x261bba(%rip), %rcx    # 0x2f74a4
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_ett()
void parse_tm4_ett()
{
int ett_month,ett_day,ett_year;
int ett_hours,ett_minutes,ett_seconds;
double ett_frac;

   log_packet_id("time tag");

   ett_jd = 0.0;
   if(get_msg_field()) {
      sscanf(msg_field, "%02d%02d%04d", &ett_month,&ett_day,&ett_year);
      ett_jd = jdate(ett_year,ett_month,ett_day);
   }
   if(get_msg_field()) {
      sscanf(msg_field, "%02d%02d%02d%lf", &ett_hours,&ett_minutes,&ett_seconds, &ett_frac);
      ett_jd += jtime(ett_hours,ett_minutes,ett_seconds,ett_frac);
      ++have_tm4_ett_jd;
   }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x78266(%rip), %rdi     # 0x10db6c
callq 0x520bf
leaq 0x290676(%rip), %r13    # 0x325f88
andq $0x0, (%r13)
callq 0x75767
testl %eax, %eax
je 0x9595d
leaq 0x290119(%rip), %rdi    # 0x325a40
leaq 0x7a0ff(%rip), %rsi     # 0x10fa2d
leaq -0x40(%rbp), %rbx
leaq -0x3c(%rbp), %r14
leaq -0x38(%rbp), %r15
movq %rbx, %rdx
movq %r14, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x9350
movl (%r15), %edi
movl (%rbx), %esi
movl (%r14), %edx
callq 0xc2f07
movsd %xmm0, (%r13)
callq 0x75767
testl %eax, %eax
je 0x959bf
leaq 0x2900d3(%rip), %rdi    # 0x325a40
leaq 0x7a106(%rip), %rsi     # 0x10fa7a
leaq -0x34(%rbp), %rbx
leaq -0x30(%rbp), %r14
leaq -0x2c(%rbp), %r15
leaq -0x48(%rbp), %r12
movq %rbx, %rdx
movq %r14, %rcx
movq %r15, %r8
movq %r12, %r9
xorl %eax, %eax
callq 0x9350
movl (%rbx), %edi
movl (%r14), %esi
movl (%r15), %edx
movsd (%r12), %xmm0
callq 0xc2faf
addsd (%r13), %xmm0
movsd %xmm0, (%r13)
leaq 0x2905d3(%rip), %rax    # 0x325f90
incl (%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_dmode()
void parse_tm4_dmode()
{
int i;

   log_packet_id("discipline mode");

   if(get_msg_field()) {
      i = atoi(msg_field);
      if     (i == 1) discipline_mode = DIS_MODE_WARMUP;
      else if(i == 2) discipline_mode = DIS_MODE_RECOVERY;
      else if(i == 3) discipline_mode = DIS_MODE_AUTO_HOLD;
      else if(i == 4) discipline_mode = DIS_MODE_NORMAL;
      else if(i == 5) discipline_mode = DIS_MODE_AUTO_HOLD;
      else            discipline_mode = DIS_MODE_UNKNOWN;
   }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x7a0b1(%rip), %rdi     # 0x10fa8a
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x95a1b
leaq 0x290052(%rip), %rdi    # 0x325a40
callq 0x95e0
leal (,%rax,8), %ecx
movabsq $0x20002040aff, %rdx    # imm = 0x20002040AFF
shrq %cl, %rdx
cmpl $0x6, %eax
movl $0xff, %eax
cmovbl %edx, %eax
leaq 0x261a7e(%rip), %rcx    # 0x2f7497
movb %al, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_alarm()
void parse_tm4_alarm()
{
int i;

   log_packet_id("alarm status");

   if(get_msg_field()) {      // coast (holdover)
      i = atoi(msg_field);
   }


   if(get_msg_field()) {      // antenna
      i = atoi(msg_field);
      if(i) minor_alarms |= MINOR_ANT_NO_PWR;
      else  minor_alarms &= (~MINOR_ANT_NO_PWR);
      have_antenna = 444;
   }


   if(get_msg_field()) {      // OSC output
      i = atoi(msg_field);
      if(i == 0) critical_alarms &= (~CRIT_OCXO);
      else       critical_alarms |= (CRIT_OCXO);
      have_critical_alarms = 444;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x7a072(%rip), %rdi     # 0x10fa9a
callq 0x520bf
callq 0x75767
callq 0x75767
testl %eax, %eax
je 0x95a6c
leaq 0x28fffe(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x26178a(%rip), %rcx    # 0x2f71d8
movl (%rcx), %edx
andl $-0x7, %edx
testl %eax, %eax
pushq $0x6
popq %rsi
cmovel %eax, %esi
orl %edx, %esi
movl %esi, (%rcx)
leaq 0x2617c6(%rip), %rax    # 0x2f722c
movl $0x1bc, (%rax)          # imm = 0x1BC
callq 0x75767
testl %eax, %eax
je 0x95aa8
leaq 0x28ffc4(%rip), %rdi    # 0x325a40
callq 0x95e0
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq 0x261741(%rip), %rax    # 0x2f71d0
movl (%rax), %edx
andl $-0x11, %edx
shll $0x4, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
leaq 0x261806(%rip), %rax    # 0x2f72a8
movl $0x1bc, (%rax)          # imm = 0x1BC
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_id()
void parse_tm4_id()
{
   log_packet_id("id info");

   if(get_msg_field()) { // .obj
      msg_field[32] = 0;
      strcpy(tm4_obj, msg_field);
   }

   if(get_msg_field()) { // .hex
      msg_field[32] = 0;
      strcpy(tm4_hex, msg_field);
   }

   if(get_msg_field()) { // hex string
      msg_field[32] = 0;
      strcpy(tm4_string, msg_field);
   }

   if(get_msg_field()) { // version?
      msg_field[32] = 0;
      strcpy(tm4_id, msg_field);
   }

   have_info |= ALL_ID_INFO;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x77cf9(%rip), %rdi     # 0x10d7ae
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x95ada
leaq 0x28ff76(%rip), %rsi    # 0x325a40
movb $0x0, 0x20(%rsi)
leaq 0x2903bb(%rip), %rdi    # 0x325e90
callq 0x9330
callq 0x75767
testl %eax, %eax
je 0x95afa
leaq 0x28ff56(%rip), %rsi    # 0x325a40
movb $0x0, 0x20(%rsi)
leaq 0x2903cb(%rip), %rdi    # 0x325ec0
callq 0x9330
callq 0x75767
testl %eax, %eax
je 0x95b1a
leaq 0x28ff36(%rip), %rsi    # 0x325a40
movb $0x0, 0x20(%rsi)
leaq 0x2903db(%rip), %rdi    # 0x325ef0
callq 0x9330
callq 0x75767
testl %eax, %eax
je 0x95b3a
leaq 0x28ff16(%rip), %rsi    # 0x325a40
movb $0x0, 0x20(%rsi)
leaq 0x2903eb(%rip), %rdi    # 0x325f20
callq 0x9330
leaq 0x261e33(%rip), %rax    # 0x2f7974
orb $0xf, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_mux2()
void parse_tm4_mux2()
{
   log_packet_id("mux2 status");

   if(get_msg_field()) {  // output type
      tm4_code2 = atoi(msg_field);
      have_tm4_code |= 0x02;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x79f56(%rip), %rdi     # 0x10faa7
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x95b7e
leaq 0x28feda(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x2902f7(%rip), %rcx    # 0x325e69
movb %al, (%rcx)
leaq 0x2902f9(%rip), %rax    # 0x325e74
orb $0x2, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_sats()
void parse_tm4_sats()
{
int i;
int prn;
int w,x,y;
int z;
float sig;

   log_packet_id("sat info");
   reset_sat_tracking();

   for(i=0; i<12; i++) { 
      prn = w = x = y = 0;
      sig = 0.0F;
      if(get_msg_field()) {
         prn = atoi(msg_field);
         if((prn >= 1) && (prn < MAX_PRN)) ;
         else prn = 0;
      }

      if(get_msg_field()) {  // 0=included   1=not included
         w = atoi(msg_field);
         if(w == 0) sat[prn].tracking = (-1);
      }

      if(get_msg_field()) {  // tracking status A=acquiring S=searching  0..9=sig leve;
         if(isdigit(msg_field[0])) {  // sig level
            x = atoi(msg_field);
            if     (x == 9) sig = 45.0F;
            else if(x == 8) sig = 44.0F;
            else if(x == 7) sig = 43.0F;
            else if(x == 6) sig = 42.0F;
            else if(x == 5) sig = 41.0F;
            else if(x == 4) sig = 40.0F;
            else if(x == 3) sig = 39.0F;
            else if(x == 2) sig = 38.0F;
            else if(x == 1) sig = 37.0F;
            else if(x == 0) sig = 26.0F;
            sat[prn].tracking = 1;
            sat[prn].sig_level = sig;
            sat[prn].level_msg = 444;
         }
         else { // A=acquiring  S=searching
            x = msg_field[0];
         }
      }
      if(get_msg_field()) {  // ephemeris status
         y = atoi(msg_field);
      }
   }

   if(get_msg_field()) {  // receiver status
      // 2=sky search
      // 3=almanac collect
      // 4=ephemeris collect
      // 5=acquisition
      // 6=positioning
      z = atoi(msg_field);
   }

   level_type = "dBc";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x79082(%rip), %rdi     # 0x10ec17
callq 0x520bf
callq 0x56b1c
pushq $0xc
popq %r14
leaq 0x28fe96(%rip), %rbx    # 0x325a40
leaq 0x744d7(%rip), %r15     # 0x10a088
leaq 0x1933f8(%rip), %r12    # 0x228fb0
callq 0x75767
subl $0x1, %r14d
jb 0x95c66
testl %eax, %eax
je 0x95be5
movq %rbx, %rdi
callq 0x95e0
leal -0x1(%rax), %ecx
cmpl $0x3e6, %ecx            # imm = 0x3E6
jb 0x95be0
xorl %eax, %eax
movslq %eax, %r13
jmp 0x95be8
xorl %r13d, %r13d
callq 0x75767
testl %eax, %eax
je 0x95c0d
movq %rbx, %rdi
callq 0x95e0
testl %eax, %eax
jne 0x95c0d
imulq $0x348, %r13, %rax      # imm = 0x348
orl $-0x1, 0x218(%r12,%rax)
callq 0x75767
testl %eax, %eax
je 0x95c5c
movsbl (%rbx), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x95c5c
movq %rbx, %rdi
callq 0x95e0
xorps %xmm0, %xmm0
cmpl $0x9, %eax
ja 0x95c39
movl %eax, %eax
movss (%r15,%rax,4), %xmm0
imulq $0x348, %r13, %rax      # imm = 0x348
movl $0x1, 0x218(%r12,%rax)
movss %xmm0, 0x20(%r12,%rax)
movl $0x1bc, 0x1c(%r12,%rax) # imm = 0x1BC
callq 0x75767
jmp 0x95bb8
leaq 0x75fb5(%rip), %rax     # 0x10bc22
leaq 0x193284(%rip), %rcx    # 0x228ef8
movq %rax, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_time_format()
void parse_tm4_time_format()
{
   log_packet_id("time output format");

   if(get_msg_field()) {  // time output type
      ett_time_format = atoi(msg_field);
      have_ett_time_format = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x79e22(%rip), %rdi     # 0x10fab3
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x95cc1
leaq 0x28fd9a(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x2901ce(%rip), %rcx    # 0x325e80
movl %eax, (%rcx)
leaq 0x2901c9(%rip), %rax    # 0x325e84
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_code_format()
void parse_tm4_code_format()
{
   log_packet_id("time code format");

   if(get_msg_field()) {  // code format
      ett_code_format = atoi(msg_field);
      have_ett_code_format = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x79df8(%rip), %rdi     # 0x10fac6
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x95cfe
leaq 0x28fd5d(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x290199(%rip), %rcx    # 0x325e88
movl %eax, (%rcx)
leaq 0x290194(%rip), %rax    # 0x325e8c
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_ett_enable()
void parse_tm4_ett_enable()
{
   log_packet_id("ETT enabled state");

   if(get_msg_field()) {  // ETT enabled state
      ett_enable = atoi(msg_field);
      have_tm4_ett_enable = 1;
   }

   if(get_msg_field()) {  // polarity
      ett_polarity = msg_field[0];
      have_ett_polarity = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x79dcc(%rip), %rdi     # 0x10fad7
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x95d3b
leaq 0x28fd20(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x29014c(%rip), %rcx    # 0x325e78
movl %eax, (%rcx)
leaq 0x290147(%rip), %rax    # 0x325e7c
movl $0x1, (%rax)
callq 0x75767
testl %eax, %eax
je 0x95d64
leaq 0x28fcf5(%rip), %rax    # 0x325a40
movsbl (%rax), %eax
leaq 0x290207(%rip), %rcx    # 0x325f5c
movl %eax, (%rcx)
leaq 0x290202(%rip), %rax    # 0x325f60
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_speed()
void parse_tm4_speed()
{
   log_packet_id("speed/heading");
   if(have_tm4_enhanced) return;

    if(get_msg_field()) {
       speed = atof(msg_field);
       have_speed = 444;
    }

    if(get_msg_field()) {
       heading = atof(msg_field);
       have_heading = 444;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x79d78(%rip), %rdi     # 0x10fae9
callq 0x520bf
leaq 0x2901e7(%rip), %rax    # 0x325f64
cmpl $0x0, (%rax)
jne 0x95ddc
callq 0x75767
testl %eax, %eax
je 0x95daf
leaq 0x28fcae(%rip), %rdi    # 0x325a40
callq 0x9470
leaq 0x261282(%rip), %rax    # 0x2f7020
movsd %xmm0, (%rax)
leaq 0x26158f(%rip), %rax    # 0x2f7338
movl $0x1bc, (%rax)          # imm = 0x1BC
callq 0x75767
testl %eax, %eax
je 0x95ddc
leaq 0x28fc81(%rip), %rdi    # 0x325a40
callq 0x9470
leaq 0x26125d(%rip), %rax    # 0x2f7028
movsd %xmm0, (%rax)
leaq 0x26155e(%rip), %rax    # 0x2f7334
movl $0x1bc, (%rax)          # imm = 0x1BC
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_pop(int)
void parse_tm4_pop(int type)
{
int pop_month,pop_day,pop_year;
int pop_hours,pop_minutes,pop_seconds;
double pop_frac;

   log_packet_id("POP/ETT");

   pop_jd = 0.0;

   if(get_msg_field()) {
      tm4_pop_mode = atoi(msg_field);
      have_tm4_pop_mode = 1;
   }

   if(get_msg_field()) {
      tm4_pop_polarity = msg_field[0];
      have_tm4_pop_polarity = 1;
   }

   if(get_msg_field()) {
      sscanf(msg_field, "%02d%02d%04d", &pop_month,&pop_day,&pop_year);
      pop_jd = jdate(pop_year,pop_month,pop_day);
   }
   if(get_msg_field()) {
      sscanf(msg_field, "%02d%02d%02d%lf", &pop_hours,&pop_minutes,&pop_seconds, &pop_frac);
      pop_jd += jtime(pop_hours,pop_minutes,pop_seconds,pop_frac);
      ++have_tm4_pop_jd;
   }


   if(get_msg_field()) {
      tm4_repeat = atoi(msg_field);
      have_tm4_repeat = 1;
   }

   if(type == 74) {  // simultaneous POP/ETT device
      if(get_msg_field()) {
         tm4_width = atoi(msg_field);
         have_tm4_width = 1;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edi, %r13d
leaq 0x79cfe(%rip), %rdi     # 0x10faf7
callq 0x520bf
leaq 0x290193(%rip), %rbx    # 0x325f98
andq $0x0, (%rbx)
callq 0x75767
testl %eax, %eax
je 0x95e34
leaq 0x28fc27(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x290153(%rip), %rcx    # 0x325f78
movl %eax, (%rcx)
leaq 0x29014e(%rip), %rax    # 0x325f7c
movl $0x1, (%rax)
callq 0x75767
testl %eax, %eax
je 0x95e5d
leaq 0x28fbfc(%rip), %rax    # 0x325a40
movsbl (%rax), %eax
leaq 0x290132(%rip), %rcx    # 0x325f80
movl %eax, (%rcx)
leaq 0x29012d(%rip), %rax    # 0x325f84
movl $0x1, (%rax)
callq 0x75767
testl %eax, %eax
je 0x95ea3
leaq 0x28fbd3(%rip), %rdi    # 0x325a40
leaq 0x79bb9(%rip), %rsi     # 0x10fa2d
leaq -0x40(%rbp), %r14
leaq -0x3c(%rbp), %r15
leaq -0x38(%rbp), %r12
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x9350
movl (%r12), %edi
movl (%r14), %esi
movl (%r15), %edx
callq 0xc2f07
movsd %xmm0, (%rbx)
callq 0x75767
testl %eax, %eax
je 0x95f08
leaq 0x28fb8d(%rip), %rdi    # 0x325a40
leaq 0x79bc0(%rip), %rsi     # 0x10fa7a
leaq -0x34(%rbp), %r14
leaq -0x30(%rbp), %r15
leaq -0x2c(%rbp), %r12
leaq -0x48(%rbp), %rbx
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
movq %rbx, %r9
xorl %eax, %eax
callq 0x9350
movl (%r14), %edi
movl (%r15), %esi
movl (%r12), %edx
movsd (%rbx), %xmm0
callq 0xc2faf
leaq 0x2900a1(%rip), %rax    # 0x325f98
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
leaq 0x29009a(%rip), %rax    # 0x325fa0
incl (%rax)
callq 0x75767
testl %eax, %eax
je 0x95f33
leaq 0x28fb28(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x29004c(%rip), %rcx    # 0x325f70
movl %eax, (%rcx)
leaq 0x290047(%rip), %rax    # 0x325f74
movl $0x1, (%rax)
cmpl $0x4a, %r13d
jne 0x95f64
callq 0x75767
testl %eax, %eax
je 0x95f64
leaq 0x28faf7(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x290013(%rip), %rcx    # 0x325f68
movl %eax, (%rcx)
leaq 0x29000e(%rip), %rax    # 0x325f6c
movl $0x1, (%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_utc()
void parse_tm4_utc()
{
int i;

   log_packet_id("UTC offset");

   if(get_msg_field()) {  // 0=GPS time  1=UTC time
      i = atoi(msg_field);
   }
   if(get_msg_field()) {  // 0=no utc_offset  1=utc_offset valid
      i = atoi(msg_field);
   }

   if(get_msg_field()) { 
      i = atoi(msg_field);
      if(i) {
         if(!user_set_utc_ofs) {
            utc_offset = i;
            have_utc_ofs = (444);
         }
         check_utc_ofs(444);
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x79b81(%rip), %rdi     # 0x10faff
callq 0x520bf
callq 0x75767
callq 0x75767
callq 0x75767
testl %eax, %eax
je 0x95fd3
leaq 0x28faa3(%rip), %rdi    # 0x325a40
callq 0x95e0
testl %eax, %eax
je 0x95fd3
leaq 0x261787(%rip), %rcx    # 0x2f7734
cmpl $0x0, (%rcx)
jne 0x95fc8
leaq 0x26176f(%rip), %rcx    # 0x2f7728
movl %eax, (%rcx)
leaq 0x26135a(%rip), %rax    # 0x2f731c
movl $0x1bc, (%rax)          # imm = 0x1BC
movl $0x1bc, %edi            # imm = 0x1BC
popq %rbp
jmp 0x51a91
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_coast()
void parse_tm4_coast()
{
int hh,mm,ss;

   log_packet_id("coast time");

   hh = mm = ss = 0;
   if(get_msg_field()) {  // hhhhmmss
      sscanf(msg_field, "%04d%02d%02d", &hh,&mm,&ss);
      holdover = (hh*3600 + mm*60 + ss);
   }

   if(get_msg_field()) {  // undocumented 8 chars
   }
   if(get_msg_field()) {  // undocumented 8 chars 
   }
   if(get_msg_field()) {  // undocumented 8 chars 
   }
   if(get_msg_field()) {  // undocumented value (2)
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x79b21(%rip), %rdi     # 0x10fb0a
callq 0x520bf
andl $0x0, -0x1c(%rbp)
andl $0x0, -0x20(%rbp)
andl $0x0, -0x24(%rbp)
callq 0x75767
testl %eax, %eax
je 0x96045
leaq 0x28fa36(%rip), %rdi    # 0x325a40
leaq 0x79b04(%rip), %rsi     # 0x10fb15
leaq -0x24(%rbp), %rbx
leaq -0x20(%rbp), %r14
leaq -0x1c(%rbp), %r15
movq %rbx, %rdx
movq %r14, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x9350
imull $0xe10, (%rbx), %eax    # imm = 0xE10
imull $0x3c, (%r14), %ecx
addl %eax, %ecx
addl (%r15), %ecx
leaq 0x261415(%rip), %rax    # 0x2f7458
movl %ecx, (%rax)
callq 0x75767
callq 0x75767
callq 0x75767
callq 0x75767
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_lock(int)
void parse_tm4_lock(int id)
{
   sprintf(out, "lock status: #%d", id);
   log_packet_id(out);

   if(get_msg_field()) {
      tm4_lock = (-1);
      if(isdigit(msg_field[0])) tm4_lock = atoi(msg_field);
      have_tm4_lock = id;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x2901ac(%rip), %r14    # 0x326220
leaq 0x79aa7(%rip), %rsi     # 0x10fb22
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x960cd
leaq 0x28fea5(%rip), %r14    # 0x325f44
orl $-0x1, (%r14)
leaq 0x28f996(%rip), %rax    # 0x325a40
movsbl (%rax), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x960c4
leaq 0x28f984(%rip), %rdi    # 0x325a40
callq 0x95e0
movl %eax, (%r14)
leaq 0x28fe7d(%rip), %rax    # 0x325f48
movl %ebx, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_options()
void parse_tm4_options()
{
   log_packet_id("option settings");

   if(get_msg_field()) {  // antenna alarm enable
      tm4_antenna = atoi(msg_field);
      have_tm4_antenna = 1;
   }

   if(get_msg_field()) {  // PPS source
      tm4_pps_source = atoi(msg_field);
      have_tm4_pps_source = 1;
   }

   if(get_msg_field()) {  // reserved
   }

   if(get_msg_field()) {  // reserved 
   }

   if(get_msg_field()) {  // reserved 
   }

   if(get_msg_field()) {  // reserved
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x79a56(%rip), %rdi     # 0x10fb33
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x9610d
leaq 0x28f94e(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x28fe4e(%rip), %rcx    # 0x325f4c
movl %eax, (%rcx)
leaq 0x28fe49(%rip), %rax    # 0x325f50
movl $0x1, (%rax)
callq 0x75767
testl %eax, %eax
je 0x96138
leaq 0x28f923(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x28fe2b(%rip), %rcx    # 0x325f54
movl %eax, (%rcx)
leaq 0x28fe26(%rip), %rax    # 0x325f58
movl $0x1, (%rax)
callq 0x75767
callq 0x75767
callq 0x75767
popq %rbp
jmp 0x75767
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: get_tm4_message()
void get_tm4_message()
{
u08 c;

   // This routine buffers up an incoming Spectrum TM4 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 == '#') {
         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) {
         tsip_sync = 2;
         return;
      }

      if(tsip_wptr < MAX_TSIP) {   // add char to the message buffer
         tsip_buf[tsip_wptr++] = c;
         tsip_buf[tsip_wptr] = 0;
      }
      else {
         tsip_error |= OVFL_ERROR;
         goto rst_msg;
      }
   }
   else if(tsip_sync == 2) {  // 0x0A end of message
      decode_tm4_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
pushq $0xa
popq %rdi
callq 0xb771
pushq $0xa
popq %rdi
testl %eax, %eax
je 0x9665b
callq 0x1d93f
callq 0x51891
leaq 0x261cdb(%rip), %rcx    # 0x2f82e0
cmpb $0x0, 0x17a12(%rcx)
je 0x96615
movb $0x0, 0x17a12(%rcx)
leaq 0x28bc3a(%rip), %rbx    # 0x322256
movzwl (%rbx), %ecx
cmpl $0x2, %ecx
je 0x96672
cmpl $0x1, %ecx
je 0x96666
testl %ecx, %ecx
jne 0x966cf
cmpl $0x23, %eax
jne 0x96640
movw $0x1, (%rbx)
callq 0x51a2f
leaq 0x28bc0b(%rip), %rax    # 0x322252
andw $0x0, (%rax)
leaq 0x28bc02(%rip), %rax    # 0x322254
andw $0x0, (%rax)
jmp 0x966e9
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1d61b
cmpl $0xd, %eax
jne 0x96699
movw $0x2, (%rbx)
jmp 0x966e9
callq 0x96192
leaq 0x28bbd4(%rip), %rax    # 0x322252
andw $0x0, (%rax)
leaq 0x28bbcb(%rip), %rax    # 0x322254
andw $0x0, (%rax)
movl $0x1, 0x2bf5fd(%rip)    # 0x355c94
jmp 0x966e5
leaq 0x28bbb2(%rip), %rdx    # 0x322252
movzwl (%rdx), %ecx
cmpq $0xfff, %rcx            # imm = 0xFFF
ja 0x966c4
leaq 0x1(%rcx), %rsi
movw %si, (%rdx)
leaq 0x28ab96(%rip), %rdx    # 0x321250
movb %al, (%rdx,%rcx)
movb $0x0, 0x1(%rdx,%rcx)
jmp 0x966e9
leaq 0x1928a5(%rip), %rax    # 0x228f70
orb $-0x80, 0x1(%rax)
leaq 0x28bb7c(%rip), %rax    # 0x322252
andw $0x0, (%rax)
leaq 0x28bb73(%rip), %rax    # 0x322254
andw $0x0, (%rax)
andw $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: send_acron_byte(unsigned char)
void send_acron_byte(u08 c)
{
   // send string to the serial port...  send each char to the serial port
   // wait for ACRON_RCVR to echo input char, eat it, then wait 
   // at least 10 msecs
//if(debug_file) fprintf(debug_file, "send:%02X\n", c);

   sendout(RCVR_PORT, c, EOM);

   while(SERIAL_DATA_AVAILABLE(RCVR_PORT) == 0) {  // wait for char to echo
      check_com_timer(RCVR_PORT);
      if(com[RCVR_PORT].com_data_lost) return;
   }

   c = get_com_char();  // eat that pesky echoed character
//if(debug_file) fprintf(debug_file, "eat:%02X\n", c);
   if(sim_file == 0) Sleep(20);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %esi
pushq $0xa
popq %rbx
pushq $0x1
popq %rdx
movl %ebx, %edi
callq 0xba3b
leaq 0x261bd3(%rip), %r14    # 0x2f82e0
movl %ebx, %edi
callq 0xb771
testl %eax, %eax
jne 0x9672b
movl %ebx, %edi
callq 0x1d61b
cmpb $0x0, 0x17a10(%r14)
je 0x9670d
jmp 0x9673d
callq 0x51891
leaq 0x191c89(%rip), %rax    # 0x2283c0
cmpq $0x0, (%rax)
je 0x96742
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x14
popq %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xae83
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_acron_atime()
void parse_acron_atime()
{
int doy;
int tz;
double jd;
int last_tick = 999;
   // asynchronous time request (12 byte response)
if(debug_file) fprintf(debug_file, "acron atime:%s\n", nmea_msg);

   msg_col = 0;

   get_fixed_field(2);
   hours = pri_hours = atoi(msg_field);
   get_fixed_field(2);
   minutes = pri_minutes = atoi(msg_field);
   get_fixed_field(2);
   seconds = pri_seconds = atoi(msg_field);

   get_fixed_field(3);       // day of year  (does this start a 1?)
   doy = atoi(msg_field);

   get_fixed_field(2);
   year = pri_year = atoi(msg_field) + 2000;

   get_fixed_field(1);
   tz = atoi(msg_field);

return;

   jd = jdate(year, 1, 1) + (double) (doy) - 1.0;
   jd += jtime(hours,minutes,seconds, 0.0);

   set_gregorian_time(jd);  // convert julian date to gregorian

   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
   }
   
   if(last_tick != seconds) {
      last_tick = seconds;
      update_gps_screen(1555);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x1919c2(%rip), %rax    # 0x228390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x969eb
leaq 0x7921a(%rip), %rsi     # 0x10fbf7
leaq 0x28ee4c(%rip), %rdx    # 0x325830
xorl %eax, %eax
callq 0x9560
leaq 0x28f252(%rip), %rax    # 0x325c44
andl $0x0, (%rax)
pushq $0x2
popq %rbx
movl %ebx, %edi
callq 0x78198
leaq 0x28f03a(%rip), %r14    # 0x325a40
movq %r14, %rdi
callq 0x95e0
leaq 0x260af3(%rip), %rcx    # 0x2f7508
movl %eax, (%rcx)
leaq 0x260ab2(%rip), %rcx    # 0x2f74d0
movl %eax, (%rcx)
movl %ebx, %edi
callq 0x78198
movq %r14, %rdi
callq 0x95e0
leaq 0x260ace(%rip), %rcx    # 0x2f7504
movl %eax, (%rcx)
leaq 0x260a8d(%rip), %rcx    # 0x2f74cc
movl %eax, (%rcx)
movl %ebx, %edi
callq 0x78198
movq %r14, %rdi
callq 0x95e0
leaq 0x260aa9(%rip), %rcx    # 0x2f7500
movl %eax, (%rcx)
leaq 0x260a68(%rip), %rcx    # 0x2f74c8
movl %eax, (%rcx)
pushq $0x3
popq %rdi
callq 0x78198
movl %ebx, %edi
callq 0x78198
movq %r14, %rdi
callq 0x95e0
addl $0x7d0, %eax            # imm = 0x7D0
leaq 0x260a8f(%rip), %rcx    # 0x2f7514
movl %eax, (%rcx)
leaq 0x260a4e(%rip), %rcx    # 0x2f74dc
movl %eax, (%rcx)
pushq $0x1
popq %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x78198
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: bearing(double, double, double, double)
double bearing(double lat2,double lon2, double lat1,double lon1)
{
double dLon;
double x,y;
double brng;

   lat1 *= (PI/180.0);  // convert to radians
   lat2 *= (PI/180.0);
   lon1 *= (PI/180.0);  // convert to radians
   lon2 *= (PI/180.0);
   dLon = (lon2 - lon1);

   y = sin(dLon) * cos(lat2);
   x = cos(lat1) * sin(lat2) - sin(lat1) * cos(lat2) * cos(dLon);

   brng = atan2(y, x) * 180.0/PI;
   if(brng < 0.0) brng += 360.0;
// brng = fmod(brng+360.0, 360.0);
// brng = 360.0 - brng; // count degrees counter-clockwise - remove to make clockwise

   return brng;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movapd %xmm0, %xmm4
movsd 0x5eed8(%rip), %xmm0    # 0xf5988
mulsd %xmm0, %xmm2
movsd %xmm2, -0x10(%rbp)
mulsd %xmm0, %xmm4
movsd %xmm4, -0x8(%rbp)
mulsd %xmm0, %xmm3
mulsd %xmm1, %xmm0
subsd %xmm3, %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0x9080
movsd %xmm0, -0x18(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x9710
mulsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x10(%rbp), %xmm0
callq 0x9710
movsd %xmm0, -0x28(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x9080
movsd %xmm0, -0x20(%rbp)
movsd -0x10(%rbp), %xmm0
callq 0x9080
movsd %xmm0, -0x10(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x9710
movsd %xmm0, -0x8(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0x9710
movsd -0x8(%rbp), %xmm1
mulsd -0x10(%rbp), %xmm1
mulsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movsd -0x20(%rbp), %xmm1
mulsd -0x28(%rbp), %xmm1
subsd %xmm0, %xmm1
movsd -0x18(%rbp), %xmm0
callq 0x9050
mulsd 0x5ed3f(%rip), %xmm0    # 0xf58a8
divsd 0x5ed2f(%rip), %xmm0    # 0xf58a0
movsd 0x71637(%rip), %xmm2    # 0x1081b0
addsd %xmm0, %xmm2
xorpd %xmm3, %xmm3
movapd %xmm0, %xmm1
cmpltsd %xmm3, %xmm1
andpd %xmm1, %xmm2
andnpd %xmm0, %xmm1
orpd %xmm2, %xmm1
movapd %xmm1, %xmm0
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: poll_next_acron()
void poll_next_acron()
{
   if(1 && (pri_seconds == SCPI_STATUS_SECOND)) { // request status
      if(need_acron_sync) {
         need_acron_sync = 0;
         send_acron_cmd("h");  // user wants a reception attempt
         if(sim_file == 0) Sleep(500);
      }

      send_acron_cmd("g");   // get receiver status
      ++pri_seconds;
      ++seconds;
   }
   else if(0 && (this_acron_cmd == 'G')) {
      send_acron_cmd("i");  // async world time / time zone info
   }
   else send_acron_cmd("o");  // time
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x260793(%rip), %rbx    # 0x2f7500
cmpl $0x20, (%rbx)
jne 0x96dc3
cmpl $0x0, 0x2bfeb7(%rip)    # 0x356c30
je 0x96da5
andl $0x0, 0x2bfeae(%rip)    # 0x356c30
leaq 0x6a886(%rip), %rdi     # 0x10160f
callq 0x57665
leaq 0x19162b(%rip), %rax    # 0x2283c0
cmpq $0x0, (%rax)
jne 0x96da5
movl $0x1f4, %edi            # imm = 0x1F4
callq 0xae83
leaq 0x8264c(%rip), %rdi     # 0x1193f8
callq 0x57665
incl (%rbx)
leaq 0x26070e(%rip), %rax    # 0x2f74c8
incl (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x6cfee(%rip), %rdi     # 0x103db8
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x57665