// File: /workspace/github_cpp_makefile_star2_O1/chrissimpkins[P]octopus/src/io.cpp
// Function: IO::read_file[abi:cxx11]()
string& IO::read_file(){
	//if the path variable is assigned in constructor
	if (!path.empty()){
		try{
			ifstream infile(path);
			if (infile.good()){
				// define the input string from the calling function with the reference that was passed in
				ifstream& inr = infile;
				get_string(inr);
				string& isr = inputstring;
				infile.close();
				return isr;
			}
			else{
				throw runtime_error("Unable to open the input file " + path);
			}
		}
		catch(...){
			print_error("Unable to open the input file " + path);
		}
	}
	//otherwise use the ipath from constructor
	else if (!ipath.empty()) {
		try{
			ifstream infile(ipath);
			if (infile.good()){
				// define the input string from the calling function with the reference that was passed in
				ifstream& inr = infile;
				get_string(inr);
				string& isr = inputstring;
				infile.close();
				return isr;
			}
			else{
				throw runtime_error("Unable to open the input file " + path);
			}
		}
		catch (...){
			print_error("Unable to open the input file " + path);
		}
	}
	else{
		throw runtime_error("Missing a file path for the input file.");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0xe049
leaq 0x60(%rsp), %rdi
movq %rbx, %rsi
movl $0x8, %edx
callq 0x33a0
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x80(%rsp,%rax)
jne 0xe0b4
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
callq 0xe2d8
leaq 0x60(%rsp), %rdi
callq 0x3060
jmp 0xe095
cmpq $0x0, 0x28(%rbx)
je 0xe0fb
leaq 0x20(%rbx), %rsi
leaq 0x60(%rsp), %rdi
movl $0x8, %edx
callq 0x33a0
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x80(%rsp,%rax)
jne 0xe12d
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
callq 0xe2d8
leaq 0x60(%rsp), %rdi
callq 0x3060
leaq 0x60(%rsp), %rdi
callq 0x3070
addq $0x60, %rbx
movq %rbx, %rax
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x3140
movq %rax, %r14
leaq 0x26ba(%rip), %rsi      # 0x10782
movq %rsp, %rdi
movq %rbx, %rdx
callq 0xba25
movb $0x1, %bpl
movq %rsp, %rsi
movq %r14, %rdi
callq 0x33b0
xorl %ebp, %ebp
movq 0x5f06(%rip), %rsi      # 0x13ff0
movq 0x5ecf(%rip), %rdx      # 0x13fc0
movq %r14, %rdi
callq 0x33d0
jmp 0xe172
movl $0x10, %edi
callq 0x3140
movq %rax, %r14
leaq 0x2692(%rip), %rsi      # 0x107a1
movq %rax, %rdi
callq 0x30e0
movq 0x5ed2(%rip), %rsi      # 0x13ff0
movq 0x5e9b(%rip), %rdx      # 0x13fc0
movq %r14, %rdi
callq 0x33d0
movl $0x10, %edi
callq 0x3140
movq %rax, %r14
leaq 0x2641(%rip), %rsi      # 0x10782
movq %rsp, %rdi
movq %rbx, %rdx
callq 0xba25
movb $0x1, %bpl
movq %rsp, %rsi
movq %r14, %rdi
callq 0x33b0
xorl %ebp, %ebp
movq 0x5e8d(%rip), %rsi      # 0x13ff0
movq 0x5e56(%rip), %rdx      # 0x13fc0
movq %r14, %rdi
callq 0x33d0
movq %rax, %r15
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe198
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xe198
movq %rax, %r15
movb $0x1, %bpl
testb %bpl, %bpl
je 0xe1f1
movq %r14, %rdi
callq 0x3190
jmp 0xe1f1
movq %rax, %rbx
movq %r14, %rdi
callq 0x3190
jmp 0xe2c8
movq %rax, %r15
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe1dd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xe1dd
movq %rax, %r15
movb $0x1, %bpl
testb %bpl, %bpl
je 0xe232
movq %r14, %rdi
callq 0x3190
jmp 0xe232
jmp 0xe1ee
movq %rax, %r15
leaq 0x60(%rsp), %rdi
callq 0x3070
jmp 0xe200
movq %rax, %r15
movq %r15, %rdi
callq 0x30f0
leaq 0x2573(%rip), %rsi      # 0x10782
leaq 0x20(%rsp), %rdi
movq %rbx, %rdx
callq 0xba25
leaq 0x20(%rsp), %rdi
callq 0xb9e6
leaq 0x20(%rsp), %rdi
jmp 0xe26c
jmp 0xe22f
movq %rax, %r15
leaq 0x60(%rsp), %rdi
callq 0x3070
jmp 0xe241
movq %rax, %r15
movq %r15, %rdi
callq 0x30f0
leaq 0x2532(%rip), %rsi      # 0x10782
leaq 0x40(%rsp), %rdi
movq %rbx, %rdx
callq 0xba25
leaq 0x40(%rsp), %rdi
callq 0xb9e6
leaq 0x40(%rsp), %rdi
callq 0x3110
callq 0x33c0
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe299
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xe299
movq %rax, %rbx
callq 0x33c0
jmp 0xe2c8
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe2c3
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xe2c3
movq %rax, %rbx
callq 0x33c0
movq %rbx, %rdi
callq 0x33e0
movq %rax, %rdi
callq 0xda3d