int is_type_word(s)
char *s;
{
  static char *typewords[] = {"char",   "const",    "double", "enum",
                              "float",  "int",      "long",   "short",
                              "signed", "struct",   "union",  "unsigned",
                              "void",   "volatile", (char *)0};
  register char **ss;
  for (ss = typewords; *ss; ++ss)
    if (strcmp(s, *ss) == 0)
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_type_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    0x2f0d(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     1170 <is_type_word+0x60>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    115a <is_type_word+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1177 <is_type_word+0x67>
jmp    115f <is_type_word+0x4f>
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
jmp    1127 <is_type_word+0x17>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_type_word>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee3(%rip),%rsi
call   1030 <strcmp@plt>
mov    $0x1,%ebp
test   %eax,%eax
je     1242 <is_type_word+0x132>
lea    0xecf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1242 <is_type_word+0x132>
lea    0xebe(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1242 <is_type_word+0x132>
lea    0xeae(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1242 <is_type_word+0x132>
lea    0xe9c(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1242 <is_type_word+0x132>
lea    0xe8b(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1242 <is_type_word+0x132>
lea    0xe78(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1242 <is_type_word+0x132>
lea    0xe66(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1242 <is_type_word+0x132>
lea    0xe68(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1242 <is_type_word+0x132>
lea    0xe46(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1242 <is_type_word+0x132>
lea    0xe3a(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1242 <is_type_word+0x132>
lea    0xe2d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1242 <is_type_word+0x132>
lea    0xe23(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1242 <is_type_word+0x132>
lea    0xe15(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %ebp,%ebp
test   %eax,%eax
sete   %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@is_type_word.typewords = internal global [15 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i32 0, i32 0), i8* null]
@.str = [5 x i8] c"char\00"
@.str.1 = [6 x i8] c"const\00"
@.str.2 = [7 x i8] c"double\00"
@.str.3 = [5 x i8] c"enum\00"
@.str.4 = [6 x i8] c"float\00"
@.str.5 = [4 x i8] c"int\00"
@.str.6 = [5 x i8] c"long\00"
@.str.7 = [6 x i8] c"short\00"
@.str.8 = [7 x i8] c"signed\00"
@.str.9 = [7 x i8] c"struct\00"
@.str.10 = [6 x i8] c"union\00"
@.str.11 = [9 x i8] c"unsigned\00"
@.str.12 = [5 x i8] c"void\00"
@.str.13 = [9 x i8] c"volatile\00"
define i32 @is_type_word(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** getelementptr inbounds ([15 x i8*], [15 x i8*]* @is_type_word.typewords, i64 0, i64 0), i8*** %4
br label %5
5: ; preds = %17, %1
%6 = load i8**, i8*** %4
%7 = load i8*, i8** %6
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %20
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = load i8**, i8*** %4
%12 = load i8*, i8** %11
%13 = call i32 @strcmp(i8* %10, i8* %12)
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %9
store i32 1, i32* %2
br label %21
16: ; preds = %9
br label %17
17: ; preds = %16
%18 = load i8**, i8*** %4
%19 = getelementptr inbounds i8*, i8** %18, i32 1
store i8** %19, i8*** %4
br label %5
20: ; preds = %5
store i32 0, i32* %2
br label %21
21: ; preds = %20, %15
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
@.str = [5 x i8] c"char\00"
@.str.1 = [6 x i8] c"const\00"
@.str.2 = [7 x i8] c"double\00"
@.str.3 = [5 x i8] c"enum\00"
@.str.4 = [6 x i8] c"float\00"
@.str.5 = [4 x i8] c"int\00"
@.str.6 = [5 x i8] c"long\00"
@.str.7 = [6 x i8] c"short\00"
@.str.8 = [7 x i8] c"signed\00"
@.str.9 = [7 x i8] c"struct\00"
@.str.10 = [6 x i8] c"union\00"
@.str.11 = [9 x i8] c"unsigned\00"
@.str.12 = [5 x i8] c"void\00"
@.str.13 = [9 x i8] c"volatile\00"
define i32 @is_type_word(i8* nocapture %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %44, label %4
4: ; preds = %1
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i32 %5, 0
br i1 %6, label %44, label %7
7: ; preds = %4
%8 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %44, label %10
10: ; preds = %7
%11 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
br i1 %12, label %44, label %13
13: ; preds = %10
%14 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
br i1 %15, label %44, label %16
16: ; preds = %13
%17 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %44, label %19
19: ; preds = %16
%20 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
br i1 %21, label %44, label %22
22: ; preds = %19
%23 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%24 = icmp eq i32 %23, 0
br i1 %24, label %44, label %25
25: ; preds = %22
%26 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%27 = icmp eq i32 %26, 0
br i1 %27, label %44, label %28
28: ; preds = %25
%29 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%30 = icmp eq i32 %29, 0
br i1 %30, label %44, label %31
31: ; preds = %28
%32 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%33 = icmp eq i32 %32, 0
br i1 %33, label %44, label %34
34: ; preds = %31
%35 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
%36 = icmp eq i32 %35, 0
br i1 %36, label %44, label %37
37: ; preds = %34
%38 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0))
%39 = icmp eq i32 %38, 0
br i1 %39, label %44, label %40
40: ; preds = %37
%41 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0))
%42 = icmp eq i32 %41, 0
%43 = zext i1 %42 to i32
br label %44
44: ; preds = %40, %37, %34, %31, %28, %25, %22, %19, %16, %13, %10, %7, %4, %1
%45 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 1, %7 ], [ 1, %10 ], [ 1, %13 ], [ 1, %16 ], [ 1, %19 ], [ 1, %22 ], [ 1, %25 ], [ 1, %28 ], [ 1, %31 ], [ 1, %34 ], [ 1, %37 ], [ %43, %40 ]
ret i32 %45
}