#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 showx(int t) {
  if (t != 0) {
    if (t == 1)
      printf("One \n");
    if (t == 2)
      printf("Two \n");
    if (t == 3)
      printf("Three \n");
    if (t == 4)
      printf("Four \n");
    if (t == 5)
      printf("Five \n");
    if (t == 6)
      printf("Six \n");
    if (t == 7)
      printf("Seven \n");
    if (t == 8)
      printf("Eight \n");
    if (t == 9)
      printf("Nine \n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<showx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     11f0 <showx+0xe0>
cmpl   $0x1,-0x4(%rbp)
jne    113b <showx+0x2b>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x2,-0x4(%rbp)
jne    1151 <showx+0x41>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x3,-0x4(%rbp)
jne    1167 <showx+0x57>
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x4,-0x4(%rbp)
jne    117d <showx+0x6d>
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x5,-0x4(%rbp)
jne    1193 <showx+0x83>
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x6,-0x4(%rbp)
jne    11a9 <showx+0x99>
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x7,-0x4(%rbp)
jne    11bf <showx+0xaf>
lea    0xe6e(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x8,-0x4(%rbp)
jne    11d5 <showx+0xc5>
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x9,-0x4(%rbp)
jne    11eb <showx+0xdb>
lea    0xe52(%rip),%rdi
call   1030 <printf@plt>
jmp    11f0 <showx+0xe0>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showx>:
add    $0xffffffff,%edi
cmp    $0x8,%edi
ja     1133 <showx+0x23>
push   %rax
movslq %edi,%rax
lea    0xf15(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
call   1030 <puts@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"One \0A\00"
@.str.1 = [6 x i8] c"Two \0A\00"
@.str.2 = [8 x i8] c"Three \0A\00"
@.str.3 = [7 x i8] c"Four \0A\00"
@.str.4 = [7 x i8] c"Five \0A\00"
@.str.5 = [6 x i8] c"Six \0A\00"
@.str.6 = [8 x i8] c"Seven \0A\00"
@.str.7 = [8 x i8] c"Eight \0A\00"
@.str.8 = [7 x i8] c"Nine \0A\00"
define i32 @showx(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %51
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 2
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %10
%16 = load i32, i32* %2
%17 = icmp eq i32 %16, 3
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %20
20: ; preds = %18, %15
%21 = load i32, i32* %2
%22 = icmp eq i32 %21, 4
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %25
25: ; preds = %23, %20
%26 = load i32, i32* %2
%27 = icmp eq i32 %26, 5
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %30
30: ; preds = %28, %25
%31 = load i32, i32* %2
%32 = icmp eq i32 %31, 6
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %35
35: ; preds = %33, %30
%36 = load i32, i32* %2
%37 = icmp eq i32 %36, 7
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %40
40: ; preds = %38, %35
%41 = load i32, i32* %2
%42 = icmp eq i32 %41, 8
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
br label %45
45: ; preds = %43, %40
%46 = load i32, i32* %2
%47 = icmp eq i32 %46, 9
br i1 %47, label %48, label %50
48: ; preds = %45
%49 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %50
50: ; preds = %48, %45
br label %51
51: ; preds = %50, %1
ret i32 0
}

LLVM IR (-O2):
@str = [6 x i8] c"Nine \00"
@str.9 = [7 x i8] c"Eight \00"
@str.10 = [7 x i8] c"Seven \00"
@str.11 = [5 x i8] c"Six \00"
@str.12 = [6 x i8] c"Five \00"
@str.13 = [6 x i8] c"Four \00"
@str.14 = [7 x i8] c"Three \00"
@str.15 = [5 x i8] c"Two \00"
@str.16 = [5 x i8] c"One \00"
@reltable.showx = [9 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @str.16 to i64), i64 ptrtoint ([9 x i32]* @reltable.showx to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @str.15 to i64), i64 ptrtoint ([9 x i32]* @reltable.showx to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @str.14 to i64), i64 ptrtoint ([9 x i32]* @reltable.showx to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @str.13 to i64), i64 ptrtoint ([9 x i32]* @reltable.showx to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @str.12 to i64), i64 ptrtoint ([9 x i32]* @reltable.showx to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @str.11 to i64), i64 ptrtoint ([9 x i32]* @reltable.showx to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @str.10 to i64), i64 ptrtoint ([9 x i32]* @reltable.showx to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @str.9 to i64), i64 ptrtoint ([9 x i32]* @reltable.showx to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @str to i64), i64 ptrtoint ([9 x i32]* @reltable.showx to i64)) to i32)]
define i32 @showx(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 9
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = shl i64 %5, 2
%7 = call i8* @llvm.load.relative.i64(i8* bitcast ([9 x i32]* @reltable.showx to i8*), i64 %6)
%8 = tail call i32 @puts(i8* dereferenceable(1) %7)
br label %9
9: ; preds = %1, %4
ret i32 0
}