LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 0x20a6f7(%rip), %r15d   # 0x228430
movslq 0x30ea30(%rip), %r13    # 0x32c770
movq %r13, %r12
decq %r12
cmpl %r12d, %r15d
jl 0x1dd97
movl %edi, -0x2c(%rbp)
movslq 0x30ea27(%rip), %rbx    # 0x32c77c
imulq $0x85, %rbx, %rdi
leaq 0x30c8cd(%rip), %rax    # 0x32a630
addq %rax, %rdi
cmpq %r12, %rbx
jge 0x1dd82
incq %rbx
leaq 0x85(%rdi), %r14
movq %r14, %rsi
callq 0x9330
movq %r14, %rdi
jmp 0x1dd66
imulq $0x85, %r12, %rax
leaq 0x30c8a0(%rip), %rcx    # 0x32a630
movb $0x0, (%rax,%rcx)
movl -0x2c(%rbp), %edi
incl %r15d
cmpl %r13d, %r15d
cmovgel %r12d, %r15d
movl %r15d, 0x20a688(%rip)   # 0x228430
movslq %r15d, %rax
imulq $0x85, %rax, %rax
leaq 0x30c877(%rip), %rcx    # 0x32a630
movb $0x0, (%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1dbfe
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1e4a2a(%rip), %eax    # 0x202804
cltd
idivl 0x1e4a33(%rip)          # 0x202814
cmpl $0x41, %eax
movl $0x41, %ecx
cmovll %eax, %ecx
decl %ecx
movl %ecx, 0x30e97c(%rip)    # 0x32c770
movl 0x1e4a06(%rip), %eax    # 0x202800
cltd
idivl 0x1e4a0f(%rip)          # 0x202810
movl $0x84, %edx
cmpl %edx, %eax
cmovll %eax, %edx
movl %edx, 0x30e963(%rip)    # 0x32c774
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %ecx
imulq $0x85, %rcx, %rcx
leaq 0x30c80a(%rip), %rdx    # 0x32a630
cmpq %rax, %rcx
je 0x1de37
movb $0x0, (%rax,%rdx)
addq $0x85, %rax
jmp 0x1de26
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, 0x30e9d8(%rip)    # 0x32c81c
je 0x1de58
movb $0x0, 0x30e943(%rip)    # 0x32c790
andl $0x0, 0x30e9c8(%rip)    # 0x32c81c
xorl %eax, %eax
jmp 0x1de65
movl 0x30e9ba(%rip), %eax    # 0x32c818
cmpl $0x82, %eax
jg 0x1de81
cltq
leaq 0x1(%rax), %rcx
movl %ecx, 0x30e9a7(%rip)    # 0x32c818
leaq 0x30e918(%rip), %rcx    # 0x32c790
movb %dil, (%rax,%rcx)
movb $0x0, 0x1(%rax,%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x1a
popq %rdi
callq 0x257d9
movb $0x4f, 0x2d85b3(%rip)   # 0x2f67a8
andl $0x0, 0x20a240(%rip)    # 0x22843c
callq 0x1ddd0
movl 0x2da0c9(%rip), %edi    # 0x2f82d0
callq 0x1de83
andl $0x0, 0x20a221(%rip)    # 0x228434
movl 0x30e563(%rip), %eax    # 0x32c77c
movl %eax, 0x20a211(%rip)    # 0x228430
movl 0x2da0ab(%rip), %edi    # 0x2f82d0
popq %rbp
jmp 0x1dbfe
// File: /workspace/github_cpp_makefile_star2_O2/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)
pushq $0xa
popq %r15
leaq 0x307b25(%rip), %r13    # 0x326220
pushq $0xf
popq %rbx
callq 0xe7d9
xorl %edi, %edi
xorl %esi, %esi
movl %r15d, %edx
leaq 0xd6d91(%rip), %rcx     # 0xf54a2
callq 0xe2d2
callq 0xaa05
cmpl $0x0, -0x2c(%rbp)
je 0x1e72b
pushq $0x4
popq %rdi
xorl %esi, %esi
callq 0x59afe
xorl %r14d, %r14d
pushq $0x2
popq %rax
movl %eax, %r12d
callq 0x1bca4
movl %r15d, %edi
callq 0xb771
movl %r15d, %edi
testl %eax, %eax
je 0x1e78a
callq 0x1d93f
movl %r15d, %edi
callq 0xb87f
movzbl %al, %edx
movq %r13, %rdi
leaq 0xf625e(%rip), %rsi     # 0x1149c0
xorl %eax, %eax
callq 0x9060
movl %r12d, %edi
movl %r14d, %esi
movl %ebx, %edx
movq %r13, %rcx
callq 0xe2d2
callq 0xaa05
cmpl $0x2d, %r14d
jge 0x1e791
addl $0x3, %r14d
jmp 0x1e7a6
callq 0x1d61b
jmp 0x1e7a6
cmpl $0x20, %r12d
leal 0x1(%r12), %eax
pushq $0x2
popq %rcx
cmovgel %ecx, %eax
xorl %r14d, %r14d
movl %eax, %r12d
callq 0x1bca4
callq 0xd1b9
testl %eax, %eax
je 0x1e734
callq 0xd1d5
cmpl $0x1b, %eax
jne 0x1e6fe
callq 0x1dbaa
movl $0x1a0a, %edi           # imm = 0x1A0A
leaq 0xd6cdc(%rip), %rsi     # 0xf54af
callq 0xb290
jmp 0x1e734
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movslq %edi, %r12
pushq $0x1
popq %r13
leaq 0x13c02a(%rip), %r14    # 0x15ac90
leaq 0xd68e3(%rip), %r15     # 0xf5550
cmpq %r12, %r13
jge 0x1ecd8
movq (%rbx,%r13,8), %rdi
movzbl (%rdi), %eax
orl $0x2, %eax
cmpl $0x2f, %eax
jne 0x1ecd3
cmpb $0x68, 0x1(%rdi)
jne 0x1ecd3
cmpb $0x64, 0x2(%rdi)
jne 0x1ecd3
movzbl 0x3(%rdi), %eax
cmpl $0x3d, %eax
je 0x1ec9b
cmpl $0x3a, %eax
jne 0x1ecd3
addq $0x4, %rdi
movq %r14, %rsi
callq 0x90e0
movq %r14, %rdi
callq 0x9120
cmpb $0x2f, -0x1(%rax,%r14)
je 0x1ecc6
movq %r14, %rdi
callq 0x9120
movw $0x2f, (%rax,%r14)
movq %r15, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x9030
incq %r13
jmp 0x1ec6d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, 0x2d8a1e(%rip)    # 0x2f7894
je 0x1ee7f
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xe0195(%rip), %rdi     # 0xff01b
callq 0x9460
testq %rax, %rax
jne 0x1eea1
leaq 0xffbff(%rip), %rdi     # 0x11ea96
callq 0x9460
testq %rax, %rax
je 0x1ee78
leaq 0x307378(%rip), %rbx    # 0x326220
movl $0x80, %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x9170
movb $0x0, 0x3073e0(%rip)    # 0x32629f
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xd03dc
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
andq $0x0, 0x2d80f0(%rip)    # 0x2f6fd0
andq $0x0, 0x2d80f0(%rip)    # 0x2f6fd8
andq $0x0, 0x2d80f0(%rip)    # 0x2f6fe0
leaq 0xd66dc(%rip), %rdi     # 0xf55d3
leaq 0xebdd7(%rip), %rsi     # 0x10acd5
callq 0x9430
testq %rax, %rax
je 0x1eff8
movq %rax, %rbx
pushq $-0x1
popq %r14
leaq 0x307306(%rip), %r15    # 0x326220
leaq 0xd5f32(%rip), %r12     # 0xf4e53
movq %r15, %rdi
movl $0x201, %esi            # imm = 0x201
movq %rbx, %rdx
callq 0x9600
testq %rax, %rax
je 0x1efee
movq %r15, %rdi
callq 0x988f
movq %r15, %rdi
movq %r12, %rsi
callq 0x9090
testq %rax, %rax
jne 0x1ef21
movq %r15, %rdi
callq 0x2e9e6
movl %eax, %r14d
testl %eax, %eax
jne 0x1ef21
movsd 0x306387(%rip), %xmm0   # 0x3252f0
movsd %xmm0, 0x2d805f(%rip)   # 0x2f6fd0
movsd 0x30637f(%rip), %xmm1   # 0x3252f8
movsd %xmm1, 0x2d8057(%rip)   # 0x2f6fd8
movsd 0x306377(%rip), %xmm2   # 0x325300
movsd %xmm2, 0x2d804f(%rip)   # 0x2f6fe0
movsd %xmm0, 0x30638f(%rip)   # 0x325328
movsd %xmm1, 0x30638f(%rip)   # 0x325330
movsd %xmm2, 0x30638f(%rip)   # 0x325338
movsd %xmm0, 0x30635f(%rip)   # 0x325310
movsd %xmm1, 0x30635f(%rip)   # 0x325318
movsd %xmm2, 0x30635f(%rip)   # 0x325320
callq 0x9710
movsd %xmm0, 0x2d7ffa(%rip)   # 0x2f6fc8
xorl %r14d, %r14d
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1efee
jp 0x1efee
movabsq $0x3f50624dd2f1a9fc, %rax # imm = 0x3F50624DD2F1A9FC
movq %rax, 0x2d7fda(%rip)    # 0x2f6fc8
movq %rbx, %rdi
callq 0x9360
jmp 0x1effc
pushq $-0x1
popq %r14
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, 0x30d2f8(%rip)    # 0x32c828
je 0x1f533
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 0x9330
cmpb $0x0, 0x2d8911(%rip)    # 0x2f7e6c
je 0x1f608
movl 0x1e3270(%rip), %r15d   # 0x2027d8
movl 0x1e3322(%rip), %ebx    # 0x202890
movl 0x30a097(%rip), %r14d   # 0x32960c
testl %r15d, %r15d
je 0x1f58e
movl $0x14, 0x1e330c(%rip)   # 0x202890
movl $0x16, 0x30a07e(%rip)   # 0x32960c
movb 0x2d7213(%rip), %r12b   # 0x2f67a8
movl $0x2, 0x1e3239(%rip)    # 0x2027d8
movb $0x1, %al
movb %al, 0x1e32b4(%rip)     # 0x20285b
movb %al, 0x1e32ad(%rip)     # 0x20285a
pushq $0x9
popq %rdi
callq 0x258aa
movl 0x30d269(%rip), %edi    # 0x32c824
movl 0x1e32cf(%rip), %eax    # 0x202890
addl $-0x4, %eax
cmpl %eax, %edi
jle 0x1f616
movl $0x1, 0x30b04a(%rip)    # 0x32a61c
leaq 0xfc3dd(%rip), %rdi     # 0x11b9b6
callq 0x214df
cmpl $0x1b, %eax
jne 0x1f5ed
movl $0x1, 0x30d23b(%rip)    # 0x32c828
andl $0x0, 0x30b028(%rip)    # 0x32a61c
callq 0xe7d9
movl $0x1, 0x30d221(%rip)    # 0x32c824
pushq $0x1
popq %rdi
jmp 0x1f625
leaq -0x230(%rbp), %rdi
callq 0x95d0
jmp 0x1f66a
testl %edi, %edi
jne 0x1f625
callq 0xe7d9
movl 0x30d1ff(%rip), %edi    # 0x32c824
pushq $0xf
popq %rdx
leaq -0x230(%rbp), %rcx
xorl %esi, %esi
callq 0xe2d2
incl 0x30d1e8(%rip)          # 0x32c824
movl %r15d, 0x1e3195(%rip)   # 0x2027d8
testl %r15d, %r15d
jne 0x1f656
xorl %eax, %eax
movb %al, 0x1e320b(%rip)     # 0x20285b
movb %al, 0x1e3204(%rip)     # 0x20285a
movb %r12b, 0x2d714b(%rip)   # 0x2f67a8
movl %ebx, 0x1e322d(%rip)    # 0x202890
movl %r14d, 0x309fa2(%rip)   # 0x32960c
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x0, 0x306b92(%rip)    # 0x326220
xorl %eax, %eax
pushq $0x20
popq %r15
leaq 0x306b85(%rip), %r14    # 0x326220
incq %rbx
movq %rbx, %rdx
movb -0x1(%rdx), %cl
testb %cl, %cl
je 0x1f6e3
movq %rdx, %rbx
cmpb $0xd, %cl
movzbl %cl, %ecx
cmovel %r15d, %ecx
cmpb $0xa, %cl
je 0x1f6d7
leaq 0x1(%rbx), %rdx
cmpl $0x1fe, %eax            # imm = 0x1FE
ja 0x1f6a1
movl %eax, %edx
leaq 0x1(%rdx), %rax
movb %cl, (%rdx,%r14)
movb $0x0, 0x1(%rdx,%r14)
jmp 0x1f69b
movq %r14, %rdi
callq 0x1f529
xorl %eax, %eax
jmp 0x1f69b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x306b00(%rip), %r15    # 0x326220
leaq 0xd79ed(%rip), %rsi     # 0xf7114
pushq $0x46
popq %rdx
movq %r15, %rdi
callq 0x92a0
pushq $0xf
popq %rdx
movl %r14d, %edi
xorl %esi, %esi
movq %r15, %rcx
callq 0xe2d2
movl 0x30d940(%rip), %eax    # 0x32d088
testl %eax, %eax
je 0x1f7bd
incl %r14d
leaq 0x30d60a(%rip), %r12    # 0x32cd60
leaq 0x306ac3(%rip), %r15    # 0x326220
xorl %r13d, %r13d
movslq %eax, %rcx
cmpq %rcx, %r13
jge 0x1f7bd
movq (%r12), %rdx
testq %rdx, %rdx
je 0x1f7ae
movq %r15, %rdi
leaq 0xedb01(%rip), %rsi     # 0x10d27c
xorl %eax, %eax
callq 0x9060
leal 0x1(%r14), %ebx
movl %r14d, %edi
movl -0x2c(%rbp), %esi
pushq $0xf
popq %rdx
movq %r15, %rcx
callq 0xe2d2
leaq 0x1e306e(%rip), %rax    # 0x20280c
movl (%rax), %eax
decl %eax
cmpl %eax, %ebx
jge 0x1f7bd
movl 0x30d8dc(%rip), %eax    # 0x32d088
jmp 0x1f7b1
movl %r14d, %ebx
incq %r13
addq $0x8, %r12
movl %ebx, %r14d
jmp 0x1f760
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1f9bf
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xe7d9
pushq $0xe
popq %rdx
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rcx
callq 0xe2d2
callq 0xaa05
movl $0x1e9a, %edi           # imm = 0x1E9A
callq 0x9d23
movl $0x3e8, %edi            # imm = 0x3E8
callq 0xae83
leaq 0x30993b(%rip), %rax    # 0x3292e0
movw $0x20, (%rax)
movl $0x1, 0x30ed64(%rip)    # 0x32e718
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1f9c0
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x134690(%rip), %xmm0   # 0x154058
ucomisd 0xd36a0(%rip), %xmm0    # 0xf3070
leaq 0xe5456(%rip), %rax     # 0x104e2d
leaq 0xe5431(%rip), %rcx     # 0x104e0f
cmovneq %rax, %rcx
cmovpq %rax, %rcx
leaq 0x309bf3(%rip), %rax    # 0x3295e0
movq %rcx, (%rax)
leaq 0x1e2ee9(%rip), %rax    # 0x2028e0
movl (%rax), %eax
testl %eax, %eax
leaq 0xe5474(%rip), %rcx     # 0x104e76
leaq 0xe5442(%rip), %rdx     # 0x104e4b
cmoveq %rcx, %rdx
leaq 0x309bd4(%rip), %rcx    # 0x3295e8
movq %rdx, (%rcx)
leaq 0x2d6d8a(%rip), %rcx    # 0x2f67a8
cmpb $0x60, (%rcx)
jne 0x1fa41
leaq 0xe5476(%rip), %rcx     # 0x104ea0
leaq 0x309bbf(%rip), %rdx    # 0x3295f0
movq %rcx, (%rdx)
testl %eax, %eax
jne 0x1fa56
leaq 0x309bb9(%rip), %rax    # 0x3295f8
jmp 0x1fa4c
testl %eax, %eax
jne 0x1fa56
leaq 0x309ba4(%rip), %rax    # 0x3295f0
leaq 0xe5476(%rip), %rcx     # 0x104ec9
movq %rcx, (%rax)
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x305dc4(%rip), %rbx    # 0x325828
movl (%rbx), %r14d
movl $0x1, (%rbx)
callq 0x68b5b
leaq 0x305db3(%rip), %rax    # 0x32582c
andl $0x0, (%rax)
movl %r14d, (%rbx)
leaq 0xe5480(%rip), %rsi     # 0x104f06
movl $0x180, %edi            # imm = 0x180
popq %rbx
popq %r14
popq %rbp
jmp 0x297a7
// File: /workspace/github_cpp_makefile_star2_O2/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
testb $0x1, %dil
jne 0x1fabd
testb $0x2, %dil
jne 0x1fae5
andq $0x0, 0x30d27c(%rip)    # 0x32cd28
andq $0x0, 0x30d284(%rip)    # 0x32cd38
andl $0x0, 0x30d275(%rip)    # 0x32cd30
popq %rbp
retq
movl 0x13458d(%rip), %eax    # 0x154050
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
shlq $0x3, %rax
leaq 0x30ce9b(%rip), %rdx    # 0x32c970
cmpq %rcx, %rax
je 0x1fa9e
andq $0x0, (%rcx,%rdx)
addq $0x8, %rcx
jmp 0x1fad5
xorl %eax, %eax
leaq 0x30cf12(%rip), %rcx    # 0x32ca00
cmpq $0x320, %rax            # imm = 0x320
je 0x1faa4
andq $0x0, (%rax,%rcx)
addq $0x8, %rax
jmp 0x1faee
// File: /workspace/github_cpp_makefile_star2_O2/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:
andl $0x0, 0x30d228(%rip)    # 0x32cd30
leaq 0x305f31(%rip), %rdi    # 0x325a40
movsbl 0x4(%rdi), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x1fb32
pushq %rbp
movq %rsp, %rbp
addq $0x4, %rdi
callq 0x95e0
movl %eax, %ecx
negl %eax
cmovsl %ecx, %eax
popq %rbp
jmp 0x1fb35
pushq $0x1
popq %rax
movl 0x134515(%rip), %ecx    # 0x154050
cltd
idivl %ecx
decl %ecx
movslq %ecx, %rax
xorl %ecx, %ecx
testl %eax, %eax
cmovgl %eax, %ecx
leaq 0x30ce1f(%rip), %rsi    # 0x32c970
subl $0x1, %edx
jb 0x1fb7c
movsd 0x30ce12(%rip), %xmm0   # 0x32c970
xorl %edi, %edi
cmpq %rdi, %rcx
je 0x1fb75
movsd 0x8(%rsi,%rdi,8), %xmm1
movsd %xmm1, (%rsi,%rdi,8)
incq %rdi
jmp 0x1fb60
movsd %xmm0, (%rsi,%rax,8)
jmp 0x1fb51
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
andl $0x0, 0x30d1ac(%rip)    # 0x32cd30
leaq 0x305eb5(%rip), %rdi    # 0x325a40
movsbl 0x2(%rdi), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x1fbae
pushq %rbp
movq %rsp, %rbp
addq $0x2, %rdi
callq 0x95e0
movl %eax, %ecx
negl %eax
cmovsl %ecx, %eax
popq %rbp
jmp 0x1fbb1
pushq $0x1
popq %rax
movl 0x134499(%rip), %ecx    # 0x154050
cltd
idivl %ecx
decl %ecx
movslq %ecx, %rax
leaq 0x30cdaa(%rip), %rcx    # 0x32c970
subl $0x1, %edx
jb 0x1fbfd
movsd (%rcx,%rax,8), %xmm0
movq %rax, %rdi
movq %rax, %rsi
subq $0x1, %rsi
jb 0x1fbeb
movsd (%rcx,%rsi,8), %xmm1
movsd %xmm1, (%rcx,%rdi,8)
movq %rsi, %rdi
jmp 0x1fbd6
movsd %xmm0, 0x30cd7d(%rip)   # 0x32c970
movsd %xmm0, 0x30d13d(%rip)   # 0x32cd38
jmp 0x1fbc6
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
movq %rsp, %rbp
andl $0x0, 0x30d127(%rip)    # 0x32cd30
movsd 0x30cd5f(%rip), %xmm0   # 0x32c970
movsd %xmm0, 0x30d11f(%rip)   # 0x32cd38
movsd %xmm0, 0x30d107(%rip)   # 0x32cd28
movslq 0x134428(%rip), %rax    # 0x154050
decq %rax
xorl %ecx, %ecx
leaq 0x30cd3c(%rip), %rdx    # 0x32c970
cmpq %rax, %rcx
jge 0x1fc49
movsd 0x8(%rdx,%rcx,8), %xmm1
movsd %xmm1, (%rdx,%rcx,8)
incq %rcx
jmp 0x1fc34
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
pushq %rax
andl $0x0, 0x30d0d8(%rip)    # 0x32cd30
leaq 0x305de1(%rip), %rdi    # 0x325a40
movsbl 0x4(%rdi), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x1fc7d
addq $0x4, %rdi
callq 0x95e0
movl %eax, %ecx
negl %eax
cmovsl %ecx, %eax
jmp 0x1fc80
pushq $0x1
popq %rax
cltd
idivl 0x1343c9(%rip)          # 0x154050
movl %edx, %ebx
movsd 0x30ccdf(%rip), %xmm0   # 0x32c970
movsd %xmm0, -0x10(%rbp)
subl $0x1, %ebx
jb 0x1fca2
callq 0x1fbfe
jmp 0x1fc96
movsd -0x10(%rbp), %xmm0
movsd %xmm0, 0x30d079(%rip)   # 0x32cd28
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, 0x30d06f(%rip)    # 0x32cd30
je 0x1fcd4
movsd %xmm0, 0x30cca5(%rip)   # 0x32c970
andl $0x0, 0x30d05e(%rip)    # 0x32cd30
popq %rbp
retq
movslq 0x134375(%rip), %rax    # 0x154050
decq %rax
leaq 0x30cc8b(%rip), %rcx    # 0x32c970
movq %rax, %rdx
subq $0x1, %rdx
jb 0x1fcc3
movsd (%rcx,%rdx,8), %xmm1
movsd %xmm1, (%rcx,%rax,8)
movq %rdx, %rax
jmp 0x1fce8
// File: /workspace/github_cpp_makefile_star2_O2/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 0x30cc67(%rip), %xmm1   # 0x32c970
addsd %xmm1, %xmm0
movsd %xmm0, 0x30cc5b(%rip)   # 0x32c970
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jne 0x1fd2b
jp 0x1fd2b
movl $0x1, 0x30d021(%rip)    # 0x32cd4c
movsd %xmm1, 0x30cff5(%rip)   # 0x32cd28
andl $0x0, 0x30cff6(%rip)    # 0x32cd30
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x305cf5(%rip), %rdi    # 0x325a40
movsbl 0x5(%rdi), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x1fd69
addq $0x5, %rdi
callq 0x95e0
movl %eax, %ecx
negl %eax
cmovsl %ecx, %eax
jmp 0x1fd6c
pushq $0x1
popq %rax
cltd
idivl 0x1342dd(%rip)          # 0x154050
leaq 0x30cbf6(%rip), %rax    # 0x32c970
movsd (%rax,%rdx,8), %xmm0
movsd 0x30cbe9(%rip), %xmm1   # 0x32c970
movsd %xmm1, -0x8(%rbp)
callq 0x1fcb6
movsd -0x8(%rbp), %xmm0
movsd %xmm0, 0x30cf8a(%rip)   # 0x32cd28
andl $0x0, 0x30cf8b(%rip)    # 0x32cd30
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x305c8a(%rip), %rdi    # 0x325a40
movsbl 0x4(%rdi), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x1fdd4
addq $0x4, %rdi
callq 0x95e0
movl %eax, %ecx
negl %eax
cmovsl %ecx, %eax
jmp 0x1fdd7
pushq $0x1
popq %rax
cltd
idivl 0x134272(%rip)          # 0x154050
movsd 0x30cb8a(%rip), %xmm0   # 0x32c970
leaq 0x30cb83(%rip), %rax    # 0x32c970
movsd (%rax,%rdx,8), %xmm1
movsd %xmm1, 0x30cb76(%rip)   # 0x32c970
movsd %xmm0, (%rax,%rdx,8)
movsd %xmm0, 0x30cf21(%rip)   # 0x32cd28
andl $0x0, 0x30cf22(%rip)    # 0x32cd30
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x30cb54(%rip), %xmm1   # 0x32c970
movsd %xmm1, 0x30cf04(%rip)   # 0x32cd28
movsd %xmm0, 0x30cf0c(%rip)   # 0x32cd38
movsd %xmm0, 0x30cb3c(%rip)   # 0x32c970
andl $0x0, 0x30cef5(%rip)    # 0x32cd30
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x305bd5(%rip), %rdi    # 0x325a40
movsbl 0x3(%rdi), %eax
movzbl %al, %r14d
addl $-0x30, %eax
cmpl $0xa, %eax
jae 0x1fe81
addq $0x3, %rdi
jmp 0x1fe8a
testl %r14d, %r14d
je 0x1feff
addq $0x4, %rdi
callq 0x95e0
movl %eax, %r15d
negl %r15d
cmovsl %eax, %r15d
leaq 0x306380(%rip), %rdi    # 0x326220
leaq 0xd772d(%rip), %rsi     # 0xf75d4
pushq $0x64
popq %rbx
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
cmpl $0x64, %r15d
jb 0x1feca
leaq 0x306360(%rip), %rdi    # 0x326220
callq 0x1f963
jmp 0x1ff8b
leal -0x2a(%r14), %eax
cmpl $0x5, %eax
ja 0x1ff04
leaq 0xd5ce6(%rip), %rcx     # 0xf5bc0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsd 0x30ca85(%rip), %xmm0   # 0x32c970
movl %r15d, %eax
leaq 0x30cb0b(%rip), %rcx    # 0x32ca00
mulsd (%rcx,%rax,8), %xmm0
jmp 0x1ff86
xorl %r15d, %r15d
jmp 0x1fe99
cmpl $0x40, %r14d
jne 0x1ff29
movl %r15d, %eax
leaq 0x30caec(%rip), %rcx    # 0x32ca00
cvttsd2si (%rcx,%rax,8), %eax
cltd
idivl %ebx
movsd 0x30ca4c(%rip), %xmm0   # 0x32c970
movslq %edx, %rax
jmp 0x1ff86
movsd 0x30ca3f(%rip), %xmm0   # 0x32c970
movl %r15d, %eax
leaq 0x30cac5(%rip), %rcx    # 0x32ca00
jmp 0x1ff86
movl %r15d, %eax
leaq 0x30cab9(%rip), %rcx    # 0x32ca00
movsd (%rcx,%rax,8), %xmm0
subsd 0x30ca1c(%rip), %xmm0   # 0x32c970
jmp 0x1ff86
movl %r15d, %eax
leaq 0x30caa0(%rip), %rcx    # 0x32ca00
movsd (%rcx,%rax,8), %xmm0
divsd 0x30ca03(%rip), %xmm0   # 0x32c970
jmp 0x1ff86
movsd 0x30c9f9(%rip), %xmm0   # 0x32c970
movl %r15d, %eax
leaq 0x30ca7f(%rip), %rcx    # 0x32ca00
addsd (%rcx,%rax,8), %xmm0
movsd %xmm0, (%rcx,%rax,8)
andl $0x0, 0x30cd9e(%rip)    # 0x32cd30
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_recall()
void rpn_recall()
{
int i;
int sign;

   // push memory location onto stack
   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_push(rpn[0]+rpn_mem[i]);
   else if(sign == '-') rpn_push(rpn[0]-rpn_mem[i]);
   else if(sign == '*') rpn_push(rpn[0]*rpn_mem[i]);
   else if(sign == '/') rpn_push(rpn[0]/rpn_mem[i]);
   else if(sign == '@') {  // indirect
      i = (int) rpn_mem[i];
      i = i % RPN_MEM;
      rpn_push(rpn_mem[i]);
   }
   else rpn_push(rpn_mem[i]);
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x305a92(%rip), %rdi    # 0x325a40
movsbl 0x3(%rdi), %eax
movzbl %al, %r14d
addl $-0x30, %eax
cmpl $0xa, %eax
jae 0x1ffc4
addq $0x3, %rdi
jmp 0x1ffcd
testl %r14d, %r14d
je 0x2003f
addq $0x4, %rdi
callq 0x95e0
movl %eax, %r15d
negl %r15d
cmovsl %eax, %r15d
leaq 0x30623d(%rip), %rdi    # 0x326220
leaq 0xd75ea(%rip), %rsi     # 0xf75d4
pushq $0x64
popq %rbx
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
cmpl $0x64, %r15d
jb 0x2000d
leaq 0x30621d(%rip), %rdi    # 0x326220
callq 0x1f963
jmp 0x200c0
leal -0x2a(%r14), %eax
cmpl $0x5, %eax
ja 0x20044
leaq 0xd5bbb(%rip), %rcx     # 0xf5bd8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsd 0x30c942(%rip), %xmm0   # 0x32c970
movl %r15d, %eax
leaq 0x30c9c8(%rip), %rcx    # 0x32ca00
mulsd (%rcx,%rax,8), %xmm0
jmp 0x200bb
xorl %r15d, %r15d
jmp 0x1ffdc
cmpl $0x40, %r14d
jne 0x20061
movl %r15d, %eax
leaq 0x30c9ac(%rip), %rcx    # 0x32ca00
cvttsd2si (%rcx,%rax,8), %eax
cltd
idivl %ebx
movslq %edx, %rax
jmp 0x2006b
movl %r15d, %eax
leaq 0x30c995(%rip), %rcx    # 0x32ca00
movsd (%rcx,%rax,8), %xmm0
jmp 0x200bb
movsd 0x30c8f6(%rip), %xmm0   # 0x32c970
movl %r15d, %eax
leaq 0x30c97c(%rip), %rcx    # 0x32ca00
subsd (%rcx,%rax,8), %xmm0
jmp 0x200bb
movsd 0x30c8dd(%rip), %xmm0   # 0x32c970
movl %r15d, %eax
leaq 0x30c963(%rip), %rcx    # 0x32ca00
divsd (%rcx,%rax,8), %xmm0
jmp 0x200bb
movsd 0x30c8c4(%rip), %xmm0   # 0x32c970
movl %r15d, %eax
leaq 0x30c94a(%rip), %rcx    # 0x32ca00
addsd (%rcx,%rax,8), %xmm0
callq 0x1fcb6
andl $0x0, 0x30cc69(%rip)    # 0x32cd30
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_max()
void rpn_max()
{
double last;
double x0,y0;
double val;

   // maximum of x and y

   last = rpn[0];

   x0 = rpn_top();
   y0 = rpn_top();
   if(x0 > y0) val = x0;
   else        val = y0;
   rpn_push(val);

   last_x = last;
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movsd 0x30c88e(%rip), %xmm0   # 0x32c970
movsd %xmm0, -0x10(%rbp)
callq 0x1fbfe
movsd %xmm0, -0x8(%rbp)
callq 0x1fbfe
movsd -0x8(%rbp), %xmm1
maxsd %xmm0, %xmm1
movapd %xmm1, %xmm0
callq 0x1fcb6
movsd -0x10(%rbp), %xmm0
movsd %xmm0, 0x30cc13(%rip)   # 0x32cd28
andl $0x0, 0x30cc14(%rip)    # 0x32cd30
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_min()
void rpn_min()
{
double last;
double x0,y0;
double val;

   // minimum of x and y

   last = rpn[0];

   x0 = rpn_top();
   y0 = rpn_top();
   if(x0 < y0) val = x0;
   else        val = y0;
   rpn_push(val);

   last_x = last;
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movsd 0x30c83e(%rip), %xmm0   # 0x32c970
movsd %xmm0, -0x10(%rbp)
callq 0x1fbfe
movsd %xmm0, -0x8(%rbp)
callq 0x1fbfe
movsd -0x8(%rbp), %xmm1
minsd %xmm0, %xmm1
movapd %xmm1, %xmm0
callq 0x1fcb6
movsd -0x10(%rbp), %xmm0
movsd %xmm0, 0x30cbc3(%rip)   # 0x32cd28
andl $0x0, 0x30cbc4(%rip)    # 0x32cd30
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_rtop()
void rpn_rtop()
{
double x, y;

   // rectangular to polar

   last_x = rpn[0];
   x = rpn[0];
   y = rpn[1];
   rpn[0] = sqrt(x*x + y*y);
   rpn[1] = atan2(y,x) * deg_mode;
   last_rpn0 = rpn[0];
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd 0x30c7f2(%rip), %xmm1   # 0x32c970
movsd %xmm1, 0x30cba2(%rip)   # 0x32cd28
movsd 0x30c7ea(%rip), %xmm0   # 0x32c978
movapd %xmm0, %xmm2
mulsd %xmm0, %xmm2
movapd %xmm1, %xmm3
mulsd %xmm1, %xmm3
addsd %xmm2, %xmm3
sqrtsd %xmm3, %xmm2
movsd %xmm2, 0x30c7c2(%rip)   # 0x32c970
callq 0x9050
mulsd 0x133e9d(%rip), %xmm0   # 0x154058
movsd %xmm0, 0x30c7b5(%rip)   # 0x32c978
movsd 0x30c7a5(%rip), %xmm0   # 0x32c970
movsd %xmm0, 0x30cb65(%rip)   # 0x32cd38
andl $0x0, 0x30cb56(%rip)    # 0x32cd30
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_ptor()
void rpn_ptor()
{
double r, theta;

   // polar to rectangular

   last_x = rpn[0];
   r = rpn[0];
   theta = rpn[1];
   rpn[0] = r * cos(theta/deg_mode);
   rpn[1] = r * sin(theta/deg_mode);
   last_rpn0 = rpn[0];
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movsd 0x30c784(%rip), %xmm0   # 0x32c970
movsd %xmm0, -0x8(%rbp)
movsd %xmm0, 0x30cb2f(%rip)   # 0x32cd28
movsd 0x30c777(%rip), %xmm0   # 0x32c978
movsd %xmm0, -0x10(%rbp)
divsd 0x133e4a(%rip), %xmm0   # 0x154058
callq 0x9710
mulsd -0x8(%rbp), %xmm0
movsd %xmm0, 0x30c750(%rip)   # 0x32c970
movsd -0x10(%rbp), %xmm0
divsd 0x133e2b(%rip), %xmm0   # 0x154058
callq 0x9080
mulsd -0x8(%rbp), %xmm0
movsd %xmm0, 0x30c739(%rip)   # 0x32c978
movsd 0x30c729(%rip), %xmm0   # 0x32c970
movsd %xmm0, 0x30cae9(%rip)   # 0x32cd38
andl $0x0, 0x30cada(%rip)    # 0x32cd30
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_rn()
void rpn_rn()
{
double temp, ohms;
double val;

   // resistor noise (in nV/sqrt(Hz))
   ohms = rpn_top();
   temp = rpn[0] - ABS_ZERO;

   val = sqrt(4.0 * KB * temp * ohms);
   rpn_set(val*1.0E9);

   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x1fbfe
movapd %xmm0, %xmm1
movsd 0x30c6ff(%rip), %xmm0   # 0x32c970
addsd 0xd5617(%rip), %xmm0    # 0xf5890
mulsd 0xd5617(%rip), %xmm0    # 0xf5898
mulsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x20295
sqrtsd %xmm0, %xmm0
jmp 0x2029a
callq 0x9260
mulsd 0xd2d86(%rip), %xmm0    # 0xf3028
movsd %xmm0, 0x30ca8e(%rip)   # 0x32cd38
movsd %xmm0, 0x30c6be(%rip)   # 0x32c970
andl $0x0, 0x30ca77(%rip)    # 0x32cd30
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_az(int)
void rpn_az(int i)
{
double val;

   // push sat azimuth

   if(i == 0) {
      i = highest_sat();
      if(isdigit(msg_field[2])) {
         i = atoi(&msg_field[2]);
      }
   }
   if(i < 0) i = 0 - i;

   sprintf(out, "PRN out of range 0..%d", SUN_MOON_PRN);
   if(i > SUN_MOON_PRN) rpn_error(out);
   else if(NO_SATS || (sat[i].level_msg == 0)) {
      rpn_error("Satellite info not available");
   }
   else {
      val = sat[i].azimuth;
      if(deg_mode == 1.0) val = val * PI / 180.0;
      rpn_push(val);
   }
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testl %edi, %edi
jne 0x202ed
callq 0x9e00c
movl %eax, %edi
leaq 0x30576d(%rip), %rax    # 0x325a40
movsbl 0x2(%rax), %ecx
addl $-0x30, %ecx
cmpl $0x9, %ecx
ja 0x202ed
addq $0x2, %rax
movq %rax, %rdi
callq 0x95e0
movl %eax, %edi
movl %edi, %ebx
negl %ebx
cmovsl %edi, %ebx
leaq 0x305f25(%rip), %rdi    # 0x326220
leaq 0xd72f2(%rip), %rsi     # 0xf75f4
movl $0x3e9, %edx            # imm = 0x3E9
xorl %eax, %eax
callq 0x9060
cmpl $0x3ea, %ebx            # imm = 0x3EA
jb 0x20322
leaq 0x305f03(%rip), %rdi    # 0x326220
jmp 0x203d0
leaq 0x1e25a7(%rip), %rax    # 0x2028d0
movq (%rax), %rax
movabsq $0x105b8b0400, %rcx     # imm = 0x105B8B0400
testq %rcx, %rax
jne 0x203c9
leaq 0x1e4c8a(%rip), %rcx    # 0x204fd0
cmpl $0x0, (%rcx)
je 0x20357
leaq 0x2d7072(%rip), %rcx    # 0x2f73c4
cmpl $0x0, (%rcx)
je 0x203c9
cmpq $0x400000, %rax         # imm = 0x400000
jne 0x2036b
leaq 0x2d764e(%rip), %rax    # 0x2f79b4
cmpl $0x0, (%rax)
je 0x203c9
movl %ebx, %eax
imulq $0x348, %rax, %rcx      # imm = 0x348
leaq 0x208c35(%rip), %rax    # 0x228fb0
cmpl $0x0, 0x1c(%rax,%rcx)
je 0x203c9
addq %rcx, %rax
cvtss2sd 0x208(%rax), %xmm1
movsd 0xd550b(%rip), %xmm2    # 0xf58a0
mulsd %xmm1, %xmm2
divsd 0xd5507(%rip), %xmm2    # 0xf58a8
movsd 0xd2cc7(%rip), %xmm0    # 0xf3070
cmpeqsd 0x133ca6(%rip), %xmm0   # 0x154058
movapd %xmm0, %xmm3
andnpd %xmm1, %xmm3
andpd %xmm2, %xmm0
orpd %xmm3, %xmm0
callq 0x1fcb6
jmp 0x203d5
leaq 0xd723b(%rip), %rdi     # 0xf760b
callq 0x1f963
andl $0x0, 0x30c954(%rip)    # 0x32cd30
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_el(int)
void rpn_el(int i)
{
double val;

   // push sat elevation

   if(i == 0) {
      i = highest_sat();
      if(isdigit(msg_field[2])) {
         i = atoi(&msg_field[2]);
      }
   }
   if(i < 0) i = 0 - i;

   sprintf(out, "PRN out of range 0..%d", SUN_MOON_PRN);
   if(i > SUN_MOON_PRN) rpn_error(out);
   else if(NO_SATS || (sat[i].level_msg == 0)) {
      rpn_error("Satellite info not available");
   }
   else {
      val = sat[i].elevation;
      if(deg_mode == 1.0) val = val * PI / 180.0;
      rpn_push(val);
   }
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testl %edi, %edi
jne 0x20415
callq 0x9e00c
movl %eax, %edi
leaq 0x305645(%rip), %rax    # 0x325a40
movsbl 0x2(%rax), %ecx
addl $-0x30, %ecx
cmpl $0x9, %ecx
ja 0x20415
addq $0x2, %rax
movq %rax, %rdi
callq 0x95e0
movl %eax, %edi
movl %edi, %ebx
negl %ebx
cmovsl %edi, %ebx
leaq 0x305dfd(%rip), %rdi    # 0x326220
leaq 0xd71ca(%rip), %rsi     # 0xf75f4
movl $0x3e9, %edx            # imm = 0x3E9
xorl %eax, %eax
callq 0x9060
cmpl $0x3ea, %ebx            # imm = 0x3EA
jb 0x2044a
leaq 0x305ddb(%rip), %rdi    # 0x326220
jmp 0x204f8
leaq 0x1e247f(%rip), %rax    # 0x2028d0
movq (%rax), %rax
movabsq $0x105b8b0400, %rcx     # imm = 0x105B8B0400
testq %rcx, %rax
jne 0x204f1
leaq 0x1e4b62(%rip), %rcx    # 0x204fd0
cmpl $0x0, (%rcx)
je 0x2047f
leaq 0x2d6f4a(%rip), %rcx    # 0x2f73c4
cmpl $0x0, (%rcx)
je 0x204f1
cmpq $0x400000, %rax         # imm = 0x400000
jne 0x20493
leaq 0x2d7526(%rip), %rax    # 0x2f79b4
cmpl $0x0, (%rax)
je 0x204f1
movl %ebx, %eax
imulq $0x348, %rax, %rcx      # imm = 0x348
leaq 0x208b0d(%rip), %rax    # 0x228fb0
cmpl $0x0, 0x1c(%rax,%rcx)
je 0x204f1
addq %rcx, %rax
cvtss2sd 0x20c(%rax), %xmm1
movsd 0xd53e3(%rip), %xmm2    # 0xf58a0
mulsd %xmm1, %xmm2
divsd 0xd53df(%rip), %xmm2    # 0xf58a8
movsd 0xd2b9f(%rip), %xmm0    # 0xf3070
cmpeqsd 0x133b7e(%rip), %xmm0   # 0x154058
movapd %xmm0, %xmm3
andnpd %xmm1, %xmm3
andpd %xmm2, %xmm0
orpd %xmm3, %xmm0
callq 0x1fcb6
jmp 0x204fd
leaq 0xd7113(%rip), %rdi     # 0xf760b
callq 0x1f963
andl $0x0, 0x30c82c(%rip)    # 0x32cd30
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_sig(int)
void rpn_sig(int i)
{
   // push sat sig level

   if(i == 0) {
      i = highest_sat();
      if(isdigit(msg_field[3])) {
         i = atoi(&msg_field[3]);
      }
   }
   if(i < 0) i = 0 - i;

   sprintf(out, "PRN out of range 0..%d", SUN_MOON_PRN);
   if(i > SUN_MOON_PRN) rpn_error(out);
   else if(NO_SATS || (sat[i].level_msg == 0)) {
      rpn_error("Satellite info not available");
   }
   else rpn_push(sat[i].sig_level);
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testl %edi, %edi
jne 0x2053d
callq 0x9e00c
movl %eax, %edi
leaq 0x30551d(%rip), %rax    # 0x325a40
movsbl 0x3(%rax), %ecx
addl $-0x30, %ecx
cmpl $0x9, %ecx
ja 0x2053d
addq $0x3, %rax
movq %rax, %rdi
callq 0x95e0
movl %eax, %edi
movl %edi, %ebx
negl %ebx
cmovsl %edi, %ebx
leaq 0x305cd5(%rip), %rdi    # 0x326220
leaq 0xd70a2(%rip), %rsi     # 0xf75f4
movl $0x3e9, %edx            # imm = 0x3E9
xorl %eax, %eax
callq 0x9060
cmpl $0x3ea, %ebx            # imm = 0x3EA
jb 0x2056f
leaq 0x305cb3(%rip), %rdi    # 0x326220
jmp 0x205e1
leaq 0x1e235a(%rip), %rax    # 0x2028d0
movq (%rax), %rax
movabsq $0x105b8b0400, %rcx     # imm = 0x105B8B0400
testq %rcx, %rax
jne 0x205da
leaq 0x1e4a41(%rip), %rcx    # 0x204fd0
cmpl $0x0, (%rcx)
je 0x205a0
leaq 0x2d6e29(%rip), %rcx    # 0x2f73c4
cmpl $0x0, (%rcx)
je 0x205da
cmpq $0x400000, %rax         # imm = 0x400000
jne 0x205b4
leaq 0x2d7405(%rip), %rax    # 0x2f79b4
cmpl $0x0, (%rax)
je 0x205da
movl %ebx, %eax
imulq $0x348, %rax, %rcx      # imm = 0x348
leaq 0x2089ec(%rip), %rax    # 0x228fb0
cmpl $0x0, 0x1c(%rax,%rcx)
je 0x205da
addq %rcx, %rax
cvtss2sd 0x20(%rax), %xmm0
callq 0x1fcb6
jmp 0x205e6
leaq 0xd702a(%rip), %rdi     # 0xf760b
callq 0x1f963
andl $0x0, 0x30c743(%rip)    # 0x32cd30
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_doppler(int)
void rpn_doppler(int i)
{
   // push sat doppler

   if(i == 0) {
      i = highest_sat();
      if(isdigit(msg_field[7])) {
         i = atoi(&msg_field[7]);
      }
   }
   if(i < 0) i = 0 - i;

   sprintf(out, "PRN out of range 0..%d", SUN_MOON_PRN);
   if(i > SUN_MOON_PRN) rpn_error(out);
   else if(NO_SATS || (sat[i].level_msg == 0)) {
      rpn_error("Satellite info not available");
   }
   else rpn_push(sat[i].doppler);
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testl %edi, %edi
jne 0x20626
callq 0x9e00c
movl %eax, %edi
leaq 0x305434(%rip), %rax    # 0x325a40
movsbl 0x7(%rax), %ecx
addl $-0x30, %ecx
cmpl $0x9, %ecx
ja 0x20626
addq $0x7, %rax
movq %rax, %rdi
callq 0x95e0
movl %eax, %edi
movl %edi, %ebx
negl %ebx
cmovsl %edi, %ebx
leaq 0x305bec(%rip), %rdi    # 0x326220
leaq 0xd6fb9(%rip), %rsi     # 0xf75f4
movl $0x3e9, %edx            # imm = 0x3E9
xorl %eax, %eax
callq 0x9060
cmpl $0x3ea, %ebx            # imm = 0x3EA
jb 0x20658
leaq 0x305bca(%rip), %rdi    # 0x326220
jmp 0x206ca
leaq 0x1e2271(%rip), %rax    # 0x2028d0
movq (%rax), %rax
movabsq $0x105b8b0400, %rcx     # imm = 0x105B8B0400
testq %rcx, %rax
jne 0x206c3
leaq 0x1e4958(%rip), %rcx    # 0x204fd0
cmpl $0x0, (%rcx)
je 0x20689
leaq 0x2d6d40(%rip), %rcx    # 0x2f73c4
cmpl $0x0, (%rcx)
je 0x206c3
cmpq $0x400000, %rax         # imm = 0x400000
jne 0x2069d
leaq 0x2d731c(%rip), %rax    # 0x2f79b4
cmpl $0x0, (%rax)
je 0x206c3
movl %ebx, %eax
imulq $0x348, %rax, %rcx      # imm = 0x348
leaq 0x208903(%rip), %rax    # 0x228fb0
cmpl $0x0, 0x1c(%rax,%rcx)
je 0x206c3
addq %rcx, %rax
movsd 0x30(%rax), %xmm0
callq 0x1fcb6
jmp 0x206cf
leaq 0xd6f41(%rip), %rdi     # 0xf760b
callq 0x1f963
andl $0x0, 0x30c65a(%rip)    # 0x32cd30
addq $0x8, %rsp
popq %rbx
popq %rbp
retq