LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: jkingan[P]ladyheather/heathui.cpp
// Function: rpn_space(char*, unsigned int, char*)
void rpn_space(char *s, unsigned max_len, char *fmt)
{
unsigned j;
int i;

   // space over the formatted stack value so columns align

   if(s == 0) return;
   if(fmt == 0) return;

   j = strlen(fmt);
   i = 0;
   s[i] = 0;
   while(j < max_len) {
      s[i++] = ' ';
      s[i] = 0;
      ++j;
      if(i > 60) break;
   }
   strcat(s, fmt);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x32bdc
jmp 0x32c4e
cmpq $0x0, -0x18(%rbp)
jne 0x32be5
jmp 0x32c4e
movq -0x18(%rbp), %rdi
callq 0x9120
movl %eax, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movslq -0x20(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x32c41
movq -0x8(%rbp), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x20(%rbp)
movslq %ecx, %rcx
movb $0x20, (%rax,%rcx)
movq -0x8(%rbp), %rax
movslq -0x20(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x3c, -0x20(%rbp)
jle 0x32c3f
jmp 0x32c41
jmp 0x32c04
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x96a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathui.cpp
// Function: valid_hex(char*)
int valid_hex(char *s)
{
unsigned j;
char c;

   // returns true if s is a valid hex number

   if(s == 0) return 0;
   if(strlen(s) < 1) return 0;

   for(j=0; j<strlen(s); j++) {
      c = s[j];
      if((c >= '0') && (c <= '9')) continue;
      else if((c >= 'a') && (c <= 'f')) continue;
      return 0;
   }
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x3321f
movl $0x0, -0x4(%rbp)
jmp 0x332ac
movq -0x10(%rbp), %rdi
callq 0x9120
cmpq $0x1, %rax
jae 0x33237
movl $0x0, -0x4(%rbp)
jmp 0x332ac
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9120
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jae 0x332a5
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x15(%rbp)
movsbl -0x15(%rbp), %eax
cmpl $0x30, %eax
jl 0x3327b
movsbl -0x15(%rbp), %eax
cmpl $0x39, %eax
jg 0x3327b
jmp 0x3329a
movsbl -0x15(%rbp), %eax
cmpl $0x61, %eax
jl 0x3328f
movsbl -0x15(%rbp), %eax
cmpl $0x66, %eax
jg 0x3328f
jmp 0x3329a
jmp 0x33291
movl $0x0, -0x4(%rbp)
jmp 0x332ac
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3323e
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathui.cpp
// Function: valid_octal(char*)
int valid_octal(char *s)
{
unsigned j;
char c;

   // returns true if s is a valid octal number

   if(s == 0) return 0;
   if(strlen(s) < 1) return 0;

   for(j=0; j<strlen(s); j++) {
      c = s[j];
      if((c >= '0') && (c <= '7')) continue;
      return 0;
   }
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x332dc
movl $0x0, -0x4(%rbp)
jmp 0x33353
movq -0x10(%rbp), %rdi
callq 0x9120
cmpq $0x1, %rax
jae 0x332f4
movl $0x0, -0x4(%rbp)
jmp 0x33353
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9120
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jae 0x3334c
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x15(%rbp)
movsbl -0x15(%rbp), %eax
cmpl $0x30, %eax
jl 0x33338
movsbl -0x15(%rbp), %eax
cmpl $0x37, %eax
jg 0x33338
jmp 0x33341
movl $0x0, -0x4(%rbp)
jmp 0x33353
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x332fb
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathui.cpp
// Function: valid_binary(char*)
int valid_binary(char *s)
{
unsigned j;
char c;

   // returns true if s is a valid binary number

   if(s == 0) return 0;
   if(strlen(s) < 1) return 0;

   for(j=0; j<strlen(s); j++) {
      c = s[j];
      if((c == '0') || (c == '1')) continue;
      return 0;
   }
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x3337c
movl $0x0, -0x4(%rbp)
jmp 0x333f3
movq -0x10(%rbp), %rdi
callq 0x9120
cmpq $0x1, %rax
jae 0x33394
movl $0x0, -0x4(%rbp)
jmp 0x333f3
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9120
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jae 0x333ec
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x15(%rbp)
movsbl -0x15(%rbp), %eax
cmpl $0x30, %eax
je 0x333d6
movsbl -0x15(%rbp), %eax
cmpl $0x31, %eax
jne 0x333d8
jmp 0x333e1
movl $0x0, -0x4(%rbp)
jmp 0x333f3
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3339b
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathui.cpp
// Function: valid_num(char*)
int valid_num(char *s)
{
unsigned j;
char c;
int saw_sign;
int saw_exp;
int saw_e;
int saw_dp;
int saw_digit;

   // returns true if s is a valid decimal number

   if(s == 0) return 0;
   saw_sign = 0;
   saw_dp = 0;
   saw_exp = 0;
   saw_e = 0;
   saw_digit = 0;

   for(j=0; j<strlen(s); j++) {
      c = s[j];
      if(c == '.') {
         if(saw_dp) return 0;
         if(saw_e) return 0;
         saw_dp = 1;
      }
      else if(c == 'e') {
         if(saw_e) return 0;
         saw_e = 1;
         saw_sign = 0;
         saw_digit = 0;
      }
      else if((c == '+') || (c == '-')) {
         if(saw_sign) return 0;
         if(saw_exp) return 0;
         if(saw_digit) return 0;
         saw_sign = 1;
      }
      else if((c >= '0') && (c <= '9')) {
         if(saw_e) saw_exp = c;
         saw_digit = 1;
         continue;
      }
      else return 0;
   }

   if(saw_e && (saw_exp == 0)) return 0;
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x3341f
movl $0x0, -0x4(%rbp)
jmp 0x3358d
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9120
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jae 0x33571
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x15(%rbp)
movsbl -0x15(%rbp), %eax
cmpl $0x2e, %eax
jne 0x334af
cmpl $0x0, -0x28(%rbp)
je 0x33491
movl $0x0, -0x4(%rbp)
jmp 0x3358d
cmpl $0x0, -0x24(%rbp)
je 0x334a3
movl $0x0, -0x4(%rbp)
jmp 0x3358d
movl $0x1, -0x28(%rbp)
jmp 0x33561
movsbl -0x15(%rbp), %eax
cmpl $0x65, %eax
jne 0x334e1
cmpl $0x0, -0x24(%rbp)
je 0x334ca
movl $0x0, -0x4(%rbp)
jmp 0x3358d
movl $0x1, -0x24(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x2c(%rbp)
jmp 0x3355f
movsbl -0x15(%rbp), %eax
cmpl $0x2b, %eax
je 0x334f3
movsbl -0x15(%rbp), %eax
cmpl $0x2d, %eax
jne 0x3352c
cmpl $0x0, -0x1c(%rbp)
je 0x33505
movl $0x0, -0x4(%rbp)
jmp 0x3358d
cmpl $0x0, -0x20(%rbp)
je 0x33514
movl $0x0, -0x4(%rbp)
jmp 0x3358d
cmpl $0x0, -0x2c(%rbp)
je 0x33523
movl $0x0, -0x4(%rbp)
jmp 0x3358d
movl $0x1, -0x1c(%rbp)
jmp 0x3355d
movsbl -0x15(%rbp), %eax
cmpl $0x30, %eax
jl 0x33554
movsbl -0x15(%rbp), %eax
cmpl $0x39, %eax
jg 0x33554
cmpl $0x0, -0x24(%rbp)
je 0x3354b
movsbl -0x15(%rbp), %eax
movl %eax, -0x20(%rbp)
movl $0x1, -0x2c(%rbp)
jmp 0x33563
movl $0x0, -0x4(%rbp)
jmp 0x3358d
jmp 0x3355f
jmp 0x33561
jmp 0x33563
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x33449
cmpl $0x0, -0x24(%rbp)
je 0x33586
cmpl $0x0, -0x20(%rbp)
jne 0x33586
movl $0x0, -0x4(%rbp)
jmp 0x3358d
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathui.cpp
// Function: force_rcvr_baud(int)
void force_rcvr_baud(int baud)
{
int i;

   // attempt to force the receiver baud rate regardless of its current setting
   // !!!! this code currently only configures for 8,N,1 serial port params

   i = 0;
   while(baud_list[i]) {
      sprintf(out, "%d,8,N,1", baud_list[i]);  // set com port rate
      set_serial_params(RCVR_PORT, out, 1);

      sprintf(out, "%d,8,N,1", baud);          // attempt to change receiver baud rate
      set_serial_params(RCVR_PORT, out, 2);    // this will only be accepted if current receiver baud rate is correct
      ++i;
   }

   // at this point the receiver should be configured for the desired baud rate
   sprintf(out, "%d,8,N,1", baud);  // set com port rate
   set_serial_params(RCVR_PORT, out, 1);

   sprintf(out, "%d,8,N,1", baud); // attempt to change baud rate
   set_serial_params(RCVR_PORT, out, 2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0x192c53(%rip), %rax    # 0x1c9060
cmpl $0x0, (%rax,%rcx,4)
je 0x36488
movslq -0x8(%rbp), %rcx
leaq 0x192c42(%rip), %rax    # 0x1c9060
movl (%rax,%rcx,4), %edx
leaq 0x364fd8(%rip), %rdi    # 0x39b400
leaq 0x13c016(%rip), %rsi    # 0x172445
movb $0x0, %al
callq 0x9060
movl $0xa, %edi
leaq 0x364fbe(%rip), %rsi    # 0x39b400
movl $0x1, %edx
callq 0x35ca0
movl -0x4(%rbp), %edx
leaq 0x364faa(%rip), %rdi    # 0x39b400
leaq 0x13bfe8(%rip), %rsi    # 0x172445
movb $0x0, %al
callq 0x9060
movl $0xa, %edi
leaq 0x364f90(%rip), %rsi    # 0x39b400
movl $0x2, %edx
callq 0x35ca0
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x36402
movl -0x4(%rbp), %edx
leaq 0x364f6e(%rip), %rdi    # 0x39b400
leaq 0x13bfac(%rip), %rsi    # 0x172445
movb $0x0, %al
callq 0x9060
movl $0xa, %edi
leaq 0x364f54(%rip), %rsi    # 0x39b400
movl $0x1, %edx
callq 0x35ca0
movl -0x4(%rbp), %edx
leaq 0x364f40(%rip), %rdi    # 0x39b400
leaq 0x13bf7e(%rip), %rsi    # 0x172445
movb $0x0, %al
callq 0x9060
movl $0xa, %edi
leaq 0x364f26(%rip), %rsi    # 0x39b400
movl $0x2, %edx
callq 0x35ca0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jkingan[P]ladyheather/heathui.cpp
// Function: change_zoom_config(int)
void change_zoom_config(int save)
{
static int old_watch = 0;
static int old_azel = 0;
static int old_share = 0;
static int old_sigs = 0;
static int old_lla = 0;
static int saved_config = 0;
static int save_count = 0;
static int restore_count = 0;

// return;
if(zoom_screen == 'K') return;

   if(save > 0) {
      ++save_count;
//sprintf(debug_text, "plot watch config save# %d: why:%d  pw:%d", save_count, save, plot_watch);
      old_watch = plot_watch;
      old_azel = plot_azel;
      old_share = shared_plot;
      old_sigs = plot_signals;
      old_lla = plot_lla;
      saved_config = save;
   }
   else if(saved_config) {
      ++restore_count;
//sprintf(debug_text2, "plot watch config restore# %d: why:%d  saved:%d %d: pw:%d  ow:%d", restore_count, save, saved_config, plot_watch, old_watch);
      plot_watch = old_watch;
      plot_azel = old_azel;
      shared_plot = old_share;
      plot_signals = old_sigs;
      if(1 && (show_fixes == 0)) {
         plot_lla = 0; // !!!!! old_lla;
      }
else if(show_fixes) plot_lla = 1;
      else plot_lla = old_lla;
//saved_config = 0;  // (555)
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
leaq 0x3343da(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x4b, %eax
jne 0x375bb
jmp 0x376d8
cmpl $0x0, -0x4(%rbp)
jle 0x3762e
movl 0x36c36d(%rip), %eax    # 0x3a3934
addl $0x1, %eax
movl %eax, 0x36c364(%rip)    # 0x3a3934
leaq 0x243011(%rip), %rax    # 0x27a5e8
movzbl (%rax), %eax
movl %eax, 0x36c33c(%rip)    # 0x3a391c
leaq 0x24300c(%rip), %rax    # 0x27a5f3
movzbl (%rax), %eax
movl %eax, 0x36c330(%rip)    # 0x3a3920
leaq 0x362fd1(%rip), %rax    # 0x39a5c8
movzbl (%rax), %eax
movl %eax, 0x36c324(%rip)    # 0x3a3924
leaq 0x242fee(%rip), %rax    # 0x27a5f5
movzbl (%rax), %eax
movl %eax, 0x36c318(%rip)    # 0x3a3928
leaq 0x362e79(%rip), %rax    # 0x39a490
movzbl (%rax), %eax
movl %eax, 0x36c30c(%rip)    # 0x3a392c
movl -0x4(%rbp), %eax
movl %eax, 0x36c307(%rip)    # 0x3a3930
jmp 0x376d8
cmpl $0x0, 0x36c2fb(%rip)    # 0x3a3930
je 0x376d6
movl 0x36c2f7(%rip), %eax    # 0x3a3938
addl $0x1, %eax
movl %eax, 0x36c2ee(%rip)    # 0x3a3938
movl 0x36c2cc(%rip), %eax    # 0x3a391c
movb %al, %cl
leaq 0x242f8f(%rip), %rax    # 0x27a5e8
movb %cl, (%rax)
movl 0x36c2bf(%rip), %eax    # 0x3a3920
movb %al, %cl
leaq 0x242f89(%rip), %rax    # 0x27a5f3
movb %cl, (%rax)
movl 0x36c2b2(%rip), %eax    # 0x3a3924
movb %al, %cl
leaq 0x362f4d(%rip), %rax    # 0x39a5c8
movb %cl, (%rax)
movl 0x36c2a5(%rip), %eax    # 0x3a3928
movb %al, %cl
leaq 0x242f69(%rip), %rax    # 0x27a5f5
movb %cl, (%rax)
leaq 0x362e1f(%rip), %rax    # 0x39a4b4
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x376a9
leaq 0x362dec(%rip), %rax    # 0x39a490
movb $0x0, (%rax)
jmp 0x376d4
leaq 0x362e04(%rip), %rax    # 0x39a4b4
cmpb $0x0, (%rax)
je 0x376c1
leaq 0x362dd4(%rip), %rax    # 0x39a490
movb $0x1, (%rax)
jmp 0x376d2
movl 0x36c265(%rip), %eax    # 0x3a392c
movb %al, %cl
leaq 0x362dc0(%rip), %rax    # 0x39a490
movb %cl, (%rax)
jmp 0x376d4
jmp 0x376d6
jmp 0x376d8
popq %rbp
retq
nopw (%rax,%rax)
// File: jkingan[P]ladyheather/heathui.cpp
// Function: sure_exit()
int sure_exit()
{
   // normal keystroke processor exit
   if(rcvr_type == NO_RCVR) need_redraw = 1;  // erase any menu that was showing
   if(first_key) {    // we were processing a two-character command
      reset_first_key(23);  // command sequence is done
first_key = 0;
      prot_menu = 0;
      draw_plot(REFRESH_SCREEN);   // replace command sub-menu with the normal plot
   }
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x240385(%rip), %rax    # 0x277ab0
cmpq $0x400, (%rax)          # imm = 0x400
jne 0x37741
leaq 0x2402e9(%rip), %rax    # 0x277a24
movl $0x1, (%rax)
leaq 0x2669f0(%rip), %rax    # 0x29e138
cmpl $0x0, (%rax)
je 0x37778
movl $0x17, %edi
callq 0x37780
leaq 0x2669da(%rip), %rax    # 0x29e138
movl $0x0, (%rax)
leaq 0x242bcd(%rip), %rax    # 0x27a338
movb $0x0, (%rax)
movl $0x1, %edi
callq 0x24e80
xorl %eax, %eax
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathui.cpp
// Function: reset_first_key(int)
void reset_first_key(int why)
{
   if(first_key && (zoom_screen == 'K')) {
      cancel_zoom(11);
//(555)   change_zoom_config(-101);
      need_redraw = 5599;
   }

   first_key = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
leaq 0x2669a6(%rip), %rax    # 0x29e138
cmpl $0x0, (%rax)
je 0x377bd
leaq 0x3341ea(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x4b, %eax
jne 0x377bd
movl $0xb, %edi
callq 0x376e0
leaq 0x24026d(%rip), %rax    # 0x277a24
movl $0x15df, (%rax)         # imm = 0x15DF
leaq 0x266974(%rip), %rax    # 0x29e138
movl $0x0, (%rax)
addq $0x10, %rsp
popq %rbp
retq
// File: 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
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
leaq 0x266953(%rip), %rcx    # 0x29e138
cmpl (%rcx), %eax
jne 0x377fb
cmpl $0x3f, -0x4(%rbp)
je 0x377f9
movl $0x12e, %edi            # imm = 0x12E
callq 0x9ec0
jmp 0x37852
leaq 0x266896(%rip), %rax    # 0x29e098
cmpq $0x0, (%rax)
je 0x3783f
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x11d10
movl -0x4(%rbp), %edx
leaq 0x26691c(%rip), %rax    # 0x29e138
movl (%rax), %ecx
leaq 0x363bdb(%rip), %rdi    # 0x39b400
leaq 0x13b68d(%rip), %rsi    # 0x172eb9
movb $0x0, %al
callq 0x9060
leaq 0x363bc6(%rip), %rdi    # 0x39b400
callq 0x30d60
leaq 0x240172(%rip), %rax    # 0x2779b8
cmpl $0x0, (%rax)
je 0x37850
callq 0x12ae0
jmp 0x37852
movl $0x14, %edi
callq 0x37780
leaq 0x2401ae(%rip), %rax    # 0x277a11
movzbl (%rax), %eax
cmpl $0x74, %eax
jne 0x37881
leaq 0x2401c9(%rip), %rax    # 0x277a3b
movb $0x0, (%rax)
leaq 0x2401be(%rip), %rax    # 0x277a3a
movb $0x0, (%rax)
jmp 0x378b5
leaq 0x240130(%rip), %rax    # 0x2779b8
cmpl $0x2, (%rax)
jne 0x378b3
leaq 0x240124(%rip), %rax    # 0x2779b8
movl $0x0, (%rax)
leaq 0x24019a(%rip), %rax    # 0x277a3b
movb $0x0, (%rax)
leaq 0x24018f(%rip), %rax    # 0x277a3a
movb $0x0, (%rax)
callq 0x12ae0
jmp 0x378b5
leaq 0x2400fc(%rip), %rax    # 0x2779b8
cmpl $0x0, (%rax)
je 0x378c8
callq 0x12ae0
jmp 0x378d7
callq 0x117a0
movl $0x1, %edi
callq 0x24e80
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x10, %rsp
callq 0x83ad0
cmpl $0x0, %eax
je 0x3790f
leaq 0x2401b7(%rip), %rax    # 0x277ab0
cmpq $0x800000, (%rax)       # imm = 0x800000
je 0x3790f
leaq 0x13b5df(%rip), %rax    # 0x172ee8
movq %rax, -0x8(%rbp)
jmp 0x37965
leaq 0x33405e(%rip), %rax    # 0x36b974
cmpl $0x0, (%rax)
je 0x3795a
leaq 0x334c02(%rip), %rax    # 0x36c524
cmpl $0x0, (%rax)
je 0x37934
leaq 0x13b5fb(%rip), %rax    # 0x172f29
movq %rax, -0x8(%rbp)
jmp 0x37965
leaq 0x334bed(%rip), %rax    # 0x36c528
cmpl $0x0, (%rax)
je 0x3794d
leaq 0x13b622(%rip), %rax    # 0x172f69
movq %rax, -0x8(%rbp)
jmp 0x37965
leaq 0x13b655(%rip), %rax    # 0x172fa9
movq %rax, -0x8(%rbp)
jmp 0x37965
leaq 0x13b688(%rip), %rax    # 0x172fe9
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: 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
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
leaq 0x237ee6(%rip), %rax    # 0x27a518
cvtsi2sdq (%rax), %xmm0
movsd %xmm0, -0x10(%rbp)
leaq 0x237f3d(%rip), %rax    # 0x27a580
movq $0x0, (%rax)
movsd -0x10(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x4268b
leaq 0x235405(%rip), %rax    # 0x277a64
cvtsi2sdl (%rax), %xmm1
movsd -0x10(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
leaq 0x237f08(%rip), %rax    # 0x27a580
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x237efa(%rip), %rax    # 0x27a580
movq %rcx, (%rax)
jmp 0x4264a
leaq 0x237eee(%rip), %rax    # 0x27a580
cmpq $0x1, (%rax)
jg 0x426a6
leaq 0x237ee1(%rip), %rax    # 0x27a580
movq $0x1, (%rax)
cmpl $0x0, -0x4(%rbp)
je 0x426e6
leaq 0x237ecd(%rip), %rax    # 0x27a580
movq (%rax), %rcx
leaq 0x237edb(%rip), %rax    # 0x27a598
movq %rcx, (%rax)
leaq 0x237edd(%rip), %rax    # 0x27a5a4
movb $0x1, (%rax)
leaq 0x237e13(%rip), %rax    # 0x27a4e4
movl $0x0, (%rax)
movl $0x14f, %edi            # imm = 0x14F
movl $0x1, %esi
callq 0x28c00
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x44c95
jmp 0x44cb8
leaq 0x359b4c(%rip), %rax    # 0x39e7e8
movw $0x3a, (%rax)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x42b40
leaq 0x359b35(%rip), %rax    # 0x39e7e8
movw $0x0, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x44ce0
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x44e6a
movq -0x10(%rbp), %rdi
callq 0x9850
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
jne 0x44d09
movl $0x1, -0x1c(%rbp)
leaq 0x153aaf(%rip), %rax    # 0x1987b2
movq %rax, -0x10(%rbp)
jmp 0x44d70
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x44d37
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2b, %eax
jne 0x44d37
movl $0x1, -0x1c(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x44d6e
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x44d65
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2d, %eax
jne 0x44d65
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x44d6c
movl $0x0, -0x1c(%rbp)
jmp 0x44d6e
jmp 0x44d70
movq -0x10(%rbp), %rdi
movl $0x61, %esi
callq 0x9100
cmpq $0x0, %rax
je 0x44dd1
leaq 0x177f95(%rip), %rax    # 0x1bcd20
movsd 0x5f8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x44da0
jp 0x44da0
jmp 0x44dd1
leaq 0x3276f9(%rip), %rax    # 0x36c4a0
cmpl $0x0, (%rax)
je 0x44dd1
leaq 0x177f6d(%rip), %rax    # 0x1bcd20
movsd 0x5d8(%rax), %xmm0
leaq 0x177f5e(%rip), %rax    # 0x1bcd20
divsd 0x5f8(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x44e07
movq -0x10(%rbp), %rdi
movl $0x61, %esi
callq 0x9100
cmpq $0x0, %rax
je 0x44df7
leaq 0x3273d4(%rip), %rax    # 0x36c1c0
movsd (%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x44e05
movq -0x10(%rbp), %rdi
callq 0x9480
movsd %xmm0, -0x18(%rbp)
jmp 0x44e07
cmpl $0x0, -0x1c(%rbp)
je 0x44e22
leaq 0x3556cc(%rip), %rax    # 0x39a4e0
movsd (%rax), %xmm0
addsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x66, %esi
callq 0x9100
cmpq $0x0, %rax
jne 0x44e4a
movq -0x10(%rbp), %rdi
movl $0x27, %esi
callq 0x9100
cmpq $0x0, %rax
je 0x44e60
movsd -0x18(%rbp), %xmm0
movsd 0x12c7d9(%rip), %xmm1   # 0x171630
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathui.cpp
// Function: find_station(char*)
struct STATION find_station(char *s)
{
int i;

   if(s == 0) return station[0];

   i = 0;
   while(1) {
      ++i;
      if(station[i].id == 0) return station[0];
      if(strstr(station[i].id, s)) return station[i];
   }
   return station[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x20(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x45cb4
movq -0x20(%rbp), %rax
movq 0x1833ea(%rip), %rcx    # 0x1c9080
movq %rcx, (%rax)
movq 0x1833e8(%rip), %rcx    # 0x1c9088
movq %rcx, 0x8(%rax)
movq 0x1833e5(%rip), %rcx    # 0x1c9090
movq %rcx, 0x10(%rax)
jmp 0x45d59
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x1833b1(%rip), %rax    # 0x1c9080
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x45d02
movq -0x20(%rbp), %rax
movq 0x183399(%rip), %rcx    # 0x1c9080
movq %rcx, (%rax)
movq 0x183397(%rip), %rcx    # 0x1c9088
movq %rcx, 0x8(%rax)
movq 0x183394(%rip), %rcx    # 0x1c9090
movq %rcx, 0x10(%rax)
jmp 0x45d59
movslq -0xc(%rbp), %rcx
leaq 0x183373(%rip), %rax    # 0x1c9080
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x9090
cmpq $0x0, %rax
je 0x45d54
movq -0x20(%rbp), %rax
movslq -0xc(%rbp), %rdx
leaq 0x18334b(%rip), %rcx    # 0x1c9080
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0x45d59
jmp 0x45cbb
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 0x326975(%rip), %rax    # 0x36c6f0
cmpl $0x1, (%rax)
jge 0x45d8f
movsd 0x129448(%rip), %xmm0   # 0x16f1d0
movsd %xmm0, -0x8(%rbp)
jmp 0x45df5
leaq 0x32695a(%rip), %rax    # 0x36c6f0
cmpl $0xc, (%rax)
jle 0x45daa
movsd 0x12942d(%rip), %xmm0   # 0x16f1d0
movsd %xmm0, -0x8(%rbp)
jmp 0x45df5
leaq 0x32693f(%rip), %rax    # 0x36c6f0
movl (%rax), %eax
movl %eax, -0xc(%rbp)
xorps %xmm0, %xmm0
leaq 0x3263f0(%rip), %rax    # 0x36c1b0
ucomisd (%rax), %xmm0
jbe 0x45de0
movl -0xc(%rbp), %eax
addl $0x6, %eax
movl %eax, -0xc(%rbp)
cmpl $0xc, -0xc(%rbp)
jle 0x45dde
movl -0xc(%rbp), %eax
subl $0xc, %eax
movl %eax, -0xc(%rbp)
jmp 0x45de0
movslq -0xc(%rbp), %rcx
leaq 0x183505(%rip), %rax    # 0x1c92f0
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
leaq 0x357dce(%rip), %rdi    # 0x39e4c0
callq 0x45770
movl %eax, -0x8(%rbp)
cmpl $0x1, -0x8(%rbp)
jne 0x46711
leaq 0x13337b(%rip), %rdi    # 0x179a82
callq 0x30d60
jmp 0x467cb
cmpl $0x2, -0x8(%rbp)
jne 0x46728
leaq 0x133377(%rip), %rdi    # 0x179a95
callq 0x30d60
jmp 0x467c9
cmpl $0x3, -0x8(%rbp)
jne 0x4673f
leaq 0x133374(%rip), %rdi    # 0x179aa9
callq 0x30d60
jmp 0x467c7
cmpl $0x4, -0x8(%rbp)
jne 0x46753
leaq 0x133370(%rip), %rdi    # 0x179abc
callq 0x30d60
jmp 0x467c5
cmpl $0x5, -0x8(%rbp)
jne 0x46767
leaq 0x133396(%rip), %rdi    # 0x179af6
callq 0x30d60
jmp 0x467c3
cmpl $0x0, -0x8(%rbp)
je 0x4676f
jmp 0x467cb
leaq 0x2579a8(%rip), %rax    # 0x29e11e
cmpb $0x0, (%rax)
je 0x467a3
leaq 0x353d4e(%rip), %rax    # 0x39a4d0
movsd (%rax), %xmm0
leaq 0x353d4b(%rip), %rax    # 0x39a4d8
movsd (%rax), %xmm1
leaq 0x353d48(%rip), %rax    # 0x39a4e0
movsd (%rax), %xmm2
callq 0x8d180
jmp 0x467bf
movl $0xa, %edi
callq 0x15a050
movl $0xa, %edi
callq 0x9ae80
movl -0x4(%rbp), %edi
callq 0x15a450
jmp 0x467c1
jmp 0x467c3
jmp 0x467c5
jmp 0x467c7
jmp 0x467c9
jmp 0x467cb
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movb $0x0, -0x12(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %edi
callq 0x9570
movb %al, -0x11(%rbp)
cmpb $0x0, -0x11(%rbp)
je 0x46f06
movq -0x10(%rbp), %rax
movsbl 0x2(%rax), %edi
callq 0x9570
movb %al, -0x12(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
je 0x46f1e
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x24, %eax
jne 0x46f29
movq -0x10(%rbp), %rdi
callq 0x63740
jmp 0x46f96
movsbl -0x11(%rbp), %edi
callq 0x9330
cmpl $0x0, %eax
je 0x46f66
leaq 0x32610e(%rip), %rax    # 0x36d04c
cmpb $0x0, (%rax)
je 0x46f52
movl $0xa, %edi
movl $0xbc9, %esi            # imm = 0xBC9
callq 0xb900
movq -0x10(%rbp), %rsi
addq $0x1, %rsi
movl $0xa, %edi
callq 0x6dac0
jmp 0x46f94
movsbl -0x11(%rbp), %eax
cmpl $0x61, %eax
jl 0x46f86
movsbl -0x11(%rbp), %eax
cmpl $0x6f, %eax
jg 0x46f86
movq -0x10(%rbp), %rdi
callq 0x6e510
movl %eax, -0x4(%rbp)
jmp 0x46f9d
movq -0x10(%rbp), %rdi
callq 0x73950
movl %eax, -0x4(%rbp)
jmp 0x46f9d
jmp 0x46f96
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 0x230af5(%rip), %rax    # 0x277ab0
cmpq $0x40000, (%rax)        # imm = 0x40000
jne 0x46fc6
jmp 0x46ff0
leaq 0x230ae3(%rip), %rax    # 0x277ab0
cmpq $0x1000000, (%rax)      # imm = 0x1000000
jne 0x46fd8
jmp 0x46fee
leaq 0x230ad1(%rip), %rax    # 0x277ab0
cmpq $0x1, (%rax)
jne 0x46fe7
jmp 0x46fec
jmp 0x47110
jmp 0x46fee
jmp 0x46ff0
leaq 0x3262a1(%rip), %rax    # 0x36d298
cmpb $0x0, (%rax)
je 0x4707a
leaq 0x3577f5(%rip), %rax    # 0x39e7f8
leaq 0x132bff(%rip), %rcx    # 0x179c09
movq %rcx, (%rax)
leaq 0x3577ec(%rip), %rax    # 0x39e800
leaq 0x132bf3(%rip), %rcx    # 0x179c0e
movq %rcx, (%rax)
leaq 0x175cfb(%rip), %rax    # 0x1bcd20
movq 0xf0(%rax), %rdi
leaq 0x134184(%rip), %rsi    # 0x17b1b7
callq 0x9090
cmpq $0x0, %rax
je 0x47053
leaq 0x175cdb(%rip), %rax    # 0x1bcd20
leaq 0x132bc2(%rip), %rcx    # 0x179c0e
movq %rcx, 0xf0(%rax)
leaq 0x230a56(%rip), %rax    # 0x277ab0
cmpq $0x40000, (%rax)        # imm = 0x40000
jne 0x47078
leaq 0x175cb6(%rip), %rax    # 0x1bcd20
leaq 0x132b9d(%rip), %rcx    # 0x179c0e
movq %rcx, 0x918(%rax)
jmp 0x470f8
leaq 0x357777(%rip), %rax    # 0x39e7f8
leaq 0x132b8b(%rip), %rcx    # 0x179c13
movq %rcx, (%rax)
leaq 0x35776e(%rip), %rax    # 0x39e800
leaq 0x13411d(%rip), %rcx    # 0x17b1b6
movq %rcx, (%rax)
leaq 0x175c7d(%rip), %rax    # 0x1bcd20
movq 0xf0(%rax), %rdi
leaq 0x132b5d(%rip), %rsi    # 0x179c0e
callq 0x9090
cmpq $0x0, %rax
je 0x470d1
leaq 0x175c5d(%rip), %rax    # 0x1bcd20
leaq 0x1340ed(%rip), %rcx    # 0x17b1b7
movq %rcx, 0xf0(%rax)
leaq 0x2309d8(%rip), %rax    # 0x277ab0
cmpq $0x40000, (%rax)        # imm = 0x40000
jne 0x470f6
leaq 0x175c38(%rip), %rax    # 0x1bcd20
leaq 0x1340c8(%rip), %rcx    # 0x17b1b7
movq %rcx, 0x918(%rax)
jmp 0x470f8
leaq 0x357701(%rip), %rax    # 0x39e800
movq (%rax), %rcx
leaq 0x175c17(%rip), %rax    # 0x1bcd20
movq %rcx, 0xf0(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x10, %rsp
leaq 0x3563d1(%rip), %rax    # 0x39e4c0
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x4813d
leaq 0x131dc3(%rip), %rdi    # 0x179ec1
leaq 0x13c546(%rip), %rsi    # 0x18464b
callq 0x9b20
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x4813b
leaq 0x3532e4(%rip), %rdi    # 0x39b400
leaq 0x131d81(%rip), %rsi    # 0x179ea4
movb $0x0, %al
callq 0x9060
leaq 0x3532cf(%rip), %rdi    # 0x39b400
callq 0x30d60
jmp 0x481fa
jmp 0x481b3
leaq 0x35637c(%rip), %rdi    # 0x39e4c0
leaq 0x14dc7d(%rip), %rsi    # 0x195dc8
callq 0x9090
cmpq $0x0, %rax
jne 0x48169
leaq 0x356363(%rip), %rdi    # 0x39e4c0
leaq 0x131d61(%rip), %rsi    # 0x179ec5
callq 0x96a0
leaq 0x356350(%rip), %rdi    # 0x39e4c0
leaq 0x13c4d4(%rip), %rsi    # 0x18464b
callq 0x9b20
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x481b1
leaq 0x353272(%rip), %rdi    # 0x39b400
leaq 0x131ad5(%rip), %rsi    # 0x179c6a
leaq 0x356324(%rip), %rdx    # 0x39e4c0
movb $0x0, %al
callq 0x9060
leaq 0x353256(%rip), %rdi    # 0x39b400
callq 0x30d60
jmp 0x481fa
jmp 0x481b3
cmpq $0x0, -0x8(%rbp)
jne 0x481bc
jmp 0x481fa
movq -0x8(%rbp), %rsi
xorl %edi, %edi
callq 0x15e150
movq -0x8(%rbp), %rsi
movl $0x1, %edi
callq 0x15e150
movq -0x8(%rbp), %rsi
movl $0x2, %edi
callq 0x15e150
movq -0x8(%rbp), %rsi
movl $0x3, %edi
callq 0x15e150
movq -0x8(%rbp), %rdi
callq 0x9380
addq $0x10, %rsp
popq %rbp
retq
// File: 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
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x489c0
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x48a57
jmp 0x489c2
leaq 0x355af7(%rip), %rax    # 0x39e4c0
cmpq %rax, -0x10(%rbp)
jbe 0x489f7
movq -0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0x489f5
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
je 0x489f5
jmp 0x489f7
jmp 0x489c2
jmp 0x489f9
leaq 0x355ac0(%rip), %rax    # 0x39e4c0
cmpq %rax, -0x10(%rbp)
jbe 0x48a2e
movq -0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0x48a2a
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
jne 0x48a2c
jmp 0x48a2e
jmp 0x489f9
cmpq $0x0, -0x10(%rbp)
jne 0x48a3f
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x48a57
movq -0x10(%rbp), %rdi
callq 0x9480
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 0x355b85(%rip), %rax    # 0x39e820
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x48cbc
leaq 0x354ed6(%rip), %rax    # 0x39db80
movb $0x0, (%rax)
leaq 0x35501c(%rip), %rax    # 0x39dcd0
movb $0x0, (%rax)
callq 0x12ae0
popq %rbp
retq
nop
// File: 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
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x2(%rbp)
leaq 0x254e63(%rip), %rax    # 0x29e098
cmpq $0x0, (%rax)
je 0x49286
leaq 0x254e6e(%rip), %rax    # 0x29e0b0
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x49286
callq 0x29750
movl %eax, -0x8(%rbp)
cmpl $0x31, -0x8(%rbp)
je 0x49264
cmpl $0x79, -0x8(%rbp)
je 0x49264
cmpl $0x59, -0x8(%rbp)
jne 0x4926a
movb $0x1, -0x1(%rbp)
jmp 0x49293
cmpl $0x30, -0x8(%rbp)
je 0x4927c
cmpl $0x6e, -0x8(%rbp)
je 0x4927c
cmpl $0x4e, -0x8(%rbp)
jne 0x49282
movb $0x0, -0x1(%rbp)
jmp 0x49293
jmp 0x49284
jmp 0x49286
movzbl -0x2(%rbp), %eax
andl $0x1, %eax
xorl $0x1, %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 0x3555cd(%rip), %rax    # 0x39e878
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x492cc
leaq 0x3548c6(%rip), %rax    # 0x39db80
movb $0x0, (%rax)
leaq 0x354a0c(%rip), %rax    # 0x39dcd0
movb $0x0, (%rax)
callq 0x12ae0
popq %rbp
retq
nop
// File: 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 0x323922(%rip), %rax    # 0x36d04d
movb $0x1, (%rax)
leaq 0x22e28b(%rip), %rax    # 0x2779c0
movl (%rax), %ecx
xorl $0x1, %ecx
leaq 0x22e27f(%rip), %rax    # 0x2779c0
movl %ecx, (%rax)
leaq 0x22e276(%rip), %rax    # 0x2779c0
movl (%rax), %ecx
leaq 0x22e2b1(%rip), %rax    # 0x277a04
movl %ecx, (%rax)
leaq 0x22e26c(%rip), %rax    # 0x2779c8
movl $0x1, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x10, %rsp
movl $0x16, %edi
callq 0x37780
leaq 0x2307ff(%rip), %rax    # 0x27a338
movb $0x0, (%rax)
leaq 0x2545dd(%rip), %rax    # 0x29e120
movl $0x1, (%rax)
callq 0x49770
movl $0x238c, %edi           # imm = 0x238C
callq 0xd430
leaq 0x22df51(%rip), %rax    # 0x277ab0
cmpq $0x10, (%rax)
je 0x49b67
jmp 0x49bc0
leaq 0x22df42(%rip), %rax    # 0x277ab0
cmpq $0x8, (%rax)
je 0x49b76
jmp 0x49bbe
leaq 0x22df33(%rip), %rax    # 0x277ab0
cmpq $0x1000, (%rax)         # imm = 0x1000
je 0x49b88
jmp 0x49bbc
leaq 0x22df21(%rip), %rax    # 0x277ab0
cmpq $0x200000, (%rax)       # imm = 0x200000
je 0x49b9a
jmp 0x49bba
leaq 0x22df0f(%rip), %rax    # 0x277ab0
cmpq $0x100000, (%rax)       # imm = 0x100000
je 0x49bac
jmp 0x49bb8
movl $0x28, %edi
xorl %esi, %esi
callq 0x86290
jmp 0x49bba
jmp 0x49bbc
jmp 0x49bbe
jmp 0x49bc0
leaq 0x22de95(%rip), %rax    # 0x277a5c
movl (%rax), %ecx
leaq 0x22de98(%rip), %rax    # 0x277a68
movl (%rax), %eax
leaq 0x22de77(%rip), %rdx    # 0x277a50
subl (%rdx), %eax
addl %eax, %ecx
leaq 0x22dea0(%rip), %rax    # 0x277a84
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
cmpl $0x14, -0x4(%rbp)
jge 0x49c2b
leaq 0x22de62(%rip), %rax    # 0x277a5c
movl (%rax), %ecx
leaq 0x22de71(%rip), %rax    # 0x277a74
addl (%rax), %ecx
movslq -0x4(%rbp), %rdx
leaq 0x173110(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xc0(%rax)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x49bed
callq 0x12ae0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 0x3541b5(%rip), %rdi    # 0x39e4c0
movl $0x75, %esi
callq 0x9100
cmpq $0x0, %rax
jne 0x4a365
leaq 0x35419e(%rip), %rdi    # 0x39e4c0
movl $0x55, %esi
callq 0x9100
cmpq $0x0, %rax
jne 0x4a365
leaq 0x2300db(%rip), %rax    # 0x27a414
movb $0x0, (%rax)
leaq 0x185afd(%rip), %rax    # 0x1cfe40
movl $0x0, (%rax)
movl $0x7, %edi
movl $0xb, %esi
callq 0x14df0
leaq 0x321d59(%rip), %rax    # 0x36c0b8
movl $0x1, (%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movsd %xmm0, -0x10(%rbp)
leaq 0x321a49(%rip), %rax    # 0x36c080
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4a648
jp 0x4a648
jmp 0x4a685
movl -0x4(%rbp), %eax
movb %al, %cl
leaq 0x321a14(%rip), %rax    # 0x36c068
movb %cl, (%rax)
movsd -0x10(%rbp), %xmm0
leaq 0x321a0e(%rip), %rax    # 0x36c070
movsd %xmm0, (%rax)
leaq 0x3219fc(%rip), %rax    # 0x36c069
movb $0x0, (%rax)
leaq 0x321a11(%rip), %rax    # 0x36c088
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
callq 0x4a300
jmp 0x4a6c2
leaq 0x3219dc(%rip), %rax    # 0x36c068
movb $0x0, (%rax)
leaq 0x3219da(%rip), %rax    # 0x36c070
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
leaq 0x3219c5(%rip), %rax    # 0x36c069
movb $0x0, (%rax)
leaq 0x3219fa(%rip), %rax    # 0x36c0a8
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
leaq 0x3219fc(%rip), %rax    # 0x36c0b8
movl $0x0, (%rax)
leaq 0x3219bf(%rip), %rax    # 0x36c088
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
xorl %edi, %edi
callq 0xaa160
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x10, %rsp
leaq 0x3535a1(%rip), %rdi    # 0x39e4c0
callq 0x9890
leaq 0x353595(%rip), %rdi    # 0x39e4c0
callq 0xa150
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x4af40
jmp 0x4b0af
movq -0x8(%rbp), %rax
movsbl (%rax), %edi
callq 0x9330
cmpl $0x0, %eax
je 0x4af65
movq -0x8(%rbp), %rdi
callq 0x95c0
movl %eax, %ecx
leaq 0x322551(%rip), %rax    # 0x36d4b4
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
movl $0x44, %esi
callq 0x9100
cmpq $0x0, %rax
je 0x4af86
leaq 0x322534(%rip), %rax    # 0x36d4b4
movl $0x10, (%rax)
movq -0x8(%rbp), %rdi
movl $0x45, %esi
callq 0x9100
cmpq $0x0, %rax
je 0x4afa7
leaq 0x322513(%rip), %rax    # 0x36d4b4
movl $0xb, (%rax)
movq -0x8(%rbp), %rdi
movl $0x46, %esi
callq 0x9100
cmpq $0x0, %rax
je 0x4afc8
leaq 0x3224f2(%rip), %rax    # 0x36d4b4
movl $0x11, (%rax)
movq -0x8(%rbp), %rdi
movl $0x49, %esi
callq 0x9100
cmpq $0x0, %rax
je 0x4afe9
leaq 0x3224d1(%rip), %rax    # 0x36d4b4
movl $0xd, (%rax)
movq -0x8(%rbp), %rdi
movl $0x4b, %esi
callq 0x9100
cmpq $0x0, %rax
je 0x4b00a
leaq 0x3224b0(%rip), %rax    # 0x36d4b4
movl $0xc, (%rax)
movq -0x8(%rbp), %rdi
movl $0x4e, %esi
callq 0x9100
cmpq $0x0, %rax
je 0x4b02b
leaq 0x32248f(%rip), %rax    # 0x36d4b4
movl $0xf, (%rax)
movq -0x8(%rbp), %rdi
movl $0x52, %esi
callq 0x9100
cmpq $0x0, %rax
je 0x4b04c
leaq 0x32246e(%rip), %rax    # 0x36d4b4
movl $0xa, (%rax)
movq -0x8(%rbp), %rdi
movl $0x54, %esi
callq 0x9100
cmpq $0x0, %rax
je 0x4b06d
leaq 0x32244d(%rip), %rax    # 0x36d4b4
movl $0x12, (%rax)
movq -0x8(%rbp), %rdi
movl $0x41, %esi
callq 0x9100
cmpq $0x0, %rax
je 0x4b08e
leaq 0x252598(%rip), %rax    # 0x29d620
movl $0x0, (%rax)
movq -0x8(%rbp), %rdi
movl $0x48, %esi
callq 0x9100
cmpq $0x0, %rax
je 0x4b0af
leaq 0x252577(%rip), %rax    # 0x29d620
movl $0x1, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)