// File: /workspace/github_cpp_makefile_star2_O1/Matan-Vinkler[P]Basic-File-System/myfs_main.cpp
// Function: recursive_print(MyFs&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
static void recursive_print(MyFs &myfs, std::string path, std::string prefix="") {
	MyFs::dir_list dlist = myfs.list_dir(path);
	for (size_t i=0; i < dlist.size(); i++) {
		MyFs::dir_list_entry &curr_entry = dlist[i];

		std::string entry_prefix = prefix;
		if (i == dlist.size()-1)
			entry_prefix += "└── ";
		else
			entry_prefix += "├── ";

		std::cout << entry_prefix << curr_entry.name << std::endl;

		if (curr_entry.is_dir) {
			std::string dir_prefix = prefix;

			if (i == dlist.size()-1)
				dir_prefix += "    ";
			else
				dir_prefix += "│   ";
			recursive_print(myfs, path + "/" + curr_entry.name, dir_prefix);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdx, -0x48(%rbp)
movq %rsi, %rax
movq %rdi, %r12
leaq -0x108(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rsi), %rsi
movq %rax, -0xf8(%rbp)
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x118(%rbp), %r15
movq %r15, %rdi
callq 0x39ec
leaq -0x40(%rbp), %rdi
movq %r12, -0xf0(%rbp)
movq %r12, %rsi
movq %r15, %rdx
callq 0x387e
movq -0x118(%rbp), %rdi
cmpq %r14, %rdi
je 0x5127
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x40(%rbp), %r14
cmpq %r14, -0x38(%rbp)
je 0x5401
xorl %r13d, %r13d
leaq -0xc8(%rbp), %r15
xorl %r12d, %r12d
leaq -0xb8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x48(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x39ec
movq -0x38(%rbp), %rax
subq -0x40(%rbp), %rax
sarq $0x3, %rax
movabsq $-0x71c71c71c71c71c7, %rcx # imm = 0x8E38E38E38E38E39
imulq %rcx, %rax
decq %rax
cmpq %rax, %r12
leaq 0x116d(%rip), %rsi      # 0x62fa
leaq 0x115b(%rip), %rax      # 0x62ef
cmoveq %rax, %rsi
movq %r15, %rbx
movq %r15, %rdi
callq 0x2350
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
movq 0x3e08(%rip), %rdi      # 0x8fc0
callq 0x2240
movq (%r14,%r13), %rsi
movq 0x8(%r14,%r13), %rdx
movq %rax, %rdi
callq 0x2240
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
cmpb $0x1, 0x20(%r14,%r13)
jne 0x53af
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x48(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %r15
movq %r15, %rdi
callq 0x39ec
movq -0x38(%rbp), %rax
subq -0x40(%rbp), %rax
sarq $0x3, %rax
movabsq $-0x71c71c71c71c71c7, %rcx # imm = 0x8E38E38E38E38E39
imulq %rcx, %rax
decq %rax
cmpq %rax, %r12
leaq 0x10b4(%rip), %rsi      # 0x630a
leaq 0x10a8(%rip), %rax      # 0x6305
cmoveq %rax, %rsi
movq %r15, %rdi
callq 0x2350
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0xf8(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %r15
movq %r15, %rdi
callq 0x39ec
movq %r15, %rdi
leaq 0xfdb(%rip), %rsi       # 0x6273
callq 0x2350
movq (%r14,%r13), %rsi
movq 0x8(%r14,%r13), %rdx
movq %r15, %rdi
callq 0x2080
leaq -0x78(%rbp), %r14
movq %r14, -0x88(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq -0xe8(%rbp), %r15
je 0x52df
movq %rdx, -0x88(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x78(%rbp)
jmp 0x52e6
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, -0x80(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0xd8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x39ec
movq -0xf0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movq %r15, %rdx
callq 0x50ad
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x535c
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x88(%rbp), %rdi
cmpq %r14, %rdi
je 0x5374
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x538d
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x53af
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x53d1
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2220
incq %r12
movq -0x40(%rbp), %r14
movq -0x38(%rbp), %rax
subq %r14, %rax
sarq $0x3, %rax
movabsq $-0x71c71c71c71c71c7, %rcx # imm = 0x8E38E38E38E38E39
imulq %rcx, %rax
addq $0x48, %r13
cmpq %rax, %r12
movq %rbx, %r15
jb 0x5142
leaq -0x40(%rbp), %rdi
callq 0x3930
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x118(%rbp), %rdi
cmpq %r14, %rdi
je 0x550c
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x550c
jmp 0x5451
jmp 0x5456
movq %rax, %rbx
jmp 0x5480
jmp 0x54de
movq %rax, %rbx
jmp 0x54b5
movq %rax, %rbx
jmp 0x549c
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x5480
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x549c
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x54b5
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x54e1
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x54e1
movq %rax, %rbx
jmp 0x5503
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x5503
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2220
leaq -0x40(%rbp), %rdi
callq 0x3930
movq %rbx, %rdi
callq 0x22f0