// File: /workspace/github_cpp_makefile_star2_O1/mshabbirhasan[P]ups-indel/include/seqan/stream/tokenize.h
// Function: int seqan::readLine<seqan::String<char, seqan::MMap<seqan::MMapConfig<seqan::File<seqan::Async<void>>, unsigned long>>>, seqan::SinglePass<seqan::Tag<seqan::StringReader_>>, seqan::String<char, seqan::Alloc<void>>>(seqan::String<char, seqan::Alloc<void>>&, seqan::RecordReader<seqan::String<char, seqan::MMap<seqan::MMapConfig<seqan::File<seqan::Async<void>>, unsigned long>>>, seqan::SinglePass<seqan::Tag<seqan::StringReader_>>>&)
inline int
readLine(TBuffer & buffer, RecordReader<TStream, TPass> & reader)
{
    int r = 0;

    // Loop over characters from stream, taking early exits on line breaks and errors.
    while (!atEnd(reader))
    {
        char c = value(reader);

        // Unix EOL is the simplest case.
        if (c == '\n')
        {
            if (!atEnd(reader))
                goNext(reader);
            return resultCode(reader);
        }

        // If the current character is '\r' then this can be an ANSI or a Mac line ending.
        if (c == '\r')
        {
            goNext(reader);
            if ((r = resultCode(reader)) != 0)
                return r;
            if (atEnd(reader))
                return 0;  // Assume Mac EOL at end of file.
            if (value(reader) == '\n')
            {
                // Assume Windows EOL.
                if (!atEnd(reader))
                    goNext(reader);
                return resultCode(reader);
            }
            return 0;  // Was Mac EOL, not at end of file.
        }

        appendValue(buffer, c);
        goNext(reader);
    }

    return EOF_BEFORE_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x8(%rsi), %rcx
movl $0x400, %eax            # imm = 0x400
cmpq 0x10(%rsi), %rcx
je 0xec90
movq %rsi, %rbx
movq %rdi, -0x38(%rbp)
leaq 0x2c0e(%rip), %r14      # 0x11694
leaq 0x2ba2(%rip), %r15      # 0x1162f
movq %rsi, -0x40(%rbp)
movb $0x1, -0x29(%rbp)
movq %r14, %rdi
movl $0xca, %esi
leaq -0x29(%rbp), %rdx
movq %r15, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xb89e
testb %al, %al
je 0xec9f
movq 0x8(%rbx), %rax
movzbl (%rax), %r13d
cmpl $0xd, %r13d
movq -0x38(%rbp), %rcx
je 0xebd4
cmpl $0xa, %r13d
je 0xec5c
movq (%rcx), %r12
movq 0x8(%rcx), %rdx
movq %rdx, %r14
subq %r12, %r14
movq 0x10(%rcx), %rax
cmpq %r14, %rax
jbe 0xeafc
movb %r13b, (%r12,%r14)
movq (%rcx), %rax
leaq (%rax,%r14), %r15
incq %r15
jmp 0xeb76
leaq 0x1(%r14), %r15
cmpq %r15, %rax
jae 0xeb66
movq %rdx, -0x48(%rbp)
movq %r15, %rbx
shrq %rbx
addq %r15, %rbx
cmpq $0x20, %r15
movl $0x20, %eax
cmovbq %rax, %rbx
leaq 0x1(%rbx), %rdi
callq 0x3340
movq -0x38(%rbp), %rcx
movq %rax, (%rcx)
movq %rbx, 0x10(%rcx)
testq %r12, %r12
je 0xeb58
cmpq %r12, -0x48(%rbp)
je 0xeb4c
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x3530
movq %r12, %rdi
callq 0x32f0
movq -0x38(%rbp), %rcx
movq (%rcx), %rax
addq %r14, %rax
movq %rax, 0x8(%rcx)
movq -0x40(%rbp), %rbx
cmpq 0x10(%rcx), %r14
jae 0xeb7a
movq (%rcx), %rax
movb %r13b, (%rax,%r14)
addq (%rcx), %r15
movq %r15, 0x8(%rcx)
movq 0x8(%rbx), %rax
cmpq 0x10(%rbx), %rax
setne -0x2a(%rbp)
leaq 0x2b07(%rip), %r14      # 0x11694
movq %r14, %rdi
movl $0xbd, %esi
leaq -0x2a(%rbp), %rdx
leaq 0x2a8f(%rip), %r15      # 0x1162f
movq %r15, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xb89e
testb %al, %al
je 0xec9f
movq 0x8(%rbx), %rax
incq %rax
movq %rax, 0x8(%rbx)
cmpq 0x10(%rbx), %rax
jne 0xea91
movl $0x400, %eax            # imm = 0x400
jmp 0xec90
cmpq 0x10(%rbx), %rax
leaq -0x2c(%rbp), %rdx
setne (%rdx)
leaq 0x2aae(%rip), %rdi      # 0x11694
leaq 0x2a42(%rip), %rcx      # 0x1162f
movl $0xbd, %esi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xb89e
testb %al, %al
je 0xec9f
movq 0x8(%rbx), %rax
incq %rax
movq %rax, 0x8(%rbx)
cmpq 0x10(%rbx), %rax
movl $0x0, %eax
je 0xec90
leaq -0x2d(%rbp), %rdx
movb $0x1, (%rdx)
leaq 0x2a6c(%rip), %rdi      # 0x11694
leaq 0x2a00(%rip), %rcx      # 0x1162f
movl $0xca, %esi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xb89e
testb %al, %al
je 0xec9f
movq 0x8(%rbx), %rax
cmpb $0xa, (%rax)
jne 0xec8e
cmpq 0x10(%rbx), %rax
movl $0x0, %eax
je 0xec90
leaq -0x2e(%rbp), %rdx
jmp 0xec66
cmpq 0x10(%rbx), %rax
je 0xec8e
leaq -0x2b(%rbp), %rdx
movb $0x1, (%rdx)
leaq 0x2a24(%rip), %rdi      # 0x11694
leaq 0x29b8(%rip), %rcx      # 0x1162f
movl $0xbd, %esi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xb89e
testb %al, %al
je 0xec9f
incq 0x8(%rbx)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x31e0