// File: /workspace/github_cpp_makefile_star2_O3/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 0xc1f0(%rip), %eax      # 0x11814
leal 0x1(%rax), %ecx
movl %ecx, 0xc1e7(%rip)      # 0x11814
cmpl $0x63, %eax
jg 0x582a
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0xb985(%rip), %rcx      # 0x10fc8
leaq 0x40(%rsp), %rsi
xorl %edx, %edx
callq 0x2040
cmpl $0x3, %eax
jl 0x582a
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 0x56df
movq %rbp, 0x20(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x2aec
movq %r14, %rdi
leaq 0x7a9b(%rip), %rsi      # 0xd13e
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 0x5743
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x574b
movq %rbp, 0x20(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x2aec
movq %r14, %rdi
leaq 0x7a3e(%rip), %rsi      # 0xd13e
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 0x57c7
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x57cf
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 0x577a
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 0x5610
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x57bc
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2230
movq (%rsp), %rdi
callq 0x20e0
jmp 0x5807
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 0x57fe
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2230
movq (%rsp), %rdi
callq 0x2420
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x581d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
decq %r15
cmpq $0x3, %r15
ja 0x5672
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5844
jmp 0x5844
movq %rax, %rbx
jmp 0x5877
jmp 0x5844
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x588d
movq 0x30(%rsp), %rsi
jmp 0x5885
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x5877
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2230
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x588d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x2400