LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: edit_option_switch()
void edit_option_switch()
{
int cmd_err;
char *s;
int i;
char cmd[256+1];

   // process what is normally command line only options from the keyboard
   not_safe = 0;
   keyboard_cmd = 1;
   s = &edit_buffer[0];

   while(*s) {
      while(*s) {  // skip leading white space
         if(*s == 0) break;
         else if(*s == ' ') ++s;
         else if(*s == '\t') ++s;
         else break;
      }
      if(*s == 0) break;

      i = 0;
      cmd[i] = 0;
      while(*s) {  // extract the next option string
         if(*s == ' ') break;
         else if(*s == '\t') break;
         else if(i >= 256) break;

         cmd[i++] = *s;
         cmd[i] = 0;
         ++s;
      }

      if(1) ;
      else if(cmd[0] == '-');
      else if(cmd[0] == '/');
      else if(cmd[0]) {
         strcpy(out, "/");
         strcat(out, cmd);
         strcpy(cmd, out);
      }

      cmd_err = option_switch(&cmd[0]);  // process the option

      if(cmd_err) {
         sprintf(out, "Unknown or bad command line option: %s.  Type ? for command line help.", &cmd[0]);
         edit_error(out);
         break;
      }
//    else if(not_safe == 1) {
      else if(not_safe) {      // xyzzy
         config_options();
      }
   }

   need_redraw = 1200;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
leaq 0x2dba2d(%rip), %r14    # 0x30de6d
movb $0x0, (%r14)
leaq 0x2dba21(%rip), %rax    # 0x30de6c
movb $0x1, (%rax)
leaq 0x30ce8b(%rip), %r15    # 0x33f2e0
cmpb $0x0, (%r15)
je 0x32500
leaq -0x130(%rbp), %rbx
movzbl (%r15), %eax
cmpl $0x9, %eax
je 0x324b2
cmpl $0x20, %eax
je 0x324b2
testl %eax, %eax
je 0x32500
movb $0x0, -0x130(%rbp)
xorl %r12d, %r12d
movzbl (%r15,%r12), %eax
testb $-0x21, %al
je 0x324b7
cmpq $0xff, %r12
ja 0x324b7
cmpb $0x9, %al
je 0x324b7
movb %al, -0x130(%rbp,%r12)
movb $0x0, -0x12f(%rbp,%r12)
incq %r12
jmp 0x32486
incq %r15
jmp 0x32466
movq %rbx, %rdi
callq 0x3251d
testl %eax, %eax
jne 0x324d9
cmpb $0x0, (%r14)
je 0x324ce
callq 0xd9e8
addq %r12, %r15
cmpb $0x0, (%r15)
jne 0x32466
jmp 0x32500
leaq 0x309d40(%rip), %rbx    # 0x33c220
leaq 0xe2cab(%rip), %rsi     # 0x115192
leaq -0x130(%rbp), %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
callq 0x2326e
leaq 0x1e633d(%rip), %rax    # 0x218844
movl $0x4b0, (%rax)          # imm = 0x4B0
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: option_switch(char*)
int option_switch(char *arg)  
{   
char c, d;

   // process a command line option parameter
   d = 0;
   c = tolower(arg[1]);
   if(c) d = tolower(arg[2]);

   if((arg[0] == '=') || (arg[0] == '$')) {  // it is a hex byte to send to the tbolt
      save_cmd_bytes(arg);
   }
   else if(isdigit(c)) {  // /digit - rcvr port number or dotted IP address
      if(keyboard_cmd) kill_com(RCVR_PORT,3017);
      config_port(RCVR_PORT, &arg[1]);
   }
   // we break up the command line processing big 'if' statement 
   // into two parts so the DOS compiler heap does not overflow
   else if((c >= 'a') && (c <= 'o')) {   // first half of command line options
      return cmd_a_to_o(arg);           
   }
   else {                                // all the other command line options
      return cmd_other(arg);
   }

   return 0;  // we did something useful
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %eax
cmpl $0x3d, %eax
je 0x32534
cmpl $0x24, %eax
jne 0x32543
movq %rbx, %rdi
callq 0x47338
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1(%rbx), %r14
movsbl (%r14), %edi
callq 0x9580
movsbl %al, %eax
leal -0x30(%rax), %ecx
cmpl $0x9, %ecx
ja 0x32585
leaq 0x2db90a(%rip), %rax    # 0x30de6c
cmpb $0x0, (%rax)
je 0x32576
movl $0xa, %edi
movl $0xbc9, %esi            # imm = 0xBC9
callq 0xb034
movl $0xa, %edi
movq %r14, %rsi
callq 0x4d692
jmp 0x3253c
addl $-0x61, %eax
movq %rbx, %rdi
cmpl $0xe, %eax
ja 0x32599
popq %rbx
popq %r14
popq %rbp
jmp 0x4dc03
popq %rbx
popq %r14
popq %rbp
jmp 0x5312a
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: set_osc_units()
void set_osc_units()
{
   if(rcvr_type == BRANDY_RCVR) ;
   else if(rcvr_type == PRS_RCVR) ;
   else if(rcvr_type == TSIP_RCVR) ;
   else return;

   if(show_euro_ppt) {
      ppb_string = "e-9 ";
      ppt_string = "e-12";
      if(strstr(plot[OSC].units, "ppt")) plot[OSC].units = "e-12";
      if(rcvr_type == BRANDY_RCVR) plot[SEVEN].units = "e-12";
   }
   else {
      ppb_string = " ppb";
      ppt_string = " ppt";
      if(strstr(plot[OSC].units, "e-12")) plot[OSC].units = "ppt";
      if(rcvr_type == BRANDY_RCVR) plot[SEVEN].units = "ppt";
   }
   plot[OSC].units = ppt_string;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x1e631d(%rip), %rax    # 0x2188d0
movq (%rax), %rbx
cmpq $0x1, %rbx
je 0x325d2
cmpq $0x1000000, %rbx        # imm = 0x1000000
je 0x325d2
cmpq $0x40000, %rbx          # imm = 0x40000
jne 0x326b6
leaq 0x2dbadf(%rip), %rax    # 0x30e0b8
cmpb $0x0, (%rax)
je 0x32631
leaq 0xe2bf4(%rip), %rax     # 0x1151d9
leaq 0x30d02c(%rip), %rcx    # 0x33f618
movq %rax, (%rcx)
leaq 0xe2be8(%rip), %r14     # 0x1151de
leaq 0x30d023(%rip), %rax    # 0x33f620
movq %r14, (%rax)
leaq 0x12b729(%rip), %r15    # 0x15dd30
movq 0xf0(%r15), %rdi
leaq 0xe4149(%rip), %rsi     # 0x11675e
callq 0x9090
testq %rax, %rax
je 0x32626
movq %r14, 0xf0(%r15)
cmpq $0x40000, %rbx          # imm = 0x40000
je 0x32690
jmp 0x3269e
leaq 0xe2bab(%rip), %rax     # 0x1151e3
leaq 0x30cfd9(%rip), %rcx    # 0x33f618
movq %rax, (%rcx)
leaq 0xe4114(%rip), %rax     # 0x11675d
leaq 0x30cfd0(%rip), %rcx    # 0x33f620
movq %rax, (%rcx)
leaq 0x12b6d6(%rip), %r14    # 0x15dd30
movq 0xf0(%r14), %rdi
leaq 0xe2b76(%rip), %rsi     # 0x1151de
callq 0x9090
testq %rax, %rax
je 0x32680
leaq 0xe40e5(%rip), %rax     # 0x11675e
movq %rax, 0xf0(%r14)
cmpq $0x40000, %rbx          # imm = 0x40000
jne 0x3269e
leaq 0xe40ce(%rip), %r14     # 0x11675e
leaq 0x12b699(%rip), %rax    # 0x15dd30
movq %r14, 0x918(%rax)
leaq 0x30cf7b(%rip), %rax    # 0x33f620
movq (%rax), %rax
leaq 0x12b681(%rip), %rcx    # 0x15dd30
movq %rax, 0xf0(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: toggle_plot(int)
void toggle_plot(int id)
{
   if((id < 0) || (id >= (NUM_PLOTS+DERIVED_PLOTS))) return;
   if(id != FFT) pre_fft_plot = id;

   selected_plot = id;
   plot[selected_plot].show_plot = toggle_value(plot[selected_plot].show_plot);
   plot[selected_plot].user_set_show = 1;

if((selected_plot == FFT) && (plot[selected_plot].show_plot == 0)) { // just turned off FFT plot
   selected_plot = pre_fft_plot;
}

   if(USES_PLOT_THREE) ;
   else if((graph_lla == 0) && (selected_plot == THREE) && (luxor == 0)) {  //!!!! debug_plots
      if(plot[DAC].sum_yy && stat_count) {
          d_scale = sqrt(plot[TEMP].sum_yy/stat_count) / sqrt(plot[DAC].sum_yy/stat_count);
      }
      else d_scale = 0.0;
if(title_type != USER) {
   sprintf(plot_title, "DAC_scale=%f", d_scale);
   title_type = OTHER;
}
   }

   config_extra_plots();
   if(luxor && (id == AUXV)) need_redraw = 1301;
}

// Assembly:
cmpl $0x13, %edi
ja 0x32edf
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
cmpl $0xe, %edi
je 0x32e43
leaq 0x30cf23(%rip), %rax    # 0x33fd64
movl %ebx, (%rax)
leaq 0x30cf0e(%rip), %r15    # 0x33fd58
movl %ebx, (%r15)
movl %ebx, %eax
imulq $0xe8, %rax, %rax
leaq 0x12aed3(%rip), %r14    # 0x15dd30
movzbl 0x18(%r14,%rax), %edi
callq 0x33ef8
movzbl %al, %eax
movslq (%r15), %rcx
imulq $0xe8, %rcx, %rdx
movl %eax, 0x18(%r14,%rdx)
movl $0x1, 0xe0(%r14,%rdx)
cmpq $0xe, %rcx
jne 0x32ea2
cmpl $0x0, 0xcc8(%r14)
jne 0x32ea2
leaq 0x30cec7(%rip), %rax    # 0x33fd64
movl (%rax), %eax
movl %eax, (%r15)
leaq 0x1e5a27(%rip), %rax    # 0x2188d0
testl $0x101b1b00, 0x1(%rax)  # imm = 0x101B1B00
je 0x32ee0
callq 0x13e93
cmpl $0xd, %ebx
jne 0x32ed5
leaq 0x20c07b(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x32ed5
leaq 0x1e5975(%rip), %rax    # 0x218844
movl $0x515, (%rax)          # imm = 0x515
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3083dd(%rip), %rax    # 0x33b2c4
cmpb $0x0, (%rax)
jne 0x32eb2
cmpl $0x6, (%r15)
jne 0x32eb2
leaq 0x20c045(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x32eb2
movsd 0x248(%r14), %xmm0
xorpd %xmm3, %xmm3
ucomisd %xmm3, %xmm0
jne 0x32f13
jnp 0x32f81
leaq 0x2da076(%rip), %r15    # 0x30cf90
movsd (%r15), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x32f2b
jnp 0x32f81
movsd 0x330(%r14), %xmm0
divsd %xmm1, %xmm0
ucomisd %xmm2, %xmm0
jb 0x32f47
xorps %xmm3, %xmm3
sqrtsd %xmm0, %xmm3
jmp 0x32f50
callq 0x9270
movapd %xmm0, %xmm3
movsd 0x248(%r14), %xmm0
divsd (%r15), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x32f6e
sqrtsd %xmm0, %xmm0
jmp 0x32f7d
movsd %xmm3, -0x20(%rbp)
callq 0x9270
movsd -0x20(%rbp), %xmm3
divsd %xmm0, %xmm3
leaq 0x30c788(%rip), %rax    # 0x33f710
movsd %xmm3, (%rax)
leaq 0x30c339(%rip), %r14    # 0x33f2cc
cmpl $0x2, (%r14)
je 0x32eb2
leaq 0x30b8ac(%rip), %rdi    # 0x33e850
leaq 0xe223d(%rip), %rsi     # 0x1151e8
movapd %xmm3, %xmm0
movb $0x1, %al
callq 0x9060
movl $0x3, (%r14)
jmp 0x32eb2
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: dump_mtie_data()
void dump_mtie_data()
{
FILE *file;

   if(edit_buffer[0] == 0) {
      file = topen("mtie.dat", "w");
      if(file == 0) {
         sprintf(out, "ERROR: could not write file: mtie.dat");
         edit_error(out);
         return;
      }
   }
   else {
      if(strstr(edit_buffer, ".") == 0) strcat(edit_buffer, ".dat");
      file = topen(edit_buffer, "w");
      if(file == 0) {
         sprintf(out, "ERROR: could not write file: %s", edit_buffer);
         edit_error(out);
         return;
      }
   }
   if(file == 0) return;

   dump_mtie(CHA_MTIE, file);
   dump_mtie(CHB_MTIE, file);
   dump_mtie(CHC_MTIE, file);
   dump_mtie(CHD_MTIE, file);


   fclose(file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x30c081(%rip), %rax    # 0x33f2e0
cmpb $0x0, (%rax)
je 0x332d0
leaq 0x30c075(%rip), %rbx    # 0x33f2e0
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x9100
testq %rax, %rax
jne 0x33291
movq %rbx, %rdi
callq 0x9120
movl $0x7461642e, (%rbx,%rax) # imm = 0x7461642E
movb $0x0, 0x4(%rbx,%rax)
leaq 0x30c048(%rip), %rdi    # 0x33f2e0
leaq 0xee03c(%rip), %rsi     # 0x1212db
callq 0x9a4d
testq %rax, %rax
jne 0x332e8
leaq 0x308f70(%rip), %rbx    # 0x33c220
leaq 0xe1f83(%rip), %rsi     # 0x11523a
leaq 0x30c022(%rip), %rdx    # 0x33f2e0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
jmp 0x33354
leaq 0xe21ba(%rip), %rdi     # 0x115491
leaq 0xedffd(%rip), %rsi     # 0x1212db
callq 0x9a4d
testq %rax, %rax
je 0x3332a
movq %rax, %rbx
xorl %edi, %edi
movq %rax, %rsi
callq 0xfdd1e
movl $0x1, %edi
movq %rbx, %rsi
callq 0xfdd1e
movl $0x2, %edi
movq %rbx, %rsi
callq 0xfdd1e
movl $0x3, %edi
movq %rbx, %rsi
callq 0xfdd1e
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9370
movups 0xe2153(%rip), %xmm0    # 0x115484
leaq 0x308ee8(%rip), %rdi    # 0x33c220
movaps %xmm0, 0x10(%rdi)
movups 0xe2131(%rip), %xmm0    # 0x115474
movaps %xmm0, (%rdi)
movabsq $0x7461642e656974, %rax # imm = 0x7461642E656974
movq %rax, 0x1e(%rdi)
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2326e
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: get_cable_val(char*)
double get_cable_val(char *s)
{
double val;

   if(s == 0) return 0.0F;

   while(s > &edit_buffer[0]) { // backup over leading white space
      --s;
      if((*s != ' ') && (*s != '\t')) break;
   }
   while(s > &edit_buffer[0]) { // backup to the value
      --s;
      if((*s == ' ') || (*s == '\t')) break;
   }
   if(s == 0) return 0.0;

   val = atof(s);
   return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x33980
cmpq 0x11c5dc(%rip), %rdi    # 0x14ff00
jbe 0x3394c
leaq 0x30b9b3(%rip), %rax    # 0x33f2e0
decq %rdi
movzbl (%rdi), %ecx
cmpl $0x20, %ecx
je 0x3393d
cmpl $0x9, %ecx
jne 0x3394c
leaq -0x1(%rdi), %rcx
cmpq %rax, %rdi
movq %rcx, %rdi
ja 0x33930
movq %rax, %rdi
cmpq 0x11c5ad(%rip), %rdi    # 0x14ff00
jbe 0x3397a
decq %rdi
leaq 0x30b981(%rip), %rax    # 0x33f2e0
movq %rdi, %rcx
movq %rcx, %rdi
movb (%rcx), %cl
cmpb $0x20, %cl
je 0x3397a
cmpb $0x9, %cl
je 0x3397a
leaq -0x1(%rdi), %rcx
cmpq %rax, %rdi
ja 0x33962
popq %rbp
jmp 0x9470
xorps %xmm0, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: edit_cable_delay(int)
void edit_cable_delay(int kbd_cmd)
{
double val;
double vf;
char *s, *sf, *squote;

   if(edit_buffer[0] == 0) return;

   vf = VELOCITY_FACTOR;  // 0.66 vp coax
   strupr(edit_buffer);


   s = strchr(edit_buffer, 'V');  // look for velocity factor setting
   if(s) {
      vf = get_cable_val(s);
      if((vf <= 0.0) || (vf > 1.0)) {
         if(kbd_cmd) edit_error("Invalid velocity factor specified.");
         return;
      }
   }

   s = strchr(edit_buffer, 'M');  // look for meters
   sf = strchr(edit_buffer, 'F');
   squote = strchr(edit_buffer, '\'');
   if(s) {
      val = get_cable_val(s);
      val *= FEET_PER_METER;
      val = (val / 983571056.0) / vf;
   }
   else if(sf) {
      val = get_cable_val(sf);
      val = (val / 983571056.0) / vf;
   }
   else if(squote) {
      val = get_cable_val(squote);
      val = (val / 983571056.0) / vf;
   }
   else {
      val = atof(edit_buffer);
      val /= 1.0E9;
   }

   delay_value = val;

   if(kbd_cmd) {
      set_pps(user_pps_enable, pps_polarity,  delay_value,  pps1_delay, pps_threshold, 1);
      request_pps_info();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
leaq 0x30b945(%rip), %rax    # 0x33f2e0
cmpb $0x0, (%rax)
je 0x33ad3
movl %edi, %ebx
leaq 0x30b933(%rip), %r14    # 0x33f2e0
movq %r14, %rdi
callq 0x9899
movq %r14, %rdi
movl $0x56, %esi
callq 0x9100
testq %rax, %rax
je 0x33a03
movq %rax, %rdi
callq 0x33914
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x339e3
ucomisd 0xd568f(%rip), %xmm0    # 0x109070
jbe 0x33a0b
testl %ebx, %ebx
je 0x33ad3
leaq 0xe1bf2(%rip), %rdi     # 0x1155e4
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2326e
movsd 0xd7f65(%rip), %xmm0    # 0x10b970
movsd %xmm0, -0x28(%rbp)
leaq 0x30b8c9(%rip), %r12    # 0x33f2e0
movq %r12, %rdi
movl $0x4d, %esi
callq 0x9100
movq %rax, %r14
movq %r12, %rdi
movl $0x46, %esi
callq 0x9100
movq %rax, %r15
movq %r12, %rdi
movl $0x27, %esi
callq 0x9100
testq %r14, %r14
je 0x33a5b
movq %r14, %rdi
callq 0x33914
mulsd 0xd7e3f(%rip), %xmm0    # 0x10b898
jmp 0x33a72
testq %r15, %r15
je 0x33a65
movq %r15, %rdi
jmp 0x33a6d
testq %rax, %rax
je 0x33ae0
movq %rax, %rdi
callq 0x33914
divsd 0xd7efe(%rip), %xmm0    # 0x10b978
divsd -0x28(%rbp), %xmm0
leaq 0x2da33a(%rip), %rax    # 0x30ddc0
movsd %xmm0, (%rax)
testl %ebx, %ebx
je 0x33ad3
leaq 0x2da28c(%rip), %rax    # 0x30dd21
movzbl (%rax), %edi
leaq 0x2da279(%rip), %rax    # 0x30dd18
movzbl (%rax), %esi
leaq 0x2da32f(%rip), %rax    # 0x30ddd8
movsd (%rax), %xmm1
leaq 0x2da268(%rip), %rax    # 0x30dd1c
movss (%rax), %xmm2
movl $0x1, %edx
callq 0x6ad1d
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6a9e7
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30b7f9(%rip), %rdi    # 0x33f2e0
callq 0x9470
divsd 0xd5534(%rip), %xmm0    # 0x109028
jmp 0x33a7f
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: clear_pid_display()
void clear_pid_display()
{
   if(pid_debug == 0) {
      debug_text[0] = 0;
      debug_text2[0] = 0;
      redraw_screen();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x30bb3f(%rip), %rax    # 0x33f640
cmpb $0x0, (%rax)
je 0x33b08
popq %rbp
retq
leaq 0x30ae91(%rip), %rax    # 0x33e9a0
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x30afd6(%rip), %rax    # 0x33eaf0
movb %cl, (%rax)
popq %rbp
jmp 0xfb1a
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: toggle_value(unsigned char)
u08 toggle_value(u08 x)
{
int c;

   // commands that normally toggle the parameter can be forced on or off
   // by following them with a 0,1,y,n when they are in script files
   // i.e.  gu  - toggles graph update mode
   //       gu1 - sets graph update mode
   //       gun - clears graph update mode
   if(script_file && (script_pause == 0)) {
      c = get_script();
      if     ((c == '1') || (c == 'y') || (c == 'Y')) return 1;
      else if((c == '0') || (c == 'n') || (c == 'N')) return 0;
   }

   return (x & 1) ^ 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x20afb0(%rip), %rax    # 0x23eeb8
cmpq $0x0, (%rax)
je 0x33f54
leaq 0x20afbb(%rip), %rax    # 0x23eed0
cmpb $0x0, (%rax)
jne 0x33f54
movb $0x1, %r14b
callq 0x1d050
leal -0x30(%rax), %ecx
cmpl $0x3e, %ecx
ja 0x33f4f
movabsq $0x4000000040000001, %rdx # imm = 0x4000000040000001
btq %rcx, %rdx
jae 0x33f3f
xorl %r14d, %r14d
jmp 0x33f5c
movabsq $0x20000000002, %rdx    # imm = 0x20000000002
btq %rcx, %rdx
jb 0x33f5c
cmpl $0x79, %eax
je 0x33f5c
notb %bl
andb $0x1, %bl
movl %ebx, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: clear_osc_pid_display()
void clear_osc_pid_display()
{
   if(osc_pid_debug == 0) {
      debug_text[0] = 0;
      debug_text2[0] = 0;
      redraw_screen();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x30b729(%rip), %rax    # 0x33f698
cmpb $0x0, (%rax)
je 0x33f76
popq %rbp
retq
leaq 0x30aa23(%rip), %rax    # 0x33e9a0
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x30ab68(%rip), %rax    # 0x33eaf0
movb %cl, (%rax)
popq %rbp
jmp 0xfb1a
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: go_full()
void go_full()
{
   // setup to go to a full screen mode
   not_safe = 1;
   go_fullscreen ^= 1;        // toggle full screen mode
   kill_deco = go_fullscreen; // disable X11 window decorations
   need_screen_init = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2d9c34(%rip), %rax    # 0x30de6d
movb $0x1, (%rax)
leaq 0x1e459d(%rip), %rax    # 0x2187e0
movl (%rax), %ecx
xorl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x1e45d3(%rip), %rax    # 0x218824
movl %ecx, (%rax)
leaq 0x1e458e(%rip), %rax    # 0x2187e8
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: change_screen_res()
void change_screen_res()
{
int k;

   reset_first_key(22);
   prot_menu = 0;
   eofs = 1;
   adjust_screen_options();
   init_screen(9100);

   if     (rcvr_type != SCPI_RCVR);  // NEW_RCVR - mostly polled receivers here
   else if(rcvr_type != UCCM_RCVR);
   else if(rcvr_type != STAR_RCVR);
   else if(rcvr_type != TRUE_RCVR);
   else if(rcvr_type != ZYFER_RCVR);
   else init_messages(40, 0);  // zorky


   // set where the first point in the graphs will be
   last_count_y = PLOT_ROW + (PLOT_HEIGHT - VERT_MINOR);
   for(k=0; k<NUM_PLOTS+DERIVED_PLOTS; k++) {
      plot[k].last_y = PLOT_ROW+PLOT_CENTER;
   }

   redraw_screen();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x27872
leaq 0x1e6d20(%rip), %rax    # 0x21b158
movb $0x0, (%rax)
leaq 0x20aafe(%rip), %rax    # 0x23ef40
movl $0x1, (%rax)
callq 0x34262
movl $0x238c, %edi           # imm = 0x238C
callq 0xbe9d
leaq 0x1e441e(%rip), %rax    # 0x21887c
movl (%rax), %eax
leaq 0x1e4421(%rip), %rcx    # 0x218888
leaq 0x1e4402(%rip), %rdx    # 0x218870
movl (%rcx), %ecx
addl %eax, %ecx
subl (%rdx), %ecx
leaq 0x1e4429(%rip), %rdx    # 0x2188a4
movl %ecx, (%rdx)
leaq 0x1e4410(%rip), %rcx    # 0x218894
addl (%rcx), %eax
movl $0xc0, %ecx
leaq 0x12989e(%rip), %rdx    # 0x15dd30
movl %eax, (%rdx,%rcx)
addq $0xe8, %rcx
cmpq $0x12e0, %rcx           # imm = 0x12E0
jne 0x34492
popq %rbp
jmp 0xfb1a
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: update_check()
void update_check()
{
// if(strchr(edit_buffer, 'u') || strchr(edit_buffer, 'U')) {
   if(!strchr(edit_buffer, 'u') && !strchr(edit_buffer, 'U')) {
      pause_data = 0;    // release data pause
      dont_reset_queues = 0;
      new_queue(RESET_ALL_QUEUES, 11);  // erase the data queue
      update_stop = 1;   // stop updating data at end of run
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x30aa28(%rip), %rdi    # 0x33f2e0
movl $0x75, %esi
callq 0x9100
testq %rax, %rax
jne 0x34910
leaq 0x30aa12(%rip), %rdi    # 0x33f2e0
movl $0x55, %esi
callq 0x9100
testq %rax, %rax
jne 0x34910
leaq 0x1e6950(%rip), %rax    # 0x21b234
movb $0x0, (%rax)
leaq 0x13c372(%rip), %rax    # 0x170c60
movl $0x0, (%rax)
movl $0x7, %edi
movl $0xb, %esi
callq 0x1120f
leaq 0x2d85ce(%rip), %rax    # 0x30ced8
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: set_cc_mode(int, double)
void set_cc_mode(int mode, DATA_SIZE volts)
{
   if(cc_val) {
      cc_mode = mode;
      lipo_volts = volts;
      cc_state = 0;
      cc_pwm = 0.0F;
      update_check();
   }
   else {
      cc_mode = 0;
      lipo_volts = 0.0F;
      cc_state = 0;
      sweep_stop = 0.0F;
      update_stop = 0;
   }
   cc_pwm = 0.0F;
   set_batt_pwm(0x0000);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2d82e7(%rip), %rax    # 0x30cea0
movsd (%rax), %xmm1
xorpd %xmm2, %xmm2
leaq 0x2d82c0(%rip), %rax    # 0x30ce88
ucomisd %xmm2, %xmm1
jne 0x34bd0
jnp 0x34bfd
movb %dil, (%rax)
leaq 0x2d82b6(%rip), %rax    # 0x30ce90
movsd %xmm0, (%rax)
leaq 0x2d82a4(%rip), %rax    # 0x30ce89
movb $0x0, (%rax)
leaq 0x2d82b9(%rip), %rax    # 0x30cea8
movq $0x0, (%rax)
callq 0x348ad
jmp 0x34c2b
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x2d8288(%rip), %rax    # 0x30ce90
movq %rcx, (%rax)
leaq 0x2d8277(%rip), %rax    # 0x30ce89
movb %cl, (%rax)
leaq 0x2d82ad(%rip), %rax    # 0x30cec8
movq %rcx, (%rax)
leaq 0x2d82b3(%rip), %rax    # 0x30ced8
movl $0x0, (%rax)
leaq 0x2d8276(%rip), %rax    # 0x30cea8
movq $0x0, (%rax)
xorl %edi, %edi
popq %rbp
jmp 0x7c3fc
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: set_terminal_params()
void set_terminal_params()
{
char *s;

   // setup terminal emulattor port and hex/ascii flag

   strupr(edit_buffer);
   s = trim_whitespace(edit_buffer);
   if(s == 0) return;

   if(isdigit(s[0])) {
      term_port = atoi(s);
   }
   if(strchr(s, 'D')) term_port = DAC_PORT;
   if(strchr(s, 'E')) term_port = ECHO_PORT;
   if(strchr(s, 'F')) term_port = FAN_PORT;
   if(strchr(s, 'I')) term_port = TICC_PORT;
   if(strchr(s, 'K')) term_port = NMEA_PORT;
   if(strchr(s, 'N')) term_port = THERMO_PORT;
   if(strchr(s, 'R')) term_port = RCVR_PORT;
   if(strchr(s, 'T')) term_port = TRACK_PORT;

   if(strchr(s, 'A')) term_hex = 0;
   if(strchr(s, 'H')) term_hex = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x30a069(%rip), %rbx    # 0x33f2e0
movq %rbx, %rdi
callq 0x9899
movq %rbx, %rdi
callq 0x9fd5
testq %rax, %rax
je 0x353e5
movq %rax, %rbx
movsbl (%rax), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x352af
movq %rbx, %rdi
callq 0x95e0
leaq 0x2d9027(%rip), %rcx    # 0x30e2d4
movl %eax, (%rcx)
movq %rbx, %rdi
movl $0x44, %esi
callq 0x9100
testq %rax, %rax
je 0x352ce
leaq 0x2d900c(%rip), %rax    # 0x30e2d4
movl $0x10, (%rax)
movq %rbx, %rdi
movl $0x45, %esi
callq 0x9100
testq %rax, %rax
je 0x352ed
leaq 0x2d8fed(%rip), %rax    # 0x30e2d4
movl $0xb, (%rax)
movq %rbx, %rdi
movl $0x46, %esi
callq 0x9100
testq %rax, %rax
je 0x3530c
leaq 0x2d8fce(%rip), %rax    # 0x30e2d4
movl $0x11, (%rax)
movq %rbx, %rdi
movl $0x49, %esi
callq 0x9100
testq %rax, %rax
je 0x3532b
leaq 0x2d8faf(%rip), %rax    # 0x30e2d4
movl $0xd, (%rax)
movq %rbx, %rdi
movl $0x4b, %esi
callq 0x9100
testq %rax, %rax
je 0x3534a
leaq 0x2d8f90(%rip), %rax    # 0x30e2d4
movl $0xc, (%rax)
movq %rbx, %rdi
movl $0x4e, %esi
callq 0x9100
testq %rax, %rax
je 0x35369
leaq 0x2d8f71(%rip), %rax    # 0x30e2d4
movl $0xf, (%rax)
movq %rbx, %rdi
movl $0x52, %esi
callq 0x9100
testq %rax, %rax
je 0x35388
leaq 0x2d8f52(%rip), %rax    # 0x30e2d4
movl $0xa, (%rax)
movq %rbx, %rdi
movl $0x54, %esi
callq 0x9100
testq %rax, %rax
je 0x353a7
leaq 0x2d8f33(%rip), %rax    # 0x30e2d4
movl $0x12, (%rax)
movq %rbx, %rdi
movl $0x41, %esi
callq 0x9100
testq %rax, %rax
je 0x353c6
leaq 0x209080(%rip), %rax    # 0x23e440
movl $0x0, (%rax)
movq %rbx, %rdi
movl $0x48, %esi
callq 0x9100
testq %rax, %rax
je 0x353e5
leaq 0x209061(%rip), %rax    # 0x23e440
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: set_monitor_params()
void set_monitor_params()
{
char *s;

   // setup monitor port and hex/ascii flag

   strupr(edit_buffer);

   s = trim_whitespace(edit_buffer);
   if(s == 0) return;

   if(isdigit(s[0])) {
      monitor_port = atoi(s);
   }
   if(strchr(s, 'D')) monitor_port = DAC_PORT;
   if(strchr(s, 'E')) monitor_port = ECHO_PORT;
   if(strchr(s, 'F')) monitor_port = FAN_PORT;
   if(strchr(s, 'I')) monitor_port = TICC_PORT;
   if(strchr(s, 'K')) monitor_port = NMEA_PORT;
   if(strchr(s, 'N')) monitor_port = THERMO_PORT;
   if(strchr(s, 'R')) monitor_port = RCVR_PORT;
   if(strchr(s, 'T')) monitor_port = TRACK_PORT;

   if(strchr(s, 'A')) monitor_hex = 0;
   if(strchr(s, 'H')) monitor_hex = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x309ee7(%rip), %rbx    # 0x33f2e0
movq %rbx, %rdi
callq 0x9899
movq %rbx, %rdi
callq 0x9fd5
testq %rax, %rax
je 0x35567
movq %rax, %rbx
movsbl (%rax), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x35431
movq %rbx, %rdi
callq 0x95e0
leaq 0x2d8ea1(%rip), %rcx    # 0x30e2d0
movl %eax, (%rcx)
movq %rbx, %rdi
movl $0x44, %esi
callq 0x9100
testq %rax, %rax
je 0x35450
leaq 0x2d8e86(%rip), %rax    # 0x30e2d0
movl $0x10, (%rax)
movq %rbx, %rdi
movl $0x45, %esi
callq 0x9100
testq %rax, %rax
je 0x3546f
leaq 0x2d8e67(%rip), %rax    # 0x30e2d0
movl $0xb, (%rax)
movq %rbx, %rdi
movl $0x46, %esi
callq 0x9100
testq %rax, %rax
je 0x3548e
leaq 0x2d8e48(%rip), %rax    # 0x30e2d0
movl $0x11, (%rax)
movq %rbx, %rdi
movl $0x49, %esi
callq 0x9100
testq %rax, %rax
je 0x354ad
leaq 0x2d8e29(%rip), %rax    # 0x30e2d0
movl $0xd, (%rax)
movq %rbx, %rdi
movl $0x4b, %esi
callq 0x9100
testq %rax, %rax
je 0x354cc
leaq 0x2d8e0a(%rip), %rax    # 0x30e2d0
movl $0xc, (%rax)
movq %rbx, %rdi
movl $0x4e, %esi
callq 0x9100
testq %rax, %rax
je 0x354eb
leaq 0x2d8deb(%rip), %rax    # 0x30e2d0
movl $0xf, (%rax)
movq %rbx, %rdi
movl $0x52, %esi
callq 0x9100
testq %rax, %rax
je 0x3550a
leaq 0x2d8dcc(%rip), %rax    # 0x30e2d0
movl $0xa, (%rax)
movq %rbx, %rdi
movl $0x54, %esi
callq 0x9100
testq %rax, %rax
je 0x35529
leaq 0x2d8dad(%rip), %rax    # 0x30e2d0
movl $0x12, (%rax)
movq %rbx, %rdi
movl $0x41, %esi
callq 0x9100
testq %rax, %rax
je 0x35548
leaq 0x208f02(%rip), %rax    # 0x23e444
movl $0x0, (%rax)
movq %rbx, %rdi
movl $0x48, %esi
callq 0x9100
testq %rax, %rax
je 0x35567
leaq 0x208ee3(%rip), %rax    # 0x23e444
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: edit_ticc_mode()
void edit_ticc_mode()
{
int i;
unsigned port;

   if(rcvr_type == TICC_RCVR) port = RCVR_PORT;
   else if(ticc_port_open())  port = TICC_PORT;
   else {
      edit_error("No TICC device found.");
      return;
   }

   strupr(edit_buffer);
   i = edit_buffer[0];
   if     (i == 'T') ; // timestamp
   else if(i == 'I') ; // interval
   else if(i == 'P') ; // period
   else if(i == 'F') { // frequency
      if(ticc_type == TAPR_TICC) goto bad_mode;   // frequency
   }
   else if(i == 'H') { // phase
      if(ticc_type == TAPR_TICC) goto bad_mode;   // phase
   }
   else if(ticc_type != TAPR_TICC) {
      goto bad_mode;
   }
   else if(i == 'D') ;
   else if(i == 'L') ;
   else {
      bad_mode:
      sprintf(out, "Invalid TICC mode: %c", i);
      edit_error(out);
      return;
   }

   if(ticc_type != TAPR_TICC) {
      ticc_mode = i;
      have_ticc_mode = i;
      new_queue(RESET_ALL_QUEUES, 222);
   }
   else {
      sprintf(out, "M%c", i);
      set_ticc_config(port, out);
      get_ticc_config(port);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x1e3354(%rip), %rax    # 0x2188d0
movl $0xa, %ebx
cmpq $0x10000, (%rax)        # imm = 0x10000
je 0x35598
callq 0x701f2
movl $0xd, %ebx
testl %eax, %eax
je 0x355f7
leaq 0x309d41(%rip), %r14    # 0x33f2e0
movq %r14, %rdi
callq 0x9899
movzbl (%r14), %eax
movsbl %al, %edx
cmpl $0x48, %eax
jle 0x355c4
cmpl $0x49, %eax
je 0x35619
cmpl $0x50, %eax
je 0x35619
cmpl $0x54, %eax
je 0x35619
jmp 0x35607
cmpl $0x46, %eax
je 0x355ce
cmpl $0x48, %eax
jne 0x35607
leaq 0x1e3333(%rip), %rax    # 0x218908
cmpl $0x54, (%rax)
jne 0x35619
leaq 0x306c3f(%rip), %rbx    # 0x33c220
leaq 0xe03ff(%rip), %rsi     # 0x1159e7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
jmp 0x355fe
leaq 0xe03d3(%rip), %rdi     # 0x1159d1
popq %rbx
popq %r14
popq %rbp
jmp 0x2326e
andb $-0x9, %al
cmpb $0x44, %al
jne 0x355da
leaq 0x1e32f4(%rip), %rax    # 0x218908
cmpl $0x54, (%rax)
jne 0x355da
leaq 0x1e32e8(%rip), %rax    # 0x218908
cmpl $0x54, (%rax)
jne 0x35652
leaq 0x306bf4(%rip), %r14    # 0x33c220
leaq 0xe03ca(%rip), %rsi     # 0x1159fd
movq %r14, %rdi
xorl %eax, %eax
callq 0x9060
movl %ebx, %edi
movq %r14, %rsi
callq 0x64456
movl %ebx, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x645d9
leaq 0x2d76b3(%rip), %rax    # 0x30cd0c
movl %edx, (%rax)
leaq 0x2d76ae(%rip), %rax    # 0x30cd10
movl %edx, (%rax)
movl $0x7, %edi
movl $0xde, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x1120f
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: edit_ticc_sync()
void edit_ticc_sync()
{
int i;
unsigned port;

   if(rcvr_type == TICC_RCVR) port = RCVR_PORT;
   else if(ticc_port_open())  port = TICC_PORT;
   else {
      edit_error("No TICC device found.");
      return;
   }

   strupr(edit_buffer);  // aaaacccc
   i = edit_buffer[0];
   if     (i == 'M') ;
   else if(i == 'S') ;
   else {
      sprintf(out, "Invalid TICC sync mode: %c", i);
      edit_error(out);
   }
   sprintf(out, "Y%c", i);

   set_ticc_config(port, out);
   get_ticc_config(port);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x1e3248(%rip), %rax    # 0x2188d0
movl $0xa, %ebx
cmpq $0x10000, (%rax)        # imm = 0x10000
je 0x356a4
callq 0x701f2
movl $0xd, %ebx
testl %eax, %eax
je 0x3571e
leaq 0x309c35(%rip), %r14    # 0x33f2e0
movq %r14, %rdi
callq 0x9899
movzbl (%r14), %eax
movsbl %al, %r14d
cmpl $0x4d, %eax
je 0x356e8
cmpl $0x53, %eax
je 0x356e8
leaq 0x306b54(%rip), %r15    # 0x33c220
leaq 0xe032e(%rip), %rsi     # 0x115a01
movq %r15, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x9060
movq %r15, %rdi
callq 0x2326e
leaq 0x306b31(%rip), %r15    # 0x33c220
leaq 0xe0326(%rip), %rsi     # 0x115a1c
movq %r15, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x9060
movl %ebx, %edi
movq %r15, %rsi
callq 0x64456
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x645d9
leaq 0xe02ac(%rip), %rdi     # 0x1159d1
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2326e
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: edit_ticc_fudge()
void edit_ticc_fudge()
{
double val1, val2, val3, val4;
unsigned port;

   if(rcvr_type == TICC_RCVR) port = RCVR_PORT;
   else if(ticc_port_open())  port = TICC_PORT;
   else {
      edit_error("No TICC device found.");
      return;
   }

   val1 = fudge_a;  // aaaacccc
   val2 = fudge_b;
   val3 = fudge_c;
   val4 = fudge_d;
   sscanf(edit_buffer, "%lf %lf %lf %lf", &val1, &val2, &val3, &val4);

   sprintf(out, "GA%d", (int) val1);
   set_ticc_config(port, out);

   sprintf(out, "GB%d", (int) val2);
   set_ticc_config(port, out);

   get_ticc_config(port);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
leaq 0x1e3188(%rip), %rax    # 0x2188d0
movl $0xa, %ebx
cmpq $0x10000, (%rax)        # imm = 0x10000
je 0x35768
callq 0x701f2
movl $0xd, %ebx
testl %eax, %eax
je 0x3582c
leaq 0x2d75e1(%rip), %rax    # 0x30cd50
movsd (%rax), %xmm0
leaq -0x38(%rbp), %r15
movsd %xmm0, (%r15)
leaq 0x2d75d5(%rip), %rax    # 0x30cd58
movsd (%rax), %xmm0
leaq -0x30(%rbp), %r14
movsd %xmm0, (%r14)
leaq 0x2d75c9(%rip), %rax    # 0x30cd60
movsd (%rax), %xmm0
leaq -0x28(%rbp), %r8
movsd %xmm0, (%r8)
leaq 0x2d75bd(%rip), %rax    # 0x30cd68
movsd (%rax), %xmm0
leaq -0x20(%rbp), %r9
movsd %xmm0, (%r9)
leaq 0x309b21(%rip), %rdi    # 0x33f2e0
leaq 0xe025a(%rip), %rsi     # 0x115a20
movq %r15, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x9360
cvttsd2si (%r15), %edx
leaq 0x306a41(%rip), %r15    # 0x33c220
leaq 0xe024a(%rip), %rsi     # 0x115a30
movq %r15, %rdi
xorl %eax, %eax
callq 0x9060
movl %ebx, %edi
movq %r15, %rsi
callq 0x64456
cvttsd2si (%r14), %edx
leaq 0xe022f(%rip), %rsi     # 0x115a35
movq %r15, %rdi
xorl %eax, %eax
callq 0x9060
movl %ebx, %edi
movq %r15, %rsi
callq 0x64456
movl %ebx, %edi
callq 0x645d9
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe019e(%rip), %rdi     # 0x1159d1
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2326e
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: edit_ticc_time2()
void edit_ticc_time2()
{
int val1, val2, val3, val4;
unsigned port;

   if(rcvr_type == TICC_RCVR) port = RCVR_PORT;
   else if(ticc_port_open())  port = TICC_PORT;
   else {
      edit_error("No TICC device found.");
      return;
   }

   val1 = time2_a;  // aaaacccc
   val2 = time2_b;
   val3 = time2_c;
   val4 = time2_d;
   sscanf(edit_buffer, "%d %d %d %d", &val1, &val2, &val3, &val4);

   sprintf(out, "FA%d", (int) val1);
   set_ticc_config(port, out);

   sprintf(out, "FB%d", (int) val2);
   set_ticc_config(port, out);

   get_ticc_config(port);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x1e307a(%rip), %rax    # 0x2188d0
movl $0xa, %ebx
cmpq $0x10000, (%rax)        # imm = 0x10000
je 0x35876
callq 0x701f2
movl $0xd, %ebx
testl %eax, %eax
je 0x35926
leaq 0x2d750b(%rip), %rax    # 0x30cd88
movl (%rax), %eax
leaq -0x28(%rbp), %r15
movl %eax, (%r15)
leaq 0x2d74ff(%rip), %rax    # 0x30cd8c
movl (%rax), %eax
leaq -0x24(%rbp), %r14
movl %eax, (%r14)
leaq 0x2d74f3(%rip), %rax    # 0x30cd90
movl (%rax), %eax
leaq -0x20(%rbp), %r8
movl %eax, (%r8)
leaq 0x2d74e7(%rip), %rax    # 0x30cd94
movl (%rax), %eax
leaq -0x1c(%rbp), %r9
movl %eax, (%r9)
leaq 0x309a23(%rip), %rdi    # 0x33f2e0
leaq 0xd4240(%rip), %rsi     # 0x109b04
movq %r15, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x9360
movl (%r15), %edx
leaq 0x306945(%rip), %r15    # 0x33c220
leaq 0xe0158(%rip), %rsi     # 0x115a3a
movq %r15, %rdi
xorl %eax, %eax
callq 0x9060
movl %ebx, %edi
movq %r15, %rsi
callq 0x64456
movl (%r14), %edx
leaq 0xe013f(%rip), %rsi     # 0x115a3f
movq %r15, %rdi
xorl %eax, %eax
callq 0x9060
movl %ebx, %edi
movq %r15, %rsi
callq 0x64456
movl %ebx, %edi
callq 0x645d9
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe00a4(%rip), %rdi     # 0x1159d1
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2326e
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: edit_ticc_tune()
void edit_ticc_tune()
{
unsigned port;
int val;
int min_time;

   dac_dac = 0;
   min_time = 30;
   if(rcvr_type == X72_RCVR) {
      port = RCVR_PORT;
      min_time = 600;
   }
   else if(rcvr_type == TICC_RCVR) port = RCVR_PORT;
   else if(ticc_port_open())  port = TICC_PORT;
   else {
      edit_error("No TICC device found.");
      return;
   }

   val = (int) atof(edit_buffer);

   if(val >= min_time) {  // start analyzing pps drift
      ticc_tune_time = val;
      dac_dac = 1;
   }
   else if(val) {
      sprintf(out, "Autotune time must be >= %d seconds.", min_time);
      edit_error(out);
   }
   else if(dac_dac) {
      dac_dac = 0;
      edit_error("Auto tune canceled");
   }

   return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x305ed2(%rip), %r14    # 0x33b81c
movl $0x0, (%r14)
leaq 0x1e2f78(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x2000000, %rax        # imm = 0x2000000
je 0x35972
cmpq $0x10000, %rax          # imm = 0x10000
jne 0x35979
movl $0x1e, %ebx
jmp 0x35987
movl $0x258, %ebx            # imm = 0x258
jmp 0x35987
callq 0x701f2
movl $0x1e, %ebx
testl %eax, %eax
je 0x359e9
leaq 0x309952(%rip), %rdi    # 0x33f2e0
callq 0x9470
cvttsd2si %xmm0, %eax
cmpl %eax, %ebx
jle 0x359be
testl %eax, %eax
je 0x359d3
leaq 0x30687a(%rip), %r14    # 0x33c220
leaq 0xe0097(%rip), %rsi     # 0x115a44
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
jmp 0x359f0
leaq 0x2d72cb(%rip), %rcx    # 0x30cc90
movl %eax, (%rcx)
movl $0x1, (%r14)
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0x0, (%r14)
je 0x359ce
movl $0x0, (%r14)
leaq 0xe0082(%rip), %rdi     # 0x115a69
jmp 0x359f0
leaq 0xdffe1(%rip), %rdi     # 0x1159d1
popq %rbx
popq %r14
popq %rbp
jmp 0x2326e
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: edit_ticc_dilat()
void edit_ticc_dilat()
{
int val1, val2, val3, val4;
unsigned port;

   if(rcvr_type == TICC_RCVR) port = RCVR_PORT;
   else if(ticc_port_open())  port = TICC_PORT;
   else {
      edit_error("No TICC device found.");
      return;
   }

   val1 = dilat_a;  // aaaacccc
   val2 = dilat_b;
   val3 = dilat_c;
   val4 = dilat_d;
   sscanf(edit_buffer, "%d %d %d %d", &val1, &val2, &val3, &val4);

   sprintf(out, "DA%d", (int) val1);
   set_ticc_config(port, out);

   sprintf(out, "DB%d", (int) val2);
   set_ticc_config(port, out);

   get_ticc_config(port);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x1e2ec3(%rip), %rax    # 0x2188d0
movl $0xa, %ebx
cmpq $0x10000, (%rax)        # imm = 0x10000
je 0x35a2d
callq 0x701f2
movl $0xd, %ebx
testl %eax, %eax
je 0x35add
leaq 0x2d7368(%rip), %rax    # 0x30cd9c
movl (%rax), %eax
leaq -0x28(%rbp), %r15
movl %eax, (%r15)
leaq 0x2d735c(%rip), %rax    # 0x30cda0
movl (%rax), %eax
leaq -0x24(%rbp), %r14
movl %eax, (%r14)
leaq 0x2d7350(%rip), %rax    # 0x30cda4
movl (%rax), %eax
leaq -0x20(%rbp), %r8
movl %eax, (%r8)
leaq 0x2d7344(%rip), %rax    # 0x30cda8
movl (%rax), %eax
leaq -0x1c(%rbp), %r9
movl %eax, (%r9)
leaq 0x30986c(%rip), %rdi    # 0x33f2e0
leaq 0xd4089(%rip), %rsi     # 0x109b04
movq %r15, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x9360
movl (%r15), %edx
leaq 0x30678e(%rip), %r15    # 0x33c220
leaq 0xdffe3(%rip), %rsi     # 0x115a7c
movq %r15, %rdi
xorl %eax, %eax
callq 0x9060
movl %ebx, %edi
movq %r15, %rsi
callq 0x64456
movl (%r14), %edx
leaq 0xdffca(%rip), %rsi     # 0x115a81
movq %r15, %rdi
xorl %eax, %eax
callq 0x9060
movl %ebx, %edi
movq %r15, %rsi
callq 0x64456
movl %ebx, %edi
callq 0x645d9
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xdfeed(%rip), %rdi     # 0x1159d1
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2326e
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: edit_ticc_edge()
void edit_ticc_edge()
{
char e[4];
char c;
unsigned port;
unsigned i, j;

   if(rcvr_type == TICC_RCVR) port = RCVR_PORT;
   else if(ticc_port_open())  port = TICC_PORT;
   else {
      edit_error("No TICC device found.");
      return;
   }

   e[0] = edge_a;   // aaaacccc
   e[1] = edge_b;
   e[2] = edge_c;
   e[3] = edge_d;

   j = 0;
   strupr(edit_buffer);
   for(i=0; i<strlen(edit_buffer); i++) {  // get R/F chars
      c = edit_buffer[i];
      if(c == 'R') {
         e[j++] = c;
         if(j > 3) break;
      }
      else if(c == 'F') {
         e[j++] = c;
         if(j > 3) break;
      }
      else if(c == ' ') ;
      else if(c == '\t') ;
      else {
         sprintf(out, "%c is not a valid edge select", c);
         edit_error(out);
         return;
      }
   }

   if(e[0]) {
      sprintf(out, "EA %c", e[0]);
      set_ticc_config(port, out);
   }

   if(e[1]) {
      sprintf(out, "EB %c", e[1]);
      set_ticc_config(port, out);
   }

   get_ticc_config(port);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x1e2dcb(%rip), %rax    # 0x2188d0
movl $0xa, %ebx
cmpq $0x10000, (%rax)        # imm = 0x10000
je 0x35b25
callq 0x701f2
movl $0xd, %ebx
testl %eax, %eax
je 0x35c1e
leaq 0x2d7248(%rip), %rax    # 0x30cd74
movb (%rax), %al
movb %al, -0x14(%rbp)
leaq 0x2d7240(%rip), %rax    # 0x30cd78
movb (%rax), %al
movb %al, -0x13(%rbp)
leaq 0x2d7238(%rip), %rax    # 0x30cd7c
movb (%rax), %al
movb %al, -0x12(%rbp)
leaq 0x2d7230(%rip), %rax    # 0x30cd80
movb (%rax), %al
movb %al, -0x11(%rbp)
leaq 0x309784(%rip), %r14    # 0x33f2e0
movq %r14, %rdi
callq 0x9899
movq %r14, %rdi
callq 0x9120
testq %rax, %rax
je 0x35bbb
xorl %esi, %esi
movl $0x1, %ecx
xorl %edx, %edx
movb (%r14,%rsi), %sil
movzbl %sil, %edi
cmpl $0x45, %edi
jg 0x35b96
cmpl $0x9, %edi
je 0x35bb2
cmpl $0x20, %edi
je 0x35bb2
jmp 0x35c27
cmpl $0x46, %edi
je 0x35ba4
cmpl $0x52, %edi
jne 0x35c27
movl %edx, %edi
incl %edx
movb %sil, -0x14(%rbp,%rdi)
cmpl $0x3, %edx
ja 0x35bbb
movl %ecx, %esi
incl %ecx
cmpq %rsi, %rax
ja 0x35b7a
movsbl -0x14(%rbp), %edx
testl %edx, %edx
je 0x35be5
leaq 0x306656(%rip), %r14    # 0x33c220
leaq 0xdfed3(%rip), %rsi     # 0x115aa4
movq %r14, %rdi
xorl %eax, %eax
callq 0x9060
movl %ebx, %edi
movq %r14, %rsi
callq 0x64456
movsbl -0x13(%rbp), %edx
testl %edx, %edx
je 0x35c0f
leaq 0x30662c(%rip), %r14    # 0x33c220
leaq 0xdfeaf(%rip), %rsi     # 0x115aaa
movq %r14, %rdi
xorl %eax, %eax
callq 0x9060
movl %ebx, %edi
movq %r14, %rsi
callq 0x64456
movl %ebx, %edi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x645d9
leaq 0xdfdac(%rip), %rdi     # 0x1159d1
jmp 0x35c46
movsbl %sil, %edx
leaq 0x3065ee(%rip), %rbx    # 0x33c220
leaq 0xdfe4d(%rip), %rsi     # 0x115a86
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x2326e
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: edit_ticc_cal()
void edit_ticc_cal()
{
unsigned port;
int val;

   if(rcvr_type == TICC_RCVR) port = RCVR_PORT;
   else if(ticc_port_open())  port = TICC_PORT;
   else {
      edit_error("No TICC device found.");
      return;
   }

   val = (int) atof(edit_buffer);
   if     (val == 2) ;
   else if(val == 10) ;
   else if(val == 20) ;
   else if(val == 40) ;
   else {
      edit_error("Cal periods must be 2, 10, 20, or 40");
      return;
   }
   sprintf(out, "P%d", val);
   set_ticc_config(port, out);

   get_ticc_config(port);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x1e2c6f(%rip), %rax    # 0x2188d0
movl $0xa, %ebx
cmpq $0x10000, (%rax)        # imm = 0x10000
je 0x35c7d
callq 0x701f2
movl $0xd, %ebx
testl %eax, %eax
je 0x35ccf
leaq 0x30965c(%rip), %rdi    # 0x33f2e0
callq 0x9470
cvttsd2si %xmm0, %edx
cmpl $0x28, %edx
ja 0x35cd8
movabsq $0x10000100404, %rax    # imm = 0x10000100404
btq %rdx, %rax
jae 0x35cd8
leaq 0x306577(%rip), %r14    # 0x33c220
leaq 0xedf22(%rip), %rsi     # 0x123bd2
movq %r14, %rdi
xorl %eax, %eax
callq 0x9060
movl %ebx, %edi
movq %r14, %rsi
callq 0x64456
movl %ebx, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x645d9
leaq 0xdfcfb(%rip), %rdi     # 0x1159d1
jmp 0x35cdf
leaq 0xdfdd1(%rip), %rdi     # 0x115ab0
popq %rbx
popq %r14
popq %rbp
jmp 0x2326e
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: edit_ticc_timeout()
void edit_ticc_timeout()
{
unsigned port;
int val;

   if(rcvr_type == TICC_RCVR) port = RCVR_PORT;
   else if(ticc_port_open())  port = TICC_PORT;
   else {
      edit_error("No TICC device found.");
      return;
   }

   val = (int) atof(edit_buffer);
   sprintf(out, "T%d", val);
   set_ticc_config(port, out);

   get_ticc_config(port);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x1e2bda(%rip), %rax    # 0x2188d0
movl $0xa, %ebx
cmpq $0x10000, (%rax)        # imm = 0x10000
je 0x35d12
callq 0x701f2
movl $0xd, %ebx
testl %eax, %eax
je 0x35d4f
leaq 0x3095c7(%rip), %rdi    # 0x33f2e0
callq 0x9470
cvttsd2si %xmm0, %edx
leaq 0x3064f7(%rip), %r14    # 0x33c220
leaq 0xd7aa7(%rip), %rsi     # 0x10d7d7
movq %r14, %rdi
xorl %eax, %eax
callq 0x9060
movl %ebx, %edi
movq %r14, %rsi
callq 0x64456
movl %ebx, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x645d9
leaq 0xdfc7b(%rip), %rdi     # 0x1159d1
popq %rbx
popq %r14
popq %rbp
jmp 0x2326e
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: edit_ticc_speed()
void edit_ticc_speed()
{
unsigned port;
double val;

   if(rcvr_type == TICC_RCVR) port = RCVR_PORT;
   else if(ticc_port_open())  port = TICC_PORT;
   else {
      edit_error("No TICC device found.");
      return;
   }

   val = atof(edit_buffer);
   sprintf(out, "S%.6f", val);
   set_ticc_config(port, out);

   get_ticc_config(port);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x1e2b63(%rip), %rax    # 0x2188d0
movl $0xa, %ebx
cmpq $0x10000, (%rax)        # imm = 0x10000
je 0x35d89
callq 0x701f2
movl $0xd, %ebx
testl %eax, %eax
je 0x35dc2
leaq 0x309550(%rip), %rdi    # 0x33f2e0
callq 0x9470
leaq 0x306484(%rip), %r14    # 0x33c220
leaq 0xdfd32(%rip), %rsi     # 0x115ad5
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
movl %ebx, %edi
movq %r14, %rsi
callq 0x64456
movl %ebx, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x645d9
leaq 0xdfc08(%rip), %rdi     # 0x1159d1
popq %rbx
popq %r14
popq %rbp
jmp 0x2326e
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: set_nominal_freqs(double)
void set_nominal_freqs(double dval)
{
    // set nominal freq val and phase wrap interval for all channels.
    if(dval == 0.0) dval = NOMINAL_FREQ;

    nominal_cha_freq = dval;
    nominal_chb_freq = dval;
    nominal_chc_freq = dval;
    nominal_chd_freq = dval;
    if(nominal_cha_freq) cha_phase_wrap_interval = (1.0 / nominal_cha_freq);  // !!!!! what about chc and chd
    if(nominal_chb_freq) chb_phase_wrap_interval = (1.0 / nominal_chb_freq);
    if(nominal_chc_freq) chc_phase_wrap_interval = (1.0 / nominal_chc_freq);  // !!!!! what about chc and chd
    if(nominal_chd_freq) chc_phase_wrap_interval = (1.0 / nominal_chd_freq);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorpd %xmm1, %xmm1
cmpeqsd %xmm0, %xmm1
movsd 0xd5a6e(%rip), %xmm2    # 0x10b8c8
andpd %xmm1, %xmm2
andnpd %xmm0, %xmm1
orpd %xmm2, %xmm1
leaq 0x2d6afb(%rip), %rax    # 0x30c968
movlpd %xmm1, (%rax)
leaq 0x2d6af8(%rip), %rax    # 0x30c970
movlpd %xmm1, (%rax)
leaq 0x2d6af5(%rip), %rax    # 0x30c978
movlpd %xmm1, (%rax)
leaq 0x2d6af2(%rip), %rax    # 0x30c980
movlpd %xmm1, (%rax)
movsd 0xd31d6(%rip), %xmm0    # 0x109070
divsd %xmm1, %xmm0
leaq 0x2d6ae3(%rip), %rax    # 0x30c988
movsd %xmm0, (%rax)
leaq 0x2d6ae0(%rip), %rax    # 0x30c990
movsd %xmm0, (%rax)
leaq 0x2d6add(%rip), %rax    # 0x30c998
movsd %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: update_delta_t_file()
void update_delta_t_file()
{
FILE *file;

   // write user delta-t value to deltat.dat file

   file = fopen(DELTAT_FILE, "w");
   if(file) {
      fprintf(file, "%.6f\n", user_delta_t);
      fclose(file);
      file = 0;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0xdfc13(%rip), %rdi     # 0x115ae1
leaq 0xeb406(%rip), %rsi     # 0x1212db
callq 0x9430
testq %rax, %rax
je 0x35f0c
movq %rax, %rbx
leaq 0x2d7607(%rip), %rax    # 0x30d4f0
movsd (%rax), %xmm0
leaq 0xec22e(%rip), %rsi     # 0x122122
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9370
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: reset_eph_flags()
void reset_eph_flags()
{
int prn;

   for(prn=1; prn<MAX_PRN; prn++) {
      sat[prn].eph_valid = 0;
      sat[prn].eph_flag = 0;
   }
   have_range = 0;
   eph_polled = 0;
}

// Assembly:
movl $0x58c, %eax            # imm = 0x58C
leaq 0x206176(%rip), %rcx    # 0x23efb0
movl $0x0, (%rcx,%rax)
movb $0x0, -0x42(%rcx,%rax)
addq $0x348, %rax            # imm = 0x348
cmpq $0xcd03c, %rax          # imm = 0xCD03C
jne 0x38e3a
pushq %rbp
movq %rsp, %rbp
leaq 0x2d44e9(%rip), %rax    # 0x30d348
xorl %ecx, %ecx
movl %ecx, (%rax)
leaq 0x2d45e2(%rip), %rax    # 0x30d44c
movl %ecx, (%rax)
popq %rbp
retq