LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: get_script()
int get_script()
{
int i;

   // read a simulated keystroke from a script file
   i = fgetc(script_file);
   if(i < 0) {  // end of file
      close_script(0);
      return 0;
   }
   else if((i == 0x00) || (i == 0x01)) { // two byte cursor char
      i = fgetc(script_file);
      if(i < 0) {
         close_script(0);
         return 0;
      }
      i += 0x0100;
   }
   else if((skip_comment == 0) && (i == '~')) { // switch input to keyboard
      script_pause = 1;
      return 0;
   }

   if(i == 0x0A) i = 0x0D; // CR and LF are the same
   if(i == 0x0D) {         // end of line
      ++script_line;
      script_col = 0;
      skip_comment = 0;
   }
   else ++script_col;

   if(skip_comment) return 0;
   return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x221e1c(%rip), %rdi    # 0x23eeb8
callq 0x95f0
testl %eax, %eax
js 0x1d0c1
cmpl $0x1, %eax
ja 0x1d0cc
movq 0x221e07(%rip), %rdi    # 0x23eeb8
callq 0x95f0
testl %eax, %eax
js 0x1d0c1
addl $0x100, %eax            # imm = 0x100
jmp 0x1d0e5
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x1ce49
jmp 0x1d11f
cmpl $0x7e, %eax
jne 0x1d0e5
cmpb $0x0, 0x221df9(%rip)    # 0x23eed1
jne 0x1d0e5
movb $0x1, 0x221def(%rip)    # 0x23eed0
xorl %ebx, %ebx
jmp 0x1d11f
cmpl $0xd, %eax
je 0x1d0ef
cmpl $0xa, %eax
jne 0x1d105
incl 0x221dcb(%rip)          # 0x23eec0
movb $0x0, 0x221dd5(%rip)    # 0x23eed1
xorl %ecx, %ecx
movl $0xd, %ebx
jmp 0x1d119
movl 0x221db9(%rip), %ecx    # 0x23eec4
incl %ecx
xorl %ebx, %ebx
cmpb $0x0, 0x221dbb(%rip)    # 0x23eed1
cmovel %eax, %ebx
movl %ecx, 0x221da5(%rip)    # 0x23eec4
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: process_script_file()
int process_script_file()
{
int i;

   if(script_fault) {  // error in script,  abort
      close_script(1);
      getting_string = 0;
      alarm_wait = 0;
      return 0;
   }
   else if(KBHIT()) {  // key pressed,  abort script
      i = edit_error("Script aborted...  key pressed.");
      close_script(1);
      getting_string = 0;
      alarm_wait = 0;
      return 0;
   }
   else if(alarm_wait && (alarm_time || alarm_date || egg_timer || egg_val)) { // script is waiting for an alarm to trigger
      return 0;
   }
   else {   // get keyboard command from the script file  // !!!!!! what about force_si_cmd?
      i = get_script();
      if(i) do_kbd(i);
      return i;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0x0, 0x221d97(%rip)    # 0x23eecc
jne 0x1d1b3
callq 0xa80b
mulsd 0xebef4(%rip), %xmm0    # 0x109038
addsd 0xebf0c(%rip), %xmm0    # 0x109058
movsd %xmm0, 0x2f0444(%rip)   # 0x30d598
movl 0x322eea(%rip), %eax    # 0x340044
cmpl 0x322ee8(%rip), %eax    # 0x340048
jne 0x1d1a7
cmpb $0x0, 0x2f0db1(%rip)    # 0x30df1a
je 0x1d193
xorl %ebx, %ebx
cmpl $0x0, 0x2f0da8(%rip)    # 0x30df1c
jne 0x1d1cf
cmpl $0x0, 0x2f0daf(%rip)    # 0x30df2c
jne 0x1d1cf
cmpq $0x0, 0x2f0d81(%rip)    # 0x30df08
jne 0x1d1cf
cmpq $0x0, 0x2f0d7f(%rip)    # 0x30df10
jne 0x1d1cf
callq 0x1d08f
testl %eax, %eax
je 0x1d1cd
movl %eax, %ebx
movl %eax, %edi
callq 0x469dc
jmp 0x1d1cf
leaq 0xeda8b(%rip), %rdi     # 0x10ac39
callq 0x23027
movl $0x1, %edi
callq 0x1ce49
movw $0x0, 0x322442(%rip)    # 0x33f608
movb $0x0, 0x2f0d4d(%rip)    # 0x30df1a
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: get_device_messages(int)
void get_device_messages(int serial_avail)
{
   // process any data from the various input devices

   if(serial_avail && (((rcvr_type == NO_RCVR) || (rcvr_type == TIDE_RCVR)) || com[RCVR_PORT].process_com || sim_file)) {  // we have receiver serial data to process
      get_rcvr_message();  // process the incoming GPS messages
      system_busy = 2;
   }
   process_extra_ports(1);  // process the extra devices
}

// Assembly:
testl %edi, %edi
je 0x1e5c3
movq 0x1fa2a3(%rip), %rax    # 0x2188d0
cmpq $0x400, %rax            # imm = 0x400
je 0x1e654
cmpq $0x800000, %rax         # imm = 0x800000
je 0x1e654
cmpl $0x0, 0x307690(%rip)    # 0x325cd4
jne 0x1e654
cmpq $0x0, 0x21fd72(%rip)    # 0x23e3c0
je 0x1e5c3
pushq %rbp
movq %rsp, %rbp
callq 0xc0e87
movb $0x2, 0x3189c4(%rip)    # 0x337028
popq %rbp
jmp 0x1e5c3
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: check_com_timer(unsigned int)
int check_com_timer(unsigned port)
{
double to;

   // see if no data from com port for last com_timeout msecs

   update_pwm();
   if(port >= NUM_COM_PORTS) return 0;

   to = com[port].last_com_time + com[port].com_timeout;
   if(to < this_msec) {  // com data lost
      com[port].last_com_time = this_msec;
      if(com[port].com_data_lost == DATA_LOSS_REINIT) com[port].com_data_lost = DATA_LOSS_NO_INIT;
      else                                            com[port].com_data_lost = DATA_LOSS_REINIT;
   }

   return com[port].com_data_lost;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
callq 0xd1efe
xorl %eax, %eax
cmpl $0x12, %ebx
ja 0x1e6e5
movl %ebx, %eax
imulq $0x2260, %rax, %rax     # imm = 0x2260
leaq 0x2efc52(%rip), %rcx    # 0x30e2e0
movsd 0x2248(%rax,%rcx), %xmm1
addsd 0x2238(%rax,%rcx), %xmm1
addq %rcx, %rax
movsd 0x2ef0bd(%rip), %xmm0   # 0x30d768
ucomisd %xmm1, %xmm0
jbe 0x1e6d0
movsd %xmm0, 0x2248(%rax)
cmpb $0x1, 0x2250(%rax)
jne 0x1e6d9
movb $0x2, 0x2250(%rax)
movl $0x2, %eax
jmp 0x1e6e5
movzbl 0x2250(%rax), %eax
jmp 0x1e6e5
movb $0x1, 0x2250(%rax)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: recover_com(unsigned int)
int recover_com(unsigned port)
{
    // attempt to restart a port after a receive timeout

   if(port >= NUM_COM_PORTS) return (-1);         // bad port number
   if(com[port].user_disabled_com)  return (-2);  // disabled port
   if(com[port].com_running <= 0) return (-3);    // port not init'd
   if(com[port].com_data_lost != DATA_LOSS_REINIT) return (-4);  // not timeout out or recovery failed
   if(com[port].com_recover == 0) return (-5);    // com recovery disabled on the port
   if(com[port].com_port || com[port].usb_port || com[port].IP_addr[0]) ;
   else return (-6); // port not assigned to a device or IP address

   com[port].com_data_lost = DATA_LOSS_NO_INIT;  // prevents futile re-init attempts
   if(com[port].process_com) {
      init_com(port, 3);
      return 1;
   }
   else {
      com[port].process_com = 2;
      if(com[port].com_running) {
         init_com(port, 4);
         return 2;
      }
   }
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x12, %edi
ja 0x1e71b
movl %edi, %eax
imulq $0x2260, %rax, %rcx     # imm = 0x2260
leaq 0x2efbd4(%rip), %rax    # 0x30e2e0
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
cmpl $0x0, 0x2228(%rcx,%rax)
je 0x1e724
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
addq %rcx, %rax
cmpl $0x0, 0x2230(%rax)
jle 0x1e786
movl $0xfffffffc, %ebx       # imm = 0xFFFFFFFC
cmpb $0x1, 0x2250(%rax)
jne 0x1e71b
cmpl $0x0, 0x2254(%rax)
je 0x1e78d
cmpl $0x0, (%rax)
jne 0x1e75b
cmpl $0x0, 0x4(%rax)
jne 0x1e75b
cmpb $0x0, 0x10d(%rax)
je 0x1e794
movb $0x2, 0x2250(%rax)
movl $0x1, %ebx
cmpl $0x0, 0x2234(%rax)
jne 0x1e77f
movl $0x2, 0x2234(%rax)
movl $0x2, %ebx
callq 0xb49e
jmp 0x1e71b
movl $0xfffffffd, %ebx       # imm = 0xFFFFFFFD
jmp 0x1e71b
movl $0xfffffffb, %ebx       # imm = 0xFFFFFFFB
jmp 0x1e71b
movl $0xfffffffa, %ebx       # imm = 0xFFFFFFFA
jmp 0x1e71b
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: sound_tick_clock()
void sound_tick_clock()
{
   // play the tick clock sounds

   if(minute_tick && (tick_clock & 0x02)) {
      if(minute_file) play_tune(MINUTE_FILE, 1); // minute tick sound
      else BEEP(16);
   }
   else if(tick_clock & 0x01) {
      if(seconds_file) play_tune(SECONDS_FILE, 1);
      else if(click_file) play_tune(CLICK_FILE, 1);
      else BEEP(17);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, 0x2ef5b5(%rip)    # 0x30df00
sete %cl
movb 0x2ef598(%rip), %al     # 0x30deec
testb $0x2, %al
sete %dl
orb %cl, %dl
je 0x1e963
testb $0x1, %al
jne 0x1e975
popq %rbp
retq
cmpb $0x0, 0x2ef957(%rip)    # 0x30e2c1
je 0x1e987
leaq 0xead54(%rip), %rdi     # 0x1096c7
jmp 0x1e9a2
cmpb $0x0, 0x2ef946(%rip)    # 0x30e2c2
je 0x1e992
leaq 0xead55(%rip), %rdi     # 0x1096da
jmp 0x1e9a2
movl $0x10, %edi
popq %rbp
jmp 0x9d78
cmpb $0x0, 0x2ef92f(%rip)    # 0x30e2c8
je 0x1e9ad
leaq 0xead13(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
popq %rbp
jmp 0x9ccb
movl $0x11, %edi
jmp 0x1e98c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: fine_tick_check()
void fine_tick_check()
{
   // This routine attempts to provide an audible tick clock where the ticks
   // occur the the "true" second instead of when the receiver time message
   // arrives.  It does this by having silly_clocks() set a triiger
   // variable (in milliseconds). When this number of milliseconds has elapsed
   // the tick sound(s) are played.  The trigger variable is checked in
   // wherever the serial port is polled for input characters.

   if(fine_tick_clock == 0) return;   // fine tick clock not active
   if(tick_clock == 0) return;        // singing clock not in tick clock mode
   if(fine_tick_msec < 0.0) return;   // trigger already used
   if(GetMsecs() < fine_tick_msec) return;  // trigger time not elasped

   fine_tick_msec = (-1.0);   // flag trigger has been used
   sound_tick_clock();
}

// Assembly:
cmpl $0x0, 0x2ef535(%rip)    # 0x30def0
je 0x1e9f4
cmpb $0x0, 0x2ef528(%rip)    # 0x30deec
je 0x1e9f4
xorpd %xmm0, %xmm0
ucomisd 0x2ef526(%rip), %xmm0   # 0x30def8
ja 0x1e9f4
pushq %rbp
movq %rsp, %rbp
callq 0xa80b
mulsd 0xea653(%rip), %xmm0    # 0x109038
movsd 0x2ef50b(%rip), %xmm1   # 0x30def8
ucomisd %xmm0, %xmm1
popq %rbp
jbe 0x1e9f5
retq
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0x2ef4f2(%rip)    # 0x30def8
jmp 0x1e940
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: reset_com_timer(unsigned int)
void reset_com_timer(unsigned port)
{
   // reset the com port data loss timer

   update_pwm();
   if(port >= NUM_COM_PORTS) return;

   com[port].last_com_time = this_msec;
   com[port].com_data_lost = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
callq 0xd1efe
cmpl $0x12, %ebx
ja 0x1ea46
movsd 0x2eed43(%rip), %xmm0   # 0x30d768
movl %ebx, %eax
imulq $0x2260, %rax, %rax     # imm = 0x2260
leaq 0x2ef8ab(%rip), %rcx    # 0x30e2e0
movsd %xmm0, 0x2248(%rax,%rcx)
movb $0x0, 0x2250(%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: get_log_file()
void get_log_file()
{
int i;

   if(read_log[0]) {       // user specified a log file to read in
      first_key = ' ';
      i = reload_log(read_log, 1);
      if(i == 0) {         // log file found
         plot_review(0L);  // enter plot review mode to start plot at first point
         #ifdef ADEV_STUFF
            force_adev_redraw(5);    // and make sure adev tables are showing
         #endif
         pause_data = user_pause_data^1;
      }
      reset_first_key(1);
      prot_menu = 0;
      draw_plot(REFRESH_SCREEN);
   }
}

// Assembly:
cmpb $0x0, 0x21e127(%rip)    # 0x23cd60
je 0x1ec99
pushq %rbp
movq %rsp, %rbp
movl $0x20, 0x22030f(%rip)   # 0x23ef58
leaq 0x21e110(%rip), %rdi    # 0x23cd60
movl $0x1, %esi
callq 0xd8f7c
testl %eax, %eax
jne 0x1ec7d
xorl %edi, %edi
callq 0x1c60b
movl $0x5, %edi
callq 0xd8ba5
movb 0x1fc5c0(%rip), %al     # 0x21b235
xorb $0x1, %al
movb %al, 0x1fc5b7(%rip)     # 0x21b234
movl $0x1, %edi
callq 0x275c7
movb $0x0, 0x1fc4ca(%rip)    # 0x21b158
movl $0x1, %edi
popq %rbp
jmp 0x197ae
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: show_term_screen(unsigned int)
void show_term_screen(unsigned port)
{
int row;
int col;
int c;
int left;

   // copy the teminal screen image buffer to the screen

   left = 0;
   erase_screen();
   for(row=0; row<term_rows; row++) {
      for(col=0; col<term_cols; col++) {
         c = term_screen[row][col];
         c &= 0xFF;
         if((col == term_col) && (row == term_row)) {  // blinking cursor
            if(blinker) dot_char((col+left)*TEXT_WIDTH, row*TEXT_HEIGHT, TERM_CURSOR, WHITE);  // header lines
            else        dot_char((col+left)*TEXT_WIDTH, row*TEXT_HEIGHT, TERM_CURSOR, BLACK);  // header lines
         }
         if(c == 0) break;

         if(row < term_header_lines) dot_char((col+left)*TEXT_WIDTH, row*TEXT_HEIGHT, c&0x7F, WHITE);  // header lines
         else if(c & 0x80) {
            dot_char((col+left)*TEXT_WIDTH, row*TEXT_HEIGHT, c&0x7F, YELLOW);   // user input chars
         }
         else dot_char((col+left)*TEXT_WIDTH, row*TEXT_HEIGHT, c&0x7F, GREEN);  // received chars
      }
   }
   refresh_page();

   reset_com_timer(port);
   term_changed = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, -0x2c(%rbp)
callq 0xeceb
movl 0x323a5f(%rip), %eax    # 0x342770
testl %eax, %eax
jle 0x1ee0f
leaq 0x321910(%rip), %r14    # 0x340630
xorl %r15d, %r15d
movl $0xf, %r12d
cmpl $0x0, 0x323a44(%rip)    # 0x342774
jle 0x1edf9
xorl %r13d, %r13d
movb (%r14,%r13), %bl
movl 0x21f6f1(%rip), %eax    # 0x23e434
cmpq %rax, %r13
jne 0x1ed7d
movl 0x21f6e2(%rip), %eax    # 0x23e430
cmpq %rax, %r15
jne 0x1ed7d
movl 0x323ac7(%rip), %ecx    # 0x342820
movl 0x1f9ab1(%rip), %edi    # 0x218810
imull %r13d, %edi
movl 0x1f9aab(%rip), %esi    # 0x218814
imull %r15d, %esi
testl %ecx, %ecx
cmovnel %r12d, %ecx
movl $0x5f, %edx
callq 0xdfa5
testb %bl, %bl
je 0x1edf3
movslq 0x3239f4(%rip), %rax    # 0x34277c
cmpq %rax, %r15
jge 0x1edae
movl 0x1f9a7d(%rip), %edi    # 0x218810
imull %r13d, %edi
movl 0x1f9a77(%rip), %esi    # 0x218814
imull %r15d, %esi
andb $0x7f, %bl
movzbl %bl, %edx
movl $0xf, %ecx
jmp 0x1eddb
movl 0x1f9a5c(%rip), %edi    # 0x218810
imull %r13d, %edi
movl 0x1f9a56(%rip), %esi    # 0x218814
imull %r15d, %esi
testb %bl, %bl
js 0x1edd0
movzbl %bl, %edx
movl $0xa, %ecx
jmp 0x1eddb
andb $0x7f, %bl
movzbl %bl, %edx
movl $0xe, %ecx
callq 0xdfa5
incq %r13
movslq 0x32398a(%rip), %rax    # 0x342774
cmpq %rax, %r13
jl 0x1ed39
movl 0x323977(%rip), %eax    # 0x342770
incq %r15
movslq %eax, %rcx
addq $0x85, %r14
cmpq %rcx, %r15
jl 0x1ed29
callq 0xab54
callq 0xd1efe
movl -0x2c(%rbp), %eax
cmpl $0x12, %eax
ja 0x1ee4a
movsd 0x2ee93f(%rip), %xmm0   # 0x30d768
movl %eax, %eax
imulq $0x2260, %rax, %rax     # imm = 0x2260
leaq 0x2ef4a7(%rip), %rcx    # 0x30e2e0
movsd %xmm0, 0x2248(%rax,%rcx)
movb $0x0, 0x2250(%rax,%rcx)
movl $0x0, 0x323924(%rip)    # 0x342778
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/heather.cpp
// Function: scroll_up(unsigned int)
void scroll_up(unsigned port)
{
int row;

   // scroll the terminal image buffer up a line and send it to the screen

   if(term_row >= (term_rows-1)) {  // scroll up a line
      for(row=term_header_lines; row<term_rows-1; row++) {
         strcpy(&term_screen[row][0], &term_screen[row+1][0]);
      }
      term_screen[term_rows-1][0] = 0;
   }

   ++term_row;
   if(term_row >= term_rows) {  // scroll up a line
      term_row = term_rows-1;
   }
   term_screen[term_row][0] = 0;

   show_term_screen(port);
// if((zoom_screen == 'H') && ZOOM_SLEEP) Sleep(ZOOM_SLEEP);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl 0x21f5b5(%rip), %r15d   # 0x23e430
movslq 0x3238ee(%rip), %r12    # 0x342770
leaq -0x1(%r12), %rax
movl %eax, %r13d
cmpl %eax, %r15d
jl 0x1eeec
movslq 0x3238e6(%rip), %rbx    # 0x34277c
leaq 0x321793(%rip), %rcx    # 0x340630
cmpl %r13d, %ebx
jge 0x1eee1
movl %edi, -0x2c(%rbp)
movslq %r13d, %rax
movq %rax, -0x38(%rbp)
imulq $0x85, %rbx, %rdi
addq %rcx, %rdi
notq %rbx
addq %r12, %rbx
leaq 0x85(%rdi), %r14
movq %r14, %rsi
callq 0x9340
movq %r14, %rdi
decq %rbx
jne 0x1eebc
movl -0x2c(%rbp), %edi
movq -0x38(%rbp), %rax
leaq 0x32174f(%rip), %rcx    # 0x340630
imulq $0x85, %rax, %rax
movb $0x0, (%rax,%rcx)
incl %r15d
cmpl %r12d, %r15d
cmovgel %r13d, %r15d
movl %r15d, 0x21f533(%rip)   # 0x23e430
movslq %r15d, %rax
imulq $0x85, %rax, %rax
leaq 0x321722(%rip), %rcx    # 0x340630
movb $0x0, (%rax,%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1ecf5
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: init_term()
void init_term()
{
int row;

   // initialize the terminal image buffer

   term_rows = (SCREEN_HEIGHT/TEXT_HEIGHT) - 1;
   if(term_rows > MAX_TERM_ROWS) term_rows = MAX_TERM_ROWS;

   term_cols = (SCREEN_WIDTH/TEXT_WIDTH);
   if(term_cols > MAX_TERM_COLS) term_cols = MAX_TERM_COLS;

   for(row=0; row<term_rows; row++) term_screen[row][0] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x1f98d5(%rip), %eax    # 0x218804
cltd
idivl 0x1f98de(%rip)          # 0x218814
movl %eax, %ecx
cmpl $0x41, %eax
movl $0x41, %esi
cmovll %eax, %esi
decl %esi
movl %esi, 0x323825(%rip)    # 0x342770
movl 0x1f98af(%rip), %eax    # 0x218800
cltd
idivl 0x1f98b8(%rip)          # 0x218810
movl $0x84, %edx
cmpl %edx, %eax
cmovll %eax, %edx
movl %edx, 0x32380c(%rip)    # 0x342774
cmpl $0x2, %ecx
jl 0x1ef8f
movl %esi, %eax
imulq $0x85, %rax, %rax
xorl %ecx, %ecx
leaq 0x3216b1(%rip), %rdx    # 0x340630
movb $0x0, (%rcx,%rdx)
addq $0x85, %rcx
cmpq %rcx, %rax
jne 0x1ef7f
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: save_term_kbd(int)
void save_term_kbd(int i)
{
   // save a keyboard char into the last command buffer

   if(last_was_keybuf) {  // the last command we sent was the buffered keyboard command
      tkbd_col = 0;             // start buffering this command
      term_kbd[tkbd_col] = 0;
      last_was_keybuf = 0;
   }

   if(tkbd_col < (MAX_TERM_COLS-1)) {  // add kbd char to last command buffer
      term_kbd[tkbd_col++] = i;
      term_kbd[tkbd_col] = 0;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, 0x323880(%rip)    # 0x34281c
je 0x1efb3
movb $0x0, 0x3237eb(%rip)    # 0x342790
movl $0x0, 0x32386d(%rip)    # 0x34281c
xorl %eax, %eax
jmp 0x1efc0
movl 0x32385f(%rip), %eax    # 0x342818
cmpl $0x82, %eax
jg 0x1efdc
cltq
leaq 0x1(%rax), %rcx
movl %ecx, 0x32384c(%rip)    # 0x342818
leaq 0x3237bd(%rip), %rcx    # 0x342790
movb %dil, (%rax,%rcx)
movb $0x0, 0x1(%rax,%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: set_monitor_mode(int)
void set_monitor_mode(int kbd_flag)
{
   // enable monitor port screen

   change_zoom_config(26);
   zoom_screen = 'O';
   pause_monitor = 0;

   init_term();
   set_term_header(monitor_port);
   term_row = term_header_lines;
   term_col = 0;
   show_term_screen(monitor_port);  // draw the terminal screen image
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x1a, %edi
callq 0x27479
movb $0x4f, 0x2ed443(%rip)   # 0x30c7a8
xorl %ebx, %ebx
movl %ebx, 0x21f0cf(%rip)    # 0x23e43c
callq 0x1ef25
movl 0x2eef58(%rip), %edi    # 0x30e2d0
callq 0x1efde
movl 0x3233f9(%rip), %eax    # 0x34277c
movl %eax, 0x21f0a7(%rip)    # 0x23e430
movl %ebx, 0x21f0a5(%rip)    # 0x23e434
movl 0x2eef3b(%rip), %edi    # 0x30e2d0
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1ecf5
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: dump_stream(int)
void dump_stream(int init)
{
int row, col;
unsigned i;

   again:
   erase_screen();
   vidstr(0,0, GREEN, "Stream dump:");
   refresh_page();
   if(init) init_messages(4, 0);

   row = 2;
   col = 0;
   while(1) {
      serve_os_queue();

      if(SERIAL_DATA_AVAILABLE(RCVR_PORT)) {
         reset_com_timer(RCVR_PORT);
         i = get_serial_char(RCVR_PORT);
//       sprintf(out, "%02X(%c) ", i,i);
         sprintf(out, "%02X", i);
         vidstr(row,col, WHITE, out);
         refresh_page();
         col += 3;
         if(col >= 48) {
            col = 0;
            ++row;
            if(row > 32) {
               row = 2;
            }
         }
      }
      else {
         check_com_timer(RCVR_PORT);
      }

      serve_os_queue();
      if(KBHIT()) {
         i = GETCH();
         if(i == ESC_CHAR) {
            clean_up();
            error_exit(6666, "User pressed ESC during dump_stream()");
         }
         else goto again;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, -0x2c(%rbp)
leaq 0x320625(%rip), %r15    # 0x340000
leaq 0x31c83e(%rip), %r12    # 0x33c220
leaq 0x10b092(%rip), %r13    # 0x12aa7b
callq 0xeceb
xorl %edi, %edi
xorl %esi, %esi
movl $0xa, %edx
leaq 0xeba29(%rip), %rcx     # 0x10b427
callq 0xe787
callq 0xab54
cmpl $0x0, -0x2c(%rbp)
je 0x1fa1a
movl $0x4, %edi
xorl %esi, %esi
callq 0x616de
xorl %ebx, %ebx
movl $0x2, %r14d
callq 0xd5aa
movq 0x151492(%rip), %rdi    # 0x170ec0
callq 0x95c0
movl $0xa, %edi
callq 0xb9ad
testl %eax, %eax
je 0x1fa98
callq 0xd1efe
movsd 0x2edd1a(%rip), %xmm0   # 0x30d768
movsd %xmm0, 0x306292(%rip)   # 0x325ce8
movb $0x0, 0x306293(%rip)    # 0x325cf0
movl $0xa, %edi
callq 0xbafb
movzbl %al, %edx
movq %r12, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x9060
movl %r14d, %edi
movl %ebx, %esi
movl $0xf, %edx
movq %r12, %rcx
callq 0xe787
callq 0xab54
cmpl $0x2d, %ebx
jge 0x1faa4
addl $0x3, %ebx
jmp 0x1fab9
movl $0xa, %edi
callq 0x1e66a
jmp 0x1fab9
cmpl $0x20, %r14d
leal 0x1(%r14), %eax
movl $0x2, %ecx
cmovgel %ecx, %eax
xorl %ebx, %ebx
movl %eax, %r14d
callq 0xd5aa
movq 0x1513fb(%rip), %rdi    # 0x170ec0
callq 0x95c0
callq 0xa80b
mulsd 0xe9561(%rip), %xmm0    # 0x109038
addsd 0xe9579(%rip), %xmm0    # 0x109058
movsd %xmm0, 0x2edab1(%rip)   # 0x30d598
movl 0x32055b(%rip), %eax    # 0x340048
cmpl %eax, 0x320551(%rip)    # 0x340044
je 0x1fa22
leal 0x1(%rax), %ecx
cmpl $0xf, %eax
movl $0x0, %eax
cmovgel %eax, %ecx
movl %ecx, 0x32053b(%rip)    # 0x340048
movslq %ecx, %rax
cmpl $0x1b, (%r15,%rax,4)
jne 0x1f9e9
callq 0x1ec9a
movl $0x1a0a, %edi           # imm = 0x1A0A
leaq 0xeb908(%rip), %rsi     # 0x10b434
callq 0xb424
jmp 0x1fa22
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: option_handle_hd(int, char**)
void option_handle_hd(int argc, char ** argv)
{
    int argIndex;
    for(argIndex = 1; argIndex < argc; argIndex++) {
        char * arg = argv[argIndex];
        if((*arg == '/' || *arg == '-') && 0 == strncmp(arg+1,"hd",2) &&
           (*(arg+3) == '=' || *(arg+3) == ':')) {
            realpath(arg+4, heather_path);
            if(*(heather_path + strlen(heather_path)-1) != '/') {
                strcat(heather_path,"/");
            }
            printf("New heather_path of %s\n", heather_path);
        }
    }
}

// Assembly:
cmpl $0x2, %edi
jl 0x2009b
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r12d
movl $0x1, %r13d
leaq 0x150c73(%rip), %r14    # 0x170c90
leaq 0xeb4b1(%rip), %r15     # 0x10b4d5
movq (%rbx,%r13,8), %rdi
movzbl (%rdi), %eax
orl $0x2, %eax
cmpl $0x2f, %eax
jne 0x20085
cmpb $0x68, 0x1(%rdi)
jne 0x20085
cmpb $0x64, 0x2(%rdi)
jne 0x20085
movzbl 0x3(%rdi), %eax
cmpl $0x3d, %eax
je 0x2004d
cmpl $0x3a, %eax
jne 0x20085
addq $0x4, %rdi
movq %r14, %rsi
callq 0x90e0
movq %r14, %rdi
callq 0x9120
cmpb $0x2f, -0x1(%rax,%r14)
je 0x20078
movq %r14, %rdi
callq 0x9120
movw $0x2f, (%rax,%r14)
movq %r15, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x9030
incq %r13
cmpq %r13, %r12
jne 0x20024
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/heather.cpp
// Function: config_tz_info()
void config_tz_info()
{
char *s;

   // If user did not set the time zone, try to get time zone info from
   // system environment variable.

   if(time_zone_set) return;  // user set the string

   s = getenv("TZ");
   if(s == 0) s = getenv("tz");
   if(s == 0) return;

   strncpy(out, s, 128);
   out[127] = 0;

   set_time_zone(out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpb $0x0, 0x2ed658(%rip)    # 0x30d894
je 0x20245
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xf4d4f(%rip), %rdi     # 0x114f9b
callq 0x9460
testq %rax, %rax
jne 0x20267
leaq 0x114919(%rip), %rdi    # 0x134b76
callq 0x9460
testq %rax, %rax
je 0x2023e
leaq 0x31bfb2(%rip), %rbx    # 0x33c220
movl $0x80, %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x9170
movb $0x0, 0x31c01a(%rip)    # 0x33c29f
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xe3a36
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: read_default_lla()
int read_default_lla()
{
FILE *file;
int i;

   // get default location from a file if the device does not have a GPS

   lat = 0.0;
   lon = 0.0;
   alt = 0.0;
   i = (-1);
   file = fopen(LOCN_FILE, "r");
   if(file) {
      while(fgets(out, sizeof out, file) != NULL) {
         strupr(out);
         if(strstr(out, "LOC")) ;
         else {
            i = parse_lla(out);
            if(i == LLA_OK) {
               lat = precise_lat;
               lon = precise_lon;
               alt = precise_alt;
               default_lat = lat;
               default_lon = lon;
               default_alt = alt;
               ref_lat = lat;
               ref_lon = lon;
               ref_alt = alt;
               cos_factor = cos(ref_lat);
               if(cos_factor == 0.0) cos_factor = 0.001;
               break;
            }
         }
      }

      fclose(file);
      file = 0;
   }

   return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %eax, %eax
movq %rax, 0x2ecd26(%rip)    # 0x30cfd0
movq %rax, 0x2ecd27(%rip)    # 0x30cfd8
movq %rax, 0x2ecd28(%rip)    # 0x30cfe0
leaq 0xeb299(%rip), %rdi     # 0x10b558
leaq 0x100ac7(%rip), %rsi    # 0x120d8d
callq 0x9430
testq %rax, %rax
je 0x2036a
movq %rax, %rbx
leaq 0x31bf42(%rip), %rdi    # 0x33c220
movl $0x201, %esi            # imm = 0x201
movq %rax, %rdx
callq 0x9600
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x20360
leaq 0x31bf23(%rip), %r15    # 0x33c220
leaq 0xeaad4(%rip), %r12     # 0x10add8
movb 0x31bf16(%rip), %al     # 0x33c220
testb %al, %al
je 0x2032c
leaq 0x31bf0c(%rip), %r13    # 0x33c221
movsbl %al, %edi
callq 0x9700
movb %al, -0x1(%r13)
movb (%r13), %al
incq %r13
testb %al, %al
jne 0x20315
movq %r15, %rdi
movq %r12, %rsi
callq 0x9090
testq %rax, %rax
jne 0x2034b
movq %r15, %rdi
callq 0x315ca
movl %eax, %r14d
testl %eax, %eax
je 0x20382
movq %r15, %rdi
movl $0x201, %esi            # imm = 0x201
movq %rbx, %rdx
callq 0x9600
testq %rax, %rax
jne 0x20304
movq %rbx, %rdi
callq 0x9370
jmp 0x20370
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsd 0x31af66(%rip), %xmm0   # 0x33b2f0
movsd %xmm0, 0x2ecc3e(%rip)   # 0x30cfd0
movsd 0x31af5e(%rip), %xmm1   # 0x33b2f8
movsd %xmm1, 0x2ecc36(%rip)   # 0x30cfd8
movsd 0x31af56(%rip), %xmm2   # 0x33b300
movsd %xmm2, 0x2ecc2e(%rip)   # 0x30cfe0
movsd %xmm0, 0x31af6e(%rip)   # 0x33b328
movsd %xmm1, 0x31af6e(%rip)   # 0x33b330
movsd %xmm2, 0x31af6e(%rip)   # 0x33b338
movsd %xmm0, 0x31af3e(%rip)   # 0x33b310
movsd %xmm1, 0x31af3e(%rip)   # 0x33b318
movsd %xmm2, 0x31af3e(%rip)   # 0x33b320
callq 0x9710
movsd %xmm0, 0x2ecbd9(%rip)   # 0x30cfc8
xorl %r14d, %r14d
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x20360
jp 0x20360
movabsq $0x3f50624dd2f1a9fc, %rax # imm = 0x3F50624DD2F1A9FC
movq %rax, 0x2ecbb1(%rip)    # 0x30cfc8
jmp 0x20360
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: show(char*)
void show(char *s)
{
int old_text_mode;
int old_zoom;
int old_plot_text_row;
int old_edit_row;
char xout[MAX_TEXT_COLS+1];    // screen output strings get formatted into here


   if(show_escape) return;  // user interrupted the show with ESC
   strcpy(xout, s);

   if(keyboard_cmd) {
      old_text_mode = text_mode;
      old_zoom = zoom_screen;
      old_plot_text_row = PLOT_TEXT_ROW;
      old_edit_row = EDIT_ROW;
      if(old_text_mode) {
         PLOT_TEXT_ROW = 20;
         EDIT_ROW = 20+2;
      }
      text_mode = 2;
      no_x_margin = no_y_margin = 1;
      cancel_zoom(9);

      if(help_line > (PLOT_TEXT_ROW-4)) {
         showing_cmd_help = 1;  // so touchscreen can work
         if(edit_error("") == ESC_CHAR) show_escape = 1;
         showing_cmd_help = 0;
         erase_screen();
         help_line = 1;
      }
      else if(help_line == 0) erase_screen();
      vidstr(help_line, 0, WHITE, xout);

      ++help_line;
      text_mode = old_text_mode;
      if(text_mode == 0) {
         no_x_margin = no_y_margin = 0;
      }
      zoom_screen = old_zoom;
      PLOT_TEXT_ROW = old_plot_text_row;
      EDIT_ROW = old_edit_row;
   }
   else printf("%s\n", xout);
}

// Assembly:
cmpl $0x0, 0x321e61(%rip)    # 0x342828
je 0x209ca
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rdi, %rsi
leaq -0x230(%rbp), %rdi
callq 0x9340
cmpb $0x0, 0x2ed47a(%rip)    # 0x30de6c
je 0x20aa6
movl 0x1f7dd9(%rip), %r15d   # 0x2187d8
movl 0x1f7e8b(%rip), %ebx    # 0x218890
movl 0x31ec00(%rip), %r14d   # 0x33f60c
testl %r15d, %r15d
je 0x20a25
movl $0x14, 0x1f7e75(%rip)   # 0x218890
movl $0x16, 0x31ebe7(%rip)   # 0x33f60c
movb 0x2ebd7c(%rip), %r12b   # 0x30c7a8
movl $0x2, 0x1f7da2(%rip)    # 0x2187d8
movb $0x1, %al
movb %al, 0x1f7e1d(%rip)     # 0x21885b
movb %al, 0x1f7e16(%rip)     # 0x21885a
movl $0x9, %edi
callq 0x2754a
movl 0x321dd0(%rip), %edi    # 0x342824
movl 0x1f7e36(%rip), %eax    # 0x218890
addl $-0x4, %eax
cmpl %eax, %edi
jle 0x20ab4
movl $0x1, 0x31fbb1(%rip)    # 0x34061c
leaq 0x111024(%rip), %rdi    # 0x131a96
callq 0x23027
cmpl $0x1b, %eax
jne 0x20a86
movl $0x1, 0x321da2(%rip)    # 0x342828
movl $0x0, 0x31fb8c(%rip)    # 0x34061c
callq 0xeceb
movl $0x1, 0x321d85(%rip)    # 0x342824
movl $0x1, %edi
jmp 0x20ac3
leaq -0x230(%rbp), %rdi
callq 0x95d0
jmp 0x20b0a
testl %edi, %edi
jne 0x20ac3
callq 0xeceb
movl 0x321d61(%rip), %edi    # 0x342824
leaq -0x230(%rbp), %rcx
xorl %esi, %esi
movl $0xf, %edx
callq 0xe787
incl 0x321d48(%rip)          # 0x342824
movl %r15d, 0x1f7cf5(%rip)   # 0x2187d8
testl %r15d, %r15d
jne 0x20af6
xorl %eax, %eax
movb %al, 0x1f7d6b(%rip)     # 0x21885b
movb %al, 0x1f7d64(%rip)     # 0x21885a
movb %r12b, 0x2ebcab(%rip)   # 0x30c7a8
movl %ebx, 0x1f7d8d(%rip)    # 0x218890
movl %r14d, 0x31eb02(%rip)   # 0x33f60c
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: show_help_msg(char*)
void show_help_msg(char *s)
{
unsigned i;
char c;

   // show() the help_msg[] line by line

   i = 0;
   out[i] = 0;
   while(*s) {
      c = *s++;
      if(c == 0) {
         break;
      }
      if(c == '\r') c = ' ';

      if(c == '\n') {
         show(out);
         i = 0;
      }
      else if(i < (sizeof(out)-2)){
         out[i++] = c;
         out[i] = 0;
      }
   }
}

// Assembly:
movb $0x0, 0x31b6ff(%rip)    # 0x33c220
movb (%rdi), %cl
testb %cl, %cl
je 0x20b8b
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
incq %rbx
xorl %eax, %eax
movl $0x20, %r15d
leaq 0x31b6da(%rip), %r14    # 0x33c220
cmpb $0xd, %cl
movzbl %cl, %ecx
cmovel %r15d, %ecx
cmpb $0xa, %cl
jne 0x20b61
movq %r14, %rdi
callq 0x209c0
xorl %eax, %eax
jmp 0x20b78
cmpl $0x1fe, %eax            # imm = 0x1FE
ja 0x20b78
movl %eax, %edx
leaq 0x1(%rdx), %rax
movb %cl, (%rdx,%r14)
movb $0x0, 0x1(%rdx,%r14)
movb (%rbx), %cl
incq %rbx
testb %cl, %cl
jne 0x20b46
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: show_rpn_defines(int, int)
void show_rpn_defines(int row, int col)
{
int i;

   // display user defined operations (limited by screen height)
   strcpy(out, "User DEFINEd operations:  define edit  savedefs saveall showdefs  run");
   vidstr(row++, 0, WHITE, out);

   if(num_rpn_defs) {
      for(i=0; i<num_rpn_defs; i++) {  // show the DEFINEs
         if(rpn_defs[i]) {
            sprintf(out, "(%s)", rpn_defs[i]);
            vidstr(row++,col, WHITE, out);
            if(row >= (TEXT_ROWS-1)) break;   // !!!!could use PLOT_ROW or MOUSE_ROW
         }
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, -0x2c(%rbp)
movl %edi, %r14d
leaq 0x31b660(%rip), %r15    # 0x33c220
leaq 0xec4cd(%rip), %rsi     # 0x10d094
movl $0x46, %edx
movq %r15, %rdi
callq 0x92b0
movl %r14d, %edi
xorl %esi, %esi
movl $0xf, %edx
movq %r15, %rcx
callq 0xe787
movl 0x32249c(%rip), %eax    # 0x343088
testl %eax, %eax
jle 0x20c5c
incl %r14d
leaq 0x322166(%rip), %r13    # 0x342d60
leaq 0x31b61f(%rip), %r15    # 0x33c220
xorl %r12d, %r12d
movq (%r13), %rdx
testq %rdx, %rdx
je 0x20c4d
movq %r15, %rdi
leaq 0x10271d(%rip), %rsi    # 0x123334
xorl %eax, %eax
callq 0x9060
leal 0x1(%r14), %ebx
movl %r14d, %edi
movl -0x2c(%rbp), %esi
movl $0xf, %edx
movq %r15, %rcx
callq 0xe787
leaq 0x1f7bd0(%rip), %rax    # 0x21880c
movl (%rax), %eax
decl %eax
cmpl %eax, %ebx
jge 0x20c5c
movl 0x32243e(%rip), %eax    # 0x343088
movl %ebx, %r14d
incq %r12
movslq %eax, %rcx
addq $0x8, %r13
cmpq %rcx, %r12
jl 0x20c04
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_error(char*)
void rpn_error(char *s)
{
   // flash calculator error message on the srceen
   if(s == 0) return;
   erase_screen();
   vidstr(0,0, YELLOW, s);
   refresh_page();
   BEEP(7834);
   Sleep(1000);

   edit_buffer[0] = ' ';
   edit_buffer[1] = 0;
   rpn_err_flag = 1;
   start_calc(1234);
}

// Assembly:
testq %rdi, %rdi
je 0x20eba
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xeceb
xorl %edi, %edi
xorl %esi, %esi
movl $0xe, %edx
movq %rbx, %rcx
callq 0xe787
callq 0xab54
movl $0x1e9a, %edi           # imm = 0x1E9A
callq 0x9d78
movl $0x3e8, %edi            # imm = 0x3E8
callq 0xafe8
leaq 0x31e440(%rip), %rax    # 0x33f2e0
movw $0x20, (%rax)
movl $0x1, 0x323869(%rip)    # 0x344718
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x20ebb
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: start_calc(int)
void start_calc(int why)
{
int i;

   if(deg_mode == 1.0) edit_info1 = "Calculator is in RADIANS mode";
   else                edit_info1 = "Calculator is in DEGREES mode";
   if(calc_rcvr) {
      edit_info2 =                   "To exit calculator (and program) type EXIT";
   }
   else {
      edit_info2 =                   "To exit calculator mode press ESC or <cr>";
   }
   if(zoom_screen == '`') {
      edit_info3 = "Enter ?<cr> for calculator command list.";
      if(calc_rcvr == 0) {
         edit_info4 = "When done, use GR to erase calculator results from plot area";
      }
   }
   else if(calc_rcvr == 0) {
      edit_info3 = "When done, use GR to erase calculator results from plot area";
   }


   i = rpn_mode;
   rpn_mode = (1);
   show_version_header();
   rpn_mode = i;
   show_rpn_help = 0;
   start_edit(CALC_CMD, "Enter RPN calculator commands separated by spaces. (ESC ESC to abort)");
}

// Assembly:
movsd 0x149195(%rip), %xmm0   # 0x16a058
ucomisd 0xe81a5(%rip), %xmm0    # 0x109070
leaq 0xf9edb(%rip), %rax     # 0x11adad
leaq 0xf9eb6(%rip), %rcx     # 0x11ad8f
cmovneq %rax, %rcx
cmovpq %rax, %rcx
leaq 0x31e6f8(%rip), %rax    # 0x33f5e0
movq %rcx, (%rax)
leaq 0x1f79ee(%rip), %rax    # 0x2188e0
movl (%rax), %eax
testl %eax, %eax
leaq 0xf9ef9(%rip), %rcx     # 0x11adf6
leaq 0xf9ec7(%rip), %rdx     # 0x11adcb
cmoveq %rcx, %rdx
leaq 0x31e6d9(%rip), %rcx    # 0x33f5e8
movq %rdx, (%rcx)
leaq 0x2eb88f(%rip), %rcx    # 0x30c7a8
cmpb $0x60, (%rcx)
jne 0x20f3c
leaq 0xf9efb(%rip), %rcx     # 0x11ae20
leaq 0x31e6c4(%rip), %rdx    # 0x33f5f0
movq %rcx, (%rdx)
testl %eax, %eax
jne 0x20f51
leaq 0x31e6be(%rip), %rax    # 0x33f5f8
jmp 0x20f47
testl %eax, %eax
jne 0x20f51
leaq 0x31e6a9(%rip), %rax    # 0x33f5f0
leaq 0xf9efb(%rip), %rcx     # 0x11ae49
movq %rcx, (%rax)
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x31a8c9(%rip), %rbx    # 0x33b828
movl (%rbx), %r14d
movl $0x1, (%rbx)
callq 0x72683
movl %r14d, (%rbx)
leaq 0x31a8b5(%rip), %rax    # 0x33b82c
movl $0x0, (%rax)
leaq 0xf9f02(%rip), %rsi     # 0x11ae86
movl $0x180, %edi            # imm = 0x180
popq %rbx
popq %r14
popq %rbp
jmp 0x2bf98
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_clear(int)
void rpn_clear(int flag)
{
int i;

   // clear stack and/or memory

   if(flag & 0x01) {  // clear stack
      for(i=0; i<RPN_SIZE; i++) {
         rpn[i] = 0.0;
      }
   }

   if(flag & 0x02) { // clear memory
      for(i=0; i<RPN_MEM; i++) {
         rpn_mem[i] = 0.0;
      }
   }

   last_x = 0.0;
   last_rpn0 = 0.0;
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
testb $0x1, %bl
je 0x20fbd
movslq 0x1490aa(%rip), %rdx    # 0x16a050
testq %rdx, %rdx
jle 0x20fbd
shlq $0x3, %rdx
leaq 0x3219ba(%rip), %rdi    # 0x342970
xorl %esi, %esi
callq 0x91a0
testb $0x2, %bl
je 0x20fd5
leaq 0x321a37(%rip), %rdi    # 0x342a00
movl $0x320, %edx            # imm = 0x320
xorl %esi, %esi
callq 0x91a0
xorl %eax, %eax
movq %rax, 0x321d4a(%rip)    # 0x342d28
movq %rax, 0x321d53(%rip)    # 0x342d38
movl $0x0, 0x321d41(%rip)    # 0x342d30
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_down()
void rpn_down()
{
int i;
int count;
double val;

   // rotate stack down
   last_was_clx = 0;

   count = 1;
   if(isdigit(msg_field[4])) count = atoi(&msg_field[4]);
   if(count < 0) count = 0-count;
   count %= RPN_SIZE;

   while(count--) {
      val = rpn[0];
      for(i=0; i<RPN_SIZE-1; i++) {
         rpn[i] = rpn[i+1];
      }
      rpn[RPN_SIZE-1] = val;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x0, 0x321d22(%rip)    # 0x342d30
leaq 0x31aa2b(%rip), %rdi    # 0x33ba40
movsbl 0x4(%rdi), %ecx
addl $-0x30, %ecx
movl $0x1, %eax
cmpl $0x9, %ecx
ja 0x21036
addq $0x4, %rdi
callq 0x95e0
movl %eax, %ecx
negl %eax
cmovsl %ecx, %eax
movl 0x149013(%rip), %r13d   # 0x16a050
cltd
idivl %r13d
testl %edx, %edx
je 0x2108d
movl %edx, %ebx
leal -0x1(%r13), %r14d
movslq %r14d, %r12
shlq $0x3, %r14
leaq 0x321917(%rip), %r15    # 0x342970
movsd 0x32190f(%rip), %xmm0   # 0x342970
cmpl $0x2, %r13d
jl 0x21083
movq %r15, %rdi
leaq 0x321907(%rip), %rsi    # 0x342978
movq %r14, %rdx
movsd %xmm0, -0x30(%rbp)
callq 0x9650
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%r15,%r12,8)
decl %ebx
jne 0x21059
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_up()
void rpn_up()
{
int i;
int count;
double val;

   // rotate stack up
   last_was_clx = 0;

   count = 1;
   if(isdigit(msg_field[2])) count = atoi(&msg_field[2]);
   if(count < 0) count = 0-count;
   count %= RPN_SIZE;

   while(count--) {
      val = rpn[RPN_SIZE-1];
      for(i=RPN_SIZE-1; i; i--) {
         rpn[i] = rpn[i-1];
      }
      rpn[0] = val;
      last_rpn0 = val;
   }
}

// Assembly:
movl $0x0, 0x321c8a(%rip)    # 0x342d30
leaq 0x31a993(%rip), %rdi    # 0x33ba40
movsbl 0x2(%rdi), %ecx
addl $-0x30, %ecx
movl $0x1, %eax
cmpl $0x9, %ecx
ja 0x210d3
pushq %rbp
movq %rsp, %rbp
addq $0x2, %rdi
callq 0x95e0
movl %eax, %ecx
negl %eax
cmovsl %ecx, %eax
popq %rbp
movslq 0x148f76(%rip), %rcx    # 0x16a050
cltd
idivl %ecx
testl %edx, %edx
je 0x21125
leaq -0x1(%rcx), %rax
leaq 0x321884(%rip), %rsi    # 0x342970
movsd -0x8(%rsi,%rcx,8), %xmm0
testl %eax, %eax
je 0x21111
movq %rax, %r8
movq %rax, %rdi
movsd -0x8(%rsi,%r8,8), %xmm1
movsd %xmm1, (%rsi,%r8,8)
decq %rdi
movq %rdi, %r8
jne 0x210fc
movsd %xmm0, 0x321857(%rip)   # 0x342970
decl %edx
jne 0x210ec
movsd %xmm0, 0x321c13(%rip)   # 0x342d38
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_top()
double rpn_top()
{
double val;
int i;

   // get stack top into last_x and drop the stack one level
   // (used to prepare for a two operand command)
   last_was_clx = 0;

   val = rpn[0];
   last_x = last_rpn0 = val;

   for(i=0; i<RPN_SIZE-1; i++) {
      rpn[i] = rpn[i+1];
   }
   return val;
}

// Assembly:
movl $0x0, 0x321c00(%rip)    # 0x342d30
movsd 0x321838(%rip), %xmm0   # 0x342970
movsd %xmm0, 0x321bf8(%rip)   # 0x342d38
movsd %xmm0, 0x321be0(%rip)   # 0x342d28
movl 0x148f02(%rip), %edx    # 0x16a050
cmpl $0x2, %edx
jl 0x21183
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
decl %edx
shlq $0x3, %rdx
leaq 0x321808(%rip), %rdi    # 0x342970
leaq 0x321809(%rip), %rsi    # 0x342978
movsd %xmm0, -0x8(%rbp)
callq 0x9650
movsd -0x8(%rbp), %xmm0
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_drop()
void rpn_drop()
{
int count;
double last;

   // drop stack down
   last_was_clx = 0;

   count = 1;
   if(isdigit(msg_field[4])) count = atoi(&msg_field[4]);
   if(count < 0) count = 0-count;
   count %= RPN_SIZE;

   last = rpn[0];
   while(count--) {
      rpn_top();
   }
   last_x = last;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl $0x0, 0x321b91(%rip)    # 0x342d30
leaq 0x31a89a(%rip), %rdi    # 0x33ba40
movsbl 0x4(%rdi), %ecx
addl $-0x30, %ecx
movl $0x1, %eax
cmpl $0x9, %ecx
ja 0x211c7
addq $0x4, %rdi
callq 0x95e0
movl %eax, %ecx
negl %eax
cmovsl %ecx, %eax
movl 0x148e82(%rip), %r13d   # 0x16a050
cltd
idivl %r13d
movsd 0x321796(%rip), %xmm0   # 0x342970
testl %edx, %edx
je 0x2123f
movl %edx, %ebx
leal -0x1(%r13), %r14d
shlq $0x3, %r14
leaq 0x321781(%rip), %r15    # 0x342970
leaq 0x321782(%rip), %r12    # 0x342978
movsd %xmm0, -0x30(%rbp)
movaps %xmm0, %xmm1
cmpl $0x2, %r13d
jl 0x21224
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movsd %xmm1, -0x38(%rbp)
callq 0x9650
movsd -0x38(%rbp), %xmm1
movsd 0x32174c(%rip), %xmm0   # 0x342970
decl %ebx
jne 0x211fb
movl $0x0, 0x321afe(%rip)    # 0x342d30
movsd %xmm1, 0x321afe(%rip)   # 0x342d38
movsd -0x30(%rbp), %xmm0
movsd %xmm0, 0x321ae1(%rip)   # 0x342d28
addq $0x18, %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_push(double)
void rpn_push(double val)
{
int i;

   // push val onto stack
   if(last_was_clx == 0) {
      for(i=RPN_SIZE-1; i; i--) {
         rpn[i] = rpn[i-1];
      }
   }
   rpn[0] = val;
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, 0x321acf(%rip)    # 0x342d30
jne 0x2128a
movslq 0x148de6(%rip), %rax    # 0x16a050
cmpq $0x1, %rax
je 0x2128a
decq %rax
leaq 0x3216f6(%rip), %rcx    # 0x342970
movsd -0x8(%rcx,%rax,8), %xmm1
movsd %xmm1, (%rcx,%rax,8)
decq %rax
jne 0x2127a
movsd %xmm0, 0x3216de(%rip)   # 0x342970
movl $0x0, 0x321a94(%rip)    # 0x342d30
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_inc(double)
void rpn_inc(double val)
{
double last;

   // does ISZ and DSZ commands
   last = rpn[0];
   rpn[0] += val;
   if(rpn[0] == 0) skip_next_rpn = 1;
   last_x = last;
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd 0x3216c6(%rip), %xmm1   # 0x342970
addsd %xmm1, %xmm0
movsd %xmm0, 0x3216ba(%rip)   # 0x342970
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jne 0x212cc
jp 0x212cc
movl $0x1, 0x321a80(%rip)    # 0x342d4c
movsd %xmm1, 0x321a54(%rip)   # 0x342d28
movl $0x0, 0x321a52(%rip)    # 0x342d30
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_stack()
void rpn_stack()
{
int count;
double val;
double last;

   // push the value at a specified stack location onto the stack

   count = 1;
   if(isdigit(msg_field[5])) count = atoi(&msg_field[5]);
   if(count < 0) count = 0-count;
   count %= RPN_SIZE;

   val = rpn[count];

   last = rpn[0];
   rpn_push(val);
   last_x = last;
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x31a751(%rip), %rdi    # 0x33ba40
movsbl 0x5(%rdi), %ecx
addl $-0x30, %ecx
movl $0x1, %eax
cmpl $0x9, %ecx
ja 0x21310
addq $0x5, %rdi
callq 0x95e0
movl %eax, %ecx
negl %eax
cmovsl %ecx, %eax
cltd
idivl 0x148d39(%rip)          # 0x16a050
leaq 0x321652(%rip), %rax    # 0x342970
movsd (%rax,%rdx,8), %xmm0
movsd 0x321645(%rip), %xmm1   # 0x342970
movsd %xmm1, -0x8(%rbp)
callq 0x21256
movsd -0x8(%rbp), %xmm0
movsd %xmm0, 0x3219e6(%rip)   # 0x342d28
movl $0x0, 0x3219e4(%rip)    # 0x342d30
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_swap()
void rpn_swap()
{
int count;
double val;
double last;

   // swap X and a value on the stack

   count = 1;
   if(isdigit(msg_field[4])) count = atoi(&msg_field[4]);
   if(count < 0) count = 0-count;
   count %= RPN_SIZE;

   last = rpn[0];

   val = rpn[0];
   rpn[0] = rpn[count];
   rpn[count] = val;

   last_x = last;
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x31a6e3(%rip), %rdi    # 0x33ba40
movsbl 0x4(%rdi), %ecx
addl $-0x30, %ecx
movl $0x1, %eax
cmpl $0x9, %ecx
ja 0x2137e
addq $0x4, %rdi
callq 0x95e0
movl %eax, %ecx
negl %eax
cmovsl %ecx, %eax
cltd
idivl 0x148ccb(%rip)          # 0x16a050
movsd 0x3215e3(%rip), %xmm0   # 0x342970
leaq 0x3215dc(%rip), %rax    # 0x342970
movsd (%rax,%rdx,8), %xmm1
movsd %xmm1, 0x3215cf(%rip)   # 0x342970
movsd %xmm0, (%rax,%rdx,8)
movsd %xmm0, 0x32197a(%rip)   # 0x342d28
movl $0x0, 0x321978(%rip)    # 0x342d30
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_new(double)
void rpn_new(double val)
{
   // replace top of stack and lastx with new value

   last_x = rpn[0];
   last_rpn0 = val;
   rpn[0] = val;
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd 0x3215aa(%rip), %xmm1   # 0x342970
movsd %xmm1, 0x32195a(%rip)   # 0x342d28
movsd %xmm0, 0x321962(%rip)   # 0x342d38
movsd %xmm0, 0x321592(%rip)   # 0x342970
movl $0x0, 0x321948(%rip)    # 0x342d30
popq %rbp
retq