// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x3f84(%rip), %rsi      # 0x10642
leaq 0xa8(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rdx
callq 0xbab1
leaq 0x3f69(%rip), %rsi      # 0x10641
leaq 0x88(%rsp), %r14
movq %r14, %rdi
movq %r15, %rdx
callq 0xbab1
leaq 0x3f4c(%rip), %rsi      # 0x1063e
leaq 0x68(%rsp), %r13
movq %r13, %rdi
movq %r15, %rdx
callq 0xbab1
leaq 0x3f32(%rip), %rsi      # 0x1063b
leaq 0x48(%rsp), %r12
movq %r12, %rdi
movq %r15, %rdx
callq 0xbab1
leaq 0x3f18(%rip), %rsi      # 0x10638
leaq 0x28(%rsp), %rdi
movq %r15, %rdx
callq 0xbab1
leaq 0x3f01(%rip), %rsi      # 0x10635
leaq 0x8(%rsp), %rdi
movq %r15, %rdx
callq 0xbab1
movq 0xa8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x3230
testl %eax, %eax
jne 0xc771
movl $0xf000, %eax           # imm = 0xF000
andl 0xe0(%rsp), %eax
cmpl $0x4000, %eax           # imm = 0x4000
je 0xc862
movq 0x88(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x3230
testl %eax, %eax
jne 0xc7a5
movl $0xf000, %eax           # imm = 0xF000
andl 0xe0(%rsp), %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0xc7a5
movq %r14, %rbp
jmp 0xc862
movq 0x68(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x3230
testl %eax, %eax
jne 0xc7d6
movl $0xf000, %eax           # imm = 0xF000
andl 0xe0(%rsp), %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0xc7d6
movq %r13, %rbp
jmp 0xc862
movq 0x48(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x3230
testl %eax, %eax
jne 0xc804
movl $0xf000, %eax           # imm = 0xF000
andl 0xe0(%rsp), %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0xc804
movq %r12, %rbp
jmp 0xc862
movq 0x28(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x3230
testl %eax, %eax
jne 0xc834
movl $0xf000, %eax           # imm = 0xF000
andl 0xe0(%rsp), %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0xc834
leaq 0x28(%rsp), %rbp
jmp 0xc862
movq 0x8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x3230
testl %eax, %eax
jne 0xc86f
movl $0xf000, %eax           # imm = 0xF000
andl 0xe0(%rsp), %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0xc86f
leaq 0x8(%rsp), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x3160
jmp 0xc87e
leaq 0x2dee(%rip), %rsi      # 0xf664
movq %rbx, %rdi
callq 0x3300
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc899
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3270
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc8b4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3270
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc8cf
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3270
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc8ea
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3270
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc90b
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3270
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc92c
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3270
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc961
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xc961
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc981
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xc981
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc9a1
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xc9a1
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc9c1
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xc9c1
movq %rax, %rbx
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc9e7
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xc9e7
movq %rax, %rbx
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xca08
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3270
movq %rbx, %rdi
callq 0x33e0