#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 */
typedef int /*<<< orphan*/ list;

/* Variables and functions */
int strcmp(char *, char *);
int isnoiseword(char *w) {
  char *list[] = {"I",   "a",  "an",   "and", "are",  "be",   "but", "by",
                  "he",  "in", "is",   "it",  "of",   "off",  "on",  "or",
                  "she", "so", "that", "the", "they", "this", "to",  "you"};
  int cond;
  int low, high, mid;
  low = 0;
  high = sizeof(list) / sizeof(char *) - 1;
  while (low <= high) {
    mid = (low + high) / 2;
    if ((cond = strcmp(w, list[mid])) < 0)
      high = mid - 1;
    else if (cond > 0)
      low = mid + 1;
    else
      return mid;
  }
  return -1;
}


x86 assembly (clang, -O0):
<isnoiseword>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0xd0(%rbp),%rdi
lea    0x2c23(%rip),%rsi
mov    $0xc0,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0xd8(%rbp)
movl   $0x17,-0xdc(%rbp)
mov    -0xd8(%rbp),%eax
cmp    -0xdc(%rbp),%eax
jg     11fb <isnoiseword+0xdb>
mov    -0xd8(%rbp),%eax
add    -0xdc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xe0(%rbp)
mov    -0x10(%rbp),%rdi
movslq -0xe0(%rbp),%rax
mov    -0xd0(%rbp,%rax,8),%rsi
ff
call   1030 <strcmp@plt>
mov    %eax,-0xd4(%rbp)
cmp    $0x0,%eax
jge    11c2 <isnoiseword+0xa2>
mov    -0xe0(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xdc(%rbp)
jmp    11f6 <isnoiseword+0xd6>
cmpl   $0x0,-0xd4(%rbp)
jle    11e3 <isnoiseword+0xc3>
mov    -0xe0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd8(%rbp)
jmp    11f1 <isnoiseword+0xd1>
mov    -0xe0(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1202 <isnoiseword+0xe2>
jmp    11f6 <isnoiseword+0xd6>
jmp    115b <isnoiseword+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnoiseword>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdi,%r14
xor    %r12d,%r12d
mov    $0x17,%ebx
lea    0xf26(%rip),%r15
jmp    113a <isnoiseword+0x2a>
nopl   0x0(%rax)
add    $0xffffffff,%ebp
mov    %ebp,%ebx
cmp    %ebx,%r12d
jg     116a <isnoiseword+0x5a>
lea    (%rbx,%r12,1),%eax
mov    %eax,%ebp
shr    $0x1f,%ebp
add    %eax,%ebp
sar    %ebp
movslq %ebp,%rax
movslq (%r15,%rax,4),%rsi
add    %r15,%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
js     1130 <isnoiseword+0x20>
je     116f <isnoiseword+0x5f>
add    $0x1,%ebp
mov    %ebp,%r12d
cmp    %ebx,%r12d
jle    113a <isnoiseword+0x2a>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"I\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [3 x i8] c"an\00"
@.str.3 = [4 x i8] c"and\00"
@.str.4 = [4 x i8] c"are\00"
@.str.5 = [3 x i8] c"be\00"
@.str.6 = [4 x i8] c"but\00"
@.str.7 = [3 x i8] c"by\00"
@.str.8 = [3 x i8] c"he\00"
@.str.9 = [3 x i8] c"in\00"
@.str.10 = [3 x i8] c"is\00"
@.str.11 = [3 x i8] c"it\00"
@.str.12 = [3 x i8] c"of\00"
@.str.13 = [4 x i8] c"off\00"
@.str.14 = [3 x i8] c"on\00"
@.str.15 = [3 x i8] c"or\00"
@.str.16 = [4 x i8] c"she\00"
@.str.17 = [3 x i8] c"so\00"
@.str.18 = [5 x i8] c"that\00"
@.str.19 = [4 x i8] c"the\00"
@.str.20 = [5 x i8] c"they\00"
@.str.21 = [5 x i8] c"this\00"
@.str.22 = [3 x i8] c"to\00"
@.str.23 = [4 x i8] c"you\00"
@__const.isnoiseword.list = [24 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 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 ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 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 ([3 x i8], [3 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 ([3 x i8], [3 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.23, i32 0, i32 0)]
define i32 @isnoiseword(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [24 x i8*]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %3
%9 = bitcast [24 x i8*]* %4 to i8*
store i32 0, i32* %6
store i32 23, i32* %7
br label %10
10: ; preds = %38, %1
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = icmp sle i32 %11, %12
br i1 %13, label %14, label %39
14: ; preds = %10
%15 = load i32, i32* %6
%16 = load i32, i32* %7
%17 = add nsw i32 %15, %16
%18 = sdiv i32 %17, 2
store i32 %18, i32* %8
%19 = load i8*, i8** %3
%20 = load i32, i32* %8
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [24 x i8*], [24 x i8*]* %4, i64 0, i64 %21
%23 = load i8*, i8** %22
%24 = call i32 @strcmp(i8* %19, i8* %23)
store i32 %24, i32* %5
%25 = icmp slt i32 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %14
%27 = load i32, i32* %8
%28 = sub nsw i32 %27, 1
store i32 %28, i32* %7
br label %38
29: ; preds = %14
%30 = load i32, i32* %5
%31 = icmp sgt i32 %30, 0
br i1 %31, label %32, label %35
32: ; preds = %29
%33 = load i32, i32* %8
%34 = add nsw i32 %33, 1
store i32 %34, i32* %6
br label %37
35: ; preds = %29
%36 = load i32, i32* %8
store i32 %36, i32* %2
br label %40
37: ; preds = %32
br label %38
38: ; preds = %37, %26
br label %10
39: ; preds = %10
store i32 -1, i32* %2
br label %40
40: ; preds = %39, %35
%41 = load i32, i32* %2
ret i32 %41
}

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