LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_vim.c
// Function: ce_vim_motion_entire_line
CeVimMotionResult_t ce_vim_motion_entire_line(CeVim_t* vim, CeVimAction_t* action, const CeView_t* view, const CePoint_t* cursor,
                                              CeVimVisualData_t* visual, const CeConfigOptions_t* config_options,
                                              CeVimBufferData_t* buffer_data, CeRange_t* motion_range){
     int64_t line_length = ce_utf8_strlen(view->buffer->lines[motion_range->end.y]);
     motion_range->start = (CePoint_t){0, motion_range->end.y};
     motion_range->end = (CePoint_t){line_length, motion_range->end.y};
     return CE_VIM_MOTION_RESULT_SUCCESS;
}

// Assembly:
pushq %rbx
movq 0x18(%rsp), %rbx
movq 0x40(%rdx), %rax
movq (%rax), %rax
movq 0x18(%rbx), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xe445
movq 0x18(%rbx), %rcx
movq $0x0, (%rbx)
movq %rcx, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_vim.c
// Function: ce_vim_verb_substitute_soft_begin_line
bool ce_vim_verb_substitute_soft_begin_line(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){
     int64_t soft_begin_index = ce_vim_soft_begin_line(view->buffer, cursor->y);
     if(soft_begin_index < 0) return false;

     cursor->x = soft_begin_index;
     motion_range.start = *cursor;
     motion_range.end.x = ce_utf8_last_index(view->buffer->lines[motion_range.end.y]);

     // if the line is empty, just enter insert mode
     if(motion_range.end.x == 0){
          ce_vim_insert_mode(vim);
          return true;
     }

     bool success = ce_vim_verb_change(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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x40(%rdx), %rdi
movq 0x8(%rcx), %rsi
callq 0x25f8c
testq %rax, %rax
js 0x28701
leaq 0x60(%rsp), %r13
movq %rax, (%r14)
movq (%r14), %rax
movq %rax, (%r13)
movq 0x8(%r14), %rax
movq %rax, 0x8(%r13)
movq 0x40(%r15), %rax
movq (%rax), %rax
movq 0x18(%r13), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xe8d0
movq %rax, 0x10(%r13)
testq %rax, %rax
je 0x28705
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x25d13
testb %al, %al
je 0x28701
movb $0x1, 0x19d8(%rbx)
movl $0x1, (%rbx)
movb 0x19d9(%rbx), %cl
testb %cl, %cl
jne 0x286eb
leaq 0x19c8(%rbx), %rdi
callq 0x101e1
movb 0x19d9(%rbx), %cl
movb $0x1, 0x19d8(%rbx)
movl $0x1, (%rbx)
movb $0x1, %al
testb $0x1, %cl
je 0x28716
jmp 0x28727
xorl %eax, %eax
jmp 0x28727
movl $0x1, (%rbx)
movb $0x1, %al
cmpb $0x0, 0x19d9(%rbx)
jne 0x28727
addq $0x19c8, %rbx           # imm = 0x19C8
movq %rbx, %rdi
callq 0x101e1
movb $0x1, %al
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_vim.c
// Function: ce_vim_verb_set_character
bool ce_vim_verb_set_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);

     bool chain_undo = false;
     while(!ce_point_after(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;
          }

          if(!change_character(view, cursor, motion_range.start, action->verb.integer, 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;
     }

     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
leaq 0x40(%rsp), %r12
movq %r12, %rdi
callq 0x10614
movq (%r12), %rdi
movq 0x8(%r12), %rsi
xorl %r13d, %r13d
movq 0x10(%r12), %rdx
movq 0x18(%r12), %rcx
callq 0xec71
testb %al, %al
jne 0x28835
movl %eax, %ebp
movq 0x40(%r14), %rdi
movq (%r12), %rsi
movq 0x8(%r12), %rdx
callq 0xe406
movq 0x40(%r14), %rdi
movq 0x8(%r12), %r10
testb %al, %al
je 0x287a6
movq (%rdi), %rax
movq (%rax,%r10,8), %rax
cmpb $0x0, (%rax)
jne 0x287de
movq (%r12), %rsi
movl $0x1, %ecx
movq %r10, %rdx
callq 0xee7a
movq %rax, (%r12)
movq %rdx, 0x8(%r12)
movq 0x10(%r12), %r8
movq 0x18(%r12), %rcx
movq %rax, %rdi
movq %rdx, %rsi
movq %r8, %rdx
callq 0xec71
testb %al, %al
je 0x2877b
jmp 0x28835
movl 0x30(%r15), %r8d
movq (%r12), %rdx
movzbl %r13b, %r9d
andl $0x1, %r9d
movq %r14, %rdi
movq %rbx, %rsi
movq %r10, %rcx
callq 0x296bf
testb %al, %al
je 0x28838
movq 0x40(%r14), %rdi
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movl $0x1, %ecx
callq 0xee7a
movq %rax, %rdi
movq %rdx, %rsi
movq %rax, (%r12)
movq %rdx, 0x8(%r12)
movb $0x1, %r13b
cmpq $-0x1, %rax
jne 0x28762
jmp 0x28838
movb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x10614
movq (%r14), %rdi
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
movq 0x18(%r14), %rcx
callq 0xec71
testb %al, %al
jne 0x288fc
xorl %ebp, %ebp
movq 0x40(%r12), %rdi
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movups (%rbx), %xmm0
movups %xmm0, (%rsp)
movl $0x1, %ecx
movq %rbx, %r8
xorl %r9d, %r9d
callq 0xfab0
movq 0x40(%r12), %rdi
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movl $0x1, %ecx
callq 0xee7a
movq %rax, %r13
movq %rdx, %r15
movq (%r14), %rdx
movq 0x8(%r14), %rcx
movq %rax, %rdi
movq %r15, %rsi
callq 0xf03d
testb %al, %al
jne 0x28920
movq %r13, (%r14)
movq %r15, 0x8(%r14)
movq 0x10(%r14), %rdx
movq 0x18(%r14), %rcx
movq %r13, %rdi
movq %r15, %rsi
callq 0xec71
testb %al, %al
je 0x28889
movq 0x40(%r12), %rdi
movq 0x10(%rsp), %rax
movl 0x40(%rax), %ecx
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
callq 0xef79
movq %rax, (%rbx)
movq %rdx, 0x8(%rbx)
movb $0x1, %bpl
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_O3/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 0x28849
movl %eax, %ebp
testb %al, %al
je 0x2897d
movb $0x1, 0x19d8(%rbx)
movl $0x1, (%rbx)
cmpb $0x0, 0x19d9(%rbx)
jne 0x2897d
addq $0x19c8, %rbx           # imm = 0x19C8
movq %rbx, %rdi
callq 0x101e1
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x64aa(%rip), %rdi      # 0x2eef1
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 0xf8ee
testb %al, %al
je 0x28b34
movq 0x80(%rsp), %rax
movq $0x0, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movq 0x40(%r12), %rdi
movq 0x8(%rax), %rcx
xorl %esi, %esi
movq %r15, %rdx
callq 0x24dce
testq %rax, %rax
jle 0x28b03
movq %rax, %r13
movq %rax, 0x18(%rsp)
movq %rax, %rdi
incq %rdi
callq 0xd4c0
movq %rax, %rbp
movq %rax, %rdi
movl $0x20, %esi
movq %r13, %rdx
callq 0xd2a0
movb $0x0, (%rbp,%r13)
movq 0x40(%r12), %rdi
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsp)
xorl %r13d, %r13d
movq %rbp, %rsi
xorl %edx, %edx
movq %r15, %rcx
movq %r14, %r8
movl $0x1, %r9d
callq 0xf8ee
testb %al, %al
jne 0x28b0c
jmp 0x28b34
movups 0x18(%rsp), %xmm0
movups %xmm0, (%r14)
movb $0x1, 0x19d8(%rbx)
movl $0x1, (%rbx)
movb $0x1, %r13b
cmpb $0x0, 0x19d9(%rbx)
jne 0x28b34
addq $0x19c8, %rbx           # imm = 0x19C8
movq %rbx, %rdi
callq 0x101e1
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_O3/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 0x638d(%rip), %rdi      # 0x2eef1
callq 0xd640
movq %rax, %rbp
movq 0x40(%r12), %rax
movq (%rax), %rax
movq 0x68(%rsp), %r15
movq (%rax,%r15,8), %rdi
callq 0xe445
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 0xf8ee
testb %al, %al
je 0x28c71
movq 0x80(%rsp), %rax
incq %r15
movq 0x40(%r12), %rdi
movq 0x8(%rax), %rcx
xorl %esi, %esi
movq %r15, %rdx
callq 0x24dce
movq $0x0, 0x18(%rsp)
movq %r15, 0x20(%rsp)
testq %rax, %rax
jle 0x28c38
movq %rax, %r13
movq %rax, 0x18(%rsp)
movq %rax, %rdi
incq %rdi
callq 0xd4c0
movq %rax, %rbp
movq %rax, %rdi
movl $0x20, %esi
movq %r13, %rdx
callq 0xd2a0
movb $0x0, (%rbp,%r13)
movq 0x40(%r12), %rdi
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsp)
xorl %r13d, %r13d
movq %rbp, %rsi
xorl %edx, %edx
movq %r15, %rcx
movq %r14, %r8
movl $0x1, %r9d
callq 0xf8ee
testb %al, %al
jne 0x28c49
jmp 0x28c71
movq 0x18(%rsp), %rax
movq %rax, (%r14)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%r14)
movb $0x1, 0x19d8(%rbx)
movl $0x1, (%rbx)
movb $0x1, %r13b
cmpb $0x0, 0x19d9(%rbx)
jne 0x28c71
addq $0x19c8, %rbx           # imm = 0x19C8
movq %rbx, %rdi
callq 0x101e1
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_O3/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 0x28d83
movq %rdx, %r14
movq 0x40(%rdx), %rdi
movq 0x8(%rdi), %rax
decq %rax
cmpq %rax, %r15
jge 0x28d83
movq %rcx, %rbx
incq %r15
movq %r15, %rsi
callq 0x25f8c
testq %rax, %rax
jle 0x28cfe
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 0xfab0
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 0xe445
movq %rax, %r15
movq (%rbx), %rdx
movq 0x8(%rbx), %r12
movq 0x40(%r14), %rdi
movq %r12, %rsi
movq %r12, %rcx
movl $0x1, %r8d
callq 0x24fd5
movb $0x1, %bpl
testb %r13b, %r13b
je 0x28d85
leaq 0x6acd(%rip), %rdi      # 0x2f815
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)
movq %rax, %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %rbx, %r8
movl $0x1, %r9d
callq 0xf8ee
jmp 0x28d85
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_O3/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       # 0x28d96
cmpq %rax, 0x1960(%rdi)
je 0x28eb9
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 0x255d4
testb %al, %al
je 0x28ea3
movq 0x19d0(%rbx), %rdi
testq %rdi, %rdi
je 0x28e92
movb %al, 0xf(%rsp)
movq %rbp, 0x18(%rsp)
callq 0x10175
movq %rax, 0x10(%rsp)
movl (%rax), %r8d
testl %r8d, %r8d
movq 0x80(%rsp), %rax
je 0x28e7f
movq 0x10(%rsp), %rbp
addq $0x4, %rbp
movq %rbx, 0x20(%rsp)
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r9
movq %r13, %rbx
movq %r12, %r13
movq %r15, %r12
movq %r14, %r15
movq %rax, %r14
callq 0x2511d
movq %r14, %rax
movq %r15, %r14
movq %r12, %r15
movq %r13, %r12
movq %rbx, %r13
movq 0x20(%rsp), %rbx
movl (%rbp), %r8d
addq $0x4, %rbp
testl %r8d, %r8d
jne 0x28e37
movq 0x10(%rsp), %rdi
callq 0xd090
movq 0x18(%rsp), %rbp
movb 0xf(%rsp), %al
testq %rbp, %rbp
je 0x28ea3
movq 0x40(%rbp), %rcx
testq %rcx, %rcx
je 0x28ea3
movb $0x0, (%rcx)
movb $0x0, 0x19d9(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x74da(%rip), %rdi      # 0x3039a
leaq 0x7400(%rip), %rsi      # 0x302c7
leaq 0x7506(%rip), %rcx      # 0x303d4
movl $0xcf8, %edx            # imm = 0xCF8
callq 0xd280
// File: /workspace/github_c_makefile_star2_O3/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 0x28f04
cmpl $0x74, %eax
je 0x28efa
cmpl $0x7a, %eax
jne 0x28f1d
movq %rdx, %rdi
callq 0xff40
jmp 0x28f1d
movq 0x8(%rcx), %rax
subq 0x18(%rdi), %rax
jmp 0x28f10
movq 0x8(%rcx), %rax
subq 0x18(%rdx), %rax
addq 0x18(%rdi), %rax
movq %rdx, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0xff1c
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x28f70
movq 0x40(%rbx), %rdi
cmpq 0x8(%rdi), %rax
jg 0x28fa2
movq 0x70(%rsp), %r15
decq %rax
movq %rax, 0x8(%r14)
movq %rax, %rsi
callq 0x25f8c
movq %rax, (%r14)
movq 0x8(%r15), %rcx
movq 0x10(%r15), %rsi
movq 0x18(%r15), %rdx
movq %rbx, %rdi
callq 0xfdb4
jmp 0x28fb4
movl 0x30(%rsi), %eax
cmpl $0x76, %eax
je 0x28fa6
cmpl $0x67, %eax
jne 0x28fa2
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 0x25b02
jmp 0x28fb4
xorl %eax, %eax
jmp 0x28fb6
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_O3/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
movq 0x60(%rsp), %r15
movq 0x68(%rsp), %r12
movq 0x50(%rsp), %r13
movq 0x58(%rsp), %rbp
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0xf03d
testb %al, %al
jne 0x2940c
xorl %ebx, %ebx
movq %r12, 0x10(%rsp)
movq 0x40(%r14), %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0xe406
movq 0x40(%r14), %rdi
testb %al, %al
je 0x29388
movq (%rdi), %rax
movq (%rax,%rbp,8), %rax
cmpb $0x0, (%rax)
je 0x29388
movq %r15, %r12
movl %ebx, %r15d
movq %r13, %rsi
movq %rbp, %rdx
callq 0xe50e
cmpl $-0x1, %eax
je 0x29420
movl %eax, %ebx
callq 0xd720
movq (%rax), %rax
movslq %ebx, %rcx
testb $0x1, 0x1(%rax,%rcx,2)
jne 0x293a0
movl %ebx, %edi
callq 0xd110
jmp 0x293a7
movl $0x1, %ecx
movq %r13, %rsi
movq %rbp, %rdx
callq 0xee7a
movq %rax, %r13
movq %rdx, %rbp
jmp 0x293f3
movl %ebx, %edi
callq 0xd480
movzbl %r15b, %r9d
andl $0x1, %r9d
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
movq %rbp, %rcx
movl %eax, %r8d
callq 0x296bf
testb %al, %al
je 0x29420
movq 0x40(%r14), %rdi
movl $0x1, %ecx
movq %r13, %rsi
movq %rbp, %rdx
callq 0xee7a
cmpq $-0x1, %rax
je 0x29420
movq %rax, %r13
movq %rdx, %rbp
movb $0x1, %bl
movq %r12, %r15
movq 0x10(%rsp), %r12
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0xf03d
testb %al, %al
je 0x2932e
leaq 0x60(%rsp), %rax
movups (%rax), %xmm0
movq 0x8(%rsp), %rax
movups %xmm0, (%rax)
movb $0x1, %al
jmp 0x29422
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x29e21
testb %al, %al
je 0x294f8
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 0x14d55
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl 0x18(%rdi), %r8d
movq 0x10(%rdx), %rdx
movq 0x18(%rbx), %rcx
movl %eax, (%rsp)
leaq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x26ff8
cmpq $0x0, (%r13)
js 0x2957e
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
movq %r15, %rdi
movq %r12, %rsi
callq 0xf03d
testb %al, %al
je 0x29566
movb $0x1, 0x3e(%r14)
movups 0x10(%rsp), %xmm0
movups 0x20(%rsp), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movl $0x2, %eax
jmp 0x29580
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x243bf
movq 0x40(%r15), %rsi
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movl $0x0, (%rsp)
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movl $0x77, %r8d
movl $0x1, %r9d
callq 0x26ff8
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 0xeb33
movq %rax, %r12
movq 0x40(%r15), %rdi
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rax, %rcx
callq 0xf60a
movq %rax, %r14
leaq 0x5(%r12), %r15
movq %r15, %rdi
callq 0xd4c0
movq %rax, 0x11c0(%rbx)
leaq 0x6e3f(%rip), %rdx      # 0x3047d
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_O3/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 %rbp
pushq %rbx
pushq %rax
movb (%rdi), %bpl
testb %bpl, %bpl
je 0x296b4
movq %rdi, %rbx
callq 0xd720
movq (%rax), %rcx
incq %rbx
movsbq %bpl, %rax
movb (%rcx,%rax,2), %al
testb $0x1, %al
je 0x296b6
movb (%rbx), %bpl
incq %rbx
testb %bpl, %bpl
jne 0x2969c
jmp 0x296b6
movb $0x1, %al
andb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x29e9c
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 0xec71
testb %al, %al
je 0x29e80
movups (%r15), %xmm0
movaps %xmm0, (%rsp)
movups (%rbx), %xmm0
movups %xmm0, (%r15)
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
cmpl $0x3, %ebp
jne 0x29e9c
movq $0x0, (%r15)
movq 0x40(%r14), %rdi
movq 0x8(%rbx), %rsi
callq 0xec84
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_O3/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 0xfdb4
movq 0x20(%rbx), %rdx
movq 0x28(%rbx), %rcx
movq %r14, %rdi
movq %r15, %rsi
callq 0xf03d
testb %al, %al
je 0x29efa
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xff40
// File: /workspace/github_c_makefile_star2_O3/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 0x29f4e
cmpl $0x103, %edi            # imm = 0x103
jne 0x29f99
movq %rsi, %rdi
callq 0x10ace
testq %rax, %rax
je 0x29f87
movq %rax, %r15
movq (%r14), %rax
movq (%rax), %rdi
callq 0xe445
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %rax, %rcx
callq 0xf1cb
jmp 0x29f78
movq %rsi, %rdi
callq 0x10b11
movq %rax, %r15
movq (%r14), %rax
movq (%rax), %rdi
callq 0xe445
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %rax, %rcx
callq 0xf1cb
testq %r15, %r15
je 0x29f87
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xda6e
movq (%r14), %rax
movq (%rax), %rdi
callq 0xe445
movq %rax, (%rbx)
movb $0x1, %al
jmp 0x29f9b
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x28b5
cmpb $0x2e, (%rbx)
je 0x28b5
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_O3/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 0x1b08(%rip), %rdi      # 0x46f2
callq 0x2c6b
leaq 0x156c(%rip), %rdi      # 0x4162
leaq 0x1575(%rip), %rbx      # 0x4172
movq %rbx, %rsi
callq 0x1120
movq %rax, %rdi
callq 0x1070
leaq 0x1560(%rip), %rdi      # 0x4174
movq %rbx, %rsi
callq 0x1120
movq %rax, %rbx
leaq 0x167a(%rip), %rsi      # 0x42a0
leaq 0x155a(%rip), %r14      # 0x4187
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10d0
movq %rbx, %rdi
callq 0x1070
leaq 0x1545(%rip), %rdi      # 0x418e
leaq 0x154d(%rip), %rsi      # 0x419d
callq 0x2caf
leaq 0x156a(%rip), %rdi      # 0x41c6
movq %r14, %rsi
callq 0x2caf
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MicBrain[P]Git-Sample/./util.h
// Function: fs_mkdir
static void fs_mkdir(const char* dirname) {
  ASSERT_ERROR_MESSAGE(dirname != NULL, "dirname is not a valid string");
  ASSERT_ERROR_MESSAGE(is_sane_path(dirname), "dirname is not a valid path within .beargit");
  int ret = mkdir(dirname, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
  ASSERT_ERROR_MESSAGE(ret == 0, "creating directory failed");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2c9a
movq %rdi, %rbx
callq 0x3e8c
testl %eax, %eax
je 0x2c9f
movq %rbx, %rdi
movl $0x1fd, %esi            # imm = 0x1FD
callq 0x1050
testl %eax, %eax
jne 0x2ca7
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x1567
movq %rbx, %rdi
callq 0x142a
movq %rbx, %rdi
callq 0x12ed
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x14ac(%rip), %rsi      # 0x4172
callq 0x1120
testq %rax, %rax
je 0x2d01
movq %rax, %r14
movq %rbx, %rdi
callq 0x1080
leaq 0x1(%rax), %rdx
movl $0x1, %esi
movq %rbx, %rdi
movq %r14, %rcx
callq 0x1190
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1070
movq %r15, %rdi
callq 0x1669
// File: /workspace/github_c_makefile_star2_O3/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, %rbx
leaq 0x143b(%rip), %rdi      # 0x4162
leaq 0x145e(%rip), %rsi      # 0x418c
callq 0x1120
movq %rax, %r14
leaq 0x14a2(%rip), %rdi      # 0x41df
leaq 0x142e(%rip), %rsi      # 0x4172
callq 0x1120
movq %rax, %r15
leaq -0x230(%rbp), %rdi
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdx
callq 0x10b0
testq %rax, %rax
je 0x2db6
leaq -0x230(%rbp), %r13
leaq 0x152d(%rip), %r12      # 0x42a0
movq %r13, %rdi
leaq 0x1631(%rip), %rsi      # 0x43ae
callq 0x1130
movq %r13, %rdi
movq %rbx, %rsi
callq 0x10c0
testl %eax, %eax
je 0x2df7
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x10d0
movq %r13, %rdi
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdx
callq 0x10b0
testq %rax, %rax
jne 0x2d73
leaq 0x14e3(%rip), %rsi      # 0x42a0
xorl %r12d, %r12d
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10d0
movq %r14, %rdi
callq 0x1070
movq %r15, %rdi
callq 0x1070
callq 0x2e4c
movl %r12d, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x17a6
movl $0x3, %r12d
jmp 0x2de2
// File: /workspace/github_c_makefile_star2_O3/MicBrain[P]Git-Sample/./util.h
// Function: fs_rm
static void fs_rm(const char* filename) {
  ASSERT_ERROR_MESSAGE(filename != NULL, "filename is not a valid string");
  ASSERT_ERROR_MESSAGE(is_sane_path(filename), "filename is not a valid path within .beargit");
  int ret = unlink(filename);
  ASSERT_ERROR_MESSAGE(ret == 0, "deleting/unlinking file failed");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2e37
movq %rdi, %rbx
callq 0x3e8c
testl %eax, %eax
je 0x2e3c
movq %rbx, %rdi
callq 0x1040
testl %eax, %eax
jne 0x2e44
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x1a69
movq %rbx, %rdi
callq 0x192c
movq %rbx, %rdi
callq 0x17ef
// File: /workspace/github_c_makefile_star2_O3/MicBrain[P]Git-Sample/./util.h
// Function: fs_mv
static void fs_mv(const char* src, const char* dst) {
  ASSERT_ERROR_MESSAGE(src != NULL, "src is not a valid string");
  ASSERT_ERROR_MESSAGE(dst != NULL, "dst is not a valid string");
  ASSERT_ERROR_MESSAGE(is_sane_path(src), "src is not a valid path within .beargit");
  ASSERT_ERROR_MESSAGE(is_sane_path(dst), "dst is not a valid path within .beargit");
  int ret = rename(src, dst);
  ASSERT_ERROR_MESSAGE(ret == 0, "renaming file failed");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1388(%rip), %rdi      # 0x41df
callq 0x3e8c
testl %eax, %eax
je 0x2e89
leaq 0x12fb(%rip), %rdi      # 0x4162
callq 0x3e8c
testl %eax, %eax
je 0x2e8e
leaq 0x1368(%rip), %rdi      # 0x41df
leaq 0x12e4(%rip), %rsi      # 0x4162
callq 0x1140
testl %eax, %eax
jne 0x2e93
popq %rbp
retq
callq 0x1e15
callq 0x1cc0
callq 0x1b6b
// File: /workspace/github_c_makefile_star2_O3/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 0x12ac(%rip), %rdi      # 0x4162
leaq 0x12cf(%rip), %rsi      # 0x418c
callq 0x1120
movq %rax, %r14
leaq 0x1313(%rip), %rdi      # 0x41df
leaq 0x129f(%rip), %rsi      # 0x4172
callq 0x1120
movq %rax, %r15
leaq -0x230(%rbp), %rdi
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdx
callq 0x10b0
testq %rax, %rax
je 0x2f98
xorl %ecx, %ecx
leaq -0x230(%rbp), %r13
leaq 0x1398(%rip), %r12      # 0x42a0
movl %ecx, -0x2c(%rbp)
movq %r13, %rdi
leaq 0x1499(%rip), %rsi      # 0x43ae
callq 0x1130
movq %r13, %rdi
movq %rbx, %rsi
callq 0x10c0
testl %eax, %eax
je 0x2f50
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x10d0
movq %r13, %rdi
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdx
callq 0x10b0
testq %rax, %rax
jne 0x2f0b
jmp 0x2f69
movq %r13, %rdi
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdx
callq 0x10b0
movb $0x1, %cl
testq %rax, %rax
jne 0x2f08
jmp 0x2f6f
testb $0x1, -0x2c(%rbp)
je 0x2f98
movq %r14, %rdi
callq 0x1070
movq %r15, %rdi
callq 0x1070
callq 0x2e4c
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4059(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x1267(%rip), %rsi      # 0x4210
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10d0
movq %r14, %rdi
callq 0x1070
movq %r15, %rdi
callq 0x1070
movl $0x1, %eax
jmp 0x2f86
// File: /workspace/github_c_makefile_star2_O3/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 0x4109(%rip), %rcx      # 0x70e0
xorl %edx, %edx
xorl %esi, %esi
movl %edx, %r8d
movb (%rdi,%r8), %r8b
testb %r8b, %r8b
je 0x301c
movslq %esi, %r9
cmpb %r8b, (%rcx,%r9)
jne 0x2ffa
incl %esi
movl $0x1, %r8d
jmp 0x300f
testl %edx, %edx
sete %r8b
testl %esi, %esi
sete %sil
orb %r8b, %sil
movzbl %sil, %r8d
xorl %esi, %esi
addl %r8d, %edx
cmpl $0x9, %esi
jne 0x2fdb
movl $0x5, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r12
leaq 0xee3(%rip), %rsi       # 0x418c
callq 0x1120
testq %rax, %rax
je 0x32d9
movq %rax, %r14
movl %r15d, %edx
movl $0x1, %esi
movq %rbx, %rdi
movq %rax, %rcx
callq 0x1060
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1070
movq %r12, %rdi
callq 0x1f6a