LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x27724
leaq 0x2e8cb9(%rip), %rax    # 0x30c7a8
movb $0x0, (%rax)
leaq 0x317d33(%rip), %rbx    # 0x33b82c
xorl %r14d, %r14d
movl %r14d, (%rbx)
movl $0x69, %edi
callq 0xd846f
leaq 0x3177c4(%rip), %rax    # 0x33b2d4
movzbl (%rax), %eax
leaq 0x2e8c92(%rip), %rcx    # 0x30c7ac
movl %eax, (%rcx)
movl %r14d, (%rbx)
movl $0x75, %edi
callq 0xcf81
movl $0x6a, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0xd846f
// File: /workspace/github_cpp_makefile_star2_O1/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 0x320bd0(%rip), %rbx    # 0x344714
movl $0x1, %eax
cmpq $0x9, %rbx
jg 0x23b9f
leaq 0x3180ee(%rip), %rax    # 0x33bc44
movl (%rax), %eax
imulq $0x20c, %rbx, %rcx      # imm = 0x20C
leaq 0x31f52a(%rip), %rdx    # 0x343090
leaq (%rdx,%rcx), %rdi
movl %eax, 0x204(%rcx,%rdx)
movl 0x31f1d5(%rip), %eax    # 0x342d4c
movl %eax, 0x208(%rcx,%rdx)
leaq 0x317cab(%rip), %rsi    # 0x33b830
callq 0x9340
movl $0x0, 0x31f1b8(%rip)    # 0x342d4c
leal 0x1(%rbx), %eax
movl %eax, 0x320b77(%rip)    # 0x344714
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x320b67(%rip), %rax    # 0x344714
testq %rax, %rax
je 0x23c01
pushq %rbp
movq %rsp, %rbp
decq %rax
movl %eax, 0x320b55(%rip)    # 0x344714
imulq $0x20c, %rax, %rax      # imm = 0x20C
leaq 0x31f4c3(%rip), %rcx    # 0x343090
leaq (%rcx,%rax), %rsi
movl 0x204(%rax,%rcx), %edx
leaq 0x318065(%rip), %rdi    # 0x33bc44
movl %edx, (%rdi)
movl 0x208(%rax,%rcx), %eax
movl %eax, 0x31f15e(%rip)    # 0x342d4c
leaq 0x317c3b(%rip), %rdi    # 0x33b830
callq 0x9340
movl $0x1, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x811da
leaq 0x317e1f(%rip), %rax    # 0x33ba40
cmpb $0x0, (%rax)
je 0x23d15
leaq 0x317e0f(%rip), %rdi    # 0x33ba40
leaq 0xfd6a3(%rip), %rsi     # 0x1212db
callq 0x9a4d
testq %rax, %rax
je 0x23d1e
movq %rax, %rbx
cmpl $0x0, 0x31f438(%rip)    # 0x343088
jle 0x23c8c
leaq 0x31f107(%rip), %r12    # 0x342d60
leaq 0xe9a09(%rip), %r15     # 0x10d669
xorl %r13d, %r13d
movq (%r12), %rdx
testq %rdx, %rdx
je 0x23c79
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x9560
incq %r13
movslq 0x31f405(%rip), %rax    # 0x343088
addq $0x8, %r12
cmpq %rax, %r13
jl 0x23c63
testl %r14d, %r14d
je 0x23cff
leaq 0x31ed68(%rip), %r12    # 0x342a00
xorl %r14d, %r14d
leaq 0xe99d2(%rip), %r15     # 0x10d674
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 0x23ca2
movslq 0x146384(%rip), %r15    # 0x16a050
testq %r15, %r15
jle 0x23cff
incq %r15
leaq 0x31ec95(%rip), %r12    # 0x342970
leaq 0xe999f(%rip), %r14     # 0x10d681
movsd -0x10(%r12,%r15,8), %xmm0
movq %rbx, %rdi
movq %r14, %rsi
movb $0x1, %al
callq 0x9560
decq %r15
cmpq $0x1, %r15
jg 0x23ce2
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9370
leaq 0xe998d(%rip), %rdi     # 0x10d6a9
jmp 0x23d40
leaq 0x3184fb(%rip), %rbx    # 0x33c220
leaq 0xe995c(%rip), %rsi     # 0x10d688
leaq 0x317d0d(%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 0x2326e
// File: /workspace/github_cpp_makefile_star2_O1/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 0x811da
leaq 0x317cdb(%rip), %rax    # 0x33ba40
cmpb $0x0, (%rax)
je 0x23da2
leaq 0x317ccf(%rip), %rdi    # 0x33ba40
xorl %esi, %esi
callq 0x234f0
testl %eax, %eax
je 0x23dab
cmpl $-0x1, %eax
jne 0x23db2
leaq 0x318498(%rip), %rbx    # 0x33c220
leaq 0xe992e(%rip), %rsi     # 0x10d6bd
leaq 0x317caa(%rip), %rdx    # 0x33ba40
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
jmp 0x23db9
leaq 0xe9900(%rip), %rbx     # 0x10d6a9
jmp 0x23db9
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xe9920(%rip), %rbx     # 0x10d6d9
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2326e
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2439b
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 0x243ce
movw $0x20, (%r14,%rcx)
incq %rcx
cmpq $0x3d, %rcx
jne 0x243b9
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_O1/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 0x24853
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x2484d
movq %rbx, %rdi
callq 0x9120
testq %rax, %rax
je 0x24848
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 0x2484d
movl %edx, %esi
incl %edx
cmpq %rsi, %rcx
ja 0x2481f
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x248a4
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x2489e
movq %rbx, %rdi
callq 0x9120
testq %rax, %rax
je 0x24899
movq %rax, %rcx
movl $0x1, %edx
xorl %eax, %eax
xorl %esi, %esi
movb (%rbx,%rsi), %sil
andb $-0x8, %sil
cmpb $0x30, %sil
jne 0x2489e
movl %edx, %esi
incl %edx
cmpq %rsi, %rcx
ja 0x24882
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x248f5
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x248ef
movq %rbx, %rdi
callq 0x9120
testq %rax, %rax
je 0x248ea
movq %rax, %rcx
movl $0x1, %edx
xorl %eax, %eax
xorl %esi, %esi
movb (%rbx,%rsi), %sil
andb $-0x2, %sil
cmpb $0x30, %sil
jne 0x248ef
movl %edx, %esi
incl %edx
cmpq %rsi, %rcx
ja 0x248d3
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x249d7
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x9120
testq %rax, %rax
je 0x249db
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 0x2496a
cmpl $0x2b, %ecx
je 0x2493d
cmpl $0x2d, %ecx
jne 0x24986
xorl %ecx, %ecx
testl %r9d, %r9d
jne 0x249e0
testl %r8d, %r8d
jne 0x249e0
movl $0x1, %r9d
movl $0x0, %r8d
testl %r10d, %r10d
movl $0x0, %r10d
je 0x249b8
jmp 0x249e0
cmpl $0x65, %ecx
je 0x249a1
cmpl $0x2e, %ecx
jne 0x24986
xorl %ecx, %ecx
orl %esi, %edi
movl $0x0, %esi
movl $0x1, %edi
je 0x249b8
jmp 0x249e0
leal -0x30(%rcx), %r10d
cmpb $0x9, %r10b
ja 0x249e9
movsbl %cl, %ecx
testl %esi, %esi
cmovnel %ecx, %r8d
movl $0x1, %r10d
jmp 0x249b8
xorl %r9d, %r9d
movl $0x0, %r10d
movl $0x0, %ecx
testl %esi, %esi
movl $0x1, %esi
jne 0x249e0
movl %edx, %ecx
incl %edx
cmpq %rcx, %rax
ja 0x2492a
testl %esi, %esi
sete %al
testl %r8d, %r8d
setne %cl
orb %al, %cl
movzbl %cl, %ecx
jmp 0x249e0
xorl %ecx, %ecx
jmp 0x249e6
movl $0x1, %ecx
addq $0x8, %rsp
popq %rbx
popq %rbp
movl %ecx, %eax
retq
xorl %ecx, %ecx
jmp 0x249e0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x317046(%rip), %rcx    # 0x33ba40
movb (%rcx), %al
movb 0x1(%rcx), %cl
xorb $0x30, %al
movl %ecx, %edx
xorb $0x78, %dl
orb %al, %dl
jne 0x24a7a
leaq 0x31702f(%rip), %rbx    # 0x33ba40
movq %rbx, %rdi
callq 0x9899
movq %rbx, %rdi
callq 0x9120
xorpd %xmm0, %xmm0
cmpl $0x3, %eax
jb 0x24b20
movl %eax, %eax
movl $0x2, %ecx
movsd 0xe6e03(%rip), %xmm1    # 0x10b840
movsbl (%rbx,%rcx), %edx
leal -0x30(%rdx), %esi
cmpb $0x9, %sil
ja 0x24a4f
addl $-0x30, %edx
jmp 0x24a5e
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 0x24a3d
jmp 0x24b20
movl %ecx, %edx
xorb $0x6f, %dl
orb %al, %dl
jne 0x24ace
leaq 0x316fb6(%rip), %rbx    # 0x33ba40
movq %rbx, %rdi
callq 0x9120
xorpd %xmm0, %xmm0
cmpl $0x3, %eax
jb 0x24b20
movl %eax, %eax
movl $0x2, %ecx
movsd 0xe6d8a(%rip), %xmm1    # 0x10b838
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 0x24aae
jmp 0x24b20
xorb $0x62, %cl
orb %cl, %al
jne 0x24b14
leaq 0x316f64(%rip), %rbx    # 0x33ba40
movq %rbx, %rdi
callq 0x9120
xorpd %xmm0, %xmm0
cmpl $0x3, %eax
jb 0x24b20
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 0x24af4
jmp 0x24b20
leaq 0x316f25(%rip), %rdi    # 0x33ba40
callq 0x9470
movsd 0x31de48(%rip), %xmm1   # 0x342970
movsd %xmm1, 0x31e208(%rip)   # 0x342d38
callq 0x21298
movl $0x0, 0x31e1f1(%rip)    # 0x342d30
movsd 0x31de29(%rip), %xmm0   # 0x342970
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1435c8(%rip), %edx    # 0x16a070
testl %edx, %edx
je 0x26b0d
leaq 0x1435c1(%rip), %r12    # 0x16a074
leaq 0x315766(%rip), %r14    # 0x33c220
leaq 0xe6f93(%rip), %r15     # 0x10da54
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x9060
movl $0xa, %edi
movq %r14, %rsi
movl $0x1, %edx
callq 0x265a5
movq %r14, %rdi
movq %r15, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movl $0xa, %edi
movq %r14, %rsi
movl $0x2, %edx
callq 0x265a5
movl (%r12), %edx
addq $0x4, %r12
testl %edx, %edx
jne 0x26ac1
leaq 0x31570c(%rip), %r14    # 0x33c220
leaq 0xe6f39(%rip), %r15     # 0x10da54
movq %r14, %rdi
movq %r15, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movl $0xa, %edi
movq %r14, %rsi
movl $0x1, %edx
callq 0x265a5
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 0x265a5
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2e5079(%rip), %rax    # 0x30c7a8
cmpb $0x4b, (%rax)
je 0x27784
testl %edi, %edi
jle 0x27786
incl 0x31d012(%rip)          # 0x344750
leaq 0x1f3cc3(%rip), %rax    # 0x21b408
movzbl (%rax), %eax
movl %eax, 0x31cfee(%rip)    # 0x34473c
leaq 0x1f3cbe(%rip), %rax    # 0x21b413
movzbl (%rax), %eax
movl %eax, 0x31cfe2(%rip)    # 0x344740
leaq 0x313c83(%rip), %rax    # 0x33b3e8
movzbl (%rax), %eax
movl %eax, 0x31cfd6(%rip)    # 0x344744
leaq 0x1f3ca0(%rip), %rax    # 0x21b415
movzbl (%rax), %eax
movl %eax, 0x31cfca(%rip)    # 0x344748
movl %edi, 0x31cfc8(%rip)    # 0x34474c
popq %rbp
retq
cmpl $0x0, 0x31cfbf(%rip)    # 0x34474c
je 0x27784
incl 0x31cfbf(%rip)          # 0x344754
movb 0x31cfa1(%rip), %al     # 0x34473c
leaq 0x1f3c66(%rip), %rcx    # 0x21b408
movb %al, (%rcx)
movb 0x31cf96(%rip), %al     # 0x344740
leaq 0x1f3c62(%rip), %rcx    # 0x21b413
movb %al, (%rcx)
movb 0x31cf8b(%rip), %al     # 0x344744
leaq 0x313c28(%rip), %rcx    # 0x33b3e8
movb %al, (%rcx)
movb 0x31cf80(%rip), %al     # 0x344748
leaq 0x1f3c46(%rip), %rcx    # 0x21b415
movb %al, (%rcx)
leaq 0x313afc(%rip), %rax    # 0x33b2d4
cmpb $0x0, (%rax)
je 0x277e9
leaq 0x313acc(%rip), %rax    # 0x33b2b0
movb $0x1, (%rax)
jmp 0x27784
leaq 0x313ac0(%rip), %rax    # 0x33b2b0
movb $0x0, (%rax)
jmp 0x27784
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1f10ae(%rip), %rax    # 0x2188d0
cmpq $0x400, (%rax)          # imm = 0x400
jne 0x27838
leaq 0x1f1012(%rip), %rax    # 0x218844
movl $0x1, (%rax)
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x217713(%rip), %rbx    # 0x23ef58
cmpl $0x0, (%rbx)
je 0x27869
callq 0x27872
movl $0x0, (%rbx)
leaq 0x1f38fc(%rip), %rax    # 0x21b158
movb $0x0, (%rax)
movl $0x1, %edi
callq 0x19792
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2176d9(%rip), %rbx    # 0x23ef58
cmpl $0x0, (%rbx)
je 0x278b7
leaq 0x2e4f1d(%rip), %rax    # 0x30c7a8
cmpb $0x4b, (%rax)
jne 0x278b7
movb $0x0, (%rax)
leaq 0x313f92(%rip), %rax    # 0x33b82c
movl $0x0, (%rax)
movl $0x69, %edi
callq 0xd846f
leaq 0x1f0f93(%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_O1/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 0x217684(%rip), %r14    # 0x23ef58
cmpl %edi, (%r14)
jne 0x278ea
cmpl $0x3f, %ebx
je 0x27937
movl $0x12e, %edi            # imm = 0x12E
callq 0x9d80
jmp 0x27937
leaq 0x2175c7(%rip), %rax    # 0x23eeb8
cmpq $0x0, (%rax)
je 0x27926
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0xf0ad
movl (%r14), %ecx
leaq 0x314915(%rip), %r14    # 0x33c220
leaq 0xe6bb6(%rip), %rsi     # 0x10e4c8
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
callq 0x2326e
leaq 0x1f0eab(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
je 0x27937
callq 0xfb1a
callq 0x27872
leaq 0x1f0eee(%rip), %rax    # 0x218831
cmpb $0x74, (%rax)
jne 0x2795e
leaq 0x1f0f0c(%rip), %rax    # 0x21885b
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x1f0f00(%rip), %rax    # 0x21885a
movb %cl, (%rax)
jmp 0x27989
leaq 0x1f0e73(%rip), %rax    # 0x2187d8
cmpl $0x2, (%rax)
jne 0x27989
movl $0x0, (%rax)
leaq 0x1f0ee4(%rip), %rax    # 0x21885b
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x1f0ed8(%rip), %rax    # 0x21885a
movb %cl, (%rax)
callq 0xfb1a
leaq 0x1f0e48(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
je 0x2799e
popq %rbx
popq %r14
popq %rbp
jmp 0xfb1a
callq 0xed2c
movl $0x1, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x19792
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5f743
testl %eax, %eax
je 0x279d7
leaq 0x1f0f0b(%rip), %rax    # 0x2188d0
cmpq $0x800000, (%rax)       # imm = 0x800000
je 0x279d7
leaq 0xe6b22(%rip), %rax     # 0x10e4f7
jmp 0x27a1d
leaq 0x2e4db6(%rip), %rax    # 0x30c794
cmpl $0x0, (%rax)
je 0x279f8
leaq 0x2e595a(%rip), %rax    # 0x30d344
cmpl $0x0, (%rax)
je 0x27a01
leaq 0xe6b42(%rip), %rax     # 0x10e538
jmp 0x27a1d
leaq 0xe6bf9(%rip), %rax     # 0x10e5f8
jmp 0x27a1d
leaq 0x2e5940(%rip), %rax    # 0x30d348
cmpl $0x0, (%rax)
leaq 0xe6ba6(%rip), %rcx     # 0x10e5b8
leaq 0xe6b5f(%rip), %rax     # 0x10e578
cmoveq %rcx, %rax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3110bc(%rip), %r14    # 0x33fd58
movslq (%r14), %rcx
imulq $0xe8, %rcx, %rax
leaq 0x12f083(%rip), %r15    # 0x15dd30
xorps %xmm0, %xmm0
cmpl $0x0, 0x30(%r15,%rax)
jne 0x2ecc1
leaq (%r15,%rax), %rdx
movsd 0x38(%rdx), %xmm0
cmpl $0x3, %ecx
jne 0x2ece5
leaq 0x2de2d8(%rip), %rax    # 0x30cfa5
movb (%rax), %al
addb $-0x44, %al
cmpb $0xf, %al
jae 0x2ecf1
movzbl %al, %eax
leaq 0x120e41(%rip), %rcx    # 0x14fb20
leaq (%rcx,%rax,8), %rax
jmp 0x2ecec
addq %r15, %rax
addq $0x8, %rax
movq (%rax), %rax
jmp 0x2ecf8
leaq 0xe5d6d(%rip), %rax     # 0x114a65
xorl %ebx, %ebx
cmpb $0x20, (%rax)
sete %bl
addq %rax, %rbx
leaq 0x3105d6(%rip), %rdi    # 0x33f2e0
leaq 0x1062a1(%rip), %rsi    # 0x134fb2
movb $0x1, %al
callq 0x9060
movslq (%r14), %rax
imulq $0xe8, %rax, %rax
movq (%r15,%rax), %rdx
leaq 0x30d4f3(%rip), %r14    # 0x33c220
leaq 0xe5d41(%rip), %rsi     # 0x114a75
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 0x2bc51
// File: /workspace/github_cpp_makefile_star2_O1/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 0x310ff2(%rip), %rbx    # 0x33fd58
movslq (%rbx), %rax
imulq $0xe8, %rax, %rax
leaq 0x12efb9(%rip), %r14    # 0x15dd30
movsd 0xa0(%r14,%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2ed8d
jnp 0x2ed9b
leaq 0x31054c(%rip), %rax    # 0x33f2e0
movw $0x30, (%rax)
jmp 0x2edd9
leaq 0x1e9b2e(%rip), %rcx    # 0x2188d0
cmpq $0x10000, (%rcx)        # imm = 0x10000
jne 0x2edb9
leaq 0x31052e(%rip), %rax    # 0x33f2e0
movw $0x31, (%rax)
jmp 0x2edd9
addq %r14, %rax
movsd 0x98(%rax), %xmm0
leaq 0x310515(%rip), %rdi    # 0x33f2e0
leaq 0x100615(%rip), %rsi    # 0x12f3e7
movb $0x1, %al
callq 0x9060
leaq 0x310f8c(%rip), %rax    # 0x33fd6c
movslq (%rbx), %rcx
imulq $0xe8, %rcx, %rcx
cmpl $0x0, (%rax)
movq (%r14,%rcx), %rdx
leaq 0x30d428(%rip), %rdi    # 0x33c220
je 0x2ee0a
leaq 0xe5cb1(%rip), %rsi     # 0x114ab2
xorl %eax, %eax
callq 0x9060
jmp 0x2ee1f
leaq 0xe5cfa(%rip), %rsi     # 0x114b0b
leaq 0xe5c94(%rip), %rcx     # 0x114aac
xorl %eax, %eax
callq 0x9060
leaq 0x30d3fa(%rip), %rsi    # 0x33c220
movl $0x3d, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x2bc51
// File: /workspace/github_cpp_makefile_star2_O1/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 0x31049e(%rip), %rax    # 0x33f2e0
movb $0x0, (%rax)
leaq 0x310f0c(%rip), %r14    # 0x33fd58
movslq (%r14), %rax
imulq $0xe8, %rax, %rax
leaq 0x12eed3(%rip), %rbx    # 0x15dd30
cmpl $0x0, 0x1c(%rbx,%rax)
je 0x2ee81
addq %rbx, %rax
movsd 0x28(%rax), %xmm0
leaq 0x31046d(%rip), %rdi    # 0x33f2e0
leaq 0xe5e55(%rip), %rsi     # 0x114ccf
movb $0x1, %al
callq 0x9060
movslq (%r14), %rax
cmpq $0x2, %rax
je 0x2eeb0
cmpl $0x3, %eax
jne 0x2eeb9
leaq 0x2de10f(%rip), %rcx    # 0x30cfa5
movb (%rcx), %cl
addb $-0x44, %cl
cmpb $0xf, %cl
jae 0x2eecc
movzbl %cl, %ecx
leaq 0x120cee(%rip), %rdx    # 0x14fb98
leaq (%rdx,%rcx,8), %rcx
jmp 0x2eec7
leaq 0x1007cd(%rip), %rdx    # 0x12f684
jmp 0x2eed3
imulq $0xe8, %rax, %rcx
addq %rbx, %rcx
addq $0x8, %rcx
movq (%rcx), %rdx
jmp 0x2eed3
leaq 0xe7763(%rip), %rdx     # 0x116636
xorl %ecx, %ecx
cmpb $0x20, (%rdx)
sete %cl
addq %rdx, %rcx
imulq $0xe8, %rax, %rax
movq (%rbx,%rax), %rdx
leaq 0x30d330(%rip), %rbx    # 0x33c220
leaq 0xe5c64(%rip), %rsi     # 0x114b5b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x43, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2bc51
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1ebfed(%rip), %rax    # 0x21b338
movq (%rax), %rax
testq %rax, %rax
jle 0x2f378
cvtsi2sd %rax, %xmm0
leaq 0x1e9525(%rip), %rax    # 0x218884
cvtsi2sdl (%rax), %xmm1
xorl %eax, %eax
xorpd %xmm2, %xmm2
subsd %xmm1, %xmm0
incq %rax
ucomisd %xmm2, %xmm0
ja 0x2f369
jmp 0x2f37a
xorl %eax, %eax
cmpq $0x1, %rax
adcq $0x0, %rax
leaq 0x1ec017(%rip), %rcx    # 0x21b3a0
movq %rax, (%rcx)
testl %edi, %edi
je 0x2f3c4
movq (%rcx), %rax
leaq 0x1ec01e(%rip), %rcx    # 0x21b3b8
movq %rax, (%rcx)
leaq 0x1ec020(%rip), %rax    # 0x21b3c4
movb $0x1, (%rax)
leaq 0x1ebf56(%rip), %rax    # 0x21b304
movl $0x0, (%rax)
movl $0x14f, %edi            # imm = 0x14F
movl $0x1, %esi
popq %rbp
jmp 0x1c791
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x30e6f
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x30e7b0(%rip), %rbx    # 0x33f608
movw $0x3a, (%rbx)
xorl %esi, %esi
callq 0x2f670
movw $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x30eb2
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x986c
movzbl (%rbx), %eax
cmpl $0x2a, %eax
je 0x30ebb
cmpl $0x2d, %eax
je 0x30ea4
cmpl $0x2b, %eax
jne 0x30eb6
cmpb $0x2b, 0x1(%rbx)
je 0x30eaa
cmpb $0x2d, %al
jne 0x30eb6
cmpb $0x2d, 0x1(%rbx)
jne 0x30eb6
incq %rbx
xorl %r14d, %r14d
jmp 0x30ec5
xorps %xmm0, %xmm0
retq
movb $0x1, %r14b
jmp 0x30ec5
xorl %r14d, %r14d
leaq 0xf046b(%rip), %rbx     # 0x121330
movq %rbx, %rdi
movl $0x61, %esi
callq 0x9100
testq %rax, %rax
je 0x30f1e
leaq 0x12ce52(%rip), %rcx    # 0x15dd30
movsd 0x5f8(%rcx), %xmm2
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm2
jne 0x30ef2
jnp 0x30f0c
leaq 0x2dc3c7(%rip), %rdx    # 0x30d2c0
cmpl $0x0, (%rdx)
je 0x30f0c
movsd 0x5d8(%rcx), %xmm0
divsd %xmm2, %xmm0
jmp 0x30f26
testq %rax, %rax
je 0x30f1e
leaq 0x2dc0c8(%rip), %rax    # 0x30cfe0
movsd (%rax), %xmm0
jmp 0x30f26
movq %rbx, %rdi
callq 0x9470
testb %r14b, %r14b
jne 0x30f36
leaq 0x30a3ce(%rip), %rax    # 0x33b300
addsd (%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
movq %rbx, %rdi
movl $0x66, %esi
callq 0x9100
testq %rax, %rax
jne 0x30f5f
movq %rbx, %rdi
movl $0x27, %esi
callq 0x9100
testq %rax, %rax
je 0x30f75
movsd -0x18(%rbp), %xmm0
divsd 0xda92c(%rip), %xmm0    # 0x10b898
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movsd -0x18(%rbp), %xmm0
jmp 0x30f6c
// File: /workspace/github_cpp_makefile_star2_O1/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 0x310da
movq %rdi, %rsi
leaq 0x30b279(%rip), %rbx    # 0x33c220
movq %rbx, %rdi
callq 0x9340
movq %rbx, %rdi
callq 0x9120
testl %eax, %eax
je 0x310da
movl %eax, %r14d
xorpd %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
xorl %r15d, %r15d
movsd 0xd809a(%rip), %xmm0    # 0x109070
movapd %xmm0, -0x40(%rbp)
xorl %r12d, %r12d
movsbl (%rbx,%r15), %edi
cmpl $0x2d, %edi
jne 0x30ffa
movapd -0x40(%rbp), %xmm0
xorpd 0xd81ab(%rip), %xmm0    # 0x1091a0
movapd %xmm0, -0x40(%rbp)
callq 0x9700
cmpl $0x4c, %eax
jle 0x31031
cmpl $0x4d, %eax
je 0x31051
cmpl $0x53, %eax
je 0x3106b
cmpl $0x57, %eax
jne 0x310bf
movb $0x0, (%rbx,%r15)
movl %r12d, %edi
addq %rbx, %rdi
callq 0x9470
mulsd 0xda8d1(%rip), %xmm0    # 0x10b900
jmp 0x3108d
cmpl $0x44, %eax
je 0x3107d
cmpl $0x48, %eax
jne 0x310bf
movb $0x0, (%rbx,%r15)
movl %r12d, %edi
addq %rbx, %rdi
callq 0x9470
jmp 0x31095
movb $0x0, (%rbx,%r15)
movl %r12d, %edi
addq %rbx, %rdi
callq 0x9470
mulsd 0xd7f9f(%rip), %xmm0    # 0x109008
jmp 0x310a5
movb $0x0, (%rbx,%r15)
movl %r12d, %edi
addq %rbx, %rdi
callq 0x9470
jmp 0x310a5
movb $0x0, (%rbx,%r15)
movl %r12d, %edi
addq %rbx, %rdi
callq 0x9470
mulsd 0xd7fab(%rip), %xmm0    # 0x109040
movsd 0xd7f6b(%rip), %xmm1    # 0x109008
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
andpd 0xd80d3(%rip), %xmm0    # 0x109180
movsd -0x28(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x28(%rbp)
leal 0x1(%r15), %r12d
incq %r15
cmpq %r15, %r14
jne 0x30fde
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_O1/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 0x311ef
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rsi
leaq 0x30b112(%rip), %rbx    # 0x33c220
movq %rbx, %rdi
callq 0x9340
movq %rbx, %rdi
callq 0x9120
testl %eax, %eax
je 0x311f3
movl %eax, %r14d
xorpd %xmm0, %xmm0
xorl %r15d, %r15d
movsd 0xd7f38(%rip), %xmm1    # 0x109070
movapd %xmm1, -0x40(%rbp)
xorl %r12d, %r12d
movsbl (%rbx,%r15), %edi
cmpl $0x2d, %edi
movsd %xmm0, -0x28(%rbp)
jne 0x31161
movapd -0x40(%rbp), %xmm0
xorpd 0xd8044(%rip), %xmm0    # 0x1091a0
movapd %xmm0, -0x40(%rbp)
callq 0x9700
cmpl $0x53, %eax
je 0x311b1
cmpl $0x4d, %eax
je 0x31197
cmpl $0x44, %eax
jne 0x311dc
movb $0x0, (%rbx,%r15)
movl %r12d, %edi
addq %rbx, %rdi
callq 0x9470
movsd 0xd7e7b(%rip), %xmm1    # 0x109008
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
jmp 0x311c1
movb $0x0, (%rbx,%r15)
movl %r12d, %edi
addq %rbx, %rdi
callq 0x9470
mulsd 0xd7e59(%rip), %xmm0    # 0x109008
jmp 0x311c1
movb $0x0, (%rbx,%r15)
movl %r12d, %edi
addq %rbx, %rdi
callq 0x9470
andpd 0xd7fb7(%rip), %xmm0    # 0x109180
movsd -0x28(%rbp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
leal 0x1(%r15), %r12d
jmp 0x311e1
movsd -0x28(%rbp), %xmm0
incq %r15
cmpq %r15, %r14
jne 0x31140
jmp 0x31204
xorps %xmm0, %xmm0
retq
movsd 0xd7e75(%rip), %xmm0    # 0x109070
movapd %xmm0, -0x40(%rbp)
xorpd %xmm0, %xmm0
divsd 0xd7e04(%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_O1/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 0x2dbcba(%rip), %rax    # 0x30d510
movl (%rax), %eax
leal -0xd(%rax), %ecx
cmpl $-0xc, %ecx
jae 0x3186a
movsd 0xda0b8(%rip), %xmm0    # 0x10b920
jmp 0x3189c
leaq 0x2db75f(%rip), %rcx    # 0x30cfd0
cmpl $0x7, %eax
movl $0xfffffffa, %edx       # imm = 0xFFFFFFFA
movl $0x6, %esi
cmovgel %edx, %esi
xorl %edx, %edx
xorpd %xmm0, %xmm0
ucomisd (%rcx), %xmm0
cmoval %esi, %edx
addl %eax, %edx
leaq 0x138a69(%rip), %rax    # 0x16a300
movsd (%rax,%rdx,8), %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: edit_lla_ref_cmd()
void edit_lla_ref_cmd()
{
int err;
double old_lat, old_lon, old_alt;

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

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

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

      rebuild_lla_plot(0);
      need_redraw = 3201;
   }

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x30947c(%rip), %rax    # 0x33b2f0
movsd (%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
leaq 0x309474(%rip), %r14    # 0x33b2f8
movsd (%r14), %xmm0
movsd %xmm0, -0x38(%rbp)
leaq 0x30946b(%rip), %r15    # 0x33b300
movsd (%r15), %xmm0
movsd %xmm0, -0x30(%rbp)
leaq 0x30946a(%rip), %r12    # 0x33b310
movsd (%r12), %xmm0
movsd %xmm0, (%rax)
leaq 0x309461(%rip), %r13    # 0x33b318
movsd (%r13), %xmm0
movsd %xmm0, (%r14)
leaq 0x309457(%rip), %rbx    # 0x33b320
movsd (%rbx), %xmm0
movsd %xmm0, (%r15)
leaq 0x30d407(%rip), %rdi    # 0x33f2e0
callq 0x31440
cmpl $0x5, %eax
ja 0x31f71
movl %eax, %eax
leaq 0xda104(%rip), %rcx     # 0x10bff4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x3093f0(%rip), %rax    # 0x33b2f0
movsd (%rax), %xmm0
movsd %xmm0, (%r12)
movsd (%r14), %xmm0
movsd %xmm0, (%r13)
movsd (%r15), %xmm0
movsd %xmm0, (%rbx)
leaq 0x30941b(%rip), %rax    # 0x33b340
movl $0x1, (%rax)
xorl %edi, %edi
callq 0xfbd5d
leaq 0x1e690b(%rip), %rax    # 0x218844
movl $0xc81, (%rax)          # imm = 0xC81
jmp 0x31f71
leaq 0xe3144(%rip), %rdi     # 0x11508c
jmp 0x31f6c
leaq 0xe3114(%rip), %rdi     # 0x115065
jmp 0x31f6c
leaq 0xe311f(%rip), %rdi     # 0x115079
jmp 0x31f6c
leaq 0xe30ef(%rip), %rdi     # 0x115052
jmp 0x31f6c
leaq 0xe315a(%rip), %rdi     # 0x1150c6
callq 0x2326e
leaq 0x309378(%rip), %rax    # 0x33b2f0
movsd -0x40(%rbp), %xmm0
movsd %xmm0, (%rax)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, (%r14)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%r15)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: edit_lla_cmd(int)
void edit_lla_cmd(int type)
{
int err;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x30d32d(%rip), %rdi    # 0x33f2e0
callq 0x31440
cmpl $0x5, %eax
ja 0x32041
movl %eax, %eax
leaq 0xda042(%rip), %rcx     # 0x10c00c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x20cf64(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x32048
leaq 0x30930a(%rip), %rax    # 0x33b2f0
movsd (%rax), %xmm0
leaq 0x309307(%rip), %rax    # 0x33b2f8
movsd (%rax), %xmm1
leaq 0x309304(%rip), %rax    # 0x33b300
movsd (%rax), %xmm2
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x67349
leaq 0xe307a(%rip), %rdi     # 0x11508c
jmp 0x32036
leaq 0xe304a(%rip), %rdi     # 0x115065
jmp 0x32036
leaq 0xe3055(%rip), %rdi     # 0x115079
jmp 0x32036
leaq 0xe3025(%rip), %rdi     # 0x115052
jmp 0x32036
leaq 0xe3090(%rip), %rdi     # 0x1150c6
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2326e
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl $0xa, %edi
callq 0xfaae1
movl $0xa, %edi
callq 0x715ee
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xfae54