// File: /workspace/github_cpp_makefile_star2_O3/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, %rbx
cmpq $0x0, 0x238(%rdi)
jne 0x8ef5
movq %rbx, %rdi
callq 0x9108
movq %rax, 0x238(%rbx)
leaq 0x8(%rbx), %r14
leaq 0x88(%rbx), %r15
movq %r15, %rdi
callq 0x40a0
testb %al, %al
je 0x8f14
movq %r14, %rdi
callq 0x4060
movq 0x218(%rbx), %rsi
movq %r14, %rdi
movl $0xe, %edx
callq 0x4270
movq %r15, %rdi
callq 0x40a0
testb %al, %al
je 0x8f83
movq 0x238(%rbx), %rax
movq %rax, %rbx
shrq $0x2, %rbx
andl $0x3, %eax
cmpq $0x1, %rax
sbbq $-0x1, %rbx
movq %r14, %rdi
callq 0x44c0
movq %rax, %r15
addq $-0x3, %r15
movq %r15, %rax
xorl %edx, %edx
divq %rbx
testq %rdx, %rdx
jne 0x8fde
movq %rax, %r12
movq %r14, %rdi
callq 0x4060
movq %r12, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x17066(%rip), %rdi     # 0x1fff0
leaq 0xf5bf(%rip), %rsi      # 0x18550
movl $0x1b, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0x17040(%rip), %rdi     # 0x1fff0
callq 0x42f0
movq %rax, %r14
leaq 0xf5ad(%rip), %rsi      # 0x1856c
movl $0xa, %edx
movq %rax, %rdi
callq 0x42f0
movq %r14, %rdi
callq 0x4130
movl $0x2, %edi
callq 0x4320
movq 0x1700b(%rip), %rdi     # 0x1fff0
leaq 0xf746(%rip), %rsi      # 0x18732
callq 0x42a0
movq %rax, %rdi
movq %r15, %rsi
callq 0x40b0
leaq 0xf747(%rip), %rsi      # 0x1874a
movq %rax, %rdi
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x40b0
leaq 0xf760(%rip), %rsi      # 0x1877d
movq %rax, %rdi
callq 0x42a0
movq %rax, %rdi
callq 0x4130
movl $0x7, %edi
callq 0x4320
movq %rax, %r14
cmpl $0x1, %edx
jne 0x90f8
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0x16f9b(%rip), %rdi     # 0x1fff0
leaq 0xf51b(%rip), %rsi      # 0x18577
movl $0x1f, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0x16f75(%rip), %rdi     # 0x1fff0
callq 0x42f0
movq %rax, %rbx
leaq 0xf664(%rip), %rsi      # 0x186ee
movl $0xd, %edx
movq %rax, %rdi
callq 0x42f0
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
callq *0x20(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x42f0
movq %rax, %rdi
callq 0x41b0
leaq 0x8(%rsp), %rdi
callq 0x4627
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x90f3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x90f3
jmp 0x90f0
movq %rax, %r14
callq 0x4480
movq %r14, %rdi
callq 0x44e0
movq %rax, %rdi
callq 0x76d8