// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_vim.c
// Function: insert_mode_handle_key
CeVimParseResult_t insert_mode_handle_key(CeVim_t* vim, CeView_t* view, CePoint_t* cursor, CeVimVisualData_t* visual,
                                          CeRune_t key, const CeConfigOptions_t* config_options){
     switch(key){
     default:
          if(_is_print(key) || key == CE_NEWLINE){
               if(ce_buffer_insert_rune(view->buffer, key, *cursor)){
                    const char str[2] = {key, 0};
                    CePoint_t save_cursor = *cursor;
                    CePoint_t new_cursor = ce_buffer_advance_point(view->buffer, *cursor, 1);

                    // TODO: convenience function
                    CeBufferChange_t change = {};
                    change.chain = vim->chain_undo;
                    change.insertion = true;
                    change.string = strdup(str);
                    change.location = *cursor;
                    change.cursor_before = *cursor;
                    change.cursor_after = new_cursor;
                    ce_buffer_change(view->buffer, &change);

                    *cursor = new_cursor;
                    vim->chain_undo = true;

                    // indent after newline
                    if(key == CE_NEWLINE && !vim->pasting){
                         // calc indentation
                         CePoint_t indentation_point = {0, cursor->y};
                         int64_t indentation = ce_vim_get_indentation(view->buffer, save_cursor, config_options->tab_width);
                         CePoint_t cursor_end = {indentation, indentation_point.y};

                         if(indentation > 0){
                              // build indentation string
                              char* insert_string = malloc(indentation + 1);
                              memset(insert_string, ' ', indentation);
                              insert_string[indentation] = 0;

                              if(!ce_buffer_insert_string_change(view->buffer, insert_string, indentation_point,
                                                                 cursor, cursor_end, true)){
                                   return false;
                              }
                         }

                         *cursor = cursor_end;

                         // check if previous line was all whitespace, if so, remove it
                         CePoint_t remove_loc = {0, save_cursor.y};
                         if(string_is_whitespace(view->buffer->lines[save_cursor.y])){
                              int64_t remove_len = strlen(view->buffer->lines[save_cursor.y]);
                              ce_buffer_remove_string_change(view->buffer, remove_loc, remove_len, cursor,
                                                             *cursor, true);
                         }
                    }
               }
          }else if(key == CE_TAB){
               // build a string to insert
               char* insert_string = NULL;
               if(config_options->insert_spaces_on_tab && !vim->pasting){
                    int64_t insert_len = config_options->tab_width;
                    insert_string = malloc(insert_len + 1);
                    memset(insert_string, ' ', insert_len);
                    insert_string[insert_len] = 0;
               }else{
                    insert_string = malloc(2);
                    insert_string[0] = key;
                    insert_string[1] = 0;
               }

               if(!ce_buffer_insert_string_change_at_cursor(view->buffer, insert_string, cursor, vim->chain_undo)){
                    break;
               }

               vim->chain_undo = true;
          }else{
               return CE_VIM_PARSE_KEY_NOT_HANDLED;
          }
          break;
     case '}':
     {
          if(!vim->pasting && string_is_whitespace(view->buffer->lines[cursor->y])){
               int64_t remove_len = strlen(view->buffer->lines[cursor->y]);
               CePoint_t remove_loc = {0, cursor->y};
               ce_buffer_remove_string_change(view->buffer, remove_loc, remove_len, cursor, remove_loc, true);

               // calc indentation
               CePoint_t indentation_point = {0, cursor->y};
               int64_t indentation = ce_vim_get_indentation(view->buffer, *cursor, config_options->tab_width);
               if(indentation > 0) indentation -= config_options->tab_width;
               if(indentation < 0) indentation = 0;
               CePoint_t cursor_end = {indentation, indentation_point.y};

               if(indentation > 0){
                   // build indentation string
                    char* insert_string = malloc(indentation + 1);
                    memset(insert_string, ' ', indentation);
                    insert_string[indentation] = 0;

                    if(!ce_buffer_insert_string_change(view->buffer, insert_string, indentation_point,
                                                       cursor, cursor_end, true)){
                         break;
                    }
               }
          }

          if(!ce_buffer_insert_rune(view->buffer, key, *cursor)) break;

          const char str[2] = {key, 0};
          CePoint_t new_cursor = ce_buffer_advance_point(view->buffer, *cursor, 1);

          // TODO: convenience function
          CeBufferChange_t change = {};
          change.chain = vim->chain_undo;
          change.insertion = true;
          change.string = strdup(str);
          change.location = *cursor;
          change.cursor_before = *cursor;
          change.cursor_after = new_cursor;
          ce_buffer_change(view->buffer, &change);

          *cursor = new_cursor;
          vim->chain_undo = true;

     } break;
     case KEY_ONLY_BACKSPACE:
          if(!ce_points_equal(*cursor, (CePoint_t){0, 0})){
               CePoint_t remove_point;
               CePoint_t end_cursor;
               int64_t remove_len = 1;

               if(cursor->x == 0){
                    int64_t line = cursor->y - 1;
                    end_cursor = (CePoint_t){ce_utf8_strlen(view->buffer->lines[line]), line};
                    ce_vim_join_next_line(view->buffer, cursor->y - 1, *cursor, vim->chain_undo);
               }else{
                    remove_point = ce_buffer_advance_point(view->buffer, *cursor, -1);
                    end_cursor = remove_point;
                    ce_buffer_remove_string_change(view->buffer, remove_point, remove_len, cursor,
                                                   end_cursor, vim->chain_undo);
               }

               *cursor = end_cursor;
               vim->chain_undo = true;
          }
          break;
     case KEY_DELETE:
          ce_buffer_remove_string_change(view->buffer, *cursor, 1, cursor,
                                         *cursor, vim->chain_undo);
          vim->chain_undo = true;
          break;
     case KEY_LEFT_ARROW:
          *cursor = ce_buffer_move_point(view->buffer, *cursor, (CePoint_t){-1, 0},
                                         config_options->tab_width, CE_CLAMP_X_ON);
          vim->chain_undo = false;
          break;
     case KEY_DOWN_ARROW:
          *cursor = ce_buffer_move_point(view->buffer, *cursor, (CePoint_t){0, 1},
                                         config_options->tab_width, CE_CLAMP_X_ON);
          vim->chain_undo = false;
          break;
     case KEY_UP_ARROW:
          *cursor = ce_buffer_move_point(view->buffer, *cursor, (CePoint_t){0, -1},
                                        config_options->tab_width, CE_CLAMP_X_ON);
          vim->chain_undo = false;
          break;
     case KEY_RIGHT_ARROW:
          *cursor = ce_buffer_move_point(view->buffer, *cursor, (CePoint_t){1, 0},
                                         config_options->tab_width, CE_CLAMP_X_ON);
          vim->chain_undo = false;
          break;
     case KEY_ESCAPE: // escape
     {
          if(!vim->insert_rune_head &&
             (vim->current_action.verb.function == ce_vim_verb_insert_mode ||
              vim->current_action.verb.function == ce_vim_verb_append ||
              vim->current_action.verb.function == ce_vim_verb_append_at_end_of_line)){
               // pass
          }else if(!vim->verb_last_action){
               vim->last_action = vim->current_action;
               if(vim->last_insert_rune_head){
                   ce_rune_node_free(&vim->last_insert_rune_head);
               }
               vim->last_insert_rune_head = vim->insert_rune_head;
               vim->insert_rune_head = NULL;
          }

          // check if previous line was all whitespace, if so, remove it
          CePoint_t remove_loc = {0, cursor->y};
          if(string_is_whitespace(view->buffer->lines[cursor->y])){
               int64_t remove_len = strlen(view->buffer->lines[cursor->y]);
               ce_buffer_remove_string_change(view->buffer, remove_loc, remove_len, cursor, remove_loc, true);
          }

          if(!ce_points_equal(visual->block_top_left, visual->block_bottom_right)){
               CePoint_t visual_top_left = visual->block_top_left;
               CePoint_t visual_bottom_right = visual->block_bottom_right;

               // adjust range because we've already inserted text the line the cursor is on
               CePoint_t cursor_end = *cursor;
               if(visual_top_left.y == cursor->y){
                    visual_top_left.y++;
               }else{
                    visual_bottom_right.y--;
               }

               visual->block_top_left = (CePoint_t){0, 0};
               visual->block_bottom_right = (CePoint_t){0, 0};

               CeRune_t* rune_string = ce_rune_node_string(vim->last_insert_rune_head);

               if(view->buffer->change_node) view->buffer->change_node->change.chain = true;
               vim->chain_undo = true;

               for(int64_t i = visual_top_left.y; i <= visual_bottom_right.y; i++){
                    *cursor = (CePoint_t){visual_top_left.x, i};
                    CeRune_t* itr = rune_string;
                    while(*itr){
                         insert_mode_handle_key(vim, view, cursor, visual, *itr, config_options);
                         itr++;
                    }
               }

               free(rune_string);
               *cursor = cursor_end;

               if(view->buffer->change_node) view->buffer->change_node->change.cursor_after = *cursor;
          }

          vim->mode = CE_VIM_MODE_NORMAL;
          vim->chain_undo = false;

          if(cursor->x > 0){
               *cursor = ce_buffer_advance_point(view->buffer, *cursor, -1);
          }
     } break;
     case KEY_REDO:
     {
          CeVimYank_t* yank = vim->yanks + ce_vim_register_index('"');
          if(yank->type == CE_VIM_YANK_TYPE_NONE ||
             yank->type == CE_VIM_YANK_TYPE_BLOCK) break;

          vim->chain_undo = false;
          if(!ce_buffer_insert_string_change_at_cursor(view->buffer, strdup(yank->text),
                                                       cursor, vim->chain_undo)){
               break;
          }
     } break;
#if defined(DISPLAY_GUI)
     case KEY_CTRL_SHIFT_V:
     {
          CePoint_t resulting_cursor = ce_paste_clipboard_into_buffer(view->buffer,
                                                                      view->cursor);
          if(resulting_cursor.x >= 0){
               view->cursor = resulting_cursor;
          }
     } break;
#endif
     }

     return CE_VIM_PARSE_COMPLETE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r9, %r12
movl %r8d, %ebp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
cmpl $0x101, %r8d            # imm = 0x101
jle 0x24516
leal -0x102(%rbp), %eax
cmpl $0x5, %eax
ja 0x246e5
leaq 0xbd27(%rip), %rcx      # 0x30210
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x40(%r15), %rdi
movq 0x8(%r12), %r9
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movl $0x1, (%rsp)
movl $0x1, %r8d
xorl %ecx, %ecx
jmp 0x24a0a
cmpl $0x1b, %ebp
je 0x24a39
cmpl $0x7d, %ebp
jne 0x24744
cmpb $0x0, 0x19da(%r14)
jne 0x2461a
movq 0x40(%r15), %rax
movq %rax, 0x10(%rsp)
movq (%rax), %rax
movq 0x8(%rbx), %rbp
movq (%rax,%rbp,8), %r13
movq %r13, %rdi
callq 0x24f8f
testb %al, %al
je 0x2461a
movq %r13, %rdi
callq 0xd210
movq $0x0, 0x68(%rsp)
movq %rbp, 0x70(%rsp)
movups 0x68(%rsp), %xmm0
movups %xmm0, (%rsp)
movq 0x10(%rsp), %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %rax, %rcx
movq %rbx, %r8
movl $0x1, %r9d
callq 0xfab0
movq (%rbx), %rsi
movq 0x8(%rbx), %r13
movq 0x40(%r15), %rdi
movq 0x8(%r12), %rcx
movq %r13, %rdx
callq 0x24dce
testq %rax, %rax
jle 0x2461a
subq 0x8(%r12), %rax
xorl %r12d, %r12d
testq %rax, %rax
cmovgq %rax, %r12
movq %r12, 0x30(%rsp)
movq %r13, 0x38(%rsp)
jle 0x2461a
leaq 0x1(%r12), %rdi
callq 0xd4c0
movq %rax, %rbp
movq %rax, %rdi
movl $0x20, %esi
movq %r12, %rdx
callq 0xd2a0
movb $0x0, (%rbp,%r12)
movq 0x40(%r15), %rdi
movups 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbp, %rsi
xorl %edx, %edx
movq %r13, %rcx
movq %rbx, %r8
movl $0x1, %r9d
callq 0xf8ee
testb %al, %al
je 0x24a1e
movq 0x40(%r15), %rdi
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
movl $0x7d, %esi
callq 0xf09d
movl $0x5, %r13d
testb %al, %al
je 0x24a24
leaq 0x30(%rsp), %rax
movw $0x7d, (%rax)
movq 0x40(%r15), %rdi
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movl $0x1, %ecx
callq 0xee7a
movq %rax, %rbp
movq %rdx, 0x10(%rsp)
leaq 0x68(%rsp), %r12
movq $0x0, (%r12)
movb 0x19d8(%r14), %al
movb %al, (%r12)
movq %r15, 0x18(%rsp)
movq %rbx, %r15
movq %r14, %rbx
movb $0x1, %al
movb %al, 0x1(%r12)
leaq 0x30(%rsp), %rdi
callq 0xd640
movq %rax, 0x8(%r12)
movups (%r15), %xmm0
movups %xmm0, 0x10(%r12)
movups (%r15), %xmm0
movups %xmm0, 0x20(%r12)
movq %rbp, 0x30(%r12)
movq 0x10(%rsp), %r14
movq %r14, 0x38(%r12)
movq 0x18(%rsp), %rax
movq 0x40(%rax), %rdi
movq %r12, %rsi
callq 0xf976
movq %rbp, (%r15)
movq %r14, 0x8(%r15)
movb $0x1, %al
movb %al, 0x19d8(%rbx)
jmp 0x24a24
cmpl $0x14a, %ebp            # imm = 0x14A
je 0x24ca4
cmpl $0x173, %ebp            # imm = 0x173
jne 0x24744
movl 0x1080(%r14), %eax
movl $0x5, %r13d
testl %eax, %eax
je 0x24a24
cmpl $0x3, %eax
je 0x24a24
movb $0x0, 0x19d8(%r14)
movq 0x40(%r15), %r15
movq 0x1088(%r14), %rdi
callq 0xd640
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0xfa15
jmp 0x24a24
leal -0x20(%rbp), %eax
cmpb $0x5f, %al
setae %al
cmpl $0xa, %ebp
setne %cl
testb %al, %cl
jne 0x24cd8
movq 0x40(%r15), %rdi
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
movl %ebp, %esi
callq 0xf09d
movl $0x5, %r13d
testb %al, %al
je 0x24a24
movq %r12, 0x50(%rsp)
leaq 0x2e(%rsp), %rax
movb %bpl, (%rax)
movb $0x0, 0x1(%rax)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x40(%r15), %rdi
movl $0x1, %ecx
movq %rsi, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
callq 0xee7a
movq %rax, 0x20(%rsp)
movq %rdx, 0x10(%rsp)
leaq 0x68(%rsp), %rcx
movq $0x0, (%rcx)
movb 0x19d8(%r14), %al
movb %al, (%rcx)
movq %r15, %r12
movq %rbx, %r15
movq %r14, %rbx
movb $0x1, %al
movb %al, 0x1(%rcx)
movq %rcx, %r14
leaq 0x2e(%rsp), %rdi
callq 0xd640
movq %r14, %rsi
movq %rax, 0x8(%r14)
movups (%r15), %xmm0
movups %xmm0, 0x10(%r14)
movups (%r15), %xmm0
movups %xmm0, 0x20(%r14)
movq 0x20(%rsp), %r14
movq %r14, 0x30(%rsi)
movq 0x10(%rsp), %rax
movq %rax, 0x38(%rsi)
movq %r12, 0x18(%rsp)
movq 0x40(%r12), %rdi
movq %rax, %r12
callq 0xf976
movq %r14, (%r15)
movq %r15, 0x20(%rsp)
movq %r12, 0x8(%r15)
movb $0x1, %al
movb %al, 0x19d8(%rbx)
cmpl $0xa, %ebp
jne 0x24a24
cmpb $0x0, 0x19da(%rbx)
jne 0x24a24
movq 0x18(%rsp), %r15
movq 0x40(%r15), %rdi
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rbp
movq %rbp, %rdx
callq 0x24dce
movq %rax, 0x30(%rsp)
movq %r12, 0x38(%rsp)
testq %rax, %rax
movq 0x20(%rsp), %rbx
jle 0x248d6
movq %rax, %r14
movq %rax, %rdi
incq %rdi
callq 0xd4c0
movq %rax, %r12
movq %rax, %rdi
movl $0x20, %esi
movq %r14, %rdx
callq 0xd2a0
movb $0x0, (%r12,%r14)
movq 0x40(%r15), %rdi
movups 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r12, %rsi
xorl %edx, %edx
movq 0x10(%rsp), %rcx
movq %rbx, %r8
movl $0x1, %r9d
callq 0xf8ee
testb %al, %al
je 0x24dc6
movq 0x30(%rsp), %rax
movq %rax, (%rbx)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rbx)
movq 0x40(%r15), %r14
movq (%r14), %rax
movq (%rax,%rbp,8), %r15
movq %r15, %rdi
callq 0x24f8f
testb %al, %al
je 0x24a24
movq %r15, %rdi
callq 0xd210
movups 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %rax, %rcx
movq %rbx, %r8
movl $0x1, %r9d
callq 0xfab0
jmp 0x24a24
movq 0x40(%r15), %rdi
movq 0x8(%r12), %r9
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movl $0x1, (%rsp)
movq $-0x1, %rcx
jmp 0x24a07
movq 0x40(%r15), %rdi
movq 0x8(%r12), %r9
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movl $0x1, (%rsp)
xorl %ecx, %ecx
movq $-0x1, %r8
jmp 0x24a0a
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf03d
movl $0x5, %r13d
testb %al, %al
jne 0x24a24
movq (%rbx), %rsi
testq %rsi, %rsi
je 0x24d11
movq 0x40(%r15), %rdi
movq 0x8(%rbx), %rdx
movq $-0x1, %rcx
callq 0xee7a
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x40(%r15), %rdi
movzbl 0x19d8(%r14), %r9d
movups 0x68(%rsp), %xmm0
movups %xmm0, (%rsp)
movl $0x1, %ecx
movq %rax, %rsi
movq %rbx, %r8
callq 0xfab0
jmp 0x24d60
movq 0x40(%r15), %rdi
movq 0x8(%r12), %r9
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movl $0x1, (%rsp)
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0xeca3
movq %rax, (%rbx)
movq %rdx, 0x8(%rbx)
movb $0x0, 0x19d8(%r14)
movl $0x5, %r13d
movl %r13d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rcx, %r13
movq 0x19c8(%r14), %rax
testq %rax, %rax
jne 0x24a73
movq 0x19a8(%r14), %rcx
leaq 0x669(%rip), %rdx       # 0x250bf
cmpq %rdx, %rcx
je 0x24ac2
leaq 0x5e3(%rip), %rdx       # 0x25045
cmpq %rdx, %rcx
je 0x24ac2
leaq 0x5fa(%rip), %rdx       # 0x25068
cmpq %rdx, %rcx
je 0x24ac2
cmpb $0x0, 0x19d9(%r14)
jne 0x24ac2
leaq 0x1938(%r14), %rdi
leaq 0x1980(%r14), %rsi
movl $0x9, %ecx
rep  movsq (%rsi), %es:(%rdi)
cmpq $0x0, 0x19d0(%r14)
je 0x24ab0
leaq 0x19d0(%r14), %rdi
callq 0x101e1
movq 0x19c8(%r14), %rax
movq %rax, 0x19d0(%r14)
movq $0x0, 0x19c8(%r14)
movq $0x0, 0x68(%rsp)
movq 0x8(%rbx), %rcx
movq %rcx, 0x70(%rsp)
movq 0x40(%r15), %rax
movq %rax, 0x18(%rsp)
movq (%rax), %rax
movq %rcx, 0x10(%rsp)
movq (%rax,%rcx,8), %rbp
movq %rbp, %rdi
callq 0x24f8f
testb %al, %al
je 0x24b23
movq %rbp, %rdi
callq 0xd210
movups 0x68(%rsp), %xmm0
movups %xmm0, (%rsp)
movq 0x18(%rsp), %rdi
xorl %esi, %esi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
movq %rbx, %r8
movl $0x1, %r9d
callq 0xfab0
movq 0x10(%r13), %rdi
movq 0x18(%r13), %rsi
movq 0x20(%r13), %rdx
movq 0x28(%r13), %rcx
callq 0xf03d
testb %al, %al
jne 0x24c69
movq %r12, 0x50(%rsp)
leaq 0x10(%r13), %rax
movq 0x10(%r13), %rcx
movq %rcx, 0x60(%rsp)
movq 0x18(%r13), %rcx
movq 0x28(%r13), %rsi
movups (%rbx), %xmm0
movaps %xmm0, 0x30(%rsp)
xorl %r12d, %r12d
xorl %edx, %edx
cmpq 0x8(%rbx), %rcx
sete %r12b
setne %dl
subq %rdx, %rsi
movq %rsi, 0x40(%rsp)
addq %rcx, %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq 0x19d0(%r14), %rdi
callq 0x10175
movq %rax, 0x20(%rsp)
movq %r15, 0x18(%rsp)
movq 0x40(%r15), %rax
movq 0x40(%rax), %rax
testq %rax, %rax
je 0x24bad
movb $0x1, (%rax)
movq %r14, 0x48(%rsp)
movb $0x1, 0x19d8(%r14)
cmpq 0x40(%rsp), %r12
jg 0x24c37
movq 0x20(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x58(%rsp)
movq 0x50(%rsp), %rbp
movq 0x60(%rsp), %rax
movq %rax, (%rbx)
movq %r12, 0x10(%rsp)
movq %r12, 0x8(%rbx)
movq 0x20(%rsp), %rax
movl (%rax), %r8d
testl %r8d, %r8d
movq %rbx, %r15
movq 0x48(%rsp), %rbx
movq 0x18(%rsp), %r12
je 0x24c24
movq 0x58(%rsp), %r14
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
movq %rbp, %r9
callq 0x244aa
movl (%r14), %r8d
addq $0x4, %r14
testl %r8d, %r8d
jne 0x24c04
movq 0x10(%rsp), %rcx
leaq 0x1(%rcx), %r12
cmpq 0x40(%rsp), %rcx
movq %r15, %rbx
jne 0x24bd4
movq 0x20(%rsp), %rdi
callq 0xd090
movaps 0x30(%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x18(%rsp), %r15
movq 0x40(%r15), %rax
movq 0x40(%rax), %rax
testq %rax, %rax
je 0x24c64
movaps 0x30(%rsp), %xmm0
movups %xmm0, 0x30(%rax)
movq 0x48(%rsp), %r14
movl $0x0, (%r14)
movb $0x0, 0x19d8(%r14)
movq (%rbx), %rsi
testq %rsi, %rsi
jle 0x24a1e
movq 0x40(%r15), %rdi
movq 0x8(%rbx), %rdx
movq $-0x1, %rcx
callq 0xee7a
movq %rax, (%rbx)
movq %rdx, 0x8(%rbx)
jmp 0x24a1e
movq 0x40(%r15), %rdi
movzbl 0x19d8(%r14), %r9d
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movups (%rbx), %xmm0
movups %xmm0, (%rsp)
movl $0x1, %ecx
movq %rbx, %r8
callq 0xfab0
movb $0x1, 0x19d8(%r14)
jmp 0x24a1e
movl $0x1, %r13d
cmpl $0x9, %ebp
jne 0x24a24
cmpb $0x1, 0x20(%r12)
jne 0x24cf9
cmpb $0x0, 0x19da(%r14)
je 0x24d6a
movl $0x2, %edi
callq 0xd4c0
movq %rax, %r12
movb %bpl, (%rax)
incq %rax
jmp 0x24d91
movq %r15, %r12
movq %rbx, %r15
movq %r14, %rbx
movq 0x8(%r15), %r14
movq 0x40(%r12), %rax
movq (%rax), %rax
movq -0x8(%rax,%r14,8), %rdi
decq %r14
callq 0xe445
movq %rax, 0x68(%rsp)
movq %r14, 0x70(%rsp)
movq %rbx, %r14
movq %r15, %rbx
movq 0x40(%r12), %rdi
movq (%r15), %rdx
movq 0x8(%r15), %rcx
leaq -0x1(%rcx), %rsi
movzbl 0x19d8(%r14), %r8d
callq 0x24fd5
movups 0x68(%rsp), %xmm0
movups %xmm0, (%rbx)
jmp 0x24db9
movq 0x8(%r12), %r13
leaq 0x1(%r13), %rdi
callq 0xd4c0
movq %rax, %r12
movq %rax, %rdi
movl $0x20, %esi
movq %r13, %rdx
callq 0xd2a0
movq %r12, %rax
addq %r13, %rax
movb $0x0, (%rax)
movq 0x40(%r15), %rdi
movzbl 0x19d8(%r14), %ecx
movq %r12, %rsi
movq %rbx, %rdx
callq 0xfa15
movl $0x5, %r13d
testb %al, %al
je 0x24a24
movb $0x1, 0x19d8(%r14)
jmp 0x24a24
xorl %r13d, %r13d
jmp 0x24a24