#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 */
char *return_keyword(char *);
char *extract_token(char *word) {
  switch (word[0]) {
  case '{':
    return "{";
  case '}':
    return "}";
  case '(':
    return "(";
  case ')':
    return ")";
  case ']':
    return "]";
  case '[':
    return "[";
  case '.':
    return ".";
  case '!':
    return "!";
  case '~':
    return "~";
  case '+':
    return "+";
  case '-':
    return "-";
  case '*':
    return "*";
  case '&':
    return "&";
  case '/':
    return "/";
  case '%':
    return "%";
  case '<':
    return "<";
  case '>':
    return ">";
  case '=':
    return "=";
  case '|':
    return "|";
  case '^':
    return "^";
  case '?':
    return "?";
  case ':':
    return ":";
  case ';':
    return ";";
  case '\'':
    return "'";
  case '"':
    return "\"";
    break;
  default:
    return return_keyword(word);
    break;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<extract_token>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
add    $0xffffffdf,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x5d,%eax
ja     12d9 <extract_token+0x1c9>
mov    -0x18(%rbp),%rax
lea    0xec0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1028(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0x101a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0x100c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xffe(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xff0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xfe2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xfd4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xfc6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xfb8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xfaa(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xf9c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xf8e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xf80(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xf72(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xf64(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xf56(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xf48(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xf3a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xf2c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xf1e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xf10(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xf02(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xef4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xee6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
lea    0xed8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e6 <extract_token+0x1d6>
mov    -0x10(%rbp),%rdi
call   1030 <return_keyword@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract_token>:
movsbl (%rdi),%ecx
add    $0xffffffdf,%ecx
cmp    $0x5d,%ecx
ja     1142 <extract_token+0x32>
lea    0x1056(%rip),%rax
lea    0xed7(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0x104d(%rip),%rax
ret
lea    0x1067(%rip),%rax
ret
jmp    1030 <return_keyword@plt>
lea    0x1046(%rip),%rax
ret
lea    0x103a(%rip),%rax
ret
lea    0x1048(%rip),%rax
ret
lea    0x1016(%rip),%rax
ret
lea    0x1010(%rip),%rax
ret
lea    0x1018(%rip),%rax
ret
lea    0x100c(%rip),%rax
ret
lea    0x1006(%rip),%rax
ret
lea    0xff6(%rip),%rax
ret
lea    0xffc(%rip),%rax
ret
lea    0x1004(%rip),%rax
ret
lea    0xffe(%rip),%rax
ret
lea    0xfe8(%rip),%rax
ret
lea    0xfe4(%rip),%rax
ret
lea    0xfda(%rip),%rax
ret
lea    0xfda(%rip),%rax
ret
lea    0xfb4(%rip),%rax
ret
lea    0xfaa(%rip),%rax
ret
lea    0xfc0(%rip),%rax
ret
lea    0xfb6(%rip),%rax
ret
lea    0xf8c(%rip),%rax
ret
lea    0xf92(%rip),%rax
ret

LLVM IR (-O0):
@.str = [2 x i8] c"{\00"
@.str.1 = [2 x i8] c"}\00"
@.str.2 = [2 x i8] c"(\00"
@.str.3 = [2 x i8] c")\00"
@.str.4 = [2 x i8] c"]\00"
@.str.5 = [2 x i8] c"[\00"
@.str.6 = [2 x i8] c".\00"
@.str.7 = [2 x i8] c"!\00"
@.str.8 = [2 x i8] c"~\00"
@.str.9 = [2 x i8] c"+\00"
@.str.10 = [2 x i8] c"-\00"
@.str.11 = [2 x i8] c"*\00"
@.str.12 = [2 x i8] c"&\00"
@.str.13 = [2 x i8] c"/\00"
@.str.14 = [2 x i8] c"%\00"
@.str.15 = [2 x i8] c"<\00"
@.str.16 = [2 x i8] c">\00"
@.str.17 = [2 x i8] c"=\00"
@.str.18 = [2 x i8] c"|\00"
@.str.19 = [2 x i8] c"^\00"
@.str.20 = [2 x i8] c"?\00"
@.str.21 = [2 x i8] c":\00"
@.str.22 = [2 x i8] c";\00"
@.str.23 = [2 x i8] c"'\00"
@.str.24 = [2 x i8] c"\22\00"
define i8* @extract_token(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
switch i32 %7, label %33 [
i32 123, label %8
i32 125, label %9
i32 40, label %10
i32 41, label %11
i32 93, label %12
i32 91, label %13
i32 46, label %14
i32 33, label %15
i32 126, label %16
i32 43, label %17
i32 45, label %18
i32 42, label %19
i32 38, label %20
i32 47, label %21
i32 37, label %22
i32 60, label %23
i32 62, label %24
i32 61, label %25
i32 124, label %26
i32 94, label %27
i32 63, label %28
i32 58, label %29
i32 59, label %30
i32 39, label %31
i32 34, label %32
]
8: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %2
br label %36
9: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %36
10: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %36
11: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %36
12: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %36
13: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %36
14: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %36
15: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %36
16: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %36
17: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %36
18: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %36
19: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %36
20: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %36
21: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %36
22: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %36
23: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %36
24: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %36
25: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %36
26: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %36
27: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.19, i64 0, i64 0), i8** %2
br label %36
28: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0), i8** %2
br label %36
29: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0), i8** %2
br label %36
30: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.22, i64 0, i64 0), i8** %2
br label %36
31: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0), i8** %2
br label %36
32: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i64 0, i64 0), i8** %2
br label %36
33: ; preds = %1
%34 = load i8*, i8** %3
%35 = call i8* @return_keyword(i8* %34)
store i8* %35, i8** %2
br label %36
36: ; preds = %33, %32, %31, %30, %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8
%37 = load i8*, i8** %2
ret i8* %37
}

LLVM IR (-O2):
@.str = [2 x i8] c"{\00"
@.str.1 = [2 x i8] c"}\00"
@.str.2 = [2 x i8] c"(\00"
@.str.3 = [2 x i8] c")\00"
@.str.4 = [2 x i8] c"]\00"
@.str.5 = [2 x i8] c"[\00"
@.str.6 = [2 x i8] c".\00"
@.str.7 = [2 x i8] c"!\00"
@.str.8 = [2 x i8] c"~\00"
@.str.9 = [2 x i8] c"+\00"
@.str.10 = [2 x i8] c"-\00"
@.str.11 = [2 x i8] c"*\00"
@.str.12 = [2 x i8] c"&\00"
@.str.13 = [2 x i8] c"/\00"
@.str.14 = [2 x i8] c"%\00"
@.str.15 = [2 x i8] c"<\00"
@.str.16 = [2 x i8] c">\00"
@.str.17 = [2 x i8] c"=\00"
@.str.18 = [2 x i8] c"|\00"
@.str.19 = [2 x i8] c"^\00"
@.str.20 = [2 x i8] c"?\00"
@.str.21 = [2 x i8] c":\00"
@.str.22 = [2 x i8] c";\00"
@.str.23 = [2 x i8] c"'\00"
@.str.24 = [2 x i8] c"\22\00"
define i8* @extract_token(i8* %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
switch i32 %3, label %28 [
i32 123, label %30
i32 125, label %4
i32 40, label %5
i32 41, label %6
i32 93, label %7
i32 91, label %8
i32 46, label %9
i32 33, label %10
i32 126, label %11
i32 43, label %12
i32 45, label %13
i32 42, label %14
i32 38, label %15
i32 47, label %16
i32 37, label %17
i32 60, label %18
i32 62, label %19
i32 61, label %20
i32 124, label %21
i32 94, label %22
i32 63, label %23
i32 58, label %24
i32 59, label %25
i32 39, label %26
i32 34, label %27
]
4: ; preds = %1
br label %30
5: ; preds = %1
br label %30
6: ; preds = %1
br label %30
7: ; preds = %1
br label %30
8: ; preds = %1
br label %30
9: ; preds = %1
br label %30
10: ; preds = %1
br label %30
11: ; preds = %1
br label %30
12: ; preds = %1
br label %30
13: ; preds = %1
br label %30
14: ; preds = %1
br label %30
15: ; preds = %1
br label %30
16: ; preds = %1
br label %30
17: ; preds = %1
br label %30
18: ; preds = %1
br label %30
19: ; preds = %1
br label %30
20: ; preds = %1
br label %30
21: ; preds = %1
br label %30
22: ; preds = %1
br label %30
23: ; preds = %1
br label %30
24: ; preds = %1
br label %30
25: ; preds = %1
br label %30
26: ; preds = %1
br label %30
27: ; preds = %1
br label %30
28: ; preds = %1
%29 = tail call i8* @return_keyword(i8* %0)
br label %30
30: ; preds = %1, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4
%31 = phi i8* [ %29, %28 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i64 0, i64 0), %27 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0), %26 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.22, i64 0, i64 0), %25 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0), %24 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0), %23 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.19, i64 0, i64 0), %22 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), %21 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0), %20 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0), %19 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0), %18 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0), %17 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0), %16 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), %15 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), %14 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0), %13 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), %12 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), %11 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), %10 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), %9 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), %8 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), %7 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), %6 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), %5 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %4 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %31
}