#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct lineFile {
  int dummy;
};

/* Variables and functions */
int lineFileChopCharNext(struct lineFile *, char, char **, int);
int /*<<< orphan*/ lineFileExpectWords(struct lineFile *, int, int);
int lineFileNextCharRow(struct lineFile *lf, char sep, char *words[],
                        int wordCount) {
  int wordsRead;
  wordsRead = lineFileChopCharNext(lf, sep, words, wordCount);
  if (wordsRead == 0)
    return 0;
  if (wordsRead < wordCount)
    lineFileExpectWords(lf, wordCount, wordsRead);
  return 1;
}


x86 assembly (clang, -O0):
<lineFileNextCharRow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x11(%rbp),%al
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
movsbl %al,%esi
call   1030 <lineFileChopCharNext@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jne    1168 <lineFileNextCharRow+0x48>
movl   $0x0,-0x4(%rbp)
jmp    118a <lineFileNextCharRow+0x6a>
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1183 <lineFileNextCharRow+0x63>
mov    -0x10(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
call   1040 <lineFileExpectWords@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lineFileNextCharRow>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%ebx
mov    %rdi,%rbp
call   1030 <lineFileChopCharNext@plt>
test   %eax,%eax
je     114a <lineFileNextCharRow+0x2a>
mov    $0x1,%r14d
cmp    %ebx,%eax
jge    114d <lineFileNextCharRow+0x2d>
mov    %rbp,%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <lineFileExpectWords@plt>
jmp    114d <lineFileNextCharRow+0x2d>
xor    %r14d,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.lineFile = type { i32 }
define i32 @lineFileNextCharRow(%struct.lineFile* %0, i8 signext %1, i8** %2, i32 %3) {
%5 = alloca i32
%6 = alloca %struct.lineFile*
%7 = alloca i8
%8 = alloca i8**
%9 = alloca i32
%10 = alloca i32
store %struct.lineFile* %0, %struct.lineFile** %6
store i8 %1, i8* %7
store i8** %2, i8*** %8
store i32 %3, i32* %9
%11 = load %struct.lineFile*, %struct.lineFile** %6
%12 = load i8, i8* %7
%13 = load i8**, i8*** %8
%14 = load i32, i32* %9
%15 = call i32 @lineFileChopCharNext(%struct.lineFile* %11, i8 signext %12, i8** %13, i32 %14)
store i32 %15, i32* %10
%16 = load i32, i32* %10
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %4
store i32 0, i32* %5
br label %29
19: ; preds = %4
%20 = load i32, i32* %10
%21 = load i32, i32* %9
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %28
23: ; preds = %19
%24 = load %struct.lineFile*, %struct.lineFile** %6
%25 = load i32, i32* %9
%26 = load i32, i32* %10
%27 = call i32 @lineFileExpectWords(%struct.lineFile* %24, i32 %25, i32 %26)
br label %28
28: ; preds = %23, %19
store i32 1, i32* %5
br label %29
29: ; preds = %28, %18
%30 = load i32, i32* %5
ret i32 %30
}

LLVM IR (-O2):
%struct.lineFile = type { i32 }
define i32 @lineFileNextCharRow(%struct.lineFile* %0, i8 signext %1, i8** %2, i32 %3) {
%5 = tail call i32 @lineFileChopCharNext(%struct.lineFile* %0, i8 signext %1, i8** %2, i32 %3)
%6 = icmp eq i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = icmp slt i32 %5, %3
br i1 %8, label %9, label %11
9: ; preds = %7
%10 = tail call i32 @lineFileExpectWords(%struct.lineFile* %0, i32 %3, i32 %5)
br label %11
11: ; preds = %7, %9, %4
%12 = phi i32 [ 0, %4 ], [ 1, %9 ], [ 1, %7 ]
ret i32 %12
}