#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 131
#define GLUT_KEY_LEFT 130
#define GLUT_KEY_RIGHT 129
#define GLUT_KEY_UP 128
int /*<<< orphan*/ project();
int /*<<< orphan*/ rotate_ph(int);
int /*<<< orphan*/ rotate_th(int);
void special(int key, int x, int y) {
  switch (key) {
  case GLUT_KEY_RIGHT:
    rotate_th(+2);
    break;
  case GLUT_KEY_LEFT:
    rotate_th(-2);
    break;
  case GLUT_KEY_UP:
    rotate_ph(+2);
    break;
  case GLUT_KEY_DOWN:
    rotate_ph(-2);
    break;
  }
  project();
}


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,-0x18(%rbp)
sub    $0x3,%eax
ja     11a1 <special+0x71>
mov    -0x18(%rbp),%rax
lea    0xe9f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x2,%edi
call   1030 <rotate_th@plt>
jmp    11a1 <special+0x71>
mov    $0xfffffffe,%edi
call   1030 <rotate_th@plt>
jmp    11a1 <special+0x71>
mov    $0x2,%edi
call   1050 <rotate_ph@plt>
jmp    11a1 <special+0x71>
mov    $0xfffffffe,%edi
call   1050 <rotate_ph@plt>
mov    $0x0,%al
call   1040 <project@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<special>:
push   %rax
add    $0xffffff80,%edi
cmp    $0x3,%edi
ja     1172 <special+0x42>
lea    0xec0(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    $0x2,%edi
jmp    116d <special+0x3d>
mov    $0x2,%edi
call   1030 <rotate_th@plt>
jmp    1172 <special+0x42>
mov    $0xfffffffe,%edi
call   1030 <rotate_th@plt>
jmp    1172 <special+0x42>
mov    $0xfffffffe,%edi
call   1050 <rotate_ph@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <project@plt>

LLVM IR (-O0):
define void @special(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
switch i32 %7, label %16 [
i32 129, label %8
i32 130, label %10
i32 128, label %12
i32 131, label %14
]
8: ; preds = %3
%9 = call i32 @rotate_th(i32 2)
br label %16
10: ; preds = %3
%11 = call i32 @rotate_th(i32 -2)
br label %16
12: ; preds = %3
%13 = call i32 @rotate_ph(i32 2)
br label %16
14: ; preds = %3
%15 = call i32 @rotate_ph(i32 -2)
br label %16
16: ; preds = %3, %14, %12, %10, %8
%17 = call i32 (...) @project()
ret void
}

LLVM IR (-O2):
define void @special(i32 %0, i32 %1, i32 %2) {
switch i32 %0, label %12 [
i32 129, label %4
i32 130, label %6
i32 128, label %8
i32 131, label %10
]
4: ; preds = %3
%5 = tail call i32 @rotate_th(i32 2)
br label %12
6: ; preds = %3
%7 = tail call i32 @rotate_th(i32 -2)
br label %12
8: ; preds = %3
%9 = tail call i32 @rotate_ph(i32 2)
br label %12
10: ; preds = %3
%11 = tail call i32 @rotate_ph(i32 -2)
br label %12
12: ; preds = %3, %10, %8, %6, %4
%13 = tail call i32 (...) @project()
ret void
}