// File: /workspace/github_cpp_makefile_star2_O2/istellartech[P]OpenTsiolkovsky/src/../lib/csv.h
// Function: io::LineReader::next_line()
char*next_line(){
                        if(data_begin == data_end)
                                return 0;

                        ++file_line;

                        assert(data_begin < data_end);
                        assert(data_end <= block_len*2);

                        if(data_begin >= block_len){
                                std::memcpy(buffer, buffer+block_len, block_len);
                                data_begin -= block_len;
                                data_end -= block_len;
                                if(reader.is_valid())
                                {
                                        data_end += reader.finish_read();
                                        std::memcpy(buffer+block_len, buffer+2*block_len, block_len);
                                        reader.start_read(buffer + 2*block_len, block_len);
                                }
                        }

                        int line_end = data_begin;
                        while(buffer[line_end] != '\n' && line_end != data_end){
                                ++line_end;
                        }

                        if(line_end - data_begin + 1 > block_len){
                                error::line_length_limit_exceeded err;
                                err.set_file_name(file_name);
                                err.set_file_line(file_line);
                                throw err;
                        }

                        if(buffer[line_end] == '\n'){
                                buffer[line_end] = '\0';
                        }else{
                                // some files are missing the newline at the end of the
                                // last line
                                ++data_end;
                                buffer[line_end] = '\0';
                        }

                        // handle windows \r\n-line breaks
                        if(line_end != data_begin && buffer[line_end-1] == '\r')
                                buffer[line_end-1] = '\0';

                        char*ret = buffer + data_begin;
                        data_begin = line_end+1;
                        return ret;
                }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movl 0xc0(%rdi), %ecx
movl 0xc4(%rdi), %eax
cmpl %eax, %ecx
jne 0x185ff
xorl %eax, %eax
jmp 0x1875e
movq %rdi, %rbx
incl 0x1c8(%rdi)
cmpl %eax, %ecx
jge 0x1876f
cmpl $0x2000001, %eax        # imm = 0x2000001
jge 0x1878e
cmpl $0x1000000, %ecx        # imm = 0x1000000
jl 0x186b6
movq 0xb8(%rbx), %rdi
leaq 0x1000000(%rdi), %rsi
movl $0x1000000, %edx        # imm = 0x1000000
callq 0x52f0
movl $0xff000000, %eax       # imm = 0xFF000000
movl 0xc0(%rbx), %ecx
addl %eax, %ecx
movl %ecx, 0xc0(%rbx)
addl 0xc4(%rbx), %eax
movl %eax, 0xc4(%rbx)
cmpq $0x0, (%rbx)
je 0x186b6
movq %rbx, %rdi
callq 0x18c0a
addl %eax, 0xc4(%rbx)
movq 0xb8(%rbx), %rsi
leaq 0x1000000(%rsi), %rdi
movl $0x2000000, %r14d       # imm = 0x2000000
addq %r14, %rsi
movl $0x1000000, %edx        # imm = 0x1000000
callq 0x52f0
addq 0xb8(%rbx), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1000000, %edx        # imm = 0x1000000
callq 0x1808c
movl 0xc0(%rbx), %ecx
movl 0xc4(%rbx), %eax
movslq %ecx, %rsi
movslq %eax, %rdx
movq 0xb8(%rbx), %rdi
addq %rsi, %rdi
movq %rsi, %r9
subq %rdx, %r9
xorl %r10d, %r10d
movb (%rdi,%r10), %r8b
leaq 0x1(%r10), %rdx
cmpb $0xa, %r8b
je 0x186e5
addq %r9, %r10
movq %rdx, %r10
jne 0x186cf
leal -0x1(%rdx), %r9d
cmpl $0x1000000, %r9d        # imm = 0x1000000
jge 0x187ad
cmpb $0xa, %r8b
je 0x18704
incl %eax
movl %eax, 0xc4(%rbx)
movb $0x0, -0x1(%rdi,%rdx)
movl 0xc0(%rbx), %eax
movl %ecx, %edi
subl %eax, %edi
leal (%rdx,%rdi), %r8d
movq 0xb8(%rbx), %rdi
cmpl $0x1, %r8d
je 0x1874b
leaq (%rdi,%rsi), %r8
cmpb $0xd, -0x2(%rdx,%r8)
jne 0x18751
leaq (%rdi,%rsi), %rax
addq $-0x2, %rax
movb $0x0, (%rax,%rdx)
movq 0xb8(%rbx), %rdi
movl 0xc0(%rbx), %eax
jmp 0x18751
leal -0x1(%rcx), %eax
addq %rdx, %rax
cltq
addq %rdi, %rax
addl %edx, %ecx
movl %ecx, 0xc0(%rbx)
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x9faf(%rip), %rdi      # 0x22725
leaq 0x9fbe(%rip), %rsi      # 0x2273b
leaq 0x9fc8(%rip), %rcx      # 0x2274c
movl $0x1bf, %edx            # imm = 0x1BF
callq 0x5250
leaq 0x9fd9(%rip), %rdi      # 0x2276e
leaq 0x9f9f(%rip), %rsi      # 0x2273b
leaq 0x9fa9(%rip), %rcx      # 0x2274c
movl $0x1c0, %edx            # imm = 0x1C0
callq 0x5250
movl $0x108, %r14d           # imm = 0x108
movq %rsp, %r12
leaq (%r12,%r14), %r15
movl $0x100, %edx            # imm = 0x100
movq %r15, %rdi
xorl %esi, %esi
callq 0x5220
orl $-0x1, 0x208(%r12)
leaq 0x1621f(%rip), %r13     # 0x2e9f8
movq %r13, (%r12)
leaq 0xc8(%rbx), %rsi
movq %r15, %rdi
callq 0x182c2
movl 0x1c8(%rbx), %eax
movl %eax, 0x208(%r12)
movl $0x210, %edi            # imm = 0x210
callq 0x51c0
movq %rax, %rbx
leaq 0x160da(%rip), %rax     # 0x2e8e8
movq %rax, (%rbx)
leaq 0x8(%rbx), %rdi
leaq 0x8(%rsp), %r12
movl $0x100, %edx            # imm = 0x100
movq %r12, %rsi
callq 0x52f0
addq %rbx, %r14
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movq %r15, %rsi
callq 0x52f0
movl 0x200(%r12), %eax
movl %eax, 0x208(%rbx)
movq %r13, (%rbx)
leaq 0x1614e(%rip), %rsi     # 0x2e9a0
movq 0x16777(%rip), %rdx     # 0x2efd0
movq %rbx, %rdi
callq 0x5610
movq %rax, %rbx
movq %rsp, %rdi
callq 0x56f0
movq %rbx, %rdi
callq 0x5640