#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 */

/* Variables and functions */
int strlen(char *);
int isLineComment(char *Line) {
  if (strlen(Line) < 5)
    return 1;
  while (Line) {
    if (*Line != ' ' && *Line != '#')
      return 0;
    if (*Line == '#')
      return 1;
    Line++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isLineComment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x5,%eax
jge    113a <isLineComment+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    11aa <isLineComment+0x9a>
jmp    113f <isLineComment+0x2f>
cmpq   $0x0,-0x10(%rbp)
je     11a3 <isLineComment+0x93>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1176 <isLineComment+0x66>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
je     1176 <isLineComment+0x66>
movl   $0x0,-0x4(%rbp)
jmp    11aa <isLineComment+0x9a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    1192 <isLineComment+0x82>
movl   $0x1,-0x4(%rbp)
jmp    11aa <isLineComment+0x9a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    113f <isLineComment+0x2f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isLineComment>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    $0x5,%ecx
jl     1145 <isLineComment+0x35>
test   %rbx,%rbx
je     1145 <isLineComment+0x35>
nopw   0x0(%rax,%rax,1)
movzbl (%rbx),%ecx
cmp    $0x20,%cl
jne    113e <isLineComment+0x2e>
add    $0x1,%rbx
jmp    1130 <isLineComment+0x20>
cmp    $0x23,%cl
je     1145 <isLineComment+0x35>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @isLineComment(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp slt i32 %2, 5
%4 = icmp eq i8* %0, null
%5 = or i1 %3, %4
br i1 %5, label %12, label %6
6: ; preds = %1, %9
%7 = phi i8* [ %10, %9 ], [ %0, %1 ]
%8 = load i8, i8* %7
switch i8 %8, label %11 [
i8 35, label %12
i8 32, label %9
]
9: ; preds = %6
%10 = getelementptr inbounds i8, i8* %7, i64 1
br label %6
11: ; preds = %6
br label %12
12: ; preds = %6, %11, %1
%13 = phi i32 [ 1, %1 ], [ 0, %11 ], [ 1, %6 ]
ret i32 %13
}