LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_digits(int)
void rpn_digits(int sign)
{
int count;
int digits;

   // set output format digits

   count = IABS(rpn_format);
   if(isdigit(msg_field[3])) count = atoi(&msg_field[3]);
   else if(msg_field[3] == '-') count = atoi(&msg_field[3]);
   else if(msg_field[3] == '+') count = atoi(&msg_field[3]);
   count *= sign;

   if(hex_mode == 2) {
      digits = ISIZE;
      if(IABS(count) > ISIZE) {  // binary
         sprintf(out, "Decimal place count must be 0..%d", digits);
         rpn_error(out);
         return;
      }
   }
   else if(hex_mode == 8) {  // octal
      digits = (ISIZE+2) / 3;
      if(IABS(count) > digits) {
         sprintf(out, "Decimal place count must be 0..%d", digits);
         rpn_error(out);
         return;
      }
   }
   else if(hex_mode == 16) {  // hex
      digits = (ISIZE+3) / 4;
      if(IABS(count) > digits) {
         sprintf(out, "Decimal place count must be 0..%d", digits);
         rpn_error(out);
         return;
      }
   }
   else {  // decimal
      if(IABS(count) > 16) {
         sprintf(out, "Decimal place count must be 0..16");
         rpn_error(out);
         return;
      }
   }
   rpn_format = count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x318daa(%rip), %rdi    # 0x33ba40
movsbl 0x3(%rdi), %eax
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jb 0x22cbc
movzbl %al, %ecx
movl 0x1473b5(%rip), %edx    # 0x16a060
movl %edx, %eax
negl %eax
cmovsl %edx, %eax
cmpl $0x2d, %ecx
je 0x22cbc
cmpl $0x2b, %ecx
jne 0x22cc5
addq $0x3, %rdi
callq 0x95e0
imull %ebx, %eax
movl 0x320072(%rip), %edx    # 0x342d40
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cmpl $0x10, %edx
je 0x22d22
cmpl $0x8, %edx
je 0x22d05
cmpl $0x2, %edx
jne 0x22d49
cmpl $0x41, %ecx
jb 0x22d7b
leaq 0x31952c(%rip), %rbx    # 0x33c220
leaq 0xea8dd(%rip), %rsi     # 0x10d5d8
movq %rbx, %rdi
movl $0x40, %edx
jmp 0x22d3d
cmpl $0x17, %ecx
jb 0x22d7b
leaq 0x31950f(%rip), %rbx    # 0x33c220
leaq 0xea8c0(%rip), %rsi     # 0x10d5d8
movq %rbx, %rdi
movl $0x16, %edx
jmp 0x22d3d
cmpl $0x11, %ecx
jb 0x22d7b
leaq 0x3194f2(%rip), %rbx    # 0x33c220
leaq 0xea8a3(%rip), %rsi     # 0x10d5d8
movq %rbx, %rdi
movl $0x10, %edx
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
jmp 0x22d70
cmpl $0x11, %ecx
jb 0x22d7b
movups 0xea8b5(%rip), %xmm0    # 0x10d60a
leaq 0x3194c4(%rip), %rdi    # 0x33c220
movaps %xmm0, 0x10(%rdi)
movups 0xea893(%rip), %xmm0    # 0x10d5fa
movaps %xmm0, (%rdi)
movw $0x36, 0x20(%rdi)
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x20e5c
movl %eax, 0x1472df(%rip)    # 0x16a060
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: find_rpn_def(char*)
int find_rpn_def(char *s)
{
int i;

   // see if user defined command has been defined

   if(s == 0) {
      return (-2);
   }

   for(i=0; i<num_rpn_defs; i++) {
      if(!strncmp(s, rpn_defs[i], strlen(s))) return i;
   }

   return (-1);
}

// Assembly:
testq %rdi, %rdi
je 0x22de6
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movslq 0x3202e6(%rip), %r12    # 0x343088
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %r12, %r12
jle 0x22def
movq %rdi, %r14
callq 0x9120
movq %rax, %r15
leaq 0x31ffa2(%rip), %rbx    # 0x342d60
xorl %r13d, %r13d
movq (%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x9140
testl %eax, %eax
je 0x22dec
incq %r13
addq $0x8, %rbx
cmpq %r13, %r12
jne 0x22dc1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x22def
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
retq
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_edit()
void rpn_edit()
{
int i;

   // edit a user defined command
   if(get_msg_field()) {
      i = find_rpn_def(msg_field);
      if(i >= 0) {
         if(zoom_screen) remove_zoom();
         rpn_mode = 0;
         show_version_header();
         add_kbd(0x0D);
         add_kbd('!'); // edit DEFINE
         add_kbd('`');
         strcpy(edit_buffer, rpn_defs[i]);
      }
      else {
         sprintf(out, "DEFINE %s not found!", msg_field);
         edit_error(out);
      }
   }
   else {
      edit_error("DEFINE name missing!");
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x810b1
testl %eax, %eax
je 0x23872
leaq 0x318239(%rip), %rdi    # 0x33ba40
callq 0x22d88
testl %eax, %eax
js 0x2387b
movl %eax, %ebx
leaq 0x2e8f8f(%rip), %rax    # 0x30c7a8
cmpb $0x0, (%rax)
je 0x23823
callq 0x238a8
leaq 0x317ffe(%rip), %rax    # 0x33b828
movl $0x0, (%rax)
callq 0x72683
movl $0xd, %edi
callq 0xd4c8
movl $0x21, %edi
callq 0xd4c8
movl $0x60, %edi
callq 0xd4c8
movl %ebx, %eax
leaq 0x31f504(%rip), %rcx    # 0x342d60
movq (%rcx,%rax,8), %rsi
leaq 0x31ba79(%rip), %rdi    # 0x33f2e0
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9340
leaq 0xe9e5a(%rip), %rdi     # 0x10d6d3
jmp 0x2389d
leaq 0x31899e(%rip), %rbx    # 0x33c220
leaq 0xe9e5f(%rip), %rsi     # 0x10d6e8
leaq 0x3181b0(%rip), %rdx    # 0x33ba40
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x23027
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: remove_zoom()
void remove_zoom()
{
   // exit a zoomed screen mode and re-config the screen
   change_zoom_config(-2);
   cancel_zoom(2);
   zoom_fixes = show_fixes;
   show_rpn_help = 0;
   config_screen(117);
   force_adev_redraw(106);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
callq 0x27479
leaq 0x2e8ee8(%rip), %rax    # 0x30c7a8
movb $0x0, (%rax)
leaq 0x317f62(%rip), %rbx    # 0x33b82c
xorl %r14d, %r14d
movl %r14d, (%rbx)
movl $0x69, %edi
callq 0xd8ba5
leaq 0x3179f3(%rip), %rax    # 0x33b2d4
movzbl (%rax), %eax
leaq 0x2e8ec1(%rip), %rcx    # 0x30c7ac
movl %eax, (%rcx)
movl %r14d, (%rbx)
movl $0x75, %edi
callq 0xcf89
movl $0x6a, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0xd8ba5
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_nest()
int rpn_nest()
{
   // save where we are in the current line

   if(rpn_exec_level < RPN_EXEC_DEPTH) {
      rpn_exec_stack[rpn_exec_level].col = msg_col;
      rpn_exec_stack[rpn_exec_level].skip = skip_next_rpn;
      strcpy(rpn_exec_stack[rpn_exec_level].msg, nmea_msg);
      skip_next_rpn = 0;
      ++rpn_exec_level;
      return 0;
   }

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movslq 0x320dff(%rip), %rbx    # 0x344714
movl $0x1, %eax
cmpq $0x9, %rbx
jg 0x23970
leaq 0x31831d(%rip), %rax    # 0x33bc44
movl (%rax), %eax
imulq $0x20c, %rbx, %rcx      # imm = 0x20C
leaq 0x31f759(%rip), %rdx    # 0x343090
leaq (%rdx,%rcx), %rdi
movl %eax, 0x204(%rcx,%rdx)
movl 0x31f404(%rip), %eax    # 0x342d4c
movl %eax, 0x208(%rcx,%rdx)
leaq 0x317eda(%rip), %rsi    # 0x33b830
callq 0x9340
movl $0x0, 0x31f3e7(%rip)    # 0x342d4c
leal 0x1(%rbx), %eax
movl %eax, 0x320da6(%rip)    # 0x344714
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_unnest()
int rpn_unnest()
{
   // exit a user defined command string back to the previous nesting level

   if(rpn_exec_level) {
      --rpn_exec_level;
      msg_col = rpn_exec_stack[rpn_exec_level].col;
      skip_next_rpn = rpn_exec_stack[rpn_exec_level].skip;
      strcpy(nmea_msg, rpn_exec_stack[rpn_exec_level].msg);
      return 1;
   }

   return 0;
}

// Assembly:
movslq 0x320d96(%rip), %rax    # 0x344714
testq %rax, %rax
je 0x239d2
pushq %rbp
movq %rsp, %rbp
decq %rax
movl %eax, 0x320d84(%rip)    # 0x344714
imulq $0x20c, %rax, %rax      # imm = 0x20C
leaq 0x31f6f2(%rip), %rcx    # 0x343090
leaq (%rcx,%rax), %rsi
movl 0x204(%rax,%rcx), %edx
leaq 0x318294(%rip), %rdi    # 0x33bc44
movl %edx, (%rdi)
movl 0x208(%rax,%rcx), %eax
movl %eax, 0x31f38d(%rip)    # 0x342d4c
leaq 0x317e6a(%rip), %rdi    # 0x33b830
callq 0x9340
movl $0x1, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_save(int)
void rpn_save(int save_mem)
{
FILE *file;
int i;

   // save the current DEFINEs (and optionally memory) to a file

   get_msg_field();
   if(msg_field[0]) {
      file = topen(msg_field, "w");
      if(file) {
         for(i=0; i<num_rpn_defs; i++) {
            if(rpn_defs[i]) fprintf(file, "define %s\n", rpn_defs[i]);
         }

         if(save_mem) {  // also save the rpn memory and stack
            for(i=0; i<RPN_MEM; i++) { // save memory regs
               fprintf(file, "%.16g sto%d\n", rpn_mem[i], i);
            }
            for(i=RPN_SIZE-1; i>=0; i--) {  // save stack values
               fprintf(file, "%.16g\n", rpn[i]);
            }
         }
         fclose(file);
      }
      else {
         sprintf(out, "Could not write DEFINEs file: %s", msg_field);
         edit_error(out);
      }
   }
   else {
      edit_error("No file name given.");
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %r14d
callq 0x810b1
leaq 0x31804e(%rip), %rax    # 0x33ba40
cmpb $0x0, (%rax)
je 0x23ae9
leaq 0x31803e(%rip), %rdi    # 0x33ba40
leaq 0xfd9b2(%rip), %rsi     # 0x1213bb
callq 0x9a47
testq %rax, %rax
je 0x23af2
movq %rax, %rbx
movl 0x31f668(%rip), %eax    # 0x343088
testl %eax, %eax
jle 0x23a60
leaq 0x31f335(%rip), %r12    # 0x342d60
leaq 0xe9ccb(%rip), %r15     # 0x10d6fd
xorl %r13d, %r13d
movq (%r12), %rdx
testq %rdx, %rdx
je 0x23a51
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x9560
movl 0x31f637(%rip), %eax    # 0x343088
incq %r13
movslq %eax, %rcx
addq $0x8, %r12
cmpq %rcx, %r13
jl 0x23a35
testl %r14d, %r14d
je 0x23ad3
leaq 0x31ef94(%rip), %r12    # 0x342a00
xorl %r14d, %r14d
leaq 0xe9c92(%rip), %r15     # 0x10d708
movsd (%r12), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
movb $0x1, %al
callq 0x9560
incq %r14
addq $0x8, %r12
cmpq $0x64, %r14
jne 0x23a76
movslq 0x1465b0(%rip), %r15    # 0x16a050
testq %r15, %r15
jle 0x23ad3
incq %r15
leaq 0x31eec1(%rip), %r12    # 0x342970
leaq 0xe9c5f(%rip), %r14     # 0x10d715
movsd -0x10(%r12,%r15,8), %xmm0
movq %rbx, %rdi
movq %r14, %rsi
movb $0x1, %al
callq 0x9560
decq %r15
cmpq $0x1, %r15
ja 0x23ab6
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9370
leaq 0xe9c4d(%rip), %rdi     # 0x10d73d
jmp 0x23b14
leaq 0x318727(%rip), %rbx    # 0x33c220
leaq 0xe9c1c(%rip), %rsi     # 0x10d71c
leaq 0x317f39(%rip), %rdx    # 0x33ba40
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x23027
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_run()
void rpn_run()
{
int i;

   // read and execute the commands in a RPN file

   get_msg_field();
   if(msg_field[0]) {
      i = read_rpn_file(msg_field, 0);
      if(i == (-1)) {
         sprintf(out, "Could not read RPN file: %s", msg_field);
         edit_error(out);
      }
      else if(i) {
         edit_error("Error in RPN file.");
      }
   }
   else {
      edit_error("No file name given.");
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x810b1
leaq 0x317f07(%rip), %rax    # 0x33ba40
cmpb $0x0, (%rax)
je 0x23b76
leaq 0x317efb(%rip), %rdi    # 0x33ba40
xorl %esi, %esi
callq 0x232b4
testl %eax, %eax
je 0x23b7f
cmpl $-0x1, %eax
jne 0x23b86
leaq 0x3186c4(%rip), %rbx    # 0x33c220
leaq 0xe9bee(%rip), %rsi     # 0x10d751
leaq 0x317ed6(%rip), %rdx    # 0x33ba40
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
jmp 0x23b8d
leaq 0xe9bc0(%rip), %rbx     # 0x10d73d
jmp 0x23b8d
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xe9be0(%rip), %rbx     # 0x10d76d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x23027
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
je 0x241ae
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r14
movq %rdx, %rdi
callq 0x9120
movb $0x0, (%r14)
xorl %ecx, %ecx
subl %eax, %r15d
cmovbl %ecx, %r15d
cmpq %rcx, %r15
je 0x241e1
movw $0x20, (%r14,%rcx)
incq %rcx
cmpq $0x3d, %rcx
jne 0x241cc
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x96c0
// File: /workspace/github_cpp_makefile_star2_O3/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:
xorl %eax, %eax
testq %rdi, %rdi
je 0x24666
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x24660
movq %rbx, %rdi
callq 0x9120
testq %rax, %rax
je 0x2465b
movq %rax, %rcx
movl $0x1, %edx
xorl %eax, %eax
xorl %esi, %esi
movb (%rbx,%rsi), %sil
leal -0x30(%rsi), %edi
cmpb $0xa, %dil
setb %dil
addb $-0x61, %sil
cmpb $0x6, %sil
setb %sil
orb %dil, %sil
je 0x24660
movl %edx, %esi
incl %edx
cmpq %rsi, %rcx
ja 0x24632
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
xorl %eax, %eax
testq %rdi, %rdi
je 0x246b7
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x246b1
movq %rbx, %rdi
callq 0x9120
testq %rax, %rax
je 0x246ac
movq %rax, %rcx
movl $0x1, %edx
xorl %eax, %eax
xorl %esi, %esi
movb (%rbx,%rsi), %sil
andb $-0x8, %sil
cmpb $0x30, %sil
jne 0x246b1
movl %edx, %esi
incl %edx
cmpq %rsi, %rcx
ja 0x24695
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
xorl %eax, %eax
testq %rdi, %rdi
je 0x24708
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x24702
movq %rbx, %rdi
callq 0x9120
testq %rax, %rax
je 0x246fd
movq %rax, %rcx
movl $0x1, %edx
xorl %eax, %eax
xorl %esi, %esi
movb (%rbx,%rsi), %sil
andb $-0x2, %sil
cmpb $0x30, %sil
jne 0x24702
movl %edx, %esi
incl %edx
cmpq %rsi, %rcx
ja 0x246e6
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
testq %rdi, %rdi
je 0x247ea
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x9120
testq %rax, %rax
je 0x247ee
xorl %ecx, %ecx
movl $0x1, %edx
xorl %r10d, %r10d
xorl %edi, %edi
xorl %esi, %esi
xorl %r8d, %r8d
xorl %r9d, %r9d
movzbl (%rbx,%rcx), %ecx
cmpl $0x2d, %ecx
jg 0x2477d
cmpl $0x2b, %ecx
je 0x24750
cmpl $0x2d, %ecx
jne 0x24799
xorl %ecx, %ecx
testl %r9d, %r9d
jne 0x247f3
testl %r8d, %r8d
jne 0x247f3
movl $0x1, %r9d
movl $0x0, %r8d
testl %r10d, %r10d
movl $0x0, %r10d
je 0x247cb
jmp 0x247f3
cmpl $0x65, %ecx
je 0x247b4
cmpl $0x2e, %ecx
jne 0x24799
xorl %ecx, %ecx
orl %esi, %edi
movl $0x0, %esi
movl $0x1, %edi
je 0x247cb
jmp 0x247f3
leal -0x30(%rcx), %r10d
cmpb $0x9, %r10b
ja 0x247fc
movsbl %cl, %ecx
testl %esi, %esi
cmovnel %ecx, %r8d
movl $0x1, %r10d
jmp 0x247cb
xorl %r9d, %r9d
movl $0x0, %r10d
movl $0x0, %ecx
testl %esi, %esi
movl $0x1, %esi
jne 0x247f3
movl %edx, %ecx
incl %edx
cmpq %rcx, %rax
ja 0x2473d
testl %esi, %esi
sete %al
testl %r8d, %r8d
setne %cl
orb %al, %cl
movzbl %cl, %ecx
jmp 0x247f3
xorl %ecx, %ecx
jmp 0x247f9
movl $0x1, %ecx
addq $0x8, %rsp
popq %rbx
popq %rbp
movl %ecx, %eax
retq
xorl %ecx, %ecx
jmp 0x247f3
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: get_rpn_num()
double get_rpn_num()
{
double val;
unsigned i, j;
int c;

   // decode ascii value (can be integer hex or binary string) and
   // push value onto stack

   if((msg_field[0] == '0') && (msg_field[1] == 'x')) {  // hex integer
      strupr(msg_field);
      i = strlen(msg_field);
      val = 0.0;
      for(j=2; j<i; j++) {
         c = msg_field[j];
         if((c >= '0') && (c <= '9')) c = (c - '0');
         else if((c >= 'A') && (c <= 'F')) c = (c - 'A' + 10);
         val = (val * 16.0) + (double) c;
      }
   }
   else if((msg_field[0] == '0') && (msg_field[1] == 'o')) {  // octal integer
      i = strlen(msg_field);
      val = 0.0;
      for(j=2; j<i; j++) {
         c = msg_field[j] - '0';
         val = (val * 8.0) + (double) c;
      }
   }
   else if((msg_field[0] == '0') && (msg_field[1] == 'b')) {  // binary integer
      i = strlen(msg_field);
      val = 0.0;
      for(j=2; j<i; j++) {
         c = msg_field[j] - '0';
         val = (val * 2.0) + (double) c;
      }
   }
   else val = atof(msg_field);

   last_rpn0 = rpn[0];
   rpn_push(val);
   last_was_clx = 0;
   return rpn[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x317233(%rip), %rcx    # 0x33ba40
movb (%rcx), %al
movb 0x1(%rcx), %cl
xorb $0x30, %al
movl %ecx, %edx
xorb $0x78, %dl
orb %al, %dl
jne 0x2488d
leaq 0x31721c(%rip), %rbx    # 0x33ba40
movq %rbx, %rdi
callq 0x9899
movq %rbx, %rdi
callq 0x9120
xorpd %xmm0, %xmm0
cmpl $0x3, %eax
jb 0x24933
movl %eax, %eax
movl $0x2, %ecx
movsd 0xe7000(%rip), %xmm1    # 0x10b850
movsbl (%rbx,%rcx), %edx
leal -0x30(%rdx), %esi
cmpb $0x9, %sil
ja 0x24862
addl $-0x30, %edx
jmp 0x24871
leal -0x41(%rdx), %esi
leal -0x37(%rdx), %edi
cmpb $0x6, %sil
cmovael %edx, %edi
movl %edi, %edx
xorps %xmm2, %xmm2
cvtsi2sd %edx, %xmm2
mulsd %xmm1, %xmm0
addsd %xmm2, %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0x24850
jmp 0x24933
movl %ecx, %edx
xorb $0x6f, %dl
orb %al, %dl
jne 0x248e1
leaq 0x3171a3(%rip), %rbx    # 0x33ba40
movq %rbx, %rdi
callq 0x9120
xorpd %xmm0, %xmm0
cmpl $0x3, %eax
jb 0x24933
movl %eax, %eax
movl $0x2, %ecx
movsd 0xe6f87(%rip), %xmm1    # 0x10b848
movsbl (%rbx,%rcx), %edx
addl $-0x30, %edx
xorps %xmm2, %xmm2
cvtsi2sd %edx, %xmm2
mulsd %xmm1, %xmm0
addsd %xmm2, %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0x248c1
jmp 0x24933
xorb $0x62, %cl
orb %cl, %al
jne 0x24927
leaq 0x317151(%rip), %rbx    # 0x33ba40
movq %rbx, %rdi
callq 0x9120
xorpd %xmm0, %xmm0
cmpl $0x3, %eax
jb 0x24933
movl %eax, %eax
movl $0x2, %ecx
movsbl (%rbx,%rcx), %edx
addl $-0x30, %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
addsd %xmm0, %xmm0
addsd %xmm1, %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0x24907
jmp 0x24933
leaq 0x317112(%rip), %rdi    # 0x33ba40
callq 0x9470
movsd 0x31e035(%rip), %xmm1   # 0x342970
movsd %xmm1, 0x31e3f5(%rip)   # 0x342d38
callq 0x21256
movl $0x0, 0x31e3de(%rip)    # 0x342d30
movsd 0x31e016(%rip), %xmm0   # 0x342970
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %ebx
movl 0x143895(%rip), %edx    # 0x16a070
testl %edx, %edx
je 0x26840
leaq 0x14388e(%rip), %r12    # 0x16a074
leaq 0x315a33(%rip), %r14    # 0x33c220
leaq 0xe72f4(%rip), %r15     # 0x10dae8
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x9060
movl $0xa, %edi
movq %r14, %rsi
movl $0x1, %edx
callq 0x262e7
movq %r14, %rdi
movq %r15, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movl $0xa, %edi
movq %r14, %rsi
movl $0x2, %edx
callq 0x262e7
movl (%r12), %edx
addq $0x4, %r12
testl %edx, %edx
jne 0x267f4
leaq 0x3159d9(%rip), %r14    # 0x33c220
leaq 0xe729a(%rip), %r15     # 0x10dae8
movq %r14, %rdi
movq %r15, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movl $0xa, %edi
movq %r14, %rsi
movl $0x1, %edx
callq 0x262e7
movq %r14, %rdi
movq %r15, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movl $0xa, %edi
movq %r14, %rsi
movl $0x2, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x262e7
// File: /workspace/github_cpp_makefile_star2_O3/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
leaq 0x2e5324(%rip), %rax    # 0x30c7a8
cmpb $0x4b, (%rax)
je 0x274d9
testl %edi, %edi
jle 0x274db
incl 0x31d2bd(%rip)          # 0x344750
leaq 0x1f3f6e(%rip), %rax    # 0x21b408
movzbl (%rax), %eax
movl %eax, 0x31d299(%rip)    # 0x34473c
leaq 0x1f3f69(%rip), %rax    # 0x21b413
movzbl (%rax), %eax
movl %eax, 0x31d28d(%rip)    # 0x344740
leaq 0x313f2e(%rip), %rax    # 0x33b3e8
movzbl (%rax), %eax
movl %eax, 0x31d281(%rip)    # 0x344744
leaq 0x1f3f4b(%rip), %rax    # 0x21b415
movzbl (%rax), %eax
movl %eax, 0x31d275(%rip)    # 0x344748
movl %edi, 0x31d273(%rip)    # 0x34474c
popq %rbp
retq
cmpl $0x0, 0x31d26a(%rip)    # 0x34474c
je 0x274d9
incl 0x31d26a(%rip)          # 0x344754
movb 0x31d24c(%rip), %al     # 0x34473c
leaq 0x1f3f11(%rip), %rcx    # 0x21b408
movb %al, (%rcx)
movb 0x31d241(%rip), %al     # 0x344740
leaq 0x1f3f0d(%rip), %rcx    # 0x21b413
movb %al, (%rcx)
movb 0x31d236(%rip), %al     # 0x344744
leaq 0x313ed3(%rip), %rcx    # 0x33b3e8
movb %al, (%rcx)
movb 0x31d22b(%rip), %al     # 0x344748
leaq 0x1f3ef1(%rip), %rcx    # 0x21b415
movb %al, (%rcx)
leaq 0x313da7(%rip), %rax    # 0x33b2d4
cmpb $0x0, (%rax)
je 0x2753e
leaq 0x313d77(%rip), %rax    # 0x33b2b0
movb $0x1, (%rax)
jmp 0x274d9
leaq 0x313d6b(%rip), %rax    # 0x33b2b0
movb $0x0, (%rax)
jmp 0x274d9
// File: /workspace/github_cpp_makefile_star2_O3/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:
leaq 0x1f1359(%rip), %rax    # 0x2188d0
cmpq $0x400, (%rax)          # imm = 0x400
jne 0x2758d
leaq 0x1f12bd(%rip), %rax    # 0x218844
movl $0x1, (%rax)
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x2179be(%rip), %rbx    # 0x23ef58
cmpl $0x0, (%rbx)
je 0x275be
callq 0x275c7
movl $0x0, (%rbx)
leaq 0x1f3ba7(%rip), %rax    # 0x21b158
movb $0x0, (%rax)
movl $0x1, %edi
callq 0x197ae
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %rbx
pushq %rax
leaq 0x217984(%rip), %rbx    # 0x23ef58
cmpl $0x0, (%rbx)
je 0x2760c
leaq 0x2e51c8(%rip), %rax    # 0x30c7a8
cmpb $0x4b, (%rax)
jne 0x2760c
movb $0x0, (%rax)
leaq 0x31423d(%rip), %rax    # 0x33b82c
movl $0x0, (%rax)
movl $0x69, %edi
callq 0xd8ba5
leaq 0x1f123e(%rip), %rax    # 0x218844
movl $0x15df, (%rax)         # imm = 0x15DF
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x21792f(%rip), %r14    # 0x23ef58
cmpl %edi, (%r14)
jne 0x2763f
cmpl $0x3f, %ebx
je 0x2768c
movl $0x12e, %edi            # imm = 0x12E
callq 0x9d78
jmp 0x2768c
leaq 0x217872(%rip), %rax    # 0x23eeb8
cmpq $0x0, (%rax)
je 0x2767b
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0xf035
movl (%r14), %ecx
leaq 0x314bc0(%rip), %r14    # 0x33c220
leaq 0xe6ef5(%rip), %rsi     # 0x10e55c
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
callq 0x23027
leaq 0x1f1156(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
je 0x2768c
callq 0xfa97
callq 0x275c7
leaq 0x1f1199(%rip), %rax    # 0x218831
cmpb $0x74, (%rax)
jne 0x276b3
leaq 0x1f11b7(%rip), %rax    # 0x21885b
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x1f11ab(%rip), %rax    # 0x21885a
movb %cl, (%rax)
jmp 0x276e0
leaq 0x1f111e(%rip), %rcx    # 0x2187d8
movl (%rcx), %eax
cmpl $0x2, %eax
jne 0x276e9
movl $0x0, (%rcx)
leaq 0x1f118d(%rip), %rax    # 0x21885b
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x1f1181(%rip), %rax    # 0x21885a
movb %cl, (%rax)
callq 0xfa97
leaq 0x1f10f1(%rip), %rax    # 0x2187d8
movl (%rax), %eax
testl %eax, %eax
je 0x276f6
popq %rbx
popq %r14
popq %rbp
jmp 0xfa97
callq 0xecb9
movl $0x1, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x197ae
// File: /workspace/github_cpp_makefile_star2_O3/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 0x5f6cb
testl %eax, %eax
je 0x2772f
leaq 0x1f11b3(%rip), %rax    # 0x2188d0
cmpq $0x800000, (%rax)       # imm = 0x800000
je 0x2772f
leaq 0xe6e5e(%rip), %rax     # 0x10e58b
jmp 0x27775
leaq 0x2e505e(%rip), %rax    # 0x30c794
cmpl $0x0, (%rax)
je 0x27750
leaq 0x2e5c02(%rip), %rax    # 0x30d344
cmpl $0x0, (%rax)
je 0x27759
leaq 0xe6e7e(%rip), %rax     # 0x10e5cc
jmp 0x27775
leaq 0xe6f35(%rip), %rax     # 0x10e68c
jmp 0x27775
leaq 0x2e5be8(%rip), %rax    # 0x30d348
cmpl $0x0, (%rax)
leaq 0xe6ee2(%rip), %rcx     # 0x10e64c
leaq 0xe6e9b(%rip), %rax     # 0x10e60c
cmoveq %rcx, %rax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x310e9a(%rip), %r14    # 0x33fd58
movslq (%r14), %rcx
imulq $0xe8, %rcx, %rax
leaq 0x12ee61(%rip), %r15    # 0x15dd30
xorps %xmm0, %xmm0
cmpl $0x0, 0x30(%r15,%rax)
jne 0x2eee3
leaq (%r15,%rax), %rdx
movsd 0x38(%rdx), %xmm0
cmpl $0x3, %ecx
jne 0x2ef07
leaq 0x2de0b6(%rip), %rax    # 0x30cfa5
movb (%rax), %al
addb $-0x44, %al
cmpb $0xf, %al
jae 0x2ef13
movzbl %al, %eax
leaq 0x120c1f(%rip), %rcx    # 0x14fb20
leaq (%rcx,%rax,8), %rax
jmp 0x2ef0e
addq %r15, %rax
addq $0x8, %rax
movq (%rax), %rax
jmp 0x2ef1a
leaq 0xe5bdf(%rip), %rax     # 0x114af9
xorl %ebx, %ebx
cmpb $0x20, (%rax)
sete %bl
addq %rax, %rbx
leaq 0x3103b4(%rip), %rdi    # 0x33f2e0
leaq 0x10616f(%rip), %rsi    # 0x1350a2
movb $0x1, %al
callq 0x9060
movslq (%r14), %rax
imulq $0xe8, %rax, %rax
movq (%r15,%rax), %rdx
leaq 0x30d2d1(%rip), %r14    # 0x33c220
leaq 0xe5bb3(%rip), %rsi     # 0x114b09
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x9060
movl $0x64, %edi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2bf98
// File: /workspace/github_cpp_makefile_star2_O3/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 0x310dd0(%rip), %rbx    # 0x33fd58
movslq (%rbx), %rax
imulq $0xe8, %rax, %rax
leaq 0x12ed97(%rip), %r14    # 0x15dd30
movsd 0xa0(%r14,%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2efaf
jnp 0x2efbd
leaq 0x31032a(%rip), %rax    # 0x33f2e0
movw $0x30, (%rax)
jmp 0x2effb
leaq 0x1e990c(%rip), %rcx    # 0x2188d0
cmpq $0x10000, (%rcx)        # imm = 0x10000
jne 0x2efdb
leaq 0x31030c(%rip), %rax    # 0x33f2e0
movw $0x31, (%rax)
jmp 0x2effb
addq %r14, %rax
movsd 0x98(%rax), %xmm0
leaq 0x3102f3(%rip), %rdi    # 0x33f2e0
leaq 0x1004e3(%rip), %rsi    # 0x12f4d7
movb $0x1, %al
callq 0x9060
leaq 0x310d6a(%rip), %rax    # 0x33fd6c
movslq (%rbx), %rcx
imulq $0xe8, %rcx, %rcx
cmpl $0x0, (%rax)
movq (%r14,%rcx), %rdx
leaq 0x30d206(%rip), %rdi    # 0x33c220
je 0x2f02c
leaq 0xe5b23(%rip), %rsi     # 0x114b46
xorl %eax, %eax
callq 0x9060
jmp 0x2f041
leaq 0xe5b6c(%rip), %rsi     # 0x114b9f
leaq 0xe5b06(%rip), %rcx     # 0x114b40
xorl %eax, %eax
callq 0x9060
leaq 0x30d1d8(%rip), %rsi    # 0x33c220
movl $0x3d, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x2bf98
// File: /workspace/github_cpp_makefile_star2_O3/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 0x31027c(%rip), %rax    # 0x33f2e0
movb $0x0, (%rax)
leaq 0x310cea(%rip), %r14    # 0x33fd58
movslq (%r14), %rcx
imulq $0xe8, %rcx, %rax
leaq 0x12ecb1(%rip), %rbx    # 0x15dd30
cmpl $0x0, 0x1c(%rbx,%rax)
je 0x2f0a6
addq %rbx, %rax
movsd 0x28(%rax), %xmm0
leaq 0x31024b(%rip), %rdi    # 0x33f2e0
leaq 0xe5cc7(%rip), %rsi     # 0x114d63
movb $0x1, %al
callq 0x9060
movl (%r14), %ecx
movslq %ecx, %rax
cmpl $0x2, %ecx
je 0x2f0d4
cmpl $0x3, %ecx
jne 0x2f0dd
leaq 0x2ddeeb(%rip), %rcx    # 0x30cfa5
movb (%rcx), %cl
addb $-0x44, %cl
cmpb $0xf, %cl
jae 0x2f0f0
movzbl %cl, %ecx
leaq 0x120aca(%rip), %rdx    # 0x14fb98
leaq (%rdx,%rcx,8), %rcx
jmp 0x2f0eb
leaq 0x100699(%rip), %rdx    # 0x12f774
jmp 0x2f0f7
imulq $0xe8, %rax, %rcx
addq %rbx, %rcx
addq $0x8, %rcx
movq (%rcx), %rdx
jmp 0x2f0f7
leaq 0xe75d3(%rip), %rdx     # 0x1166ca
xorl %ecx, %ecx
cmpb $0x20, (%rdx)
sete %cl
addq %rdx, %rcx
imulq $0xe8, %rax, %rax
movq (%rbx,%rax), %rdx
leaq 0x30d10c(%rip), %rbx    # 0x33c220
leaq 0xe5ad4(%rip), %rsi     # 0x114bef
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x43, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2bf98
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1ebe40(%rip), %rax    # 0x21b338
movq (%rax), %rax
testq %rax, %rax
jle 0x2f525
cvtsi2sd %rax, %xmm0
leaq 0x1e9378(%rip), %rax    # 0x218884
cvtsi2sdl (%rax), %xmm1
xorl %eax, %eax
xorpd %xmm2, %xmm2
subsd %xmm1, %xmm0
incq %rax
ucomisd %xmm2, %xmm0
ja 0x2f516
jmp 0x2f527
xorl %eax, %eax
cmpq $0x1, %rax
adcq $0x0, %rax
leaq 0x1ebe6a(%rip), %rcx    # 0x21b3a0
movq %rax, (%rcx)
testl %edi, %edi
je 0x2f56e
leaq 0x1ebe74(%rip), %rcx    # 0x21b3b8
movq %rax, (%rcx)
leaq 0x1ebe76(%rip), %rax    # 0x21b3c4
movb $0x1, (%rax)
leaq 0x1ebdac(%rip), %rax    # 0x21b304
movl $0x0, (%rax)
movl $0x14f, %edi            # imm = 0x14F
movl $0x1, %esi
popq %rbp
jmp 0x1c7ce
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x30ff5
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x30e62a(%rip), %rbx    # 0x33f608
movw $0x3a, (%rbx)
xorl %esi, %esi
callq 0x2f82c
movw $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3102b
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x986c
movzbl (%rbx), %eax
cmpl $0x2a, %eax
je 0x3103d
cmpl $0x2d, %eax
je 0x3102f
cmpl $0x2b, %eax
jne 0x31026
cmpb $0x2b, 0x1(%rbx)
je 0x31035
movb $0x1, %r14b
jmp 0x31047
xorps %xmm0, %xmm0
retq
cmpb $0x2d, 0x1(%rbx)
jne 0x31026
incq %rbx
xorl %r14d, %r14d
jmp 0x31047
xorl %r14d, %r14d
leaq 0xf03c9(%rip), %rbx     # 0x121410
movq %rbx, %rdi
movl $0x61, %esi
callq 0x9100
testq %rax, %rax
je 0x3108e
leaq 0x12ccd0(%rip), %rax    # 0x15dd30
movsd 0x5f8(%rax), %xmm2
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm2
jne 0x31074
jnp 0x31098
leaq 0x2dc245(%rip), %rcx    # 0x30d2c0
cmpl $0x0, (%rcx)
je 0x31098
movsd 0x5d8(%rax), %xmm0
divsd %xmm2, %xmm0
jmp 0x310a3
movq %rbx, %rdi
callq 0x9470
jmp 0x310a3
leaq 0x2dbf41(%rip), %rax    # 0x30cfe0
movsd (%rax), %xmm0
testb %r14b, %r14b
jne 0x310b3
leaq 0x30a251(%rip), %rax    # 0x33b300
addsd (%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
movq %rbx, %rdi
movl $0x66, %esi
callq 0x9100
testq %rax, %rax
jne 0x310dc
movq %rbx, %rdi
movl $0x27, %esi
callq 0x9100
testq %rax, %rax
je 0x310f2
movsd -0x18(%rbp), %xmm0
divsd 0xda7bf(%rip), %xmm0    # 0x10b8a8
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movsd -0x18(%rbp), %xmm0
jmp 0x310e9
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
xorpd %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
testq %rdi, %rdi
je 0x31257
movq %rdi, %rsi
leaq 0x30b0fc(%rip), %rbx    # 0x33c220
movq %rbx, %rdi
callq 0x9340
movq %rbx, %rdi
callq 0x9120
testl %eax, %eax
je 0x31257
movl %eax, %r14d
xorpd %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
xorl %r15d, %r15d
movsd 0xd7f1d(%rip), %xmm0    # 0x109070
movapd %xmm0, -0x40(%rbp)
xorl %r12d, %r12d
movsbl (%rbx,%r15), %edi
cmpl $0x2d, %edi
jne 0x31177
movapd -0x40(%rbp), %xmm0
xorpd 0xd803e(%rip), %xmm0    # 0x1091b0
movapd %xmm0, -0x40(%rbp)
callq 0x9700
cmpl $0x4c, %eax
jle 0x311ae
cmpl $0x4d, %eax
je 0x311ce
cmpl $0x53, %eax
je 0x311e8
cmpl $0x57, %eax
jne 0x3123c
movb $0x0, (%rbx,%r15)
movl %r12d, %edi
addq %rbx, %rdi
callq 0x9470
mulsd 0xda75c(%rip), %xmm0    # 0x10b908
jmp 0x3120a
cmpl $0x44, %eax
je 0x311fa
cmpl $0x48, %eax
jne 0x3123c
movb $0x0, (%rbx,%r15)
movl %r12d, %edi
addq %rbx, %rdi
callq 0x9470
jmp 0x31212
movb $0x0, (%rbx,%r15)
movl %r12d, %edi
addq %rbx, %rdi
callq 0x9470
mulsd 0xd7e22(%rip), %xmm0    # 0x109008
jmp 0x31222
movb $0x0, (%rbx,%r15)
movl %r12d, %edi
addq %rbx, %rdi
callq 0x9470
jmp 0x31222
movb $0x0, (%rbx,%r15)
movl %r12d, %edi
addq %rbx, %rdi
callq 0x9470
mulsd 0xd7e2e(%rip), %xmm0    # 0x109040
movsd 0xd7dee(%rip), %xmm1    # 0x109008
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
andpd 0xd7f66(%rip), %xmm0    # 0x109190
movsd -0x28(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x28(%rbp)
leal 0x1(%r15), %r12d
incq %r15
cmpq %r15, %r14
jne 0x3115b
movsd -0x28(%rbp), %xmm0
mulsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3136c
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rsi
leaq 0x30af95(%rip), %rbx    # 0x33c220
movq %rbx, %rdi
callq 0x9340
movq %rbx, %rdi
callq 0x9120
testl %eax, %eax
je 0x31370
movl %eax, %r14d
xorpd %xmm0, %xmm0
xorl %r15d, %r15d
movsd 0xd7dbb(%rip), %xmm1    # 0x109070
movapd %xmm1, -0x40(%rbp)
xorl %r12d, %r12d
movsbl (%rbx,%r15), %edi
cmpl $0x2d, %edi
movsd %xmm0, -0x28(%rbp)
jne 0x312de
movapd -0x40(%rbp), %xmm0
xorpd 0xd7ed7(%rip), %xmm0    # 0x1091b0
movapd %xmm0, -0x40(%rbp)
callq 0x9700
cmpl $0x53, %eax
je 0x3132e
cmpl $0x4d, %eax
je 0x31314
cmpl $0x44, %eax
jne 0x31359
movb $0x0, (%rbx,%r15)
movl %r12d, %edi
addq %rbx, %rdi
callq 0x9470
movsd 0xd7cfe(%rip), %xmm1    # 0x109008
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
jmp 0x3133e
movb $0x0, (%rbx,%r15)
movl %r12d, %edi
addq %rbx, %rdi
callq 0x9470
mulsd 0xd7cdc(%rip), %xmm0    # 0x109008
jmp 0x3133e
movb $0x0, (%rbx,%r15)
movl %r12d, %edi
addq %rbx, %rdi
callq 0x9470
andpd 0xd7e4a(%rip), %xmm0    # 0x109190
movsd -0x28(%rbp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
leal 0x1(%r15), %r12d
jmp 0x3135e
movsd -0x28(%rbp), %xmm0
incq %r15
cmpq %r15, %r14
jne 0x312bd
jmp 0x31381
xorps %xmm0, %xmm0
retq
movsd 0xd7cf8(%rip), %xmm0    # 0x109070
movapd %xmm0, -0x40(%rbp)
xorpd %xmm0, %xmm0
divsd 0xd7c87(%rip), %xmm0    # 0x109010
mulsd -0x40(%rbp), %xmm0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2dbb30(%rip), %rax    # 0x30d510
movl (%rax), %eax
leal -0xd(%rax), %ecx
cmpl $-0xc, %ecx
jae 0x319f4
movsd 0xd9f36(%rip), %xmm0    # 0x10b928
jmp 0x31a26
leaq 0x2db5d5(%rip), %rcx    # 0x30cfd0
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 0x1388df(%rip), %rax    # 0x16a300
movsd (%rax,%rdx,8), %xmm0
popq %rbp
retq