// File: /workspace/github_cpp_makefile_star2_O3/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 0x3988
leaq -0x40(%rbp), %rdi
movq %r12, -0xf0(%rbp)
movq %r12, %rsi
movq %r15, %rdx
callq 0x380c
movq -0x118(%rbp), %rdi
cmpq %r14, %rdi
je 0x50a9
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x40(%rbp), %r14
cmpq %r14, -0x38(%rbp)
je 0x5383
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 0x3988
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 0x11eb(%rip), %rsi      # 0x62fa
leaq 0x11d9(%rip), %rax      # 0x62ef
cmoveq %rax, %rsi
movq %r15, %rbx
movq %r15, %rdi
callq 0x2350
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
movq 0x3e86(%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 0x5331
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 0x3988
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 0x1132(%rip), %rsi      # 0x630a
leaq 0x1126(%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 0x3988
movq %r15, %rdi
leaq 0x1059(%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 0x5261
movq %rdx, -0x88(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x78(%rbp)
jmp 0x5268
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 0x3988
movq -0xf0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movq %r15, %rdx
callq 0x502f
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x52de
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x88(%rbp), %rdi
cmpq %r14, %rdi
je 0x52f6
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x530f
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x5331
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x5353
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 0x50c4
leaq -0x40(%rbp), %rdi
callq 0x38cc
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 0x548e
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x548e
jmp 0x53d3
jmp 0x53d8
movq %rax, %rbx
jmp 0x5402
jmp 0x5460
movq %rax, %rbx
jmp 0x5437
movq %rax, %rbx
jmp 0x541e
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x5402
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x541e
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x5437
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x5463
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x5463
movq %rax, %rbx
jmp 0x5485
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x5485
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2220
leaq -0x40(%rbp), %rdi
callq 0x38cc
movq %rbx, %rdi
callq 0x22f0