// File: /workspace/github_cpp_makefile_star2_O3/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 0xe54f
movq %rsi, %rbx
movq %rdi, -0x38(%rbp)
leaq 0x3332(%rip), %r14      # 0x1165a
leaq 0x3300(%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 0xb61f
testb %al, %al
je 0xe55e
movq 0x8(%rbx), %rax
movzbl (%rax), %r13d
cmpl $0xd, %r13d
movq -0x38(%rbp), %rdx
je 0xe493
cmpl $0xa, %r13d
je 0xe51b
movq (%rdx), %r12
movq 0x8(%rdx), %r15
movq %r15, %r14
subq %r12, %r14
movq 0x10(%rdx), %rbx
cmpq %r14, %rbx
jbe 0xe3ab
movb %r13b, (%r12,%r14)
movq (%rdx), %rax
addq %r14, %rax
incq %rax
movq -0x40(%rbp), %rbx
leaq 0x3289(%rip), %r15      # 0x1162f
jmp 0xe43c
leaq 0x1(%r14), %rax
cmpq %rax, %rbx
jae 0xe425
movq %rax, %rbx
shrq %rbx
addq %rax, %rbx
movq %rax, -0x48(%rbp)
cmpq $0x20, %rax
movl $0x20, %eax
cmovbq %rax, %rbx
leaq 0x1(%rbx), %rdi
callq 0x3340
movq -0x38(%rbp), %rdx
movq %rax, (%rdx)
movq %rbx, 0x10(%rdx)
testq %r12, %r12
je 0xe40d
cmpq %r12, %r15
je 0xe3fa
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x3530
movq %r12, %rdi
callq 0x32f0
movq -0x38(%rbp), %rdx
movq (%rdx), %rax
movq 0x10(%rdx), %rbx
leaq 0x321b(%rip), %r15      # 0x1162f
leaq (%rax,%r14), %rcx
movq %rcx, 0x8(%rdx)
movq %rax, %r12
movq -0x48(%rbp), %rax
jmp 0xe42c
leaq 0x3203(%rip), %r15      # 0x1162f
cmpq %rbx, %r14
movq -0x40(%rbp), %rbx
jae 0xe440
movb %r13b, (%r12,%r14)
addq (%rdx), %rax
movq %rax, 0x8(%rdx)
movq 0x8(%rbx), %rax
cmpq 0x10(%rbx), %rax
setne -0x2a(%rbp)
leaq 0x3207(%rip), %r14      # 0x1165a
movq %r14, %rdi
movl $0xbd, %esi
leaq -0x2a(%rbp), %rdx
movq %r15, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xb61f
testb %al, %al
je 0xe55e
movq 0x8(%rbx), %rax
incq %rax
movq %rax, 0x8(%rbx)
cmpq 0x10(%rbx), %rax
jne 0xe333
movl $0x400, %eax            # imm = 0x400
jmp 0xe54f
cmpq 0x10(%rbx), %rax
leaq -0x2c(%rbp), %rdx
setne (%rdx)
leaq 0x31b5(%rip), %rdi      # 0x1165a
leaq 0x3183(%rip), %rcx      # 0x1162f
movl $0xbd, %esi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xb61f
testb %al, %al
je 0xe55e
movq 0x8(%rbx), %rax
incq %rax
movq %rax, 0x8(%rbx)
cmpq 0x10(%rbx), %rax
movl $0x0, %eax
je 0xe54f
leaq -0x2d(%rbp), %rdx
movb $0x1, (%rdx)
leaq 0x3173(%rip), %rdi      # 0x1165a
leaq 0x3141(%rip), %rcx      # 0x1162f
movl $0xca, %esi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xb61f
testb %al, %al
je 0xe55e
movq 0x8(%rbx), %rax
cmpb $0xa, (%rax)
jne 0xe54d
cmpq 0x10(%rbx), %rax
movl $0x0, %eax
je 0xe54f
leaq -0x2e(%rbp), %rdx
jmp 0xe525
cmpq 0x10(%rbx), %rax
je 0xe54d
leaq -0x2b(%rbp), %rdx
movb $0x1, (%rdx)
leaq 0x312b(%rip), %rdi      # 0x1165a
leaq 0x30f9(%rip), %rcx      # 0x1162f
movl $0xbd, %esi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xb61f
testb %al, %al
je 0xe55e
incq 0x8(%rbx)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x31e0