// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x450(%rdi), %rsi
movq 0x458(%rdi), %rdx
addq %rsi, %rdx
movq %rsp, %r14
movq %r14, %rdi
callq 0x76e4
leaq 0x5aaf(%rip), %rsi      # 0x18c3f
movq %r14, %rdi
callq 0x4530
leaq 0x8(%rbx), %rdi
movq 0x218(%rbx), %rsi
movl $0x8, %edx
callq 0x4270
leaq 0x88(%rbx), %rdi
callq 0x40a0
testb %al, %al
je 0x13205
leaq 0x240(%rbx), %rdi
movq (%rsp), %rsi
movl $0x8, %edx
callq 0x4270
addq $0x2c0, %rbx            # imm = 0x2C0
movq %rbx, %rdi
callq 0x40a0
testb %al, %al
je 0x13258
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x131fb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42d0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0xcde4(%rip), %rdi      # 0x1fff0
leaq 0x5b26(%rip), %rsi      # 0x18d39
movl $0x21, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0xcdbe(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %r14
leaq 0x532b(%rip), %rsi      # 0x1856c
movl $0xa, %edx
movq %rax, %rdi
callq 0x42f0
movq %r14, %rdi
callq 0x4130
jmp 0x132a4
movq 0xcd91(%rip), %rdi      # 0x1fff0
leaq 0x59df(%rip), %rsi      # 0x18c45
movl $0x21, %edx
callq 0x42f0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0xcd70(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %rbx
leaq 0x52dd(%rip), %rsi      # 0x1856c
movl $0xa, %edx
movq %rax, %rdi
callq 0x42f0
movq %rbx, %rdi
callq 0x4130
movl $0x2, %edi
callq 0x4320
movq %rax, %r14
jmp 0x13437
movq %rax, %r14
cmpl $0x1, %edx
jne 0x13437
movq %r14, %rdi
callq 0x4110
movq %rax, %rbx
movq 0xcd1c(%rip), %rdi      # 0x1fff0
leaq 0x598c(%rip), %rsi      # 0x18c67
movl $0x1e, %edx
callq 0x42f0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0xccfb(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %r14
leaq 0x56f9(%rip), %rsi      # 0x189fd
movl $0xc, %edx
movq %rax, %rdi
callq 0x42f0
movq 0x18(%rbx), %rsi
movl 0x10(%rbx), %edx
movq (%rsi), %rax
leaq 0x20(%rsp), %rdi
callq *0x20(%rax)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %r14, %rdi
callq 0x42f0
movq %rax, %rdi
callq 0x41b0
leaq 0x20(%rsp), %rdi
callq 0x49b5
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1336c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x1336c
jmp 0x13369
movq %rax, %r14
callq 0x4480
jmp 0x13437
movq %rax, %r14
cmpl $0x1, %edx
jne 0x13437
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0xcc5c(%rip), %rdi      # 0x1fff0
leaq 0x59df(%rip), %rsi      # 0x18d7a
movl $0x1d, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0xcc36(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %rbx
leaq 0x5634(%rip), %rsi      # 0x189fd
movl $0xc, %edx
movq %rax, %rdi
callq 0x42f0
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
leaq 0x20(%rsp), %rdi
callq *0x20(%rax)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x42f0
movq %rax, %rdi
callq 0x41b0
leaq 0x20(%rsp), %rdi
callq 0x499b
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13432
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x13432
jmp 0x1342f
movq %rax, %r14
callq 0x4480
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x1344d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42d0
movq %r14, %rdi
callq 0x44e0
movq %rax, %rdi
callq 0x76d8
nop