#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*/ clear();
int /*<<< orphan*/ glFlush();
int /*<<< orphan*/ quit();
int /*<<< orphan*/ tesse();
void key_pressed(unsigned char key, int x, int y) {
  switch (key) {
  case 't':
  case 'T':
    tesse();
    glFlush();
    break;
  case 'q':
  case 'Q':
    quit();
    break;
  case 'c':
  case 'C':
    clear();
    break;
  }
}


x86 assembly (clang, -O0):
<key_pressed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movzbl -0x1(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x43,%eax
je     11dd <key_pressed+0x9d>
jmp    1169 <key_pressed+0x29>
mov    -0x10(%rbp),%eax
sub    $0x51,%eax
je     11d1 <key_pressed+0x91>
jmp    117a <key_pressed+0x3a>
mov    -0x10(%rbp),%eax
sub    $0x54,%eax
je     11be <key_pressed+0x7e>
jmp    118b <key_pressed+0x4b>
mov    -0x10(%rbp),%eax
sub    $0x63,%eax
je     11dd <key_pressed+0x9d>
jmp    119c <key_pressed+0x5c>
mov    -0x10(%rbp),%eax
sub    $0x71,%eax
je     11d1 <key_pressed+0x91>
jmp    11ad <key_pressed+0x6d>
mov    -0x10(%rbp),%eax
sub    $0x74,%eax
jne    11e4 <key_pressed+0xa4>
jmp    11be <key_pressed+0x7e>
mov    $0x0,%al
call   1050 <tesse@plt>
mov    $0x0,%al
call   1040 <glFlush@plt>
jmp    11e4 <key_pressed+0xa4>
mov    $0x0,%al
call   1030 <quit@plt>
jmp    11e4 <key_pressed+0xa4>
mov    $0x0,%al
call   1060 <clear@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<key_pressed>:
add    $0xbd,%dil
cmp    $0x31,%dil
ja     119c <key_pressed+0x5c>
movzbl %dil,%eax
movabs $0x100000001,%rcx
bt     %rax,%rcx
jb     1195 <key_pressed+0x55>
movabs $0x400000004000,%rcx
bt     %rax,%rcx
jb     118e <key_pressed+0x4e>
movabs $0x2000000020000,%rcx
bt     %rax,%rcx
jae    119c <key_pressed+0x5c>
push   %rax
xor    %eax,%eax
call   1050 <tesse@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <glFlush@plt>
xor    %eax,%eax
jmp    1030 <quit@plt>
xor    %eax,%eax
jmp    1060 <clear@plt>
ret

LLVM IR (-O0):
define void @key_pressed(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
switch i32 %8, label %16 [
i32 116, label %9
i32 84, label %9
i32 113, label %12
i32 81, label %12
i32 99, label %14
i32 67, label %14
]
9: ; preds = %3, %3
%10 = call i32 (...) @tesse()
%11 = call i32 (...) @glFlush()
br label %16
12: ; preds = %3, %3
%13 = call i32 (...) @quit()
br label %16
14: ; preds = %3, %3
%15 = call i32 (...) @clear()
br label %16
16: ; preds = %3, %14, %12, %9
ret void
}

LLVM IR (-O2):
define void @key_pressed(i8 zeroext %0, i32 %1, i32 %2) {
switch i8 %0, label %11 [
i8 116, label %4
i8 84, label %4
i8 113, label %7
i8 81, label %7
i8 99, label %9
i8 67, label %9
]
4: ; preds = %3, %3
%5 = tail call i32 (...) @tesse()
%6 = tail call i32 (...) @glFlush()
br label %11
7: ; preds = %3, %3
%8 = tail call i32 (...) @quit()
br label %11
9: ; preds = %3, %3
%10 = tail call i32 (...) @clear()
br label %11
11: ; preds = %3, %9, %7, %4
ret void
}