#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 /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i;
  do {
    scanf("%d", &i);
  } while (i < 0 || i > 9);
  if (i == 0)
    printf("zero\n");
  else if (i == 1)
    printf("one\n");
  else if (i == 2)
    printf("two\n");
  else if (i == 3)
    printf("three\n");
  else if (i == 4)
    printf("four\n");
  else if (i == 5)
    printf("five\n");
  else if (i == 6)
    printf("six\n");
  else if (i == 7)
    printf("seven\n");
  else if (i == 8)
    printf("eight\n");
  else
    printf("nine\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     1158 <main+0x38>
cmpl   $0x9,-0x8(%rbp)
setg   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    112f <main+0xf>
cmpl   $0x0,-0x8(%rbp)
jne    117e <main+0x5e>
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
jmp    128a <main+0x16a>
cmpl   $0x1,-0x8(%rbp)
jne    1199 <main+0x79>
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
jmp    1285 <main+0x165>
cmpl   $0x2,-0x8(%rbp)
jne    11b4 <main+0x94>
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
jmp    1280 <main+0x160>
cmpl   $0x3,-0x8(%rbp)
jne    11cf <main+0xaf>
lea    0xe4e(%rip),%rdi
call   1030 <printf@plt>
jmp    127b <main+0x15b>
cmpl   $0x4,-0x8(%rbp)
jne    11ea <main+0xca>
lea    0xe3a(%rip),%rdi
call   1030 <printf@plt>
jmp    1276 <main+0x156>
cmpl   $0x5,-0x8(%rbp)
jne    1205 <main+0xe5>
lea    0xe25(%rip),%rdi
call   1030 <printf@plt>
jmp    1271 <main+0x151>
cmpl   $0x6,-0x8(%rbp)
jne    1220 <main+0x100>
lea    0xe10(%rip),%rdi
call   1030 <printf@plt>
jmp    126c <main+0x14c>
cmpl   $0x7,-0x8(%rbp)
jne    123b <main+0x11b>
lea    0xdfa(%rip),%rdi
call   1030 <printf@plt>
jmp    1267 <main+0x147>
cmpl   $0x8,-0x8(%rbp)
jne    1256 <main+0x136>
lea    0xde6(%rip),%rdi
call   1030 <printf@plt>
jmp    1262 <main+0x142>
lea    0xddc(%rip),%rdi
call   1030 <printf@plt>
jmp    1267 <main+0x147>
jmp    126c <main+0x14c>
jmp    1271 <main+0x151>
jmp    1276 <main+0x156>
jmp    127b <main+0x15b>
jmp    1280 <main+0x160>
jmp    1285 <main+0x165>
jmp    128a <main+0x16a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%r14
lea    0x4(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rax
cmp    $0x9,%rax
ja     1130 <main+0x10>
cmp    $0x9,%eax
jne    1154 <main+0x34>
lea    0xeb1(%rip),%rdi
jmp    1162 <main+0x42>
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"zero\0A\00"
@.str.2 = [5 x i8] c"one\0A\00"
@.str.3 = [5 x i8] c"two\0A\00"
@.str.4 = [7 x i8] c"three\0A\00"
@.str.5 = [6 x i8] c"four\0A\00"
@.str.6 = [6 x i8] c"five\0A\00"
@.str.7 = [5 x i8] c"six\0A\00"
@.str.8 = [7 x i8] c"seven\0A\00"
@.str.9 = [7 x i8] c"eight\0A\00"
@.str.10 = [6 x i8] c"nine\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %11, %0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %5
5: ; preds = %3
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 9
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ true, %5 ], [ %10, %8 ]
br i1 %12, label %3, label %13
13: ; preds = %11
%14 = load i32, i32* %2
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %68
18: ; preds = %13
%19 = load i32, i32* %2
%20 = icmp eq i32 %19, 1
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %67
23: ; preds = %18
%24 = load i32, i32* %2
%25 = icmp eq i32 %24, 2
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %66
28: ; preds = %23
%29 = load i32, i32* %2
%30 = icmp eq i32 %29, 3
br i1 %30, label %31, label %33
31: ; preds = %28
%32 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %65
33: ; preds = %28
%34 = load i32, i32* %2
%35 = icmp eq i32 %34, 4
br i1 %35, label %36, label %38
36: ; preds = %33
%37 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %64
38: ; preds = %33
%39 = load i32, i32* %2
%40 = icmp eq i32 %39, 5
br i1 %40, label %41, label %43
41: ; preds = %38
%42 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
br label %63
43: ; preds = %38
%44 = load i32, i32* %2
%45 = icmp eq i32 %44, 6
br i1 %45, label %46, label %48
46: ; preds = %43
%47 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
br label %62
48: ; preds = %43
%49 = load i32, i32* %2
%50 = icmp eq i32 %49, 7
br i1 %50, label %51, label %53
51: ; preds = %48
%52 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %61
53: ; preds = %48
%54 = load i32, i32* %2
%55 = icmp eq i32 %54, 8
br i1 %55, label %56, label %58
56: ; preds = %53
%57 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
br label %60
58: ; preds = %53
%59 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
br label %60
60: ; preds = %58, %56
br label %61
61: ; preds = %60, %51
br label %62
62: ; preds = %61, %46
br label %63
63: ; preds = %62, %41
br label %64
64: ; preds = %63, %36
br label %65
65: ; preds = %64, %31
br label %66
66: ; preds = %65, %26
br label %67
67: ; preds = %66, %21
br label %68
68: ; preds = %67, %16
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [5 x i8] c"nine\00"
@str.11 = [6 x i8] c"eight\00"
@str.12 = [6 x i8] c"seven\00"
@str.13 = [4 x i8] c"six\00"
@str.14 = [5 x i8] c"five\00"
@str.15 = [5 x i8] c"four\00"
@str.16 = [6 x i8] c"three\00"
@str.17 = [4 x i8] c"two\00"
@str.18 = [4 x i8] c"one\00"
@str.19 = [5 x i8] c"zero\00"
@reltable.main = [9 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @str.19 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @str.18 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @str.17 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @str.16 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @str.15 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @str.14 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @str.13 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @str.12 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @str.11 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32)]
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp ugt i32 %5, 9
br i1 %6, label %3, label %7
7: ; preds = %3
%8 = icmp eq i32 %5, 9
br i1 %8, label %13, label %9
9: ; preds = %7
%10 = sext i32 %5 to i64
%11 = shl i64 %10, 2
%12 = call i8* @llvm.load.relative.i64(i8* bitcast ([9 x i32]* @reltable.main to i8*), i64 %11)
br label %13
13: ; preds = %7, %9
%14 = phi i8* [ %12, %9 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0), %7 ]
%15 = call i32 @puts(i8* dereferenceable(1) %14)
ret i32 0
}