#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 */
scalar_t__ strcmp(char *, char *);
int match_attr(char *t) {
  return strcmp(t, "struct_union") == 0 ? 0x00000001
         : strcmp(t, "enum") == 0       ? 0x00000002
         : strcmp(t, "auto") == 0       ? 0x00000004
         : strcmp(t, "register") == 0   ? 0x00000008
         : strcmp(t, "static") == 0     ? 0x00000010
         : strcmp(t, "extern") == 0     ? 0x00000020
         : strcmp(t, "typedef") == 0    ? 0x00000040
         : strcmp(t, "unsigned") == 0   ? 0x00000080
         : strcmp(t, "signed") == 0     ? 0x00000100
         : strcmp(t, "volatile") == 0   ? 0x00000200
                                        : 0;
}


x86 assembly (clang, -O0):
<match_attr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1143 <match_attr+0x33>
mov    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12cf <match_attr+0x1bf>
mov    -0x8(%rbp),%rdi
lea    0xebf(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    116a <match_attr+0x5a>
mov    $0x2,%eax
mov    %eax,-0x10(%rbp)
jmp    12c9 <match_attr+0x1b9>
mov    -0x8(%rbp),%rdi
lea    0xe9d(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1191 <match_attr+0x81>
mov    $0x4,%eax
mov    %eax,-0x14(%rbp)
jmp    12c3 <match_attr+0x1b3>
mov    -0x8(%rbp),%rdi
lea    0xe7b(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11b8 <match_attr+0xa8>
mov    $0x8,%eax
mov    %eax,-0x18(%rbp)
jmp    12bd <match_attr+0x1ad>
mov    -0x8(%rbp),%rdi
lea    0xe5d(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11df <match_attr+0xcf>
mov    $0x10,%eax
mov    %eax,-0x1c(%rbp)
jmp    12b7 <match_attr+0x1a7>
mov    -0x8(%rbp),%rdi
lea    0xe3d(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1206 <match_attr+0xf6>
mov    $0x20,%eax
mov    %eax,-0x20(%rbp)
jmp    12b1 <match_attr+0x1a1>
mov    -0x8(%rbp),%rdi
lea    0xe1d(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    122d <match_attr+0x11d>
mov    $0x40,%eax
mov    %eax,-0x24(%rbp)
jmp    12ab <match_attr+0x19b>
mov    -0x8(%rbp),%rdi
lea    0xdfe(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1254 <match_attr+0x144>
mov    $0x80,%eax
mov    %eax,-0x28(%rbp)
jmp    12a5 <match_attr+0x195>
mov    -0x8(%rbp),%rdi
lea    0xdd9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    127b <match_attr+0x16b>
mov    $0x100,%eax
mov    %eax,-0x2c(%rbp)
jmp    129f <match_attr+0x18f>
mov    -0x8(%rbp),%rdi
lea    0xdb9(%rip),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x200,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<match_attr>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11f8 <match_attr+0xe8>
lea    0xedd(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11ff <match_attr+0xef>
lea    0xeca(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1206 <match_attr+0xf6>
lea    0xeb7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     120d <match_attr+0xfd>
lea    0xea8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1214 <match_attr+0x104>
lea    0xe97(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     121b <match_attr+0x10b>
lea    0xe8a(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1222 <match_attr+0x112>
lea    0xe7e(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1229 <match_attr+0x119>
lea    0xe6c(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1230 <match_attr+0x120>
lea    0xe5f(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
shl    $0x9,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret
mov    $0x2,%eax
pop    %rbx
ret
mov    $0x4,%eax
pop    %rbx
ret
mov    $0x8,%eax
pop    %rbx
ret
mov    $0x10,%eax
pop    %rbx
ret
mov    $0x20,%eax
pop    %rbx
ret
mov    $0x40,%eax
pop    %rbx
ret
mov    $0x80,%eax
pop    %rbx
ret
mov    $0x100,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"struct_union\00"
@.str.1 = [5 x i8] c"enum\00"
@.str.2 = [5 x i8] c"auto\00"
@.str.3 = [9 x i8] c"register\00"
@.str.4 = [7 x i8] c"static\00"
@.str.5 = [7 x i8] c"extern\00"
@.str.6 = [8 x i8] c"typedef\00"
@.str.7 = [9 x i8] c"unsigned\00"
@.str.8 = [7 x i8] c"signed\00"
@.str.9 = [9 x i8] c"volatile\00"
define i32 @match_attr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %69
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7
br label %67
12: ; preds = %7
%13 = load i8*, i8** %2
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %12
br label %65
17: ; preds = %12
%18 = load i8*, i8** %2
%19 = call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %17
br label %63
22: ; preds = %17
%23 = load i8*, i8** %2
%24 = call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %27
26: ; preds = %22
br label %61
27: ; preds = %22
%28 = load i8*, i8** %2
%29 = call i64 @strcmp(i8* %28, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %27
br label %59
32: ; preds = %27
%33 = load i8*, i8** %2
%34 = call i64 @strcmp(i8* %33, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %37
36: ; preds = %32
br label %57
37: ; preds = %32
%38 = load i8*, i8** %2
%39 = call i64 @strcmp(i8* %38, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %42
41: ; preds = %37
br label %55
42: ; preds = %37
%43 = load i8*, i8** %2
%44 = call i64 @strcmp(i8* %43, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %47
46: ; preds = %42
br label %53
47: ; preds = %42
%48 = load i8*, i8** %2
%49 = call i64 @strcmp(i8* %48, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
%51 = zext i1 %50 to i64
%52 = select i1 %50, i32 512, i32 0
br label %53
53: ; preds = %47, %46
%54 = phi i32 [ 256, %46 ], [ %52, %47 ]
br label %55
55: ; preds = %53, %41
%56 = phi i32 [ 128, %41 ], [ %54, %53 ]
br label %57
57: ; preds = %55, %36
%58 = phi i32 [ 64, %36 ], [ %56, %55 ]
br label %59
59: ; preds = %57, %31
%60 = phi i32 [ 32, %31 ], [ %58, %57 ]
br label %61
61: ; preds = %59, %26
%62 = phi i32 [ 16, %26 ], [ %60, %59 ]
br label %63
63: ; preds = %61, %21
%64 = phi i32 [ 8, %21 ], [ %62, %61 ]
br label %65
65: ; preds = %63, %16
%66 = phi i32 [ 4, %16 ], [ %64, %63 ]
br label %67
67: ; preds = %65, %11
%68 = phi i32 [ 2, %11 ], [ %66, %65 ]
br label %69
69: ; preds = %67, %6
%70 = phi i32 [ 1, %6 ], [ %68, %67 ]
ret i32 %70
}

LLVM IR (-O2):
@.str = [13 x i8] c"struct_union\00"
@.str.1 = [5 x i8] c"enum\00"
@.str.2 = [5 x i8] c"auto\00"
@.str.3 = [9 x i8] c"register\00"
@.str.4 = [7 x i8] c"static\00"
@.str.5 = [7 x i8] c"extern\00"
@.str.6 = [8 x i8] c"typedef\00"
@.str.7 = [9 x i8] c"unsigned\00"
@.str.8 = [7 x i8] c"signed\00"
@.str.9 = [9 x i8] c"volatile\00"
define i32 @match_attr(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %32, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %32, label %7
7: ; preds = %4
%8 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %32, label %10
10: ; preds = %7
%11 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %32, label %13
13: ; preds = %10
%14 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %32, label %16
16: ; preds = %13
%17 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %32, label %19
19: ; preds = %16
%20 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
br i1 %21, label %32, label %22
22: ; preds = %19
%23 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %32, label %25
25: ; preds = %22
%26 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %32, label %28
28: ; preds = %25
%29 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
%31 = select i1 %30, i32 512, i32 0
br label %32
32: ; preds = %4, %10, %16, %22, %25, %28, %19, %13, %7, %1
%33 = phi i32 [ 1, %1 ], [ 2, %4 ], [ 4, %7 ], [ 8, %10 ], [ 16, %13 ], [ 32, %16 ], [ 64, %19 ], [ 128, %22 ], [ %31, %28 ], [ 256, %25 ]
ret i32 %33
}