// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movl 0xc0(%rdi), %eax
movl 0xc4(%rdi), %ecx
cmpl %ecx, %eax
jne 0x1f6e2
xorl %eax, %eax
jmp 0x1f81d
movq %rdi, %rbx
incl 0x1c8(%rdi)
cmpl %ecx, %eax
jge 0x1f82f
cmpl $0x2000001, %ecx        # imm = 0x2000001
jge 0x1f84e
cmpl $0x1000000, %eax        # imm = 0x1000000
jl 0x1f77b
movq 0xb8(%rbx), %rdi
leaq 0x1000000(%rdi), %rsi
movl $0x1000000, %edx        # imm = 0x1000000
callq 0x52f0
movl $0xff000000, %eax       # imm = 0xFF000000
addl %eax, 0xc0(%rbx)
addl %eax, 0xc4(%rbx)
cmpq $0x0, (%rbx)
je 0x1f77b
movq %rbx, %rdi
callq 0x1fd66
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 0x1f1a8
movslq 0xc0(%rbx), %rax
movl %eax, %ecx
movslq 0xc4(%rbx), %rdi
movq 0xb8(%rbx), %rsi
addq %rax, %rsi
movq %rax, %r9
subq %rdi, %r9
xorl %r10d, %r10d
movb (%rsi,%r10), %r8b
leaq 0x1(%r10), %rdx
cmpb $0xa, %r8b
je 0x1f7b4
addq %r9, %r10
movq %rdx, %r10
jne 0x1f79e
leal -0x1(%rdx), %r9d
cmpl $0x1000000, %r9d        # imm = 0x1000000
jge 0x1f86d
cmpb $0xa, %r8b
je 0x1f7d3
incl %edi
movl %edi, 0xc4(%rbx)
movb $0x0, -0x1(%rsi,%rdx)
movl 0xc0(%rbx), %esi
movl %eax, %edi
subl %esi, %edi
leal (%rdx,%rdi), %esi
cmpl $0x1, %esi
je 0x1f807
movq 0xb8(%rbx), %rsi
leaq (%rsi,%rax), %rdi
cmpb $0xd, -0x2(%rdx,%rdi)
jne 0x1f807
addq %rsi, %rax
addq $-0x2, %rax
movb $0x0, (%rax,%rdx)
movslq 0xc0(%rbx), %rax
addq 0xb8(%rbx), %rax
addl %edx, %ecx
movl %ecx, 0xc0(%rbx)
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa078(%rip), %rdi      # 0x298ae
leaq 0xa087(%rip), %rsi      # 0x298c4
leaq 0xa091(%rip), %rcx      # 0x298d5
movl $0x1bf, %edx            # imm = 0x1BF
callq 0x5250
leaq 0xa0a2(%rip), %rdi      # 0x298f7
leaq 0xa068(%rip), %rsi      # 0x298c4
leaq 0xa072(%rip), %rcx      # 0x298d5
movl $0x1c0, %edx            # imm = 0x1C0
callq 0x5250
leaq 0x1306c(%rip), %r12     # 0x328e0
leaq 0x8(%rsp), %rbp
movq %r12, (%rbp)
movl $0x108, %r15d           # imm = 0x108
leaq (%r15,%rbp), %r14
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
xorl %esi, %esi
callq 0x5230
movl $0xffffffff, 0x208(%rbp) # imm = 0xFFFFFFFF
leaq 0x13149(%rip), %r13     # 0x329f0
movq %r13, (%rbp)
leaq 0xc8(%rbx), %rsi
movl $0xff, %edx
movq %r14, %rdi
callq 0x5200
movb $0x0, 0x207(%rbp)
movl 0x1c8(%rbx), %eax
movl %eax, 0x208(%rbp)
movl $0x210, %edi            # imm = 0x210
callq 0x51e0
movq %rax, %rbx
movq %r12, (%rax)
leaq 0x8(%rax), %rdi
leaq 0x10(%rsp), %r12
movl $0x100, %edx            # imm = 0x100
movq %r12, %rsi
callq 0x52f0
addq %rbx, %r15
movl $0x100, %edx            # imm = 0x100
movq %r15, %rdi
movq %r14, %rsi
callq 0x52f0
movl 0x200(%r12), %eax
movl %eax, 0x208(%rbx)
movq %r13, (%rbx)
leaq 0x13075(%rip), %rsi     # 0x32998
movq 0x136a6(%rip), %rdx     # 0x32fd0
movq %rbx, %rdi
callq 0x5620
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x56d8
movq %rbx, %rdi
callq 0x5650