// File: /workspace/github_cpp_makefile_star2_O1/danish241194[P]Linux-Terminal-Based-File-Explorer/start_page.cpp
// Function: copy_directory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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_directory(string dirname,string dir2,string foldername){

	infinite_loop++;
	if(infinite_loop>100){
	return;		
	}
	
	struct dirent ** list;
	int nn=scandir(dirname.c_str(),&list,NULL,alphasort);
	dir2 = dir2+"/"+foldername;	
	int status = mkdir(dir2.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
	struct stat perm;
	stat(dirname.c_str(),&perm);
	chown(dir2.c_str(),perm.st_uid,perm.st_gid);
	chmod(dir2.c_str(),perm.st_mode);
	for(int i = 2;i<nn;i++){
		if((int)list[i]->d_type==4){
			copy_directory(dirname+"/"+list[i]->d_name,dir2,list[i]->d_name);		
		}
		else if((int)list[i]->d_type==8){
			copy_file(dirname+"/"+list[i]->d_name,dir2+"/"+list[i]->d_name);
			struct stat perm;
			stat((dirname+"/"+list[i]->d_name).c_str(),&perm);
			chown((dir2+"/"+list[i]->d_name).c_str(),perm.st_uid,perm.st_gid);
			chmod((dir2+"/"+list[i]->d_name).c_str(),perm.st_mode);
		}
	}
		
	 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movl 0xfa85(%rip), %eax      # 0x1561c
leal 0x1(%rax), %ecx
movl %ecx, 0xfa7c(%rip)      # 0x1561c
cmpl $0x63, %eax
jg 0x6320
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
movq 0xf404(%rip), %rcx      # 0x14fc0
leaq 0x48(%rsp), %rsi
xorl %edx, %edx
callq 0x3080
movl %eax, %ebp
leaq 0x108(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0xf8(%rsp), %r12
movq %r12, %rdi
callq 0xfda0
leaq 0xb4a2(%rip), %rsi      # 0x11099
movq %r12, %rdi
callq 0x3480
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0xf8(%rsp), %rdi
callq 0x30d0
leaq 0x198(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5c44
movq %rdx, 0x188(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x198(%rsp)
jmp 0x5c4c
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x188(%rsp), %r15
movq %rdx, 0x8(%r15)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3320
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x5c8e
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0xf8(%rsp), %rdi
cmpq %r13, %rdi
je 0x5cab
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x3260
movq (%rbx), %rdi
movl $0x1fd, %esi            # imm = 0x1FD
callq 0x3120
movq %r14, 0x50(%rsp)
movq (%r14), %rdi
leaq 0x188(%rsp), %r15
movq %r15, %rsi
callq 0x3200
movq (%rbx), %rdi
movl 0x1c(%r15), %esi
movl 0x20(%r15), %edx
callq 0x3180
movq (%rbx), %rdi
movl 0x18(%r15), %esi
callq 0x3210
cmpl $0x3, %ebp
jl 0x6320
movl %ebp, %eax
leaq -0x10(,%rax,8), %r14
xorl %r15d, %r15d
leaq 0xf8(%rsp), %rbp
movq 0x48(%rsp), %rax
movq 0x10(%rax,%r15), %rax
movzbl 0x12(%rax), %eax
cmpl $0x8, %eax
je 0x5da3
cmpl $0x4, %eax
jne 0x6313
movq %r13, 0xf8(%rsp)
movq 0x50(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0xfda0
movq %rbp, %rdi
leaq 0xb346(%rip), %rsi      # 0x11099
callq 0x3480
movq 0x48(%rsp), %rax
movq 0x10(%rax,%r15), %rsi
addq $0x13, %rsi
movq %rbp, %rdi
callq 0x3480
leaq 0x88(%rsp), %rsi
movq %rsi, 0x78(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5e2b
movq %rdx, 0x78(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x88(%rsp)
jmp 0x5e31
movq %r13, 0xf8(%rsp)
movq 0x50(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0xfda0
movq %rbp, %rdi
leaq 0xb2cd(%rip), %rsi      # 0x11099
callq 0x3480
movq %rbp, %rdi
leaq 0xe8(%rsp), %rbp
movq %r13, %r12
movq 0x48(%rsp), %rax
movq 0x10(%rax,%r15), %rsi
addq $0x13, %rsi
callq 0x3480
leaq 0x68(%rsp), %rdi
movq %rdi, 0x58(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0x38(%rsp), %rsi
leaq 0x28(%rsp), %r13
je 0x5f5c
movq %rdx, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
jmp 0x5f62
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x80(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xa8(%rsp), %rax
movq %rax, 0x98(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x98(%rsp), %rdi
callq 0xfda0
movq 0x48(%rsp), %rax
movq 0x10(%rax,%r15), %r12
leaq 0x13(%r12), %r13
leaq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq %r13, %rdi
callq 0x3110
leaq (%r12,%rax), %rdx
addq $0x13, %rdx
leaq 0xb8(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0xffc4
leaq 0x78(%rsp), %rdi
leaq 0x98(%rsp), %rsi
movq %r12, %rdx
leaq 0x108(%rsp), %r13
callq 0x5b80
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x5ef7
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x5f1c
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x5f3e
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0xf8(%rsp), %rdi
cmpq %r13, %rdi
je 0x6313
movq 0x108(%rsp), %rsi
jmp 0x630b
movups (%rcx), %xmm0
movups %xmm0, (%rdi)
movq 0x8(%rax), %rdx
movq %rdx, 0x60(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rsi, 0x28(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0xfda0
movq %r13, %rdi
leaq 0xb0fe(%rip), %rsi      # 0x11099
callq 0x3480
movq 0x48(%rsp), %rax
movq 0x10(%rax,%r15), %rsi
addq $0x13, %rsi
movq %r13, %rdi
callq 0x3480
movq %rbp, 0xd8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %r12, %r13
je 0x5fe5
movq %rdx, 0xd8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xe8(%rsp)
jmp 0x5fec
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0xe0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x58(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x645f
movq 0xd8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6036
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
leaq 0x8(%rsp), %r12
leaq 0x68(%rsp), %rbp
je 0x605c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x58(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6073
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0xf8(%rsp), %rdi
cmpq %r13, %rdi
je 0x6090
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x3260
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0xfda0
movq %r12, %rdi
leaq 0xafde(%rip), %rsi      # 0x11099
callq 0x3480
movq 0x48(%rsp), %rax
movq 0x10(%rax,%r15), %rsi
addq $0x13, %rsi
movq %r12, %rdi
callq 0x3480
leaq 0x38(%rsp), %rbp
movq %rbp, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x60fe
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x6105
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x28(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x3200
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6146
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
leaq 0x8(%rsp), %r12
je 0x6167
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3260
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0xfda0
movq %r12, %rdi
leaq 0xaf0c(%rip), %rsi      # 0x11099
callq 0x3480
movq 0x48(%rsp), %rax
movq 0x10(%rax,%r15), %rsi
addq $0x13, %rsi
movq %r12, %rdi
callq 0x3480
leaq 0x38(%rsp), %rbp
movq %rbp, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x61d0
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x61d7
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x28(%rsp), %rdi
movl 0x114(%rsp), %esi
movl 0x118(%rsp), %edx
callq 0x3180
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x621e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
leaq 0x8(%rsp), %r12
je 0x623f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3260
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0xfda0
movq %r12, %rdi
leaq 0xae34(%rip), %rsi      # 0x11099
callq 0x3480
movq 0x48(%rsp), %rax
movq 0x10(%rax,%r15), %rsi
addq $0x13, %rsi
movq %r12, %rdi
callq 0x3480
leaq 0x38(%rsp), %rbp
movq %rbp, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x62a8
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x62af
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x28(%rsp), %rdi
movl 0x110(%rsp), %esi
callq 0x3210
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x62ef
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
leaq 0xf8(%rsp), %rbp
je 0x6313
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3260
addq $0x8, %r15
cmpq %r15, %r14
jne 0x5d0a
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x63e5
jmp 0x63e5
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x6370
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0x6370
jmp 0x63cc
jmp 0x63f7
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x63a1
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0x63a1
jmp 0x63cc
movq %rax, %rbx
jmp 0x6416
movq %rax, %rbx
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x6432
movq 0x88(%rsp), %rsi
jmp 0x642a
jmp 0x63cc
jmp 0x63c3
jmp 0x63cc
movq %rax, %rbx
jmp 0x6432
jmp 0x63cc
jmp 0x63e5
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6457
movq 0x18(%rsp), %rsi
jmp 0x644f
movq %rax, %rbx
movq 0xf8(%rsp), %rdi
cmpq %r13, %rdi
jne 0x6447
jmp 0x6457
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x6416
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x6432
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x6457
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x3260
movq %rbx, %rdi
callq 0x3450