// File: /workspace/github_cpp_makefile_star2_O3/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 0xdcb8
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 0xdd14
leaq 0x60(%rsp), %rdi
callq 0x3060
jmp 0xdcfa
cmpq $0x0, 0x28(%rbx)
je 0xdd5b
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 0xdd8d
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 0x29e3(%rip), %rsi      # 0x1070b
movq %rsp, %rdi
movq %rbx, %rdx
callq 0xbab1
movb $0x1, %bpl
movq %rsp, %rsi
movq %r14, %rdi
callq 0x33b0
xorl %ebp, %ebp
movq 0x62a6(%rip), %rsi      # 0x13ff0
movq 0x626f(%rip), %rdx      # 0x13fc0
movq %r14, %rdi
callq 0x33d0
jmp 0xddd2
movl $0x10, %edi
callq 0x3140
movq %rax, %r14
leaq 0x29f1(%rip), %rsi      # 0x10760
movq %rax, %rdi
callq 0x30e0
movq 0x6272(%rip), %rsi      # 0x13ff0
movq 0x623b(%rip), %rdx      # 0x13fc0
movq %r14, %rdi
callq 0x33d0
movl $0x10, %edi
callq 0x3140
movq %rax, %r15
leaq 0x296a(%rip), %rsi      # 0x1070b
movq %rsp, %rdi
movq %rbx, %rdx
callq 0xbab1
movb $0x1, %bpl
movq %rsp, %rsi
movq %r15, %rdi
callq 0x33b0
xorl %ebp, %ebp
movq 0x622d(%rip), %rsi      # 0x13ff0
movq 0x61f6(%rip), %rdx      # 0x13fc0
movq %r15, %rdi
callq 0x33d0
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xddf0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3270
testb %bpl, %bpl
jne 0xddfa
jmp 0xde4f
movq %rax, %rbx
movq %r15, %rdi
callq 0x3190
jmp 0xde4f
movq %rax, %rbx
movq %r14, %rdi
callq 0x3190
jmp 0xe01d
movq %rax, %r15
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xde32
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3270
testb %bpl, %bpl
jne 0xde3f
jmp 0xdf30
movq %rax, %r15
movq %r14, %rdi
callq 0x3190
jmp 0xdf30
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x3070
jmp 0xde5e
movq %rax, %rbx
movq %rbx, %rdi
callq 0x30f0
leaq 0x28b7(%rip), %rsi      # 0x10724
leaq 0x60(%rsp), %rdi
movq %r14, %rdx
callq 0xbab1
leaq 0x28bd(%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 0xdeac
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0xdeb9
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 0xba72
leaq 0x20(%rsp), %rdi
jmp 0xdfc0
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0xdf03
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xdf03
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdf23
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xdf23
movq %rax, %rbx
callq 0x33c0
jmp 0xe01d
movq %rax, %r15
leaq 0x60(%rsp), %rdi
callq 0x3070
jmp 0xdf3f
movq %rax, %r15
movq %r15, %rdi
callq 0x30f0
leaq 0x27d6(%rip), %rsi      # 0x10724
leaq 0x60(%rsp), %rdi
movq %rbx, %rdx
callq 0xbab1
leaq 0x27dc(%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 0xdf8d
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0xdf9a
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 0xba72
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 0xdff8
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xdff8
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe018
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xe018
movq %rax, %rbx
callq 0x33c0
movq %rbx, %rdi
callq 0x33e0
movq %rax, %rdi
callq 0xdab7
nop