// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/linefile.c
// Function: findNextNewline
static boolean findNextNewline(struct lineFile *lf, char *buf, int bytesInBuf, int *pEndIx)
/* Return TRUE if able to find next end of line in buf, starting at buf[*pEndIx], up to bytesInBuf.
 * When done set *pEndIx to the start of the next line if applicable, otherwise bytesInBuf. */
{
boolean gotLf = FALSE;
int endIx = *pEndIx;
switch (lf->nlType)
    {
    case nlt_unix:
    case nlt_dos:
        for (endIx = *pEndIx; endIx < bytesInBuf; ++endIx)
            {
            if (buf[endIx] == '\n')
                {
                gotLf = TRUE;
                endIx += 1;
                break;
                }
            }
        break;
    case nlt_mac:
        for (endIx = *pEndIx; endIx < bytesInBuf; ++endIx)
            {
            if (buf[endIx] == '\r')
                {
                gotLf = TRUE;
                endIx += 1;
                break;
                }
            }
        break;
    case nlt_mixed:
    case nlt_undet:
        for (endIx = *pEndIx; endIx < bytesInBuf; ++endIx)
            {
            char c = buf[endIx];
            if (c == '\r' || c == '\n')
                {
                gotLf = TRUE;
                if (lf->zTerm)
                    buf[endIx] = '\0';
                endIx += 1;
                if (c == '\r' && buf[endIx] == '\n')
                    {
                    if (lf->zTerm)
                        buf[endIx] = '\0';
                    endIx += 1;
                    }
                break;
                }
            }
        break;
    }
*pEndIx = endIx;
return gotLf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %eax
movq %rax, -0x38(%rbp)
subq $0x4, %rax
ja 0x3bf70
movq -0x38(%rbp), %rax
leaq 0x9eeb5(%rip), %rcx     # 0xdace8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x3be7d
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x3be70
movl $0x1, -0x24(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3be7d
jmp 0x3be72
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3be45
jmp 0x3bf70
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x3bec3
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xd, %eax
jne 0x3beb6
movl $0x1, -0x24(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3bec3
jmp 0x3beb8
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3be8b
jmp 0x3bf70
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x3bf6e
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x29(%rbp)
movsbl -0x29(%rbp), %eax
cmpl $0xd, %eax
je 0x3befd
movsbl -0x29(%rbp), %eax
cmpl $0xa, %eax
jne 0x3bf5e
movl $0x1, -0x24(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, 0x34(%rax)
je 0x3bf1a
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movsbl -0x29(%rbp), %eax
cmpl $0xd, %eax
jne 0x3bf5c
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x3bf5c
movq -0x8(%rbp), %rax
cmpb $0x0, 0x34(%rax)
je 0x3bf53
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3bf6e
jmp 0x3bf60
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3bed1
jmp 0x3bf70
movl -0x28(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl -0x24(%rbp), %eax
popq %rbp
retq
nop