// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x2b5284(%rip), %r14    # 0x2f7f48
movb (%r14), %al
testb %al, %al
je 0x42d1c
testb $0x1, %al
je 0x42d0e
leaq 0x2b5256(%rip), %rax    # 0x2f7f2c
andl $0x0, (%rax)
leaq 0x2b523c(%rip), %rax    # 0x2f7f1c
andl $0x0, (%rax)
leaq 0x2b5256(%rip), %rax    # 0x2f7f40
andq $0x0, (%rax)
leaq 0x2b521b(%rip), %rax    # 0x2f7f10
andq $0x0, (%rax)
leaq 0x2b5208(%rip), %rax    # 0x2f7f08
andq $0x0, (%rax)
leaq 0x2b520d(%rip), %rax    # 0x2f7f18
movb $0x0, (%rax)
callq 0xcfae4
movb $0x0, (%r14)
jmp 0x43466
movl %edi, %ebx
leaq 0x1c24f7(%rip), %rdi    # 0x20521c
movb (%rdi), %r12b
cmpb $0x1, %r12b
ja 0x43466
leaq 0x2e2577(%rip), %r8     # 0x3252b0
cmpb $0x0, (%r8)
setne %r9b
leaq 0x2e2578(%rip), %rax    # 0x3252c0
cmpl $0x0, (%rax)
setne %r13b
leaq 0x2b3a52(%rip), %rsi    # 0x2f67a8
movzbl (%rsi), %r15d
cmpl $0x4b, %r15d
sete %cl
leaq 0x1c24bc(%rip), %r14    # 0x205224
movl (%r14), %eax
testl %eax, %eax
setne %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x42e03
cmpl $0xd, %ebx
setne %cl
cmpl $0x1b, %ebx
setne %dl
testb %dl, %cl
jne 0x42ec1
leaq 0x2b3a1e(%rip), %rcx    # 0x2f67b4
cmpl $0x0, (%rcx)
je 0x42ec1
movq %rsi, %r12
cmpl $0xd, %ebx
sete %r15b
andl $0x0, (%rcx)
movl $0xfffffd66, %edi       # imm = 0xFFFFFD66
callq 0x257d9
callq 0x258aa
movl $0x80, %edi
callq 0xcc4f
callq 0xe7d9
leaq 0x1bfa77(%rip), %rax    # 0x202848
andl $0x0, (%rax)
leaq 0x2e6505(%rip), %rcx    # 0x3292e0
movb (%rcx), %al
movb 0x1(%rcx), %cl
cmpb $0x20, %al
sete %dl
andb %r15b, %dl
testb %cl, %cl
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x42ef0
pushq $0xd
popq %rdi
jmp 0x42f30
cmpl $0x60, %r15d
je 0x42f5c
testl %r15d, %r15d
setne %al
leaq 0x2b3996(%rip), %r14    # 0x2f67b0
movl (%r14), %r10d
cmpl $0x4, %r10d
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x42f5c
leaq 0x1e6122(%rip), %rax    # 0x228f58
cmpl $0x0, (%rax)
jne 0x42f5c
cmpl $0x50, %r15d
jne 0x42e7e
movl %ebx, %edi
movb %r9b, -0x29(%rbp)
movl %r10d, %r14d
callq 0x42c6b
movl %r14d, %r10d
movb -0x29(%rbp), %r9b
leaq 0x2b394f(%rip), %r14    # 0x2f67b0
leaq 0x2e2448(%rip), %r8     # 0x3252b0
leaq 0x2b3939(%rip), %rsi    # 0x2f67a8
leaq 0x1c23a6(%rip), %rdi    # 0x20521c
testl %eax, %eax
jne 0x42f5c
cmpl $0x48, %r15d
sete %al
cmpl $0x4f, %r15d
sete %cl
cmpl $0x20, %ebx
jne 0x43043
orb %cl, %al
je 0x43043
leaq 0x1e5598(%rip), %rax    # 0x22843c
xorb $0x1, (%rax)
leaq 0x2b5422(%rip), %rbx    # 0x2f82d0
movl (%rbx), %edi
callq 0x1de83
movl (%rbx), %edi
callq 0x1dbfe
jmp 0x43466
testl %eax, %eax
je 0x42f43
leaq 0x2e6414(%rip), %rbx    # 0x3292e0
cmpb $0x20, (%rbx)
jne 0x42f35
pushq $0xd
popq %rdi
movq %rsi, %r15
callq 0xd140
andw $0x0, (%rbx)
movb $0x60, (%r15)
leaq 0x2e2941(%rip), %rax    # 0x32582c
andl $0x0, (%rax)
jmp 0x42f35
testb %dl, %dl
jne 0x42f24
testb %cl, %cl
sete %cl
cmpb $0x20, %al
sete %al
cmpl $0x1b, %ebx
sete %dl
andb %al, %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x42f24
pushq $0xd
popq %rdi
callq 0xd140
movb $0x60, (%r12)
leaq 0x2e290b(%rip), %rax    # 0x32582c
andl $0x0, (%rax)
pushq $0xd
popq %rbx
movl %ebx, %edi
callq 0xd140
movl %ebx, %edi
callq 0xd140
callq 0x1f6f0
andl $0x0, (%r14)
jmp 0x43466
cmpl $0xd, %ebx
jne 0x42f58
cmpl $0x0, 0x2e98e9(%rip)    # 0x32c838
je 0x42f58
andl $0x0, 0x2e98e0(%rip)    # 0x32c838
andl $0x0, (%r14)
testb %r12b, %r12b
je 0x42fcf
leaq 0x1c2398(%rip), %rax    # 0x205300
andl $0x0, (%rax)
leaq 0x1e5fe6(%rip), %rax    # 0x228f58
movl (%rax), %eax
testl %eax, %eax
setne %cl
cmpl $0x1b, %ebx
sete %dl
orb %cl, %dl
jne 0x42f92
movl $0x13d, %edi            # imm = 0x13D
callq 0x9d23
jmp 0x43466
xorl $0x1b, %eax
movl %ebx, %ecx
xorl $0x21, %ecx
orl %eax, %ecx
jne 0x42fa6
movb $0x0, (%rdi)
jmp 0x43461
cmpl $0xff, %ebx
jg 0x42fb8
cmpl $0x5d, %ebx
je 0x42fb8
cmpl $0x5b, %ebx
jne 0x42fcf
xorl %r14d, %r14d
pushq $0x2
popq %rsi
xorl %edi, %edi
callq 0x1b934
callq 0x258cd
jmp 0x43469
leaq 0x2e2852(%rip), %r14    # 0x325828
cmpl $0x0, (%r14)
js 0x4300b
testl %ebx, %ebx
je 0x43461
leaq 0x2e661d(%rip), %rax    # 0x329608
cmpw $0x0, (%rax)
je 0x43078
leaq 0x1c2304(%rip), %rax    # 0x205300
andl $0x0, (%rax)
movl %ebx, %edi
callq 0x299d0
jmp 0x43466
movq %rsi, %r12
movq %rdi, %r15
callq 0x68b5b
andl $0x0, (%r14)
cmpl $0xd, %ebx
je 0x4302d
cmpl $0x60, %ebx
je 0x4302d
cmpl $0x1b, %ebx
jne 0x430cf
cmpb $0x0, (%r12)
je 0x43039
callq 0x21d0b
callq 0x68b5b
jmp 0x43466
cmpl $0x51, %r15d
setne %cl
leal -0x30(%rbx), %eax
cmpl $0xa, %eax
setae %dl
orb %cl, %dl
jne 0x4309a
imull $0xa, 0x2e990a(%rip), %ecx # 0x32c968
addl %eax, %ecx
xorl %r14d, %r14d
cmpl $0x2710, %ecx           # imm = 0x2710
cmovgel %r14d, %ecx
movl %ecx, 0x2e98f5(%rip)    # 0x32c968
jmp 0x43469
cmpl $0x0, 0x2e98bd(%rip)    # 0x32c93c
je 0x430e9
xorl %r14d, %r14d
movl %ebx, %edi
xorl %esi, %esi
callq 0x36ed5
testl %eax, %eax
jne 0x43469
jmp 0x43461
movl %r15d, %eax
xorl $0x51, %eax
movl %ebx, %ecx
xorl $0x2b, %ecx
orl %eax, %ecx
jne 0x43135
movl 0x2e98b5(%rip), %eax    # 0x32c968
testl %eax, %eax
je 0x43201
pushq $0xc
popq %rcx
cltd
idivl %ecx
leaq 0x2b4464(%rip), %rcx    # 0x2f752c
addl %eax, (%rcx)
jmp 0x43204
leaq 0x2e620a(%rip), %rax    # 0x3292e0
movb %bl, (%rax)
movb $0x0, 0x1(%rax)
callq 0x1f9c0
movq %r15, %rdi
jmp 0x42fdc
leal -0x13b(%rbx), %eax
cmpl $0x9, %eax
ja 0x43179
leaq 0x1e5e59(%rip), %rax    # 0x228f58
cmpl $0x0, (%rax)
jne 0x43231
addl $0xfffffec6, %ebx       # imm = 0xFFFFFEC6
leaq 0x2e310b(%rip), %r14    # 0x326220
leaq 0xc4ca5(%rip), %rsi     # 0x107dc1
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
callq 0x1bfce
jmp 0x43461
movl %ebx, %ecx
xorl $0x2d, %ecx
orl %eax, %ecx
jne 0x431de
movl 0x2e9820(%rip), %ecx    # 0x32c968
testl %ecx, %ecx
je 0x43274
pushq $-0xc
popq %rsi
movl %ecx, %eax
cltd
idivl %esi
leaq 0x2b43cd(%rip), %rdx    # 0x2f752c
addl %eax, (%rdx)
pushq $0xc
popq %rsi
movl %ecx, %eax
cltd
idivl %esi
leaq 0x2b43b8(%rip), %rax    # 0x2f7528
movl (%rax), %eax
subl %edx, %eax
jmp 0x4327f
cmpl $0xff, %ebx
jg 0x431a1
leal -0x3c(%rbx), %eax
cmpl $0x21, %eax
ja 0x433fe
movabsq $0x280000015, %rcx      # imm = 0x280000015
btq %rax, %rcx
jae 0x433fe
leaq 0x1c2158(%rip), %rax    # 0x205300
andl $0x0, (%rax)
leaq 0x1e5da6(%rip), %rax    # 0x228f58
movl (%rax), %eax
leaq 0x1bf61d(%rip), %rcx    # 0x2027d8
movl (%rcx), %ecx
orl %eax, %ecx
jne 0x43229
cmpl $0x40, %ebx
jne 0x432a7
xorl %edi, %edi
callq 0x1a7d4
pushq $0x17
popq %rdi
callq 0xf662
jmp 0x43450
movl %ebx, %ecx
xorl $0x3e, %ecx
orl %eax, %ecx
jne 0x4323d
movl 0x2e977b(%rip), %eax    # 0x32c968
cmpl $0x1, %eax
adcl $0x0, %eax
leaq 0x2b4332(%rip), %rcx    # 0x2f752c
addl %eax, (%rcx)
jmp 0x4329b
pushq $0x1
popq %rdx
leaq 0x2b431d(%rip), %rax    # 0x2f7528
addl (%rax), %edx
movl %edx, (%rax)
cmpl $0xd, %edx
jl 0x4329b
movl $0x1, (%rax)
leaq 0x2b4307(%rip), %rax    # 0x2f752c
incl (%rax)
jmp 0x4329b
testl %eax, %eax
je 0x433ed
movl %ebx, %edi
callq 0x365b6
jmp 0x43466
movl %ebx, %ecx
xorl $0x3c, %ecx
orl %eax, %ecx
jne 0x432c2
movl 0x2e971c(%rip), %eax    # 0x32c968
leaq 0x2b42d9(%rip), %rcx    # 0x2f752c
movl %eax, %edx
negl %edx
xorl %r14d, %r14d
cmpl $0x1, %eax
movl $0x0, %eax
sbbl %eax, %eax
orl %edx, %eax
addl %eax, (%rcx)
andl $0x0, 0x2e96f9(%rip)    # 0x32c968
jmp 0x43469
leaq 0x2b42ad(%rip), %rax    # 0x2f7528
movl (%rax), %eax
decl %eax
leaq 0x2b42a2(%rip), %rcx    # 0x2f7528
movl %eax, (%rcx)
testl %eax, %eax
jg 0x4329b
movl $0xc, (%rcx)
leaq 0x2b4293(%rip), %rax    # 0x2f752c
decl (%rax)
andl $0x0, 0x2e96c6(%rip)    # 0x32c968
jmp 0x43466
pushq $0x3
popq %rsi
movl %ebx, %edi
callq 0x1b934
cmpl $0xff, %ebx
jbe 0x43450
jmp 0x43459
cmpl $0x5c, %ebx
je 0x42f5c
orb %r13b, %r9b
movl %r9d, %r13d
movq %r8, %r12
testl %r15d, %r15d
je 0x432fd
cmpl $0x4c, %r15d
jne 0x432ed
leaq 0x2b34c6(%rip), %rax    # 0x2f67ac
cmpl $0x0, (%rax)
setne %r13b
pushq $-0x6c
popq %rdi
callq 0x257d9
callq 0x258aa
movl (%r14), %r10d
leaq 0x1bf5cc(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpl $0x4, %r10d
movl %r13d, %esi
jne 0x4334b
xorl %ecx, %ecx
cmpq $0x10000, %rax          # imm = 0x10000
sete %cl
leal (%rcx,%rcx,4), %ecx
leaq 0x1e3a19(%rip), %rdx    # 0x226d3e
movb %cl, (%rdx)
leaq 0x1c20ac(%rip), %rcx    # 0x2053da
movb (%rcx), %cl
leaq 0x1c20a2(%rip), %rdx    # 0x2053d9
movb %cl, (%rdx)
testb %cl, %cl
jne 0x43347
leaq 0x1bf480(%rip), %rcx    # 0x2027c4
andl $0x0, (%rcx)
andl $0x0, (%r14)
leaq 0x2e1f82(%rip), %rcx    # 0x3252d4
movb $0x0, (%rcx)
xorl %edi, %edi
cmpq $0x400, %rax            # imm = 0x400
je 0x4336e
leaq 0x2b3446(%rip), %rax    # 0x2f67ac
movl (%rax), %eax
movzbl %al, %edi
movb %dil, (%rcx)
testb %sil, %sil
je 0x4337e
movb $0x1, %al
movb %al, (%r12)
movb %al, (%rcx)
pushq $0x1
popq %rdi
pushq $0x1
popq %r14
callq 0x377c9
movb %r13b, (%r12)
movl %ebx, %r15d
movabsq $0x108002000, %r12      # imm = 0x108002000
cmpl $0x20, %ebx
ja 0x433a6
btq %r15, %r12
jae 0x433a6
xorl %r14d, %r14d
leaq 0x1bf49b(%rip), %r13    # 0x202848
movl %r14d, (%r13)
movl $0x80, %edi
callq 0xcc4f
callq 0xe7d9
andl $0x0, (%r13)
cmpl $0x20, %ebx
leaq 0x1c1e4d(%rip), %rdi    # 0x20521c
ja 0x433de
xorl %r14d, %r14d
btq %r15, %r12
jb 0x43469
movb (%rdi), %r12b
leaq 0x2b33c0(%rip), %rsi    # 0x2f67a8
jmp 0x42f5c
cmpl $0x100, %ebx            # imm = 0x100
jl 0x43449
xorl %edi, %edi
callq 0x25ab0
jmp 0x43459
cmpl $0x1b, %ebx
jne 0x4347b
leaq 0x1c1ef6(%rip), %rax    # 0x205300
andl $0x0, (%rax)
leaq 0x2b3cd8(%rip), %rcx    # 0x2f70ec
cmpb $0x0, (%rcx)
setne %dl
leaq 0x1e5b37(%rip), %rax    # 0x228f58
movl (%rax), %eax
cmpl $0x26, %eax
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x434f5
movb $0x0, (%rcx)
leaq 0x1bf403(%rip), %rax    # 0x202844
movl $0x231d, (%rax)         # imm = 0x231D
jmp 0x43461
movl %ebx, %edi
callq 0x25ab0
leaq 0x1c1dc9(%rip), %rax    # 0x205220
movl %ebx, (%rax)
pushq $0x8
popq %rdi
callq 0xf662
callq 0x258cd
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leal -0x30(%rbx), %eax
cmpl $0x9, %eax
ja 0x4349a
leaq 0x1e5ace(%rip), %rax    # 0x228f58
cmpl $0x0, (%rax)
jne 0x4349a
movl %ebx, %edi
callq 0x376d1
pushq $0x14
jmp 0x4345b
movl %ebx, %edi
callq 0x9580
cmpl $0x2b, %eax
je 0x434b5
cmpl $0x2d, %eax
je 0x434b5
leaq 0x1c1e4e(%rip), %rcx    # 0x205300
andl $0x0, (%rcx)
leaq 0x1c1d64(%rip), %rcx    # 0x205220
andl $0x0, (%rcx)
leaq 0x1c1e3e(%rip), %rcx    # 0x205304
andl $0x0, (%rcx)
leaq 0x1c1e38(%rip), %rcx    # 0x205308
movl $0xd, (%rcx)
movl %eax, %ecx
addl $-0x61, %ecx
movl %eax, %edi
addq $0x8, %rsp
cmpl $0xe, %ecx
ja 0x43542
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x382b2
leaq 0x1e3844(%rip), %rcx    # 0x226d40
cmpb $0x0, (%rcx)
je 0x43551
leaq 0x1c1d2c(%rip), %rcx    # 0x205234
cmpb $0x0, (%rcx)
jne 0x43551
leaq 0x1bf2c4(%rip), %rax    # 0x2027d8
cmpl $0x2, (%rax)
jne 0x43593
andl $0x0, (%rax)
leaq 0x1bf338(%rip), %rax    # 0x20285b
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x1bf32c(%rip), %rax    # 0x20285a
movb %cl, (%rax)
leaq 0x1bf30d(%rip), %rax    # 0x202844
movl $0x1a15, (%rax)         # imm = 0x1A15
jmp 0x43461
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3dd15
cmpl $0x1b, %eax
jne 0x4357d
leaq 0x1c1cd4(%rip), %rax    # 0x205231
cmpb $0x0, (%rax)
je 0x43461
cmpb $0x0, (%rdi)
jne 0x43461
callq 0x36576
pushq $0x1
popq %r14
jmp 0x43469
pushq $0x1b
popq %rdi
callq 0x25ab0
cmpl $0x1b, %eax
je 0x43461
jmp 0x43466
leaq 0x1c1d6a(%rip), %rbx    # 0x205304
movl (%rbx), %r14d
pushq $0x4
popq %rsi
xorl %edi, %edi
callq 0x1b934
movl %r14d, (%rbx)
jmp 0x43461