// File: mshabbirhasan[P]ups-indel/include/seqan/stream/record_reader_single.h
// Function: bool seqan::_refillBuffer<std::basic_ifstream<char, std::char_traits<char>>>(seqan::RecordReader<std::basic_ifstream<char, std::char_traits<char>>, seqan::SinglePass<void>>&)
inline bool
_refillBuffer(RecordReader<TFile, SinglePass<void> > & recordReader)
{
    if (recordReader._stayInOneBuffer && recordReader._end != 0)
        // e.g. file format detection; if end==0 there hasnt yet been a buffer
        return false;
    // std::cerr << "REFILLING BUFFER" << std::endl;
    if (streamEof(recordReader._file))
        return false;
    recordReader._current = begin(recordReader._buffer, Standard());
    recordReader._position = streamTell(recordReader._file);
    size_t bytesRead = streamReadBlock(recordReader._current, recordReader._file, recordReader._bufferSize);
    recordReader._position += bytesRead;
    if (bytesRead != recordReader._bufferSize) {
        // If we read fewer characters and the stream is not at its end then
        // there was an error reading the file.
        recordReader._resultCode = streamError(recordReader._file);
        if (recordReader._resultCode) {
            // std::cerr << "RESULT IS " << recordReader._resultCode << std::endl;
            recordReader._end = recordReader._current;
            return false;
        }
    }
    recordReader._end = recordReader._current + bytesRead;
    // std::cerr << "read " << bytesRead << " bytes" << std::endl;
    // std::cerr << "ERROR? " << streamError(recordReader._file) << std::endl;
    // std::cerr << "EOF? " << streamEof(recordReader._file) << std::endl;

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
testb $0x1, 0x3c(%rax)
je 0x1413a
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x1413a
movb $0x0, -0x1(%rbp)
jmp 0x14226
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x14350
testb $0x1, %al
jne 0x1414c
jmp 0x14155
movb $0x0, -0x1(%rbp)
jmp 0x14226
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0xfc90
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x14380
movq %rax, -0x28(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, 0x40(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %edx
callq 0x143b0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
callq 0x143e0
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
cmpq %rcx, %rax
je 0x1420e
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x14400
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x38(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0x1420c
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x14226
jmp 0x1420e
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
addq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)