// File: /workspace/github_cpp_makefile_star2_O1/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 0x7720
leaq 0x5905(%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 0x133af
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 0x13402
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x133a5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42d0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0xcc3a(%rip), %rdi      # 0x1fff0
leaq 0x597c(%rip), %rsi      # 0x18d39
movl $0x21, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0xcc14(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %r14
leaq 0x5181(%rip), %rsi      # 0x1856c
movl $0xa, %edx
movq %rax, %rdi
callq 0x42f0
movq %r14, %rdi
callq 0x4130
jmp 0x1344e
movq 0xcbe7(%rip), %rdi      # 0x1fff0
leaq 0x5835(%rip), %rsi      # 0x18c45
movl $0x21, %edx
callq 0x42f0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0xcbc6(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %rbx
leaq 0x5133(%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 0x135e1
movq %rax, %r14
cmpl $0x1, %edx
jne 0x135e1
movq %r14, %rdi
callq 0x4110
movq %rax, %rbx
movq 0xcb72(%rip), %rdi      # 0x1fff0
leaq 0x57e2(%rip), %rsi      # 0x18c67
movl $0x1e, %edx
callq 0x42f0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0xcb51(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %r14
leaq 0x554f(%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 0x13516
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x13516
jmp 0x13513
movq %rax, %r14
callq 0x4480
jmp 0x135e1
movq %rax, %r14
cmpl $0x1, %edx
jne 0x135e1
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0xcab2(%rip), %rdi      # 0x1fff0
leaq 0x5835(%rip), %rsi      # 0x18d7a
movl $0x1d, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0xca8c(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %rbx
leaq 0x548a(%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 0x135dc
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x135dc
jmp 0x135d9
movq %rax, %r14
callq 0x4480
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x135f7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42d0
movq %r14, %rdi
callq 0x44e0
movq %rax, %rdi
callq 0x7714
nop