LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x221dd5(%rip)    # 0x23eecc
jne 0x1d175
callq 0xa826
mulsd 0xebf32(%rip), %xmm0    # 0x109038
addsd 0xebf4a(%rip), %xmm0    # 0x109058
movsd %xmm0, 0x2f0482(%rip)   # 0x30d598
movl 0x322f28(%rip), %eax    # 0x340044
cmpl 0x322f26(%rip), %eax    # 0x340048
jne 0x1d169
cmpb $0x0, 0x2f0def(%rip)    # 0x30df1a
je 0x1d155
xorl %ebx, %ebx
cmpl $0x0, 0x2f0de6(%rip)    # 0x30df1c
jne 0x1d191
cmpl $0x0, 0x2f0ded(%rip)    # 0x30df2c
jne 0x1d191
cmpq $0x0, 0x2f0dbf(%rip)    # 0x30df08
jne 0x1d191
cmpq $0x0, 0x2f0dbd(%rip)    # 0x30df10
jne 0x1d191
callq 0x1d050
movl %eax, %ebx
testl %eax, %eax
je 0x1d191
movl %ebx, %edi
callq 0x4691f
jmp 0x1d191
leaq 0xedab9(%rip), %rdi     # 0x10ac29
callq 0x2326e
movl $0x1, %edi
callq 0x1ce0a
movw $0x0, 0x322480(%rip)    # 0x33f608
movb $0x0, 0x2f0d8b(%rip)    # 0x30df1a
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1e5f9
movq 0x1fa26d(%rip), %rax    # 0x2188d0
cmpq $0x400, %rax            # imm = 0x400
je 0x1e68a
cmpq $0x800000, %rax         # imm = 0x800000
je 0x1e68a
cmpl $0x0, 0x30765a(%rip)    # 0x325cd4
jne 0x1e68a
cmpq $0x0, 0x21fd3c(%rip)    # 0x23e3c0
je 0x1e5f9
pushq %rbp
movq %rsp, %rbp
callq 0xc08a9
movb $0x2, 0x31898e(%rip)    # 0x337028
popq %rbp
jmp 0x1e5f9
// File: /workspace/github_cpp_makefile_star2_O1/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 0xd1865
xorl %eax, %eax
cmpl $0x12, %ebx
ja 0x1e708
movl %ebx, %eax
imulq $0x2260, %rax, %rax     # imm = 0x2260
leaq 0x2efc1c(%rip), %rcx    # 0x30e2e0
movsd 0x2248(%rax,%rcx), %xmm1
addsd 0x2238(%rax,%rcx), %xmm1
addq %rcx, %rax
movsd 0x2ef087(%rip), %xmm0   # 0x30d768
ucomisd %xmm1, %xmm0
jbe 0x1e701
movsd %xmm0, 0x2248(%rax)
cmpb $0x1, 0x2250(%rax)
sete %cl
incb %cl
movb %cl, 0x2250(%rax)
movzbl 0x2250(%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1e73e
movl %edi, %eax
imulq $0x2260, %rax, %rcx     # imm = 0x2260
leaq 0x2efbb1(%rip), %rax    # 0x30e2e0
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
cmpl $0x0, 0x2228(%rcx,%rax)
je 0x1e747
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
addq %rcx, %rax
cmpl $0x0, 0x2230(%rax)
jle 0x1e7a9
movl $0xfffffffc, %ebx       # imm = 0xFFFFFFFC
cmpb $0x1, 0x2250(%rax)
jne 0x1e73e
cmpl $0x0, 0x2254(%rax)
je 0x1e7b0
cmpl $0x0, (%rax)
jne 0x1e77e
cmpl $0x0, 0x4(%rax)
jne 0x1e77e
cmpb $0x0, 0x10d(%rax)
je 0x1e7b7
movb $0x2, 0x2250(%rax)
movl $0x1, %ebx
cmpl $0x0, 0x2234(%rax)
jne 0x1e7a2
movl $0x2, 0x2234(%rax)
movl $0x2, %ebx
callq 0xb49f
jmp 0x1e73e
movl $0xfffffffd, %ebx       # imm = 0xFFFFFFFD
jmp 0x1e73e
movl $0xfffffffb, %ebx       # imm = 0xFFFFFFFB
jmp 0x1e73e
movl $0xfffffffa, %ebx       # imm = 0xFFFFFFFA
jmp 0x1e73e
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x2ef592(%rip)    # 0x30df00
je 0x1e979
testb $0x2, 0x2ef575(%rip)    # 0x30deec
jne 0x1e996
testb $0x1, 0x2ef56c(%rip)    # 0x30deec
jne 0x1e984
popq %rbp
retq
cmpb $0x0, 0x2ef937(%rip)    # 0x30e2c2
je 0x1e9a8
leaq 0xead36(%rip), %rdi     # 0x1096ca
jmp 0x1e9b8
cmpb $0x0, 0x2ef924(%rip)    # 0x30e2c1
je 0x1e9c3
leaq 0xead11(%rip), %rdi     # 0x1096b7
jmp 0x1e9b8
cmpb $0x0, 0x2ef919(%rip)    # 0x30e2c8
je 0x1e9ca
leaq 0xeaced(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
popq %rbp
jmp 0x9cd3
movl $0x10, %edi
jmp 0x1e9cf
movl $0x11, %edi
popq %rbp
jmp 0x9d80
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x2ef514(%rip)    # 0x30def0
je 0x1ea15
cmpb $0x0, 0x2ef507(%rip)    # 0x30deec
je 0x1ea15
xorpd %xmm0, %xmm0
ucomisd 0x2ef505(%rip), %xmm0   # 0x30def8
ja 0x1ea15
pushq %rbp
movq %rsp, %rbp
callq 0xa826
mulsd 0xea632(%rip), %xmm0    # 0x109038
movsd 0x2ef4ea(%rip), %xmm1   # 0x30def8
ucomisd %xmm0, %xmm1
popq %rbp
jbe 0x1ea16
retq
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0x2ef4d1(%rip)    # 0x30def8
jmp 0x1e963
// File: /workspace/github_cpp_makefile_star2_O1/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 0xd1865
cmpl $0x12, %ebx
ja 0x1ea67
movsd 0x2eed22(%rip), %xmm0   # 0x30d768
movl %ebx, %eax
imulq $0x2260, %rax, %rax     # imm = 0x2260
leaq 0x2ef88a(%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_O1/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, 0x21e106(%rip)    # 0x23cd60
je 0x1ecba
pushq %rbp
movq %rsp, %rbp
movl $0x20, 0x2202ee(%rip)   # 0x23ef58
leaq 0x21e0ef(%rip), %rdi    # 0x23cd60
movl $0x1, %esi
callq 0xd88a1
testl %eax, %eax
jne 0x1ec9e
xorl %edi, %edi
callq 0x1c5ce
movl $0x5, %edi
callq 0xd846f
movb 0x1fc59f(%rip), %al     # 0x21b235
xorb $0x1, %al
movb %al, 0x1fc596(%rip)     # 0x21b234
movl $0x1, %edi
callq 0x27872
movb $0x0, 0x1fc4a9(%rip)    # 0x21b158
movl $0x1, %edi
popq %rbp
jmp 0x19792
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xed5e
cmpl $0x0, 0x323a3d(%rip)    # 0x342770
jle 0x1ee2d
leaq 0x3218f0(%rip), %r14    # 0x340630
xorl %r15d, %r15d
movl $0xf, %r12d
cmpl $0x0, 0x323a24(%rip)    # 0x342774
jle 0x1ee13
xorl %r13d, %r13d
movb (%r14,%r13), %bl
movl 0x21f6d1(%rip), %eax    # 0x23e434
cmpq %rax, %r13
jne 0x1ed9d
movl 0x21f6c2(%rip), %eax    # 0x23e430
cmpq %rax, %r15
jne 0x1ed9d
movl 0x323aa7(%rip), %ecx    # 0x342820
movl 0x1f9a91(%rip), %edi    # 0x218810
imull %r13d, %edi
movl 0x1f9a8b(%rip), %esi    # 0x218814
imull %r15d, %esi
testl %ecx, %ecx
cmovnel %r12d, %ecx
movl $0x5f, %edx
callq 0xdfcc
testb %bl, %bl
je 0x1ee13
movslq 0x3239d4(%rip), %rax    # 0x34277c
cmpq %rax, %r15
jge 0x1edce
movl 0x1f9a5d(%rip), %edi    # 0x218810
imull %r13d, %edi
movl 0x1f9a57(%rip), %esi    # 0x218814
imull %r15d, %esi
andb $0x7f, %bl
movzbl %bl, %edx
movl $0xf, %ecx
jmp 0x1edfb
movl 0x1f9a3c(%rip), %edi    # 0x218810
imull %r13d, %edi
movl 0x1f9a36(%rip), %esi    # 0x218814
imull %r15d, %esi
testb %bl, %bl
js 0x1edf0
movzbl %bl, %edx
movl $0xa, %ecx
jmp 0x1edfb
andb $0x7f, %bl
movzbl %bl, %edx
movl $0xe, %ecx
callq 0xdfcc
incq %r13
movslq 0x32396a(%rip), %rax    # 0x342774
cmpq %rax, %r13
jl 0x1ed59
incq %r15
movslq 0x323953(%rip), %rax    # 0x342770
addq $0x85, %r14
cmpq %rax, %r15
jl 0x1ed49
callq 0xab5f
callq 0xd1865
movl -0x2c(%rbp), %eax
cmpl $0x12, %eax
ja 0x1ee68
movsd 0x2ee921(%rip), %xmm0   # 0x30d768
movl %eax, %eax
imulq $0x2260, %rax, %rax     # imm = 0x2260
leaq 0x2ef489(%rip), %rcx    # 0x30e2e0
movsd %xmm0, 0x2248(%rax,%rcx)
movb $0x0, 0x2250(%rax,%rcx)
movl $0x0, 0x323906(%rip)    # 0x342778
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %rax
movl 0x21f59a(%rip), %r15d   # 0x23e430
movslq 0x3238d3(%rip), %r13    # 0x342770
leaq -0x1(%r13), %r12
cmpl %r12d, %r15d
jl 0x1eef8
movl %edi, -0x2c(%rbp)
movslq 0x3238cc(%rip), %rbx    # 0x34277c
cmpl %r12d, %ebx
jge 0x1eee3
imulq $0x85, %rbx, %rdi
leaq 0x32176d(%rip), %rax    # 0x340630
addq %rax, %rdi
notq %rbx
addq %r13, %rbx
leaq 0x85(%rdi), %r14
movq %r14, %rsi
callq 0x9340
movq %r14, %rdi
decq %rbx
jne 0x1eecc
imulq $0x85, %r12, %rax
leaq 0x32173f(%rip), %rcx    # 0x340630
movb $0x0, (%rax,%rcx)
movl -0x2c(%rbp), %edi
incl %r15d
cmpl %r13d, %r15d
cmovgel %r12d, %r15d
movl %r15d, 0x21f527(%rip)   # 0x23e430
movslq %r15d, %rax
imulq $0x85, %rax, %rax
leaq 0x321716(%rip), %rcx    # 0x340630
movb $0x0, (%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1ed16
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1f98c9(%rip), %eax    # 0x218804
cltd
idivl 0x1f98d2(%rip)          # 0x218814
movl %eax, %ecx
cmpl $0x41, %eax
movl $0x41, %esi
cmovll %eax, %esi
decl %esi
movl %esi, 0x323819(%rip)    # 0x342770
movl 0x1f98a3(%rip), %eax    # 0x218800
cltd
idivl 0x1f98ac(%rip)          # 0x218810
movl $0x84, %edx
cmpl %edx, %eax
cmovll %eax, %edx
movl %edx, 0x323800(%rip)    # 0x342774
cmpl $0x2, %ecx
jl 0x1ef9b
movl %esi, %eax
imulq $0x85, %rax, %rax
xorl %ecx, %ecx
leaq 0x3216a5(%rip), %rdx    # 0x340630
movb $0x0, (%rcx,%rdx)
addq $0x85, %rcx
cmpq %rcx, %rax
jne 0x1ef8b
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x323874(%rip)    # 0x34281c
je 0x1efbf
xorl %eax, %eax
movl %eax, 0x323866(%rip)    # 0x342818
movb $0x0, 0x3237d7(%rip)    # 0x342790
movl %eax, 0x32385d(%rip)    # 0x34281c
movslq 0x323852(%rip), %rax    # 0x342818
cmpq $0x82, %rax
jg 0x1efe8
leaq 0x1(%rax), %rcx
movl %ecx, 0x323840(%rip)    # 0x342818
leaq 0x3237b1(%rip), %rcx    # 0x342790
movb %dil, (%rax,%rcx)
movb $0x0, 0x1(%rax,%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x27724
movb $0x4f, 0x2ed437(%rip)   # 0x30c7a8
xorl %ebx, %ebx
movl %ebx, 0x21f0c3(%rip)    # 0x23e43c
callq 0x1ef31
movl 0x2eef4c(%rip), %edi    # 0x30e2d0
callq 0x1efea
movl 0x3233ed(%rip), %eax    # 0x34277c
movl %eax, 0x21f09b(%rip)    # 0x23e430
movl %ebx, 0x21f099(%rip)    # 0x23e434
movl 0x2eef2f(%rip), %edi    # 0x30e2d0
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1ed16
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3205f5(%rip), %r15    # 0x340000
leaq 0x31c80e(%rip), %r12    # 0x33c220
leaq 0x10af97(%rip), %r13    # 0x12a9b0
callq 0xed5e
xorl %edi, %edi
xorl %esi, %esi
movl $0xa, %edx
leaq 0xeb9e9(%rip), %rcx     # 0x10b417
callq 0xe7d0
callq 0xab5f
cmpl $0x0, -0x2c(%rbp)
je 0x1fa4a
movl $0x4, %edi
xorl %esi, %esi
callq 0x61765
xorl %ebx, %ebx
movl $0x2, %r14d
callq 0xd5c9
movq 0x151462(%rip), %rdi    # 0x170ec0
callq 0x95c0
movl $0xa, %edi
callq 0xb9c3
testl %eax, %eax
je 0x1fac8
callq 0xd1865
movsd 0x2edcea(%rip), %xmm0   # 0x30d768
movsd %xmm0, 0x306262(%rip)   # 0x325ce8
movb $0x0, 0x306263(%rip)    # 0x325cf0
movl $0xa, %edi
callq 0xbb11
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 0xe7d0
callq 0xab5f
cmpl $0x2d, %ebx
jge 0x1fad4
addl $0x3, %ebx
jmp 0x1fae9
movl $0xa, %edi
callq 0x1e6a0
jmp 0x1fae9
cmpl $0x20, %r14d
leal 0x1(%r14), %eax
movl $0x2, %ecx
cmovgel %ecx, %eax
xorl %ebx, %ebx
movl %eax, %r14d
callq 0xd5c9
movq 0x1513cb(%rip), %rdi    # 0x170ec0
callq 0x95c0
callq 0xa826
mulsd 0xe9531(%rip), %xmm0    # 0x109038
addsd 0xe9549(%rip), %xmm0    # 0x109058
movsd %xmm0, 0x2eda81(%rip)   # 0x30d598
movl 0x32052b(%rip), %eax    # 0x340048
cmpl %eax, 0x320521(%rip)    # 0x340044
je 0x1fa52
leal 0x1(%rax), %ecx
cmpl $0xf, %eax
movl $0x0, %eax
cmovgel %eax, %ecx
movl %ecx, 0x32050b(%rip)    # 0x340048
movslq %ecx, %rax
cmpl $0x1b, (%r15,%rax,4)
jne 0x1fa19
callq 0x1ecbb
movl $0x1a0a, %edi           # imm = 0x1A0A
leaq 0xeb8c8(%rip), %rsi     # 0x10b424
callq 0xb425
jmp 0x1fa52
// File: /workspace/github_cpp_makefile_star2_O1/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 0x200d1
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, %r14d
leaq 0x150c4d(%rip), %r15    # 0x170c90
movq (%rbx,%r14,8), %r13
movzbl (%r13), %eax
orl $0x2, %eax
cmpl $0x2f, %eax
jne 0x200bb
leaq 0x1(%r13), %rdi
movl $0x2, %edx
leaq 0xeb461(%rip), %rsi     # 0x10b4c5
callq 0x9140
testl %eax, %eax
jne 0x200bb
movzbl 0x3(%r13), %eax
cmpl $0x3d, %eax
je 0x2007c
cmpl $0x3a, %eax
jne 0x200bb
addq $0x4, %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x90e0
movq %r15, %rdi
callq 0x9120
cmpb $0x2f, -0x1(%rax,%r15)
je 0x200aa
movq %r15, %rdi
callq 0x9120
movw $0x2f, (%rax,%r15)
leaq 0xeb417(%rip), %rdi     # 0x10b4c8
movq %r15, %rsi
xorl %eax, %eax
callq 0x9030
incq %r14
cmpq %r14, %r12
jne 0x20043
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x2ed617(%rip)    # 0x30d894
je 0x20286
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xf4c7a(%rip), %rdi     # 0x114f07
callq 0x9460
testq %rax, %rax
jne 0x202a3
leaq 0x1147e8(%rip), %rdi    # 0x134a86
callq 0x9460
testq %rax, %rax
je 0x2027f
leaq 0x31bf71(%rip), %rbx    # 0x33c220
movl $0x80, %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x9170
movb $0x0, 0x31bfd9(%rip)    # 0x33c29f
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xe2e4f
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x2ecce5(%rip)    # 0x30cfd0
movq %rax, 0x2ecce6(%rip)    # 0x30cfd8
movq %rax, 0x2ecce7(%rip)    # 0x30cfe0
leaq 0xeb24b(%rip), %rdi     # 0x10b54b
leaq 0x1009a6(%rip), %rsi    # 0x120cad
callq 0x9430
testq %rax, %rax
je 0x203ab
movq %rax, %rbx
leaq 0x31bf01(%rip), %rdi    # 0x33c220
movl $0x201, %esi            # imm = 0x201
movq %rax, %rdx
callq 0x9600
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x203a1
leaq 0x31bee2(%rip), %r15    # 0x33c220
leaq 0xeaa83(%rip), %r12     # 0x10adc8
movb 0x31bed5(%rip), %al     # 0x33c220
testb %al, %al
je 0x2036d
leaq 0x31becb(%rip), %r13    # 0x33c221
movsbl %al, %edi
callq 0x9700
movb %al, -0x1(%r13)
movb (%r13), %al
incq %r13
testb %al, %al
jne 0x20356
movq %r15, %rdi
movq %r12, %rsi
callq 0x9090
testq %rax, %rax
jne 0x2038c
movq %r15, %rdi
callq 0x31440
movl %eax, %r14d
testl %eax, %eax
je 0x203c3
movq %r15, %rdi
movl $0x201, %esi            # imm = 0x201
movq %rbx, %rdx
callq 0x9600
testq %rax, %rax
jne 0x20345
movq %rbx, %rdi
callq 0x9370
jmp 0x203b1
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 0x31af25(%rip), %xmm0   # 0x33b2f0
movsd %xmm0, 0x2ecbfd(%rip)   # 0x30cfd0
movsd 0x31af1d(%rip), %xmm1   # 0x33b2f8
movsd %xmm1, 0x2ecbf5(%rip)   # 0x30cfd8
movsd 0x31af15(%rip), %xmm2   # 0x33b300
movsd %xmm2, 0x2ecbed(%rip)   # 0x30cfe0
movsd %xmm0, 0x31af2d(%rip)   # 0x33b328
movsd %xmm1, 0x31af2d(%rip)   # 0x33b330
movsd %xmm2, 0x31af2d(%rip)   # 0x33b338
movsd %xmm0, 0x31aefd(%rip)   # 0x33b310
movsd %xmm1, 0x31aefd(%rip)   # 0x33b318
movsd %xmm2, 0x31aefd(%rip)   # 0x33b320
callq 0x9710
movsd %xmm0, 0x2ecb98(%rip)   # 0x30cfc8
xorl %r14d, %r14d
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x203a1
jp 0x203a1
movabsq $0x3f50624dd2f1a9fc, %rax # imm = 0x3F50624DD2F1A9FC
movq %rax, 0x2ecb70(%rip)    # 0x30cfc8
jmp 0x203a1
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x321e24(%rip)    # 0x342828
je 0x20a07
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, 0x2ed43d(%rip)    # 0x30de6c
je 0x20ade
movl 0x1f7d9c(%rip), %r15d   # 0x2187d8
movl 0x1f7e4e(%rip), %ebx    # 0x218890
movl 0x31ebc3(%rip), %r14d   # 0x33f60c
testl %r15d, %r15d
je 0x20a62
movl $0x14, 0x1f7e38(%rip)   # 0x218890
movl $0x16, 0x31ebaa(%rip)   # 0x33f60c
movb 0x2ebd3f(%rip), %r12b   # 0x30c7a8
movl $0x2, 0x1f7d65(%rip)    # 0x2187d8
movb $0x1, %al
movb %al, 0x1f7de0(%rip)     # 0x21885b
movb %al, 0x1f7dd9(%rip)     # 0x21885a
movl $0x9, %edi
callq 0x277f5
movl 0x321d93(%rip), %eax    # 0x342824
movl 0x1f7df9(%rip), %ecx    # 0x218890
addl $-0x4, %ecx
cmpl %ecx, %eax
jle 0x20aec
movl $0x1, 0x31fb74(%rip)    # 0x34061c
leaq 0x110ef7(%rip), %rdi    # 0x1319a6
callq 0x2326e
cmpl $0x1b, %eax
jne 0x20ac3
movl $0x1, 0x321d65(%rip)    # 0x342828
movl $0x0, 0x31fb4f(%rip)    # 0x34061c
callq 0xed5e
movl $0x1, 0x321d48(%rip)    # 0x342824
jmp 0x20af5
leaq -0x230(%rbp), %rdi
callq 0x95d0
jmp 0x20b42
testl %eax, %eax
jne 0x20af5
callq 0xed5e
movl 0x321d29(%rip), %edi    # 0x342824
leaq -0x230(%rbp), %rcx
xorl %esi, %esi
movl $0xf, %edx
callq 0xe7d0
incl 0x321d10(%rip)          # 0x342824
movl %r15d, 0x1f7cbd(%rip)   # 0x2187d8
testl %r15d, %r15d
jne 0x20b2e
xorl %eax, %eax
movb %al, 0x1f7d33(%rip)     # 0x21885b
movb %al, 0x1f7d2c(%rip)     # 0x21885a
movb %r12b, 0x2ebc73(%rip)   # 0x30c7a8
movl %ebx, 0x1f7d55(%rip)    # 0x218890
movl %r14d, 0x31eaca(%rip)   # 0x33f60c
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x31b6c7(%rip)    # 0x33c220
movb (%rdi), %cl
testb %cl, %cl
je 0x20bc3
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 0x31b6a2(%rip), %r14    # 0x33c220
cmpb $0xd, %cl
movzbl %cl, %ecx
cmovel %r15d, %ecx
cmpb $0xa, %cl
jne 0x20b99
movq %r14, %rdi
callq 0x209fd
xorl %eax, %eax
jmp 0x20bb0
cmpl $0x1fe, %eax            # imm = 0x1FE
ja 0x20bb0
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 0x20b7e
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x31b628(%rip), %r15    # 0x33c220
leaq 0xec401(%rip), %rsi     # 0x10d000
movl $0x46, %edx
movq %r15, %rdi
callq 0x92b0
movl %r14d, %edi
xorl %esi, %esi
movl $0xf, %edx
movq %r15, %rcx
callq 0xe7d0
cmpl $0x0, 0x322463(%rip)    # 0x343088
jle 0x20c91
incl %r14d
leaq 0x32212f(%rip), %r13    # 0x342d60
leaq 0x31b5e8(%rip), %r15    # 0x33c220
xorl %r12d, %r12d
movq (%r13), %rdx
testq %rdx, %rdx
je 0x20c7e
movq %r15, %rdi
leaq 0x102606(%rip), %rsi    # 0x123254
xorl %eax, %eax
callq 0x9060
leal 0x1(%r14), %ebx
movl %r14d, %edi
movl -0x2c(%rbp), %esi
movl $0xf, %edx
movq %r15, %rcx
callq 0xe7d0
leaq 0x1f7b99(%rip), %rax    # 0x21880c
movl (%rax), %eax
decl %eax
movl %ebx, %r14d
cmpl %eax, %ebx
jge 0x20c91
incq %r12
movslq 0x322400(%rip), %rax    # 0x343088
addq $0x8, %r13
cmpq %rax, %r12
jl 0x20c3b
addq $0x8, %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: 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 0x20eef
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xed5e
xorl %edi, %edi
xorl %esi, %esi
movl $0xe, %edx
movq %rbx, %rcx
callq 0xe7d0
callq 0xab5f
movl $0x1e9a, %edi           # imm = 0x1E9A
callq 0x9d80
movl $0x3e8, %edi            # imm = 0x3E8
callq 0xaff7
leaq 0x31e40b(%rip), %rax    # 0x33f2e0
movw $0x20, (%rax)
movl $0x1, 0x323834(%rip)    # 0x344718
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x20ef0
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x149160(%rip), %xmm0   # 0x16a058
ucomisd 0xe8170(%rip), %xmm0    # 0x109070
leaq 0xf9e12(%rip), %rax     # 0x11ad19
leaq 0xf9ded(%rip), %rcx     # 0x11acfb
cmovneq %rax, %rcx
cmovpq %rax, %rcx
leaq 0x31e6c3(%rip), %rax    # 0x33f5e0
movq %rcx, (%rax)
leaq 0x1f79b9(%rip), %rax    # 0x2188e0
movl (%rax), %eax
testl %eax, %eax
leaq 0xf9e30(%rip), %rcx     # 0x11ad62
leaq 0xf9dfe(%rip), %rdx     # 0x11ad37
cmoveq %rcx, %rdx
leaq 0x31e6a4(%rip), %rcx    # 0x33f5e8
movq %rdx, (%rcx)
leaq 0x2eb85a(%rip), %rcx    # 0x30c7a8
cmpb $0x60, (%rcx)
jne 0x20f71
leaq 0xf9e32(%rip), %rcx     # 0x11ad8c
leaq 0x31e68f(%rip), %rdx    # 0x33f5f0
movq %rcx, (%rdx)
testl %eax, %eax
jne 0x20f86
leaq 0x31e689(%rip), %rax    # 0x33f5f8
jmp 0x20f7c
testl %eax, %eax
jne 0x20f86
leaq 0x31e674(%rip), %rax    # 0x33f5f0
leaq 0xf9e32(%rip), %rcx     # 0x11adb5
movq %rcx, (%rax)
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x31a894(%rip), %rbx    # 0x33b828
movl (%rbx), %r14d
movl $0x1, (%rbx)
callq 0x727c3
movl %r14d, (%rbx)
leaq 0x31a880(%rip), %rax    # 0x33b82c
movl $0x0, (%rax)
leaq 0xf9e39(%rip), %rsi     # 0x11adf2
movl $0x180, %edi            # imm = 0x180
popq %rbx
popq %r14
popq %rbp
jmp 0x2bc51
// File: /workspace/github_cpp_makefile_star2_O1/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 0x20ff2
movslq 0x149075(%rip), %rdx    # 0x16a050
testq %rdx, %rdx
jle 0x20ff2
shlq $0x3, %rdx
leaq 0x321985(%rip), %rdi    # 0x342970
xorl %esi, %esi
callq 0x91a0
testb $0x2, %bl
je 0x2100a
leaq 0x321a02(%rip), %rdi    # 0x342a00
movl $0x320, %edx            # imm = 0x320
xorl %esi, %esi
callq 0x91a0
xorl %eax, %eax
movq %rax, 0x321d15(%rip)    # 0x342d28
movq %rax, 0x321d1e(%rip)    # 0x342d38
movl $0x0, 0x321d0c(%rip)    # 0x342d30
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x321ced(%rip)    # 0x342d30
leaq 0x31a9f6(%rip), %rdi    # 0x33ba40
movsbl 0x4(%rdi), %ecx
addl $-0x30, %ecx
movl $0x1, %eax
cmpl $0x9, %ecx
ja 0x21064
addq $0x4, %rdi
callq 0x95e0
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movl 0x148fde(%rip), %r13d   # 0x16a050
movl %ecx, %eax
cltd
idivl %r13d
testl %edx, %edx
je 0x210c4
movl %edx, %ebx
leal -0x1(%r13), %r14d
movslq %r14d, %r12
shlq $0x3, %r14
leaq 0x3218e0(%rip), %r15    # 0x342970
movsd 0x3218d8(%rip), %xmm0   # 0x342970
cmpl $0x2, %r13d
jl 0x210ba
movq %r15, %rdi
leaq 0x3218d0(%rip), %rsi    # 0x342978
movq %r14, %rdx
movsd %xmm0, -0x30(%rbp)
callq 0x9650
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%r15,%r12,8)
decl %ebx
jne 0x21090
addq $0x8, %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: 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, 0x321c53(%rip)    # 0x342d30
leaq 0x31a95c(%rip), %rdi    # 0x33ba40
movsbl 0x2(%rdi), %ecx
addl $-0x30, %ecx
movl $0x1, %eax
cmpl $0x9, %ecx
ja 0x21103
pushq %rbp
movq %rsp, %rbp
addq $0x2, %rdi
callq 0x95e0
popq %rbp
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movslq 0x148f3f(%rip), %rsi    # 0x16a050
movl %ecx, %eax
cltd
idivl %esi
testl %edx, %edx
je 0x21160
leal -0x1(%rsi), %eax
movslq %eax, %rcx
leaq 0x321849(%rip), %rdi    # 0x342970
movsd -0x8(%rdi,%rsi,8), %xmm0
testl %eax, %eax
je 0x2114c
movq %rcx, %r9
movq %rcx, %r8
movsd -0x8(%rdi,%r9,8), %xmm1
movsd %xmm1, (%rdi,%r9,8)
decq %r8
movq %r8, %r9
jne 0x21137
movsd %xmm0, 0x32181c(%rip)   # 0x342970
decl %edx
jne 0x21127
movsd %xmm0, 0x321bd8(%rip)   # 0x342d38
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x321bc5(%rip)    # 0x342d30
movsd 0x3217fd(%rip), %xmm0   # 0x342970
movsd %xmm0, 0x321bbd(%rip)   # 0x342d38
movsd %xmm0, 0x321ba5(%rip)   # 0x342d28
movl 0x148ec7(%rip), %edx    # 0x16a050
cmpl $0x2, %edx
jl 0x211be
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
decl %edx
shlq $0x3, %rdx
leaq 0x3217cd(%rip), %rdi    # 0x342970
leaq 0x3217ce(%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_O1/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, 0x321b56(%rip)    # 0x342d30
leaq 0x31a85f(%rip), %rdi    # 0x33ba40
movsbl 0x4(%rdi), %ecx
addl $-0x30, %ecx
movl $0x1, %eax
cmpl $0x9, %ecx
ja 0x211fb
addq $0x4, %rdi
callq 0x95e0
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movl 0x148e47(%rip), %r13d   # 0x16a050
movl %ecx, %eax
cltd
idivl %r13d
movsd 0x321759(%rip), %xmm0   # 0x342970
movsd %xmm0, -0x30(%rbp)
testl %edx, %edx
je 0x2127c
movl %edx, %ebx
leal -0x1(%r13), %r14d
shlq $0x3, %r14
leaq 0x32173f(%rip), %r15    # 0x342970
leaq 0x321740(%rip), %r12    # 0x342978
movsd 0x321730(%rip), %xmm0   # 0x342970
cmpl $0x2, %r13d
jl 0x2125e
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movsd %xmm0, -0x38(%rbp)
callq 0x9650
movsd -0x38(%rbp), %xmm0
decl %ebx
jne 0x21238
movl $0x0, 0x321ac4(%rip)    # 0x342d30
movsd %xmm0, 0x321ac4(%rip)   # 0x342d38
movsd %xmm0, 0x321aac(%rip)   # 0x342d28
movsd -0x30(%rbp), %xmm0
movsd %xmm0, 0x321a9f(%rip)   # 0x342d28
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: 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, 0x321a8d(%rip)    # 0x342d30
jne 0x212cc
movslq 0x148da4(%rip), %rax    # 0x16a050
cmpq $0x1, %rax
je 0x212cc
decq %rax
leaq 0x3216b4(%rip), %rcx    # 0x342970
movsd -0x8(%rcx,%rax,8), %xmm1
movsd %xmm1, (%rcx,%rax,8)
decq %rax
jne 0x212bc
movsd %xmm0, 0x32169c(%rip)   # 0x342970
movl $0x0, 0x321a52(%rip)    # 0x342d30
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x321684(%rip), %xmm1   # 0x342970
addsd %xmm1, %xmm0
movsd %xmm0, 0x321678(%rip)   # 0x342970
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jne 0x2130e
jp 0x2130e
movl $0x1, 0x321a3e(%rip)    # 0x342d4c
movsd %xmm1, 0x321a12(%rip)   # 0x342d28
movl $0x0, 0x321a10(%rip)    # 0x342d30
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x31a70f(%rip), %rdi    # 0x33ba40
movsbl 0x5(%rdi), %ecx
addl $-0x30, %ecx
movl $0x1, %eax
cmpl $0x9, %ecx
ja 0x2134b
addq $0x5, %rdi
callq 0x95e0
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movl %ecx, %eax
cltd
idivl 0x148cf5(%rip)          # 0x16a050
leaq 0x32160e(%rip), %rax    # 0x342970
movsd (%rax,%rdx,8), %xmm0
movsd 0x321601(%rip), %xmm1   # 0x342970
movsd %xmm1, -0x8(%rbp)
callq 0x21298
movsd -0x8(%rbp), %xmm0
movsd %xmm0, 0x3219a2(%rip)   # 0x342d28
movl $0x0, 0x3219a0(%rip)    # 0x342d30
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x31a69f(%rip), %rdi    # 0x33ba40
movsbl 0x4(%rdi), %ecx
addl $-0x30, %ecx
movl $0x1, %eax
cmpl $0x9, %ecx
ja 0x213bb
addq $0x4, %rdi
callq 0x95e0
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movl %ecx, %eax
cltd
idivl 0x148c85(%rip)          # 0x16a050
movsd 0x32159d(%rip), %xmm0   # 0x342970
leaq 0x321596(%rip), %rax    # 0x342970
movsd (%rax,%rdx,8), %xmm1
movsd %xmm1, 0x321589(%rip)   # 0x342970
movsd %xmm0, (%rax,%rdx,8)
movsd %xmm0, 0x321934(%rip)   # 0x342d28
movl $0x0, 0x321932(%rip)    # 0x342d30
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x321564(%rip), %xmm1   # 0x342970
movsd %xmm1, 0x321914(%rip)   # 0x342d28
movsd %xmm0, 0x32191c(%rip)   # 0x342d38
movsd %xmm0, 0x32154c(%rip)   # 0x342970
movl $0x0, 0x321902(%rip)    # 0x342d30
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_store()
void rpn_store()
{
int i;
int sign;

   // save top of stack into a memory location
   sign = msg_field[3];
   i = 0;
   if(isdigit(sign)) i = atoi(&msg_field[3]);
   else if(sign) i = atoi(&msg_field[4]);
   if(i < 0) i = 0 - i;

   sprintf(out, "Memory index out of range 0..%d", RPN_MEM);
   if(i >= RPN_MEM) rpn_error(out);
   else if(sign == '+') rpn_mem[i] += rpn[0];
   else if(sign == '-') rpn_mem[i] -= rpn[0];
   else if(sign == '*') rpn_mem[i] *= rpn[0];
   else if(sign == '/') rpn_mem[i] /= rpn[0];
   else if(sign == '@') {  // indirect
      i = (int) rpn_mem[i];
      i = i % RPN_MEM;
      rpn_mem[i] = rpn[0];
   }
   else rpn_mem[i] = rpn[0];
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x31a5e2(%rip), %rdi    # 0x33ba40
movsbl 0x3(%rdi), %eax
movzbl %al, %ebx
addl $-0x30, %eax
cmpl $0xa, %eax
jae 0x21473
addq $0x3, %rdi
jmp 0x2147b
testl %ebx, %ebx
je 0x214ef
addq $0x4, %rdi
callq 0x95e0
movl %eax, %r14d
negl %r14d
cmovsl %eax, %r14d
leaq 0x31ad8f(%rip), %rdi    # 0x33c220
leaq 0xec028(%rip), %rsi     # 0x10d4c0
movl $0x64, %edx
xorl %eax, %eax
callq 0x9060
cmpl $0x64, %r14d
jb 0x214bb
leaq 0x31ad6f(%rip), %rdi    # 0x33c220
callq 0x20e91
jmp 0x21590
leal -0x2a(%rbx), %eax
cmpl $0x5, %eax
ja 0x214f3
leaq 0xea676(%rip), %rcx     # 0x10bb40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsd 0x321495(%rip), %xmm0   # 0x342970
movl %r14d, %eax
leaq 0x32151b(%rip), %rcx    # 0x342a00
mulsd (%rcx,%rax,8), %xmm0
jmp 0x2158b
xorl %eax, %eax
jmp 0x21480
cmpl $0x40, %ebx
jne 0x2152e
movl %r14d, %eax
leaq 0x3214fe(%rip), %rcx    # 0x342a00
cvttsd2si (%rcx,%rax,8), %eax
cltq
imulq $0x51eb851f, %rax, %rdx # imm = 0x51EB851F
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x25, %rdx
addl %esi, %edx
imull $0x64, %edx, %edx
subl %edx, %eax
movsd 0x321446(%rip), %xmm0   # 0x342970
cltq
jmp 0x2158b
movsd 0x32143a(%rip), %xmm0   # 0x342970
movl %r14d, %eax
leaq 0x3214c0(%rip), %rcx    # 0x342a00
jmp 0x2158b
movl %r14d, %eax
leaq 0x3214b4(%rip), %rcx    # 0x342a00
movsd (%rcx,%rax,8), %xmm0
subsd 0x321417(%rip), %xmm0   # 0x342970
jmp 0x2158b
movl %r14d, %eax
leaq 0x32149b(%rip), %rcx    # 0x342a00
movsd (%rcx,%rax,8), %xmm0
divsd 0x3213fe(%rip), %xmm0   # 0x342970
jmp 0x2158b
movsd 0x3213f4(%rip), %xmm0   # 0x342970
movl %r14d, %eax
leaq 0x32147a(%rip), %rcx    # 0x342a00
addsd (%rcx,%rax,8), %xmm0
movsd %xmm0, (%rcx,%rax,8)
movl $0x0, 0x321796(%rip)    # 0x342d30
popq %rbx
popq %r14
popq %rbp
retq