// File: jkingan[P]ladyheather/heathui.cpp
// Function: do_kbd(int)
int do_kbd(int c)
{
int fix_flag;
int old_lwa;
int old_rpn;

   // This routine processes a keystroke character.
   //
   // If variable "first_key" is set, this key stroke is the second keystroke
   // of the two character command that started with character "first_key".


   if(sound_alarm) {    // any keystroke turns off alarm clock
      if(sound_alarm & ALARM_DATE) {  // date specifed, so reset alarm
         alarm_time = alarm_date = 0;
         alarm_jd = 0.0;
         egg_timer = egg_val = 0;
         repeat_egg = 0;
      }

      reset_alarm();   // reset the alarm
      sound_alarm = 0;
      return 0;
   }

   if(disable_kbd > 1) return 0;  // nothing gets by

   fix_flag = 0;
   if(plot_lla || lla_showing) fix_flag = 1;

   if((zoom_screen == 'K') || last_null_key) {  // ZOOM_KBD touchscreen keyboard active
      // oh, the crap we have to do in order to make the zoomed calculator
      // touch screen keyboard work...

      if(((c == 0x0D) || (c == ESC_CHAR)) && last_zoom_calc) {  // exit touch keyboard to zoomed calc mode
         last_zoom_calc = 0;
         change_zoom_config(-666);
         cancel_zoom(666);
         config_screen(128);
         erase_screen();
         no_redraw = 0;

         if((c == 0x0D) && (edit_buffer[0] == ' ') && (edit_buffer[1] == 0)) {
            add_kbd(0x0D);
            start_calc_zoom(12);
            last_null_key = 0;
            return 0;
         }
         else if((c == 0x0D) && (edit_buffer[0] == ' ')) {
            add_kbd(0x0D);
            add_kbd(0x0D);
            start_calc_zoom(13);
            last_null_key = 0;
            return 0;
         }
         else if(1 && (c == ESC_CHAR) && (edit_buffer[0] == ' ') && (edit_buffer[1] == 0)) {
            add_kbd(0x0D);
            zoom_screen = '`';
            show_rpn_help = 0;
         }
         else if(0 && (c == ESC_CHAR) && edit_buffer[0]) {
            add_kbd(0x0D);
            zoom_screen = '`';
            show_rpn_help = 0;
         }
         add_kbd(0x0D);
         add_kbd(0x0D);
         start_calc_zoom(14);
         last_null_key = 0;
         return 0;
      }
      else if(last_null_key) {  // keyboard exit via touching a null key
         if(edit_buffer[0] == ' ') {
            add_kbd(0x0D);
            edit_buffer[0] = 0;
            edit_buffer[1] = 0;
            zoom_screen = '`';
            show_rpn_help = 0;
         }
         start_calc_zoom(15);
         last_null_key = 0;
         return 0;
      }
      else if((c == 0x0D) && edit_err_flag) {
         edit_err_flag = 0;
      }
      last_null_key = 0;
   }
   else if(zoom_screen == '`') {  //  touchscreen keyboard active for zoomed calculator
   }
   else if((zoom_screen || (un_zoom == ZOOM_ADEVS)) && (first_key == 0)) {  // any keystroke restores zoomed screen
      if((zoom_screen == 'P') && scroll_char(c)) ;
      else if(((zoom_screen == 'H') || (zoom_screen == 'O')) && (c == ' ')) {
         pause_monitor ^= 1;
         set_term_header(monitor_port);
         show_term_screen(monitor_port);
         return 0;
      }
      else if((zoom_screen == 'Q') && isdigit(c)) {  // set adjustment value
         cal_adjust = (cal_adjust*10) + (c-'0');
         if(cal_adjust >= 10000) cal_adjust = 0;
         return 0;
      }
      else if((zoom_screen == 'Q') && (c == '+')) {  // go forward a month
         if(cal_adjust) {
            cal_year += cal_adjust / 12;
            cal_month += (cal_adjust % 12);
         }
         else ++cal_month;
         if(cal_month > 12) {
            cal_month = 1;
            ++cal_year;
         }
         cal_adjust = 0;
         return 0;
      }
      else if((zoom_screen == 'Q') && (c == '-')) {  // go back a month
         if(cal_adjust) {
            cal_year -= cal_adjust / 12;
            cal_month -= (cal_adjust % 12);
         }
         else --cal_month;
         if(cal_month < 1) {
            cal_month = 12;
            --cal_year;
         }
         cal_adjust = 0;
         return 0;
      }
      else if((zoom_screen == 'Q') && (c == '>')) {  // go forward a year
         if(cal_adjust) cal_year += cal_adjust;
         else ++cal_year;
         cal_adjust = 0;
         return 0;
      }
      else if((zoom_screen == 'Q') && (c == '<')) {  // go back a year
         if(cal_adjust) cal_year -= cal_adjust;
         else --cal_year;
         cal_adjust = 0;
         return 0;
      }
      else if(c != '\\') {     // unless it is one of these keys
         if(zoom_screen == 'L') {
            fix_flag = zoom_fixes;
         }

         if(zoom_screen) {
            change_zoom_config(-108);
            cancel_zoom(18);     //zkzk
         }
         if(un_zoom == ZOOM_ADEVS) {
            if(rcvr_type == TICC_RCVR) all_adevs = ALL_CHANS;
            else                       all_adevs = SINGLE_ADEVS;
            plot_adev_data = old_plot_adevs;
            if(plot_adev_data == 0) adev_decades_shown = 0;
            un_zoom = UN_ZOOM;
         }

         show_fixes = 0;
         if(rcvr_type != NO_RCVR) show_fixes = zoom_fixes;  // zzzzzz
         if(fix_flag) {
            show_fixes = plot_lla = 1;
         }
         change_fix_config(show_fixes);
         plot_lla = 0;
         if(fix_flag) {
            plot_lla = 1;
         }

         no_redraw = 1;
         if((c == ' ') || (c == 0x0D) || (c == ESC_CHAR)) {
            no_redraw = 0;
         }
         config_screen(128);
         erase_screen();
         no_redraw = 0;

         if((c == ' ') || (c == 0x0D) || (c == ESC_CHAR)) { // don't bring up help screen
            return 0;
         }
      }
   }

   if(disable_kbd) {         // most of the keyboard is disabled
      last_was_mark = 0;
      if((first_key == 0) && (c != ESC_CHAR)) {
         BEEP(317);
         return 0;
      }
      else if((first_key == ESC_CHAR) && (c == '!')) {
         disable_kbd = 0;
         return sure_exit();
      }

      if((c >= 0x0100) || (c == '[') || (c == ']')) {  // cursor movement keys, etc
         c = 0;
         do_review(c, 2);       // stop review
         return sure_exit(); // prevents spurious scroll mode header
      }
   }

   if(rpn_mode < 0) {  // keep calculator mode active
      show_version_header();
      old_rpn = rpn_mode;
      rpn_mode = 0;
      if((c == 0x0D) || (c == ESC_CHAR) || (c == '`')) {
         if(zoom_screen) remove_zoom();
         show_version_header();
         return 0;
      }

      edit_buffer[0] = c;
      edit_buffer[1] = 0;
      start_calc(13);
   }

   if(c == 0) {
   }
   else if(getting_string) { // we are currently building a parameter value string
      last_was_mark = 0;
      return build_string(c);  // add the keystroke to the line
   }
   else if(getting_plot) {  // we are in the plot control sub-menu
      if(change_plot_param(c, 0)) return 0;
   }
   else if((c >= F1_CHAR) && (c <= F10_CHAR)) {  // F1..F10 - open script file
      if(first_key) return help_exit(c, 99); // xxxxxx
      sprintf(out, "f%d.scr", c-F1_CHAR+1);
      open_script(out);
   }
   else if((c >= 0x0100) || (c == '<') || (c == '>') || (c == '[') || (c == ']') || (c == '@')) {
      // cursor movement keys, etc
      // @ command - zoom to marked queue entry (invoked from mouse click or keyboard)
      last_was_mark = 0;
      if((first_key == 0) && (text_mode == 0)) {
         if(c == '@') {
            goto_mark(0);  // center plot on marked place
            hide_kbd(23);
         }
         else do_review(c, 3);  // scrolling around in the plot data
      }
      else if(first_key) {
         return help_exit(c, 99); // xxxxxx
      }
      else {
         if(c >= 0x0100) cmd_error(0);  //!!!!
         else            cmd_error(c);
      }
      if(c < 0x0100) last_plot_key = c;
      hide_kbd(8);  // no_unzoom
   }
   else if(c == ESC_CHAR) {  // ESC key exits program or aborts key sequence
      last_was_mark = 0;
      if(osc_params && (first_key != '&')) {  // ESC exits osc param display
         osc_params = 0;
         need_redraw = 8989;
      }
      else if(review_mode && (pause_data == 0)) {
         if(text_mode == 2) {  // displaying full screen help
            text_mode = 0;
            no_x_margin = no_y_margin = 0;
            need_redraw = 6677;
         }
         else {
            c = 0;
            old_lwa = last_was_adev;
            do_review(c, 4);  // stop review
            last_was_adev = old_lwa;
         }
      }
      else if(first_key == ESC_CHAR) {
         if(esc_esc_exit && (disable_kbd == 0)) {  // allow ESC ESC to end the program
            kbd_exit();
            return 1;
         }
      }
      else {
         if(are_you_sure(c) != c) return 0;
      }
   }
   else if((first_key == 0) && (c >= '0') && (c <= '9')) {  // plot markers
      kbd_marker(c);
      hide_kbd(20);
   }
   else {  // normal keystroke command
      if(c < 0x0100) c = tolower(c);
      if((c != '-') && (c != '+')) last_was_mark = 0;
      last_plot_key = 0;

      // break up the keyboard processing big 'if' statement
      // into two parts so the compiler heap does not overflow
      last_was_adev = 0;
      lwa = 13;
      if((c >= 'a') && (c <= 'o')) c = kbd_a_to_o(c);
      else                         c = kbd_other(c);
      return c;
   }

   return sure_exit();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
leaq 0x30a6b6(%rip), %rax    # 0x36d128
cmpb $0x0, (%rax)
je 0x62af2
leaq 0x30a6aa(%rip), %rax    # 0x36d128
movzbl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x62ad7
leaq 0x30a67c(%rip), %rax    # 0x36d10c
movl $0x0, (%rax)
leaq 0x30a65f(%rip), %rax    # 0x36d0fc
movl $0x0, (%rax)
leaq 0x30a676(%rip), %rax    # 0x36d120
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
leaq 0x30a638(%rip), %rax    # 0x36d0f0
movq $0x0, (%rax)
leaq 0x30a622(%rip), %rax    # 0x36d0e8
movq $0x0, (%rax)
leaq 0x30a624(%rip), %rax    # 0x36d0f8
movb $0x0, (%rax)
callq 0x1360d0
leaq 0x30a645(%rip), %rax    # 0x36d128
movb $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x63731
leaq 0x217903(%rip), %rax    # 0x27a3fc
movzbl (%rax), %eax
cmpl $0x1, %eax
jle 0x62b0d
movl $0x0, -0x4(%rbp)
jmp 0x63731
movl $0x0, -0xc(%rbp)
leaq 0x337975(%rip), %rax    # 0x39a490
cmpb $0x0, (%rax)
jne 0x62b2c
leaq 0x337979(%rip), %rax    # 0x39a4a0
cmpl $0x0, (%rax)
je 0x62b33
movl $0x1, -0xc(%rbp)
leaq 0x308e4e(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x4b, %eax
je 0x62b52
leaq 0x2178bb(%rip), %rax    # 0x27a404
cmpl $0x0, (%rax)
je 0x62d75
cmpl $0xd, -0x8(%rbp)
je 0x62b62
cmpl $0x1b, -0x8(%rbp)
jne 0x62cd2
leaq 0x308e2b(%rip), %rax    # 0x36b994
cmpl $0x0, (%rax)
je 0x62cd2
leaq 0x308e1b(%rip), %rax    # 0x36b994
movl $0x0, (%rax)
movl $0xfffffd66, %edi       # imm = 0xFFFFFD66
callq 0x375a0
movl $0x29a, %edi            # imm = 0x29A
callq 0x376e0
movl $0x80, %edi
callq 0xeaf0
callq 0x117e0
leaq 0x214e7f(%rip), %rax    # 0x277a28
movl $0x0, (%rax)
cmpl $0xd, -0x8(%rbp)
jne 0x62c01
leaq 0x33b904(%rip), %rax    # 0x39e4c0
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x62c01
leaq 0x33b8f5(%rip), %rax    # 0x39e4c0
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x62c01
movl $0xd, %edi
callq 0xf320
movl $0xc, %edi
callq 0x2e280
leaq 0x217815(%rip), %rax    # 0x27a404
movl $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x63731
cmpl $0xd, -0x8(%rbp)
jne 0x62c4d
leaq 0x33b8b2(%rip), %rax    # 0x39e4c0
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x62c4d
movl $0xd, %edi
callq 0xf320
movl $0xd, %edi
callq 0xf320
movl $0xd, %edi
callq 0x2e280
leaq 0x2177c9(%rip), %rax    # 0x27a404
movl $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x63731
cmpl $0x1b, -0x8(%rbp)
jne 0x62c95
leaq 0x33b866(%rip), %rax    # 0x39e4c0
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x62c95
leaq 0x33b857(%rip), %rax    # 0x39e4c0
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x62c95
movl $0xd, %edi
callq 0xf320
leaq 0x308d05(%rip), %rax    # 0x36b988
movb $0x60, (%rax)
leaq 0x337d7f(%rip), %rax    # 0x39aa0c
movl $0x0, (%rax)
jmp 0x62c97
jmp 0x62c97
jmp 0x62c99
jmp 0x62c9b
movl $0xd, %edi
callq 0xf320
movl $0xd, %edi
callq 0xf320
movl $0xe, %edi
callq 0x2e280
leaq 0x217744(%rip), %rax    # 0x27a404
movl $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x63731
leaq 0x21772b(%rip), %rax    # 0x27a404
cmpl $0x0, (%rax)
je 0x62d46
leaq 0x33b7db(%rip), %rax    # 0x39e4c0
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x62d23
movl $0xd, %edi
callq 0xf320
leaq 0x33b7c2(%rip), %rax    # 0x39e4c0
movb $0x0, (%rax)
leaq 0x33b7b8(%rip), %rax    # 0x39e4c0
movb $0x0, 0x1(%rax)
leaq 0x308c75(%rip), %rax    # 0x36b988
movb $0x60, (%rax)
leaq 0x337cef(%rip), %rax    # 0x39aa0c
movl $0x0, (%rax)
movl $0xf, %edi
callq 0x2e280
leaq 0x2176d0(%rip), %rax    # 0x27a404
movl $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x63731
cmpl $0xd, -0x8(%rbp)
jne 0x62d5f
cmpl $0x0, 0x33ecc5(%rip)    # 0x3a1a18
je 0x62d5f
movl $0x0, 0x33ecb9(%rip)    # 0x3a1a18
jmp 0x62d61
jmp 0x62d63
leaq 0x21769a(%rip), %rax    # 0x27a404
movl $0x0, (%rax)
jmp 0x63279
leaq 0x308c0c(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x60, %eax
jne 0x62d89
jmp 0x63277
leaq 0x308bf8(%rip), %rax    # 0x36b988
cmpb $0x0, (%rax)
jne 0x62da5
leaq 0x308bf4(%rip), %rax    # 0x36b990
cmpl $0x4, (%rax)
jne 0x63275
leaq 0x23b38c(%rip), %rax    # 0x29e138
cmpl $0x0, (%rax)
jne 0x63275
leaq 0x308bcc(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x50, %eax
jne 0x62dd6
movl -0x8(%rbp), %edi
callq 0x62910
cmpl $0x0, %eax
je 0x62dd6
jmp 0x63273
leaq 0x308bab(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x48, %eax
je 0x62df4
leaq 0x308b9c(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x4f, %eax
jne 0x62e37
cmpl $0x20, -0x8(%rbp)
jne 0x62e37
leaq 0x23a81b(%rip), %rax    # 0x29d61c
movl (%rax), %ecx
xorl $0x1, %ecx
leaq 0x23a80f(%rip), %rax    # 0x29d61c
movl %ecx, (%rax)
leaq 0x30a69a(%rip), %rax    # 0x36d4b0
movl (%rax), %edi
callq 0x2c4e0
leaq 0x30a68c(%rip), %rax    # 0x36d4b0
movl (%rax), %edi
callq 0x2c120
movl $0x0, -0x4(%rbp)
jmp 0x63731
leaq 0x308b4a(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x51, %eax
jne 0x62e8a
movl -0x8(%rbp), %edi
callq 0x9330
cmpl $0x0, %eax
je 0x62e8a
imull $0xa, 0x33ecee(%rip), %eax # 0x3a1b48
movl -0x8(%rbp), %ecx
subl $0x30, %ecx
addl %ecx, %eax
movl %eax, 0x33ece0(%rip)    # 0x3a1b48
cmpl $0x2710, 0x33ecd6(%rip) # imm = 0x2710
jl 0x62e7e
movl $0x0, 0x33ecca(%rip)    # 0x3a1b48
movl $0x0, -0x4(%rbp)
jmp 0x63731
leaq 0x308af7(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x51, %eax
jne 0x62f4d
cmpl $0x2b, -0x8(%rbp)
jne 0x62f4d
cmpl $0x0, 0x33ec9a(%rip)    # 0x3a1b48
je 0x62ef4
movl 0x33ec92(%rip), %eax    # 0x3a1b48
movl $0xc, %ecx
cltd
idivl %ecx
movl %eax, %ecx
leaq 0x309845(%rip), %rax    # 0x36c70c
addl (%rax), %ecx
leaq 0x30983c(%rip), %rax    # 0x36c70c
movl %ecx, (%rax)
movl 0x33ec70(%rip), %eax    # 0x3a1b48
movl $0xc, %ecx
cltd
idivl %ecx
leaq 0x309821(%rip), %rax    # 0x36c708
addl (%rax), %edx
leaq 0x309818(%rip), %rax    # 0x36c708
movl %edx, (%rax)
jmp 0x62f09
leaq 0x30980d(%rip), %rax    # 0x36c708
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x309801(%rip), %rax    # 0x36c708
movl %ecx, (%rax)
leaq 0x3097f8(%rip), %rax    # 0x36c708
cmpl $0xc, (%rax)
jle 0x62f37
leaq 0x3097ec(%rip), %rax    # 0x36c708
movl $0x1, (%rax)
leaq 0x3097e3(%rip), %rax    # 0x36c70c
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x3097d7(%rip), %rax    # 0x36c70c
movl %ecx, (%rax)
movl $0x0, 0x33ec07(%rip)    # 0x3a1b48
movl $0x0, -0x4(%rbp)
jmp 0x63731
leaq 0x308a34(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x51, %eax
jne 0x63012
cmpl $0x2d, -0x8(%rbp)
jne 0x63012
cmpl $0x0, 0x33ebd7(%rip)    # 0x3a1b48
je 0x62fb9
movl 0x33ebcf(%rip), %eax    # 0x3a1b48
movl $0xc, %ecx
cltd
idivl %ecx
leaq 0x309784(%rip), %rcx    # 0x36c70c
movl (%rcx), %ecx
subl %eax, %ecx
leaq 0x309779(%rip), %rax    # 0x36c70c
movl %ecx, (%rax)
movl 0x33ebad(%rip), %eax    # 0x3a1b48
movl $0xc, %ecx
cltd
idivl %ecx
leaq 0x30975e(%rip), %rax    # 0x36c708
movl (%rax), %ecx
subl %edx, %ecx
leaq 0x309753(%rip), %rax    # 0x36c708
movl %ecx, (%rax)
jmp 0x62fce
leaq 0x309748(%rip), %rax    # 0x36c708
movl (%rax), %ecx
addl $-0x1, %ecx
leaq 0x30973c(%rip), %rax    # 0x36c708
movl %ecx, (%rax)
leaq 0x309733(%rip), %rax    # 0x36c708
cmpl $0x1, (%rax)
jge 0x62ffc
leaq 0x309727(%rip), %rax    # 0x36c708
movl $0xc, (%rax)
leaq 0x30971e(%rip), %rax    # 0x36c70c
movl (%rax), %ecx
addl $-0x1, %ecx
leaq 0x309712(%rip), %rax    # 0x36c70c
movl %ecx, (%rax)
movl $0x0, 0x33eb42(%rip)    # 0x3a1b48
movl $0x0, -0x4(%rbp)
jmp 0x63731
leaq 0x30896f(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x51, %eax
jne 0x63075
cmpl $0x3e, -0x8(%rbp)
jne 0x63075
cmpl $0x0, 0x33eb1a(%rip)    # 0x3a1b48
je 0x6304a
movl 0x33eb12(%rip), %ecx    # 0x3a1b48
leaq 0x3096cf(%rip), %rax    # 0x36c70c
addl (%rax), %ecx
leaq 0x3096c6(%rip), %rax    # 0x36c70c
movl %ecx, (%rax)
jmp 0x6305f
leaq 0x3096bb(%rip), %rax    # 0x36c70c
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x3096af(%rip), %rax    # 0x36c70c
movl %ecx, (%rax)
movl $0x0, 0x33eadf(%rip)    # 0x3a1b48
movl $0x0, -0x4(%rbp)
jmp 0x63731
leaq 0x30890c(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x51, %eax
jne 0x630da
cmpl $0x3c, -0x8(%rbp)
jne 0x630da
cmpl $0x0, 0x33eab7(%rip)    # 0x3a1b48
je 0x630af
movl 0x33eaaf(%rip), %eax    # 0x3a1b48
leaq 0x30966c(%rip), %rcx    # 0x36c70c
movl (%rcx), %ecx
subl %eax, %ecx
leaq 0x309661(%rip), %rax    # 0x36c70c
movl %ecx, (%rax)
jmp 0x630c4
leaq 0x309656(%rip), %rax    # 0x36c70c
movl (%rax), %ecx
addl $-0x1, %ecx
leaq 0x30964a(%rip), %rax    # 0x36c70c
movl %ecx, (%rax)
movl $0x0, 0x33ea7a(%rip)    # 0x3a1b48
movl $0x0, -0x4(%rbp)
jmp 0x63731
cmpl $0x5c, -0x8(%rbp)
je 0x63265
leaq 0x30889d(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x4c, %eax
jne 0x630ff
leaq 0x308892(%rip), %rax    # 0x36b98c
movl (%rax), %eax
movl %eax, -0xc(%rbp)
leaq 0x308882(%rip), %rax    # 0x36b988
cmpb $0x0, (%rax)
je 0x6311f
movl $0xffffff94, %edi       # imm = 0xFFFFFF94
callq 0x375a0
movl $0x12, %edi
callq 0x376e0
leaq 0x30886a(%rip), %rax    # 0x36b990
cmpl $0x4, (%rax)
jne 0x6318c
leaq 0x21497e(%rip), %rax    # 0x277ab0
cmpq $0x10000, (%rax)        # imm = 0x10000
jne 0x63147
leaq 0x238ddc(%rip), %rax    # 0x29bf1e
movb $0x5, (%rax)
jmp 0x63151
leaq 0x238dd0(%rip), %rax    # 0x29bf1e
movb $0x0, (%rax)
leaq 0x217462(%rip), %rax    # 0x27a5ba
movb (%rax), %cl
leaq 0x217458(%rip), %rax    # 0x27a5b9
movb %cl, (%rax)
leaq 0x21744f(%rip), %rax    # 0x27a5b9
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x6317f
leaq 0x21482b(%rip), %rax    # 0x2779a4
movl $0x0, (%rax)
leaq 0x30880a(%rip), %rax    # 0x36b990
movl $0x0, (%rax)
leaq 0x337321(%rip), %rax    # 0x39a4b4
movb $0x0, (%rax)
leaq 0x214913(%rip), %rax    # 0x277ab0
cmpq $0x400, (%rax)          # imm = 0x400
je 0x631ba
leaq 0x3087df(%rip), %rax    # 0x36b98c
movl (%rax), %eax
movb %al, %cl
leaq 0x3372fc(%rip), %rax    # 0x39a4b4
movb %cl, (%rax)
cmpl $0x0, -0xc(%rbp)
je 0x631d4
leaq 0x3372c9(%rip), %rax    # 0x39a490
movb $0x1, (%rax)
leaq 0x3372e3(%rip), %rax    # 0x39a4b4
movb $0x1, (%rax)
leaq 0x3372d9(%rip), %rax    # 0x39a4b4
movzbl (%rax), %edi
callq 0x52a70
leaq 0x3372a6(%rip), %rax    # 0x39a490
movb $0x0, (%rax)
cmpl $0x0, -0xc(%rbp)
je 0x631fd
leaq 0x337296(%rip), %rax    # 0x39a490
movb $0x1, (%rax)
leaq 0x214824(%rip), %rax    # 0x277a28
movl $0x1, (%rax)
cmpl $0x20, -0x8(%rbp)
je 0x6321c
cmpl $0xd, -0x8(%rbp)
je 0x6321c
cmpl $0x1b, -0x8(%rbp)
jne 0x63229
leaq 0x214805(%rip), %rax    # 0x277a28
movl $0x0, (%rax)
movl $0x80, %edi
callq 0xeaf0
callq 0x117e0
leaq 0x2147e9(%rip), %rax    # 0x277a28
movl $0x0, (%rax)
cmpl $0x20, -0x8(%rbp)
je 0x63257
cmpl $0xd, -0x8(%rbp)
je 0x63257
cmpl $0x1b, -0x8(%rbp)
jne 0x63263
movl $0x0, -0x4(%rbp)
jmp 0x63731
jmp 0x63265
jmp 0x63267
jmp 0x63269
jmp 0x6326b
jmp 0x6326d
jmp 0x6326f
jmp 0x63271
jmp 0x63273
jmp 0x63275
jmp 0x63277
jmp 0x63279
leaq 0x21717c(%rip), %rax    # 0x27a3fc
cmpb $0x0, (%rax)
je 0x63321
leaq 0x217250(%rip), %rax    # 0x27a4e0
movl $0x0, (%rax)
leaq 0x23ae9b(%rip), %rax    # 0x29e138
cmpl $0x0, (%rax)
jne 0x632be
cmpl $0x1b, -0x8(%rbp)
je 0x632be
movl $0x13d, %edi            # imm = 0x13D
callq 0x9ec0
movl $0x0, -0x4(%rbp)
jmp 0x63731
leaq 0x23ae73(%rip), %rax    # 0x29e138
cmpl $0x1b, (%rax)
jne 0x632e7
cmpl $0x21, -0x8(%rbp)
jne 0x632e7
leaq 0x217125(%rip), %rax    # 0x27a3fc
movb $0x0, (%rax)
callq 0x37720
movl %eax, -0x4(%rbp)
jmp 0x63731
jmp 0x632e9
cmpl $0x100, -0x8(%rbp)      # imm = 0x100
jge 0x632fe
cmpl $0x5b, -0x8(%rbp)
je 0x632fe
cmpl $0x5d, -0x8(%rbp)
jne 0x6331f
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %edi
movl $0x2, %esi
callq 0x28c00
callq 0x37720
movl %eax, -0x4(%rbp)
jmp 0x63731
jmp 0x63321
leaq 0x3376e0(%rip), %rax    # 0x39aa08
cmpl $0x0, (%rax)
jge 0x633a2
callq 0x9c6d0
leaq 0x3376cf(%rip), %rax    # 0x39aa08
movl (%rax), %eax
movl %eax, -0x14(%rbp)
leaq 0x3376c3(%rip), %rax    # 0x39aa08
movl $0x0, (%rax)
cmpl $0xd, -0x8(%rbp)
je 0x6335d
cmpl $0x1b, -0x8(%rbp)
je 0x6335d
cmpl $0x60, -0x8(%rbp)
jne 0x6337f
leaq 0x308624(%rip), %rax    # 0x36b988
cmpb $0x0, (%rax)
je 0x6336e
callq 0x319b0
callq 0x9c6d0
movl $0x0, -0x4(%rbp)
jmp 0x63731
movl -0x8(%rbp), %eax
movb %al, %cl
leaq 0x33b135(%rip), %rax    # 0x39e4c0
movb %cl, (%rax)
leaq 0x33b12c(%rip), %rax    # 0x39e4c0
movb $0x0, 0x1(%rax)
movl $0xd, %edi
callq 0x2e6c0
cmpl $0x0, -0x8(%rbp)
jne 0x633ad
jmp 0x63729
leaq 0x33b434(%rip), %rax    # 0x39e7e8
cmpw $0x0, (%rax)
je 0x633d7
leaq 0x21711f(%rip), %rax    # 0x27a4e0
movl $0x0, (%rax)
movl -0x8(%rbp), %edi
callq 0x3d790
movl %eax, -0x4(%rbp)
jmp 0x63731
cmpl $0x0, 0x33e73e(%rip)    # 0x3a1b1c
je 0x63400
movl -0x8(%rbp), %edi
xorl %esi, %esi
callq 0x51c10
cmpl $0x0, %eax
je 0x633fb
movl $0x0, -0x4(%rbp)
jmp 0x63731
jmp 0x63725
cmpl $0x13b, -0x8(%rbp)      # imm = 0x13B
jl 0x63465
cmpl $0x144, -0x8(%rbp)      # imm = 0x144
jg 0x63465
leaq 0x23ad1f(%rip), %rax    # 0x29e138
cmpl $0x0, (%rax)
je 0x63433
movl -0x8(%rbp), %edi
movl $0x63, %esi
callq 0x50dc0
movl %eax, -0x4(%rbp)
jmp 0x63731
movl -0x8(%rbp), %edx
subl $0x13b, %edx            # imm = 0x13B
addl $0x1, %edx
leaq 0x337fba(%rip), %rdi    # 0x39b400
leaq 0x11f310(%rip), %rsi    # 0x18275d
movb $0x0, %al
callq 0x9060
leaq 0x337fa5(%rip), %rdi    # 0x39b400
callq 0x29570
jmp 0x63723
cmpl $0x100, -0x8(%rbp)      # imm = 0x100
jge 0x63490
cmpl $0x3c, -0x8(%rbp)
je 0x63490
cmpl $0x3e, -0x8(%rbp)
je 0x63490
cmpl $0x5b, -0x8(%rbp)
je 0x63490
cmpl $0x5d, -0x8(%rbp)
je 0x63490
cmpl $0x40, -0x8(%rbp)
jne 0x63540
leaq 0x217049(%rip), %rax    # 0x27a4e0
movl $0x0, (%rax)
leaq 0x23ac94(%rip), %rax    # 0x29e138
cmpl $0x0, (%rax)
jne 0x634dd
leaq 0x214508(%rip), %rax    # 0x2779b8
cmpl $0x0, (%rax)
jne 0x634dd
cmpl $0x40, -0x8(%rbp)
jne 0x634ce
xorl %edi, %edi
callq 0x27290
movl $0x17, %edi
callq 0x12e30
jmp 0x634db
movl -0x8(%rbp), %edi
movl $0x3, %esi
callq 0x28c00
jmp 0x6351c
leaq 0x23ac54(%rip), %rax    # 0x29e138
cmpl $0x0, (%rax)
je 0x634fe
movl -0x8(%rbp), %edi
movl $0x63, %esi
callq 0x50dc0
movl %eax, -0x4(%rbp)
jmp 0x63731
cmpl $0x100, -0x8(%rbp)      # imm = 0x100
jl 0x63510
xorl %edi, %edi
callq 0x50fc0
jmp 0x63518
movl -0x8(%rbp), %edi
callq 0x50fc0
jmp 0x6351a
jmp 0x6351c
cmpl $0x100, -0x8(%rbp)      # imm = 0x100
jge 0x63531
movl -0x8(%rbp), %ecx
leaq 0x216ed1(%rip), %rax    # 0x27a400
movl %ecx, (%rax)
movl $0x8, %edi
callq 0x12e30
jmp 0x63721
cmpl $0x1b, -0x8(%rbp)
jne 0x6366e
leaq 0x216f8f(%rip), %rax    # 0x27a4e0
movl $0x0, (%rax)
leaq 0x308d6e(%rip), %rax    # 0x36c2cc
cmpb $0x0, (%rax)
je 0x6358b
leaq 0x23abce(%rip), %rax    # 0x29e138
cmpl $0x26, (%rax)
je 0x6358b
leaq 0x308d56(%rip), %rax    # 0x36c2cc
movb $0x0, (%rax)
leaq 0x2144a4(%rip), %rax    # 0x277a24
movl $0x231d, (%rax)         # imm = 0x231D
jmp 0x63669
leaq 0x23898e(%rip), %rax    # 0x29bf20
cmpb $0x0, (%rax)
je 0x63610
leaq 0x216e76(%rip), %rax    # 0x27a414
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x63610
leaq 0x21440b(%rip), %rax    # 0x2779b8
cmpl $0x2, (%rax)
jne 0x635e2
leaq 0x2143ff(%rip), %rax    # 0x2779b8
movl $0x0, (%rax)
leaq 0x214475(%rip), %rax    # 0x277a3b
movb $0x0, (%rax)
leaq 0x21446a(%rip), %rax    # 0x277a3a
movb $0x0, (%rax)
leaq 0x21444a(%rip), %rax    # 0x277a24
movl $0x1a15, (%rax)         # imm = 0x1A15
jmp 0x6360e
movl $0x0, -0x8(%rbp)
leaq 0x216ef4(%rip), %rax    # 0x27a4e4
movl (%rax), %eax
movl %eax, -0x10(%rbp)
movl -0x8(%rbp), %edi
movl $0x4, %esi
callq 0x28c00
movl -0x10(%rbp), %ecx
leaq 0x216ed8(%rip), %rax    # 0x27a4e4
movl %ecx, (%rax)
jmp 0x63667
leaq 0x23ab21(%rip), %rax    # 0x29e138
cmpl $0x1b, (%rax)
jne 0x6364a
leaq 0x216dee(%rip), %rax    # 0x27a411
cmpb $0x0, (%rax)
je 0x63648
leaq 0x216dcd(%rip), %rax    # 0x27a3fc
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x63648
callq 0x50d70
movl $0x1, -0x4(%rbp)
jmp 0x63731
jmp 0x63665
movl -0x8(%rbp), %edi
callq 0x37970
cmpl -0x8(%rbp), %eax
je 0x63663
movl $0x0, -0x4(%rbp)
jmp 0x63731
jmp 0x63665
jmp 0x63667
jmp 0x63669
jmp 0x6371f
leaq 0x23aac3(%rip), %rax    # 0x29e138
cmpl $0x0, (%rax)
jne 0x6369d
cmpl $0x30, -0x8(%rbp)
jl 0x6369d
cmpl $0x39, -0x8(%rbp)
jg 0x6369d
movl -0x8(%rbp), %edi
callq 0x52860
movl $0x14, %edi
callq 0x12e30
jmp 0x6371d
cmpl $0x100, -0x8(%rbp)      # imm = 0x100
jge 0x636b1
movl -0x8(%rbp), %edi
callq 0x9570
movl %eax, -0x8(%rbp)
cmpl $0x2d, -0x8(%rbp)
je 0x636ca
cmpl $0x2b, -0x8(%rbp)
je 0x636ca
leaq 0x216e1c(%rip), %rax    # 0x27a4e0
movl $0x0, (%rax)
leaq 0x216d2f(%rip), %rax    # 0x27a400
movl $0x0, (%rax)
leaq 0x216e06(%rip), %rax    # 0x27a4e4
movl $0x0, (%rax)
leaq 0x216dfd(%rip), %rax    # 0x27a4e8
movl $0xd, (%rax)
cmpl $0x61, -0x8(%rbp)
jl 0x6370a
cmpl $0x6f, -0x8(%rbp)
jg 0x6370a
movl -0x8(%rbp), %edi
callq 0x53a60
movl %eax, -0x8(%rbp)
jmp 0x63715
movl -0x8(%rbp), %edi
callq 0x5b9a0
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x63731
jmp 0x6371f
jmp 0x63721
jmp 0x63723
jmp 0x63725
jmp 0x63727
jmp 0x63729
callq 0x37720
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)