#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 /*<<< orphan*/ strcmp(char const *, char *);
int identify(const char *ident) {
  int r = ((256 + 20) + 2);
  switch (*ident) {
  case 'i':
    if ((strcmp((ident), ("if")) == 0))
      r = ((256 + 20) + 3);
    break;
  case 'w':
    if ((strcmp((ident), ("while")) == 0))
      r = ((256 + 20) + 4);
    break;
  case 'c':
    if ((strcmp((ident), ("case")) == 0))
      r = ((256 + 20) + 5);
    else if ((strcmp((ident), ("class")) == 0))
      r = ((256 + 20) + 10);
    else if ((strcmp((ident), ("const")) == 0))
      r = ((256 + 20) + 12);
    break;
  case 's':
    if ((strcmp((ident), ("switch")) == 0))
      r = ((256 + 20) + 6);
    else if ((strcmp((ident), ("struct")) == 0))
      r = ((256 + 20) + 9);
    break;
  case 'f':
    if ((strcmp((ident), ("for")) == 0))
      r = ((256 + 20) + 7);
    break;
  case 'u':
    if ((strcmp((ident), ("union")) == 0))
      r = ((256 + 20) + 8);
    break;
  case 'o':
    if ((strcmp((ident), ("operator")) == 0))
      r = ((256 + 20) + 11);
    break;
  case 'n':
    if ((strcmp((ident), ("namespace")) == 0))
      r = ((256 + 20) + 13);
    break;
  }
  return r;
}


x86 assembly (clang, -O0):
<identify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x116,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
add    $0xffffff9d,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x14,%eax
ja     12f6 <identify+0x1e6>
mov    -0x18(%rbp),%rax
lea    0xeb9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%rdi
lea    0xef9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1170 <identify+0x60>
movl   $0x117,-0xc(%rbp)
jmp    12f6 <identify+0x1e6>
mov    -0x8(%rbp),%rdi
lea    0xed7(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1195 <identify+0x85>
movl   $0x118,-0xc(%rbp)
jmp    12f6 <identify+0x1e6>
mov    -0x8(%rbp),%rdi
lea    0xeb8(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11bf <identify+0xaf>
movl   $0x119,-0xc(%rbp)
jmp    120e <identify+0xfe>
mov    -0x8(%rbp),%rdi
lea    0xe98(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11e4 <identify+0xd4>
movl   $0x11e,-0xc(%rbp)
jmp    1209 <identify+0xf9>
mov    -0x8(%rbp),%rdi
lea    0xe79(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1204 <identify+0xf4>
movl   $0x120,-0xc(%rbp)
jmp    1209 <identify+0xf9>
jmp    120e <identify+0xfe>
jmp    12f6 <identify+0x1e6>
mov    -0x8(%rbp),%rdi
lea    0xe50(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1238 <identify+0x128>
movl   $0x11a,-0xc(%rbp)
jmp    125d <identify+0x14d>
mov    -0x8(%rbp),%rdi
lea    0xe32(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1258 <identify+0x148>
movl   $0x11d,-0xc(%rbp)
jmp    125d <identify+0x14d>
jmp    12f6 <identify+0x1e6>
mov    -0x8(%rbp),%rdi
lea    0xe0f(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1282 <identify+0x172>
movl   $0x11b,-0xc(%rbp)
jmp    12f6 <identify+0x1e6>
mov    -0x8(%rbp),%rdi
lea    0xdee(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    12a7 <identify+0x197>
movl   $0x11c,-0xc(%rbp)
jmp    12f6 <identify+0x1e6>
mov    -0x8(%rbp),%rdi
lea    0xdcf(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    12cc <identify+0x1bc>
movl   $0x11f,-0xc(%rbp)
jmp    12f6 <identify+0x1e6>
mov    -0x8(%rbp),%rdi
lea    0xdb3(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    12f1 <identify+0x1e1>
movl   $0x121,-0xc(%rbp)
jmp    12f6 <identify+0x1e6>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<identify>:
push   %rbx
movsbl (%rdi),%ecx
mov    $0x116,%eax
add    $0xffffff9d,%ecx
cmp    $0x14,%ecx
ja     1241 <identify+0x131>
mov    %rdi,%rbx
lea    0xed1(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0xf1e(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1263 <identify+0x153>
lea    0xf0c(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1271 <identify+0x161>
lea    0xefb(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
mov    $0x120,%ecx
jmp    1239 <identify+0x129>
lea    0xef4(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
lea    (%rcx,%rcx,4),%eax
add    $0x116,%eax
pop    %rbx
ret
lea    0xeac(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
or     $0x116,%eax
pop    %rbx
ret
lea    0xec8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
mov    $0x121,%ecx
jmp    1239 <identify+0x129>
lea    0xea7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
lea    (%rcx,%rcx,8),%eax
add    $0x116,%eax
pop    %rbx
ret
lea    0xe6f(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     126a <identify+0x15a>
lea    0xe63(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
mov    $0x11d,%ecx
jmp    1239 <identify+0x129>
lea    0xe56(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
mov    $0x11c,%ecx
mov    $0x116,%eax
cmove  %ecx,%eax
pop    %rbx
ret
lea    0xe0d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
lea    (%rcx,%rcx,1),%eax
add    $0x116,%eax
pop    %rbx
ret
mov    $0x119,%eax
pop    %rbx
ret
mov    $0x11a,%eax
pop    %rbx
ret
mov    $0x11e,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"if\00"
@.str.1 = [6 x i8] c"while\00"
@.str.2 = [5 x i8] c"case\00"
@.str.3 = [6 x i8] c"class\00"
@.str.4 = [6 x i8] c"const\00"
@.str.5 = [7 x i8] c"switch\00"
@.str.6 = [7 x i8] c"struct\00"
@.str.7 = [4 x i8] c"for\00"
@.str.8 = [6 x i8] c"union\00"
@.str.9 = [9 x i8] c"operator\00"
@.str.10 = [10 x i8] c"namespace\00"
define i32 @identify(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 278, i32* %3
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
switch i32 %6, label %73 [
i32 105, label %7
i32 119, label %13
i32 99, label %19
i32 115, label %37
i32 102, label %49
i32 117, label %55
i32 111, label %61
i32 110, label %67
]
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @strcmp(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 279, i32* %3
br label %12
12: ; preds = %11, %7
br label %73
13: ; preds = %1
%14 = load i8*, i8** %2
%15 = call i32 @strcmp(i8* %14, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 280, i32* %3
br label %18
18: ; preds = %17, %13
br label %73
19: ; preds = %1
%20 = load i8*, i8** %2
%21 = call i32 @strcmp(i8* %20, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %19
store i32 281, i32* %3
br label %36
24: ; preds = %19
%25 = load i8*, i8** %2
%26 = call i32 @strcmp(i8* %25, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %24
store i32 286, i32* %3
br label %35
29: ; preds = %24
%30 = load i8*, i8** %2
%31 = call i32 @strcmp(i8* %30, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %34
33: ; preds = %29
store i32 288, i32* %3
br label %34
34: ; preds = %33, %29
br label %35
35: ; preds = %34, %28
br label %36
36: ; preds = %35, %23
br label %73
37: ; preds = %1
%38 = load i8*, i8** %2
%39 = call i32 @strcmp(i8* %38, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%40 = icmp eq i32 %39, 0
br i1 %40, label %41, label %42
41: ; preds = %37
store i32 282, i32* %3
br label %48
42: ; preds = %37
%43 = load i8*, i8** %2
%44 = call i32 @strcmp(i8* %43, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %47
46: ; preds = %42
store i32 285, i32* %3
br label %47
47: ; preds = %46, %42
br label %48
48: ; preds = %47, %41
br label %73
49: ; preds = %1
%50 = load i8*, i8** %2
%51 = call i32 @strcmp(i8* %50, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%52 = icmp eq i32 %51, 0
br i1 %52, label %53, label %54
53: ; preds = %49
store i32 283, i32* %3
br label %54
54: ; preds = %53, %49
br label %73
55: ; preds = %1
%56 = load i8*, i8** %2
%57 = call i32 @strcmp(i8* %56, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %60
59: ; preds = %55
store i32 284, i32* %3
br label %60
60: ; preds = %59, %55
br label %73
61: ; preds = %1
%62 = load i8*, i8** %2
%63 = call i32 @strcmp(i8* %62, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%64 = icmp eq i32 %63, 0
br i1 %64, label %65, label %66
65: ; preds = %61
store i32 287, i32* %3
br label %66
66: ; preds = %65, %61
br label %73
67: ; preds = %1
%68 = load i8*, i8** %2
%69 = call i32 @strcmp(i8* %68, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0))
%70 = icmp eq i32 %69, 0
br i1 %70, label %71, label %72
71: ; preds = %67
store i32 289, i32* %3
br label %72
72: ; preds = %71, %67
br label %73
73: ; preds = %1, %72, %66, %60, %54, %48, %36, %18, %12
%74 = load i32, i32* %3
ret i32 %74
}

LLVM IR (-O2):
@.str = [3 x i8] c"if\00"
@.str.1 = [6 x i8] c"while\00"
@.str.2 = [5 x i8] c"case\00"
@.str.3 = [6 x i8] c"class\00"
@.str.4 = [6 x i8] c"const\00"
@.str.5 = [7 x i8] c"switch\00"
@.str.6 = [7 x i8] c"struct\00"
@.str.7 = [4 x i8] c"for\00"
@.str.8 = [6 x i8] c"union\00"
@.str.9 = [9 x i8] c"operator\00"
@.str.10 = [10 x i8] c"namespace\00"
define i32 @identify(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
switch i32 %3, label %45 [
i32 105, label %4
i32 119, label %8
i32 99, label %12
i32 115, label %22
i32 102, label %29
i32 117, label %33
i32 111, label %37
i32 110, label %41
]
4: ; preds = %1
%5 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 279, i32 278
br label %45
8: ; preds = %1
%9 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i32 %9, 0
%11 = select i1 %10, i32 280, i32 278
br label %45
12: ; preds = %1
%13 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%14 = icmp eq i32 %13, 0
br i1 %14, label %45, label %15
15: ; preds = %12
%16 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%17 = icmp eq i32 %16, 0
br i1 %17, label %45, label %18
18: ; preds = %15
%19 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%20 = icmp eq i32 %19, 0
%21 = select i1 %20, i32 288, i32 278
br label %45
22: ; preds = %1
%23 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%24 = icmp eq i32 %23, 0
br i1 %24, label %45, label %25
25: ; preds = %22
%26 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%27 = icmp eq i32 %26, 0
%28 = select i1 %27, i32 285, i32 278
br label %45
29: ; preds = %1
%30 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%31 = icmp eq i32 %30, 0
%32 = select i1 %31, i32 283, i32 278
br label %45
33: ; preds = %1
%34 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%35 = icmp eq i32 %34, 0
%36 = select i1 %35, i32 284, i32 278
br label %45
37: ; preds = %1
%38 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%39 = icmp eq i32 %38, 0
%40 = select i1 %39, i32 287, i32 278
br label %45
41: ; preds = %1
%42 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0))
%43 = icmp eq i32 %42, 0
%44 = select i1 %43, i32 289, i32 278
br label %45
45: ; preds = %41, %37, %33, %29, %25, %18, %8, %4, %22, %15, %12, %1
%46 = phi i32 [ 278, %1 ], [ %7, %4 ], [ %11, %8 ], [ 281, %12 ], [ 286, %15 ], [ %21, %18 ], [ 282, %22 ], [ %28, %25 ], [ %32, %29 ], [ %36, %33 ], [ %40, %37 ], [ %44, %41 ]
ret i32 %46
}