// File: tonymugen[P]sampleSNPs/varfiles.cpp
// Function: sampFiles::HmpFileI::HmpFileI(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
HmpFileI::HmpFileI(const string &fileName) : HmpFile(fileName) {
    if (_varFile.is_open()) {
        _varFile.close();
    }
    try {
        _varFile.open(_fileName.c_str(), ios::in);
		if (!_varFile.is_open()) {
			cerr << "ERROR: failed to open HMP file " << _fileName << " for input" << endl;
			exit(2);
		}

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

    }
    char buf[3];
    _varFile.read(buf, 3);
    if ( (buf[0] == 'r') && (buf[1] == 's') && (buf[2] == '#') ) {
        _head = true;
    }
    _varFile.close();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x58(%rbp)
movq -0x10(%rbp), %rsi
callq 0x8330
movq -0x58(%rbp), %rdi
leaq 0xe171(%rip), %rax      # 0x2b8f0
movq %rax, (%rdi)
addq $0x8, %rdi
callq 0x45e0
movb %al, -0x4c(%rbp)
jmp 0x1d790
movb -0x4c(%rbp), %al
testb $0x1, %al
jne 0x1d799
jmp 0x1d7bb
movq -0x58(%rbp), %rdi
addq $0x8, %rdi
callq 0x4060
jmp 0x1d7a8
jmp 0x1d7bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x1d9d8
movq -0x58(%rbp), %rdi
movq %rdi, %rax
addq $0x8, %rax
movq %rax, -0x60(%rbp)
addq $0x218, %rdi            # imm = 0x218
callq 0x4140
movq -0x60(%rbp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x42f0
jmp 0x1d7e9
movq -0x58(%rbp), %rdi
addq $0x8, %rdi
callq 0x45e0
movb %al, -0x61(%rbp)
jmp 0x1d7fb
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x1d954
jmp 0x1d808
movq 0xe7e1(%rip), %rdi      # 0x2bff0
leaq 0x6640(%rip), %rsi      # 0x23e56
callq 0x4310
movq %rax, -0x70(%rbp)
jmp 0x1d821
movq -0x70(%rbp), %rdi
movq -0x58(%rbp), %rsi
addq $0x218, %rsi            # imm = 0x218
callq 0x42e0
movq %rax, -0x78(%rbp)
jmp 0x1d83b
movq -0x78(%rbp), %rdi
leaq 0x5d0e(%rip), %rsi      # 0x23554
callq 0x4310
movq %rax, -0x80(%rbp)
jmp 0x1d851
movq -0x80(%rbp), %rdi
movq 0xe754(%rip), %rsi      # 0x2bfb0
callq 0x4350
jmp 0x1d863
movl $0x2, %edi
callq 0x4400
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x1d9d8
movq -0x18(%rbp), %rdi
callq 0x4130
movq %rax, -0x28(%rbp)
movq 0xe753(%rip), %rdi      # 0x2bff0
leaq 0x65d2(%rip), %rsi      # 0x23e76
callq 0x4310
movq %rax, -0x88(%rbp)
jmp 0x1d8b2
movq -0x88(%rbp), %rdi
movq -0x58(%rbp), %rsi
addq $0x218, %rsi            # imm = 0x218
callq 0x42e0
movq %rax, -0x90(%rbp)
jmp 0x1d8d2
movq -0x90(%rbp), %rdi
leaq 0x6105(%rip), %rsi      # 0x239e5
callq 0x4310
movq %rax, -0x98(%rbp)
jmp 0x1d8ee
movq -0x28(%rbp), %rdi
callq 0x1ee90
movq %rax, %rsi
leaq -0x48(%rbp), %rdi
callq 0x1eeb0
jmp 0x1d905
movq -0x98(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x42e0
movq %rax, -0xa0(%rbp)
jmp 0x1d91e
movq -0xa0(%rbp), %rdi
movq 0xe69c(%rip), %rsi      # 0x2bfc8
callq 0x4350
jmp 0x1d933
leaq -0x48(%rbp), %rdi
callq 0x46d8
leaq 0x5eb7(%rip), %rdi      # 0x237fa
callq 0x42a0
jmp 0x1d94a
movl $0x1, %edi
callq 0x4400
jmp 0x1d982
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x1d979
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x46d8
callq 0x4580
jmp 0x1d980
jmp 0x1d9d8
movq -0x58(%rbp), %rdi
addq $0x8, %rdi
leaq -0x4b(%rbp), %rsi
movl $0x3, %edx
callq 0x4450
jmp 0x1d99a
movsbl -0x4b(%rbp), %eax
cmpl $0x72, %eax
jne 0x1d9c0
movsbl -0x4a(%rbp), %eax
cmpl $0x73, %eax
jne 0x1d9c0
movsbl -0x49(%rbp), %eax
cmpl $0x23, %eax
jne 0x1d9c0
movq -0x58(%rbp), %rax
movb $0x1, 0x238(%rax)
movq -0x58(%rbp), %rdi
addq $0x8, %rdi
callq 0x4060
jmp 0x1d9cf
addq $0xa0, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x8370
movq -0x18(%rbp), %rdi
callq 0x4610
movq %rax, %rdi
callq 0x82c0
nopw %cs:(%rax,%rax)