#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 ldl_invalidstatement(char *statementp) {
  const int TRUE = 1;
  const int FALSE = 0;
  if (statementp[0] == '#')
    return TRUE;
  if (statementp[0] == ' ' || statementp[0] == '\t' || statementp[0] == '\n')
    return TRUE;
  if (strlen(statementp) > 500)
    return TRUE;
  return FALSE;
}


x86 assembly (clang, -O0):
<ldl_invalidstatement>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    1146 <ldl_invalidstatement+0x36>
movl   $0x1,-0x4(%rbp)
jmp    11a9 <ldl_invalidstatement+0x99>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1176 <ldl_invalidstatement+0x66>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
je     1176 <ldl_invalidstatement+0x66>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1182 <ldl_invalidstatement+0x72>
movl   $0x1,-0x4(%rbp)
jmp    11a9 <ldl_invalidstatement+0x99>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x1f4,%eax
jle    11a2 <ldl_invalidstatement+0x92>
movl   $0x1,-0x4(%rbp)
jmp    11a9 <ldl_invalidstatement+0x99>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldl_invalidstatement>:
push   %rax
movzbl (%rdi),%ecx
cmp    $0x23,%rcx
ja     1131 <ldl_invalidstatement+0x21>
mov    $0x1,%eax
movabs $0x900000600,%rdx
bt     %rcx,%rdx
jae    1131 <ldl_invalidstatement+0x21>
pop    %rcx
ret
call   1030 <strlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1f5,%ecx
setge  %al
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @ldl_invalidstatement(i8* %0) {
%2 = load i8, i8* %0
switch i8 %2, label %3 [
i8 35, label %7
i8 32, label %7
i8 9, label %7
i8 10, label %7
]
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = icmp sgt i32 %4, 500
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1, %1, %1, %1
%8 = phi i32 [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}