LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_sro_vt()
void parse_sro_vt()
{
   log_packet_id("vt value");
   if(valid_sro_status()) {
      restart_prs_polling();
      return;
   }
   sro_vt = atoi(nmea_msg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8ed8a(%rip), %rdi     # 0x10d818
callq 0x520bf
callq 0x7e4d4
testl %eax, %eax
je 0x7eaa2
popq %rbp
jmp 0x7e67f
leaq 0x2a6d87(%rip), %rdi    # 0x325830
callq 0x95e0
leaq 0x279123(%rip), %rcx    # 0x2f7bd8
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_sro_vs()
void parse_sro_vs()
{
   log_packet_id("pps offset");
   if(valid_sro_status()) {
      restart_prs_polling();
      return;
   }
   sro_vs = atof(nmea_msg);
   pps_offset = sro_vs;
   have_pps_offset = 77;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8ed5d(%rip), %rdi     # 0x10d821
callq 0x520bf
callq 0x7e4d4
testl %eax, %eax
je 0x7ead8
popq %rbp
jmp 0x7e67f
leaq 0x2a6d51(%rip), %rdi    # 0x325830
callq 0x9470
leaq 0x2790e5(%rip), %rax    # 0x2f7bd0
movsd %xmm0, (%rax)
leaq 0x277cc2(%rip), %rax    # 0x2f67b8
movsd %xmm0, (%rax)
leaq 0x278737(%rip), %rax    # 0x2f7238
movl $0x4d, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_sro_ra()
void parse_sro_ra()
{
   log_packet_id("ra value");
   if(valid_sro_status()) {
      restart_prs_polling();
      return;
   }
   sro_ra = atoi(nmea_msg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8ed18(%rip), %rdi     # 0x10d82c
callq 0x520bf
callq 0x7e4d4
testl %eax, %eax
je 0x7eb28
popq %rbp
jmp 0x7e67f
leaq 0x2a6d01(%rip), %rdi    # 0x325830
callq 0x95e0
leaq 0x2790a5(%rip), %rcx    # 0x2f7be0
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_sro_gf()
void parse_sro_gf()
{
   log_packet_id("gofast value");
   if(valid_sro_status()) {
      restart_prs_polling();
      return;
   }
   sro_gf = atoi(nmea_msg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8eceb(%rip), %rdi     # 0x10d835
callq 0x520bf
callq 0x7e4d4
testl %eax, %eax
je 0x7eb5e
popq %rbp
jmp 0x7e67f
leaq 0x2a6ccb(%rip), %rdi    # 0x325830
callq 0x95e0
leaq 0x27906b(%rip), %rcx    # 0x2f7bdc
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_sro_l05()
void parse_sro_l05()
{
   log_packet_id("fc high byte");
   if(valid_sro_status()) {
      restart_prs_polling();
      return;
   }
   sro_l05 = atohex(nmea_msg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8ecc7(%rip), %rdi     # 0x10d847
callq 0x520bf
callq 0x7e4d4
testl %eax, %eax
je 0x7eb94
popq %rbp
jmp 0x7e67f
leaq 0x2a6c95(%rip), %rdi    # 0x325830
callq 0x98b2
leaq 0x27903d(%rip), %rcx    # 0x2f7be4
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_sro_l06()
void parse_sro_l06()
{
int i;

   log_packet_id("fc low byte");
   if(valid_sro_status()) {
      restart_prs_polling();
      return;
   }
   sro_l06 = atohex(nmea_msg);
   i = (sro_l05 * 256) + sro_l06;
   if(sro_l05 & 0x80) i = 32767-i;
   sro_poweron_fc = SRO_DDS_STEP * (double) i;
//sprintf(debug_text2, "pwronr_fc:%g %g  l05:%02X  l06:%02x", (double)sro_poweron_fc*SRO_DDS_STEP, sro_poweron_fc, sro_l05,sro_l06);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8eca3(%rip), %rdi     # 0x10d859
callq 0x520bf
callq 0x7e4d4
testl %eax, %eax
je 0x7ebca
popq %rbp
jmp 0x7e67f
leaq 0x2a6c5f(%rip), %rdi    # 0x325830
callq 0x98b2
leaq 0x27900b(%rip), %rcx    # 0x2f7be8
movl %eax, (%rcx)
leaq 0x278ffe(%rip), %rcx    # 0x2f7be4
movl (%rcx), %ecx
movl %ecx, %edx
shll $0x8, %edx
addl %eax, %edx
movl $0x7fff, %eax           # imm = 0x7FFF
subl %edx, %eax
testb %cl, %cl
cmovnsl %edx, %eax
cvtsi2sd %eax, %xmm0
mulsd 0x74549(%rip), %xmm0    # 0xf3150
leaq 0x279012(%rip), %rax    # 0x2f7c20
movsd %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_sro_r05()
void parse_sro_r05()
{
   log_packet_id("user fc high byte");
   if(valid_sro_status()) {
      restart_prs_polling();
      return;
   }
   sro_r05 = atohex(nmea_msg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8ec23(%rip), %rdi     # 0x10d842
callq 0x520bf
callq 0x7e4d4
testl %eax, %eax
je 0x7ec33
popq %rbp
jmp 0x7e67f
leaq 0x2a6bf6(%rip), %rdi    # 0x325830
callq 0x98b2
leaq 0x278fa6(%rip), %rcx    # 0x2f7bec
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_sro_r06()
void parse_sro_r06()
{
int i;

   log_packet_id("user fc low byte");
   if(valid_sro_status()) {
      restart_prs_polling();
      return;
   }
   sro_r06 = atohex(nmea_msg);
   i = (sro_r05 * 256) + sro_r06;
   if(sro_r05 & 0x80) i = 32767-i;
   sro_user_fc = SRO_DDS_STEP * (double) i;
//sprintf(debug_text2, "user_fc:%g %g  r14:%02X  r15:%02x", (double)sro_user_fc*SRO_DDS_STEP, sro_user_fc, sro_r05,sro_r06);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8ebff(%rip), %rdi     # 0x10d854
callq 0x520bf
callq 0x7e4d4
testl %eax, %eax
je 0x7ec69
popq %rbp
jmp 0x7e67f
leaq 0x2a6bc0(%rip), %rdi    # 0x325830
callq 0x98b2
leaq 0x278f74(%rip), %rcx    # 0x2f7bf0
movl %eax, (%rcx)
leaq 0x278f67(%rip), %rcx    # 0x2f7bec
movl (%rcx), %ecx
movl %ecx, %edx
shll $0x8, %edx
addl %eax, %edx
movl $0x7fff, %eax           # imm = 0x7FFF
subl %edx, %eax
testb %cl, %cl
cmovnsl %edx, %eax
cvtsi2sd %eax, %xmm0
mulsd 0x744aa(%rip), %xmm0    # 0xf3150
leaq 0x278f63(%rip), %rax    # 0x2f7c10
movsd %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_sro_r14()
void parse_sro_r14()
{
   log_packet_id("freq limit high byte");
   if(valid_sro_status()) {
      restart_prs_polling();
      return;
   }
   sro_r14 = atohex(nmea_msg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8eba7(%rip), %rdi     # 0x10d865
callq 0x520bf
callq 0x7e4d4
testl %eax, %eax
je 0x7ecd2
popq %rbp
jmp 0x7e67f
leaq 0x2a6b57(%rip), %rdi    # 0x325830
callq 0x98b2
leaq 0x278f0f(%rip), %rcx    # 0x2f7bf4
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_sro_r15()
void parse_sro_r15()
{
int i;

   log_packet_id("freq limit low byte");
   if(valid_sro_status()) {
      restart_prs_polling();
      return;
   }
   sro_r15 = atohex(nmea_msg);
   i = (sro_r14 * 256) + sro_r15;
   if(sro_r14 & 0x80) i = 32767-i;
   sro_freq_lim = SRO_DDS_STEP * (double) i;
//sprintf(debug_text, "freq lim:%g  r14:%02X  r15:%02x", sro_freq_lim, sro_r14,sro_r15);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8eb86(%rip), %rdi     # 0x10d87a
callq 0x520bf
callq 0x7e4d4
testl %eax, %eax
je 0x7ed08
popq %rbp
jmp 0x7e67f
leaq 0x2a6b21(%rip), %rdi    # 0x325830
callq 0x98b2
leaq 0x278edd(%rip), %rcx    # 0x2f7bf8
movl %eax, (%rcx)
leaq 0x278ed0(%rip), %rcx    # 0x2f7bf4
movl (%rcx), %ecx
movl %ecx, %edx
shll $0x8, %edx
addl %eax, %edx
movl $0x7fff, %eax           # imm = 0x7FFF
subl %edx, %eax
testb %cl, %cl
cmovnsl %edx, %eax
cvtsi2sd %eax, %xmm0
mulsd 0x7440b(%rip), %xmm0    # 0xf3150
leaq 0x278ecc(%rip), %rax    # 0x2f7c18
movsd %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_sro_r48()
void parse_sro_r48()
{
   log_packet_id("countdown high byte");
   if(valid_sro_status()) {
      restart_prs_polling();
      return;
   }
   sro_r48 = atohex(nmea_msg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8eb31(%rip), %rdi     # 0x10d88e
callq 0x520bf
callq 0x7e4d4
testl %eax, %eax
je 0x7ed71
popq %rbp
jmp 0x7e67f
leaq 0x2a6ab8(%rip), %rdi    # 0x325830
callq 0x98b2
leaq 0x278e78(%rip), %rcx    # 0x2f7bfc
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_sro_r49()
void parse_sro_r49()
{
int i;

   log_packet_id("countdown low byte");
   if(valid_sro_status()) {
      restart_prs_polling();
      return;
   }
   sro_r49 = atohex(nmea_msg);

   i = (sro_r48 * 256) + sro_r49;
   sro_countdown = i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8eb0f(%rip), %rdi     # 0x10d8a2
callq 0x520bf
callq 0x7e4d4
testl %eax, %eax
je 0x7eda7
popq %rbp
jmp 0x7e67f
leaq 0x2a6a82(%rip), %rdi    # 0x325830
callq 0x98b2
leaq 0x278e46(%rip), %rcx    # 0x2f7c00
movl %eax, (%rcx)
leaq 0x278e39(%rip), %rcx    # 0x2f7bfc
movl (%rcx), %ecx
shll $0x8, %ecx
addl %eax, %ecx
leaq 0x278e37(%rip), %rax    # 0x2f7c08
movl %ecx, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_sro_r4F()
void parse_sro_r4F()
{
   log_packet_id("4F value");
   if(valid_sro_status()) {
      restart_prs_polling();
      return;
   }
   sro_r4F = atohex(nmea_msg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8ead5(%rip), %rdi     # 0x10d8b5
callq 0x520bf
callq 0x7e4d4
testl %eax, %eax
je 0x7edf4
popq %rbp
jmp 0x7e67f
leaq 0x2a6a35(%rip), %rdi    # 0x325830
callq 0x98b2
leaq 0x278dfd(%rip), %rcx    # 0x2f7c04
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_sro_fs(int)
void set_sro_fs(int mode)
{
   if(read_only) return;

   if(mode < 0) mode = 0;
   if(mode > 3) mode = 1;
   sprintf(out, "FS%d", mode);
   queue_sro_cmd(out, SRO_FS_MSG);
   queue_sro_cmd("L05", SRO_L05_MSG); 
   queue_sro_cmd("L06", SRO_L06_MSG); 
   sro_eeprom();
}

// Assembly:
leaq 0x2a2196(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x7ee8a
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testl %edi, %edi
movl $0x0, %eax
cmovgl %edi, %eax
cmpl $0x4, %edi
pushq $0x1
popq %rdx
cmovll %eax, %edx
leaq 0x2a7376(%rip), %rbx    # 0x326220
leaq 0x8ea26(%rip), %rsi     # 0x10d8d7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x32a, %esi            # imm = 0x32A
callq 0x576d4
leaq 0x8c7ca(%rip), %rdi     # 0x10b699
movl $0x33e, %esi            # imm = 0x33E
callq 0x576d4
leaq 0x8c7bd(%rip), %rdi     # 0x10b69d
movl $0x33f, %esi            # imm = 0x33F
callq 0x576d4
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7ee6e
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_sro_gf(int)
void set_sro_gf(int secs)
{
   if(read_only) return;

   if(secs < 0) secs = 0;
   if(secs > 65535) secs = 65535;
   sprintf(out, "GF%05d", secs);
   queue_sro_cmd(out, SRO_GF_MSG);
   sro_eeprom();
}

// Assembly:
leaq 0x2a211e(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x7ef02
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %edx
xorl %eax, %eax
testl %edi, %edi
cmovlel %eax, %edx
movl $0xffff, %eax           # imm = 0xFFFF
cmpl %eax, %edx
cmovgel %eax, %edx
leaq 0x2a72fe(%rip), %rbx    # 0x326220
leaq 0x8e9b3(%rip), %rsi     # 0x10d8dc
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x332, %esi            # imm = 0x332
callq 0x576d4
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7ee6e
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_sro_width(double)
void set_sro_width(double usecs)
{
int val;

   if(read_only) return;

   if(usecs < 0.0) usecs = 0.0 - usecs;
   usecs *= 1000.0;
   usecs += (SRO_TICK / 2.0);
   val = (int) (usecs / SRO_TICK);
   if(val > 7499999) val = 7499999;
   sprintf(out, "PW%07d", val);
   queue_sro_cmd(out, SRO_PW_MSG);
   sro_eeprom();
}

// Assembly:
leaq 0x2a20c8(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x7ef58
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm2
cmpltsd %xmm1, %xmm2
subsd %xmm0, %xmm1
andpd %xmm2, %xmm1
andnpd %xmm0, %xmm2
orpd %xmm1, %xmm2
mulsd 0x740b5(%rip), %xmm2    # 0xf3038
addsd 0x89735(%rip), %xmm2    # 0x1086c0
divsd 0x76af5(%rip), %xmm2    # 0xf5a88
cvttsd2si %xmm2, %eax
movl $0x7270df, %edx         # imm = 0x7270DF
cmpl %edx, %eax
cmovll %eax, %edx
leaq 0x2a7278(%rip), %rbx    # 0x326220
leaq 0x8e934(%rip), %rsi     # 0x10d8e3
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x328, %esi            # imm = 0x328
callq 0x576d4
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7ee6e
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_sro_delay(double)
void set_sro_delay(double nsecs)
{
int val;

   if(read_only) return;

   if(nsecs < 0.0) nsecs = 0.0 - nsecs;
   nsecs += (SRO_TICK / 2.0);
   val = (int) (nsecs / SRO_TICK);
   if(val > 255) val = 255;
   sprintf(out, "DE%07d", val);
   queue_sro_cmd(out, SRO_DE_MSG);
   sro_eeprom();
}

// Assembly:
leaq 0x2a2042(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x7efde
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm2
cmpltsd %xmm1, %xmm2
subsd %xmm0, %xmm1
andpd %xmm2, %xmm1
andnpd %xmm0, %xmm2
orpd %xmm1, %xmm2
addsd 0x896b7(%rip), %xmm2    # 0x1086c0
divsd 0x76a77(%rip), %xmm2    # 0xf5a88
cvttsd2si %xmm2, %eax
movl $0xff, %edx
cmpl %edx, %eax
cmovll %eax, %edx
leaq 0x2a71fa(%rip), %rbx    # 0x326220
leaq 0x8e8bd(%rip), %rsi     # 0x10d8ea
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x327, %esi            # imm = 0x327
callq 0x576d4
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7ee6e
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_sro_raw(double)
void set_sro_raw(double nsecs)
{
int val;

   if(read_only) return;

   val = (int) (nsecs / SRO_TICK);
   if(val > 127) val = 127;
   if(val < -128) val = -128;
   if(val < 0) sprintf(out, "RA%04d", val);
   else        sprintf(out, "RA+%03d", val);
   queue_sro_cmd(out, SRO_RA_MSG);
   sro_eeprom();
}

// Assembly:
leaq 0x2a1fc4(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x7f05c
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
divsd 0x76a1e(%rip), %xmm0    # 0xf5a88
movsd 0x768ce(%rip), %xmm1    # 0xf5940
maxsd %xmm0, %xmm1
movsd 0x768ca(%rip), %xmm2    # 0xf5948
minsd %xmm1, %xmm2
cvttsd2si %xmm2, %eax
movsbl %al, %edx
cvttsd2si %xmm0, %eax
testl %eax, %eax
leaq 0x8e85b(%rip), %rax     # 0x10d8f1
leaq 0x8e85b(%rip), %rsi     # 0x10d8f8
cmovsq %rax, %rsi
leaq 0x2a7178(%rip), %rbx    # 0x326220
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x331, %esi            # imm = 0x331
callq 0x576d4
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7ee6e
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_sro_co(double)
void set_sro_co(double nsecs)
{
int val;

   if(read_only) return;

   val = (int) (nsecs);
   if(val > 127) val = 127;
   if(val < -128) val = -128;
   if(val < 0) sprintf(out, "CO%04d", val);
   else        sprintf(out, "CO+%03d", val);
   queue_sro_cmd(out, SRO_CO_MSG);
   sro_eeprom();
}

// Assembly:
leaq 0x2a1f49(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x7f0d7
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movsd 0x7685b(%rip), %xmm1    # 0xf5940
maxsd %xmm0, %xmm1
movsd 0x76857(%rip), %xmm2    # 0xf5948
minsd %xmm1, %xmm2
cvttsd2si %xmm2, %eax
movsbl %al, %edx
cvttsd2si %xmm0, %eax
testl %eax, %eax
leaq 0x8e7f7(%rip), %rax     # 0x10d900
leaq 0x8e7f7(%rip), %rsi     # 0x10d907
cmovsq %rax, %rsi
leaq 0x2a7105(%rip), %rbx    # 0x326220
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x32e, %esi            # imm = 0x32E
callq 0x576d4
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7ee6e
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_sro_fc(double)
void set_sro_fc(double ppb)
{
int val;

   if(read_only) return;

   val = (int) ((ppb*1.0E-12) / SRO_DDS_STEP);
   if(val > 32767) val = 32767;
   if(val < -32768) val = -32768;
   if(val < 0) sprintf(out, "FC%06d", val);
   else        sprintf(out, "FC+%05d", val);
   queue_sro_cmd(out, SRO_FC_MSG);
   queue_sro_cmd("L05", SRO_L05_MSG); 
   queue_sro_cmd("L06", SRO_L06_MSG); 
   sro_eeprom();
}

// Assembly:
leaq 0x2a1ed6(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x7f14a
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
mulsd 0x89118(%rip), %xmm0    # 0x108270
divsd 0x73ff0(%rip), %xmm0    # 0xf3150
movsd 0x89560(%rip), %xmm1    # 0x1086c8
maxsd %xmm0, %xmm1
movsd 0x8953c(%rip), %xmm2    # 0x1086b0
minsd %xmm1, %xmm2
cvttsd2si %xmm2, %eax
movswl %ax, %edx
cvttsd2si %xmm0, %eax
testl %eax, %eax
leaq 0x8e783(%rip), %rax     # 0x10d90f
leaq 0x8e783(%rip), %rsi     # 0x10d916
cmovsq %rax, %rsi
leaq 0x2a7082(%rip), %rbx    # 0x326220
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x329, %esi            # imm = 0x329
callq 0x576d4
leaq 0x8c4dd(%rip), %rdi     # 0x10b699
movl $0x33e, %esi            # imm = 0x33E
callq 0x576d4
leaq 0x8c4d0(%rip), %rdi     # 0x10b69d
movl $0x33f, %esi            # imm = 0x33F
callq 0x576d4
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7ee6e
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_sro_alarm_window(double)
void set_sro_alarm_window(double nsecs)
{
int val;

   if(read_only) return;

   if(nsecs < 0.0) nsecs = 0.0 - nsecs;
   nsecs += (SRO_TICK / 2.0);
   val = (int) (nsecs / SRO_TICK);
   if(val > 7499999) val = 7499999;
   sprintf(out, "AW%03d", val);
   queue_sro_cmd(out, SRO_AW_MSG);
   sro_eeprom();
}

// Assembly:
leaq 0x2a1e31(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x7f1ef
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm2
cmpltsd %xmm1, %xmm2
subsd %xmm0, %xmm1
andpd %xmm2, %xmm1
andnpd %xmm0, %xmm2
orpd %xmm1, %xmm2
addsd 0x894a6(%rip), %xmm2    # 0x1086c0
divsd 0x76866(%rip), %xmm2    # 0xf5a88
cvttsd2si %xmm2, %eax
movl $0x7270df, %edx         # imm = 0x7270DF
cmpl %edx, %eax
cmovll %eax, %edx
leaq 0x2a6fe9(%rip), %rbx    # 0x326220
leaq 0x8e6e0(%rip), %rsi     # 0x10d91e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x32c, %esi            # imm = 0x32C
callq 0x576d4
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7ee6e
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_sro_track_window(double)
void set_sro_track_window(double nsecs)
{
int val;

   if(read_only) return;

   if(nsecs < 0.0) nsecs = 0.0 - nsecs;
   nsecs += (SRO_TICK / 2.0);
   val = (int) (nsecs / SRO_TICK);
   if(val > 255) val = 255;
   sprintf(out, "TW%03d", val);
   queue_sro_cmd(out, SRO_TW_MSG);
   sro_eeprom();
}

// Assembly:
leaq 0x2a1db3(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x7f26d
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm2
cmpltsd %xmm1, %xmm2
subsd %xmm0, %xmm1
andpd %xmm2, %xmm1
andnpd %xmm0, %xmm2
orpd %xmm1, %xmm2
addsd 0x89428(%rip), %xmm2    # 0x1086c0
divsd 0x767e8(%rip), %xmm2    # 0xf5a88
cvttsd2si %xmm2, %eax
movl $0xff, %edx
cmpl %edx, %eax
cmovll %eax, %edx
leaq 0x2a6f6b(%rip), %rbx    # 0x326220
leaq 0x8e669(%rip), %rsi     # 0x10d925
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x32b, %esi            # imm = 0x32B
callq 0x576d4
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7ee6e
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_sro_clock()
void set_sro_clock()
{

   if(read_only) return;

   sprintf(out, "DT%04d-%02d-%02d", pri_year,pri_month,pri_day);
   queue_sro_cmd(out, SRO_DT_MSG);

   sprintf(out, "TD%02d:%02d:%02d", pri_hours,pri_minutes,pri_seconds);
   queue_sro_cmd(out, SRO_TD_MSG);
   sro_eeprom();
}

// Assembly:
leaq 0x2a1d35(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x7f2eb
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x27821c(%rip), %rax    # 0x2f7514
movl (%rax), %edx
leaq 0x27820f(%rip), %rax    # 0x2f7510
movl (%rax), %ecx
leaq 0x278202(%rip), %rax    # 0x2f750c
movl (%rax), %r8d
leaq 0x2a6f0c(%rip), %rbx    # 0x326220
leaq 0x8e611(%rip), %rsi     # 0x10d92c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x333, %esi            # imm = 0x333
callq 0x576d4
leaq 0x2781cf(%rip), %rax    # 0x2f7508
movl (%rax), %edx
leaq 0x2781c2(%rip), %rax    # 0x2f7504
movl (%rax), %ecx
leaq 0x2781b5(%rip), %rax    # 0x2f7500
movl (%rax), %r8d
leaq 0x8e5e8(%rip), %rsi     # 0x10d93d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x334, %esi            # imm = 0x334
callq 0x576d4
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7ee6e
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_user()
void parse_scpi_user()
{
int i;

   log_packet_id("scpi user msg");

   i = (int) sizeof(debug_text2)-20;
   if(i < (int) sizeof(nmea_msg)) nmea_msg[i] = 0;

   sprintf(debug_text2, "response to msg %d:%s", user_msg_num, nmea_msg);
   need_redraw = 543;  // why is this needed for X11?
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8fa10(%rip), %rdi     # 0x10f043
callq 0x520bf
leaq 0x2a61f1(%rip), %rcx    # 0x325830
movb $0x0, 0x137(%rcx)
movl 0x2d67c8(%rip), %edx    # 0x355e14
leaq 0x2a949d(%rip), %rdi    # 0x328af0
leaq 0x8f9f7(%rip), %rsi     # 0x10f051
xorl %eax, %eax
callq 0x9060
leaq 0x1831dc(%rip), %rax    # 0x202844
movl $0x21f, (%rax)          # imm = 0x21F
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_sa35_freq(double)
void set_sa35_freq(double freq)
{
double val;

   // !!!!! placeholder

   if(read_only) return;

   if(freq > 2.00E-8) freq = 2.00E-8;
   if(freq < -2.00E-8) freq = -2.00E-8;

   val = freq / 1.0E-15;
   sprintf(out, "<FG%d>", (int) val);
   queue_sa35_cmd(out, SA35_DDS_CMD);

   BEEP(505);  // signal EEPROM write  piss3
}

// Assembly:
leaq 0x2a1725(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x7f8fb
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movsd 0x76157(%rip), %xmm1    # 0xf5a60
minsd %xmm0, %xmm1
movsd 0x88dbb(%rip), %xmm0    # 0x1086d0
maxsd %xmm1, %xmm0
divsd 0x73807(%rip), %xmm0    # 0xf3128
cvttsd2si %xmm0, %edx
leaq 0x2a68f4(%rip), %rbx    # 0x326220
leaq 0x8e044(%rip), %rsi     # 0x10d977
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x3eb, %esi            # imm = 0x3EB
callq 0x576d4
movl $0x1f9, %edi            # imm = 0x1F9
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9d23
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: decode_sa35_msg()
void decode_sa35_msg()
{
char c;
int i;

   start_msg_decode(0);

   nmea_msg[0] = 0;
   for(i=0; i<tsip_wptr; i++) {  // copy message from tsip buffer to nmea buffer
      c = tsip_byte();
      nmea_msg[i] = c;
      nmea_msg[i+1] = 0;
      if(i >= ((int)sizeof(nmea_msg)-12)) break;
   }
   msg_col = 0;     // index of next char to get from nmea buffer

   tsip_wptr = tsip_rptr = 0;
   tsip_sync = 0;

   // get the response from the reciver and pass it to (HOPEFULLY) the routine
   // that expects it...

   strupr(nmea_msg);

if(debug_file) fprintf(debug_file, "Decode msg %d:[%s]\n", polled_msg_id, nmea_msg);
//sprintf(debug_text, "Decode msg %d:[%s]", polled_msg_id, nmea_msg);


   sa35_msg_id = polled_msg_id;

   // !!!!! decode here

   i = get_norcvr_message();   // returns true if seconds just ticked
   poll_next_sa35();

   sa35_msg_id = 0;

   if(sim_file && sim_delay) {  // throttle sim file messages
      Sleep(sim_delay);
   }

   saw_rcvr_msg = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x73dcb
leaq 0x2a5ea6(%rip), %r15    # 0x325830
movb $0x0, (%r15)
leaq 0x2a28bd(%rip), %r14    # 0x322252
movzwl (%r14), %eax
cmpq %rax, %rbx
jae 0x7f9b9
callq 0x51c47
movb %al, (%rbx,%r15)
movb $0x0, 0x1(%rbx,%r15)
incq %rbx
cmpq $0x1f6, %rbx            # imm = 0x1F6
jne 0x7f995
leaq 0x2a6284(%rip), %rax    # 0x325c44
andl $0x0, (%rax)
leaq 0x2a288a(%rip), %rax    # 0x322254
andw $0x0, (%rax)
andw $0x0, (%r14)
leaq 0x2a287c(%rip), %rax    # 0x322256
andw $0x0, (%rax)
leaq 0x2a5e4b(%rip), %rdi    # 0x325830
callq 0x988f
leaq 0x1a899f(%rip), %rax    # 0x228390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x7fa14
movl 0x2d7201(%rip), %edx    # 0x356c00
leaq 0x8df48(%rip), %rsi     # 0x10d94e
leaq 0x2a5e23(%rip), %rcx    # 0x325830
xorl %eax, %eax
callq 0x9560
movl 0x2d71e6(%rip), %eax    # 0x356c00
movl %eax, 0x2d71f0(%rip)    # 0x356c10
callq 0x76a3e
callq 0x65f44
andl $0x0, 0x2d71df(%rip)    # 0x356c10
leaq 0x1a8988(%rip), %rax    # 0x2283c0
cmpq $0x0, (%rax)
setne %al
leaq 0x18dbba(%rip), %rcx    # 0x20d600
movq (%rcx), %rdi
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x7fa5b
callq 0xae83
leaq 0x1a953e(%rip), %rax    # 0x228fa0
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_lpfrs_m()
void parse_lpfrs_m()
{
int hh;   // photocell voltage
int gg;   // Rb signal peak voltage
int ff;   // reserved
int ee;   // varactor voltage
int dd;   // EFC input voltage
int cc;   // lamp current
int bb;   // cell current
int aa;   // 90 MHz agc voltage
int i;

   log_packet_id("paramters");

   i = sscanf(nmea_msg, "%x %x %x %x %x %x %x %x", &hh,&gg,&ff,&ee,&dd,&cc,&bb,&aa);
   if(i != 8) {  // expected 8 values.  Loss of message sync?
      restart_prs_polling();
      return;
   }

   lpfrs_hh = ((double) (255-hh)) / 255.0 * 5.0;
   lpfrs_gg = ((double) gg) / 255.0 * 5.0;
   lpfrs_ff = ((double) ff);
   lpfrs_ee = ((double) ee) / 255.0 * 5.0;
   lpfrs_dd = ((double) dd) / 255.0 * 5.0;
   lpfrs_cc = ((double) (255-cc)) / 255.0 * 500.0;  // ma
   lpfrs_bb = ((double) (255-bb)) / 255.0 * 500.0;  // ma
   lpfrs_aa = ((double) gg) / 255.0 * 5.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
leaq 0x8deff(%rip), %rdi     # 0x10d984
callq 0x520bf
leaq -0x30(%rbp), %r10
leaq -0x14(%rbp), %r11
leaq -0x18(%rbp), %rbx
leaq -0x1c(%rbp), %r14
leaq 0x2a5d8f(%rip), %rdi    # 0x325830
leaq 0x8dce5(%rip), %rsi     # 0x10d78d
leaq -0x2c(%rbp), %rdx
leaq -0x28(%rbp), %rcx
leaq -0x24(%rbp), %r8
leaq -0x20(%rbp), %r9
xorl %eax, %eax
pushq %r10
pushq %r11
pushq %rbx
pushq %r14
callq 0x9350
addq $0x20, %rsp
cmpl $0x8, %eax
jne 0x7fbad
movl $0xff, %eax
movl $0xff, %ecx
subl -0x2c(%rbp), %ecx
cvtsi2sd %ecx, %xmm1
movsd 0x88bcc(%rip), %xmm0    # 0x1086b8
divsd %xmm0, %xmm1
movsd 0x73648(%rip), %xmm2    # 0xf3140
mulsd %xmm2, %xmm1
leaq 0x2781c5(%rip), %rcx    # 0x2f7cc8
movsd %xmm1, (%rcx)
cvtsi2sdl -0x28(%rbp), %xmm1
divsd %xmm0, %xmm1
mulsd %xmm2, %xmm1
leaq 0x2781b5(%rip), %rcx    # 0x2f7cd0
movsd %xmm1, (%rcx)
cvtsi2sdl -0x24(%rbp), %xmm3
leaq 0x2781ad(%rip), %rcx    # 0x2f7cd8
movsd %xmm3, (%rcx)
cvtsi2sdl -0x20(%rbp), %xmm3
divsd %xmm0, %xmm3
mulsd %xmm2, %xmm3
leaq 0x27819d(%rip), %rcx    # 0x2f7ce0
movsd %xmm3, (%rcx)
cvtsi2sdl -0x1c(%rbp), %xmm3
divsd %xmm0, %xmm3
movl $0xff, %ecx
subl -0x18(%rbp), %ecx
mulsd %xmm2, %xmm3
cvtsi2sd %ecx, %xmm2
leaq 0x278181(%rip), %rcx    # 0x2f7ce8
movsd %xmm3, (%rcx)
divsd %xmm0, %xmm2
movsd 0x75e49(%rip), %xmm3    # 0xf59c0
mulsd %xmm3, %xmm2
leaq 0x27816e(%rip), %rcx    # 0x2f7cf0
movsd %xmm2, (%rcx)
subl -0x14(%rbp), %eax
cvtsi2sd %eax, %xmm2
divsd %xmm0, %xmm2
mulsd %xmm3, %xmm2
leaq 0x27815c(%rip), %rax    # 0x2f7cf8
movsd %xmm2, (%rax)
leaq 0x278159(%rip), %rax    # 0x2f7d00
movsd %xmm1, (%rax)
jmp 0x7fbb2
callq 0x7e67f
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_lpfrs_id()
void parse_lpfrs_id()
{
   log_packet_id("id info");

   if(valid_sro_status()) {
      restart_prs_polling();
      return;
   }
   nmea_msg[14] = 0;
   strcpy(lpfrs_id, nmea_msg);

   nmea_msg[36] = 0;
   strcpy(lpfrs_fw, &nmea_msg[16]);

   nmea_msg[57] = 0;
   strcpy(lpfrs_ck, &nmea_msg[37]);

   if(lpfrs_id[0] && lpfrs_fw[0] && lpfrs_ck[0]) have_info |= (ALL_ID_INFO);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x8dbde(%rip), %rdi     # 0x10d7ae
callq 0x520bf
callq 0x7e4d4
testl %eax, %eax
je 0x7fbf1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7e67f
leaq 0x2a5c38(%rip), %r15    # 0x325830
xorl %r13d, %r13d
movb %r13b, 0xe(%r15)
leaq 0x27802a(%rip), %r12    # 0x2f7c30
movq %r12, %rdi
movq %r15, %rsi
callq 0x9330
movb %r13b, 0x24(%r15)
leaq 0x10(%r15), %rsi
leaq 0x278040(%rip), %rbx    # 0x2f7c60
movq %rbx, %rdi
callq 0x9330
movb %r13b, 0x39(%r15)
addq $0x25, %r15
leaq 0x278059(%rip), %r14    # 0x2f7c90
movq %r14, %rdi
movq %r15, %rsi
callq 0x9330
cmpb %r13b, (%r12)
je 0x7fc5d
cmpb $0x0, (%rbx)
je 0x7fc5d
cmpb $0x0, (%r14)
je 0x7fc5d
leaq 0x277d1a(%rip), %rax    # 0x2f7974
orb $0xf, (%rax)
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_lpfrs_c_read()
void parse_lpfrs_c_read()
{
   log_packet_id("coarse tune word");

   if(valid_sro_status()) {
      restart_prs_polling();
      return;
   }
   lpfrs_c_rval = atohex(nmea_msg);
   lpfrs_c_rval &= 0xFF;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8dd17(%rip), %rdi     # 0x10d98e
callq 0x520bf
callq 0x7e4d4
testl %eax, %eax
je 0x7fc8b
popq %rbp
jmp 0x7e67f
leaq 0x2a5b9e(%rip), %rdi    # 0x325830
callq 0x98b2
movzbl %al, %eax
leaq 0x278017(%rip), %rcx    # 0x2f7cb8
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_lpfrs_f_read()
void parse_lpfrs_f_read()
{
int i, j;

   log_packet_id("fine tune word");

   if(valid_sro_status()) {
      restart_prs_polling();
      return;
   }

   lpfrs_f_rval = atohex(nmea_msg);
   lpfrs_f_rval &= 0xFF;

   if(lpfrs_c_rval & 0x80) i = lpfrs_c_rval - 256;
   else                    i = lpfrs_c_rval;

   if(lpfrs_f_rval & 0x80) j = lpfrs_f_rval - 256;
   else                    j = lpfrs_f_rval;

   lpfrs_freq = 1.0E-9 * (double) i;
   lpfrs_freq += (1.0E-11 * (double) j);

   osc_offset = lpfrs_freq * 1.0E9;
   have_osc_offset = 78;
//sprintf(debug_text, "fread i:%d j:%d freq:%g ofs:%g", i,j,lpfrs_freq,osc_offset);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8dcef(%rip), %rdi     # 0x10d99f
callq 0x520bf
callq 0x7e4d4
testl %eax, %eax
je 0x7fcc4
popq %rbp
jmp 0x7e67f
leaq 0x2a5b65(%rip), %rdi    # 0x325830
callq 0x98b2
movzbl %al, %eax
leaq 0x277fde(%rip), %rcx    # 0x2f7cb8
movl (%rcx), %ecx
movl $0xffffff00, %edx       # imm = 0xFFFFFF00
leal (%rcx,%rdx), %esi
testb %cl, %cl
cmovnsl %ecx, %esi
movsbl %al, %ecx
andl %edx, %ecx
leaq 0x277fc7(%rip), %rdx    # 0x2f7cbc
orl %eax, %ecx
cvtsi2sd %esi, %xmm0
mulsd 0x73445(%rip), %xmm0    # 0xf3148
cvtsi2sd %ecx, %xmm1
movl %eax, (%rdx)
mulsd 0x889c7(%rip), %xmm1    # 0x1086d8
addsd %xmm0, %xmm1
leaq 0x277fa4(%rip), %rax    # 0x2f7cc0
movsd %xmm1, (%rax)
mulsd 0x73300(%rip), %xmm1    # 0xf3028
leaq 0x276a91(%rip), %rax    # 0x2f67c0
movsd %xmm1, (%rax)
leaq 0x2774fa(%rip), %rax    # 0x2f7234
movl $0x4e, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_lpfrs_freq(double)
void set_lpfrs_freq(double freq)
{
int high, low;
double val;

   if(read_only) return;

   if(freq > 1.27E-7) freq = 1.27E-7;
   if(freq < -1.28E-7) freq = -1.28E-7;

   high = (int) (freq / 1.0E-9);
   val = freq - ((double) high * 1.0E-9);
   low = (int) (val / 1.0E-11);

   sprintf(out, "C%02X", high & 0xFF);
   queue_lpfrs_cmd(out, LPFRS_C_WRITE_MSG);
   sprintf(out, "F%02X", low & 0xFF);
   queue_lpfrs_cmd(out, LPFRS_F_WRITE_MSG);

   BEEP(505);  // signal EEPROM write
//sprintf(debug_text2, "set freq %g:  val:%g  high:%d low:%d", freq,val,high,low);
}

// Assembly:
leaq 0x2a128f(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x7fd91
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movsd 0x75ccd(%rip), %xmm1    # 0xf5a70
minsd %xmm0, %xmm1
movsd 0x75cb9(%rip), %xmm0    # 0xf5a68
maxsd %xmm1, %xmm0
movsd 0x7338d(%rip), %xmm1    # 0xf3148
movapd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvttsd2si %xmm2, %edx
cvttpd2dq %xmm2, %xmm2
cvtdq2pd %xmm2, %xmm2
mulsd %xmm1, %xmm2
subsd %xmm2, %xmm0
divsd 0x888f9(%rip), %xmm0    # 0x1086d8
cvttsd2si %xmm0, %ebx
movl $0xff, %r15d
andl %r15d, %edx
leaq 0x2a642d(%rip), %r14    # 0x326220
leaq 0x8dbd6(%rip), %rsi     # 0x10d9d0
movq %r14, %rdi
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
movl $0x389, %esi            # imm = 0x389
callq 0x576d4
andl %r15d, %ebx
leaq 0x8dbbb(%rip), %rsi     # 0x10d9d6
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
movl $0x38a, %esi            # imm = 0x38A
callq 0x576d4
movl $0x1f9, %edi            # imm = 0x1F9
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x9d23
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_prs_id()
void parse_prs_id()
{
char *s;
   
   log_packet_id("");
   log_packet_id("id info");
   prs_fw[0] = 0;
   prs_sn[0] = 0;

   s = strstr(nmea_msg, "_SN_");
   if(s == 0) return;

   *s = 0;
   strcpy(prs_fw, nmea_msg);

   if(s[1]) strcpy(prs_sn, s+1);
   if(all_polled) have_info |= ALL_ID_INFO;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x9b99f(%rip), %rdi     # 0x11b9b6
callq 0x520bf
leaq 0x8d78b(%rip), %rdi     # 0x10d7ae
callq 0x520bf
leaq 0x277a81(%rip), %rax    # 0x2f7ab0
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x277aa6(%rip), %rax    # 0x2f7ae0
movb %cl, (%rax)
leaq 0x2a57ed(%rip), %rdi    # 0x325830
leaq 0x8da61(%rip), %rsi     # 0x10daab
callq 0x9090
testq %rax, %rax
je 0x80098
movq %rax, %rbx
movb $0x0, (%rax)
leaq 0x277a4f(%rip), %rdi    # 0x2f7ab0
leaq 0x2a57c8(%rip), %rsi    # 0x325830
callq 0x9330
cmpb $0x0, 0x1(%rbx)
je 0x80085
incq %rbx
leaq 0x277a63(%rip), %rdi    # 0x2f7ae0
movq %rbx, %rsi
callq 0x9330
cmpl $0x0, 0x2d5d3c(%rip)    # 0x355dc8
je 0x80098
leaq 0x2778df(%rip), %rax    # 0x2f7974
orb $0xf, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_prs_st()
void parse_prs_st()
{
int i;

   // status
   log_packet_id("status");

   for(i=0; i<6; i++) {
      if(get_msg_field()) {
         prs_st[i] = atoi(msg_field);
         have_prs_st |= (1 << i);

         if(prs_st[0] & 0x0F) critical_alarms |= CRIT_PWR;
         else                 critical_alarms &= (~CRIT_PWR);

         if(prs_st[3] & 0x0C) critical_alarms |= CRIT_OCXO;
         else                 critical_alarms &= (~CRIT_OCXO);

         if(prs_st[5] & 0x06) critical_alarms |= CRIT_FPGA;  // bad interrupt or watchdog
         else                 critical_alarms &= (~CRIT_FPGA);
//       have_critical_alarms = 1;

         if(prs_st[5] & 0x18) minor_alarms |= MINOR_EEPROM;
         else                 minor_alarms &= (~MINOR_EEPROM);
         have_eeprom = 1;
      }
      else ++bad_prs_val;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x8f9b1(%rip), %rdi     # 0x10fa65
callq 0x520bf
xorl %ebx, %ebx
leaq 0x184a2e(%rip), %r15    # 0x204af0
leaq 0x277107(%rip), %r14    # 0x2f71d0
leaq 0x277108(%rip), %r13    # 0x2f71d8
leaq 0x2771d5(%rip), %r12    # 0x2f72ac
cmpq $0x6, %rbx
je 0x8016f
callq 0x75767
testl %eax, %eax
je 0x80161
leaq 0x2a594f(%rip), %rdi    # 0x325a40
callq 0x95e0
pushq $0x1
popq %rdx
movl %ebx, %ecx
shll %cl, %edx
movl %eax, (%r15,%rbx,4)
leaq 0x184980(%rip), %rax    # 0x204a88
orl %edx, (%rax)
xorl %eax, %eax
testb $0xf, (%r15)
setne %al
movl (%r14), %ecx
andl $-0x1d, %ecx
leal (%rcx,%rax,4), %eax
xorl %ecx, %ecx
testb $0xc, 0xc(%r15)
setne %cl
shll $0x4, %ecx
orl %eax, %ecx
movl 0x14(%r15), %eax
xorl %edx, %edx
testb $0x6, %al
setne %dl
leal (%rcx,%rdx,8), %ecx
movl %ecx, (%r14)
xorl %ecx, %ecx
testb $0x18, %al
setne %cl
movl (%r13), %eax
movl $0xfffffbff, %edx       # imm = 0xFFFFFBFF
andl %edx, %eax
shll $0xa, %ecx
orl %eax, %ecx
movl %ecx, (%r13)
movl $0x1, (%r12)
jmp 0x80167
incl 0x2d6acd(%rip)          # 0x356c34
incq %rbx
jmp 0x800d7
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_prs_lm()
void parse_prs_lm()
{
   // lock mode
   log_packet_id("lock mode");

   if(get_msg_field()) {
      prs_lm = atoi(msg_field);
      have_prs_lm = 1;
      if(prs_lm & 0x0C) pps_enabled = 0;
      else pps_enabled = 1;
      have_pps_enable = 1;

      if(prs_lm == 3) pps_polarity = 1;
      else            pps_polarity = 0;
   }
   else ++bad_prs_val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8d927(%rip), %rdi     # 0x10dab0
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x801e1
leaq 0x2a58a2(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x18495e(%rip), %rcx    # 0x204b08
movl %eax, (%rcx)
leaq 0x1848d9(%rip), %rcx    # 0x204a8c
testb $0xc, %al
leaq 0x277b64(%rip), %rdx    # 0x2f7d20
sete (%rdx)
pushq $0x1
popq %rdx
movl %edx, (%rcx)
leaq 0x277111(%rip), %rcx    # 0x2f72dc
movl %edx, (%rcx)
cmpl $0x3, %eax
jne 0x801e9
leaq 0x277b3f(%rip), %rax    # 0x2f7d18
movl $0x1, (%rax)
jmp 0x801f3
incl 0x2d6a4d(%rip)          # 0x356c34
jmp 0x801f3
leaq 0x277b28(%rip), %rax    # 0x2f7d18
andl $0x0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_prs_lo()
void parse_prs_lo()
{
   // lock loop enable
   log_packet_id("loop lock enable");

   if(get_msg_field()) {
      prs_lo = atoi(msg_field);

      if     (prs_lo == 0) discipline_mode = DIS_MODE_DISABLED; // DIS_MODE_MANUAL_HOLD;
      else if(prs_lo == 1) discipline_mode = DIS_MODE_NORMAL;
      else                 discipline_mode = DIS_MODE_UNKNOWN;
      have_prs_lo = 1;
   }
   else ++bad_prs_val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8d8ba(%rip), %rdi     # 0x10daba
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x8024e
leaq 0x2a582b(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x1848eb(%rip), %rcx    # 0x204b0c
movl %eax, (%rcx)
cmpl $0x1, %eax
setne %cl
negb %cl
testl %eax, %eax
movzbl %cl, %eax
pushq $0x6
popq %rcx
cmovnel %eax, %ecx
leaq 0x27725a(%rip), %rax    # 0x2f7497
movb %cl, (%rax)
leaq 0x18484a(%rip), %rax    # 0x204a90
movl $0x1, (%rax)
jmp 0x80254
incl 0x2d69e0(%rip)          # 0x356c34
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_prs_ep()
void parse_prs_ep()
{
   // enable power
   log_packet_id("enable power");

   if(get_msg_field()) {
      prs_ep = atoi(msg_field);
      have_prs_ep = 1;
   }
   else ++bad_prs_val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8d86a(%rip), %rdi     # 0x10dacb
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x80293
leaq 0x2a57ca(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x1848f6(%rip), %rcx    # 0x204b78
movl %eax, (%rcx)
leaq 0x184855(%rip), %rax    # 0x204ae0
movl $0x1, (%rax)
jmp 0x80299
incl 0x2d699b(%rip)          # 0x356c34
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_prs_fc()
void parse_prs_fc()
{
double val;

   // frequecny control 
   log_packet_id("frequency control");

   if(get_msg_field()) {
      prs_fc1 = atoi(msg_field);
      have_prs_fc |= 0x01;
   }
   else ++bad_prs_val;

   if(get_msg_field()) {
      prs_fc2 = atoi(msg_field);
      have_prs_fc |= 0x02;
   }
   else ++bad_prs_val;

   val = (double) (prs_fc1 - 2048) * 1000.0;
   val += (double) (prs_fc2 - 2048); // freq DAC control word
   val *= 1.5;
   prs_fc_ppt = (val * 1.0E-12);
   val /= 1000.0;      // convert to ppt
   osc_offset = (val - prs_fc_ref);  // remove reference value to get current steering change
//sprintf(debug_text3, "fc:%d %d -> %g %g   (%g .. %g)  %g", prs_fc1,prs_fc2, 
//val, osc_offset, plot[OSC].min_disp_val,plot[OSC].max_disp_val,(plot[OSC].max_disp_val-plot[OSC].min_disp_val)*1.0E6);
   have_osc_offset = 32;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8d832(%rip), %rdi     # 0x10dad8
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x802d5
leaq 0x2a5785(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x184849(%rip), %rcx    # 0x204b10
movl %eax, (%rcx)
leaq 0x1847c4(%rip), %rax    # 0x204a94
orb $0x1, (%rax)
jmp 0x802db
incl 0x2d6959(%rip)          # 0x356c34
callq 0x75767
testl %eax, %eax
je 0x80305
leaq 0x2a5755(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x18481d(%rip), %rcx    # 0x204b14
movl %eax, (%rcx)
leaq 0x184794(%rip), %rcx    # 0x204a94
orb $0x2, (%rcx)
jmp 0x80314
incl 0x2d6929(%rip)          # 0x356c34
leaq 0x184802(%rip), %rax    # 0x204b14
movl (%rax), %eax
leaq 0x1847f5(%rip), %rcx    # 0x204b10
movl $0xfffff800, %edx       # imm = 0xFFFFF800
addl %edx, %eax
addl (%rcx), %edx
cvtsi2sd %edx, %xmm0
movsd 0x72d08(%rip), %xmm1    # 0xf3038
cvtsi2sd %eax, %xmm2
mulsd %xmm1, %xmm0
addsd %xmm0, %xmm2
mulsd 0x72d74(%rip), %xmm2    # 0xf30b8
movsd 0x87f24(%rip), %xmm0    # 0x108270
mulsd %xmm2, %xmm0
leaq 0x1848f1(%rip), %rax    # 0x204c48
movsd %xmm0, (%rax)
divsd %xmm1, %xmm2
subsd 0x2dbb31(%rip), %xmm2   # 0x35be98
leaq 0x276452(%rip), %rax    # 0x2f67c0
movsd %xmm2, (%rax)
leaq 0x276ebb(%rip), %rax    # 0x2f7234
movl $0x20, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_prs_fc2()
void parse_prs_fc2()
{
int life;
double val;

   // frequency control eeprom settings
   log_packet_id("frequency control eeprom");

   if(get_msg_field()) {  // power cycles
      prs_pwr_cycles = atoi(msg_field);
      have_prs_fc2 |= 0x01;
   }
   else ++bad_prs_val;

   if(get_msg_field()) {
      prs_fc_writes = atoi(msg_field);
      have_prs_fc2 |= 0x02;

      life = prs_fc_writes;  // updated around twice a day (manual says daily)
      if(prs_fc_writes > prs_pwr_cycles) life -= prs_pwr_cycles;
      scpi_life = (life * 12);  // updated around twice a day (manual says daily)
      have_lifetime = 1;
   }
   else ++bad_prs_val;

   if(get_msg_field()) {
      prs_ee_fc1 = atoi(msg_field);
   }
   else ++bad_prs_val;

   if(get_msg_field()) {
      prs_ee_fc2 = atoi(msg_field);
   }
   else ++bad_prs_val;

   val = (double) (prs_ee_fc1 - 2048) * 1000.0;
   val += (double) (prs_ee_fc2 - 2048); // DAC reference setting
   val *= 1.5;
   prs_ee_fc_ppt = (val * 1.0E-12);
   val /= 1000.0;
   prs_fc_ref = val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8d75e(%rip), %rdi     # 0x10daea
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x803bb
leaq 0x2a569f(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x184773(%rip), %rcx    # 0x204b20
movl %eax, (%rcx)
leaq 0x1846e2(%rip), %rax    # 0x204a98
orb $0x1, (%rax)
jmp 0x803c1
incl 0x2d6873(%rip)          # 0x356c34
callq 0x75767
testl %eax, %eax
je 0x80416
leaq 0x2a566f(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x184747(%rip), %rcx    # 0x204b24
movl %eax, (%rcx)
leaq 0x1846b2(%rip), %rcx    # 0x204a98
orb $0x2, (%rcx)
leaq 0x184730(%rip), %rcx    # 0x204b20
movl (%rcx), %ecx
xorl %edx, %edx
cmpl %ecx, %eax
cmovgl %ecx, %edx
subl %edx, %eax
imull $0xc, %eax, %eax
leaq 0x277057(%rip), %rcx    # 0x2f745c
movl %eax, (%rcx)
leaq 0x276eba(%rip), %rax    # 0x2f72c8
movl $0x1, (%rax)
jmp 0x8041c
incl 0x2d6818(%rip)          # 0x356c34
callq 0x75767
testl %eax, %eax
je 0x8043c
leaq 0x2a5614(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x1846e0(%rip), %rcx    # 0x204b18
movl %eax, (%rcx)
jmp 0x80442
incl 0x2d67f2(%rip)          # 0x356c34
callq 0x75767
testl %eax, %eax
je 0x80462
leaq 0x2a55ee(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x1846be(%rip), %rcx    # 0x204b1c
movl %eax, (%rcx)
jmp 0x80471
incl 0x2d67cc(%rip)          # 0x356c34
leaq 0x1846ad(%rip), %rax    # 0x204b1c
movl (%rax), %eax
leaq 0x1846a0(%rip), %rcx    # 0x204b18
movl $0xfffff800, %edx       # imm = 0xFFFFF800
addl %edx, %eax
addl (%rcx), %edx
cvtsi2sd %edx, %xmm0
movsd 0x72bab(%rip), %xmm1    # 0xf3038
mulsd %xmm1, %xmm0
cvtsi2sd %eax, %xmm2
addsd %xmm0, %xmm2
mulsd 0x72c17(%rip), %xmm2    # 0xf30b8
movsd 0x87dc7(%rip), %xmm0    # 0x108270
mulsd %xmm2, %xmm0
leaq 0x18479c(%rip), %rax    # 0x204c50
movsd %xmm0, (%rax)
divsd %xmm1, %xmm2
movsd %xmm2, 0x2db9d4(%rip)   # 0x35be98
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_prs_ds()
void parse_prs_ds()
{
   // detected signals 
   log_packet_id("detected signals");

   if(get_msg_field()) {
      prs_ds1 = atoi(msg_field);
      have_prs_ds |= 0x01;
   }
   else ++bad_prs_val;

   if(get_msg_field()) {
      prs_ds2 = atoi(msg_field);
      have_prs_ds |= 0x02;
   }
   else ++bad_prs_val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8d632(%rip), %rdi     # 0x10db03
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x80500
leaq 0x2a555a(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x184636(%rip), %rcx    # 0x204b28
movl %eax, (%rcx)
leaq 0x1845a1(%rip), %rax    # 0x204a9c
orb $0x1, (%rax)
jmp 0x80506
incl 0x2d672e(%rip)          # 0x356c34
callq 0x75767
testl %eax, %eax
je 0x80530
leaq 0x2a552a(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x18460a(%rip), %rcx    # 0x204b2c
movl %eax, (%rcx)
leaq 0x184571(%rip), %rax    # 0x204a9c
orb $0x2, (%rax)
jmp 0x80536
incl 0x2d66fe(%rip)          # 0x356c34
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_prs_sf()
void parse_prs_sf()
{
   // set frequency
   log_packet_id("set frequency");

   if(get_msg_field()) {
      prs_sf = atoi(msg_field);
      have_prs_sf = 1;
   }
   else ++bad_prs_val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8d5d1(%rip), %rdi     # 0x10db14
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x80575
leaq 0x2a54e8(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x1845cc(%rip), %rcx    # 0x204b30
movl %eax, (%rcx)
leaq 0x184533(%rip), %rax    # 0x204aa0
movl $0x1, (%rax)
jmp 0x8057b
incl 0x2d66b9(%rip)          # 0x356c34
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_prs_ss()
void parse_prs_ss()
{
   // set slope
   log_packet_id("set slope");

   if(get_msg_field()) {
      prs_ss = atoi(msg_field);
      have_prs_ss = 1;
   }
   else ++bad_prs_val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8d59a(%rip), %rdi     # 0x10db22
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x805ba
leaq 0x2a54a3(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x18458b(%rip), %rcx    # 0x204b34
movl %eax, (%rcx)
leaq 0x1844f2(%rip), %rax    # 0x204aa4
movl $0x1, (%rax)
jmp 0x805c0
incl 0x2d6674(%rip)          # 0x356c34
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_prs_ga()
void parse_prs_ga()
{
   // gain
   log_packet_id("gain");

   if(get_msg_field()) {
      prs_ga = atoi(msg_field);
      have_prs_ga = 1;
   }
   else ++bad_prs_val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x77409(%rip), %rdi     # 0xf79d6
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x805ff
leaq 0x2a545e(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x18454a(%rip), %rcx    # 0x204b38
movl %eax, (%rcx)
leaq 0x1844b1(%rip), %rax    # 0x204aa8
movl $0x1, (%rax)
jmp 0x80605
incl 0x2d662f(%rip)          # 0x356c34
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_prs_ph()
void parse_prs_ph()
{
   // phase
   log_packet_id("phase");

   if(get_msg_field()) {
      prs_ph = atoi(msg_field);
      have_prs_ph = 1;
   }
   else ++bad_prs_val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x793ce(%rip), %rdi     # 0xf99e0
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x80644
leaq 0x2a5419(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x184509(%rip), %rcx    # 0x204b3c
movl %eax, (%rcx)
leaq 0x184470(%rip), %rax    # 0x204aac
movl $0x1, (%rax)
jmp 0x8064a
incl 0x2d65ea(%rip)          # 0x356c34
popq %rbp
retq