// File: /workspace/github_cpp_makefile_star2_O1/chrissimpkins[P]octopus/src/io.cpp
// Function: IO::is_file_good()
bool IO::is_file_good() {
	//if the path variable is assigned in constructor
	if (!path.empty()){
		try{
			ifstream infile(path);
			if (infile.good()){
				infile.close();
				return true;
			}
			else{
				throw runtime_error("Unable to open the file " + path);
			}
		}
		catch(...){
			print_error("Unable to open the file '" + path + "'. Please confirm that it exists.");
			exit(EXIT_FAILURE);
		}
	}
	//otherwise use the ipath from constructor
	else if (!ipath.empty()) {
		try{
			ifstream infile(ipath);
			if (infile.good()){
				infile.close();
				return true;
			}
			else{
				throw runtime_error("Unable to open the file " + path);
			}
		}
		catch (...){
			print_error("Unable to open the file '" + ipath + "'. Please confirm that it exists.");
			exit(EXIT_FAILURE);
		}
	}
	else{
		throw runtime_error("Missing a file path for the file.");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0xdc74
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 0xdcd0
leaq 0x60(%rsp), %rdi
callq 0x3060
jmp 0xdcb6
cmpq $0x0, 0x28(%rbx)
je 0xdd17
leaq 0x20(%rbx), %r14
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x33a0
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x80(%rsp,%rax)
jne 0xdd49
leaq 0x60(%rsp), %rdi
callq 0x3060
leaq 0x60(%rsp), %rdi
callq 0x3070
movb $0x1, %al
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x3140
movq %rax, %r14
leaq 0x2a27(%rip), %rsi      # 0x1070b
movq %rsp, %rdi
movq %rbx, %rdx
callq 0xba25
movb $0x1, %bpl
movq %rsp, %rsi
movq %r14, %rdi
callq 0x33b0
xorl %ebp, %ebp
movq 0x62ea(%rip), %rsi      # 0x13ff0
movq 0x62b3(%rip), %rdx      # 0x13fc0
movq %r14, %rdi
callq 0x33d0
jmp 0xdd8e
movl $0x10, %edi
callq 0x3140
movq %rax, %r14
leaq 0x2a35(%rip), %rsi      # 0x10760
movq %rax, %rdi
callq 0x30e0
movq 0x62b6(%rip), %rsi      # 0x13ff0
movq 0x627f(%rip), %rdx      # 0x13fc0
movq %r14, %rdi
callq 0x33d0
movl $0x10, %edi
callq 0x3140
movq %rax, %r15
leaq 0x29ae(%rip), %rsi      # 0x1070b
movq %rsp, %rdi
movq %rbx, %rdx
callq 0xba25
movb $0x1, %bpl
movq %rsp, %rsi
movq %r15, %rdi
callq 0x33b0
xorl %ebp, %ebp
movq 0x6271(%rip), %rsi      # 0x13ff0
movq 0x623a(%rip), %rdx      # 0x13fc0
movq %r15, %rdi
callq 0x33d0
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xddb4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xddb4
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0xde12
movq %r15, %rdi
callq 0x3190
jmp 0xde12
movq %rax, %rbx
movq %r14, %rdi
callq 0x3190
jmp 0xdfe0
movq %rax, %r15
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xddf9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xddf9
movq %rax, %r15
movb $0x1, %bpl
testb %bpl, %bpl
je 0xdef3
movq %r14, %rdi
callq 0x3190
jmp 0xdef3
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x3070
jmp 0xde21
movq %rax, %rbx
movq %rbx, %rdi
callq 0x30f0
leaq 0x28f4(%rip), %rsi      # 0x10724
leaq 0x60(%rsp), %rdi
movq %r14, %rdx
callq 0xba25
leaq 0x28fa(%rip), %rsi      # 0x1073e
leaq 0x60(%rsp), %rdi
callq 0x3420
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0xde6f
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0xde7c
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0xb9e6
leaq 0x20(%rsp), %rdi
jmp 0xdf83
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0xdec6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xdec6
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdee6
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xdee6
movq %rax, %rbx
callq 0x33c0
jmp 0xdfe0
movq %rax, %r15
leaq 0x60(%rsp), %rdi
callq 0x3070
jmp 0xdf02
movq %rax, %r15
movq %r15, %rdi
callq 0x30f0
leaq 0x2813(%rip), %rsi      # 0x10724
leaq 0x60(%rsp), %rdi
movq %rbx, %rdx
callq 0xba25
leaq 0x2819(%rip), %rsi      # 0x1073e
leaq 0x60(%rsp), %rdi
callq 0x3420
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0xdf50
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0xdf5d
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
movq 0x8(%rax), %rdx
leaq 0x40(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0xb9e6
leaq 0x40(%rsp), %rdi
callq 0x3110
leaq 0x60(%rsp), %rdi
callq 0x3110
movl $0x1, %edi
callq 0x32e0
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0xdfbb
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xdfbb
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdfdb
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xdfdb
movq %rax, %rbx
callq 0x33c0
movq %rbx, %rdi
callq 0x33e0
movq %rax, %rdi
callq 0xda3d