// File: /workspace/github_cpp_makefile_star2_O3/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 0x1d967
xorl %eax, %eax
jmp 0x1dac6
movq %rdi, %rbx
incl 0x1c8(%rdi)
cmpl %eax, %ecx
jge 0x1dad7
cmpl $0x2000001, %eax        # imm = 0x2000001
jge 0x1daf6
cmpl $0x1000000, %ecx        # imm = 0x1000000
jl 0x1da1e
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 0x1da1e
movq %rbx, %rdi
callq 0x1dfde
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 0x1d43a
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 0x1da4d
addq %r9, %r10
movq %rdx, %r10
jne 0x1da37
leal -0x1(%rdx), %r9d
cmpl $0x1000000, %r9d        # imm = 0x1000000
jge 0x1db15
cmpb $0xa, %r8b
je 0x1da6c
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 0x1dab3
leaq (%rdi,%rsi), %r8
cmpb $0xd, -0x2(%rdx,%r8)
jne 0x1dab9
leaq (%rdi,%rsi), %rax
addq $-0x2, %rax
movb $0x0, (%rax,%rdx)
movq 0xb8(%rbx), %rdi
movl 0xc0(%rbx), %eax
jmp 0x1dab9
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 0x9f17(%rip), %rdi      # 0x279f5
leaq 0x9f26(%rip), %rsi      # 0x27a0b
leaq 0x9f30(%rip), %rcx      # 0x27a1c
movl $0x1bf, %edx            # imm = 0x1BF
callq 0x5250
leaq 0x9f41(%rip), %rdi      # 0x27a3e
leaq 0x9f07(%rip), %rsi      # 0x27a0b
leaq 0x9f11(%rip), %rcx      # 0x27a1c
movl $0x1c0, %edx            # imm = 0x1C0
callq 0x5250
movl $0x108, %r14d           # imm = 0x108
movq %rsp, %r12
leaq (%r12,%r14), %r15
leaq 0x13ec7(%rip), %r13     # 0x319f0
movq %r13, (%r12)
leaq 0xc8(%rbx), %rsi
movl $0xff, %edx
movq %r15, %rdi
callq 0x5200
movb $0x0, 0x207(%r12)
movl 0x1c8(%rbx), %eax
movl %eax, 0x208(%r12)
movl $0x210, %edi            # imm = 0x210
callq 0x51e0
movq %rax, %rbx
leaq 0x13d74(%rip), %rax     # 0x318e0
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 0x13de8(%rip), %rsi     # 0x31998
movq 0x14419(%rip), %rdx     # 0x31fd0
movq %rbx, %rdi
callq 0x5620
movq %rax, %rbx
movq %rsp, %rdi
callq 0x56d8
movq %rbx, %rdi
callq 0x5650