LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x810b1
testl %eax, %eax
je 0xa2b13
leaq 0x298f90(%rip), %rdi    # 0x33ba40
leaq 0x8d510(%rip), %rsi     # 0x12ffc7
callq 0x9090
xorl %ecx, %ecx
testq %rax, %rax
jne 0xa2afd
leaq 0x298f76(%rip), %rdi    # 0x33ba40
leaq 0x7e6a0(%rip), %rsi     # 0x121171
callq 0x9090
movl $0x1, %ecx
testq %rax, %rax
jne 0xa2afd
leaq 0x298f59(%rip), %rdi    # 0x33ba40
leaq 0x8d4c9(%rip), %rsi     # 0x12ffb7
callq 0x9090
movl $0x2, %ecx
testq %rax, %rax
je 0xa2b06
leaq 0x177ecc(%rip), %rax    # 0x21a9d0
movl %ecx, (%rax)
leaq 0x177f0f(%rip), %rax    # 0x21aa1c
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x810b1
testl %eax, %eax
je 0xa2bd9
leaq 0x298ea1(%rip), %rdi    # 0x33ba40
callq 0x9470
mulsd 0x664a4(%rip), %xmm0    # 0x109050
leaq 0x177d5d(%rip), %rax    # 0x21a910
movsd %xmm0, (%rax)
leaq 0x177e6a(%rip), %rax    # 0x21aa28
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x269bec(%rip), %rax    # 0x30c7b8
movsd %xmm0, (%rax)
leaq 0x26a661(%rip), %rax    # 0x30d238
movl %ecx, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x810b1
testl %eax, %eax
je 0xa2c4c
leaq 0x298e16(%rip), %rdi    # 0x33ba40
callq 0x9470
mulsd 0x66429(%rip), %xmm0    # 0x109060
leaq 0x177ce2(%rip), %rax    # 0x21a920
movsd %xmm0, (%rax)
leaq 0x177de7(%rip), %rax    # 0x21aa30
orb $0x1, (%rax)
callq 0x810b1
testl %eax, %eax
je 0xa2c7e
leaq 0x298de4(%rip), %rdi    # 0x33ba40
callq 0x9470
mulsd 0x663f7(%rip), %xmm0    # 0x109060
leaq 0x177cb8(%rip), %rax    # 0x21a928
movsd %xmm0, (%rax)
leaq 0x177db5(%rip), %rax    # 0x21aa30
orb $0x2, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x810b1
testl %eax, %eax
je 0xa2d5f
leaq 0x298d48(%rip), %rdi    # 0x33ba40
leaq 0x8d2c8(%rip), %rbx     # 0x12ffc7
movq %rbx, %rsi
callq 0x9090
testq %rax, %rax
jne 0xa2d48
leaq 0x298d2d(%rip), %rdi    # 0x33ba40
leaq 0x73020(%rip), %rsi     # 0x115d3a
callq 0x9090
testq %rax, %rax
je 0xa2d2d
leaq 0x75e5a(%rip), %rbx     # 0x118b85
jmp 0xa2d48
leaq 0x298d0c(%rip), %rdi    # 0x33ba40
leaq 0x7a908(%rip), %rbx     # 0x11d643
movq %rbx, %rsi
callq 0x9090
testq %rax, %rax
je 0xa2d52
leaq 0x177ca9(%rip), %rax    # 0x21a9f8
movq %rbx, (%rax)
leaq 0x177d0b(%rip), %rax    # 0x21aa64
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x810b1
testl %eax, %eax
je 0xa2e3b
leaq 0x298c8a(%rip), %rdi    # 0x33ba40
leaq 0x847f9(%rip), %rbx     # 0x1275b6
movq %rbx, %rsi
callq 0x9090
testq %rax, %rax
jne 0xa2e24
leaq 0x298c6f(%rip), %rdi    # 0x33ba40
leaq 0x81699(%rip), %rbx     # 0x124471
movq %rbx, %rsi
callq 0x9090
testq %rax, %rax
jne 0xa2e24
leaq 0x298c54(%rip), %rdi    # 0x33ba40
leaq 0x82b5c(%rip), %rbx     # 0x12594f
movq %rbx, %rsi
callq 0x9090
testq %rax, %rax
jne 0xa2e24
leaq 0x298c39(%rip), %rdi    # 0x33ba40
leaq 0x846aa(%rip), %r14     # 0x1274b8
movq %r14, %rsi
callq 0x9090
testq %rax, %rax
leaq 0x84402(%rip), %rbx     # 0x127222
cmovneq %r14, %rbx
leaq 0x177bc5(%rip), %rax    # 0x21a9f0
movq %rbx, (%rax)
leaq 0x177c03(%rip), %rax    # 0x21aa38
movl $0x1, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x810b1
testl %eax, %eax
je 0xa2e91
leaq 0x298bec(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x177ad0(%rip), %rax    # 0x21a930
movsd %xmm0, (%rax)
leaq 0x177ba1(%rip), %rax    # 0x21aa0c
movl $0x1, (%rax)
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x269b98(%rip), %rax    # 0x30ca18
movsd %xmm0, (%rax)
leaq 0x26a3c1(%rip), %rax    # 0x30d24c
movl $0x71, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x810b1
testl %eax, %eax
je 0xa2f0f
leaq 0x298b66(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x177a62(%rip), %rax    # 0x21a948
movsd %xmm0, (%rax)
leaq 0x177b53(%rip), %rax    # 0x21aa44
movl $0x1, (%rax)
leaq 0x2698c2(%rip), %rax    # 0x30c7c0
movsd %xmm0, (%rax)
leaq 0x26a32b(%rip), %rax    # 0x30d234
movl $0x44, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x810b1
testl %eax, %eax
je 0xa2fa5
leaq 0x298ab5(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x1779c9(%rip), %rax    # 0x21a960
movsd %xmm0, (%rax)
leaq 0x177aae(%rip), %rax    # 0x21aa50
orb $0x1, (%rax)
callq 0x810b1
testl %eax, %eax
je 0xa2fcf
leaq 0x298a8b(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x1779a7(%rip), %rax    # 0x21a968
movsd %xmm0, (%rax)
leaq 0x177a84(%rip), %rax    # 0x21aa50
orb $0x2, (%rax)
callq 0x810b1
testl %eax, %eax
je 0xa2ff9
leaq 0x298a61(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x177985(%rip), %rax    # 0x21a970
movsd %xmm0, (%rax)
leaq 0x177a5a(%rip), %rax    # 0x21aa50
orb $0x4, (%rax)
callq 0x810b1
testl %eax, %eax
je 0xa3023
leaq 0x298a37(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x177963(%rip), %rax    # 0x21a978
movsd %xmm0, (%rax)
leaq 0x177a30(%rip), %rax    # 0x21aa50
orb $0x8, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x810b1
testl %eax, %eax
je 0xa31f2
leaq 0x2988cd(%rip), %rdi    # 0x33ba40
movl $0x31, %esi
callq 0x9100
testq %rax, %rax
je 0xa319b
leaq 0x177843(%rip), %rax    # 0x21a9cc
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x1778e9(%rip), %rax    # 0x21aa80
movl %ecx, (%rax)
jmp 0xa31ce
leaq 0x29889e(%rip), %rdi    # 0x33ba40
leaq 0x8ce0e(%rip), %rsi     # 0x12ffb7
callq 0x9090
leaq 0x1778cb(%rip), %rcx    # 0x21aa80
movl $0x1, (%rcx)
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
leaq 0x177802(%rip), %rax    # 0x21a9cc
movl %ecx, (%rax)
je 0xa31f4
leaq 0x26a003(%rip), %rcx    # 0x30d1d8
movl $0x80, %eax
orl (%rcx), %eax
leaq 0x269ff5(%rip), %rcx    # 0x30d1d8
movl %eax, (%rcx)
leaq 0x26a0ac(%rip), %rax    # 0x30d298
movl $0x21, (%rax)
popq %rbp
retq
leaq 0x269fdd(%rip), %rcx    # 0x30d1d8
movl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
andl (%rcx), %eax
jmp 0xa31dc
// File: /workspace/github_cpp_makefile_star2_O3/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 0x810b1
testl %eax, %eax
je 0xa32ee
leaq 0x2987eb(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x17775f(%rip), %rax    # 0x21a9c0
movsd %xmm0, (%rax)
leaq 0x177810(%rip), %rax    # 0x21aa7c
movl $0x21, (%rax)
addsd 0x7b54e(%rip), %xmm0    # 0x11e7c8
movsd %xmm0, -0x8(%rbp)
xorpd %xmm0, %xmm0
movl $0x17, %edi
movl $0x3b, %esi
movl $0x3b, %edx
callq 0xd492e
addsd -0x8(%rbp), %xmm0
leaq 0x26a2bd(%rip), %rax    # 0x30d560
movsd %xmm0, (%rax)
leaq 0x26a282(%rip), %rax    # 0x30d530
subsd (%rax), %xmm0
xorl %eax, %eax
ucomisd 0x7aecc(%rip), %xmm0    # 0x11e188
movl $0x39, %ecx
cmovael %eax, %ecx
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
cmoval %eax, %ecx
leaq 0x269f1a(%rip), %rax    # 0x30d1f0
movl %ecx, (%rax)
leaq 0x26a289(%rip), %rax    # 0x30d568
movl %ecx, (%rax)
cvttsd2si %xmm0, %eax
leaq 0x269f00(%rip), %rcx    # 0x30d1ec
movl %eax, (%rcx)
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x810b1
testl %eax, %eax
je 0xa33cf
leaq 0x177663(%rip), %rax    # 0x21aa18
movl $0x1, (%rax)
leaq 0x29867e(%rip), %rdi    # 0x33ba40
addq $0x4, %rdi
callq 0x95e0
movl %eax, %ebx
jmp 0xa33d4
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
callq 0x810b1
testl %eax, %eax
je 0xa3431
leaq 0x29865c(%rip), %rax    # 0x33ba40
movb $0x0, 0x20(%rax)
cmpl $0xbf, %ebx
ja 0xa3431
leaq 0x298e29(%rip), %r14    # 0x33c220
leaq 0x82556(%rip), %rsi     # 0x125954
leaq 0x29863b(%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 0xacb0b(%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_O3/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 0x810b1
testl %eax, %eax
je 0xa3464
leaq 0x2985f6(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x17752a(%rip), %rax    # 0x21a980
movsd %xmm0, (%rax)
leaq 0x1775f3(%rip), %rax    # 0x21aa54
orb $0x1, (%rax)
callq 0x810b1
testl %eax, %eax
je 0xa348e
leaq 0x2985cc(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x177508(%rip), %rax    # 0x21a988
movsd %xmm0, (%rax)
leaq 0x1775c9(%rip), %rax    # 0x21aa54
orb $0x2, (%rax)
callq 0x810b1
testl %eax, %eax
je 0xa34ba
leaq 0x2985a2(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x1774e6(%rip), %rax    # 0x21a990
movsd %xmm0, (%rax)
leaq 0x17759f(%rip), %rax    # 0x21aa54
orb $0x4, (%rax)
jmp 0xa34c5
leaq 0x1774cf(%rip), %rax    # 0x21a990
movsd (%rax), %xmm0
leaq 0x1774b4(%rip), %rax    # 0x21a980
movsd (%rax), %xmm1
leaq 0x1774b1(%rip), %rax    # 0x21a988
addsd (%rax), %xmm1
addsd %xmm0, %xmm1
divsd 0x68521(%rip), %xmm1    # 0x10ba08
leaq 0x1774aa(%rip), %rax    # 0x21a998
movsd %xmm1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x293b1f(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0xa356a
leaq 0x1753c9(%rip), %rax    # 0x2188d0
cmpq $0x20000, (%rax)        # imm = 0x20000
jne 0xa356a
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x1, %edi
callq 0x63e3b
testl %ebx, %ebx
leaq 0x8247c(%rip), %rax     # 0x1259a7
leaq 0x82468(%rip), %rdi     # 0x12599a
cmoveq %rax, %rdi
movl $0x145, %esi            # imm = 0x145
callq 0x5edda
leaq 0x1774a5(%rip), %rax    # 0x21a9ec
cmpl $0x0, (%rax)
jne 0xa3553
xorl %edi, %edi
callq 0x63e3b
leaq 0x8229d(%rip), %rdi     # 0x1257f7
movl $0x145, %esi            # imm = 0x145
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5edda
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x293aa8(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0xa368d
leaq 0x17534e(%rip), %rax    # 0x2188d0
cmpq $0x20000, (%rax)        # imm = 0x20000
jne 0xa368d
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
movl $0x1, %edi
movsd %xmm0, -0x18(%rbp)
callq 0x63e3b
leal -0x3b(%rbx), %eax
testl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
setne %al
xorpd %xmm0, %xmm0
movsd -0x18(%rbp), %xmm1
ucomisd %xmm0, %xmm1
leaq 0x823eb(%rip), %rdi     # 0x1259b5
jne 0xa35ce
jnp 0xa3635
testb %al, %al
jne 0xa3635
xorl %edi, %edi
xorl %esi, %esi
movl $0x1, %edx
callq 0xd492e
addsd -0x18(%rbp), %xmm0
cvttsd2si %xmm0, %edx
leaq 0x298c30(%rip), %r14    # 0x33c220
leaq 0x823d2(%rip), %rsi     # 0x1259c9
movq %r14, %rdi
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
movl $0x149, %esi            # imm = 0x149
callq 0x5edda
leaq 0x823c6(%rip), %rsi     # 0x1259db
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
movl $0x148, %esi            # imm = 0x148
callq 0x5edda
leaq 0x823b8(%rip), %rdi     # 0x1259ed
movl $0x147, %esi            # imm = 0x147
callq 0x5edda
leaq 0x1773a6(%rip), %rax    # 0x21a9ec
cmpl $0x0, (%rax)
jne 0xa3652
xorl %edi, %edi
callq 0x63e3b
leaq 0x822b6(%rip), %rdi     # 0x12590f
movl $0x147, %esi            # imm = 0x147
callq 0x5edda
leaq 0x822b6(%rip), %rdi     # 0x125920
movl $0x148, %esi            # imm = 0x148
callq 0x5edda
leaq 0x822b5(%rip), %rdi     # 0x125930
movl $0x149, %esi            # imm = 0x149
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x5edda
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x293985(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0xa36fc
leaq 0x17522f(%rip), %rax    # 0x2188d0
cmpq $0x20000, (%rax)        # imm = 0x20000
jne 0xa36fc
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x1, %edi
movsd %xmm0, -0x10(%rbp)
callq 0x63e3b
leaq 0x298b5a(%rip), %rbx    # 0x33c220
leaq 0x8236a(%rip), %rsi     # 0x125a37
movq %rbx, %rdi
movsd -0x10(%rbp), %xmm0
movb $0x1, %al
callq 0x9060
movq %rbx, %rdi
movl $0x144, %esi            # imm = 0x144
callq 0x5edda
leaq 0x1772fc(%rip), %rax    # 0x21a9ec
cmpl $0x0, (%rax)
leaq 0x8(%rsp), %rsp
popq %rbx
popq %rbp
je 0xa36fd
retq
xorl %edi, %edi
jmp 0x63e3b
// File: /workspace/github_cpp_makefile_star2_O3/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 0x29390f(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0xa3763
leaq 0x1751b9(%rip), %rax    # 0x2188d0
cmpq $0x20000, (%rax)        # imm = 0x20000
jne 0xa3763
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x1, %edi
callq 0x63e3b
testl %ebx, %ebx
leaq 0x7dd15(%rip), %rax     # 0x121450
leaq 0x7d1b6(%rip), %rdi     # 0x1208f8
cmoveq %rax, %rdi
movl $0x143, %esi            # imm = 0x143
callq 0x5edda
leaq 0x177295(%rip), %rax    # 0x21a9ec
cmpl $0x0, (%rax)
leaq 0x8(%rsp), %rsp
popq %rbx
popq %rbp
je 0xa3764
retq
xorl %edi, %edi
jmp 0x63e3b
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2938a8(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0xa37ea
leaq 0x175152(%rip), %rax    # 0x2188d0
cmpq $0x20000, (%rax)        # imm = 0x20000
jne 0xa37ea
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x1, %edi
movsd %xmm0, -0x10(%rbp)
callq 0x63e3b
leaq 0x298a7d(%rip), %rbx    # 0x33c220
leaq 0x8229b(%rip), %rsi     # 0x125a45
movq %rbx, %rdi
movsd -0x10(%rbp), %xmm0
movb $0x1, %al
callq 0x9060
movq %rbx, %rdi
movl $0x141, %esi            # imm = 0x141
callq 0x5edda
leaq 0x8212c(%rip), %rdi     # 0x1258f9
movl $0x141, %esi            # imm = 0x141
callq 0x5edda
leaq 0x17720e(%rip), %rax    # 0x21a9ec
cmpl $0x0, (%rax)
leaq 0x8(%rsp), %rsp
popq %rbx
popq %rbp
je 0xa37eb
retq
xorl %edi, %edi
jmp 0x63e3b
// File: /workspace/github_cpp_makefile_star2_O3/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 0x29381a(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0xa380a
popq %rbx
popq %r14
popq %rbp
retq
movq %rdi, %rbx
testq %rdi, %rdi
je 0xa3805
leaq 0x1750b7(%rip), %rax    # 0x2188d0
cmpq $0x20000, (%rax)        # imm = 0x20000
jne 0xa3805
movl $0x1, %edi
callq 0x63e3b
leaq 0x2989ed(%rip), %r14    # 0x33c220
leaq 0x82218(%rip), %rsi     # 0x125a52
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
movl $0x142, %esi            # imm = 0x142
callq 0x5edda
leaq 0x177191(%rip), %rax    # 0x21a9ec
cmpl $0x0, (%rax)
jne 0xa3867
xorl %edi, %edi
callq 0x63e3b
leaq 0x82095(%rip), %rdi     # 0x125903
movl $0x142, %esi            # imm = 0x142
popq %rbx
popq %r14
popq %rbp
jmp 0x5edda
// File: /workspace/github_cpp_makefile_star2_O3/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 0x293797(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0xa3913
leaq 0x17503d(%rip), %rax    # 0x2188d0
cmpq $0x20000, (%rax)        # imm = 0x20000
jne 0xa3913
pushq %rbp
movq %rsp, %rbp
movl $0x1, %edi
callq 0x63e3b
leaq 0x821ce(%rip), %rdi     # 0x125a7f
movl $0x14c, %esi            # imm = 0x14C
callq 0x5edda
leaq 0x17712a(%rip), %rax    # 0x21a9ec
cmpl $0x0, (%rax)
jne 0xa38ce
xorl %edi, %edi
callq 0x63e3b
leaq 0x8206b(%rip), %rdi     # 0x125940
movl $0x14a, %esi            # imm = 0x14A
callq 0x5edda
leaq 0x17700e(%rip), %rax    # 0x21a8f4
movl $0x0, (%rax)
xorl %eax, %eax
leaq 0x17565b(%rip), %rcx    # 0x218f50
movb $0x0, (%rcx,%rax)
addq $0x22, %rax
cmpq $0x1980, %rax           # imm = 0x1980
jne 0xa38f5
leaq 0x174f38(%rip), %rax    # 0x218844
movl $0x1eb9, (%rax)         # imm = 0x1EB9
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x19aa3c(%rip), %rax    # 0x23e360
movq (%rax), %rcx
testq %rcx, %rcx
je 0xa3969
leaq 0x19aadd(%rip), %rax    # 0x23e410
testb $0x4, (%rax)
je 0xa3969
testq %rbx, %rbx
je 0xa3953
leaq 0x82148(%rip), %rsi     # 0x125a8c
movq %rcx, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x9560
jmp 0xa3969
leaq 0x82148(%rip), %rdi     # 0x125aa2
movl $0x14, %esi
movl $0x1, %edx
callq 0x9750
movl $0x0, 0x2c849d(%rip)    # 0x36be10
movb $0x0, 0x2c913c(%rip)    # 0x36cab6
movl $0x3e, %edi
callq 0x590f7
testq %rbx, %rbx
je 0xa3999
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e8a6
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xa39fc
movl $0x3b, %edi
callq 0x590f7
movl $0x2a, %edi
callq 0x590f7
movzbl 0x2c90ee(%rip), %edx    # 0x36cab6
leaq 0x870ac(%rip), %rsi     # 0x12aa7b
leaq -0x12(%rbp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movzbl (%rbx), %esi
movl $0xa, %edi
xorl %edx, %edx
callq 0xbcaa
movzbl 0x1(%rbx), %esi
movl $0xa, %edi
xorl %edx, %edx
callq 0xbcaa
movl $0xa, %edi
movl $0x3c, %esi
xorl %edx, %edx
callq 0xbcaa
movl $0xa, %edi
movl $0xd, %esi
xorl %edx, %edx
callq 0xbcaa
movl $0xa, %edi
movl $0xa, %esi
movl $0x1, %edx
callq 0xbcaa
leaq 0x19a987(%rip), %rax    # 0x23e3c0
cmpq $0x0, (%rax)
je 0xa3a46
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
movl $0x32, %edi
addq $0x18, %rsp
popq %rbx
popq %rbp
jmp 0xafe8
// File: /workspace/github_cpp_makefile_star2_O3/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 0x82035(%rip), %rsi     # 0x125ab7
leaq -0x30(%rbp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5e8a6
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x83d8c
movl $0x1, %edi
callq 0x83d8c
testl %eax, %eax
je 0xa4007
leaq 0x2692db(%rip), %rax    # 0x30d2b0
movl $0x21, (%rax)
leaq 0x297a5e(%rip), %rax    # 0x33ba40
movb (%rax), %cl
addb $-0x30, %cl
movl $0xff, %eax
cmpb $0x13, %cl
ja 0xa3ffe
movzbl %cl, %eax
leaq 0x7c099(%rip), %rcx     # 0x120094
movl (%rcx,%rax,4), %eax
leaq 0x269497(%rip), %rcx    # 0x30d49c
movl %eax, (%rcx)
movl $0x1, %edi
callq 0x83d8c
testl %eax, %eax
je 0xa4046
leaq 0x297a24(%rip), %rax    # 0x33ba40
leaq 0x2691b5(%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 0x2691ec(%rip), %rax    # 0x30d22c
movl $0x21, (%rax)
movl $0x1, %edi
callq 0x83d8c
movl $0x2, %edi
callq 0x83d8c
movl $0x1, %edi
callq 0x83d8c
movl $0x1, %edi
callq 0x83d8c
testl %eax, %eax
je 0xa40ae
leaq 0x26915f(%rip), %rax    # 0x30d1d8
movl (%rax), %ecx
movl %ecx, %edx
andl $0xfffff7ff, %edx       # imm = 0xFFFFF7FF
movl %edx, (%rax)
leaq 0x2979b4(%rip), %rdx    # 0x33ba40
movzbl (%rdx), %edx
cmpl $0x41, %edx
je 0xa4099
cmpl $0x38, %edx
jne 0xa40a1
orl $0x800, %ecx            # imm = 0x800
movl %ecx, (%rax)
leaq 0x2691fc(%rip), %rax    # 0x30d2a4
movl $0x1, (%rax)
movl $0x2, %edi
popq %rbp
jmp 0x83d8c
// File: /workspace/github_cpp_makefile_star2_O3/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 0x299dec(%rip), %rax    # 0x33deb0
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x299ff1(%rip), %rax    # 0x33e0c0
movb %cl, (%rax)
leaq 0x29a1f8(%rip), %rax    # 0x33e2d0
movb %cl, (%rax)
leaq 0x29a3ff(%rip), %rax    # 0x33e4e0
movb %cl, (%rax)
movl $0x3b, %edi
callq 0x9d758
testl %eax, %eax
je 0xa4104
leaq 0x299db8(%rip), %rdi    # 0x33deb0
leaq 0x297941(%rip), %rsi    # 0x33ba40
callq 0x9340
movl $0x3b, %edi
callq 0x9d758
testl %eax, %eax
je 0xa4125
leaq 0x299fa7(%rip), %rdi    # 0x33e0c0
leaq 0x297920(%rip), %rsi    # 0x33ba40
callq 0x9340
movl $0x3b, %edi
callq 0x9d758
testl %eax, %eax
je 0xa4146
leaq 0x29a196(%rip), %rdi    # 0x33e2d0
leaq 0x2978ff(%rip), %rsi    # 0x33ba40
callq 0x9340
movl $0x3b, %edi
callq 0x9d758
testl %eax, %eax
je 0xa4167
leaq 0x29a385(%rip), %rdi    # 0x33e4e0
leaq 0x2978de(%rip), %rsi    # 0x33ba40
callq 0x9340
leaq 0x269806(%rip), %rax    # 0x30d974
orb $0xf, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xb9ad
movl $0xa, %edi
testl %eax, %eax
je 0xa470a
callq 0x1ea0b
callq 0x584bd
leaq 0x269c20(%rip), %rcx    # 0x30e2e0
cmpb $0x0, 0x17a12(%rcx)
je 0xa46d0
movb $0x0, 0x17a12(%rcx)
leaq 0x293b7f(%rip), %rbx    # 0x338256
movzwl (%rbx), %ecx
cmpl $0x1, %ecx
je 0xa4715
testl %ecx, %ecx
jne 0xa4721
cmpl $0x1, %eax
jne 0xa46f2
movw $0x1, (%rbx)
callq 0x58672
leaq 0x293b59(%rip), %rax    # 0x338252
xorl %ecx, %ecx
movw %cx, (%rax)
leaq 0x293b4f(%rip), %rax    # 0x338254
movw %cx, (%rax)
jmp 0xa4749
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1e66a
cmpb $0xa, %al
je 0xa4721
movzbl %al, %ecx
cmpl $0xd, %ecx
jne 0xa4750
callq 0xa4448
movl $0x1, 0x2c7564(%rip)    # 0x36bc94
leaq 0x293b1b(%rip), %rax    # 0x338252
xorl %ecx, %ecx
movw %cx, (%rax)
leaq 0x293b11(%rip), %rax    # 0x338254
movw %cx, (%rax)
movw %cx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x293afb(%rip), %rcx    # 0x338252
movzwl (%rcx), %edx
cmpq $0xfff, %rdx            # imm = 0xFFF
ja 0xa4775
leal 0x1(%rdx), %esi
movw %si, (%rcx)
leaq 0x292ae0(%rip), %rcx    # 0x337250
movb %al, (%rcx,%rdx)
jmp 0xa4749
leaq 0x19a7f4(%rip), %rax    # 0x23ef70
orb $-0x80, 0x1(%rax)
xorl %eax, %eax
movw %ax, (%rcx)
leaq 0x293ac8(%rip), %rcx    # 0x338254
movw %ax, (%rcx)
movw %ax, (%rbx)
jmp 0xa4749
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8132b(%rip), %rdi     # 0x125adb
callq 0x58dc2
callq 0x810b1
testl %eax, %eax
je 0xa47e8
leaq 0x29727b(%rip), %rdi    # 0x33ba40
leaq 0x81319(%rip), %rsi     # 0x125ae5
leaq 0x268d3d(%rip), %rdx    # 0x30d510
leaq 0x268d32(%rip), %rcx    # 0x30d50c
leaq 0x268d33(%rip), %r8     # 0x30d514
xorl %eax, %eax
callq 0x9360
callq 0x810b1
testl %eax, %eax
je 0xa4829
leaq 0x297248(%rip), %rdi    # 0x33ba40
leaq 0x812f3(%rip), %rsi     # 0x125af2
leaq 0x268d02(%rip), %rdx    # 0x30d508
leaq 0x268cf7(%rip), %rcx    # 0x30d504
leaq 0x268cec(%rip), %r8     # 0x30d500
xorl %eax, %eax
callq 0x9360
leaq 0x268cf6(%rip), %rax    # 0x30d518
movq $0x0, (%rax)
leaq 0x268c8d(%rip), %rax    # 0x30d4bd
cmpb $0x0, (%rax)
je 0xa4840
xorpd %xmm0, %xmm0
callq 0x5c7ed
jmp 0xa4867
leaq 0x268ee1(%rip), %rax    # 0x30d728
cvtsi2sdl (%rax), %xmm0
callq 0x5c7ed
leaq 0x268c4d(%rip), %rax    # 0x30d4a4
andb $-0x2, (%rax)
leaq 0x268b6b(%rip), %rax    # 0x30d3cc
movl $0x1, (%rax)
popq %rbp
jmp 0x730e8
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8010f(%rip), %rdi     # 0x124bf4
callq 0x58dc2
leaq 0x297473(%rip), %rax    # 0x33bf64
cmpl $0x0, (%rax)
je 0xa4af8
popq %rbp
retq
callq 0x810b1
testl %eax, %eax
je 0xa4b18
leaq 0x296f38(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x2684cc(%rip), %rax    # 0x30cfe0
movsd %xmm0, (%rax)
popq %rbp
jmp 0x810b1
// File: /workspace/github_cpp_makefile_star2_O3/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 0x80fd6(%rip), %rdi     # 0x125aff
callq 0x58dc2
callq 0x810b1
testl %eax, %eax
je 0xa4b6e
leaq 0x296f02(%rip), %rdi    # 0x33ba40
callq 0x95e0
cmpl $0x2, %eax
ja 0xa4b6e
movl %eax, %eax
leaq 0x7b593(%rip), %rcx     # 0x1200e4
movss (%rcx,%rax,4), %xmm0
leaq 0x268557(%rip), %rax    # 0x30d0b4
movss %xmm0, (%rax)
leaq 0x268894(%rip), %rax    # 0x30d3fc
movl $0x1bc, (%rax)          # imm = 0x1BC
callq 0x810b1
testl %eax, %eax
je 0xa4b84
leaq 0x269276(%rip), %rax    # 0x30ddf4
movl $0x1bc, (%rax)          # imm = 0x1BC
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x800e7(%rip), %rdi     # 0x124c78
callq 0x58dc2
callq 0x810b1
testl %eax, %eax
je 0xa4bcb
leaq 0x296e9a(%rip), %rdi    # 0x33ba40
callq 0x9470
divsd 0x64475(%rip), %xmm0    # 0x109028
leaq 0x26920e(%rip), %rax    # 0x30ddc8
movsd %xmm0, (%rax)
leaq 0x2686ef(%rip), %rax    # 0x30d2b4
movl $0x1bc, (%rax)          # imm = 0x1BC
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x80094(%rip), %rdi     # 0x124c6c
callq 0x58dc2
callq 0x810b1
testl %eax, %eax
je 0xa4c58
leaq 0x296e53(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x2685df(%rip), %rcx    # 0x30d1d8
movl (%rcx), %edx
movl %edx, %esi
andl $-0x21, %esi
movl %esi, (%rcx)
cmpl $0x3, %eax
je 0xa4c31
cmpl $0x1, %eax
je 0xa4c25
testl %eax, %eax
jne 0xa4c42
cmpl $0x0, 0x2cd3e5(%rip)    # 0x371ffc
je 0xa4c4e
leaq 0x2684b0(%rip), %rax    # 0x30d0d0
movb $0x4, (%rax)
jmp 0xa4c58
leaq 0x2684a4(%rip), %rax    # 0x30d0d0
movb $0x7, (%rax)
jmp 0xa4c58
leaq 0x268498(%rip), %rax    # 0x30d0d0
movb $0xb, (%rax)
orl $0x20, %edx
movl %edx, (%rcx)
jmp 0xa4c58
leaq 0x268487(%rip), %rax    # 0x30d0d0
movb $0x63, (%rax)
jmp 0xa4c58
leaq 0x26847b(%rip), %rax    # 0x30d0d0
movb $0x2, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x80ea7(%rip), %rdi     # 0x125b0c
callq 0x58dc2
callq 0x810b1
testl %eax, %eax
je 0xa4ca7
leaq 0x296dc6(%rip), %rdi    # 0x33ba40
callq 0x95e0
cmpl $0x9, %eax
ja 0xa4c9d
movl %eax, %eax
leaq 0x7b463(%rip), %rcx     # 0x1200f0
movsd (%rcx,%rax,8), %xmm0
leaq 0x17e84f(%rip), %rax    # 0x2234e8
movsd %xmm0, (%rax)
leaq 0x17e840(%rip), %rax    # 0x2234e4
orb $0x1, (%rax)
callq 0x810b1
testl %eax, %eax
je 0xa4ce5
leaq 0x296d89(%rip), %rdi    # 0x33ba40
callq 0x95e0
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq 0x26850e(%rip), %rax    # 0x30d1d8
movl $0xfffff7ff, %edx       # imm = 0xFFFFF7FF
andl (%rax), %edx
shll $0xb, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
leaq 0x2685c5(%rip), %rax    # 0x30d2a4
movl $0x1bc, (%rax)          # imm = 0x1BC
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x80e26(%rip), %rdi     # 0x125b18
callq 0x58dc2
callq 0x810b1
testl %eax, %eax
je 0xa4d22
leaq 0x296d39(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x297159(%rip), %rcx    # 0x33be6c
movl %eax, (%rcx)
leaq 0x297154(%rip), %rax    # 0x33be70
movl $0x1, (%rax)
callq 0x810b1
testl %eax, %eax
je 0xa4d56
leaq 0x296d0e(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x29712a(%rip), %rcx    # 0x33be68
movb %al, (%rcx)
cmpb $0x7, %al
leaq 0x268fd7(%rip), %rax    # 0x30dd20
sete (%rax)
leaq 0x297121(%rip), %rax    # 0x33be74
orb $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x80dc1(%rip), %rdi     # 0x125b24
callq 0x58dc2
callq 0x810b1
testl %eax, %eax
je 0xa4da9
leaq 0x296cc8(%rip), %rdi    # 0x33ba40
callq 0x95e0
testl %eax, %eax
je 0xa4d94
cmpl $0x1, %eax
jne 0xa4da9
leaq 0x268717(%rip), %rax    # 0x30d4a4
movl (%rax), %eax
andl $-0x5, %eax
jmp 0xa4da0
leaq 0x268709(%rip), %rax    # 0x30d4a4
movl (%rax), %eax
orl $0x4, %eax
leaq 0x2686fd(%rip), %rcx    # 0x30d4a4
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x7ee61(%rip), %rdi     # 0x123c24
callq 0x58dc2
leaq 0x2971b9(%rip), %r13    # 0x33bf88
movq $0x0, (%r13)
callq 0x810b1
testl %eax, %eax
je 0xa4e1d
leaq 0x296c59(%rip), %rdi    # 0x33ba40
leaq 0x80cf7(%rip), %rsi     # 0x125ae5
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 0x9360
movl (%r15), %edi
movl (%rbx), %esi
movl (%r14), %edx
callq 0xd485e
movsd %xmm0, (%r13)
callq 0x810b1
testl %eax, %eax
je 0xa4e7f
leaq 0x296c13(%rip), %rdi    # 0x33ba40
leaq 0x80cfe(%rip), %rsi     # 0x125b32
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 0x9360
movl (%rbx), %edi
movl (%r14), %esi
movl (%r15), %edx
movsd (%r12), %xmm0
callq 0xd492e
addsd (%r13), %xmm0
movsd %xmm0, (%r13)
leaq 0x297113(%rip), %rax    # 0x33bf90
incl (%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x80ca9(%rip), %rdi     # 0x125b42
callq 0x58dc2
callq 0x810b1
testl %eax, %eax
je 0xa4edb
leaq 0x296b92(%rip), %rdi    # 0x33ba40
callq 0x95e0
leal (,%rax,8), %ecx
movabsq $0x20002040aff, %rdx    # imm = 0x20002040AFF
shrq %cl, %rdx
cmpl $0x6, %eax
movl $0xff, %eax
cmovbl %edx, %eax
leaq 0x2685be(%rip), %rcx    # 0x30d497
movb %al, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x80c6a(%rip), %rdi     # 0x125b52
callq 0x58dc2
callq 0x810b1
callq 0x810b1
testl %eax, %eax
je 0xa4f2e
leaq 0x296b3e(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x2682ca(%rip), %rcx    # 0x30d1d8
movl (%rcx), %edx
andl $-0x7, %edx
testl %eax, %eax
movl $0x6, %esi
cmovel %eax, %esi
orl %edx, %esi
movl %esi, (%rcx)
leaq 0x268304(%rip), %rax    # 0x30d22c
movl $0x1bc, (%rax)          # imm = 0x1BC
callq 0x810b1
testl %eax, %eax
je 0xa4f6a
leaq 0x296b02(%rip), %rdi    # 0x33ba40
callq 0x95e0
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq 0x26827f(%rip), %rax    # 0x30d1d0
movl (%rax), %edx
andl $-0x11, %edx
shll $0x4, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
leaq 0x268344(%rip), %rax    # 0x30d2a8
movl $0x1bc, (%rax)          # imm = 0x1BC
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x7e8ef(%rip), %rdi     # 0x123866
callq 0x58dc2
callq 0x810b1
testl %eax, %eax
je 0xa4f9c
leaq 0x296ab4(%rip), %rsi    # 0x33ba40
movb $0x0, 0x20(%rsi)
leaq 0x296ef9(%rip), %rdi    # 0x33be90
callq 0x9340
callq 0x810b1
testl %eax, %eax
je 0xa4fbc
leaq 0x296a94(%rip), %rsi    # 0x33ba40
movb $0x0, 0x20(%rsi)
leaq 0x296f09(%rip), %rdi    # 0x33bec0
callq 0x9340
callq 0x810b1
testl %eax, %eax
je 0xa4fdc
leaq 0x296a74(%rip), %rsi    # 0x33ba40
movb $0x0, 0x20(%rsi)
leaq 0x296f19(%rip), %rdi    # 0x33bef0
callq 0x9340
callq 0x810b1
testl %eax, %eax
je 0xa4ffc
leaq 0x296a54(%rip), %rsi    # 0x33ba40
movb $0x0, 0x20(%rsi)
leaq 0x296f29(%rip), %rdi    # 0x33bf20
callq 0x9340
leaq 0x268971(%rip), %rax    # 0x30d974
orb $0xf, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x80b4c(%rip), %rdi     # 0x125b5f
callq 0x58dc2
callq 0x810b1
testl %eax, %eax
je 0xa5040
leaq 0x296a18(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x296e35(%rip), %rcx    # 0x33be69
movb %al, (%rcx)
leaq 0x296e37(%rip), %rax    # 0x33be74
orb $0x2, (%rax)
popq %rbp
retq