// File: /workspace/github_cpp_makefile_star2_O1/girdhari9[P]TEXPLORER/cmd_functions.cpp
// Function: delete_dir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void delete_dir(string dir_path){
    flag++;
    if(flag > 100) return;
    struct dirent ** dir_namelist;
    int n = scandir(dir_path.c_str(),&dir_namelist,NULL, alphasort);
    while(n--){
        if(n < 2) break;
        if(dir_namelist[n]->d_type == 4){
            string new_dir_path = dir_path + "/" + dir_namelist[n]->d_name;
            // rmdir(new_dir_path.c_str()); //If it will not work then open it
            delete_dir(new_dir_path);
            rmdir(new_dir_path.c_str());
        }
        else{
            string file_name = dir_path + "/" + dir_namelist[n]->d_name;
            remove(file_name.c_str());
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl 0xc250(%rip), %eax      # 0x11814
leal 0x1(%rax), %ecx
movl %ecx, 0xc247(%rip)      # 0x11814
cmpl $0x63, %eax
jg 0x57ca
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0xb9e5(%rip), %rcx      # 0x10fc8
leaq 0x40(%rsp), %rsi
xorl %edx, %edx
callq 0x2040
cmpl $0x3, %eax
jl 0x57ca
leaq 0x30(%rsp), %rbp
leaq 0x10(%rsp), %r13
movl %eax, %r15d
incq %r15
leaq 0x20(%rsp), %r14
leaq 0x48(%rsp), %r12
movq 0x40(%rsp), %rax
movq -0x10(%rax,%r15,8), %rax
cmpb $0x4, 0x12(%rax)
jne 0x567f
movq %rbp, 0x20(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x2aec
movq %r14, %rdi
leaq 0x7acb(%rip), %rsi      # 0xd10e
callq 0x2450
movq 0x40(%rsp), %rax
movq -0x10(%rax,%r15,8), %rsi
addq $0x13, %rsi
movq %r14, %rdi
callq 0x2450
movq %r13, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x56e3
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x56eb
movq %rbp, 0x20(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x2aec
movq %r14, %rdi
leaq 0x7a6e(%rip), %rsi      # 0xd10e
callq 0x2450
movq 0x40(%rsp), %rax
movq -0x10(%rax,%r15,8), %rsi
addq $0x13, %rsi
movq %r14, %rdi
callq 0x2450
movq %r13, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5767
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x576f
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x571a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x2aec
movq %r12, %rdi
callq 0x55b0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x575c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2230
movq (%rsp), %rdi
callq 0x20e0
jmp 0x57a7
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x579e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2230
movq (%rsp), %rdi
callq 0x2420
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x57bd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
decq %r15
cmpq $0x3, %r15
jg 0x5612
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x57e4
jmp 0x57e4
movq %rax, %rbx
jmp 0x5817
jmp 0x57e4
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x582d
movq 0x30(%rsp), %rsi
jmp 0x5825
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x5817
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2230
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x582d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x2400