// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/varfiles.cpp
// Function: sampFiles::TpedFileI::open()
void TpedFileI::open(){
	string tfamName = _fileStub + ".tfam";

	try {
		_varFile.open(_fileName.c_str(), ios::in);
		if (!_varFile.is_open()) {
			cerr << "ERROR: failed to open .tped file " << _fileName << " for input" << endl;
			exit(2);
		}

	} catch (system_error &error) {
		cerr << "ERROR: cannot open TPED file " << _fileName << " for input: " << error.code().message() << flush;
		perror(" ");
		exit(1);

	}

	try {
		_tfamFile.open(tfamName.c_str(), ios::in);
		if (!_tfamFile.is_open()) {
			cerr << "ERROR: failed to open .tfam file " << tfamName << " for input" << endl;
			exit(2);
		}

	} catch (system_error &error) {
		cerr << "ERROR: cannot open .tfam file " << tfamName << " for input: " << error.code().message() << flush;
		perror(" ");
		exit(1);

	}

}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
leaq 0x450(%rdi), %rsi
leaq 0x55d1(%rip), %rdx      # 0x14c3f
leaq 0x28(%rsp), %rdi
callq 0x5e08
leaq 0x8(%r14), %rdi
leaq 0x218(%r14), %rbx
movq 0x218(%r14), %rsi
pushq $0x8
popq %rdx
callq 0x4280
leaq 0x88(%r14), %rdi
callq 0x40b0
testb %al, %al
je 0xf6db
leaq 0x240(%r14), %rdi
movq 0x28(%rsp), %rsi
pushq $0x8
popq %rdx
callq 0x4280
addq $0x2c0, %r14            # imm = 0x2C0
movq %r14, %rdi
callq 0x40b0
testb %al, %al
je 0xf712
leaq 0x28(%rsp), %rdi
callq 0x4558
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq 0xc90e(%rip), %rdi      # 0x1bff0
leaq 0x5650(%rip), %rsi      # 0x14d39
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0x4e6c(%rip), %rsi      # 0x1456c
movq %rax, %rdi
callq 0x42a0
movq %rax, %rdi
callq 0x4140
jmp 0xf749
movq 0xc8d7(%rip), %rdi      # 0x1bff0
leaq 0x5525(%rip), %rsi      # 0x14c45
callq 0x42a0
leaq 0x28(%rsp), %rsi
movq %rax, %rdi
callq 0x4270
leaq 0x4e33(%rip), %rsi      # 0x1456c
movq %rax, %rdi
callq 0x42a0
movq %rax, %rdi
callq 0x4140
pushq $0x2
popq %rdi
callq 0x4310
movq %rax, %r14
cmpl $0x1, %edx
jne 0xf889
movq %r14, %rdi
callq 0x4110
movq %rax, %rbx
movq 0xc881(%rip), %rdi      # 0x1bff0
leaq 0x54f1(%rip), %rsi      # 0x14c67
callq 0x42a0
leaq 0x28(%rsp), %rsi
movq %rax, %rdi
callq 0x4270
leaq 0x526e(%rip), %rsi      # 0x149fd
movq %rax, %rdi
callq 0x42a0
movq %rax, %r14
movq 0x18(%rbx), %rsi
movl 0x10(%rbx), %edx
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
callq *0x20(%rax)
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x4270
movq %rax, %rdi
callq 0x41c0
jmp 0xf853
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4558
jmp 0xf7da
jmp 0xf7d7
movq %rax, %r14
callq 0x4470
jmp 0xf889
movq %rax, %r14
cmpl $0x1, %edx
jne 0xf889
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0xc7ee(%rip), %rdi      # 0x1bff0
leaq 0x5571(%rip), %rsi      # 0x14d7a
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0x51dd(%rip), %rsi      # 0x149fd
movq %rax, %rdi
callq 0x42a0
movq %rax, %rbx
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
callq *0x20(%rax)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4270
movq %rax, %rdi
callq 0x41c0
leaq 0x8(%rsp), %rdi
callq 0x4558
leaq 0x4fae(%rip), %rdi      # 0x14812
callq 0x4250
pushq $0x1
jmp 0xf74b
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4558
jmp 0xf884
jmp 0xf881
movq %rax, %r14
callq 0x4470
leaq 0x28(%rsp), %rdi
callq 0x4558
movq %r14, %rdi
callq 0x44d0
movq %rax, %rdi
callq 0x6194
nop