LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_show_info_buffer
CeCommandStatus_t command_show_info_buffer(CeCommand_t* command, void* user_data, CeBuffer_t* buffer){
     if(command->arg_count != 0) return CE_COMMAND_PRINT_HELP;
     CeApp_t* app = user_data;
     CommandContext_t command_context = {};
     if(!get_command_context(app, &command_context)) return CE_COMMAND_NO_ACTION;
     ce_view_switch_buffer(command_context.view, buffer, &app->vim, &app->config_options, true);
     return CE_COMMAND_SUCCESS;
}

// Assembly:
movl $0x2, %eax
cmpq $0x0, 0x208(%rdi)
je 0x16d70
retq
movq %rsi, %rcx
movq 0x27f8(%rsi), %rsi
testq %rsi, %rsi
je 0x16d83
xorl %edi, %edi
jmp 0x16d9f
movq 0x2818(%rcx), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
leaq 0x8(%rax), %r8
xorl %edi, %edi
cmpl $0x0, (%rax)
cmoveq %r8, %rdi
movl $0x3, %eax
testq %rsi, %rsi
jne 0x16d6f
pushq %rax
leaq 0x20(%rcx), %rax
addq $0x1a50, %rcx           # imm = 0x1A50
movq %rdx, %rsi
movq %rax, %rdx
movl $0x1, %r8d
callq 0x112df
xorl %eax, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: split_layout
CeLayout_t* split_layout(CeApp_t* app, bool vertical){
     CeLayout_t* tab_layout = app->tab_list_layout->tab_list.current;
     bool always_add_last = false;
     CeLayout_t* new_layout = ce_layout_split(tab_layout, vertical, always_add_last);

     if(new_layout){
          ce_view_follow_cursor(&new_layout->view, app->config_options.horizontal_scroll_off,
                                app->config_options.vertical_scroll_off, app->config_options.tab_width);
          tab_layout->tab.current = new_layout;

          CeLayout_t* parent = ce_layout_find_parent(tab_layout, new_layout);
          if(parent && parent->type == CE_LAYOUT_TYPE_LIST){
               for(int64_t i = 0; i < parent->list.layout_count; i++){
                    CeLayout_t* layout = parent->list.layouts[i];
                    ce_view_follow_cursor(&layout->view, app->config_options.horizontal_scroll_off,
                                          app->config_options.vertical_scroll_off, app->config_options.tab_width);

               }
          }
     }

     return new_layout;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2818(%rdi), %rax
movq 0x10(%rax), %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0x1db50
movq %rax, %r14
testq %rax, %rax
je 0x16ea7
movq %r14, %rdi
addq $0x8, %rdi
movq 0x1a58(%rbx), %rcx
movq 0x1a60(%rbx), %rsi
movq 0x1a68(%rbx), %rdx
callq 0xff34
movq %r14, 0x10(%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0x1dde1
testq %rax, %rax
je 0x16ea7
movq %rax, %r15
cmpl $0x1, (%rax)
jne 0x16ea7
cmpq $0x0, 0x10(%r15)
jle 0x16ea7
xorl %r12d, %r12d
movq 0x8(%r15), %rax
movq (%rax,%r12,8), %rdi
addq $0x8, %rdi
movq 0x1a58(%rbx), %rcx
movq 0x1a60(%rbx), %rsi
movq 0x1a68(%rbx), %rdx
callq 0xff34
incq %r12
cmpq 0x10(%r15), %r12
jl 0x16e78
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_split_layout
CeCommandStatus_t command_split_layout(CeCommand_t* command, void* user_data){
     if(command->arg_count != 1) return CE_COMMAND_PRINT_HELP;
     if(command->args[0].type != CE_COMMAND_ARG_STRING) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;
     bool vertical = false;

     if(strcmp(command->args[0].string, "vertical") == 0){
          vertical = true;
     }else if(strcmp(command->args[0].string, "horizontal") == 0){
          // pass
     }else{
          return CE_COMMAND_PRINT_HELP;
     }

     CeLayout_t* new_layout = split_layout(app, vertical);
     if(new_layout == NULL){
         return CE_COMMAND_FAILURE;
     }

     return CE_COMMAND_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0x2, %ebx
cmpq $0x1, 0x208(%rdi)
jne 0x16f46
movq 0x200(%rdi), %rax
cmpl $0x2, (%rax)
jne 0x16f46
movq %rsi, %r14
movq 0x8(%rax), %r15
leaq 0x193c4(%rip), %rsi     # 0x302d1
movq %r15, %rdi
callq 0xd390
movl %eax, %ebp
testl %eax, %eax
je 0x16f2e
leaq 0x193b8(%rip), %rsi     # 0x302da
movq %r15, %rdi
callq 0xd390
testl %eax, %eax
jne 0x16f46
xorl %esi, %esi
testl %ebp, %ebp
sete %sil
movq %r14, %rdi
callq 0x16e09
xorl %ebx, %ebx
testq %rax, %rax
sete %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_resize_layout
CeCommandStatus_t command_resize_layout(CeCommand_t* command, void* user_data){
     if(command->arg_count != 3) return CE_COMMAND_PRINT_HELP;
     if(command->args[0].type != CE_COMMAND_ARG_STRING) return CE_COMMAND_PRINT_HELP;
     if(command->args[1].type != CE_COMMAND_ARG_STRING) return CE_COMMAND_PRINT_HELP;
     if(command->args[2].type != CE_COMMAND_ARG_INTEGER) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;
     CeLayout_t* tab_layout = app->tab_list_layout->tab_list.current;
     CeLayout_t* current_layout = tab_layout->tab.current;
     bool expand = false;
     CeDirection_t direction;

     if(strcmp(command->args[0].string, "expand") == 0){
         expand = true;
     }else if(strcmp(command->args[0].string, "shrink") == 0){
          // pass
     }else{
          return CE_COMMAND_PRINT_HELP;
     }

     if(strcmp(command->args[1].string, "left") == 0){
          direction = CE_LEFT;
     }else if(strcmp(command->args[1].string, "right") == 0){
          direction = CE_RIGHT;
     }else if(strcmp(command->args[1].string, "up") == 0){
          direction = CE_UP;
     }else if(strcmp(command->args[1].string, "down") == 0){
          direction = CE_DOWN;
     }else{
          return CE_COMMAND_PRINT_HELP;
     }

     if(ce_layout_resize_rect(app->tab_list_layout, current_layout, app->terminal_rect, direction, expand, command->args[2].integer)){
          return CE_COMMAND_SUCCESS;
     }

     return CE_COMMAND_FAILURE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl $0x2, %r12d
cmpq $0x3, 0x208(%rdi)
jne 0x1707e
movq 0x200(%rdi), %r15
cmpl $0x2, (%r15)
jne 0x1707e
cmpl $0x2, 0x10(%r15)
jne 0x1707e
cmpl $0x0, 0x20(%r15)
jne 0x1707e
movq %rsi, %rbx
movq 0x2818(%rsi), %r14
movq 0x10(%r14), %rax
movq 0x10(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%r15), %r13
leaq 0x19327(%rip), %rsi     # 0x302e5
movq %r13, %rdi
callq 0xd390
movl %eax, %ebp
testl %eax, %eax
je 0x16fe3
leaq 0x19319(%rip), %rsi     # 0x302ec
movq %r13, %rdi
callq 0xd390
testl %eax, %eax
jne 0x1707e
movq 0x18(%r15), %r12
leaq 0x1a6f8(%rip), %rsi     # 0x316e6
movq %r12, %rdi
callq 0xd390
testl %eax, %eax
je 0x17040
leaq 0x1a6cb(%rip), %rsi     # 0x316cc
movq %r12, %rdi
callq 0xd390
testl %eax, %eax
je 0x17044
leaq 0x1a685(%rip), %rsi     # 0x31699
movq %r12, %rdi
callq 0xd390
testl %eax, %eax
je 0x1704b
leaq 0x1a68c(%rip), %rsi     # 0x316b3
movq %r12, %rdi
callq 0xd390
movl $0x2, %r12d
testl %eax, %eax
jne 0x1707e
movl $0x3, %edx
jmp 0x17050
xorl %edx, %edx
jmp 0x17050
movl $0x2, %edx
jmp 0x17050
movl $0x1, %edx
xorl %ecx, %ecx
testl %ebp, %ebp
sete %cl
movq 0x28(%r15), %r8
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r14, %rdi
movq 0x20(%rsp), %rsi
callq 0x1e2d4
xorb $0x1, %al
movzbl %al, %r12d
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_select_parent_layout
CeCommandStatus_t command_select_parent_layout(CeCommand_t* command, void* user_data){
     if(command->arg_count != 0) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;
     CeLayout_t* tab_layout = app->tab_list_layout->tab_list.current;

     CeLayout_t* layout = ce_layout_find_parent(tab_layout, tab_layout->tab.current);
     if(layout){
          tab_layout->tab.current = layout;
     }else{
          ce_app_message(app, "current layout has no parent");
     }

     return CE_COMMAND_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl $0x2, %ebp
cmpq $0x0, 0x208(%rdi)
jne 0x170dd
movq %rsi, %rbx
movq 0x2818(%rsi), %rax
movq 0x10(%rax), %r14
movq 0x10(%r14), %rsi
movq %r14, %rdi
callq 0x1dde1
testq %rax, %rax
je 0x170ca
movq %rax, 0x10(%r14)
xorl %ebp, %ebp
jmp 0x170dd
leaq 0x19222(%rip), %rsi     # 0x302f3
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0x12502
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_open_popup_view
CeCommandStatus_t command_open_popup_view(CeCommand_t* command, void* user_data){
     if(command->arg_count < 0 || command->arg_count > 1) return CE_COMMAND_PRINT_HELP;
     if(command->arg_count == 1 &&
        command->args[0].type != CE_COMMAND_ARG_STRING){
         return CE_COMMAND_PRINT_HELP;
     }
     CeApp_t* app = user_data;
     CeBuffer_t* buffer = app->shell_command_buffer;
     if(command->arg_count == 0){
         if(app->last_popup_buffer){
             buffer = app->last_popup_buffer;
         }
     }else{
         CeBufferNode_t* itr = app->buffer_node_head;
         while(itr){
              if(strcmp(itr->buffer->name, command->args[0].string) == 0){
                  buffer = itr->buffer;
                  break;
              }
              itr = itr->next;
         }
     }
     if(!ce_app_open_popup_view(app, buffer)) return CE_COMMAND_FAILURE;
     return CE_COMMAND_SUCCESS;
}

// Assembly:
movq 0x208(%rdi), %rcx
movl $0x2, %eax
cmpq $0x1, %rcx
ja 0x172fc
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
jne 0x17290
movq 0x200(%rdi), %rdx
cmpl $0x2, (%rdx)
jne 0x172f3
movq 0x2880(%rbx), %r12
testq %rcx, %rcx
je 0x172d2
movq 0x2828(%rbx), %r13
testq %r13, %r13
je 0x172e0
movq 0x200(%rdi), %rax
movq 0x8(%rax), %r14
movq (%r13), %r15
movq 0x10(%r15), %rdi
movq %r14, %rsi
callq 0xd390
testl %eax, %eax
je 0x172e3
movq 0x8(%r13), %r13
testq %r13, %r13
jne 0x172b3
jmp 0x172e0
movq 0x2dd0(%rbx), %rax
testq %rax, %rax
cmovneq %rax, %r12
movq %r12, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x13c89
xorb $0x1, %al
movzbl %al, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_create_file
CeCommandStatus_t command_create_file(CeCommand_t* command, void* user_data){
     if(command->arg_count < 0 || command->arg_count > 1) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;

     if(command->args[0].type != CE_COMMAND_ARG_STRING) return CE_COMMAND_PRINT_HELP;

     FILE* f = fopen(command->args[0].string, "w+");
     if(f == NULL){
         ce_app_message(app, "Failed to create file: %s", strerror(errno));
         return CE_COMMAND_FAILURE;
     }
     fclose(f);
     return CE_COMMAND_SUCCESS;
}

// Assembly:
movl $0x2, %eax
cmpq $0x1, 0x208(%rdi)
ja 0x17386
pushq %rbx
movq 0x200(%rdi), %rcx
cmpl $0x2, (%rcx)
jne 0x17385
movq %rsi, %rbx
movq 0x8(%rcx), %rdi
leaq 0x18fc6(%rip), %rsi     # 0x30310
callq 0xd5b0
testq %rax, %rax
je 0x17360
movq %rax, %rdi
callq 0xd1f0
xorl %eax, %eax
jmp 0x17385
callq 0xd0a0
movl (%rax), %edi
callq 0xd650
leaq 0x18fa0(%rip), %rsi     # 0x30313
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x12502
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_rename_file
CeCommandStatus_t command_rename_file(CeCommand_t* command, void* user_data){
     if(command->arg_count < 0 || command->arg_count != 2) return CE_COMMAND_PRINT_HELP;

     if(command->args[0].type != CE_COMMAND_ARG_STRING) return CE_COMMAND_PRINT_HELP;
     if(command->args[1].type != CE_COMMAND_ARG_STRING) return CE_COMMAND_PRINT_HELP;

     int rc = rename(command->args[0].string, command->args[1].string);
     if (rc != 0) {
         ce_log("rename() failed: %s\n", strerror(errno));
         return CE_COMMAND_FAILURE;
     }

     return CE_COMMAND_SUCCESS;
}

// Assembly:
movl $0x2, %eax
cmpq $0x2, 0x208(%rdi)
jne 0x173e4
pushq %rax
movq 0x200(%rdi), %rcx
cmpl $0x2, (%rcx)
jne 0x173e0
cmpl $0x2, 0x10(%rcx)
jne 0x173e0
movq 0x8(%rcx), %rdi
movq 0x18(%rcx), %rsi
callq 0xd5d0
testl %eax, %eax
je 0x173de
callq 0xd0a0
movl (%rax), %edi
callq 0xd650
leaq 0x18f60(%rip), %rdi     # 0x3032d
movq %rax, %rsi
xorl %eax, %eax
callq 0xd954
movl $0x1, %eax
jmp 0x173e0
xorl %eax, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_remove_file
CeCommandStatus_t command_remove_file(CeCommand_t* command, void* user_data){
     if(command->arg_count < 0 || command->arg_count > 1) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;

     if(command->args[0].type != CE_COMMAND_ARG_STRING) return CE_COMMAND_PRINT_HELP;

     int rc = remove(command->args[0].string);
     if(rc != 0){
         ce_app_message(app, "Failed to remove file: %s", strerror(errno));
         return CE_COMMAND_FAILURE;
     }
     return CE_COMMAND_SUCCESS;
}

// Assembly:
movl $0x2, %eax
cmpq $0x1, 0x208(%rdi)
ja 0x1743b
pushq %rbx
movq 0x200(%rdi), %rcx
cmpl $0x2, (%rcx)
jne 0x1743a
movq %rsi, %rbx
movq 0x8(%rcx), %rdi
callq 0xd0c0
testl %eax, %eax
je 0x17438
callq 0xd0a0
movl (%rax), %edi
callq 0xd650
leaq 0x18f1e(%rip), %rsi     # 0x30342
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x12502
movl $0x1, %eax
jmp 0x1743a
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_load_file
CeCommandStatus_t command_load_file(CeCommand_t* command, void* user_data){
     if(command->arg_count < 0 || command->arg_count > 1) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;
     CommandContext_t command_context = {};

     if(!get_command_context(app, &command_context)) return CE_COMMAND_NO_ACTION;

     if(command->arg_count == 1){
          if(command->args[0].type != CE_COMMAND_ARG_STRING) return CE_COMMAND_PRINT_HELP;
          if(!load_file_into_view(&app->buffer_node_head, command_context.view, &app->config_options, &app->vim,
                                  true, command->args[0].string)){
               ce_app_message(app, "failed to load file %s: '%s'", command->args[0].string, strerror(errno));
          }else{
               ce_clangd_file_open(&app->clangd, app->buffer_node_head->buffer);
          }
     }else{ // it's 0
          ce_app_input(app, "Load File", load_file_input_complete_func);

          char* base_directory = buffer_base_directory(command_context.view->buffer);
          complete_files(&app->input_complete, app->input_view.buffer->lines[0], base_directory);
          free(base_directory);
          build_complete_list(app->complete_list_buffer, &app->input_complete);
     }

     return CE_COMMAND_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x208(%rdi), %rax
movl $0x2, %ebp
cmpq $0x1, %rax
ja 0x17558
movq %rsi, %rbx
movq %rdi, %r14
movq 0x27f8(%rsi), %rcx
testq %rcx, %rcx
je 0x17470
xorl %r15d, %r15d
jmp 0x1748d
movq 0x2818(%rbx), %rdx
movq 0x10(%rdx), %rdx
movq 0x10(%rdx), %rdx
leaq 0x8(%rdx), %rsi
xorl %r15d, %r15d
cmpl $0x0, (%rdx)
cmoveq %rsi, %r15
movl $0x3, %ebp
testq %rcx, %rcx
jne 0x17558
cmpq $0x1, %rax
jne 0x174fe
movq 0x200(%r14), %rax
cmpl $0x2, (%rax)
movl $0x2, %ebp
jne 0x17558
leaq 0x2828(%rbx), %rdi
leaq 0x1a50(%rbx), %rdx
leaq 0x20(%rbx), %rcx
movq 0x8(%rax), %r9
movq %r15, %rsi
movl $0x1, %r8d
callq 0x118b2
testq %rax, %rax
je 0x17565
movq 0x2828(%rbx), %rax
addq $0x2cd0, %rbx           # imm = 0x2CD0
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x159ff
jmp 0x17556
leaq 0x18e74(%rip), %rsi     # 0x30379
leaq -0x33c8(%rip), %rdx     # 0x14144
movq %rbx, %rdi
callq 0x126ac
movq 0x40(%r15), %rdi
callq 0x11c40
movq %rax, %r14
leaq 0x28a0(%rbx), %r15
movq 0x2748(%rbx), %rax
movq (%rax), %rax
movq (%rax), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x11c61
movq %r14, %rdi
callq 0xd090
movq 0x2860(%rbx), %rdi
movq %r15, %rsi
callq 0x11e3a
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x200(%r14), %rax
movq 0x8(%rax), %r14
callq 0xd0a0
movl (%rax), %edi
callq 0xd650
leaq 0x18dd9(%rip), %rsi     # 0x3035c
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x12502
jmp 0x17558
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_load_discovered_file
CeCommandStatus_t command_load_discovered_file(CeCommand_t* command, void* user_data){
    CeApp_t* app = user_data;
    CommandContext_t command_context = {};

    if(!get_command_context(app, &command_context)) return CE_COMMAND_NO_ACTION;

    if(app->discovered_filepath_count <= 0) return CE_COMMAND_NO_ACTION;

    // setup input and completion
    ce_app_input(app, "Load Discovered File", load_project_file_input_complete_func);
    ce_complete_init(&app->input_complete, (const char**)(app->discovered_filepaths), NULL, app->discovered_filepath_count);
    build_complete_list(app->complete_list_buffer, &app->input_complete);

    return CE_COMMAND_SUCCESS;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl $0x3, %r14d
cmpq $0x0, 0x27f8(%rsi)
jne 0x17b77
movq %rsi, %rbx
cmpq $0x0, 0x2cb0(%rsi)
jle 0x17b77
leaq 0x1884f(%rip), %rsi     # 0x30386
leaq -0x3875(%rip), %rdx     # 0x142c9
movq %rbx, %rdi
callq 0x126ac
leaq 0x28a0(%rbx), %r15
movq 0x2cb0(%rbx), %rcx
movq 0x2cb8(%rbx), %rsi
xorl %r14d, %r14d
movq %r15, %rdi
xorl %edx, %edx
callq 0x19fd4
movq 0x2860(%rbx), %rdi
movq %r15, %rsi
callq 0x11e3a
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_new_tab
CeCommandStatus_t command_new_tab(CeCommand_t* command, void* user_data){
     if(command->arg_count != 0) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;

     CeLayout_t* new_tab_layout = ce_layout_tab_list_add(app->tab_list_layout);
     if(!new_tab_layout) return CE_COMMAND_NO_ACTION;
     app->tab_list_layout->tab_list.current = new_tab_layout;

     return CE_COMMAND_SUCCESS;
}

// Assembly:
movl $0x2, %eax
cmpq $0x0, 0x208(%rdi)
je 0x17b90
retq
pushq %rbx
movq %rsi, %rbx
movq 0x2818(%rsi), %rdi
callq 0x1d860
testq %rax, %rax
je 0x17bb4
movq 0x2818(%rbx), %rcx
movq %rax, 0x10(%rcx)
xorl %eax, %eax
jmp 0x17bb9
movl $0x3, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: select_tab_left
bool select_tab_left(CeApp_t* app){
     for(int64_t i = 0; i < app->tab_list_layout->tab_list.tab_count; i++){
          if(app->tab_list_layout->tab_list.current == app->tab_list_layout->tab_list.tabs[i]){
               if(i > 0){
                    app->tab_list_layout->tab_list.current = app->tab_list_layout->tab_list.tabs[i - 1];
                    return true;
               }else{
                    // wrap around
                    app->tab_list_layout->tab_list.current = app->tab_list_layout->tab_list.tabs[app->tab_list_layout->tab_list.tab_count - 1];
                    return true;
               }
               break;
          }
     }
     return false;
}

// Assembly:
movq 0x2818(%rdi), %rcx
movq 0x18(%rcx), %rdx
testq %rdx, %rdx
setg %al
jle 0x17c0f
movq 0x8(%rcx), %rsi
movq 0x10(%rcx), %r8
cmpq (%rsi), %r8
je 0x17bfd
leaq -0x1(%rdx), %rax
xorl %r9d, %r9d
cmpq %r9, %rax
je 0x17c10
leaq 0x1(%r9), %rdi
cmpq 0x8(%rsi,%r9,8), %r8
movq %rdi, %r9
jne 0x17be2
cmpq %rdx, %rdi
setl %al
jmp 0x17bff
xorl %edi, %edi
testq %rdi, %rdi
cmovneq %rdi, %rdx
movq -0x8(%rsi,%rdx,8), %rdx
movq %rdx, 0x10(%rcx)
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: select_tab_right
bool select_tab_right(CeApp_t* app){
     for(int64_t i = 0; i < app->tab_list_layout->tab_list.tab_count; i++){
          if(app->tab_list_layout->tab_list.current == app->tab_list_layout->tab_list.tabs[i]){
               if(i < (app->tab_list_layout->tab_list.tab_count - 1)){
                    app->tab_list_layout->tab_list.current = app->tab_list_layout->tab_list.tabs[i + 1];
                    return true;
               }else{
                    // wrap around
                    app->tab_list_layout->tab_list.current = app->tab_list_layout->tab_list.tabs[0];
                    return true;
               }
               break;
          }
     }
     return false;
}

// Assembly:
movq 0x2818(%rdi), %rcx
movq 0x18(%rcx), %rdx
testq %rdx, %rdx
setg %al
jle 0x17c6d
movq 0x8(%rcx), %rsi
movq 0x10(%rcx), %r8
cmpq (%rsi), %r8
je 0x17c55
leaq -0x1(%rdx), %rax
xorl %r9d, %r9d
cmpq %r9, %rax
je 0x17c6e
leaq 0x1(%r9), %rdi
cmpq 0x8(%rsi,%r9,8), %r8
movq %rdi, %r9
jne 0x17c3a
cmpq %rdx, %rdi
setl %al
jmp 0x17c57
xorl %edi, %edi
decq %rdx
cmpq %rdx, %rdi
leaq 0x8(%rsi,%rdi,8), %rdx
cmovgeq %rsi, %rdx
movq (%rdx), %rdx
movq %rdx, 0x10(%rcx)
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_select_adjacent_tab
CeCommandStatus_t command_select_adjacent_tab(CeCommand_t* command, void* user_data){
     if(command->arg_count != 1) return CE_COMMAND_PRINT_HELP;
     if(command->args[0].type != CE_COMMAND_ARG_STRING) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;

     if(strcmp(command->args[0].string, "left") == 0){
          if(app->tab_list_layout->tab_list.tab_count == 1){
               ce_app_message(app, "cannot select adjacent tab, there is only 1 tab");
               return CE_COMMAND_NO_ACTION;
          }

          if(select_tab_left(app)){
               app->message_mode = false;
               return CE_COMMAND_SUCCESS;
          }

          return CE_COMMAND_NO_ACTION;
     }else if(strcmp(command->args[0].string, "right") == 0){
          if(app->tab_list_layout->tab_list.tab_count == 1){
               ce_app_message(app, "cannot select adjacent tab, there is only 1 tab");
               return CE_COMMAND_NO_ACTION;
          }

          if(select_tab_right(app)){
               app->message_mode = false;
               return CE_COMMAND_SUCCESS;
          }

          return CE_COMMAND_NO_ACTION;
     }

     return CE_COMMAND_PRINT_HELP;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl $0x2, %ebp
cmpq $0x1, 0x208(%rdi)
jne 0x17d1d
movq 0x200(%rdi), %rax
cmpl $0x2, (%rax)
jne 0x17d1d
movq %rsi, %rbx
movq 0x8(%rax), %r14
leaq 0x19a40(%rip), %rsi     # 0x316e6
movq %r14, %rdi
callq 0xd390
testl %eax, %eax
je 0x17cdd
leaq 0x19a13(%rip), %rsi     # 0x316cc
movq %r14, %rdi
callq 0xd390
testl %eax, %eax
jne 0x17d1d
movq 0x2818(%rbx), %rax
cmpq $0x1, 0x18(%rax)
je 0x17ceb
movq %rbx, %rdi
callq 0x17c13
jmp 0x17d0b
movq 0x2818(%rbx), %rax
cmpq $0x1, 0x18(%rax)
jne 0x17d03
leaq 0x186a9(%rip), %rsi     # 0x3039b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x12502
movl $0x3, %ebp
jmp 0x17d1d
movq %rbx, %rdi
callq 0x17bbb
movl $0x3, %ebp
testb %al, %al
je 0x17d1d
movb $0x0, 0x2800(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_search
CeCommandStatus_t command_search(CeCommand_t* command, void* user_data){
     if(command->arg_count != 1) return CE_COMMAND_PRINT_HELP;
     if(command->args[0].type != CE_COMMAND_ARG_STRING) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;
     CommandContext_t command_context = {};

     if(!get_command_context(app, &command_context)) return CE_COMMAND_NO_ACTION;

     if(strcmp(command->args[0].string, "forward") == 0){
          ce_app_input(app, "Search", search_input_complete_func);
          app->vim.search_mode = CE_VIM_SEARCH_MODE_FORWARD;
          app->search_start = command_context.view->cursor;
     }else if(strcmp(command->args[0].string, "backward") == 0){
          ce_app_input(app, "Reverse Search", search_input_complete_func);
          app->vim.search_mode = CE_VIM_SEARCH_MODE_BACKWARD;
          app->search_start = command_context.view->cursor;
     }else{
          return CE_COMMAND_PRINT_HELP;
     }

     app->highlight_search = true;
     return CE_COMMAND_SUCCESS;
}

// Assembly:
movl $0x2, %eax
cmpq $0x1, 0x208(%rdi)
jne 0x17e05
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x200(%rdi), %rcx
cmpl $0x2, (%rcx)
jne 0x17dfb
movq %rsi, %rbx
movq 0x27f8(%rsi), %rdx
testq %rdx, %rdx
je 0x17d62
xorl %r15d, %r15d
jmp 0x17d7f
movq 0x2818(%rbx), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
leaq 0x8(%rax), %rsi
xorl %r15d, %r15d
cmpl $0x0, (%rax)
cmoveq %rsi, %r15
movl $0x3, %eax
testq %rdx, %rdx
jne 0x17dfb
movq 0x8(%rcx), %r14
leaq 0x19964(%rip), %rsi     # 0x316f8
movq %r14, %rdi
callq 0xd390
xorl %ebp, %ebp
testl %eax, %eax
je 0x17dca
leaq 0x19964(%rip), %rsi     # 0x3170d
movq %r14, %rdi
callq 0xd390
movl %eax, %ecx
movl $0x2, %eax
testl %ecx, %ecx
jne 0x17dfb
movl $0x1, %ebp
leaq 0x188a8(%rip), %rsi     # 0x30670
jmp 0x17dd1
leaq 0x188a7(%rip), %rsi     # 0x30678
leaq -0x3a0c(%rip), %rdx     # 0x143cc
movq %rbx, %rdi
callq 0x126ac
movl %ebp, 0x19fc(%rbx)
movups 0x30(%r15), %xmm0
movups %xmm0, 0x2c40(%rbx)
movb $0x1, 0x2c79(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_regex_search
CeCommandStatus_t command_regex_search(CeCommand_t* command, void* user_data){
     if(command->arg_count != 1) return CE_COMMAND_PRINT_HELP;
     if(command->args[0].type != CE_COMMAND_ARG_STRING) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;
     CommandContext_t command_context = {};

     if(!get_command_context(app, &command_context)) return CE_COMMAND_NO_ACTION;

     if(strcmp(command->args[0].string, "forward") == 0){
          ce_app_input(app, "Regex Search", search_input_complete_func);
          app->vim.search_mode = CE_VIM_SEARCH_MODE_REGEX_FORWARD;
          app->search_start = command_context.view->cursor;
     }else if(strcmp(command->args[0].string, "backward") == 0){
          ce_app_input(app, "Reverse Regex Search", search_input_complete_func);
          app->vim.search_mode = CE_VIM_SEARCH_MODE_REGEX_BACKWARD;
          app->search_start = command_context.view->cursor;
     }else{
          return CE_COMMAND_PRINT_HELP;
     }

     app->highlight_search = true;
     return CE_COMMAND_SUCCESS;
}

// Assembly:
movl $0x2, %eax
cmpq $0x1, 0x208(%rdi)
jne 0x17f38
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x200(%rdi), %rcx
cmpl $0x2, (%rcx)
jne 0x17f2e
movq %rsi, %rbx
movq 0x27f8(%rsi), %rdx
testq %rdx, %rdx
je 0x17e92
xorl %r15d, %r15d
jmp 0x17eaf
movq 0x2818(%rbx), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
leaq 0x8(%rax), %rsi
xorl %r15d, %r15d
cmpl $0x0, (%rax)
cmoveq %rsi, %r15
movl $0x3, %eax
testq %rdx, %rdx
jne 0x17f2e
movq 0x8(%rcx), %r14
leaq 0x19834(%rip), %rsi     # 0x316f8
movq %r14, %rdi
callq 0xd390
testl %eax, %eax
je 0x17ef8
leaq 0x19836(%rip), %rsi     # 0x3170d
movq %r14, %rdi
callq 0xd390
movl %eax, %ecx
movl $0x2, %eax
testl %ecx, %ecx
jne 0x17f2e
movl $0x3, %ebp
leaq 0x184d5(%rip), %rsi     # 0x303cb
jmp 0x17f04
movl $0x2, %ebp
leaq 0x184cf(%rip), %rsi     # 0x303d3
leaq -0x3b3f(%rip), %rdx     # 0x143cc
movq %rbx, %rdi
callq 0x126ac
movl %ebp, 0x19fc(%rbx)
movups 0x30(%r15), %xmm0
movups %xmm0, 0x2c40(%rbx)
movb $0x1, 0x2c79(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_command
CeCommandStatus_t command_command(CeCommand_t* command, void* user_data){
     if(command->arg_count != 0) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;
     CommandContext_t command_context = {};

     if(!get_command_context(app, &command_context)) return CE_COMMAND_NO_ACTION;

     if(command_context.view){
          ce_app_input(app, "Run Command", command_input_complete_func);
          ce_app_init_command_completion(app, &app->input_complete);
          build_complete_list(app->complete_list_buffer, &app->input_complete);
     }

     return CE_COMMAND_SUCCESS;
}

// Assembly:
movl $0x2, %eax
cmpq $0x0, 0x208(%rdi)
je 0x17f49
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpq $0x0, 0x27f8(%rsi)
je 0x17f63
movb $0x1, %cl
movl $0x3, %eax
jmp 0x17f7a
movq 0x2818(%rbx), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
cmpl $0x0, (%rax)
setne %cl
xorl %eax, %eax
testb %cl, %cl
jne 0x17fb7
leaq 0x1845b(%rip), %rsi     # 0x303e0
leaq -0x4029(%rip), %rdx     # 0x13f63
movq %rbx, %rdi
callq 0x126ac
leaq 0x28a0(%rbx), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x12437
movq 0x2860(%rbx), %rdi
movq %r14, %rsi
callq 0x11e3a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_switch_buffer
CeCommandStatus_t command_switch_buffer(CeCommand_t* command, void* user_data){
     if(command->arg_count != 0) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;
     CommandContext_t command_context = {};

     if(!get_command_context(app, &command_context)) return CE_COMMAND_NO_ACTION;

     ce_app_input(app, "Switch Buffer", switch_buffer_input_complete_func);

     int64_t buffer_count = 0;
     CeBufferNode_t* itr = app->buffer_node_head;
     while(itr){
          buffer_count++;
          itr = itr->next;
     }

     char** filenames = malloc(buffer_count * sizeof(*filenames));

     int64_t index = 0;
     itr = app->buffer_node_head;
     while(itr){
          filenames[index] = strdup(itr->buffer->name);
          index++;
          itr = itr->next;
     }

     ce_complete_init(&app->input_complete, (const char**)filenames, NULL, buffer_count);
     build_complete_list(app->complete_list_buffer, &app->input_complete);

     for(int64_t i = 0; i < buffer_count; i++){
          free(filenames[i]);
     }
     free(filenames);

     return CE_COMMAND_SUCCESS;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0x2, %r12d
cmpq $0x0, 0x208(%rdi)
jne 0x180a8
movq %rsi, %rbx
movl $0x3, %r12d
cmpq $0x0, 0x27f8(%rsi)
jne 0x180a8
leaq 0x183f2(%rip), %rsi     # 0x303ec
leaq -0x3a8e(%rip), %rdx     # 0x14573
movq %rbx, %rdi
callq 0x126ac
movq 0x2828(%rbx), %rax
xorl %r14d, %r14d
testq %rax, %rax
je 0x18021
incq %r14
movq 0x8(%rax), %rax
jmp 0x18013
leaq (,%r14,8), %rdi
callq 0xd4c0
movq %rax, %r15
movq 0x2828(%rbx), %r12
testq %r12, %r12
je 0x1805f
movq %r15, %r13
movq (%r12), %rax
movq 0x10(%rax), %rdi
callq 0xd640
movq %rax, (%r13)
movq 0x8(%r12), %r12
addq $0x8, %r13
testq %r12, %r12
jne 0x18040
leaq 0x28a0(%rbx), %r13
xorl %r12d, %r12d
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x19fd4
movq 0x2860(%rbx), %rdi
movq %r13, %rsi
callq 0x11e3a
testq %r14, %r14
je 0x180a0
xorl %ebx, %ebx
movq (%r15,%rbx,8), %rdi
callq 0xd090
incq %rbx
cmpq %rbx, %r14
jne 0x1808f
movq %r15, %rdi
callq 0xd090
movl %r12d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_goto_destination_in_line
CeCommandStatus_t command_goto_destination_in_line(CeCommand_t* command, void* user_data){
     if(command->arg_count != 0) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;
     CommandContext_t command_context = {};

     if(!get_command_context(app, &command_context)) return CE_COMMAND_NO_ACTION;

     if(command_context.view->buffer->line_count == 0) return CE_COMMAND_NO_ACTION;

     CeDestination_t destination = scan_line_for_destination(command_context.view->buffer->lines[command_context.view->cursor.y]);
     if(destination.point.x < 0 || destination.point.y < 0){
          ce_app_message(app, "failed to determine file destination at %s:%d", command_context.view->buffer->name, command_context.view->cursor.y);
          return CE_COMMAND_NO_ACTION;
     }

     CeAppBufferData_t* buffer_data = command_context.view->buffer->app_data;
     buffer_data->last_goto_destination = command_context.view->cursor.y;

     char* base_directory = buffer_base_directory(command_context.view->buffer);
     CeBuffer_t* buffer = load_destination_into_view(&app->buffer_node_head, command_context.view, &app->config_options, &app->vim,
                                                     true, base_directory, &destination);
     free(base_directory);
     if(!buffer) return CE_COMMAND_NO_ACTION;
     ce_clangd_file_open(&app->clangd, app->buffer_node_head->buffer);

     return CE_COMMAND_SUCCESS;
}

// Assembly:
movl $0x2, %eax
cmpq $0x0, 0x208(%rdi)
je 0x180d9
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rsi, %rbx
movq 0x27f8(%rsi), %rcx
testq %rcx, %rcx
je 0x180fb
xorl %r14d, %r14d
jmp 0x18118
movq 0x2818(%rbx), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
leaq 0x8(%rax), %rdx
xorl %r14d, %r14d
cmpl $0x0, (%rax)
cmoveq %rdx, %r14
movl $0x3, %eax
testq %rcx, %rcx
jne 0x181e8
movq 0x40(%r14), %rcx
cmpq $0x0, 0x8(%rcx)
je 0x181e8
movq 0x38(%r14), %rax
movq 0x40(%r14), %rcx
movq (%rcx), %rcx
movq (%rcx,%rax,8), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x11fee
cmpq $0x0, (%r15)
movq 0x38(%r14), %rcx
movq 0x40(%r14), %rdi
js 0x181ce
cmpq $0x0, 0x10(%rsp)
js 0x181ce
movq 0x58(%rdi), %rax
movq %rcx, 0x5f8(%rax)
callq 0x11c40
movq %rax, %r12
leaq 0x2828(%rbx), %rdi
leaq 0x1a50(%rbx), %rdx
leaq 0x20(%rbx), %rcx
movq %r15, (%rsp)
movq %r14, %rsi
movl $0x1, %r8d
movq %rax, %r9
callq 0x13bb9
movq %rax, %r14
movq %r12, %rdi
callq 0xd090
testq %r14, %r14
je 0x181e3
movq 0x2828(%rbx), %rax
addq $0x2cd0, %rbx           # imm = 0x2CD0
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x159ff
xorl %eax, %eax
jmp 0x181e8
movq 0x10(%rdi), %rdx
leaq 0x18221(%rip), %rsi     # 0x303fa
movq %rbx, %rdi
xorl %eax, %eax
callq 0x12502
movl $0x3, %eax
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_goto_prev_buffer_in_view
CeCommandStatus_t command_goto_prev_buffer_in_view(CeCommand_t* command, void* user_data){
     if(command->arg_count != 0) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;
     CommandContext_t command_context = {};

     if(!get_command_context(app, &command_context)) return CE_COMMAND_NO_ACTION;

     if(!ce_app_switch_to_prev_buffer_in_view(app, command_context.view, false)){
          return CE_COMMAND_NO_ACTION;
     }

     return CE_COMMAND_SUCCESS;
}

// Assembly:
movl $0x2, %eax
cmpq $0x0, 0x208(%rdi)
je 0x18642
retq
movq 0x27f8(%rsi), %rdx
testq %rdx, %rdx
je 0x18652
xorl %ecx, %ecx
jmp 0x1866e
movq 0x2818(%rsi), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
leaq 0x8(%rax), %rdi
xorl %ecx, %ecx
cmpl $0x0, (%rax)
cmoveq %rdi, %rcx
movl $0x3, %eax
testq %rdx, %rdx
jne 0x18641
pushq %rax
movq %rsi, %rdi
movq %rcx, %rsi
xorl %edx, %edx
callq 0x116e8
xorb $0x1, %al
movzbl %al, %eax
leal (%rax,%rax,2), %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_replace_all
CeCommandStatus_t command_replace_all(CeCommand_t* command, void* user_data){
     CeApp_t* app = user_data;
     CommandContext_t command_context = {};

     if(!get_command_context(app, &command_context)) return CE_COMMAND_NO_ACTION;

     if(command->arg_count == 1 && command->args[0].type == CE_COMMAND_ARG_STRING){
          int64_t index = ce_vim_register_index(CE_PATH_SEPARATOR);
          CeVimYank_t* yank = app->vim.yanks + index;
          if(yank->text){
               replace_all(command_context.view, &app->vim_visual_save, yank->text, command->args[0].string);
          }else{
               ce_app_message(app, "only 1 argument used for replace_all, but search yank register is empty");
               return CE_COMMAND_NO_ACTION;
          }
     }else if(command->arg_count == 2 && command->args[0].type == CE_COMMAND_ARG_STRING && command->args[1].type == CE_COMMAND_ARG_STRING){
          replace_all(command_context.view, &app->vim_visual_save, command->args[0].string, command->args[1].string);
     }else{
          return CE_COMMAND_PRINT_HELP;
     }

     return CE_COMMAND_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq 0x27f8(%rsi), %rax
testq %rax, %rax
je 0x186b2
xorl %r14d, %r14d
jmp 0x186cf
movq 0x2818(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq 0x10(%rcx), %rcx
leaq 0x8(%rcx), %rdx
xorl %r14d, %r14d
cmpl $0x0, (%rcx)
cmoveq %rdx, %r14
movl $0x3, %ebp
testq %rax, %rax
jne 0x18795
movq 0x208(%r15), %rax
cmpq $0x2, %rax
je 0x18743
cmpq $0x1, %rax
jne 0x18776
movq 0x200(%r15), %rcx
cmpl $0x2, (%rcx)
jne 0x1873d
movl $0x2f, %edi
callq 0x2517f
leaq (%rax,%rax,2), %rax
movq 0x1078(%rbx,%rax,8), %r12
testq %r12, %r12
je 0x1877d
addq $0x1a08, %rbx           # imm = 0x1A08
movq 0x200(%r15), %rax
movq 0x8(%rax), %rcx
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x187a0
jmp 0x1878e
cmpq $0x2, %rax
jne 0x18776
movq 0x200(%r15), %rax
cmpl $0x2, (%rax)
jne 0x18776
cmpl $0x2, 0x10(%rax)
movl $0x2, %ebp
jne 0x18795
addq $0x1a08, %rbx           # imm = 0x1A08
movq 0x8(%rax), %rdx
movq 0x18(%rax), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x187a0
jmp 0x18793
movl $0x2, %ebp
jmp 0x18795
leaq 0x17ca4(%rip), %rsi     # 0x30428
movq %rbx, %rdi
xorl %eax, %eax
callq 0x12502
testq %r12, %r12
je 0x18795
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: replace_all
void replace_all(CeView_t* view, CeVimVisualSave_t* vim_visual_save, const char* match, const char* replace){
     CePoint_t start;
     CePoint_t end;
     if(vim_visual_save->mode == CE_VIM_MODE_VISUAL){
          if(ce_point_after(view->cursor, vim_visual_save->visual_point)){
               start = vim_visual_save->visual_point;
               end = view->cursor;
          }else{
               start = view->cursor;
               end = vim_visual_save->visual_point;
          }
     }else if(vim_visual_save->mode == CE_VIM_MODE_VISUAL_LINE){
          if(ce_point_after(view->cursor, vim_visual_save->visual_point)){
               start = (CePoint_t){0, vim_visual_save->visual_point.y};
               end = (CePoint_t){ce_utf8_last_index(view->buffer->lines[view->cursor.y]), view->cursor.y};
          }else{
               start = (CePoint_t){0, view->cursor.y};
               end = (CePoint_t){ce_utf8_last_index(view->buffer->lines[vim_visual_save->visual_point.y]), vim_visual_save->visual_point.y};
          }
     }else{
          start = view->cursor;
          end = ce_buffer_end_point(view->buffer);
     }

     if(ce_point_after(end, start)){
          buffer_replace_all(view->buffer, view->cursor, match, replace, start, end, false);
     }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movl (%rsi), %eax
cmpl $0x3, %eax
je 0x187fa
leaq 0x30(%r15), %r13
cmpl $0x2, %eax
jne 0x18842
leaq 0x8(%r12), %rbp
movq 0x30(%r15), %rdi
movq 0x38(%r15), %rsi
movq 0x8(%r12), %rdx
movq 0x10(%r12), %rcx
callq 0xedfb
testb %al, %al
je 0x18861
movups (%rbp), %xmm0
movaps %xmm0, 0x30(%rsp)
movups (%r13), %xmm0
jmp 0x1886f
movq 0x30(%r15), %rdi
movq 0x38(%r15), %rsi
movq 0x8(%r12), %rdx
movq 0x10(%r12), %rcx
callq 0xedfb
testb %al, %al
je 0x18876
movq 0x10(%r12), %rax
movq $0x0, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq 0x38(%r15), %rax
movq 0x40(%r15), %rcx
movq (%rcx), %rcx
movq (%rcx,%rax,8), %rdi
callq 0xe97d
movq 0x38(%r15), %rcx
jmp 0x188a2
movups (%r13), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x40(%r15), %rdi
callq 0xda40
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
jmp 0x188ac
movups (%r13), %xmm0
movaps %xmm0, 0x30(%rsp)
movups (%rbp), %xmm0
movaps %xmm0, 0x20(%rsp)
jmp 0x188ac
movq 0x38(%r15), %rax
movq $0x0, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq 0x40(%r15), %rax
movq (%rax), %rax
movq 0x10(%r12), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xe97d
movq 0x10(%r12), %rcx
movq %rax, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rcx
callq 0xedfb
testb %al, %al
je 0x188f6
movq 0x40(%r15), %rdi
movq 0x30(%r15), %rsi
movq 0x38(%r15), %rdx
movaps 0x20(%rsp), %xmm0
movups %xmm0, 0x10(%rsp)
movaps 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rcx
movq %rbx, %r8
xorl %r9d, %r9d
callq 0x19635
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_reload_file
CeCommandStatus_t command_reload_file(CeCommand_t* command, void* user_data){
     if(command->arg_count != 0) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;
     CommandContext_t command_context = {};

     if(!get_command_context(app, &command_context)) return CE_COMMAND_NO_ACTION;

     bool file_backed = false;

#if defined(PLATFORM_WINDOWS)
     file_backed = (_access(command_context.view->buffer->name, 0) == 0);
#else
     file_backed = (access(command_context.view->buffer->name, F_OK) == 0);
#endif

     if(!file_backed){
          ce_app_message(app, "buffer '%s' is not file backed, unable to reload\n", command_context.view->buffer->name);
          return CE_COMMAND_NO_ACTION;
     }

     char* filename = strdup(command_context.view->buffer->name);
     CeAppBufferData_t* buffer_data = command_context.view->buffer->app_data;
     ce_buffer_free(command_context.view->buffer);
     command_context.view->buffer->app_data = buffer_data; // NOTE: not great that I need to save user data and reset it
     ce_buffer_load_file(command_context.view->buffer, filename);
     free(filename);

     return CE_COMMAND_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0x2, %ebp
cmpq $0x0, 0x208(%rdi)
jne 0x189ba
movq %rsi, %rbx
movq 0x27f8(%rsi), %rax
testq %rax, %rax
je 0x18934
xorl %r15d, %r15d
jmp 0x18951
movq 0x2818(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq 0x10(%rcx), %rcx
leaq 0x8(%rcx), %rdx
xorl %r15d, %r15d
cmpl $0x0, (%rcx)
cmoveq %rdx, %r15
movl $0x3, %ebp
testq %rax, %rax
jne 0x189ba
movq 0x40(%r15), %rax
movq 0x10(%rax), %rdi
xorl %esi, %esi
callq 0xd5a0
movq 0x40(%r15), %r14
movq 0x10(%r14), %rdx
testl %eax, %eax
je 0x18989
leaq 0x17af3(%rip), %rsi     # 0x30470
movq %rbx, %rdi
xorl %eax, %eax
callq 0x12502
jmp 0x189ba
movq %rdx, %rdi
callq 0xd640
movq %rax, %rbx
movq 0x58(%r14), %r12
movq %r14, %rdi
callq 0xdea7
movq 0x40(%r15), %rdi
movq %r12, 0x58(%rdi)
movq %rbx, %rsi
callq 0xdf5e
movq %rbx, %rdi
callq 0xd090
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_reload_config
CeCommandStatus_t command_reload_config(CeCommand_t* command, void* user_data){
     if(command->arg_count != 0) return CE_COMMAND_PRINT_HELP;
     CeApp_t* app = user_data;
#if defined(PLATFORM_WINDOWS)
     if(app->user_config.library_instance == NULL) return CE_COMMAND_NO_ACTION;
#else
     if(!app->user_config.handle) return CE_COMMAND_NO_ACTION;
#endif

     if(app->command_entries) free(app->command_entries);
     ce_app_init_default_commands(app);
     char* config_path = strdup(app->user_config.filepath);
     user_config_free(&app->user_config);
     if(user_config_init(&app->user_config, config_path)){
          app->user_config.init_func(app);
     }else{
          ce_app_message(app, "failed to reload config: '%s', see log for details", config_path);
          return CE_COMMAND_FAILURE;
     }
     free(config_path);
     return CE_COMMAND_SUCCESS;
}

// Assembly:
movl $0x2, %eax
cmpq $0x0, 0x208(%rdi)
je 0x189d5
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpq $0x0, 0x2c80(%rsi)
je 0x18a42
leaq 0x2c80(%rbx), %r15
movq 0x2830(%rbx), %rdi
testq %rdi, %rdi
je 0x189ff
callq 0xd090
movq %rbx, %rdi
callq 0x123e7
movq 0x2c88(%rbx), %rdi
callq 0xd640
movq %rax, %r14
movq %r15, %rdi
callq 0x12333
movq %r15, %rdi
movq %r14, %rsi
callq 0x12276
testb %al, %al
je 0x18a49
movq %rbx, %rdi
callq *0x2c90(%rbx)
movq %r14, %rdi
callq 0xd090
xorl %eax, %eax
jmp 0x18a62
movl $0x3, %eax
jmp 0x18a62
leaq 0x17a52(%rip), %rsi     # 0x304a2
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x12502
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_new_buffer
CeCommandStatus_t command_new_buffer(CeCommand_t* command, void* user_data){
     if(command->arg_count > 1) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;
     CommandContext_t command_context = {};

     if(!get_command_context(app, &command_context)) return CE_COMMAND_NO_ACTION;

     const char* buffer_name = "unnamed";
     if(command->arg_count == 1 && command->args[0].type == CE_COMMAND_ARG_STRING) buffer_name = command->args[0].string;

     CeBuffer_t* buffer = new_buffer();
     ce_buffer_alloc(buffer, 1, buffer_name);
     command_context.view->buffer = buffer;
     command_context.view->cursor = (CePoint_t){0, 0};
     ce_buffer_node_insert(&app->buffer_node_head, buffer);

     return CE_COMMAND_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x208(%rdi), %rax
movl $0x2, %ebp
cmpq $0x1, %rax
jg 0x18c9d
movq %rsi, %rbx
movq 0x27f8(%rsi), %rcx
testq %rcx, %rcx
je 0x18c1d
xorl %r12d, %r12d
jmp 0x18c3a
movq 0x2818(%rbx), %rdx
movq 0x10(%rdx), %rdx
movq 0x10(%rdx), %rdx
leaq 0x8(%rdx), %rsi
xorl %r12d, %r12d
cmpl $0x0, (%rdx)
cmoveq %rsi, %r12
movl $0x3, %ebp
testq %rcx, %rcx
jne 0x18c9d
leaq 0x178a0(%rip), %r14     # 0x304eb
cmpq $0x1, %rax
jne 0x18c61
movq 0x200(%rdi), %rax
cmpl $0x2, (%rax)
jne 0x18c61
movq 0x8(%rax), %r14
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x11baa
movq %rax, %r15
movl $0x1, %esi
movq %rax, %rdi
movq %r14, %rdx
callq 0xddf1
movq %r15, 0x40(%r12)
addq $0x2828, %rbx           # imm = 0x2828
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r12)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x10a44
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: command_rename_buffer
CeCommandStatus_t command_rename_buffer(CeCommand_t* command, void* user_data){
     if(command->arg_count != 1) return CE_COMMAND_PRINT_HELP;
     if(command->args[0].type != CE_COMMAND_ARG_STRING) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;
     CommandContext_t command_context = {};

     if(!get_command_context(app, &command_context)) return CE_COMMAND_NO_ACTION;

     free(command_context.view->buffer->name);
     command_context.view->buffer->name = strdup(command->args[0].string);
     if(command_context.view->buffer->status == CE_BUFFER_STATUS_NONE) command_context.view->buffer->status = CE_BUFFER_STATUS_MODIFIED;

     return CE_COMMAND_SUCCESS;
}

// Assembly:
movl $0x2, %eax
cmpq $0x1, 0x208(%rdi)
jne 0x18d41
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x200(%rdi), %rcx
cmpl $0x2, (%rcx)
jne 0x18d3a
movq 0x27f8(%rsi), %rcx
testq %rcx, %rcx
je 0x18cdf
xorl %r14d, %r14d
jmp 0x18cfc
movq 0x2818(%rsi), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
leaq 0x8(%rax), %rdx
xorl %r14d, %r14d
cmpl $0x0, (%rax)
cmoveq %rdx, %r14
movl $0x3, %eax
testq %rcx, %rcx
jne 0x18d3a
movq 0x40(%r14), %rax
movq 0x10(%rax), %rdi
callq 0xd090
movq 0x200(%rbx), %rax
movq 0x8(%rax), %rdi
callq 0xd640
movq 0x40(%r14), %rcx
movq %rax, 0x10(%rcx)
xorl %eax, %eax
cmpl $0x0, 0x18(%rcx)
jne 0x18d3a
movl $0x1, 0x18(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq