// File: /workspace/github_cpp_makefile_star2_O2/girdhari9[P]TEXPLORER/cmd_functions.cpp
// Function: copy_dir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void copy_dir(string dir_name, string dir_path){
    flag++;
    if(flag > 100) return;
    struct dirent ** dir_namelist;
    int n = scandir(dir_name.c_str(),&dir_namelist,NULL, alphasort);
        while(n--){
            if(n < 2) break;
            if(dir_namelist[n]->d_type == 4){
                string new_dir_name = dir_name + "/" + dir_namelist[n]->d_name;
                string new_dir_path = dir_path + "/" + dir_namelist[n]->d_name;
                mkdir(new_dir_path.c_str(), S_IRUSR|S_IWUSR|S_IXUSR);
                copy_dir(new_dir_name,new_dir_path);
            }
            else{
                string source_file_name = dir_name + "/" + dir_namelist[n]->d_name;
                string dest_file_name = dir_path + "/" + dir_namelist[n]->d_name;
                copy_file(source_file_name,dest_file_name);
            }
        }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, 0x10(%rsp)
movl 0xa230(%rip), %eax      # 0xe814
leal 0x1(%rax), %ecx
movl %ecx, 0xa227(%rip)      # 0xe814
cmpl $0x63, %eax
jle 0x4604
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, 0x8(%rsp)
movq (%rdi), %rdi
movq 0x99b5(%rip), %rcx      # 0xdfc8
movq %rsp, %rsi
xorl %edx, %edx
callq 0x2040
movl %eax, %ebx
leaq 0x4b18(%rip), %r15      # 0x913e
leaq 0x18(%rsp), %r13
leaq 0x78(%rsp), %r12
leaq 0x98(%rsp), %rbp
cmpl $0x3, %ebx
jl 0x45f2
movq (%rsp), %rax
movq -0x8(%rax,%rbx,8), %rax
cmpb $0x4, 0x12(%rax)
jne 0x4713
movq %r13, %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
callq 0x36d3
movq (%rsp), %rax
movq -0x8(%rax,%rbx,8), %rdx
addq $0x13, %rdx
leaq 0x38(%rsp), %rdi
movq %r13, %rsi
callq 0x36b4
movq %r13, %rdi
callq 0x2498
movq %r13, %r14
movq %r12, %r13
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq %r15, %rdx
callq 0x36d3
movq (%rsp), %rax
movq -0x8(%rax,%rbx,8), %rdx
addq $0x13, %rdx
movq %r14, %rdi
movq %r13, %rsi
callq 0x36b4
movq %r13, %rdi
callq 0x2498
movq 0x18(%rsp), %rdi
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x2110
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x2360
leaq 0xd8(%rsp), %r15
movq %r15, %rdi
leaq 0x18(%rsp), %r13
movq %r13, %rsi
callq 0x2360
leaq 0x58(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x45c8
movq %r15, %rdi
callq 0x2498
movq %r14, %rdi
callq 0x2498
jmp 0x47c0
movq %r13, %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
callq 0x36d3
movq (%rsp), %rax
movq -0x8(%rax,%rbx,8), %rdx
addq $0x13, %rdx
leaq 0x38(%rsp), %rdi
movq %r13, %rsi
callq 0x36b4
movq %r13, %rdi
callq 0x2498
movq %r13, %r14
movq %r12, %r13
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq %r15, %rdx
callq 0x36d3
movq (%rsp), %rax
movq -0x8(%rax,%rbx,8), %rdx
addq $0x13, %rdx
movq %r14, %rdi
movq %r13, %rsi
callq 0x36b4
leaq 0xb8(%rsp), %r15
movq %r13, %rdi
callq 0x2498
movq %r15, %rdi
leaq 0x38(%rsp), %rsi
callq 0x2360
movq %rbp, %r13
movq %rbp, %rdi
leaq 0x18(%rsp), %rsi
callq 0x2360
movq %r15, %rdi
movq %r13, %rsi
callq 0x44ec
movq %r13, %rdi
callq 0x2498
movq %r15, %rdi
callq 0x2498
leaq 0x18(%rsp), %r13
movq %r13, %rdi
callq 0x2498
leaq 0x38(%rsp), %rdi
callq 0x2498
decq %rbx
leaq 0x4962(%rip), %r15      # 0x913e
jmp 0x4638
jmp 0x47ea
jmp 0x47f4
movq %rax, %rbx
jmp 0x4817
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
jmp 0x4854
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
jmp 0x484a
movq %rax, %rbx
jmp 0x483b
jmp 0x4821
jmp 0x4826
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x2498
leaq 0xb8(%rsp), %rdi
jmp 0x4840
movq %rax, %rbx
jmp 0x484f
movq %rax, %rbx
jmp 0x4845
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x2498
leaq 0x58(%rsp), %rdi
callq 0x2498
leaq 0x18(%rsp), %rdi
callq 0x2498
leaq 0x38(%rsp), %rdi
callq 0x2498
movq %rbx, %rdi
callq 0x2420