// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/varfiles.cpp
// Function: sampFiles::BedFileI::_numLines()
uint64_t BedFileI::_numLines(){
    if (!_nCols) {
        _nCols = _famLines();
    }
    if (_varFile.is_open()) {
        _varFile.close();
    }
    try {
        _varFile.open(_fileName.c_str(), ios::in | ios::binary | ios::ate);
		if (!_varFile.is_open()) {
			cerr << "ERROR: failed to open file " << _fileName << " for input" << endl;
			exit(2);
		}

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

    }
    uint64_t Nbed = (_nCols/4UL) + static_cast<uint64_t>( (_nCols%4UL) > 0UL );
    uint64_t N = static_cast<uint64_t>(_varFile.tellg()) - 3UL; // 3 is the number of magic bytes
    if (N % Nbed) {
        cerr << "ERROR: total file size " << N << " not divisible by the number of compressed colums " << Nbed << " in BedFile _numLines()" << endl;
        exit(7);
    }
    _varFile.close();

    return N/Nbed;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r15
cmpq $0x0, 0x238(%rdi)
jne 0x7625
movq %r15, %rdi
callq 0x77fe
movq %rax, 0x238(%r15)
leaq 0x8(%r15), %r14
leaq 0x88(%r15), %r12
movq %r12, %rdi
callq 0x40b0
testb %al, %al
je 0x7644
movq %r14, %rdi
callq 0x4050
leaq 0x218(%r15), %rbx
movq 0x218(%r15), %rsi
pushq $0xe
popq %rdx
movq %r14, %rdi
callq 0x4280
movq %r12, %rdi
callq 0x40b0
testb %al, %al
je 0x76b8
movq 0x238(%r15), %rax
movq %rax, %rbx
shrq $0x2, %rbx
andl $0x3, %eax
cmpq $0x1, %rax
sbbq $-0x1, %rbx
movq %r14, %rdi
callq 0x44b0
movq %rax, %r15
addq $-0x3, %r15
movq %r15, %rax
xorl %edx, %edx
divq %rbx
testq %rdx, %rdx
jne 0x76f1
movq %rax, %r12
movq %r14, %rdi
callq 0x4050
movq %r12, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x14931(%rip), %rdi     # 0x1bff0
leaq 0xce8a(%rip), %rsi      # 0x14550
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0xce8f(%rip), %rsi      # 0x1456c
movq %rax, %rdi
callq 0x42a0
movq %rax, %rdi
callq 0x4140
pushq $0x2
jmp 0x7742
movq 0x148f8(%rip), %rdi     # 0x1bff0
leaq 0xd033(%rip), %rsi      # 0x14732
callq 0x42a0
movq %rax, %rdi
movq %r15, %rsi
callq 0x40c0
leaq 0xd034(%rip), %rsi      # 0x1474a
movq %rax, %rdi
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x40c0
leaq 0xd04d(%rip), %rsi      # 0x1477d
movq %rax, %rdi
callq 0x42a0
movq %rax, %rdi
callq 0x4140
pushq $0x7
popq %rdi
callq 0x4310
movq %rax, %r14
cmpl $0x1, %edx
jne 0x77ed
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0x1488a(%rip), %rdi     # 0x1bff0
leaq 0xce0a(%rip), %rsi      # 0x14577
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0xcf6a(%rip), %rsi      # 0x146ee
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 0xd04a(%rip), %rdi      # 0x14812
callq 0x4250
pushq $0x1
jmp 0x7742
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4558
jmp 0x77e8
jmp 0x77e5
movq %rax, %r14
callq 0x4470
movq %r14, %rdi
callq 0x44d0
movq %rax, %rdi
callq 0x6194
nop