#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 */
#define GLUT_KEY_DOWN 147
#define GLUT_KEY_END 146
#define GLUT_KEY_F1 145
#define GLUT_KEY_F10 144
#define GLUT_KEY_F11 143
#define GLUT_KEY_F2 142
#define GLUT_KEY_F3 141
#define GLUT_KEY_F4 140
#define GLUT_KEY_F5 139
#define GLUT_KEY_F6 138
#define GLUT_KEY_F7 137
#define GLUT_KEY_F8 136
#define GLUT_KEY_F9 135
#define GLUT_KEY_HOME 134
#define GLUT_KEY_INSERT 133
#define GLUT_KEY_LEFT 132
#define GLUT_KEY_PAGE_DOWN 131
#define GLUT_KEY_PAGE_UP 130
#define GLUT_KEY_RIGHT 129
#define GLUT_KEY_UP 128
int /*<<< orphan*/ printf(char *, char *, int, int);
void special(int key, int x, int y) {
  char *name;
  switch (key) {
  case GLUT_KEY_F1:
    name = "F1";
    break;
  case GLUT_KEY_F2:
    name = "F2";
    break;
  case GLUT_KEY_F3:
    name = "F3";
    break;
  case GLUT_KEY_F4:
    name = "F4";
    break;
  case GLUT_KEY_F5:
    name = "F5";
    break;
  case GLUT_KEY_F6:
    name = "F6";
    break;
  case GLUT_KEY_F7:
    name = "F7";
    break;
  case GLUT_KEY_F8:
    name = "F8";
    break;
  case GLUT_KEY_F9:
    name = "F9";
    break;
  case GLUT_KEY_F10:
    name = "F11";
    break;
  case GLUT_KEY_F11:
    name = "F12";
    break;
  case GLUT_KEY_LEFT:
    name = "Left";
    break;
  case GLUT_KEY_UP:
    name = "Up";
    break;
  case GLUT_KEY_RIGHT:
    name = "Right";
    break;
  case GLUT_KEY_DOWN:
    name = "Down";
    break;
  case GLUT_KEY_PAGE_UP:
    name = "Page up";
    break;
  case GLUT_KEY_PAGE_DOWN:
    name = "Page down";
    break;
  case GLUT_KEY_HOME:
    name = "Home";
    break;
  case GLUT_KEY_END:
    name = "End";
    break;
  case GLUT_KEY_INSERT:
    name = "Insert";
    break;
  default:
    name = "UNKONW";
    break;
  }
  printf("special: %s %d,%d\n", name, x, y);
}


x86 assembly (clang, -O0):
<special>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x13,%eax
ja     128a <special+0x17a>
mov    -0x20(%rbp),%rax
lea    0xebf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xeff(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xef2(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xee5(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xed8(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xecb(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xebe(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xeb1(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xea4(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xe97(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xe8a(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xe7e(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xe72(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xe67(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xe5a(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xe50(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xe45(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xe3d(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xe37(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xe2c(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xe20(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1295 <special+0x185>
lea    0xe17(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe09(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<special>:
mov    %edx,%ecx
mov    %esi,%edx
add    $0xffffff80,%edi
cmp    $0x13,%edi
ja     1139 <special+0x29>
movslq %edi,%rax
lea    0xf4e(%rip),%rdi
movslq (%rdi,%rax,4),%rsi
add    %rdi,%rsi
lea    0xf2b(%rip),%rdi
jmp    1030 <printf@plt>
lea    0xf18(%rip),%rsi
lea    0xf18(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"F1\00"
@.str.1 = [3 x i8] c"F2\00"
@.str.2 = [3 x i8] c"F3\00"
@.str.3 = [3 x i8] c"F4\00"
@.str.4 = [3 x i8] c"F5\00"
@.str.5 = [3 x i8] c"F6\00"
@.str.6 = [3 x i8] c"F7\00"
@.str.7 = [3 x i8] c"F8\00"
@.str.8 = [3 x i8] c"F9\00"
@.str.9 = [4 x i8] c"F11\00"
@.str.10 = [4 x i8] c"F12\00"
@.str.11 = [5 x i8] c"Left\00"
@.str.12 = [3 x i8] c"Up\00"
@.str.13 = [6 x i8] c"Right\00"
@.str.14 = [5 x i8] c"Down\00"
@.str.15 = [8 x i8] c"Page up\00"
@.str.16 = [10 x i8] c"Page down\00"
@.str.17 = [5 x i8] c"Home\00"
@.str.18 = [4 x i8] c"End\00"
@.str.19 = [7 x i8] c"Insert\00"
@.str.20 = [7 x i8] c"UNKONW\00"
@.str.21 = [19 x i8] c"special: %s %d,%d\0A\00"
define void @special(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
switch i32 %8, label %29 [
i32 145, label %9
i32 142, label %10
i32 141, label %11
i32 140, label %12
i32 139, label %13
i32 138, label %14
i32 137, label %15
i32 136, label %16
i32 135, label %17
i32 144, label %18
i32 143, label %19
i32 132, label %20
i32 128, label %21
i32 129, label %22
i32 147, label %23
i32 130, label %24
i32 131, label %25
i32 134, label %26
i32 146, label %27
i32 133, label %28
]
9: ; preds = %3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %7
br label %30
10: ; preds = %3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %7
br label %30
11: ; preds = %3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8** %7
br label %30
12: ; preds = %3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %7
br label %30
13: ; preds = %3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8** %7
br label %30
14: ; preds = %3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8** %7
br label %30
15: ; preds = %3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8** %7
br label %30
16: ; preds = %3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8** %7
br label %30
17: ; preds = %3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8** %7
br label %30
18: ; preds = %3
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8** %7
br label %30
19: ; preds = %3
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8** %7
br label %30
20: ; preds = %3
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8** %7
br label %30
21: ; preds = %3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i8** %7
br label %30
22: ; preds = %3
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0), i8** %7
br label %30
23: ; preds = %3
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), i8** %7
br label %30
24: ; preds = %3
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i8** %7
br label %30
25: ; preds = %3
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.16, i64 0, i64 0), i8** %7
br label %30
26: ; preds = %3
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8** %7
br label %30
27: ; preds = %3
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0), i8** %7
br label %30
28: ; preds = %3
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i64 0, i64 0), i8** %7
br label %30
29: ; preds = %3
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0), i8** %7
br label %30
30: ; preds = %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9
%31 = load i8*, i8** %7
%32 = load i32, i32* %5
%33 = load i32, i32* %6
%34 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.21, i64 0, i64 0), i8* %31, i32 %32, i32 %33)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"F1\00"
@.str.1 = [3 x i8] c"F2\00"
@.str.2 = [3 x i8] c"F3\00"
@.str.3 = [3 x i8] c"F4\00"
@.str.4 = [3 x i8] c"F5\00"
@.str.5 = [3 x i8] c"F6\00"
@.str.6 = [3 x i8] c"F7\00"
@.str.7 = [3 x i8] c"F8\00"
@.str.8 = [3 x i8] c"F9\00"
@.str.9 = [4 x i8] c"F11\00"
@.str.10 = [4 x i8] c"F12\00"
@.str.11 = [5 x i8] c"Left\00"
@.str.12 = [3 x i8] c"Up\00"
@.str.13 = [6 x i8] c"Right\00"
@.str.14 = [5 x i8] c"Down\00"
@.str.15 = [8 x i8] c"Page up\00"
@.str.16 = [10 x i8] c"Page down\00"
@.str.17 = [5 x i8] c"Home\00"
@.str.18 = [4 x i8] c"End\00"
@.str.19 = [7 x i8] c"Insert\00"
@.str.20 = [7 x i8] c"UNKONW\00"
@.str.21 = [19 x i8] c"special: %s %d,%d\0A\00"
@reltable.special = [20 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.12 to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.13 to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.15 to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.16 to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.11 to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.19 to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.17 to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.8 to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.7 to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.6 to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.5 to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.4 to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.3 to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.2 to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.1 to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.10 to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.9 to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.18 to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.14 to i64), i64 ptrtoint ([20 x i32]* @reltable.special to i64)) to i32)]
define void @special(i32 %0, i32 %1, i32 %2) {
%4 = add i32 %0, -128
%5 = icmp ult i32 %4, 20
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = sext i32 %4 to i64
%8 = shl i64 %7, 2
%9 = call i8* @llvm.load.relative.i64(i8* bitcast ([20 x i32]* @reltable.special to i8*), i64 %8)
br label %10
10: ; preds = %3, %6
%11 = phi i8* [ %9, %6 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0), %3 ]
%12 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.21, i64 0, i64 0), i8* %11, i32 %1, i32 %2)
ret void
}