// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: process_input
static void process_input(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;
  
  char key_err[64];
  int k = read_key(scr->term_fd, key_err, sizeof(key_err));

  scr->msg_was_set = false;
  switch (k) {
  case KEY_REDRAW:
    reset_color();
    clear_screen();
    scr->redraw_needed = true;
    break;

  case KEY_BAD_SEQUENCE:
    //show_msg("Unknown key: <ESC>%s", key_err);
    //show_msg("Bad key");
    break;

  case CTRL_KEY('g'):
    hed_display_help(editor);
    scr->redraw_needed = true;
    break;
    
  case CTRL_KEY('x'):
    if (editor->file->modified) {
      bool save_changes = true;
      if (prompt_get_yesno(editor, "Save changes?  (Answering no will DISCARD changes.)", &save_changes) < 0)
        break;
      if (save_changes) {
        if (editor->file->filename) {
          if (hed_write_file(editor->file, editor->file->filename) < 0)
            break;
        } else {
          if (prompt_save_file(editor) < 0)
            break;
        }
      }
    }
    close_current_file(editor);
    file = editor->file;
    if (! editor->file) {
      editor->quit = true;
      return;
    }
    scr->redraw_needed = true;
    break;

  case ALT_KEY('.'):
    editor->file = editor->file->next;
    file = editor->file;
    scr->redraw_needed = true;
    reset_color();
    clear_screen();
    break;
    
  case ALT_KEY(','):
    editor->file = editor->file->prev;
    file = editor->file;
    scr->redraw_needed = true;
    reset_color();
    clear_screen();
    break;

  case CTRL_KEY('c'):
    if (editor->file)
      show_msg("Current position: %08zx (dec %zu) %zu%%",
               editor->file->cursor_pos, editor->file->cursor_pos,
               (editor->file->data_len>0) ? editor->file->cursor_pos*100/(editor->file->data_len-1) : 0);
    break;
    
  case '\t':
    if (file->pane == HED_PANE_HEX)
      file->pane = HED_PANE_TEXT;
    else
      file->pane = HED_PANE_HEX;
    scr->redraw_needed = true;
    break;
    
  case CTRL_KEY('l'):
    clear_screen();
    scr->redraw_needed = true;
    break;

  case CTRL_KEY('t'):
    toggle_display_data(editor);
    break;

  case ALT_KEY('u'):
    file->signedness = (file->signedness == HED_DATA_SIGNED) ? HED_DATA_UNSIGNED : HED_DATA_SIGNED;
    scr->redraw_needed = true;
    break;

  case ALT_KEY('e'):
    file->endianess = (file->endianess == HED_DATA_BIG_ENDIAN) ? HED_DATA_LITTLE_ENDIAN : HED_DATA_BIG_ENDIAN;
    scr->redraw_needed = true;
    break;

  case CTRL_KEY('o'):
    if (! file->data)
      show_msg("No data to write!");
    else
      prompt_save_file(editor);
    break;

  case CTRL_KEY('r'):
    prompt_read_file(editor);
    file = editor->file;
    break;

  case ALT_KEY('w'):
    if (file && file->data && editor->search_str[0] != '\0')
      perform_search(editor);
    break;
    
  case CTRL_KEY('w'):
    if (file && file->data)
      prompt_search(editor);
    break;

  case ALT_KEY('g'):
    if (file->data) {
      char location_str[256];
      location_str[0] = '\0';
      if (prompt_get_string(editor, "Go to offset", location_str, sizeof(location_str)) < 0)
        break;
      char *end = NULL;
      errno = 0;
      unsigned long offset = strtoul(location_str, &end, 16);
      if (errno != 0 || *end != '\0') {
        show_msg("Bad offset: %s", location_str);
        break;
      }
      hed_set_cursor_pos(editor, (size_t) offset, 16);
    }
    break;

  case ALT_KEY('\\'):    cursor_start_of_file(editor); break;
  case ALT_KEY('/'):     cursor_end_of_file(editor); break;
  case CTRL_KEY('a'):    cursor_home(editor); break;
  case CTRL_KEY('e'):    cursor_end(editor); break;
  case CTRL_KEY('b'):    cursor_left(editor); break;
  case CTRL_KEY('f'):    cursor_right(editor); break;
  case CTRL_KEY('p'):    cursor_up(editor); break;
  case CTRL_KEY('n'):    cursor_down(editor); break;
  case CTRL_KEY('y'):    cursor_page_up(editor); break;
  case CTRL_KEY('v'):    cursor_page_down(editor); break;
  case KEY_CTRL_HOME:    cursor_start_of_file(editor); break;
  case KEY_CTRL_END:     cursor_end_of_file(editor); break;
  case KEY_HOME:         cursor_home(editor); break;
  case KEY_END:          cursor_end(editor);  break;
  case KEY_PAGE_UP:      cursor_page_up(editor); break;
  case KEY_PAGE_DOWN:    cursor_page_down(editor); break;
  case KEY_ARROW_UP:     cursor_up(editor); break;
  case KEY_ARROW_DOWN:   cursor_down(editor); break;
  case KEY_ARROW_LEFT:   cursor_left(editor); break;
  case KEY_ARROW_RIGHT:  cursor_right(editor); break;

#if 0
  case KEY_CTRL_DEL:          show_msg("key: ctrl+del");  break;
  case KEY_CTRL_INS:          show_msg("key: ctrl+ins");  break;
  case KEY_CTRL_PAGE_UP:      show_msg("key: ctrl+pgup"); break;
  case KEY_CTRL_PAGE_DOWN:    show_msg("key: ctrl+pgdn"); break;
  case KEY_CTRL_ARROW_UP:     show_msg("key: ctrl+up"); break;
  case KEY_CTRL_ARROW_DOWN:   show_msg("key: ctrl+down"); break;
  case KEY_CTRL_ARROW_LEFT:   show_msg("key: ctrl+left"); break;
  case KEY_CTRL_ARROW_RIGHT:  show_msg("key: ctrl+right"); break;

  case KEY_SHIFT_HOME:        show_msg("key: shift+home"); break;
  case KEY_SHIFT_END:         show_msg("key: shift+end");  break;
  case KEY_SHIFT_DEL:         show_msg("key: shift+del");  break;
  case KEY_SHIFT_INS:         show_msg("key: shift+ins");  break;
  case KEY_SHIFT_PAGE_UP:     show_msg("key: shift+pgup"); break;
  case KEY_SHIFT_PAGE_DOWN:   show_msg("key: shift+pgdn"); break;
  case KEY_SHIFT_ARROW_UP:    show_msg("key: shift+up"); break;
  case KEY_SHIFT_ARROW_DOWN:  show_msg("key: shift+down"); break;
  case KEY_SHIFT_ARROW_LEFT:  show_msg("key: shift+left"); break;
  case KEY_SHIFT_ARROW_RIGHT: show_msg("key: shift+right"); break;
    
  case KEY_DEL: show_msg("key: del");  break;
  case KEY_INS: show_msg("key: ins");  break;

  case KEY_F1:  show_msg("key: F1");  break;
  case KEY_F2:  show_msg("key: F2");  break;
  case KEY_F3:  show_msg("key: F3");  break;
  case KEY_F4:  show_msg("key: F4");  break;
  case KEY_F5:  show_msg("key: F5");  break;
  case KEY_F6:  show_msg("key: F6");  break;
  case KEY_F7:  show_msg("key: F7");  break;
  case KEY_F8:  show_msg("key: F8");  break;
  case KEY_F9:  show_msg("key: F9");  break;
  case KEY_F10: show_msg("key: F10"); break;
  case KEY_F11: show_msg("key: F11"); break;
  case KEY_F12: show_msg("key: F12"); break;

  case KEY_SHIFT_F1:  show_msg("key: shift+F1");  break;
  case KEY_SHIFT_F2:  show_msg("key: shift+F2");  break;
  case KEY_SHIFT_F3:  show_msg("key: shift+F3");  break;
  case KEY_SHIFT_F4:  show_msg("key: shift+F4");  break;
  case KEY_SHIFT_F5:  show_msg("key: shift+F5");  break;
  case KEY_SHIFT_F6:  show_msg("key: shift+F6");  break;
  case KEY_SHIFT_F7:  show_msg("key: shift+F7");  break;
  case KEY_SHIFT_F8:  show_msg("key: shift+F8");  break;
  case KEY_SHIFT_F9:  show_msg("key: shift+F9");  break;
  case KEY_SHIFT_F10: show_msg("key: shift+F10"); break;
  case KEY_SHIFT_F11: show_msg("key: shift+F11"); break;
  case KEY_SHIFT_F12: show_msg("key: shift+F12"); break;
#endif
  }

  if (! editor->read_only) {
    bool reset_editing_byte = true;
    if (file->data && file->cursor_pos < file->data_len) {
      if (file->pane == HED_PANE_TEXT) {
        if (k >= 32 && k < 0x7f) {
          file->data[file->cursor_pos] = k;
          editor->file->modified = true;
          cursor_right(editor);
          scr->redraw_needed = true;
        }
      } else {
        int c = ((k >= '0' && k <= '9') ? k - '0' :
                 (k >= 'a' && k <= 'f') ? k - 'a' + 10 :
                 (k >= 'A' && k <= 'F') ? k - 'A' + 10 : -1);
        if (c >= 0) {
          reset_editing_byte = false;
          if (! editor->half_byte_edited) {
            editor->half_byte_edited = true;
            file->data[file->cursor_pos] &= 0x0f;
            file->data[file->cursor_pos] |= c << 4;
          } else {
            editor->half_byte_edited = false;
            file->data[file->cursor_pos] &= 0xf0;
            file->data[file->cursor_pos] |= c;
            cursor_right(editor);
          }
          editor->file->modified = true;
          scr->redraw_needed = true;
        }
      }
    }

    if (reset_editing_byte && editor->half_byte_edited) {
      editor->half_byte_edited = false;
      scr->redraw_needed = true;
    }
  }

#if 0
  if (! scr->msg_was_set)
    show_msg("key: %d", k);
#endif
  
  if (! scr->msg_was_set && scr->cur_msg[0] != '\0')
    clear_msg();
}

// Assembly:
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rdi, 0x1b0(%rsp)
movq 0x1b0(%rsp), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, 0x1a8(%rsp)
movq 0x1b0(%rsp), %rax
movq 0x628(%rax), %rax
movq %rax, 0x1a0(%rsp)
movq 0x1a8(%rsp), %rax
movl (%rax), %edi
leaq 0x160(%rsp), %rsi
movl $0x40, %edx
callq 0x2a80
movl %eax, 0x15c(%rsp)
movq 0x1a8(%rsp), %rax
movb $0x0, 0x10(%rax)
movl 0x15c(%rsp), %eax
movl %eax, 0x34(%rsp)
subl $0x1, %eax
je 0x7037
jmp 0x68d1
movl 0x34(%rsp), %eax
subl $0x2, %eax
je 0x705b
jmp 0x68e0
movl 0x34(%rsp), %eax
subl $0x3, %eax
je 0x6d0b
jmp 0x68ef
movl 0x34(%rsp), %eax
subl $0x5, %eax
je 0x7049
jmp 0x68fe
movl 0x34(%rsp), %eax
subl $0x6, %eax
je 0x706d
jmp 0x690d
movl 0x34(%rsp), %eax
subl $0x7, %eax
je 0x6b38
jmp 0x691c
movl 0x34(%rsp), %eax
subl $0x9, %eax
je 0x6dc9
jmp 0x692b
movl 0x34(%rsp), %eax
subl $0xc, %eax
je 0x6e08
jmp 0x693a
movl 0x34(%rsp), %eax
subl $0xe, %eax
je 0x7091
jmp 0x6949
movl 0x34(%rsp), %eax
subl $0xf, %eax
je 0x6e98
jmp 0x6958
movl 0x34(%rsp), %eax
subl $0x10, %eax
je 0x707f
jmp 0x6967
movl 0x34(%rsp), %eax
subl $0x12, %eax
je 0x6ec9
jmp 0x6976
movl 0x34(%rsp), %eax
subl $0x14, %eax
je 0x6e1e
jmp 0x6985
movl 0x34(%rsp), %eax
subl $0x16, %eax
je 0x70b5
jmp 0x6994
movl 0x34(%rsp), %eax
subl $0x17, %eax
je 0x6f2f
jmp 0x69a3
movl 0x34(%rsp), %eax
subl $0x18, %eax
je 0x6b56
jmp 0x69b2
movl 0x34(%rsp), %eax
subl $0x19, %eax
je 0x70a3
jmp 0x69c1
movl 0x34(%rsp), %eax
subl $0x110001, %eax         # imm = 0x110001
je 0x6b33
jmp 0x69d2
movl 0x34(%rsp), %eax
subl $0x110002, %eax         # imm = 0x110002
je 0x6b18
jmp 0x69e3
movl 0x34(%rsp), %eax
subl $0x111000, %eax         # imm = 0x111000
je 0x7142
jmp 0x69f4
movl 0x34(%rsp), %eax
subl $0x111001, %eax         # imm = 0x111001
je 0x7151
jmp 0x6a05
movl 0x34(%rsp), %eax
subl $0x111002, %eax         # imm = 0x111002
je 0x7124
jmp 0x6a16
movl 0x34(%rsp), %eax
subl $0x111003, %eax         # imm = 0x111003
je 0x7133
jmp 0x6a27
movl 0x34(%rsp), %eax
subl $0x111006, %eax         # imm = 0x111006
je 0x70e8
jmp 0x6a38
movl 0x34(%rsp), %eax
subl $0x111007, %eax         # imm = 0x111007
je 0x70f7
jmp 0x6a49
movl 0x34(%rsp), %eax
subl $0x111008, %eax         # imm = 0x111008
je 0x7106
jmp 0x6a5a
movl 0x34(%rsp), %eax
subl $0x111009, %eax         # imm = 0x111009
je 0x7115
jmp 0x6a6b
movl 0x34(%rsp), %eax
subl $0x11101a, %eax         # imm = 0x11101A
je 0x70c7
jmp 0x6a7c
movl 0x34(%rsp), %eax
subl $0x11101b, %eax         # imm = 0x11101B
je 0x70d9
jmp 0x6a8d
movl 0x34(%rsp), %eax
subl $0x112005, %eax         # imm = 0x112005
je 0x6e64
jmp 0x6a9e
movl 0x34(%rsp), %eax
subl $0x112007, %eax         # imm = 0x112007
je 0x6f5b
jmp 0x6aaf
movl 0x34(%rsp), %eax
subl $0x11200c, %eax         # imm = 0x11200C
je 0x6cb7
jmp 0x6ac0
movl 0x34(%rsp), %eax
subl $0x11200e, %eax         # imm = 0x11200E
je 0x6c64
jmp 0x6ad1
movl 0x34(%rsp), %eax
subl $0x11200f, %eax         # imm = 0x11200F
je 0x7025
jmp 0x6ae2
movl 0x34(%rsp), %eax
subl $0x112015, %eax         # imm = 0x112015
je 0x6e30
jmp 0x6af3
movl 0x34(%rsp), %eax
subl $0x112017, %eax         # imm = 0x112017
je 0x6ef2
jmp 0x6b04
movl 0x34(%rsp), %eax
subl $0x11201c, %eax         # imm = 0x11201C
je 0x7013
jmp 0x715e
callq 0x3d40
callq 0x3e40
movq 0x1a8(%rsp), %rax
movb $0x1, 0xd(%rax)
jmp 0x715e
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x9a80
movq 0x1a8(%rsp), %rax
movb $0x1, 0xd(%rax)
jmp 0x715e
movq 0x1b0(%rsp), %rax
movq 0x628(%rax), %rax
testb $0x1, 0x28(%rax)
je 0x6c0d
movb $0x1, 0x15b(%rsp)
movq 0x1b0(%rsp), %rdi
leaq 0x4b50(%rip), %rsi      # 0xb6d6
leaq 0x15b(%rsp), %rdx
callq 0x8370
cmpl $0x0, %eax
jge 0x6b9d
jmp 0x715e
testb $0x1, 0x15b(%rsp)
je 0x6c0b
movq 0x1b0(%rsp), %rax
movq 0x628(%rax), %rax
cmpq $0x0, 0x20(%rax)
je 0x6bf0
movq 0x1b0(%rsp), %rax
movq 0x628(%rax), %rdi
movq 0x1b0(%rsp), %rax
movq 0x628(%rax), %rax
movq 0x20(%rax), %rsi
callq 0x41c0
cmpl $0x0, %eax
jge 0x6bee
jmp 0x715e
jmp 0x6c09
movq 0x1b0(%rsp), %rdi
callq 0x8530
cmpl $0x0, %eax
jge 0x6c07
jmp 0x715e
jmp 0x6c09
jmp 0x6c0b
jmp 0x6c0d
movq 0x1b0(%rsp), %rdi
callq 0x62a0
movq 0x1b0(%rsp), %rax
movq 0x628(%rax), %rax
movq %rax, 0x1a0(%rsp)
movq 0x1b0(%rsp), %rax
cmpq $0x0, 0x628(%rax)
jne 0x6c53
movq 0x1b0(%rsp), %rax
movb $0x1, (%rax)
jmp 0x7401
movq 0x1a8(%rsp), %rax
movb $0x1, 0xd(%rax)
jmp 0x715e
movq 0x1b0(%rsp), %rax
movq 0x628(%rax), %rax
movq (%rax), %rcx
movq 0x1b0(%rsp), %rax
movq %rcx, 0x628(%rax)
movq 0x1b0(%rsp), %rax
movq 0x628(%rax), %rax
movq %rax, 0x1a0(%rsp)
movq 0x1a8(%rsp), %rax
movb $0x1, 0xd(%rax)
callq 0x3d40
callq 0x3e40
jmp 0x715e
movq 0x1b0(%rsp), %rax
movq 0x628(%rax), %rax
movq 0x8(%rax), %rcx
movq 0x1b0(%rsp), %rax
movq %rcx, 0x628(%rax)
movq 0x1b0(%rsp), %rax
movq 0x628(%rax), %rax
movq %rax, 0x1a0(%rsp)
movq 0x1a8(%rsp), %rax
movb $0x1, 0xd(%rax)
callq 0x3d40
callq 0x3e40
jmp 0x715e
movq 0x1b0(%rsp), %rax
cmpq $0x0, 0x628(%rax)
je 0x6dc4
movq 0x1b0(%rsp), %rax
movq 0x628(%rax), %rax
movq 0x38(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x1b0(%rsp), %rax
movq 0x628(%rax), %rax
movq 0x38(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x1b0(%rsp), %rax
movq 0x628(%rax), %rax
cmpq $0x0, 0x18(%rax)
jbe 0x6d9e
movq 0x1b0(%rsp), %rax
movq 0x628(%rax), %rax
imulq $0x64, 0x38(%rax), %rax
movq 0x1b0(%rsp), %rcx
movq 0x628(%rcx), %rcx
movq 0x18(%rcx), %rcx
subq $0x1, %rcx
xorl %edx, %edx
divq %rcx
movq %rax, 0x18(%rsp)
jmp 0x6da7
xorl %eax, %eax
movq %rax, 0x18(%rsp)
jmp 0x6da7
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rcx
leaq 0x494d(%rip), %rdi      # 0xb70a
movb $0x0, %al
callq 0x3610
jmp 0x715e
movq 0x1a0(%rsp), %rax
cmpl $0x0, 0x34(%rax)
jne 0x6de8
movq 0x1a0(%rsp), %rax
movl $0x1, 0x34(%rax)
jmp 0x6df7
movq 0x1a0(%rsp), %rax
movl $0x0, 0x34(%rax)
movq 0x1a8(%rsp), %rax
movb $0x1, 0xd(%rax)
jmp 0x715e
callq 0x3e40
movq 0x1a8(%rsp), %rax
movb $0x1, 0xd(%rax)
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8600
jmp 0x715e
movq 0x1a0(%rsp), %rax
movl 0x30(%rax), %edx
movl $0x1, %ecx
xorl %eax, %eax
cmpl $0x1, %edx
cmovel %eax, %ecx
movq 0x1a0(%rsp), %rax
movl %ecx, 0x30(%rax)
movq 0x1a8(%rsp), %rax
movb $0x1, 0xd(%rax)
jmp 0x715e
movq 0x1a0(%rsp), %rax
movl 0x2c(%rax), %edx
movl $0x1, %ecx
xorl %eax, %eax
cmpl $0x1, %edx
cmovel %eax, %ecx
movq 0x1a0(%rsp), %rax
movl %ecx, 0x2c(%rax)
movq 0x1a8(%rsp), %rax
movb $0x1, 0xd(%rax)
jmp 0x715e
movq 0x1a0(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x6eb7
leaq 0x4884(%rip), %rdi      # 0xb732
movb $0x0, %al
callq 0x3610
jmp 0x6ec4
movq 0x1b0(%rsp), %rdi
callq 0x8530
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8650
movq 0x1b0(%rsp), %rax
movq 0x628(%rax), %rax
movq %rax, 0x1a0(%rsp)
jmp 0x715e
cmpq $0x0, 0x1a0(%rsp)
je 0x6f2a
movq 0x1a0(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x6f2a
movq 0x1b0(%rsp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x0, %eax
je 0x6f2a
movq 0x1b0(%rsp), %rdi
callq 0x8720
jmp 0x715e
cmpq $0x0, 0x1a0(%rsp)
je 0x6f56
movq 0x1a0(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x6f56
movq 0x1b0(%rsp), %rdi
callq 0x88d0
jmp 0x715e
movq 0x1a0(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x700e
movb $0x0, 0x50(%rsp)
movq 0x1b0(%rsp), %rdi
leaq 0x50(%rsp), %rdx
leaq 0x47bd(%rip), %rsi      # 0xb744
movl $0x100, %ecx            # imm = 0x100
callq 0x8aa0
cmpl $0x0, %eax
jge 0x6f9b
jmp 0x715e
movq $0x0, 0x48(%rsp)
callq 0x2040
movl $0x0, (%rax)
leaq 0x50(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movl $0x10, %edx
callq 0x2240
movq %rax, 0x40(%rsp)
callq 0x2040
cmpl $0x0, (%rax)
jne 0x6fdf
movq 0x48(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x6ff7
leaq 0x50(%rsp), %rsi
leaq 0x4766(%rip), %rdi      # 0xb751
movb $0x0, %al
callq 0x3610
jmp 0x715e
movq 0x1b0(%rsp), %rdi
movq 0x40(%rsp), %rsi
movl $0x10, %edx
callq 0x6420
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8af0
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8b40
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8c00
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8c50
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8cd0
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8d50
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8e00
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8e80
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8f30
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x9010
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8af0
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8b40
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8c00
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8c50
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8f30
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x9010
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8e00
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8e80
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8cd0
jmp 0x715e
movq 0x1b0(%rsp), %rdi
callq 0x8d50
movq 0x1b0(%rsp), %rax
testb $0x1, 0x2(%rax)
jne 0x73dd
movb $0x1, 0x3f(%rsp)
movq 0x1a0(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x73ae
movq 0x1a0(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x1a0(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x73ae
movq 0x1a0(%rsp), %rax
cmpl $0x1, 0x34(%rax)
jne 0x721d
cmpl $0x20, 0x15c(%rsp)
jl 0x7218
cmpl $0x7f, 0x15c(%rsp)
jge 0x7218
movl 0x15c(%rsp), %eax
movb %al, %dl
movq 0x1a0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x1a0(%rsp), %rcx
movq 0x38(%rcx), %rcx
movb %dl, (%rax,%rcx)
movq 0x1b0(%rsp), %rax
movq 0x628(%rax), %rax
movb $0x1, 0x28(%rax)
movq 0x1b0(%rsp), %rdi
callq 0x8d50
movq 0x1a8(%rsp), %rax
movb $0x1, 0xd(%rax)
jmp 0x73ac
cmpl $0x30, 0x15c(%rsp)
jl 0x7241
cmpl $0x39, 0x15c(%rsp)
jg 0x7241
movl 0x15c(%rsp), %eax
subl $0x30, %eax
movl %eax, 0x14(%rsp)
jmp 0x72aa
cmpl $0x61, 0x15c(%rsp)
jl 0x7268
cmpl $0x66, 0x15c(%rsp)
jg 0x7268
movl 0x15c(%rsp), %eax
subl $0x61, %eax
addl $0xa, %eax
movl %eax, 0x10(%rsp)
jmp 0x72a2
cmpl $0x41, 0x15c(%rsp)
jl 0x728f
cmpl $0x46, 0x15c(%rsp)
jg 0x728f
movl 0x15c(%rsp), %eax
subl $0x41, %eax
addl $0xa, %eax
movl %eax, 0xc(%rsp)
jmp 0x729a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0xc(%rsp)
jmp 0x729a
movl 0xc(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
movl %eax, 0x38(%rsp)
cmpl $0x0, 0x38(%rsp)
jl 0x73aa
movb $0x0, 0x3f(%rsp)
movq 0x1b0(%rsp), %rax
testb $0x1, 0x1(%rax)
jne 0x7328
movq 0x1b0(%rsp), %rax
movb $0x1, 0x1(%rax)
movq 0x1a0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x1a0(%rsp), %rcx
movq 0x38(%rcx), %rcx
movzbl (%rax,%rcx), %edx
andl $0xf, %edx
movb %dl, (%rax,%rcx)
movl 0x38(%rsp), %esi
shll $0x4, %esi
movq 0x1a0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x1a0(%rsp), %rcx
movq 0x38(%rcx), %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
jmp 0x738b
movq 0x1b0(%rsp), %rax
movb $0x0, 0x1(%rax)
movq 0x1a0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x1a0(%rsp), %rcx
movq 0x38(%rcx), %rcx
movzbl (%rax,%rcx), %edx
andl $0xf0, %edx
movb %dl, (%rax,%rcx)
movl 0x38(%rsp), %esi
movq 0x1a0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x1a0(%rsp), %rcx
movq 0x38(%rcx), %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movq 0x1b0(%rsp), %rdi
callq 0x8d50
movq 0x1b0(%rsp), %rax
movq 0x628(%rax), %rax
movb $0x1, 0x28(%rax)
movq 0x1a8(%rsp), %rax
movb $0x1, 0xd(%rax)
jmp 0x73ac
jmp 0x73ae
testb $0x1, 0x3f(%rsp)
je 0x73db
movq 0x1b0(%rsp), %rax
testb $0x1, 0x1(%rax)
je 0x73db
movq 0x1b0(%rsp), %rax
movb $0x0, 0x1(%rax)
movq 0x1a8(%rsp), %rax
movb $0x1, 0xd(%rax)
jmp 0x73dd
movq 0x1a8(%rsp), %rax
testb $0x1, 0x10(%rax)
jne 0x7401
movq 0x1a8(%rsp), %rax
movsbl 0x11(%rax), %eax
cmpl $0x0, %eax
je 0x7401
callq 0x3740
addq $0x1b8, %rsp            # imm = 0x1B8
retq
nopl (%rax)