// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_commands.c
// Function: open_file_in_dir_recursively
static void open_file_in_dir_recursively(char* path, char* match, CeApp_t* app, CeView_t* view){
     CeListDirResult_t list_dir_result = ce_list_dir(path);

#if defined(PLATFORM_WINDOWS)
     int64_t path_len = strnlen(path, MAX_PATH_LEN);
     if(path_len > 0 && path_len < MAX_PATH_LEN){
         if(path[path_len - 1] == CE_CURRENT_DIR_SEARCH){
             path[path_len - 1] = '.';
         }
     }
#endif

     for(int64_t i = 0; i < list_dir_result.count; i++){
          if(list_dir_result.is_directories[i] &&
             strcmp(list_dir_result.filenames[i], ".") != 0 &&
             strcmp(list_dir_result.filenames[i], "..") != 0){
               char next_dir[MAX_PATH_LEN];
               snprintf(next_dir, MAX_PATH_LEN, "%s%c%s%c%c", path, CE_PATH_SEPARATOR, list_dir_result.filenames[i],
                        CE_PATH_SEPARATOR, CE_CURRENT_DIR_SEARCH);
               open_file_in_dir_recursively(next_dir, match, app, view);
          }else if(strcmp(list_dir_result.filenames[i], match) == 0){
               char full_path[MAX_PATH_LEN];
               snprintf(full_path, MAX_PATH_LEN, "%s%c%s", path, CE_PATH_SEPARATOR, list_dir_result.filenames[i]);
               if(load_file_into_view(&app->buffer_node_head, view, &app->config_options, &app->vim,
                                   true, full_path)){
                    ce_clangd_file_open(&app->clangd, app->buffer_node_head->buffer);
               }
          }
     }
     ce_free_list_dir_result(&list_dir_result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x458, %rsp            # imm = 0x458
movq %rcx, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq %rsi, %r15
movq %rdi, %r12
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x1090a
cmpq $0x0, (%r14)
jle 0x19fa2
movq 0x8(%rsp), %rax
leaq 0x2828(%rax), %rcx
movq %rcx, 0x30(%rsp)
leaq 0x1a50(%rax), %rcx
movq %rcx, 0x28(%rsp)
leaq 0x20(%rax), %rcx
movq %rcx, 0x20(%rsp)
addq $0x2cd0, %rax           # imm = 0x2CD0
movq %rax, 0x18(%rsp)
leaq 0x50(%rsp), %rbp
xorl %ebx, %ebx
movq 0x48(%rsp), %rax
cmpb $0x1, (%rax,%rbx)
jne 0x19f22
movq 0x40(%rsp), %r13
movq (%r13,%rbx,8), %r14
movq %r14, %rdi
leaq 0x164c1(%rip), %rsi     # 0x30384
callq 0xd390
testl %eax, %eax
je 0x19f22
movq %r14, %rdi
leaq 0x164ad(%rip), %rsi     # 0x30383
callq 0xd390
testl %eax, %eax
je 0x19f22
movq (%r13,%rbx,8), %r9
movl $0x400, %esi            # imm = 0x400
movq %rbp, %rdi
leaq 0x166eb(%rip), %rdx     # 0x305de
movq %r12, %rcx
movl $0x2f, %r8d
xorl %eax, %eax
pushq $0x2e
pushq $0x2f
callq 0xd260
addq $0x10, %rsp
movq %rbp, %rdi
movq %r15, %rsi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
callq 0x19e31
jmp 0x19f94
movq 0x40(%rsp), %r14
movq (%r14,%rbx,8), %rdi
movq %r15, %rsi
callq 0xd390
testl %eax, %eax
jne 0x19f94
movq (%r14,%rbx,8), %r9
movl $0x400, %esi            # imm = 0x400
movq %rbp, %rdi
leaq 0x14963(%rip), %rdx     # 0x2e8ad
movq %r12, %rcx
movl $0x2f, %r8d
xorl %eax, %eax
callq 0xd260
movq 0x30(%rsp), %r14
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rcx
movl $0x1, %r8d
movq %rbp, %r9
callq 0x118b2
testq %rax, %rax
je 0x19f94
movq (%r14), %rax
movq (%rax), %rsi
movq 0x18(%rsp), %rdi
callq 0x159ff
incq %rbx
cmpq 0x38(%rsp), %rbx
jl 0x19ea4
leaq 0x38(%rsp), %rdi
callq 0x109f7
addq $0x458, %rsp            # imm = 0x458
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq