#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*/ printf(char *, int);
void class_win_stats1(int class, int runs) {
  switch (class) {
  case 1:
    printf(": Druid               %3.d Runs     :\n", runs);
    break;
  case 2:
    printf(": Hunter              %3.d Runs     :\n", runs);
    break;
  case 3:
    printf(": Mage                %3.d Runs     :\n", runs);
    break;
  case 4:
    printf(": Paladin             %3.d Runs     :\n", runs);
    break;
  case 5:
    printf(": Priest              %3.d Runs     :\n", runs);
    break;
  case 6:
    printf(": Rogue               %3.d Runs     :\n", runs);
    break;
  case 7:
    printf(": Shaman              %3.d Runs     :\n", runs);
    break;
  case 8:
    printf(": Warlock             %3.d Runs     :\n", runs);
    break;
  case 9:
    printf(": Warrior             %3.d Runs     :\n", runs);
    break;
  }
}


x86 assembly (clang, -O0):
<class_win_stats1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x8,%eax
ja     11f6 <class_win_stats1+0xe6>
mov    -0x10(%rbp),%rax
lea    0xec2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
jmp    11f6 <class_win_stats1+0xe6>
mov    -0x8(%rbp),%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
jmp    11f6 <class_win_stats1+0xe6>
mov    -0x8(%rbp),%esi
lea    0xef9(%rip),%rdi
call   1030 <printf@plt>
jmp    11f6 <class_win_stats1+0xe6>
mov    -0x8(%rbp),%esi
lea    0xf0c(%rip),%rdi
call   1030 <printf@plt>
jmp    11f6 <class_win_stats1+0xe6>
mov    -0x8(%rbp),%esi
lea    0xf1f(%rip),%rdi
call   1030 <printf@plt>
jmp    11f6 <class_win_stats1+0xe6>
mov    -0x8(%rbp),%esi
lea    0xf32(%rip),%rdi
call   1030 <printf@plt>
jmp    11f6 <class_win_stats1+0xe6>
mov    -0x8(%rbp),%esi
lea    0xf45(%rip),%rdi
call   1030 <printf@plt>
jmp    11f6 <class_win_stats1+0xe6>
mov    -0x8(%rbp),%esi
lea    0xf58(%rip),%rdi
call   1030 <printf@plt>
jmp    11f6 <class_win_stats1+0xe6>
mov    -0x8(%rbp),%esi
lea    0xf6b(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<class_win_stats1>:
add    $0xffffffff,%edi
cmp    $0x8,%edi
ja     112e <class_win_stats1+0x1e>
movslq %edi,%rax
lea    0x103e(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [39 x i8] c": Druid %3.d Runs :\0A\00"
@.str.1 = [39 x i8] c": Hunter %3.d Runs :\0A\00"
@.str.2 = [39 x i8] c": Mage %3.d Runs :\0A\00"
@.str.3 = [39 x i8] c": Paladin %3.d Runs :\0A\00"
@.str.4 = [39 x i8] c": Priest %3.d Runs :\0A\00"
@.str.5 = [39 x i8] c": Rogue %3.d Runs :\0A\00"
@.str.6 = [39 x i8] c": Shaman %3.d Runs :\0A\00"
@.str.7 = [39 x i8] c": Warlock %3.d Runs :\0A\00"
@.str.8 = [39 x i8] c": Warrior %3.d Runs :\0A\00"
define void @class_win_stats1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
switch i32 %5, label %33 [
i32 1, label %6
i32 2, label %9
i32 3, label %12
i32 4, label %15
i32 5, label %18
i32 6, label %21
i32 7, label %24
i32 8, label %27
i32 9, label %30
]
6: ; preds = %2
%7 = load i32, i32* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %33
9: ; preds = %2
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i32 %10)
br label %33
12: ; preds = %2
%13 = load i32, i32* %4
%14 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 %13)
br label %33
15: ; preds = %2
%16 = load i32, i32* %4
%17 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i32 %16)
br label %33
18: ; preds = %2
%19 = load i32, i32* %4
%20 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i32 %19)
br label %33
21: ; preds = %2
%22 = load i32, i32* %4
%23 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0), i32 %22)
br label %33
24: ; preds = %2
%25 = load i32, i32* %4
%26 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0), i32 %25)
br label %33
27: ; preds = %2
%28 = load i32, i32* %4
%29 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0), i32 %28)
br label %33
30: ; preds = %2
%31 = load i32, i32* %4
%32 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.8, i64 0, i64 0), i32 %31)
br label %33
33: ; preds = %2, %30, %27, %24, %21, %18, %15, %12, %9, %6
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c": Druid %3.d Runs :\0A\00"
@.str.1 = [39 x i8] c": Hunter %3.d Runs :\0A\00"
@.str.2 = [39 x i8] c": Mage %3.d Runs :\0A\00"
@.str.3 = [39 x i8] c": Paladin %3.d Runs :\0A\00"
@.str.4 = [39 x i8] c": Priest %3.d Runs :\0A\00"
@.str.5 = [39 x i8] c": Rogue %3.d Runs :\0A\00"
@.str.6 = [39 x i8] c": Shaman %3.d Runs :\0A\00"
@.str.7 = [39 x i8] c": Warlock %3.d Runs :\0A\00"
@.str.8 = [39 x i8] c": Warrior %3.d Runs :\0A\00"
@reltable.class_win_stats1 = [9 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([39 x i8]* @.str to i64), i64 ptrtoint ([9 x i32]* @reltable.class_win_stats1 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([39 x i8]* @.str.1 to i64), i64 ptrtoint ([9 x i32]* @reltable.class_win_stats1 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([39 x i8]* @.str.2 to i64), i64 ptrtoint ([9 x i32]* @reltable.class_win_stats1 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([39 x i8]* @.str.3 to i64), i64 ptrtoint ([9 x i32]* @reltable.class_win_stats1 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([39 x i8]* @.str.4 to i64), i64 ptrtoint ([9 x i32]* @reltable.class_win_stats1 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([39 x i8]* @.str.5 to i64), i64 ptrtoint ([9 x i32]* @reltable.class_win_stats1 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([39 x i8]* @.str.6 to i64), i64 ptrtoint ([9 x i32]* @reltable.class_win_stats1 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([39 x i8]* @.str.7 to i64), i64 ptrtoint ([9 x i32]* @reltable.class_win_stats1 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([39 x i8]* @.str.8 to i64), i64 ptrtoint ([9 x i32]* @reltable.class_win_stats1 to i64)) to i32)]
define void @class_win_stats1(i32 %0, i32 %1) {
%3 = add i32 %0, -1
%4 = icmp ult i32 %3, 9
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = sext i32 %3 to i64
%7 = shl i64 %6, 2
%8 = call i8* @llvm.load.relative.i64(i8* bitcast ([9 x i32]* @reltable.class_win_stats1 to i8*), i64 %7)
%9 = tail call i32 @printf(i8* %8, i32 %1)
br label %10
10: ; preds = %2, %5
ret void
}