#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 */
scalar_t__ lineFileNext(struct lineFile *, char **, int *);
char *skipLeadingSpaces(char *);
int lineFileNextRealWithSize(struct lineFile *lf, char **retStart,
                             int *retSize) {
  char *s, c;
  while (lineFileNext(lf, retStart, retSize)) {
    s = skipLeadingSpaces(*retStart);
    c = s[0];
    if (c != 0 && c != '#')
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<lineFileNextRealWithSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <lineFileNext@plt>
cmp    $0x0,%rax
je     1193 <lineFileNextRealWithSize+0x73>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1030 <skipLeadingSpaces@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x29(%rbp)
movsbl -0x29(%rbp),%eax
cmp    $0x0,%eax
je     118e <lineFileNextRealWithSize+0x6e>
movsbl -0x29(%rbp),%eax
cmp    $0x23,%eax
je     118e <lineFileNextRealWithSize+0x6e>
movl   $0x1,-0x4(%rbp)
jmp    119a <lineFileNextRealWithSize+0x7a>
jmp    1134 <lineFileNextRealWithSize+0x14>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lineFileNextRealWithSize>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r15
mov    %rsi,%rbp
mov    %rdi,%rbx
call   1040 <lineFileNext@plt>
xor    %r14d,%r14d
jmp    114e <lineFileNextRealWithSize+0x2e>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
call   1040 <lineFileNext@plt>
test   %rax,%rax
je     116d <lineFileNextRealWithSize+0x4d>
mov    0x0(%rbp),%rdi
call   1030 <skipLeadingSpaces@plt>
movzbl (%rax),%eax
cmp    $0x23,%al
je     1140 <lineFileNextRealWithSize+0x20>
test   %al,%al
je     1140 <lineFileNextRealWithSize+0x20>
mov    $0x1,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
%struct.lineFile = type { i32 }
define i32 @lineFileNextRealWithSize(%struct.lineFile* %0, i8** %1, i32* %2) {
%4 = tail call i64 @lineFileNext(%struct.lineFile* %0, i8** %1, i32* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %10
%7 = load i8*, i8** %1
%8 = tail call i8* @skipLeadingSpaces(i8* %7)
%9 = load i8, i8* %8
switch i8 %9, label %13 [
i8 35, label %10
i8 0, label %10
]
10: ; preds = %6, %6
%11 = tail call i64 @lineFileNext(%struct.lineFile* %0, i8** %1, i32* %2)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %10, %3
%14 = phi i32 [ 0, %3 ], [ 0, %10 ], [ 1, %6 ]
ret i32 %14
}