// File: 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
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, -0x1c0(%rbp)
movq %rsi, -0x1b8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl 0x107fd(%rip), %eax     # 0x188b4
addl $0x1, %eax
movl %eax, 0x107f4(%rip)     # 0x188b4
cmpl $0x64, 0x107ed(%rip)    # 0x188b4
jle 0x80ce
jmp 0x849c
movq -0x1c0(%rbp), %rdi
callq 0x3110
movq %rax, %rdi
leaq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movq 0xfedc(%rip), %rcx      # 0x17fc8
callq 0x3060
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x1c(%rbp)
cmpl $0x0, %eax
je 0x849c
cmpl $0x2, -0x1c(%rbp)
jge 0x8113
jmp 0x849c
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movzbl 0x12(%rax), %eax
cmpl $0x4, %eax
jne 0x82e5
movq -0x1c0(%rbp), %rsi
leaq 0x8fa7(%rip), %rdx      # 0x110e1
leaq -0x60(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
callq 0x5490
movq -0x1c8(%rbp), %rsi
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x13, %rdx
leaq -0x40(%rbp), %rdi
callq 0x5440
jmp 0x816c
leaq -0x60(%rbp), %rdi
callq 0x35c8
movq -0x1b8(%rbp), %rsi
leaq 0x8f5e(%rip), %rdx      # 0x110e1
leaq -0xb0(%rbp), %rdi
callq 0x5490
jmp 0x8191
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x13, %rdx
leaq -0x90(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x5440
jmp 0x81b6
leaq -0xb0(%rbp), %rdi
callq 0x35c8
leaq -0x90(%rbp), %rdi
callq 0x3110
movq %rax, %rdi
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x3160
leaq -0xd0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x3130
jmp 0x81ed
leaq -0xf0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3130
jmp 0x8202
leaq -0xd0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x8090
jmp 0x8217
leaq -0xf0(%rbp), %rdi
callq 0x35c8
leaq -0xd0(%rbp), %rdi
callq 0x35c8
leaq -0x90(%rbp), %rdi
callq 0x35c8
leaq -0x40(%rbp), %rdi
callq 0x35c8
jmp 0x8497
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x35c8
jmp 0x84a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x82d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x35c8
jmp 0x82d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x82cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x82bf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x35c8
leaq -0xd0(%rbp), %rdi
callq 0x35c8
leaq -0x90(%rbp), %rdi
callq 0x35c8
leaq -0x40(%rbp), %rdi
callq 0x35c8
jmp 0x84a5
movq -0x1c0(%rbp), %rsi
leaq 0x8dee(%rip), %rdx      # 0x110e1
leaq -0x130(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x5490
movq -0x1d0(%rbp), %rsi
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x13, %rdx
leaq -0x110(%rbp), %rdi
callq 0x5440
jmp 0x832b
leaq -0x130(%rbp), %rdi
callq 0x35c8
movq -0x1b8(%rbp), %rsi
leaq 0x8d9c(%rip), %rdx      # 0x110e1
leaq -0x170(%rbp), %rdi
callq 0x5490
jmp 0x8353
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x13, %rdx
leaq -0x150(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x5440
jmp 0x8378
leaq -0x170(%rbp), %rdi
callq 0x35c8
leaq -0x190(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x3130
jmp 0x8399
leaq -0x1b0(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x3130
jmp 0x83ae
leaq -0x190(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x7f50
jmp 0x83c3
leaq -0x1b0(%rbp), %rdi
callq 0x35c8
leaq -0x190(%rbp), %rdi
callq 0x35c8
leaq -0x150(%rbp), %rdi
callq 0x35c8
leaq -0x110(%rbp), %rdi
callq 0x35c8
jmp 0x8497
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x35c8
jmp 0x84a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x8489
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x35c8
jmp 0x8489
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x847d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x8471
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x35c8
leaq -0x190(%rbp), %rdi
callq 0x35c8
leaq -0x150(%rbp), %rdi
callq 0x35c8
leaq -0x110(%rbp), %rdi
callq 0x35c8
jmp 0x84a5
jmp 0x80f4
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x3530
nop