LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: second_key(int)
void second_key(int c)
{
   // process second  keystroke of a two key command
   if(c == first_key) {  // the user confirmed a dangerous single char command
      if(c != '?') BEEP(302);
   }
   else {  // single char command not confirmed
      if(script_file) {
         erase_plot(FULL_ERASE_OK);
         sprintf(out, "Selection '%c' for command '%c' not recognized", c, first_key);
         edit_error(out);
      }
      if(text_mode) redraw_screen();
   }

   reset_first_key(20); // clear message and resume graphing
   if(screen_type == 't') {
      no_x_margin = no_y_margin = 0;
   }
   else if(text_mode == 2) { // displaying full screen help
      text_mode = 0;
      no_x_margin = no_y_margin = 0;
if(0 && review_mode) end_review(0);
      redraw_screen();
   }

   if(text_mode) {
      redraw_screen();
   }
   else {
     erase_help();
     draw_plot(REFRESH_SCREEN);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x2035ef(%rip), %r14    # 0x228f58
cmpl %edi, (%r14)
jne 0x2597f
cmpl $0x3f, %ebx
je 0x259ca
movl $0x12e, %edi            # imm = 0x12E
callq 0x9d23
jmp 0x259ca
leaq 0x203532(%rip), %rax    # 0x228eb8
cmpq $0x0, (%rax)
je 0x259b9
pushq $-0x1
popq %rdi
callq 0xeaef
movl (%r14), %ecx
leaq 0x300882(%rip), %r14    # 0x326220
leaq 0xd2c37(%rip), %rsi     # 0xf85dc
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
callq 0x214df
leaq 0x1dce18(%rip), %rax    # 0x2027d8
cmpl $0x0, (%rax)
je 0x259ca
callq 0xf426
callq 0x2591f
leaq 0x1dce5b(%rip), %rax    # 0x202831
cmpb $0x74, (%rax)
jne 0x259f1
leaq 0x1dce79(%rip), %rax    # 0x20285b
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x1dce6d(%rip), %rax    # 0x20285a
movb %cl, (%rax)
jmp 0x25a1b
leaq 0x1dcde0(%rip), %rcx    # 0x2027d8
movl (%rcx), %eax
cmpl $0x2, %eax
jne 0x25a24
andl $0x0, (%rcx)
leaq 0x1dce52(%rip), %rax    # 0x20285b
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x1dce46(%rip), %rax    # 0x20285a
movb %cl, (%rax)
callq 0xf426
leaq 0x1dcdb6(%rip), %rax    # 0x2027d8
movl (%rax), %eax
testl %eax, %eax
je 0x25a31
popq %rbx
popq %r14
popq %rbp
jmp 0xf426
callq 0xe7aa
pushq $0x1
popq %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x18cb0
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: tide_plots()
char *tide_plots()
{
    if(enviro_mode() && (rcvr_type != TIDE_RCVR)) {
       return  "Enviro:  KP=pressure   KH=humidity  KT=temp1   KU=temp2   KA=all";
    }
    else if(plot_prn) {
       if(have_phase)      return  "Sat:     KX=az      KY=el      KZ=signal     KG=phase    KA=all";
       else if(have_range) return  "Sat:     KX=az      KY=el      KZ=signal     KG=range    KA=all";
       else                return  "Sat:     KX=az      KY=el      KZ=signal     KG=gravity  KA=all";
    }
    else {
       return  "Tides:   KX=lon     KY=lat     KZ=alt        KG=gravity  KA=all   KI=displacement plot";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x57eca
testl %eax, %eax
je 0x25a68
leaq 0x1dce7a(%rip), %rax    # 0x2028d0
cmpq $0x800000, (%rax)       # imm = 0x800000
je 0x25a68
leaq 0xd2ba5(%rip), %rax     # 0xf860b
jmp 0x25aae
leaq 0x2d0d25(%rip), %rax    # 0x2f6794
cmpl $0x0, (%rax)
je 0x25a89
leaq 0x2d18c9(%rip), %rax    # 0x2f7344
cmpl $0x0, (%rax)
je 0x25a92
leaq 0xd2bc5(%rip), %rax     # 0xf864c
jmp 0x25aae
leaq 0xd2c7c(%rip), %rax     # 0xf870c
jmp 0x25aae
leaq 0x2d18af(%rip), %rax    # 0x2f7348
cmpl $0x0, (%rax)
leaq 0xd2c29(%rip), %rcx     # 0xf86cc
leaq 0xd2be2(%rip), %rax     # 0xf868c
cmoveq %rcx, %rax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: edit_scale()
void edit_scale()
{
DATA_SIZE val;
char *u;

   // get a plot scale factor
   if(plot[selected_plot].user_scale) val = 0.0;
   else                               val = plot[selected_plot].scale_factor;

   if(selected_plot == TEMP) {
      if     (DEG_SCALE == 'F')  u = "milli degrees F";
      else if(DEG_SCALE == 'R')  u = "milli degrees R";
      else if(DEG_SCALE == 'K')  u = "milli degrees K";
      else if(DEG_SCALE == 'D')  u = "milli degrees D";
      else if(DEG_SCALE == 'N')  u = "milli degrees N";
      else if(DEG_SCALE == 'E')  u = "milli degrees E";
      else if(DEG_SCALE == 'O')  u = "milli degrees O";
      else                       u = "milli degrees C";
   }
   else u = plot[selected_plot].units;
   if(u[0] == ' ') ++u;

   sprintf(edit_buffer, "%.0f", val);

   sprintf(out, "Enter scale factor for %s graph (%s/div, 0=auto scale)",
                 plot[selected_plot].plot_id, u);
   start_edit(SCALE_CMD, out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x2fd96a(%rip), %r14    # 0x329d58
movslq (%r14), %rcx
imulq $0xe8, %rcx, %rax
leaq 0x11b931(%rip), %r15    # 0x147d30
xorps %xmm0, %xmm0
cmpl $0x0, 0x30(%r15,%rax)
jne 0x2c413
leaq (%r15,%rax), %rdx
movsd 0x38(%rdx), %xmm0
cmpl $0x3, %ecx
jne 0x2c437
leaq 0x2cab86(%rip), %rax    # 0x2f6fa5
movb (%rax), %al
addb $-0x44, %al
cmpb $0xf, %al
jae 0x2c443
movzbl %al, %eax
leaq 0x10d6f7(%rip), %rcx    # 0x139b28
leaq (%rcx,%rax,8), %rax
jmp 0x2c43e
addq %r15, %rax
addq $0x8, %rax
movq (%rax), %rax
jmp 0x2c44a
leaq 0xd272f(%rip), %rax     # 0xfeb79
xorl %ebx, %ebx
cmpb $0x20, (%rax)
sete %bl
addq %rax, %rbx
leaq 0x2fce84(%rip), %rdi    # 0x3292e0
leaq 0xf2b5f(%rip), %rsi     # 0x11efc2
movb $0x1, %al
callq 0x9060
movslq (%r14), %rax
imulq $0xe8, %rax, %rax
movq (%r15,%rax), %rdx
leaq 0x2f9da1(%rip), %r14    # 0x326220
leaq 0xd2703(%rip), %rsi     # 0xfeb89
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x9060
pushq $0x64
popq %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x297a7
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: edit_drift()
void edit_drift()
{
char *u;

   // set a plot drift rate removal factor

   if(selected_plot == TEMP) {
      if     (DEG_SCALE == 'F')  u = "degrees F";
      else if(DEG_SCALE == 'R')  u = "degrees R";
      else if(DEG_SCALE == 'K')  u = "degrees K";
      else if(DEG_SCALE == 'D')  u = "degrees D";
      else if(DEG_SCALE == 'N')  u = "degrees N";
      else if(DEG_SCALE == 'E')  u = "degrees E";
      else if(DEG_SCALE == 'O')  u = "degrees O";
      else if(DEG_SCALE == 'H')  u = "degrees H";
      else                       u = "degrees C";
   }
   else u = plot[selected_plot].units;
   if(u[0] == ' ') ++u;
u = "units";

   if(plot[selected_plot].drift_rate) sprintf(edit_buffer, "0");
   else if(rcvr_type == TICC_RCVR) sprintf(edit_buffer, "1");
   else sprintf(edit_buffer, "%g", plot[selected_plot].a1);

   if(dynamic_trend_line) {
      sprintf(out, "Remove linear residual to remove from %s graph (0=disable  1=emable)  (ESC ESC to abort)",
                    plot[selected_plot].plot_id);
   }
   else {

      sprintf(out, "Enter drift rate to remove from %s graph (%s/sec 0=disable)  (ESC ESC to abort)",
                    plot[selected_plot].plot_id, u);
   }
   start_edit(DRIFT_CMD, out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x2fd8a2(%rip), %rbx    # 0x329d58
movslq (%rbx), %rax
imulq $0xe8, %rax, %rax
leaq 0x11b869(%rip), %r14    # 0x147d30
movsd 0xa0(%r14,%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2c4dd
jnp 0x2c4eb
leaq 0x2fcdfc(%rip), %rax    # 0x3292e0
movw $0x30, (%rax)
jmp 0x2c529
leaq 0x1d63de(%rip), %rcx    # 0x2028d0
cmpq $0x10000, (%rcx)        # imm = 0x10000
jne 0x2c509
leaq 0x2fcdde(%rip), %rax    # 0x3292e0
movw $0x31, (%rax)
jmp 0x2c529
addq %r14, %rax
movsd 0x98(%rax), %xmm0
leaq 0x2fcdc5(%rip), %rdi    # 0x3292e0
leaq 0xeced5(%rip), %rsi     # 0x1193f7
movb $0x1, %al
callq 0x9060
leaq 0x2fd83c(%rip), %rax    # 0x329d6c
movslq (%rbx), %rcx
imulq $0xe8, %rcx, %rcx
cmpl $0x0, (%rax)
movq (%r14,%rcx), %rdx
leaq 0x2f9cd8(%rip), %rdi    # 0x326220
je 0x2c55a
leaq 0xd2675(%rip), %rsi     # 0xfebc6
xorl %eax, %eax
callq 0x9060
jmp 0x2c56f
leaq 0xd26be(%rip), %rsi     # 0xfec1f
leaq 0xd2658(%rip), %rcx     # 0xfebc0
xorl %eax, %eax
callq 0x9060
leaq 0x2f9caa(%rip), %rsi    # 0x326220
pushq $0x3d
popq %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x297a7
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: edit_ref()
void edit_ref()
{
DATA_SIZE val;
char *u;

   // get a plot center line reference value
   edit_buffer[0] = 0;
   val = plot[selected_plot].plot_center;
   if(plot[selected_plot].float_center) {
      sprintf(edit_buffer, "%.6f", val);
   }

   if(selected_plot == TEMP) {
      if     (DEG_SCALE == 'F')  u = "degrees F";
      else if(DEG_SCALE == 'R')  u = "degrees R";
      else if(DEG_SCALE == 'K')  u = "degrees K";
      else if(DEG_SCALE == 'D')  u = "degrees D";
      else if(DEG_SCALE == 'N')  u = "degrees N";
      else if(DEG_SCALE == 'E')  u = "degrees E";
      else if(DEG_SCALE == 'O')  u = "degrees O";
      else                       u = "degrees C";
   }
   else if(selected_plot == DAC) u = "V";
   else u = plot[selected_plot].units;
   if(u[0] == ' ') ++u;

   sprintf(out, "Enter center line reference for %s graph (in %s, <cr>=auto)",
                 plot[selected_plot].plot_id, u);
   start_edit(CENTER_CMD, out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x2fcd50(%rip), %rax    # 0x3292e0
movb $0x0, (%rax)
leaq 0x2fd7be(%rip), %r14    # 0x329d58
movslq (%r14), %rcx
imulq $0xe8, %rcx, %rax
leaq 0x11b785(%rip), %rbx    # 0x147d30
cmpl $0x0, 0x1c(%rbx,%rax)
je 0x2c5d2
addq %rbx, %rax
movsd 0x28(%rax), %xmm0
leaq 0x2fcd1f(%rip), %rdi    # 0x3292e0
leaq 0xd281b(%rip), %rsi     # 0xfede3
movb $0x1, %al
callq 0x9060
movl (%r14), %ecx
movslq %ecx, %rax
cmpl $0x2, %ecx
je 0x2c600
cmpl $0x3, %ecx
jne 0x2c609
leaq 0x2ca9bf(%rip), %rcx    # 0x2f6fa5
movb (%rcx), %cl
addb $-0x44, %cl
cmpb $0xf, %cl
jae 0x2c61c
movzbl %cl, %ecx
leaq 0x10d5a6(%rip), %rdx    # 0x139ba0
leaq (%rdx,%rcx,8), %rcx
jmp 0x2c617
leaq 0xed08d(%rip), %rdx     # 0x119694
jmp 0x2c623
imulq $0xe8, %rax, %rcx
addq %rbx, %rcx
addq $0x8, %rcx
movq (%rcx), %rdx
jmp 0x2c623
leaq 0xd4127(%rip), %rdx     # 0x10074a
xorl %ecx, %ecx
cmpb $0x20, (%rdx)
sete %cl
addq %rdx, %rcx
imulq $0xe8, %rax, %rax
movq (%rbx,%rax), %rdx
leaq 0x2f9be0(%rip), %rbx    # 0x326220
leaq 0xd2628(%rip), %rsi     # 0xfec6f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
pushq $0x43
popq %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x297a7
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: view_all(int)
void view_all(int set_user_view)
{
double val;

   val = (double) plot_q_count;
   view_interval = 0;
   while(val > 0.0) {
      val -= (double) PLOT_WIDTH;
      ++view_interval;
   }
// view_interval = (long) (((val+PLOT_WIDTH-1) / PLOT_WIDTH) + 0.5F);
   if(view_interval <= 1L) view_interval = 1L;
   if(set_user_view) {
      user_view = view_interval;
      new_user_view = 1;
      last_was_adev = 0;
      do_review(END_CHAR, 1);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1d891f(%rip), %rax    # 0x205338
cvtsi2sdq (%rax), %xmm0
leaq 0x1d5e5f(%rip), %rax    # 0x202884
cvtsi2sdl (%rax), %xmm1
xorl %eax, %eax
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jbe 0x2ca3e
subsd %xmm1, %xmm0
incq %rax
jmp 0x2ca2f
cmpq $0x1, %rax
adcq $0x0, %rax
leaq 0x1d8953(%rip), %rcx    # 0x2053a0
movq %rax, (%rcx)
testl %edi, %edi
je 0x2ca82
leaq 0x1d895d(%rip), %rcx    # 0x2053b8
movq %rax, (%rcx)
leaq 0x1d895f(%rip), %rax    # 0x2053c4
leaq 0x1d8898(%rip), %rcx    # 0x205304
andl $0x0, (%rcx)
movb $0x1, (%rax)
movl $0x1, %esi
movl $0x14f, %edi            # imm = 0x14F
popq %rbp
jmp 0x1b934
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: set_alarm(char*)
void set_alarm(char *alarm)
{
   // set the alarm clock to the values in string "alarm"
   // (with error checking disabled)

   if(alarm == 0) return;

   getting_string = ALARM_CMD;
   edit_dt(alarm, 0);
   getting_string = 0;
}

// Assembly:
testq %rdi, %rdi
je 0x2e46f
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x2fb1af(%rip), %rbx    # 0x329608
movw $0x3a, (%rbx)
xorl %esi, %esi
callq 0x2cd0a
andw $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: parse_alt(char*)
double parse_alt(char *s)
{
double val;
int adj_flag;

   // convert an altitude string to meters. The string can end in an f or '
   // to indicate feet.

   if(s == 0) return 0.0;

   strlwr(s);
   if(s[0] == '*') {
      adj_flag = 1;
      s = "0";
   }
   else if((s[0] == '+') && (s[1] == '+')) {
      adj_flag = 1;
      ++s;
   }
   else if((s[0] == '-') && (s[1] == '-')) {
      adj_flag = (-1);
      ++s;
   }
   else adj_flag = 0;

   if(strchr(s, 'a') && plot[THREE].stat_count && have_lla_queue) {
      val = plot[THREE].sum_y / plot[THREE].stat_count;
   }
   else if(strchr(s, 'a')) {
      val = alt;
   }
   else {
      val = atof(s);
   }
   if(adj_flag) {
      val += precise_alt;
   }

   if(strchr(s, 'f') || strchr(s, '\'')) {  // convert feet to meters
      val /= FEET_PER_METER;
   }
   return val;
}

// Assembly:
testq %rdi, %rdi
je 0x2e4a5
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x986c
movzbl (%rbx), %eax
cmpl $0x2a, %eax
je 0x2e4b7
cmpl $0x2d, %eax
je 0x2e4a9
cmpl $0x2b, %eax
jne 0x2e4a0
cmpb $0x2b, 0x1(%rbx)
je 0x2e4af
movb $0x1, %r14b
jmp 0x2e4c1
xorps %xmm0, %xmm0
retq
cmpb $0x2d, 0x1(%rbx)
jne 0x2e4a0
incq %rbx
xorl %r14d, %r14d
jmp 0x2e4c1
xorl %r14d, %r14d
leaq 0xdce97(%rip), %rbx     # 0x10b358
pushq $0x61
popq %rsi
movq %rbx, %rdi
callq 0x9100
testq %rax, %rax
je 0x2e506
leaq 0x119858(%rip), %rax    # 0x147d30
movsd 0x5f8(%rax), %xmm2
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm2
jne 0x2e4ec
jnp 0x2e510
leaq 0x2c8dcd(%rip), %rcx    # 0x2f72c0
cmpl $0x0, (%rcx)
je 0x2e510
movsd 0x5d8(%rax), %xmm0
divsd %xmm2, %xmm0
jmp 0x2e51b
movq %rbx, %rdi
callq 0x9470
jmp 0x2e51b
leaq 0x2c8ac9(%rip), %rax    # 0x2f6fe0
movsd (%rax), %xmm0
testb %r14b, %r14b
jne 0x2e52b
leaq 0x2f6dd9(%rip), %rax    # 0x325300
addsd (%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
pushq $0x66
popq %rsi
movq %rbx, %rdi
callq 0x9100
testq %rax, %rax
jne 0x2e550
pushq $0x27
popq %rsi
movq %rbx, %rdi
callq 0x9100
testq %rax, %rax
je 0x2e566
movsd -0x18(%rbp), %xmm0
divsd 0xc73c3(%rip), %xmm0    # 0xf5920
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movsd -0x18(%rbp), %xmm0
jmp 0x2e55d
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: hms_val(char*)
double hms_val(char *s)
{
double val;
unsigned i, j, len;
double sign;

   if(s == 0) return 0.0;

   strcpy(out, s);

   val = 0.0;
   sign = 1.0;

   j = 0;
   len = strlen(out);
   for(i=0; i<len; i++) {
      if(out[i] == '-') sign *= (-1.0);

      if(toupper(out[i]) == 'W') {  // weeks
         out[i] = 0;
         val += fabs(atof(&out[j]) * 7.0*24.0*60.0*60.0);
         j = i+1;
      }
      else if(toupper(out[i]) == 'D') { // days
         out[i] = 0;
         val += fabs(atof(&out[j]) * 24.0*60.0*60.0);
         j = i+1;
      }
      else if(toupper(out[i]) == 'H') { // hours
         out[i] = 0;
         val += fabs(atof(&out[j]) * 60.0*60.0);
         j = i+1;
      }
      else if(toupper(out[i]) == 'M') { // minutes
         out[i] = 0;
         val += fabs(atof(&out[j]) * 60.0);
         j = i+1;
      }
      else if(toupper(out[i]) == 'S') { // seconds
         out[i] = 0;
         val += fabs(atof(&out[j]) * 1.0);
         j = i+1;
      }
   }

   return (val*sign);
}

// Assembly:
testq %rdi, %rdi
je 0x2e6af
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rsi
leaq 0x2f7c91(%rip), %rbx    # 0x326220
movq %rbx, %rdi
callq 0x9330
movq %rbx, %rdi
callq 0x9120
movl %eax, %r14d
movsd 0xc4ac6(%rip), %xmm0    # 0xf3070
movapd %xmm0, -0x40(%rbp)
xorl %r15d, %r15d
xorpd %xmm0, %xmm0
xorl %r12d, %r12d
cmpq %r15, %r14
je 0x2e69d
movsbl (%rbx,%r15), %edi
cmpl $0x2d, %edi
movsd %xmm0, -0x28(%rbp)
jne 0x2e5e3
movapd -0x40(%rbp), %xmm0
xorpd 0xc4bd2(%rip), %xmm0    # 0xf31b0
movapd %xmm0, -0x40(%rbp)
callq 0x9700
movl %r12d, %edi
cmpl $0x44, %eax
je 0x2e657
cmpl $0x48, %eax
je 0x2e61b
cmpl $0x4d, %eax
je 0x2e639
cmpl $0x53, %eax
je 0x2e62a
cmpl $0x57, %eax
jne 0x2e650
movb $0x0, (%rbx,%r15)
addq %rbx, %rdi
callq 0x9470
mulsd 0xc7367(%rip), %xmm0    # 0xf5980
jmp 0x2e664
movb $0x0, (%rbx,%r15)
addq %rbx, %rdi
callq 0x9470
jmp 0x2e66c
movb $0x0, (%rbx,%r15)
addq %rbx, %rdi
callq 0x9470
jmp 0x2e67c
movb $0x0, (%rbx,%r15)
addq %rbx, %rdi
callq 0x9470
mulsd 0xc49ba(%rip), %xmm0    # 0xf3008
jmp 0x2e67c
movsd -0x28(%rbp), %xmm0
jmp 0x2e695
movb $0x0, (%rbx,%r15)
addq %rbx, %rdi
callq 0x9470
mulsd 0xc49d4(%rip), %xmm0    # 0xf3040
movsd 0xc4994(%rip), %xmm1    # 0xf3008
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
andpd 0xc4b0c(%rip), %xmm0    # 0xf3190
movsd -0x28(%rbp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
leal 0x1(%r15), %r12d
incq %r15
jmp 0x2e5b9
mulsd -0x40(%rbp), %xmm0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: deg_min_sec(char*)
double deg_min_sec(char *s)
{
double val;
unsigned i, j, len;
double sign;

   if(s == 0) return 0.0;

   strcpy(out, s);

   val = 0.0;
   sign = (1.0);

   j = 0;
   len = strlen(out);
   for(i=0; i<len; i++) {
      if(out[i] == '-') sign *= (-1.0);

      if(toupper(out[i]) == 'D') { // degrees
         out[i] = 0;
         val += fabs(atof(&out[j]) * 60.0*60.0);
         j = i+1;
      }
      else if(toupper(out[i]) == 'M') { // minutes
         out[i] = 0;
         val += fabs(atof(&out[j]) * 60.0);
         j = i+1;
      }
      else if(toupper(out[i]) == 'S') { // seconds
         out[i] = 0;
         val += fabs(atof(&out[j]) * 1.0);
         j = i+1;
      }
   }

   return (val / 3600.0 * sign);
}

// Assembly:
testq %rdi, %rdi
je 0x2e7c5
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rsi
leaq 0x2f7b4b(%rip), %rbx    # 0x326220
movq %rbx, %rdi
callq 0x9330
movq %rbx, %rdi
callq 0x9120
movl %eax, %r14d
movsd 0xc4980(%rip), %xmm0    # 0xf3070
movapd %xmm0, -0x40(%rbp)
xorl %r15d, %r15d
xorpd %xmm0, %xmm0
xorl %r12d, %r12d
cmpq %r15, %r14
je 0x2e7ab
movsbl (%rbx,%r15), %edi
cmpl $0x2d, %edi
movsd %xmm0, -0x28(%rbp)
jne 0x2e729
movapd -0x40(%rbp), %xmm0
xorpd 0xc4a8c(%rip), %xmm0    # 0xf31b0
movapd %xmm0, -0x40(%rbp)
callq 0x9700
movl %r12d, %edi
cmpl $0x53, %eax
je 0x2e776
cmpl $0x4d, %eax
je 0x2e75f
cmpl $0x44, %eax
jne 0x2e79e
movb $0x0, (%rbx,%r15)
addq %rbx, %rdi
callq 0x9470
movsd 0xc48b3(%rip), %xmm1    # 0xf3008
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
jmp 0x2e783
movb $0x0, (%rbx,%r15)
addq %rbx, %rdi
callq 0x9470
mulsd 0xc4894(%rip), %xmm0    # 0xf3008
jmp 0x2e783
movb $0x0, (%rbx,%r15)
addq %rbx, %rdi
callq 0x9470
andpd 0xc4a05(%rip), %xmm0    # 0xf3190
movsd -0x28(%rbp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
leal 0x1(%r15), %r12d
jmp 0x2e7a3
movsd -0x28(%rbp), %xmm0
incq %r15
jmp 0x2e6ff
divsd 0xc485d(%rip), %xmm0    # 0xf3010
mulsd -0x40(%rbp), %xmm0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: iono_height()
double iono_height()
{
int ndx;

   if(pri_month < 1) return 300.0;
   if(pri_month > 12) return 300.0;

   ndx = pri_month;
   if(lat < 0.0) {
      ndx = ndx + 6;
      if(ndx > 12) ndx = ndx - 12;
   }

   return iono[ndx];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2c872b(%rip), %rax    # 0x2f7510
movl (%rax), %eax
leal -0xd(%rax), %ecx
cmpl $-0xc, %ecx
jae 0x2edf9
movsd 0xc6ba9(%rip), %xmm0    # 0xf59a0
jmp 0x2ee2b
leaq 0x2c81d0(%rip), %rcx    # 0x2f6fd0
cmpl $0x7, %eax
movl $0xfffffffa, %edx       # imm = 0xFFFFFFFA
movl $0x6, %esi
cmovael %edx, %esi
xorl %edx, %edx
xorpd %xmm0, %xmm0
ucomisd (%rcx), %xmm0
cmoval %esi, %edx
addl %eax, %edx
leaq 0x1254da(%rip), %rax    # 0x154300
movsd (%rax,%rdx,8), %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: edit_lla_ref_cmd()
void edit_lla_ref_cmd()
{
int err;
double old_lat, old_lon, old_alt;

   old_lat = precise_lat;
   old_lon = precise_lon;
   old_alt = precise_alt;

   precise_lat = ref_lat;
   precise_lon = ref_lon;
   precise_alt = ref_alt;

   err = parse_lla(&edit_buffer[0]);
   if     (err == BAD_LAT)     edit_error("Bad latitude value");
   else if(err == BAD_LON)     edit_error("Bad longitude value");
   else if(err == BAD_ALT)     edit_error("Bad altitude value");
   else if(err == LLA_MISSING) edit_error("Must enter three lat lon alt values (separated by spaces)");
   else if(err == NO_AVERAGE)  edit_error("No LLA data available to average");
   else if(err) ;
   else { // save current position with high accuracy
      ref_lat = precise_lat;
      ref_lon = precise_lon;
      ref_alt = precise_alt;
      user_set_ref_lla = 1;

      rebuild_lla_plot(0);
      need_redraw = 3201;
   }

   precise_lat = old_lat;
   precise_lon = old_lon;
   precise_alt = old_alt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x2f5fa0(%rip), %rax    # 0x3252f0
movsd (%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
leaq 0x2f5f98(%rip), %r14    # 0x3252f8
movsd (%r14), %xmm0
movsd %xmm0, -0x38(%rbp)
leaq 0x2f5f8f(%rip), %r15    # 0x325300
movsd (%r15), %xmm0
movsd %xmm0, -0x30(%rbp)
leaq 0x2f5f8e(%rip), %r12    # 0x325310
movsd (%r12), %xmm0
movsd %xmm0, (%rax)
leaq 0x2f5f85(%rip), %r13    # 0x325318
movsd (%r13), %xmm0
movsd %xmm0, (%r14)
leaq 0x2f5f7b(%rip), %rbx    # 0x325320
movsd (%rbx), %xmm0
movsd %xmm0, (%r15)
leaq 0x2f9f2b(%rip), %rdi    # 0x3292e0
callq 0x2e9e6
cmpl $0x5, %eax
ja 0x2f44d
movl %eax, %eax
leaq 0xc6ca8(%rip), %rcx     # 0xf6074
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2f5f14(%rip), %rax    # 0x3252f0
movsd (%rax), %xmm0
movsd %xmm0, (%r12)
movsd (%r14), %xmm0
movsd %xmm0, (%r13)
movsd (%r15), %xmm0
movsd %xmm0, (%rbx)
leaq 0x2f5f3f(%rip), %rax    # 0x325340
movl $0x1, (%rax)
xorl %edi, %edi
callq 0xe6975
leaq 0x1d342f(%rip), %rax    # 0x202844
movl $0xc81, (%rax)          # imm = 0xC81
jmp 0x2f44d
leaq 0xcfd7c(%rip), %rdi     # 0xff1a0
jmp 0x2f448
leaq 0xcfd4c(%rip), %rdi     # 0xff179
jmp 0x2f448
leaq 0xcfd57(%rip), %rdi     # 0xff18d
jmp 0x2f448
leaq 0xcfd27(%rip), %rdi     # 0xff166
jmp 0x2f448
leaq 0xcfd92(%rip), %rdi     # 0xff1da
callq 0x214df
leaq 0x2f5e9c(%rip), %rax    # 0x3252f0
movsd -0x40(%rbp), %xmm0
movsd %xmm0, (%rax)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, (%r14)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%r15)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: edit_lla_cmd(int)
void edit_lla_cmd(int type)
{
int err;

   err = parse_lla(&edit_buffer[0]);
   if     (err == BAD_LAT)     edit_error("Bad latitude value");
   else if(err == BAD_LON)     edit_error("Bad longitude value");
   else if(err == BAD_ALT)     edit_error("Bad altitude value");
   else if(err == LLA_MISSING) edit_error("Must enter three lat lon alt values (separated by spaces)");
   else if(err == NO_AVERAGE)  edit_error("No LLA data available to average");
   else if(err) return;
   else { // save current position with high accuracy
      // !!!!! should we set ref_lat/lon/alt? gggggggg
      if(luxor) {
         set_lla(precise_lat, precise_lon, precise_alt);
      }
      else {
         #ifdef PRECISE_STUFF
            stop_precision_survey(10); // stop any precision survey
            stop_self_survey(10);      // stop any self survey
            save_precise_posn(type);   // do single point surveys until we get close enough
         #else
            set_lla(precise_lat, precise_lon, precise_alt);
         #endif
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x2f9e50(%rip), %rdi    # 0x3292e0
callq 0x2e9e6
cmpl $0x5, %eax
ja 0x2f516
movl %eax, %eax
leaq 0xc6be9(%rip), %rcx     # 0xf608c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1f9a8b(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x2f51b
leaq 0x2f5e31(%rip), %rax    # 0x3252f0
movsd (%rax), %xmm0
leaq 0x2f5e2e(%rip), %rax    # 0x3252f8
movsd (%rax), %xmm1
leaq 0x2f5e2b(%rip), %rax    # 0x325300
movsd (%rax), %xmm2
popq %rbx
popq %r14
popq %rbp
jmp 0x5ec70
leaq 0xcfcb7(%rip), %rdi     # 0xff1a0
jmp 0x2f50d
leaq 0xcfc87(%rip), %rdi     # 0xff179
jmp 0x2f50d
leaq 0xcfc92(%rip), %rdi     # 0xff18d
jmp 0x2f50d
leaq 0xcfc62(%rip), %rdi     # 0xff166
jmp 0x2f50d
leaq 0xcfccd(%rip), %rdi     # 0xff1da
popq %rbx
popq %r14
popq %rbp
jmp 0x214df
popq %rbx
popq %r14
popq %rbp
retq
pushq $0xa
popq %r14
movl %r14d, %edi
callq 0xe5811
movl %r14d, %edi
callq 0x67da0
movl %ebx, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0xe5b0e
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2c856e(%rip), %r14    # 0x2f7e6d
movb $0x0, (%r14)
leaq 0x2c8562(%rip), %rax    # 0x2f7e6c
movb $0x1, (%rax)
leaq 0x2f99cc(%rip), %r15    # 0x3292e0
leaq -0x130(%rbp), %rbx
movb (%r15), %al
testb %al, %al
je 0x2f9b8
cmpb $0x9, %al
je 0x2f932
movzbl %al, %eax
cmpl $0x20, %eax
jne 0x2f93b
movb 0x1(%r15), %al
incq %r15
jmp 0x2f926
testl %eax, %eax
je 0x2f9b8
movb $0x0, -0x130(%rbp)
xorl %r12d, %r12d
movzbl (%r15,%r12), %eax
testb $-0x21, %al
je 0x2f975
cmpq $0xff, %r12
ja 0x2f975
cmpb $0x9, %al
je 0x2f975
movb %al, -0x130(%rbp,%r12)
movb $0x0, -0x12f(%rbp,%r12)
incq %r12
jmp 0x2f949
movq %rbx, %rdi
callq 0x2f9d5
testl %eax, %eax
jne 0x2f991
addq %r12, %r15
cmpb $0x0, (%r14)
je 0x2f91b
callq 0xd5b6
jmp 0x2f91b
leaq 0x2f6888(%rip), %rbx    # 0x326220
leaq 0xcf907(%rip), %rsi     # 0xff2a6
leaq -0x130(%rbp), %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
callq 0x214df
leaq 0x1d2e85(%rip), %rax    # 0x202844
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_O2/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 0x2f9ec
cmpl $0x24, %eax
jne 0x2f9fb
movq %rbx, %rdi
callq 0x435af
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 0x2fa39
leaq 0x2c8452(%rip), %rax    # 0x2f7e6c
cmpb $0x0, (%rax)
je 0x2fa2c
pushq $0xa
popq %rdi
movl $0xbc9, %esi            # imm = 0xBC9
callq 0xaeb6
pushq $0xa
popq %rdi
movq %r14, %rsi
callq 0x493cd
jmp 0x2f9f4
addl $-0x61, %eax
movq %rbx, %rdi
cmpl $0xe, %eax
ja 0x2fa4d
popq %rbx
popq %r14
popq %rbp
jmp 0x49950
popq %rbx
popq %r14
popq %rbp
jmp 0x4d4d0
// File: /workspace/github_cpp_makefile_star2_O2/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
leaq 0x1d2e6f(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x1, %rax
je 0x2fa7e
cmpq $0x1000000, %rax        # imm = 0x1000000
je 0x2fa7e
cmpq $0x40000, %rax          # imm = 0x40000
jne 0x2fb06
leaq 0x2c8633(%rip), %rcx    # 0x2f80b8
cmpb $0x0, (%rcx)
je 0x2fab9
leaq 0xcf85c(%rip), %rcx     # 0xff2ed
leaq 0x2f9b80(%rip), %rdx    # 0x329618
movq %rcx, (%rdx)
leaq 0xcf850(%rip), %rdx     # 0xff2f2
leaq 0x2f9b77(%rip), %rcx    # 0x329620
movq %rdx, (%rcx)
movq %rdx, %rcx
cmpq $0x40000, %rax          # imm = 0x40000
je 0x2faea
jmp 0x2faf8
leaq 0xcf837(%rip), %rcx     # 0xff2f7
leaq 0x2f9b51(%rip), %rdx    # 0x329618
movq %rcx, (%rdx)
leaq 0xd0da0(%rip), %rcx     # 0x100871
leaq 0x2f9b48(%rip), %rdx    # 0x329620
movq %rcx, (%rdx)
cmpq $0x40000, %rax          # imm = 0x40000
jne 0x2faf8
leaq 0xd0d88(%rip), %rdx     # 0x100872
leaq 0x11823f(%rip), %rax    # 0x147d30
movq %rdx, 0x918(%rax)
leaq 0x118231(%rip), %rax    # 0x147d30
movq %rcx, 0xf0(%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x302f7
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
cmpl $0xe, %edi
je 0x30256
leaq 0x2f9b10(%rip), %rax    # 0x329d64
movl %ebx, (%rax)
leaq 0x2f9afb(%rip), %r15    # 0x329d58
movl %ebx, (%r15)
movl %ebx, %eax
imulq $0xe8, %rax, %rax
leaq 0x117ac0(%rip), %r14    # 0x147d30
movzbl 0x18(%r14,%rax), %edi
callq 0x31279
movzbl %al, %ecx
movslq (%r15), %rax
imulq $0xe8, %rax, %rdx
movl %ecx, 0x18(%r14,%rdx)
movl $0x1, 0xe0(%r14,%rdx)
cmpq $0xe, %rax
jne 0x302ba
cmpl $0x0, 0xcc8(%r14)
je 0x302ae
pushq $0xe
popq %rax
jmp 0x302ba
leaq 0x2f9aaf(%rip), %rax    # 0x329d64
movl (%rax), %eax
movl %eax, (%r15)
leaq 0x1d260f(%rip), %rcx    # 0x2028d0
testl $0x101b1b00, 0x1(%rcx)  # imm = 0x101B1B00
je 0x302f8
callq 0x13524
cmpl $0xd, %ebx
jne 0x302ed
leaq 0x1f8c63(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x302ed
leaq 0x1d255d(%rip), %rax    # 0x202844
movl $0x515, (%rax)          # imm = 0x515
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2f4fc5(%rip), %rcx    # 0x3252c4
cmpb $0x0, (%rcx)
jne 0x302ca
cmpl $0x6, %eax
jne 0x302ca
leaq 0x1f8c2e(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x302ca
movsd 0x248(%r14), %xmm0
xorpd %xmm3, %xmm3
ucomisd %xmm3, %xmm0
jne 0x3032a
jnp 0x30395
leaq 0x2c6c5f(%rip), %r15    # 0x2f6f90
movsd (%r15), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x30342
jnp 0x30395
movsd 0x330(%r14), %xmm0
divsd %xmm1, %xmm0
ucomisd %xmm2, %xmm0
jb 0x3035b
sqrtsd %xmm0, %xmm3
jmp 0x30364
callq 0x9260
movapd %xmm0, %xmm3
movsd 0x248(%r14), %xmm0
divsd (%r15), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x30382
sqrtsd %xmm0, %xmm0
jmp 0x30391
movsd %xmm3, -0x20(%rbp)
callq 0x9260
movsd -0x20(%rbp), %xmm3
divsd %xmm0, %xmm3
leaq 0x2f9374(%rip), %rax    # 0x329710
movsd %xmm3, (%rax)
leaq 0x2f8f25(%rip), %r14    # 0x3292cc
cmpl $0x2, (%r14)
je 0x302ca
leaq 0x2f8498(%rip), %rdi    # 0x328850
leaq 0xcef3d(%rip), %rsi     # 0xff2fc
movapd %xmm3, %xmm0
movb $0x1, %al
callq 0x9060
movl $0x3, (%r14)
jmp 0x302ca
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2f8c73(%rip), %rax    # 0x3292e0
cmpb $0x0, (%rax)
je 0x306d9
leaq 0x2f8c67(%rip), %rbx    # 0x3292e0
pushq $0x2e
popq %rsi
movq %rbx, %rdi
callq 0x9100
testq %rax, %rax
jne 0x3069d
movq %rbx, %rdi
callq 0x9120
movl $0x7461642e, (%rbx,%rax) # imm = 0x7461642E
movb $0x0, 0x4(%rbx,%rax)
leaq 0x2f8c3c(%rip), %rdi    # 0x3292e0
leaq 0xdac58(%rip), %rsi     # 0x10b303
callq 0x9a22
testq %rax, %rax
jne 0x306f1
leaq 0x2f5b64(%rip), %rbx    # 0x326220
leaq 0xcec8b(%rip), %rsi     # 0xff34e
leaq 0x2f8c16(%rip), %rdx    # 0x3292e0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
jmp 0x30757
leaq 0xceec5(%rip), %rdi     # 0xff5a5
leaq 0xdac1c(%rip), %rsi     # 0x10b303
callq 0x9a22
testq %rax, %rax
je 0x3072d
movq %rax, %rbx
xorl %edi, %edi
movq %rax, %rsi
callq 0xe851c
pushq $0x1
popq %rdi
movq %rbx, %rsi
callq 0xe851c
pushq $0x2
popq %rdi
movq %rbx, %rsi
callq 0xe851c
pushq $0x3
popq %rdi
movq %rbx, %rsi
callq 0xe851c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9360
movups 0xcee64(%rip), %xmm0    # 0xff598
leaq 0x2f5ae5(%rip), %rdi    # 0x326220
movaps %xmm0, 0x10(%rdi)
movups 0xcee42(%rip), %xmm0    # 0xff588
movaps %xmm0, (%rdi)
movabsq $0x7461642e656974, %rax # imm = 0x7461642E656974
movq %rax, 0x1e(%rdi)
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x214df
// File: /workspace/github_cpp_makefile_star2_O2/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 0x30d2a
movq %rdi, %rax
decq %rax
leaq 0x2f85d1(%rip), %rcx    # 0x3292e0
leaq 0x1(%rax), %rdi
cmpq %rcx, %rdi
jbe 0x30d32
movzbl (%rax), %edx
cmpl $0x20, %edx
je 0x30d25
cmpl $0x9, %edx
jne 0x30d2f
decq %rax
jmp 0x30d0f
xorps %xmm0, %xmm0
popq %rbp
retq
movq %rax, %rdi
cmpq 0x1091cf(%rip), %rdi    # 0x139f08
jbe 0x30d57
decq %rdi
movq %rdi, %rax
movq %rax, %rdi
movb (%rax), %al
cmpb $0x20, %al
je 0x30d57
cmpb $0x9, %al
je 0x30d57
leaq -0x1(%rdi), %rax
cmpq %rcx, %rdi
ja 0x30d41
popq %rbp
jmp 0x9470
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2f856d(%rip), %rax    # 0x3292e0
cmpb $0x0, (%rax)
je 0x30ea1
movl %edi, %ebx
leaq 0x2f855b(%rip), %r14    # 0x3292e0
movq %r14, %rdi
callq 0x988f
pushq $0x56
popq %rsi
movq %r14, %rdi
callq 0x9100
testq %rax, %rax
je 0x30dd9
movq %rax, %rdi
callq 0x30cf9
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x30db9
ucomisd 0xc22b9(%rip), %xmm0    # 0xf3070
jbe 0x30de1
testl %ebx, %ebx
je 0x30ea1
leaq 0xce930(%rip), %rdi     # 0xff6f8
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x214df
movsd 0xc4c0f(%rip), %xmm0    # 0xf59f0
movsd %xmm0, -0x28(%rbp)
leaq 0x2f84f3(%rip), %r12    # 0x3292e0
pushq $0x4d
popq %rsi
movq %r12, %rdi
callq 0x9100
movq %rax, %r14
pushq $0x46
popq %rsi
movq %r12, %rdi
callq 0x9100
movq %rax, %r15
pushq $0x27
popq %rsi
movq %r12, %rdi
callq 0x9100
testq %r14, %r14
je 0x30e2b
movq %r14, %rdi
callq 0x30cf9
mulsd 0xc4af7(%rip), %xmm0    # 0xf5920
jmp 0x30e42
testq %r15, %r15
je 0x30e35
movq %r15, %rdi
jmp 0x30e3d
testq %rax, %rax
je 0x30eae
movq %rax, %rdi
callq 0x30cf9
divsd 0xc4bae(%rip), %xmm0    # 0xf59f8
divsd -0x28(%rbp), %xmm0
leaq 0x2c6f6a(%rip), %rax    # 0x2f7dc0
movsd %xmm0, (%rax)
testl %ebx, %ebx
je 0x30ea1
leaq 0x2c6ebc(%rip), %rax    # 0x2f7d21
movzbl (%rax), %edi
leaq 0x2c6ea9(%rip), %rax    # 0x2f7d18
movzbl (%rax), %esi
leaq 0x2c6f5f(%rip), %rax    # 0x2f7dd8
movsd (%rax), %xmm1
leaq 0x2c6e98(%rip), %rax    # 0x2f7d1c
movss (%rax), %xmm2
pushq $0x1
popq %rdx
callq 0x61e97
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x61bf1
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2f842b(%rip), %rdi    # 0x3292e0
callq 0x9470
divsd 0xc2166(%rip), %xmm0    # 0xf3028
jmp 0x30e4f
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2f8771(%rip), %rax    # 0x329640
cmpb $0x0, (%rax)
je 0x30ed6
popq %rbp
retq
leaq 0x2f7ac3(%rip), %rax    # 0x3289a0
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x2f7c08(%rip), %rax    # 0x328af0
movb %cl, (%rax)
popq %rbp
jmp 0xf426
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1f7c2f(%rip), %rax    # 0x228eb8
cmpq $0x0, (%rax)
je 0x312d5
leaq 0x1f7c3a(%rip), %rax    # 0x228ed0
cmpb $0x0, (%rax)
jne 0x312d5
movb $0x1, %r14b
callq 0x1c0f9
leal -0x30(%rax), %ecx
cmpl $0x3e, %ecx
ja 0x312d0
movabsq $0x4000000040000001, %rdx # imm = 0x4000000040000001
btq %rcx, %rdx
jae 0x312c0
xorl %r14d, %r14d
jmp 0x312dd
movabsq $0x20000000002, %rdx    # imm = 0x20000000002
btq %rcx, %rdx
jb 0x312dd
cmpl $0x79, %eax
je 0x312dd
notb %bl
andb $0x1, %bl
movl %ebx, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2f83a8(%rip), %rax    # 0x329698
cmpb $0x0, (%rax)
je 0x312f7
popq %rbp
retq
leaq 0x2f76a2(%rip), %rax    # 0x3289a0
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x2f77e7(%rip), %rax    # 0x328af0
movb %cl, (%rax)
popq %rbp
jmp 0xf426
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2c68e4(%rip), %rax    # 0x2f7e6d
movb $0x1, (%rax)
leaq 0x1d124d(%rip), %rax    # 0x2027e0
movl (%rax), %ecx
xorl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x1d1283(%rip), %rax    # 0x202824
movl %ecx, (%rax)
leaq 0x1d123e(%rip), %rax    # 0x2027e8
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2591f
leaq 0x1d39d0(%rip), %rax    # 0x205158
movb $0x0, (%rax)
leaq 0x1f77ae(%rip), %rax    # 0x228f40
movl $0x1, (%rax)
callq 0x315b2
movl $0x238c, %edi           # imm = 0x238C
callq 0xbc0b
leaq 0x1d10ce(%rip), %rax    # 0x20287c
movl (%rax), %eax
leaq 0x1d10d1(%rip), %rcx    # 0x202888
leaq 0x1d10b2(%rip), %rdx    # 0x202870
movl (%rcx), %ecx
addl %eax, %ecx
subl (%rdx), %ecx
leaq 0x1d10d9(%rip), %rdx    # 0x2028a4
movl %ecx, (%rdx)
leaq 0x1d10c0(%rip), %rcx    # 0x202894
addl (%rcx), %eax
movl $0xc0, %ecx
leaq 0x11654e(%rip), %rdx    # 0x147d30
cmpq $0x12e0, %rcx           # imm = 0x12E0
je 0x317f7
movl %eax, (%rdx,%rcx)
addq $0xe8, %rcx
jmp 0x317e2
popq %rbp
jmp 0xf426
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2f76f2(%rip), %rdi    # 0x3292e0
pushq $0x75
popq %rsi
callq 0x9100
testq %rax, %rax
jne 0x31c3b
leaq 0x2f76de(%rip), %rdi    # 0x3292e0
pushq $0x55
popq %rsi
callq 0x9100
testq %rax, %rax
jne 0x31c3b
leaq 0x1d361e(%rip), %rax    # 0x205234
movb $0x0, (%rax)
leaq 0x129040(%rip), %rax    # 0x15ac60
andl $0x0, (%rax)
pushq $0x7
popq %rdi
pushq $0xb
popq %rsi
callq 0x10a99
leaq 0x2c52a3(%rip), %rax    # 0x2f6ed8
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2c4fbe(%rip), %rax    # 0x2f6ea0
movsd (%rax), %xmm1
xorpd %xmm2, %xmm2
leaq 0x2c4f97(%rip), %rax    # 0x2f6e88
ucomisd %xmm2, %xmm1
jne 0x31ef9
jnp 0x31f23
movb %dil, (%rax)
leaq 0x2c4f8d(%rip), %rax    # 0x2f6e90
movsd %xmm0, (%rax)
leaq 0x2c4f7b(%rip), %rax    # 0x2f6e89
movb $0x0, (%rax)
leaq 0x2c4f90(%rip), %rax    # 0x2f6ea8
andq $0x0, (%rax)
callq 0x31be3
jmp 0x31f50
leaq 0x2c4f66(%rip), %rcx    # 0x2f6e90
andq $0x0, (%rcx)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x2c4f50(%rip), %rax    # 0x2f6e89
movb %cl, (%rax)
leaq 0x2c4f86(%rip), %rax    # 0x2f6ec8
andq $0x0, (%rax)
leaq 0x2c4f8b(%rip), %rax    # 0x2f6ed8
andl $0x0, (%rax)
leaq 0x2c4f51(%rip), %rax    # 0x2f6ea8
andq $0x0, (%rax)
xorl %edi, %edi
popq %rbp
jmp 0x71025