#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*/ proutn(char *);
void cramen(int i) {
  char *s;
  switch (i) {
  case 'R':
    s = "Romulan";
    break;
  case 'K':
    s = "Klingon";
    break;
  case 'C':
    s = "Commander";
    break;
  case 'S':
    s = "Super-commander";
    break;
  case '*':
    s = "Star";
    break;
  case 'P':
    s = "Planet";
    break;
  case 'B':
    s = "Starbase";
    break;
  case ' ':
    s = "Black hole";
    break;
  case 'T':
    s = "Tholean";
    break;
  case '#':
    s = "Tholean web";
    break;
  default:
    s = "Unknown??";
    break;
  }
  proutn(s);
}


x86 assembly (clang, -O0):
<cramen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffe0,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x34,%eax
ja     11e4 <cramen+0xd4>
mov    -0x18(%rbp),%rax
lea    0xec5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf89(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    11ef <cramen+0xdf>
lea    0xf81(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    11ef <cramen+0xdf>
lea    0xf79(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    11ef <cramen+0xdf>
lea    0xf73(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    11ef <cramen+0xdf>
lea    0xf73(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    11ef <cramen+0xdf>
lea    0xf68(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    11ef <cramen+0xdf>
lea    0xf5f(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    11ef <cramen+0xdf>
lea    0xf58(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    11ef <cramen+0xdf>
lea    0xf53(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    11ef <cramen+0xdf>
lea    0xf4b(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    11ef <cramen+0xdf>
lea    0xf47(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <proutn@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cramen>:
mov    %edi,%eax
add    $0xffffffe0,%eax
cmp    $0x34,%eax
ja     113d <cramen+0x2d>
lea    0xfb3(%rip),%rdi
lea    0xed8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xfdb(%rip),%rdi
jmp    1030 <proutn@plt>
lea    0xfee(%rip),%rdi
jmp    1030 <proutn@plt>
lea    0xfd6(%rip),%rdi
jmp    1030 <proutn@plt>
lea    0xfa2(%rip),%rdi
jmp    1030 <proutn@plt>
lea    0xfa2(%rip),%rdi
jmp    1030 <proutn@plt>
lea    0xf70(%rip),%rdi
jmp    1030 <proutn@plt>
lea    0xf5c(%rip),%rdi
jmp    1030 <proutn@plt>
lea    0xf77(%rip),%rdi
jmp    1030 <proutn@plt>
lea    0xf56(%rip),%rdi
jmp    1030 <proutn@plt>
lea    0xf7a(%rip),%rdi
jmp    1030 <proutn@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Romulan\00"
@.str.1 = [8 x i8] c"Klingon\00"
@.str.2 = [10 x i8] c"Commander\00"
@.str.3 = [16 x i8] c"Super-commander\00"
@.str.4 = [5 x i8] c"Star\00"
@.str.5 = [7 x i8] c"Planet\00"
@.str.6 = [9 x i8] c"Starbase\00"
@.str.7 = [11 x i8] c"Black hole\00"
@.str.8 = [8 x i8] c"Tholean\00"
@.str.9 = [12 x i8] c"Tholean web\00"
@.str.10 = [10 x i8] c"Unknown??\00"
define void @cramen(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %15 [
i32 82, label %5
i32 75, label %6
i32 67, label %7
i32 83, label %8
i32 42, label %9
i32 80, label %10
i32 66, label %11
i32 32, label %12
i32 84, label %13
i32 35, label %14
]
5: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3
br label %16
6: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %16
7: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %16
8: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %16
9: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8** %3
br label %16
10: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8** %3
br label %16
11: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i8** %3
br label %16
12: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8** %3
br label %16
13: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8** %3
br label %16
14: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i8** %3
br label %16
15: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i8** %3
br label %16
16: ; preds = %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%17 = load i8*, i8** %3
%18 = call i32 @proutn(i8* %17)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"Romulan\00"
@.str.1 = [8 x i8] c"Klingon\00"
@.str.2 = [10 x i8] c"Commander\00"
@.str.3 = [16 x i8] c"Super-commander\00"
@.str.4 = [5 x i8] c"Star\00"
@.str.5 = [7 x i8] c"Planet\00"
@.str.6 = [9 x i8] c"Starbase\00"
@.str.7 = [11 x i8] c"Black hole\00"
@.str.8 = [8 x i8] c"Tholean\00"
@.str.9 = [12 x i8] c"Tholean web\00"
@.str.10 = [10 x i8] c"Unknown??\00"
define void @cramen(i32 %0) {
switch i32 %0, label %11 [
i32 82, label %12
i32 75, label %2
i32 67, label %3
i32 83, label %4
i32 42, label %5
i32 80, label %6
i32 66, label %7
i32 32, label %8
i32 84, label %9
i32 35, label %10
]
2: ; preds = %1
br label %12
3: ; preds = %1
br label %12
4: ; preds = %1
br label %12
5: ; preds = %1
br label %12
6: ; preds = %1
br label %12
7: ; preds = %1
br label %12
8: ; preds = %1
br label %12
9: ; preds = %1
br label %12
10: ; preds = %1
br label %12
11: ; preds = %1
br label %12
12: ; preds = %1, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%13 = phi i8* [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %1 ]
%14 = tail call i32 @proutn(i8* %13)
ret void
}