// File: chrissimpkins[P]octopus/src/main.cpp
// Function: pathToDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
inline void pathToDir(string& directory_string, string& path_to_dir) {
	string dir1 = "./" + directory_string;              //in the directory
	string dir2 = "../" + directory_string;             //one level deep
	string dir3 = "../../" + directory_string;          //two levels deep
	string dir4 = "../../../" + directory_string;       //three levels deep
	string dir5 = "../../../../" + directory_string;    //four levels deep
	string dir6 = "../../../../../" + directory_string; //five levels deep
	// test for the correct path to the public directory from the pwd
	if (isDirPresent(dir1)) {
		path_to_dir = dir1;
	}
	else if (isDirPresent(dir2)) {
		path_to_dir = dir2;
	}
	else if (isDirPresent(dir3)) {
		path_to_dir = dir3;
	}
	else if (isDirPresent(dir4)) {
		path_to_dir = dir4;
	}
	else if (isDirPresent(dir5)) {
		path_to_dir = dir5;
	}
	else if (isDirPresent(dir6)) {
		path_to_dir = dir6;
	}
	else {
		path_to_dir = ".";
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdx
leaq 0x5f04(%rip), %rsi      # 0x13642
leaq -0x30(%rbp), %rdi
callq 0xca10
movq -0x8(%rbp), %rdx
leaq 0x5eef(%rip), %rsi      # 0x13641
leaq -0x50(%rbp), %rdi
callq 0xca10
jmp 0xd75d
movq -0x8(%rbp), %rdx
leaq 0x5ed6(%rip), %rsi      # 0x1363e
leaq -0x80(%rbp), %rdi
callq 0xca10
jmp 0xd773
movq -0x8(%rbp), %rdx
leaq 0x5ebd(%rip), %rsi      # 0x1363b
leaq -0xa0(%rbp), %rdi
callq 0xca10
jmp 0xd78c
movq -0x8(%rbp), %rdx
leaq 0x5ea1(%rip), %rsi      # 0x13638
leaq -0xc0(%rbp), %rdi
callq 0xca10
jmp 0xd7a5
movq -0x8(%rbp), %rdx
leaq 0x5e85(%rip), %rsi      # 0x13635
leaq -0xe0(%rbp), %rdi
callq 0xca10
jmp 0xd7be
leaq -0x30(%rbp), %rdi
callq 0xdf30
cmpl $0x0, %eax
je 0xd856
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3030
jmp 0xd7df
jmp 0xd927
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0xd999
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0xd990
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0xd987
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0xd97b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0xd96f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x31b0
jmp 0xd96f
leaq -0x50(%rbp), %rdi
callq 0xdf30
cmpl $0x0, %eax
je 0xd878
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x3030
jmp 0xd873
jmp 0xd925
leaq -0x80(%rbp), %rdi
callq 0xdf30
cmpl $0x0, %eax
je 0xd89a
movq -0x10(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x3030
jmp 0xd895
jmp 0xd923
leaq -0xa0(%rbp), %rdi
callq 0xdf30
cmpl $0x0, %eax
je 0xd8bf
movq -0x10(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x3030
jmp 0xd8bd
jmp 0xd921
leaq -0xc0(%rbp), %rdi
callq 0xdf30
cmpl $0x0, %eax
je 0xd8e4
movq -0x10(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x3030
jmp 0xd8e2
jmp 0xd91f
leaq -0xe0(%rbp), %rdi
callq 0xdf30
cmpl $0x0, %eax
je 0xd909
movq -0x10(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x3030
jmp 0xd907
jmp 0xd91d
movq -0x10(%rbp), %rdi
leaq 0x4d50(%rip), %rsi      # 0x12664
callq 0x3400
jmp 0xd91b
jmp 0xd91d
jmp 0xd91f
jmp 0xd921
jmp 0xd923
jmp 0xd925
jmp 0xd927
leaq -0xe0(%rbp), %rdi
callq 0x31b0
leaq -0xc0(%rbp), %rdi
callq 0x31b0
leaq -0xa0(%rbp), %rdi
callq 0x31b0
leaq -0x80(%rbp), %rdi
callq 0x31b0
leaq -0x50(%rbp), %rdi
callq 0x31b0
leaq -0x30(%rbp), %rdi
callq 0x31b0
addq $0xe0, %rsp
popq %rbp
retq
leaq -0xc0(%rbp), %rdi
callq 0x31b0
leaq -0xa0(%rbp), %rdi
callq 0x31b0
leaq -0x80(%rbp), %rdi
callq 0x31b0
leaq -0x50(%rbp), %rdi
callq 0x31b0
leaq -0x30(%rbp), %rdi
callq 0x31b0
movq -0x58(%rbp), %rdi
callq 0x3500
nopl (%rax,%rax)