#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 chopByChar(char *, char, char **, int);
scalar_t__ lineFileNext(struct lineFile *, char **, int *);
int lineFileChopCharNext(struct lineFile *lf, char sep, char *words[],
                         int maxWords) {
  int lineSize, wordCount;
  char *line;
  while (lineFileNext(lf, &line, &lineSize)) {
    if (line[0] == '#')
      continue;
    wordCount = chopByChar(line, sep, words, maxWords);
    if (wordCount != 0)
      return wordCount;
  }
  return 0;
}


x86 assembly (clang, -O0):
<lineFileChopCharNext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x38(%rbp),%rsi
lea    -0x28(%rbp),%rdx
call   1030 <lineFileNext@plt>
cmp    $0x0,%rax
je     119c <lineFileChopCharNext+0x7c>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    1169 <lineFileChopCharNext+0x49>
jmp    1139 <lineFileChopCharNext+0x19>
mov    -0x38(%rbp),%rdi
mov    -0x11(%rbp),%al
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
movsbl %al,%esi
call   1040 <chopByChar@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1197 <lineFileChopCharNext+0x77>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11a3 <lineFileChopCharNext+0x83>
jmp    1139 <lineFileChopCharNext+0x19>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lineFileChopCharNext>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %ecx,%r14d
mov    %rdx,%r12
mov    %esi,%r15d
mov    %rdi,%rbp
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <lineFileNext@plt>
xor    %ecx,%ecx
test   %rax,%rax
je     1195 <lineFileChopCharNext+0x75>
lea    0x10(%rsp),%r13
lea    0xc(%rsp),%rbx
movsbl %r15b,%r15d
jmp    1173 <lineFileChopCharNext+0x53>
mov    %rbp,%rdi
mov    %r13,%rsi
mov    %rbx,%rdx
call   1030 <lineFileNext@plt>
test   %rax,%rax
je     1193 <lineFileChopCharNext+0x73>
mov    0x10(%rsp),%rdi
cmpb   $0x23,(%rdi)
je     1160 <lineFileChopCharNext+0x40>
mov    %r15d,%esi
mov    %r12,%rdx
mov    %r14d,%ecx
call   1040 <chopByChar@plt>
test   %eax,%eax
je     1160 <lineFileChopCharNext+0x40>
mov    %eax,%ecx
jmp    1195 <lineFileChopCharNext+0x75>
xor    %ecx,%ecx
mov    %ecx,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.lineFile = type { i32 }
define i32 @lineFileChopCharNext(%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
%11 = alloca i32
%12 = alloca i8*
store %struct.lineFile* %0, %struct.lineFile** %6
store i8 %1, i8* %7
store i8** %2, i8*** %8
store i32 %3, i32* %9
br label %13
13: ; preds = %34, %23, %4
%14 = load %struct.lineFile*, %struct.lineFile** %6
%15 = call i64 @lineFileNext(%struct.lineFile* %14, i8** %12, i32* %10)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %35
17: ; preds = %13
%18 = load i8*, i8** %12
%19 = getelementptr inbounds i8, i8* %18, i64 0
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 35
br i1 %22, label %23, label %24
23: ; preds = %17
br label %13
24: ; preds = %17
%25 = load i8*, i8** %12
%26 = load i8, i8* %7
%27 = load i8**, i8*** %8
%28 = load i32, i32* %9
%29 = call i32 @chopByChar(i8* %25, i8 signext %26, i8** %27, i32 %28)
store i32 %29, i32* %11
%30 = load i32, i32* %11
%31 = icmp ne i32 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %24
%33 = load i32, i32* %11
store i32 %33, i32* %5
br label %36
34: ; preds = %24
br label %13
35: ; preds = %13
store i32 0, i32* %5
br label %36
36: ; preds = %35, %32
%37 = load i32, i32* %5
ret i32 %37
}

LLVM IR (-O2):
%struct.lineFile = type { i32 }
define i32 @lineFileChopCharNext(%struct.lineFile* %0, i8 signext %1, i8** %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = bitcast i32* %5 to i8*
%8 = bitcast i8** %6 to i8*
%9 = call i64 @lineFileNext(%struct.lineFile* %0, i8** %6, i32* %5)
%10 = icmp eq i64 %9, 0
br i1 %10, label %21, label %11
11: ; preds = %4, %15
%12 = load i8*, i8** %6
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 35
br i1 %14, label %15, label %18
15: ; preds = %11, %18
%16 = call i64 @lineFileNext(%struct.lineFile* %0, i8** %6, i32* %5)
%17 = icmp eq i64 %16, 0
br i1 %17, label %21, label %11
18: ; preds = %11
%19 = call i32 @chopByChar(i8* %12, i8 signext %1, i8** %2, i32 %3)
%20 = icmp eq i32 %19, 0
br i1 %20, label %15, label %21
21: ; preds = %18, %15, %4
%22 = phi i32 [ 0, %4 ], [ 0, %15 ], [ %19, %18 ]
ret i32 %22
}