LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_vim.c
// Function: ce_vim_verb_delete_character
bool ce_vim_verb_delete_character(CeVim_t* vim, const CeVimAction_t* action, CeRange_t motion_range, CeView_t* view,
                                  CePoint_t* cursor, CeVimVisualData_t* visual, CeVimBufferData_t* buffer_data,
                                  const CeConfigOptions_t* config_options){
     ce_range_sort(&motion_range);

     while(!ce_point_after(motion_range.start, motion_range.end)){
          ce_buffer_remove_string_change(view->buffer, *cursor, 1, cursor, *cursor, false);

          CePoint_t new_start = ce_buffer_advance_point(view->buffer, motion_range.start, 1);
          if(ce_points_equal(new_start, motion_range.start)) return false;
          motion_range.start = new_start;
     }

     *cursor = ce_buffer_clamp_point(view->buffer, motion_range.end, action->clamp_x);
     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, 0x10(%rsp)
leaq 0x50(%rsp), %r14
movq %r14, %rdi
callq 0x1021f
movq (%r14), %r15
movq 0x8(%r14), %r13
movq 0x10(%r14), %rdx
movq 0x18(%r14), %rcx
movq %r15, %rdi
movq %r13, %rsi
callq 0xea69
movl %eax, %ebp
movq 0x40(%r12), %rdi
testb %al, %al
jne 0x25966
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movups (%rbx), %xmm0
movups %xmm0, (%rsp)
pushq $0x1
popq %r15
movq %r15, %rcx
movq %rbx, %r8
xorl %r9d, %r9d
callq 0xf77c
movq 0x40(%r12), %rdi
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rcx
callq 0xec3a
movq %rax, %r15
movq %rdx, %r13
movq (%r14), %rdx
movq 0x8(%r14), %rcx
movq %rax, %rdi
movq %r13, %rsi
callq 0xedb2
testb %al, %al
jne 0x25982
movq %r15, (%r14)
movq %r13, 0x8(%r14)
jmp 0x258ef
movq 0x10(%rsp), %rax
movl 0x40(%rax), %ecx
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
callq 0xecee
movq %rax, (%rbx)
movq %rdx, 0x8(%rbx)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_vim.c
// Function: ce_vim_verb_substitute_character
bool ce_vim_verb_substitute_character(CeVim_t* vim, const CeVimAction_t* action, CeRange_t motion_range, CeView_t* view,
                                      CePoint_t* cursor, CeVimVisualData_t* visual, CeVimBufferData_t* buffer_data,
                                      const CeConfigOptions_t* config_options){
     bool success = ce_vim_verb_delete_character(vim, action, motion_range, view, cursor, visual, buffer_data, config_options);
     if(success){
          vim->chain_undo = true;
          ce_vim_insert_mode(vim);
     }
     return success;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movaps 0x40(%rsp), %xmm0
movaps 0x50(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x258c2
movl %eax, %ebp
testb %al, %al
je 0x259c9
movb $0x1, 0x19d8(%rbx)
movq %rbx, %rdi
callq 0x205ac
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_vim.c
// Function: ce_vim_verb_open_above
bool ce_vim_verb_open_above(CeVim_t* vim, const CeVimAction_t* action, CeRange_t motion_range, CeView_t* view,
                            CePoint_t* cursor, CeVimVisualData_t* visual, CeVimBufferData_t* buffer_data,
                            const CeConfigOptions_t* config_options){
     // insert newline on next line
     char* insert_string = strdup("\n");
     motion_range.start.x = 0;

     if(!ce_buffer_insert_string_change(view->buffer, insert_string, motion_range.start, cursor, *cursor,
                                        false)){
          return false;
     }

     // TODO: compress what we can with open_below
     // calc indentation
     CePoint_t indentation_point = {0, motion_range.start.y};
     CePoint_t cursor_end = {0, indentation_point.y};
     int64_t indentation = ce_vim_get_indentation(view->buffer, indentation_point, config_options->tab_width);
     if(indentation > 0){
          cursor_end.x = indentation;

          // build indentation string
          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;
          }
     }else{
          *cursor = cursor_end;
     }

     vim->chain_undo = true;
     ce_vim_insert_mode(vim);
     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rdx, %r12
movq %rdi, %rbx
leaq 0x645b(%rip), %rdi      # 0x2bef1
callq 0xd640
movq 0x40(%r12), %rdi
movq 0x68(%rsp), %r15
movups (%r14), %xmm0
movups %xmm0, (%rsp)
xorl %r13d, %r13d
movq %rax, %rsi
xorl %edx, %edx
movq %r15, %rcx
movq %r14, %r8
xorl %r9d, %r9d
callq 0xf5c8
testb %al, %al
je 0x25b66
andq $0x0, 0x18(%rsp)
movq 0x80(%rsp), %rax
movq %r15, 0x20(%rsp)
movq 0x40(%r12), %rdi
movq 0x8(%rax), %rcx
xorl %esi, %esi
movq %r15, %rdx
callq 0x222af
testq %rax, %rax
jle 0x25b4b
movq %rax, %r13
movq %rax, 0x18(%rsp)
movq %rax, %rdi
incq %rdi
callq 0xd4c0
movq %rax, %rbp
pushq $0x20
popq %rsi
movq %rax, %rdi
movq %r13, %rdx
callq 0xd2a0
movb $0x0, (%rbp,%r13)
movq 0x40(%r12), %rdi
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsp)
xorl %r13d, %r13d
pushq $0x1
popq %r9
movq %rbp, %rsi
xorl %edx, %edx
movq %r15, %rcx
movq %r14, %r8
callq 0xf5c8
testb %al, %al
jne 0x25b54
jmp 0x25b66
movups 0x18(%rsp), %xmm0
movups %xmm0, (%r14)
movb $0x1, 0x19d8(%rbx)
movq %rbx, %rdi
callq 0x205ac
movb $0x1, %r13b
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_vim.c
// Function: ce_vim_verb_open_below
bool ce_vim_verb_open_below(CeVim_t* vim, const CeVimAction_t* action, CeRange_t motion_range, CeView_t* view,
                            CePoint_t* cursor, CeVimVisualData_t* visual, CeVimBufferData_t* buffer_data,
                            const CeConfigOptions_t* config_options){
     // insert newline at the end of the current line
     char* insert_string = strdup("\n");
     motion_range.start.x = ce_utf8_strlen(view->buffer->lines[motion_range.start.y]);
     if(!ce_buffer_insert_string_change(view->buffer, insert_string, motion_range.start, cursor, *cursor, false)){
          return false;
     }

     // calc indentation
     CePoint_t indentation_point = {0, motion_range.start.y + 1};
     int64_t indentation = ce_vim_get_indentation(view->buffer, indentation_point, config_options->tab_width);
     CePoint_t cursor_end = {0, indentation_point.y};
     if(indentation > 0){
          cursor_end.x = indentation;

          // build indentation string
          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;
          }
     }else{
          *cursor = cursor_end;
     }

     vim->chain_undo = true;
     ce_vim_insert_mode(vim);
     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rdx, %r12
movq %rdi, %rbx
leaq 0x635b(%rip), %rdi      # 0x2bef1
callq 0xd640
movq %rax, %rbp
movq 0x40(%r12), %rax
movq (%rax), %rax
movq 0x68(%rsp), %r15
movq (%rax,%r15,8), %rdi
callq 0xe38c
movq 0x40(%r12), %rdi
movups (%r14), %xmm0
movups %xmm0, (%rsp)
xorl %r13d, %r13d
movq %rbp, %rsi
movq %rax, %rdx
movq %r15, %rcx
movq %r14, %r8
xorl %r9d, %r9d
callq 0xf5c8
testb %al, %al
je 0x25c86
movq 0x80(%rsp), %rax
incq %r15
movq 0x40(%r12), %rdi
movq 0x8(%rax), %rcx
xorl %esi, %esi
movq %r15, %rdx
callq 0x222af
andq $0x0, 0x18(%rsp)
movq %r15, 0x20(%rsp)
testq %rax, %rax
jle 0x25c63
movq %rax, %r13
movq %rax, 0x18(%rsp)
movq %rax, %rdi
incq %rdi
callq 0xd4c0
movq %rax, %rbp
pushq $0x20
popq %rsi
movq %rax, %rdi
movq %r13, %rdx
callq 0xd2a0
movb $0x0, (%rbp,%r13)
movq 0x40(%r12), %rdi
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsp)
xorl %r13d, %r13d
pushq $0x1
popq %r9
movq %rbp, %rsi
xorl %edx, %edx
movq %r15, %rcx
movq %r14, %r8
callq 0xf5c8
testb %al, %al
jne 0x25c74
jmp 0x25c86
movq 0x18(%rsp), %rax
movq %rax, (%r14)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%r14)
movb $0x1, 0x19d8(%rbx)
movq %rbx, %rdi
callq 0x205ac
movb $0x1, %r13b
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_vim.c
// Function: ce_vim_verb_join
bool ce_vim_verb_join(CeVim_t* vim, const CeVimAction_t* action, CeRange_t motion_range, CeView_t* view,
                      CePoint_t* cursor, CeVimVisualData_t* visual, CeVimBufferData_t* buffer_data,
                      const CeConfigOptions_t* config_options){
     if(cursor->y < 0) return false;
     if(cursor->y >= (view->buffer->line_count - 1)) return false;

     // delete up to the soft beginning of the line
     CePoint_t beginning_of_next_line = {0, cursor->y + 1};
     int64_t whitespace_len = ce_vim_soft_begin_line(view->buffer, beginning_of_next_line.y);
     if(whitespace_len > 0){
          ce_buffer_remove_string_change(view->buffer, beginning_of_next_line, whitespace_len, cursor, *cursor, false);
     }

     bool insert_space = (strlen(view->buffer->lines[cursor->y + 1]) > 0);
     CePoint_t point = {ce_utf8_strlen(view->buffer->lines[cursor->y]), cursor->y};
     ce_vim_join_next_line(view->buffer, cursor->y, *cursor, true);

     if(insert_space){
          char* space_str = strdup(" ");
          CePoint_t end_cursor = (CePoint_t){point.x + 1, point.y};
          ce_buffer_insert_string_change(view->buffer, space_str, point, cursor, end_cursor, true);
     }

     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x8(%rcx), %r15
testq %r15, %r15
js 0x25d94
movq %rdx, %r14
movq 0x40(%rdx), %rdi
movq 0x8(%rdi), %rax
decq %rax
cmpq %rax, %r15
jge 0x25d94
movq %rcx, %rbx
incq %r15
movq %r15, %rsi
callq 0x23364
testq %rax, %rax
jle 0x25d13
movq 0x40(%r14), %rdi
movups (%rbx), %xmm0
movups %xmm0, (%rsp)
xorl %esi, %esi
movq %r15, %rdx
movq %rax, %rcx
movq %rbx, %r8
xorl %r9d, %r9d
callq 0xf77c
movq 0x40(%r14), %rax
movq (%rax), %rax
movq 0x8(%rbx), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x8(%rax,%rcx,8), %rax
movb (%rax), %r13b
callq 0xe38c
movq %rax, %r15
movq (%rbx), %rdx
movq 0x8(%rbx), %r12
movq 0x40(%r14), %rdi
pushq $0x1
popq %r8
movq %r12, %rsi
movq %r12, %rcx
callq 0x22498
movb $0x1, %bpl
testb %r13b, %r13b
je 0x25d96
leaq 0x6a12(%rip), %rdi      # 0x2c76d
callq 0xd640
movq %r15, %rcx
incq %rcx
movq %rcx, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq 0x40(%r14), %rdi
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsp)
pushq $0x1
popq %r9
movq %rax, %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %rbx, %r8
callq 0xf5c8
jmp 0x25d96
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_vim.c
// Function: ce_vim_verb_last_action
bool ce_vim_verb_last_action(CeVim_t* vim, const CeVimAction_t* action, CeRange_t motion_range, CeView_t* view,
                             CePoint_t* cursor, CeVimVisualData_t* visual, CeVimBufferData_t* buffer_data,
                             const CeConfigOptions_t* config_options){
     CeBufferChangeNode_t* change_node = view->buffer->change_node;

     vim->verb_last_action = true;
     assert(vim->last_action.verb.function != ce_vim_verb_last_action);
     if(!ce_vim_apply_action(vim, &vim->last_action, view, cursor, visual, buffer_data, config_options)){
          vim->verb_last_action = false;
          return false;
     }

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

          while(*itr){
               ce_vim_handle_key(vim, view, cursor, visual, *itr, buffer_data, config_options);
               itr++;
          }

          free(rune_string);
     }

     if(change_node && change_node->next) change_node->next->change.chain = false;

     vim->verb_last_action = false;
     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x40(%rdx), %rax
movq 0x40(%rax), %rbp
movb $0x1, 0x19d9(%rdi)
leaq -0x24(%rip), %rax       # 0x25da7
cmpq %rax, 0x1960(%rdi)
je 0x25e8e
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %rbx
movq 0x80(%rsp), %rax
leaq 0x1938(%rdi), %rsi
movq %rax, (%rsp)
callq 0x229e3
testb %al, %al
je 0x25e78
movq 0x19d0(%rbx), %rdi
testq %rdi, %rdi
je 0x25e67
movb %al, 0x17(%rsp)
movq %rbp, 0x20(%rsp)
callq 0xfdec
movq %rax, %rbp
movq %rax, 0x18(%rsp)
movl (%rbp), %r8d
testl %r8d, %r8d
je 0x25e54
movq 0x80(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r9
callq 0x22592
addq $0x4, %rbp
jmp 0x25e25
movq 0x18(%rsp), %rdi
callq 0xd090
movq 0x20(%rsp), %rbp
movb 0x17(%rsp), %al
testq %rbp, %rbp
je 0x25e78
movq 0x40(%rbp), %rcx
testq %rcx, %rcx
je 0x25e78
movb $0x0, (%rcx)
movb $0x0, 0x19d9(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x749d(%rip), %rdi      # 0x2d332
leaq 0x73c3(%rip), %rsi      # 0x2d25f
leaq 0x74c9(%rip), %rcx      # 0x2d36c
movl $0xcf8, %edx            # imm = 0xCF8
callq 0xd280
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_vim.c
// Function: ce_vim_verb_z_command
bool ce_vim_verb_z_command(CeVim_t* vim, const CeVimAction_t* action, CeRange_t motion_range, CeView_t* view,
                           CePoint_t* cursor, CeVimVisualData_t* visual, CeVimBufferData_t* buffer_data,
                           const CeConfigOptions_t* config_options){
     switch(action->verb.integer){
     default:
          break;
     case 'z':
     {
          ce_view_center(view);
     } break;
     case 'b':
     {
          ce_view_scroll_to(view, (CePoint_t){0, cursor->y - view->rect.bottom + config_options->vertical_scroll_off});
     } break;
     case 't':
     {
          ce_view_scroll_to(view, (CePoint_t){0, cursor->y - config_options->vertical_scroll_off});
     } break;
     }

     return false;
}

// Assembly:
pushq %rax
movq 0x30(%rsp), %rdi
movl 0x30(%rsi), %eax
cmpl $0x62, %eax
je 0x25ed9
cmpl $0x74, %eax
je 0x25ecf
cmpl $0x7a, %eax
jne 0x25ef2
movq %rdx, %rdi
callq 0xfbc9
jmp 0x25ef2
movq 0x8(%rcx), %rax
subq 0x18(%rdi), %rax
jmp 0x25ee5
movq 0x8(%rcx), %rax
subq 0x18(%rdx), %rax
addq 0x18(%rdi), %rax
movq %rdx, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0xfbab
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_vim.c
// Function: ce_vim_verb_g_command
bool ce_vim_verb_g_command(CeVim_t* vim, const CeVimAction_t* action, CeRange_t motion_range, CeView_t* view,
                           CePoint_t* cursor, CeVimVisualData_t* visual, CeVimBufferData_t* buffer_data,
                           const CeConfigOptions_t* config_options){
     if(action->multiplier > 1){
          if(action->multiplier > view->buffer->line_count) return false;
          cursor->y = action->multiplier - 1;
          cursor->x = ce_vim_soft_begin_line(view->buffer, cursor->y);
          ce_view_follow_cursor(view, config_options->horizontal_scroll_off,
                                config_options->vertical_scroll_off,
                                config_options->tab_width);
          return true;
     }

     switch(action->verb.integer){
     default:
          break;
     case 'g':
          motion_range.end = (CePoint_t){0, 0};
          return ce_vim_verb_motion(vim, action, motion_range, view, cursor, visual, buffer_data, config_options);
     case 'v':
          visual->point = *cursor;
          vim->mode = CE_VIM_MODE_VISUAL_BLOCK;
          return true;
     }

     return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq (%rsi), %rax
cmpq $0x2, %rax
jl 0x25f45
movq 0x40(%rbx), %rdi
cmpq 0x8(%rdi), %rax
jg 0x25f77
movq 0x70(%rsp), %r15
decq %rax
movq %rax, 0x8(%r14)
movq %rax, %rsi
callq 0x23364
movq %rax, (%r14)
movq 0x8(%r15), %rcx
movq 0x10(%r15), %rsi
movq 0x18(%r15), %rdx
movq %rbx, %rdi
callq 0xfa67
jmp 0x25f89
movl 0x30(%rsi), %eax
cmpl $0x76, %eax
je 0x25f7b
cmpl $0x67, %eax
jne 0x25f77
leaq 0x50(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x10(%rsp)
movups (%rax), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdx
movq %r14, %rcx
callq 0x22f09
jmp 0x25f89
xorl %eax, %eax
jmp 0x25f8b
movups (%r14), %xmm0
movups %xmm0, (%r8)
movl $0x4, (%rdi)
movb $0x1, %al
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_vim.c
// Function: ce_vim_verb_flip_case
bool ce_vim_verb_flip_case(CeVim_t* vim, const CeVimAction_t* action, CeRange_t motion_range, CeView_t* view,
                           CePoint_t* cursor, CeVimVisualData_t* visual, CeVimBufferData_t* buffer_data,
                           const CeConfigOptions_t* config_options){
     bool chain_undo = false;
     while(!ce_points_equal(motion_range.start, motion_range.end)){
          // do nothing if we aren't on the buffer, or the line is empty
          if(!ce_buffer_contains_point(view->buffer, motion_range.start)){
               motion_range.start = ce_buffer_advance_point(view->buffer, motion_range.start, 1);
               continue;
          }else if(view->buffer->lines[motion_range.start.y][0] == 0){
               motion_range.start = ce_buffer_advance_point(view->buffer, motion_range.start, 1);
               continue;
          }

          CeRune_t flipped = ce_buffer_get_rune(view->buffer, motion_range.start);
          if(flipped == CE_UTF8_INVALID) return false;

          if(isupper(flipped)){
               flipped = tolower(flipped);
          }else{
               flipped = toupper(flipped);
          }

          if(!change_character(view, cursor, motion_range.start, flipped, chain_undo)) return false;

          motion_range.start = ce_buffer_advance_point(view->buffer, motion_range.start, 1);
          if(motion_range.start.x == -1) return false;
          chain_undo = true;
     }

     *cursor = motion_range.end;
     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, %r14
leaq 0x60(%rsp), %rax
movq (%rax), %r15
movq 0x8(%rax), %r12
movq -0x10(%rax), %rbp
movq -0x8(%rax), %rbx
movl $0x0, 0x4(%rsp)
movq %r12, 0x10(%rsp)
movq %rbp, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0xedb2
movl %eax, %r13d
testb %al, %al
jne 0x263b6
movq 0x40(%r14), %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0xe34d
movq 0x40(%r14), %rdi
testb %al, %al
je 0x26340
movq (%rdi), %rax
movq (%rax,%rbx,8), %rax
cmpb $0x0, (%rax)
je 0x26340
movq %r15, %r12
movq %rbp, %rsi
movq %rbx, %rdx
callq 0xe45f
cmpl $-0x1, %eax
je 0x263c6
movl %eax, %r15d
callq 0xd720
movq (%rax), %rax
movslq %r15d, %rcx
testb $0x1, 0x1(%rax,%rcx,2)
jne 0x26359
movl %r15d, %edi
callq 0xd110
jmp 0x26361
movq %rbp, %rsi
movq %rbx, %rdx
pushq $0x1
popq %rcx
callq 0xec3a
movq %rax, %rbp
movq %rdx, %rbx
jmp 0x262cb
movl %r15d, %edi
callq 0xd480
movzbl 0x4(%rsp), %r9d
andl $0x1, %r9d
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq %rbp, %rdx
movq %rbx, %rcx
movl %eax, %r8d
callq 0x26691
testb %al, %al
je 0x263c6
movq 0x40(%r14), %rdi
movq %rbp, %rsi
movq %rbx, %rdx
pushq $0x1
popq %rcx
callq 0xec3a
cmpq $-0x1, %rax
je 0x263c6
movq %rax, %rbp
movq %rdx, %rbx
movb $0x1, %al
movl %eax, 0x4(%rsp)
movq %r12, %r15
movq 0x10(%rsp), %r12
jmp 0x262cb
leaq 0x60(%rsp), %rax
movups (%rax), %xmm0
movq 0x8(%rsp), %rax
movups %xmm0, (%rax)
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_vim.c
// Function: ce_vim_verb_set_paste_clipboard_to_highlighted
bool ce_vim_verb_set_paste_clipboard_to_highlighted(CeVim_t* vim, const CeVimAction_t* action, CeRange_t motion_range, CeView_t* view,
                                                    CePoint_t* cursor, CeVimVisualData_t* visual, CeVimBufferData_t* buffer_data,
                                                    const CeConfigOptions_t* config_options){
     CePoint_t highlight_start = {};
     CePoint_t highlight_end = {};
     if(!ce_vim_get_selection_range(vim->mode, visual, view, &highlight_start, &highlight_end)){
          return false;
     }
     return ce_set_clipboard_from_buffer(view->buffer, highlight_start, highlight_end);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %r8, %rsi
movq %rdx, %rbx
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rcx
movaps %xmm0, (%rcx)
movq %rsp, %r8
movaps %xmm0, (%r8)
movl (%rdi), %edi
callq 0x26dcc
testb %al, %al
je 0x26494
movq 0x40(%rbx), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq (%rsp), %rcx
movq 0x8(%rsp), %r8
addq $0x20, %rsp
popq %rbx
jmp 0x143ef
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_vim.c
// Function: motion_direction
static CeVimMotionResult_t motion_direction(const CeView_t* view, CePoint_t delta, const CeConfigOptions_t* config_options,
                                            CeRange_t* motion_range){
     CePoint_t destination = ce_buffer_move_point(view->buffer, motion_range->end, delta, config_options->tab_width, CE_CLAMP_X_INSIDE);
     if(destination.x < 0) return CE_VIM_MOTION_RESULT_FAIL;
     motion_range->end = destination;
     return CE_VIM_MOTION_RESULT_SUCCESS;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movq %rdx, %r8
movq %rsi, %rax
movq 0x40(%rdi), %rdi
movq 0x8(%rcx), %r9
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
movl $0x2, (%rsp)
movq %rax, %rcx
callq 0xea97
testq %rax, %rax
js 0x264db
movq %rax, 0x10(%rbx)
movq %rdx, 0x18(%rbx)
pushq $0x1
popq %rax
jmp 0x264dd
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_vim.c
// Function: vim_motion_find
static CeVimMotionResult_t vim_motion_find(CeVim_t* vim, CeVimAction_t* action, const CeView_t* view, const CeConfigOptions_t* config_options,
                                           CeRange_t* motion_range, bool inside){
     CePoint_t start = motion_range->start;
     int multiplier = (action->multiplier * action->motion.multiplier) - 1;
     CeRange_t new_range = ce_vim_find_pair(view->buffer, motion_range->end, action->motion.integer, inside, multiplier);
     if(new_range.start.x < 0) return CE_VIM_MOTION_RESULT_FAIL;
     if(ce_points_equal(start, new_range.end)){
          action->exclude_end = true;
     }
     *motion_range = new_range;
     return CE_VIM_MOTION_RESULT_SUCCESS_NO_MULTIPLY;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %ecx, %r9d
movq %rdx, %rbx
movq %rdi, %r14
movq (%rdx), %r15
movq 0x8(%rdx), %r12
movl 0x8(%rdi), %eax
imull (%rdi), %eax
decl %eax
movq 0x40(%rsi), %rsi
movl 0x18(%rdi), %r8d
movq 0x10(%rdx), %rdx
movq 0x18(%rbx), %rcx
movl %eax, (%rsp)
leaq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x2429d
cmpq $0x0, (%r13)
js 0x26563
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
movq %r15, %rdi
movq %r12, %rsi
callq 0xedb2
testb %al, %al
je 0x2654d
movb $0x1, 0x3e(%r14)
movups 0x10(%rsp), %xmm0
movups 0x20(%rsp), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
pushq $0x2
popq %rax
jmp 0x26565
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_vim.c
// Function: search_word
static void search_word(CeVim_t* vim, CeVimAction_t* action, const CeView_t* view, const CePoint_t* cursor, CeRange_t* motion_range){
     CeVimYank_t* yank = vim->yanks + ce_vim_register_index('/');
     ce_vim_yank_free(yank);
     *motion_range = ce_vim_find_pair(view->buffer, *cursor, 'w', true, 0);
     int64_t word_len = ce_buffer_range_len(view->buffer, motion_range->start, motion_range->end);
     char* word = ce_buffer_dupe_string(view->buffer, motion_range->start, word_len);
     int64_t search_len = word_len + 4;
     yank->text = malloc(search_len + 1);
     snprintf(yank->text, search_len + 1, "\\b%s\\b", word); // TODO: this doesn't work on other platforms like macos
     yank->text[search_len] = 0;
     free(word);
     yank->type = CE_VIM_YANK_TYPE_STRING;
     vim->search_mode = CE_VIM_SEARCH_MODE_REGEX_FORWARD;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
addq $0x11b8, %rdi           # imm = 0x11B8
callq 0x2196f
movq 0x40(%r15), %rsi
movq (%r12), %rdx
movq 0x8(%r12), %rcx
andl $0x0, (%rsp)
leaq 0x8(%rsp), %r12
pushq $0x77
popq %r8
pushq $0x1
popq %r9
movq %r12, %rdi
callq 0x2429d
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
movq 0x40(%r15), %rdi
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x10(%r14), %rcx
movq 0x18(%r14), %r8
callq 0xe98a
movq %rax, %r12
movq 0x40(%r15), %rdi
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rax, %rcx
callq 0xf361
movq %rax, %r14
leaq 0x5(%r12), %r15
movq %r15, %rdi
callq 0xd4c0
movq %rax, 0x11c0(%rbx)
leaq 0x6df9(%rip), %rdx      # 0x2d415
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rcx
xorl %eax, %eax
callq 0xd260
movq 0x11c0(%rbx), %rax
movb $0x0, 0x4(%rax,%r12)
movq %r14, %rdi
callq 0xd090
movl $0x1, 0x11b8(%rbx)
movl $0x2, 0x19dc(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_vim.c
// Function: string_is_blank
static bool string_is_blank(const char* string){
     while(*string){
          if(!isblank((int)(*string))) return false;
          string++;
     }
     return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movsbq (%rbx), %r14
testq %r14, %r14
je 0x26683
callq 0xd720
movq (%rax), %rax
incq %rbx
testb $0x1, (%rax,%r14,2)
jne 0x26668
testb %r14b, %r14b
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_vim.c
// Function: change_character
static bool change_character(CeView_t* view, CePoint_t* cursor, CePoint_t point, CeRune_t new_rune, bool chain_undo){
     int64_t rune_len = 0;

     // delete current rune
     ce_buffer_remove_string_change(view->buffer, point, 1, cursor, *cursor, chain_undo);

     // insert new rune
     char* current_string = malloc(5);
     ce_utf8_encode(new_rune, current_string, 5, &rune_len);
     current_string[rune_len] = 0;

     if(!ce_buffer_insert_string_change(view->buffer, current_string, point,
                                        cursor, *cursor, true)){
          return false;
     }

     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, 0x1c(%rsp)
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
leaq 0x20(%rsp), %rax
andq $0x0, (%rax)
movq 0x40(%rdi), %rdi
movups (%rsi), %xmm0
movups %xmm0, (%rsp)
pushq $0x1
popq %rcx
movq %rdx, %rsi
movq %rbx, %rdx
movq %r14, %r8
callq 0xf77c
pushq $0x5
popq %r13
movq %r13, %rdi
callq 0xd4c0
movq %rax, %rbp
movl 0x1c(%rsp), %edi
movq %rax, %rsi
movq %r13, %rdx
leaq 0x20(%rsp), %r13
movq %r13, %rcx
callq 0xee6f
movq (%r13), %rax
movb $0x0, (%rbp,%rax)
movq 0x40(%r12), %rdi
movups (%r14), %xmm0
movups %xmm0, (%rsp)
pushq $0x1
popq %r9
movq %rbp, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movq %r14, %r8
callq 0xf5c8
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_vim.c
// Function: ce_vim_get_selection_range
bool ce_vim_get_selection_range(CeVimMode_t vim_mode, CeVimVisualData_t* visual, CeView_t* view,
                                CePoint_t* highlight_start, CePoint_t* highlight_end){
     if(vim_mode != CE_VIM_MODE_VISUAL &&
        vim_mode != CE_VIM_MODE_VISUAL_LINE){
         return false;
     }

     *highlight_start = visual->point;
     *highlight_end = view->cursor;
     if(ce_point_after(*highlight_start, *highlight_end)){
         CePoint_t tmp = *highlight_start;
         *highlight_start = *highlight_end;
         *highlight_end = tmp;
     }

     if(vim_mode == CE_VIM_MODE_VISUAL_LINE){
         highlight_start->x = 0;
         highlight_end->x = ce_buffer_line_len(view->buffer, highlight_end->y);
     }
     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edi, %r12d
andl $-0x2, %r12d
cmpl $0x2, %r12d
jne 0x26e44
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r14
movl %edi, %ebp
movups (%rsi), %xmm0
movups %xmm0, (%rcx)
movups 0x30(%rdx), %xmm0
movups %xmm0, (%r8)
movq (%rcx), %rdi
movq 0x8(%rcx), %rsi
movq (%r8), %rdx
movq 0x8(%r8), %rcx
callq 0xea69
testb %al, %al
je 0x26e2b
movups (%r15), %xmm0
movaps %xmm0, (%rsp)
movups (%rbx), %xmm0
movups %xmm0, (%r15)
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
cmpl $0x3, %ebp
jne 0x26e44
andq $0x0, (%r15)
movq 0x40(%r14), %rdi
movq 0x8(%rbx), %rsi
callq 0xea7c
movq %rax, (%rbx)
cmpl $0x2, %r12d
sete %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/main.c
// Function: scroll_to_and_center_if_offscreen
void scroll_to_and_center_if_offscreen(CeView_t* view, CePoint_t point, CeConfigOptions_t* config_options){
     view->cursor = point;
     CePoint_t before_follow = view->scroll;
     ce_view_follow_cursor(view, config_options->horizontal_scroll_off,
                           config_options->vertical_scroll_off, config_options->tab_width);
     if(!ce_points_equal(before_follow, view->scroll)){
          ce_view_center(view);
     }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rsi, 0x30(%rdi)
movq %rdx, 0x38(%rdi)
movq 0x20(%rdi), %r14
movq 0x28(%rdi), %r15
movq 0x8(%rcx), %rax
movq 0x10(%rcx), %rsi
movq 0x18(%rcx), %rdx
movq %rax, %rcx
callq 0xfa67
movq 0x20(%rbx), %rdx
movq 0x28(%rbx), %rcx
movq %r14, %rdi
movq %r15, %rsi
callq 0xedb2
testb %al, %al
je 0x26ea2
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xfbc9
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/main.c
// Function: handle_input_history_key
bool handle_input_history_key(int key, CeHistory_t* history, CeBuffer_t* input_buffer, CePoint_t* cursor){
     if(key == KEY_UP_ARROW){
          char* prev = ce_history_previous(history);
          if(prev){
               ce_buffer_remove_string(input_buffer, (CePoint_t){0, 0}, ce_utf8_strlen(input_buffer->lines[0]));
               ce_buffer_insert_string(input_buffer, prev, (CePoint_t){0, 0});
          }
          cursor->x = ce_utf8_strlen(input_buffer->lines[0]);
          return true;
     }

     if(key == KEY_DOWN_ARROW){
          char* next = ce_history_next(history);
          ce_buffer_remove_string(input_buffer, (CePoint_t){0, 0}, ce_utf8_strlen(input_buffer->lines[0]));
          if(next){
               ce_buffer_insert_string(input_buffer, next, (CePoint_t){0, 0});
          }
          cursor->x = ce_utf8_strlen(input_buffer->lines[0]);
          return true;
     }

     return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
cmpl $0x102, %edi            # imm = 0x102
je 0x26ef6
cmpl $0x103, %edi            # imm = 0x103
jne 0x26f41
movq %rsi, %rdi
callq 0x1059f
testq %rax, %rax
je 0x26f2f
movq %rax, %r15
movq (%r14), %rax
movq (%rax), %rdi
callq 0xe38c
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %rax, %rcx
callq 0xef3b
jmp 0x26f20
movq %rsi, %rdi
callq 0x105dd
movq %rax, %r15
movq (%r14), %rax
movq (%rax), %rdi
callq 0xe38c
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %rax, %rcx
callq 0xef3b
testq %r15, %r15
je 0x26f2f
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xd9ef
movq (%r14), %rax
movq (%rax), %rdi
callq 0xe38c
movq %rax, (%rbx)
movb $0x1, %al
jmp 0x26f43
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/MicBrain[P]Git-Sample/main.c
// Function: check_filename
int check_filename(const char* filename) {
  if (strlen(filename) > FILENAME_SIZE-1 || strlen(filename) == 0)
    return 0;

  if (filename[0] == '.')
    return 0;

  struct stat s;
  int ret_code = stat(filename, &s);
  return (ret_code != -1 && !(S_ISDIR(s.st_mode)));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
callq 0x1080
movq %rax, %rcx
addq $-0x200, %rcx           # imm = 0xFE00
xorl %eax, %eax
cmpq $-0x1ff, %rcx           # imm = 0xFE01
jb 0x1345
cmpb $0x2e, (%rbx)
je 0x1345
leaq -0xa0(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10e0
cmpl $-0x1, %eax
setne %al
movl 0x18(%r14), %ecx
andl $0xf000, %ecx           # imm = 0xF000
cmpl $0x4000, %ecx           # imm = 0x4000
setne %cl
andb %al, %cl
movzbl %cl, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/MicBrain[P]Git-Sample/beargit.c
// Function: beargit_init
int beargit_init(void) {
  fs_mkdir(".beargit");
  FILE* findex = fopen(".beargit/.index", "w");
  fclose(findex);
  FILE* fbranches = fopen(".beargit/.branches", "w");
  fprintf(fbranches, "%s\n", "master");
  fclose(fbranches);
  write_string_to_file(".beargit/.prev", "0000000000000000000000000000000000000000");
  write_string_to_file(".beargit/.current_branch", "master");
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x3074(%rip), %rdi      # 0x46f2
callq 0x16ff
leaq 0x2ad8(%rip), %rdi      # 0x4162
leaq 0x2ae1(%rip), %rbx      # 0x4172
movq %rbx, %rsi
callq 0x1120
movq %rax, %rdi
callq 0x1070
leaq 0x2acc(%rip), %rdi      # 0x4174
movq %rbx, %rsi
callq 0x1120
movq %rax, %rbx
leaq 0x2be6(%rip), %rsi      # 0x42a0
leaq 0x2ac6(%rip), %r14      # 0x4187
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10d0
movq %rbx, %rdi
callq 0x1070
leaq 0x2ab1(%rip), %rdi      # 0x418e
leaq 0x2ab9(%rip), %rsi      # 0x419d
callq 0x1a45
leaq 0x2ad6(%rip), %rdi      # 0x41c6
movq %r14, %rsi
callq 0x1a45
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/MicBrain[P]Git-Sample/./util.h
// Function: write_string_to_file
static void write_string_to_file(const char* filename, const char* str) {
  FILE* fout = fopen(filename, "w");
  ASSERT_ERROR_MESSAGE(fout != NULL, "couldn't open file");
  fwrite(str, 1, strlen(str)+1, fout);
  fclose(fout);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x2712(%rip), %rsi      # 0x4172
callq 0x1120
testq %rax, %rax
je 0x1a9d
movq %rax, %r15
movq %r14, %rdi
callq 0x1080
leaq 0x1(%rax), %rdx
pushq $0x1
popq %rsi
movq %r14, %rdi
movq %r15, %rcx
callq 0x1190
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1070
movq 0x5554(%rip), %r13      # 0x6ff8
movq (%r13), %rdi
leaq 0x28d6(%rip), %rsi      # 0x4385
leaq 0x2b4a(%rip), %r14      # 0x4600
movq %r14, %rdx
xorl %eax, %eax
callq 0x10d0
movq (%r13), %rcx
leaq 0x28ee(%rip), %rdi      # 0x43b9
pushq $0x3b
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x2910(%rip), %rdi      # 0x43f5
pushq $0x39
popq %r12
movq %r12, %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x2930(%rip), %rdi      # 0x442f
pushq $0x38
popq %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x2953(%rip), %rdi      # 0x4468
pushq $0x3a
popq %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x2978(%rip), %rdi      # 0x44a3
pushq $0x37
popq %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x299a(%rip), %rdi      # 0x44db
movq %r12, %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x29be(%rip), %rdi      # 0x4515
pushq $0x2b
popq %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %rdi
leaq 0x29d4(%rip), %rsi      # 0x4541
leaq 0x2aa1(%rip), %rcx      # 0x4615
movq %r14, %rdx
xorl %eax, %eax
callq 0x10d0
movq (%r13), %rcx
leaq 0x29ea(%rip), %rdi      # 0x4573
pushq $0x20
popq %rsi
movq %r15, %rdx
callq 0x1190
cmpb $0x0, (%rbx)
je 0x1bb5
movq (%r13), %rdi
leaq 0x29f0(%rip), %rsi      # 0x4594
leaq 0x29fe(%rip), %rdx      # 0x45a9
movq %rbx, %rcx
xorl %eax, %eax
callq 0x10d0
movq (%r13), %rsi
pushq $0xa
popq %rdi
callq 0x10a0
pushq $0x1
popq %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/MicBrain[P]Git-Sample/beargit.c
// Function: beargit_add
int beargit_add(const char* filename) {
  FILE* findex = fopen(".beargit/.index", "r");
  FILE *fnewindex = fopen(".beargit/.newindex", "w");
  char line[FILENAME_SIZE];
  while(fgets(line, sizeof(line), findex)) {
    strtok(line, "\n");
    if (strcmp(line, filename) == 0) {
      fprintf(stderr, "ERROR: File %s already added\n", filename);
      fclose(findex);
      fclose(fnewindex);
      fs_rm(".beargit/.newindex");
      return 3;
    }
    fprintf(fnewindex, "%s\n", line);
  }
  fprintf(fnewindex, "%s\n", filename);
  fclose(findex);
  fclose(fnewindex);
  fs_mv(".beargit/.newindex", ".beargit/.index");
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %r15
leaq 0x257b(%rip), %rdi      # 0x4162
leaq 0x259e(%rip), %rsi      # 0x418c
callq 0x1120
movq %rax, %rbx
leaq 0x25e2(%rip), %rdi      # 0x41df
leaq 0x256e(%rip), %rsi      # 0x4172
callq 0x1120
movq %rax, %r14
leaq -0x230(%rbp), %r12
leaq 0x2686(%rip), %r13      # 0x42a0
movq %r12, %rdi
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdx
callq 0x10b0
testq %rax, %rax
je 0x1c5f
movq %r12, %rdi
leaq 0x2775(%rip), %rsi      # 0x43ae
callq 0x1130
movq %r12, %rdi
movq %r15, %rsi
callq 0x10c0
testl %eax, %eax
je 0x1ca0
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x10d0
jmp 0x1c1a
leaq 0x263a(%rip), %rsi      # 0x42a0
xorl %r12d, %r12d
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x10d0
movq %rbx, %rdi
callq 0x1070
movq %r14, %rdi
callq 0x1070
callq 0x201e
movl %r12d, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x5351(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2541(%rip), %rsi      # 0x41f2
movq %r15, %rdx
xorl %eax, %eax
callq 0x10d0
movq %rbx, %rdi
callq 0x1070
movq %r14, %rdi
callq 0x1070
leaq 0x250d(%rip), %rdi      # 0x41df
callq 0x1cdd
pushq $0x3
popq %r12
jmp 0x1c8b
// File: /workspace/github_c_makefile_star2_O2/MicBrain[P]Git-Sample/beargit.c
// Function: beargit_rm
int beargit_rm(const char* filename) {
 FILE* findex = fopen(".beargit/.index", "r");
 FILE *fnewindex = fopen(".beargit/.newindex", "w");
 char line[FILENAME_SIZE];
 int checker;
 checker = 0;
 while(fgets(line, sizeof(line), findex)) {
  strtok(line, "\n");
  if (strcmp(line, filename) != 0) {
    fprintf(fnewindex, "%s\n", line);
  } else {
    checker = 5;
  }
}
if (checker == 5) {
  fclose(findex);
  fclose(fnewindex);
  fs_mv(".beargit/.newindex", ".beargit/.index");
  return 0;
} else {
    fprintf(stderr, "ERROR: File %s not tracked\n", filename);
    fclose(findex);
    fclose(fnewindex);
    return 1;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
leaq 0x1dd1(%rip), %rdi      # 0x4162
leaq 0x1df4(%rip), %rsi      # 0x418c
callq 0x1120
movq %rax, %r14
leaq 0x1e38(%rip), %rdi      # 0x41df
leaq 0x1dc4(%rip), %rsi      # 0x4172
callq 0x1120
movq %rax, %r15
movl $0x0, -0x2c(%rbp)
leaq -0x230(%rbp), %r12
leaq 0x1fe3(%rip), %r13      # 0x43ae
movq %r12, %rdi
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdx
callq 0x10b0
testq %rax, %rax
je 0x2417
movq %r12, %rdi
movq %r13, %rsi
callq 0x1130
movq %r12, %rdi
movq %rbx, %rsi
callq 0x10c0
testl %eax, %eax
je 0x2410
movq %r15, %rdi
leaq 0x1e9c(%rip), %rsi      # 0x42a0
movq %r12, %rdx
xorl %eax, %eax
callq 0x10d0
jmp 0x23cb
movb $0x1, %al
movl %eax, -0x2c(%rbp)
jmp 0x23cb
testb $0x1, -0x2c(%rbp)
je 0x2446
movq %r14, %rdi
callq 0x1070
movq %r15, %rdi
callq 0x1070
callq 0x201e
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4bab(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x1db9(%rip), %rsi      # 0x4210
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10d0
movq %r14, %rdi
callq 0x1070
movq %r15, %rdi
callq 0x1070
pushq $0x1
popq %rax
jmp 0x2434
// File: /workspace/github_c_makefile_star2_O2/MicBrain[P]Git-Sample/beargit.c
// Function: is_commit_msg_ok
int is_commit_msg_ok(const char* msg) {
  int pointMSG = 0, pointConst = 0;
  while (msg[pointMSG] != '\0') {
    if (go_bears[pointConst] == msg[pointMSG]) {
      pointConst ++;
      pointMSG ++;
    } else {
      if (pointMSG != 0 && pointConst != 0)
        pointConst = 0;
     else {
        pointConst = 0;
        pointMSG++;
      }
    }
    if (pointConst == 9) 
      return 5;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movq 0x4c5d(%rip), %rcx      # 0x70e0
movl $0x1, %esi
movl $0x5, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
movl %r8d, %r10d
movb (%rdi,%r10), %r10b
testb %r10b, %r10b
je 0x24d3
movslq %r9d, %r11
cmpb %r10b, (%rcx,%r11)
jne 0x24b0
incl %r9d
movl %esi, %r10d
jmp 0x24c8
testl %r8d, %r8d
sete %r10b
testl %r9d, %r9d
sete %r9b
orb %r10b, %r9b
movzbl %r9b, %r10d
xorl %r9d, %r9d
addl %r10d, %r8d
cmpl $0x9, %r9d
jne 0x2493
movl %edx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/MicBrain[P]Git-Sample/./util.h
// Function: read_string_from_file
static void read_string_from_file(const char* filename, char* str, int size) {
  FILE* fin = fopen(filename, "r");
  ASSERT_ERROR_MESSAGE(fin != NULL, "couldn't open file");
  fread(str, 1, size, fin);
  fclose(fin);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1a71(%rip), %rsi      # 0x418c
callq 0x1120
testq %rax, %rax
je 0x274f
movq %rax, %r15
movl %r12d, %edx
pushq $0x1
popq %rsi
movq %r14, %rdi
movq %rax, %rcx
callq 0x1060
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1070
movq 0x48a2(%rip), %r13      # 0x6ff8
movq (%r13), %rdi
leaq 0x1c24(%rip), %rsi      # 0x4385
leaq 0x1fd0(%rip), %r14      # 0x4738
movq %r14, %rdx
xorl %eax, %eax
callq 0x10d0
movq (%r13), %rcx
leaq 0x1c3c(%rip), %rdi      # 0x43b9
pushq $0x3b
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x1c5e(%rip), %rdi      # 0x43f5
pushq $0x39
popq %r12
movq %r12, %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x1c7e(%rip), %rdi      # 0x442f
pushq $0x38
popq %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x1ca1(%rip), %rdi      # 0x4468
pushq $0x3a
popq %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x1cc6(%rip), %rdi      # 0x44a3
pushq $0x37
popq %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x1ce8(%rip), %rdi      # 0x44db
movq %r12, %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x1d0c(%rip), %rdi      # 0x4515
pushq $0x2b
popq %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %rdi
leaq 0x1d22(%rip), %rsi      # 0x4541
leaq 0x1def(%rip), %rcx      # 0x4615
movq %r14, %rdx
xorl %eax, %eax
callq 0x10d0
movq (%r13), %rcx
leaq 0x1d38(%rip), %rdi      # 0x4573
pushq $0x20
popq %rsi
movq %r15, %rdx
callq 0x1190
cmpb $0x0, (%rbx)
je 0x2867
movq (%r13), %rdi
leaq 0x1d3e(%rip), %rsi      # 0x4594
leaq 0x1d4c(%rip), %rdx      # 0x45a9
movq %rbx, %rcx
xorl %eax, %eax
callq 0x10d0
movq (%r13), %rsi
pushq $0xa
popq %rdi
callq 0x10a0
pushq $0x1
popq %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/MicBrain[P]Git-Sample/beargit.c
// Function: next_commit_id
void next_commit_id(char* commit_id) {
  char current_branch[BRANCHNAME_SIZE];
  read_string_from_file(".beargit/.current_branch", current_branch, BRANCHNAME_SIZE);
  int n = get_branch_number(current_branch);
  for (int i = 0; i < COMMIT_ID_BRANCH_BYTES; i++) {
    commit_id[i] = digits[n%3];
    n /= 3;
  }
  next_commit_id_hw1(commit_id + COMMIT_ID_BRANCH_BYTES);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
leaq 0x1933(%rip), %rdi      # 0x41c6
leaq -0x90(%rbp), %r14
movq %r14, %rsi
movl $0x80, %edx
callq 0x26fd
movq %r14, %rdi
callq 0x3171
xorl %ecx, %ecx
pushq $0x3
popq %rsi
cmpq $0xa, %rcx
je 0x28d2
movq 0x4827(%rip), %rdi      # 0x70e8
cltd
idivl %esi
movslq %edx, %rdx
movb (%rdi,%rdx), %dl
movb %dl, (%rbx,%rcx)
incq %rcx
jmp 0x28b4
addq $0xa, %rbx
movq %rbx, %rdi
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x24d5
// File: /workspace/github_c_makefile_star2_O2/MicBrain[P]Git-Sample/beargit.c
// Function: beargit_status
int beargit_status() {
  FILE* findex = fopen(".beargit/.index", "r");
  char line[FILENAME_SIZE];
  int counter = 0;
  fprintf(stdout, "%s\n", "Tracked files:");
  while (fgets(line, sizeof(line), findex)) {
    counter++;
    strtok(line, "\n");
    printf("\n");
    fprintf(stdout, "%s", "  ");
    fprintf(stdout, "%s", line);
  }
  fprintf(stdout, "\n\n");
  fprintf(stdout, "%d", counter);
  fprintf(stdout, "%s", " ");
  fprintf(stdout, "%s\n", "files total");
  fclose(findex);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
leaq 0x12a5(%rip), %rdi      # 0x4162
leaq 0x12c8(%rip), %rsi      # 0x418c
callq 0x1120
movq %rax, %rbx
movq 0x4105(%rip), %r13      # 0x6fd8
movq (%r13), %rdi
leaq 0x13c2(%rip), %rsi      # 0x42a0
leaq 0x137d(%rip), %rdx      # 0x4262
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x10d0
leaq -0x230(%rbp), %r15
leaq 0x1374(%rip), %r12      # 0x4271
movq %r15, %rdi
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdx
callq 0x10b0
testq %rax, %rax
je 0x2f46
incl %r14d
movq %r15, %rdi
leaq 0x148f(%rip), %rsi      # 0x43ae
callq 0x1130
pushq $0xa
popq %rdi
callq 0x1030
movq (%r13), %rsi
movq %r12, %rdi
callq 0x1090
movq (%r13), %rsi
movq %r15, %rdi
callq 0x1090
jmp 0x2efd
movq (%r13), %rcx
leaq 0x145c(%rip), %rdi      # 0x43ad
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
movq (%r13), %rdi
leaq 0x130d(%rip), %rsi      # 0x4274
movl %r14d, %edx
xorl %eax, %eax
callq 0x10d0
movq (%r13), %rsi
leaq 0x12f6(%rip), %rdi      # 0x4272
callq 0x1090
movq (%r13), %rdi
leaq 0x1314(%rip), %rsi      # 0x42a0
leaq 0x12e4(%rip), %rdx      # 0x4277
xorl %eax, %eax
callq 0x10d0
movq %rbx, %rdi
callq 0x1070
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq