#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 strcmp(char *, char *);
int NoiseWord(char *s) {
  int found = 0;
  int giveup = 0;
  char *list[] = {"a",   "an", "and", "be", "but", "by",   "he", "I",
                  "off", "on", "she", "so", "the", "they", "you"};
  int top = sizeof list / sizeof list[0] - 1;
  int bottom = 0;
  int guess = top / 2;
  int diff = 0;
  if (s) {
    while (!found && !giveup) {
      diff = strcmp(list[guess], s);
      if (0 == diff) {
        found = 1;
      } else if (0 < diff) {
        top = guess - 1;
      } else {
        bottom = guess + 1;
      }
      if (top < bottom) {
        giveup = 1;
      } else {
        guess = (top + bottom) / 2;
      }
    }
  }
  return found;
}


x86 assembly (clang, -O0):
<NoiseWord>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
lea    -0x90(%rbp),%rdi
lea    0x2c55(%rip),%rsi
mov    $0x78,%edx
call   1040 <memcpy@plt>
movl   $0xe,-0x94(%rbp)
movl   $0x0,-0x98(%rbp)
mov    -0x94(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x9c(%rbp)
movl   $0x0,-0xa0(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     127b <NoiseWord+0x15b>
jmp    1197 <NoiseWord+0x77>
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xa1(%rbp)
jne    11b8 <NoiseWord+0x98>
cmpl   $0x0,-0x10(%rbp)
setne  %al
xor    $0xff,%al
mov    %al,-0xa1(%rbp)
mov    -0xa1(%rbp),%al
test   $0x1,%al
jne    11cb <NoiseWord+0xab>
jmp    1276 <NoiseWord+0x156>
movslq -0x9c(%rbp),%rax
mov    -0x90(%rbp,%rax,8),%rdi
ff
mov    -0x8(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0xa0(%rbp)
xor    %eax,%eax
cmp    -0xa0(%rbp),%eax
jne    1203 <NoiseWord+0xe3>
movl   $0x1,-0xc(%rbp)
jmp    1239 <NoiseWord+0x119>
xor    %eax,%eax
cmp    -0xa0(%rbp),%eax
jge    1225 <NoiseWord+0x105>
mov    -0x9c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    1234 <NoiseWord+0x114>
mov    -0x9c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x98(%rbp)
jmp    1239 <NoiseWord+0x119>
mov    -0x94(%rbp),%eax
cmp    -0x98(%rbp),%eax
jge    1257 <NoiseWord+0x137>
movl   $0x1,-0x10(%rbp)
jmp    1271 <NoiseWord+0x151>
mov    -0x94(%rbp),%eax
add    -0x98(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x9c(%rbp)
jmp    1197 <NoiseWord+0x77>
jmp    127b <NoiseWord+0x15b>
mov    -0xc(%rbp),%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NoiseWord>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
test   %rdi,%rdi
je     119c <NoiseWord+0x8c>
mov    %rdi,%r14
mov    $0xe,%r12d
xor    %r13d,%r13d
mov    $0x7,%ebx
lea    0xefa(%rip),%r15
jmp    1144 <NoiseWord+0x34>
nopl   0x0(%rax,%rax,1)
or     %eax,%ecx
jne    119e <NoiseWord+0x8e>
movslq %ebx,%rax
movslq (%r15,%rax,4),%rdi
add    %r15,%rdi
mov    %r14,%rsi
call   1030 <strcmp@plt>
mov    $0x1,%ecx
test   %eax,%eax
je     1170 <NoiseWord+0x60>
jle    1180 <NoiseWord+0x70>
lea    -0x1(%rbx),%r12d
jmp    1184 <NoiseWord+0x74>
nopw   0x0(%rax,%rax,1)
mov    $0x1,%eax
cmp    %r13d,%r12d
jl     1140 <NoiseWord+0x30>
jmp    118b <NoiseWord+0x7b>
nopl   0x0(%rax)
lea    0x1(%rbx),%r13d
xor    %eax,%eax
cmp    %r13d,%r12d
jl     1140 <NoiseWord+0x30>
lea    (%r12,%r13,1),%ecx
mov    %ecx,%ebx
shr    $0x1f,%ebx
add    %ecx,%ebx
sar    %ebx
xor    %ecx,%ecx
jmp    1140 <NoiseWord+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
@.str.1 = [3 x i8] c"an\00"
@.str.2 = [4 x i8] c"and\00"
@.str.3 = [3 x i8] c"be\00"
@.str.4 = [4 x i8] c"but\00"
@.str.5 = [3 x i8] c"by\00"
@.str.6 = [3 x i8] c"he\00"
@.str.7 = [2 x i8] c"I\00"
@.str.8 = [4 x i8] c"off\00"
@.str.9 = [3 x i8] c"on\00"
@.str.10 = [4 x i8] c"she\00"
@.str.11 = [3 x i8] c"so\00"
@.str.12 = [4 x i8] c"the\00"
@.str.13 = [5 x i8] c"they\00"
@.str.14 = [4 x i8] c"you\00"
@__const.NoiseWord.list = [15 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i32 0, i32 0)]
define i32 @NoiseWord(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca [15 x i8*]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
store i32 0, i32* %4
%10 = bitcast [15 x i8*]* %5 to i8*
store i32 14, i32* %6
store i32 0, i32* %7
%11 = load i32, i32* %6
%12 = sdiv i32 %11, 2
store i32 %12, i32* %8
store i32 0, i32* %9
%13 = load i8*, i8** %2
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %57
15: ; preds = %1
br label %16
16: ; preds = %55, %15
%17 = load i32, i32* %3
%18 = icmp ne i32 %17, 0
br i1 %18, label %23, label %19
19: ; preds = %16
%20 = load i32, i32* %4
%21 = icmp ne i32 %20, 0
%22 = xor i1 %21, true
br label %23
23: ; preds = %19, %16
%24 = phi i1 [ false, %16 ], [ %22, %19 ]
br i1 %24, label %25, label %56
25: ; preds = %23
%26 = load i32, i32* %8
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [15 x i8*], [15 x i8*]* %5, i64 0, i64 %27
%29 = load i8*, i8** %28
%30 = load i8*, i8** %2
%31 = call i32 @strcmp(i8* %29, i8* %30)
store i32 %31, i32* %9
%32 = load i32, i32* %9
%33 = icmp eq i32 0, %32
br i1 %33, label %34, label %35
34: ; preds = %25
store i32 1, i32* %3
br label %45
35: ; preds = %25
%36 = load i32, i32* %9
%37 = icmp slt i32 0, %36
br i1 %37, label %38, label %41
38: ; preds = %35
%39 = load i32, i32* %8
%40 = sub nsw i32 %39, 1
store i32 %40, i32* %6
br label %44
41: ; preds = %35
%42 = load i32, i32* %8
%43 = add nsw i32 %42, 1
store i32 %43, i32* %7
br label %44
44: ; preds = %41, %38
br label %45
45: ; preds = %44, %34
%46 = load i32, i32* %6
%47 = load i32, i32* %7
%48 = icmp slt i32 %46, %47
br i1 %48, label %49, label %50
49: ; preds = %45
store i32 1, i32* %4
br label %55
50: ; preds = %45
%51 = load i32, i32* %6
%52 = load i32, i32* %7
%53 = add nsw i32 %51, %52
%54 = sdiv i32 %53, 2
store i32 %54, i32* %8
br label %55
55: ; preds = %50, %49
br label %16
56: ; preds = %23
br label %57
57: ; preds = %56, %1
%58 = load i32, i32* %3
ret i32 %58
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
@.str.1 = [3 x i8] c"an\00"
@.str.2 = [4 x i8] c"and\00"
@.str.3 = [3 x i8] c"be\00"
@.str.4 = [4 x i8] c"but\00"
@.str.5 = [3 x i8] c"by\00"
@.str.6 = [3 x i8] c"he\00"
@.str.7 = [2 x i8] c"I\00"
@.str.8 = [4 x i8] c"off\00"
@.str.9 = [3 x i8] c"on\00"
@.str.10 = [4 x i8] c"she\00"
@.str.11 = [3 x i8] c"so\00"
@.str.12 = [4 x i8] c"the\00"
@.str.13 = [5 x i8] c"they\00"
@.str.14 = [4 x i8] c"you\00"
@reltable.NoiseWord = [15 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str to i64), i64 ptrtoint ([15 x i32]* @reltable.NoiseWord to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.1 to i64), i64 ptrtoint ([15 x i32]* @reltable.NoiseWord to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.2 to i64), i64 ptrtoint ([15 x i32]* @reltable.NoiseWord to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.3 to i64), i64 ptrtoint ([15 x i32]* @reltable.NoiseWord to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.4 to i64), i64 ptrtoint ([15 x i32]* @reltable.NoiseWord to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.5 to i64), i64 ptrtoint ([15 x i32]* @reltable.NoiseWord to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.6 to i64), i64 ptrtoint ([15 x i32]* @reltable.NoiseWord to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.7 to i64), i64 ptrtoint ([15 x i32]* @reltable.NoiseWord to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.8 to i64), i64 ptrtoint ([15 x i32]* @reltable.NoiseWord to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.9 to i64), i64 ptrtoint ([15 x i32]* @reltable.NoiseWord to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.10 to i64), i64 ptrtoint ([15 x i32]* @reltable.NoiseWord to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.11 to i64), i64 ptrtoint ([15 x i32]* @reltable.NoiseWord to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.12 to i64), i64 ptrtoint ([15 x i32]* @reltable.NoiseWord to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.13 to i64), i64 ptrtoint ([15 x i32]* @reltable.NoiseWord to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.14 to i64), i64 ptrtoint ([15 x i32]* @reltable.NoiseWord to i64)) to i32)]
define i32 @NoiseWord(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %31, label %3
3: ; preds = %1, %26
%4 = phi i32 [ %28, %26 ], [ 7, %1 ]
%5 = phi i32 [ %21, %26 ], [ 0, %1 ]
%6 = phi i32 [ %20, %26 ], [ 14, %1 ]
%7 = sext i32 %4 to i64
%8 = shl i64 %7, 2
%9 = call i8* @llvm.load.relative.i64(i8* bitcast ([15 x i32]* @reltable.NoiseWord to i8*), i64 %8)
%10 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* %0)
%11 = icmp eq i32 %10, 0
br i1 %11, label %18, label %12
12: ; preds = %3
%13 = icmp sgt i32 %10, 0
br i1 %13, label %14, label %16
14: ; preds = %12
%15 = add nsw i32 %4, -1
br label %18
16: ; preds = %12
%17 = add nsw i32 %4, 1
br label %18
18: ; preds = %3, %14, %16
%19 = phi i32 [ 0, %14 ], [ 0, %16 ], [ 1, %3 ]
%20 = phi i32 [ %15, %14 ], [ %6, %16 ], [ %6, %3 ]
%21 = phi i32 [ %5, %14 ], [ %17, %16 ], [ %5, %3 ]
%22 = icmp slt i32 %20, %21
br i1 %22, label %26, label %23
23: ; preds = %18
%24 = add nsw i32 %21, %20
%25 = sdiv i32 %24, 2
br label %26
26: ; preds = %18, %23
%27 = phi i32 [ 0, %23 ], [ 1, %18 ]
%28 = phi i32 [ %25, %23 ], [ %4, %18 ]
%29 = or i32 %27, %19
%30 = icmp eq i32 %29, 0
br i1 %30, label %3, label %31
31: ; preds = %26, %1
%32 = phi i32 [ 0, %1 ], [ %19, %26 ]
ret i32 %32
}