#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*/ EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
char *readline();
int strtol(char *, char **, int);
int main() {
  char *n_endptr;
  char *n_str = readline();
  int n = strtol(n_str, &n_endptr, 10);
  if (n_endptr == n_str || *n_endptr != '\0') {
    exit(EXIT_FAILURE);
  }
  if (n >= 1 && n <= 9) {
    if (n == 1)
      puts("one");
    else if (n == 2)
      puts("two");
    else if (n == 3)
      puts("three");
    else if (n == 4)
      puts("four");
    else if (n == 5)
      puts("five");
    else if (n == 6)
      puts("six");
    else if (n == 7)
      puts("seven");
    else if (n == 8)
      puts("eight");
    else
      puts("nine");
  } else
    puts("Greater than 9");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <readline@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0xa,%edx
call   1050 <strtol@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     118d <main+0x4d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     119b <main+0x5b>
mov    0x2e4c(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>
cmpl   $0x1,-0x1c(%rbp)
jl     12bb <main+0x17b>
cmpl   $0x9,-0x1c(%rbp)
jg     12bb <main+0x17b>
cmpl   $0x1,-0x1c(%rbp)
jne    11ca <main+0x8a>
lea    0xe40(%rip),%rdi
call   1030 <puts@plt>
jmp    12b6 <main+0x176>
cmpl   $0x2,-0x1c(%rbp)
jne    11e5 <main+0xa5>
lea    0xe29(%rip),%rdi
call   1030 <puts@plt>
jmp    12b1 <main+0x171>
cmpl   $0x3,-0x1c(%rbp)
jne    1200 <main+0xc0>
lea    0xe12(%rip),%rdi
call   1030 <puts@plt>
jmp    12ac <main+0x16c>
cmpl   $0x4,-0x1c(%rbp)
jne    121b <main+0xdb>
lea    0xdfd(%rip),%rdi
call   1030 <puts@plt>
jmp    12a7 <main+0x167>
cmpl   $0x5,-0x1c(%rbp)
jne    1236 <main+0xf6>
lea    0xde7(%rip),%rdi
call   1030 <puts@plt>
jmp    12a2 <main+0x162>
cmpl   $0x6,-0x1c(%rbp)
jne    1251 <main+0x111>
lea    0xdd1(%rip),%rdi
call   1030 <puts@plt>
jmp    129d <main+0x15d>
cmpl   $0x7,-0x1c(%rbp)
jne    126c <main+0x12c>
lea    0xdba(%rip),%rdi
call   1030 <puts@plt>
jmp    1298 <main+0x158>
cmpl   $0x8,-0x1c(%rbp)
jne    1287 <main+0x147>
lea    0xda5(%rip),%rdi
call   1030 <puts@plt>
jmp    1293 <main+0x153>
lea    0xd9a(%rip),%rdi
call   1030 <puts@plt>
jmp    1298 <main+0x158>
jmp    129d <main+0x15d>
jmp    12a2 <main+0x162>
jmp    12a7 <main+0x167>
jmp    12ac <main+0x16c>
jmp    12b1 <main+0x171>
jmp    12b6 <main+0x176>
jmp    12c7 <main+0x187>
lea    0xd6b(%rip),%rdi
call   1030 <puts@plt>
mov    0x2d0a(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1040 <readline@plt>
mov    %rax,%rbx
lea    0x8(%rsp),%rsi
mov    %rax,%rdi
mov    $0xa,%edx
call   1050 <strtol@plt>
mov    0x8(%rsp),%rcx
cmp    %rbx,%rcx
je     11b0 <main+0x70>
cmpb   $0x0,(%rcx)
jne    11b0 <main+0x70>
add    $0xffffffff,%eax
cmp    $0x8,%eax
ja     118c <main+0x4c>
jae    1195 <main+0x55>
cltq
lea    0xeb9(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    119c <main+0x5c>
lea    0xe9a(%rip),%rdi
jmp    119c <main+0x5c>
lea    0xe8c(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e30(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
ret
mov    0x2e29(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@.str = [4 x i8] c"one\00"
@.str.1 = [4 x i8] c"two\00"
@.str.2 = [6 x i8] c"three\00"
@.str.3 = [5 x i8] c"four\00"
@.str.4 = [5 x i8] c"five\00"
@.str.5 = [4 x i8] c"six\00"
@.str.6 = [6 x i8] c"seven\00"
@.str.7 = [6 x i8] c"eight\00"
@.str.8 = [5 x i8] c"nine\00"
@.str.9 = [15 x i8] c"Greater than 9\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i32 0, i32* %1
%5 = call i8* (...) @readline()
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strtol(i8* %6, i8** %2, i32 10)
store i32 %7, i32* %4
%8 = load i8*, i8** %2
%9 = load i8*, i8** %3
%10 = icmp eq i8* %8, %9
br i1 %10, label %16, label %11
11: ; preds = %0
%12 = load i8*, i8** %2
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %11, %0
%17 = load i32, i32* @EXIT_FAILURE
%18 = call i32 @exit(i32 %17)
unreachable
19: ; preds = %11
%20 = load i32, i32* %4
%21 = icmp sge i32 %20, 1
br i1 %21, label %22, label %75
22: ; preds = %19
%23 = load i32, i32* %4
%24 = icmp sle i32 %23, 9
br i1 %24, label %25, label %75
25: ; preds = %22
%26 = load i32, i32* %4
%27 = icmp eq i32 %26, 1
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %74
30: ; preds = %25
%31 = load i32, i32* %4
%32 = icmp eq i32 %31, 2
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %73
35: ; preds = %30
%36 = load i32, i32* %4
%37 = icmp eq i32 %36, 3
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %72
40: ; preds = %35
%41 = load i32, i32* %4
%42 = icmp eq i32 %41, 4
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %71
45: ; preds = %40
%46 = load i32, i32* %4
%47 = icmp eq i32 %46, 5
br i1 %47, label %48, label %50
48: ; preds = %45
%49 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %70
50: ; preds = %45
%51 = load i32, i32* %4
%52 = icmp eq i32 %51, 6
br i1 %52, label %53, label %55
53: ; preds = %50
%54 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
br label %69
55: ; preds = %50
%56 = load i32, i32* %4
%57 = icmp eq i32 %56, 7
br i1 %57, label %58, label %60
58: ; preds = %55
%59 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
br label %68
60: ; preds = %55
%61 = load i32, i32* %4
%62 = icmp eq i32 %61, 8
br i1 %62, label %63, label %65
63: ; preds = %60
%64 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %67
65: ; preds = %60
%66 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
br label %67
67: ; preds = %65, %63
br label %68
68: ; preds = %67, %58
br label %69
69: ; preds = %68, %53
br label %70
70: ; preds = %69, %48
br label %71
71: ; preds = %70, %43
br label %72
72: ; preds = %71, %38
br label %73
73: ; preds = %72, %33
br label %74
74: ; preds = %73, %28
br label %77
75: ; preds = %22, %19
%76 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0))
br label %77
77: ; preds = %75, %74
%78 = load i32, i32* @EXIT_SUCCESS
ret i32 %78
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@.str = [4 x i8] c"one\00"
@.str.1 = [4 x i8] c"two\00"
@.str.2 = [6 x i8] c"three\00"
@.str.3 = [5 x i8] c"four\00"
@.str.4 = [5 x i8] c"five\00"
@.str.5 = [4 x i8] c"six\00"
@.str.6 = [6 x i8] c"seven\00"
@.str.7 = [6 x i8] c"eight\00"
@.str.8 = [5 x i8] c"nine\00"
@.str.9 = [15 x i8] c"Greater than 9\00"
@EXIT_SUCCESS = global i32 0
@reltable.main = [8 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.1 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.2 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.3 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.4 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.5 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.6 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.7 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32)]
define i32 @main() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
%3 = tail call i8* (...) @readline()
%4 = call i32 @strtol(i8* %3, i8** %1, i32 10)
%5 = load i8*, i8** %1
%6 = icmp eq i8* %5, %3
br i1 %6, label %10, label %7
7: ; preds = %0
%8 = load i8, i8* %5
%9 = icmp eq i8 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %7, %0
%11 = load i32, i32* @EXIT_FAILURE
%12 = tail call i32 @exit(i32 %11)
unreachable
13: ; preds = %7
%14 = add i32 %4, -1
%15 = icmp ult i32 %14, 9
br i1 %15, label %16, label %23
16: ; preds = %13
%17 = add i32 %4, -1
%18 = icmp ult i32 %17, 8
br i1 %18, label %19, label %23
19: ; preds = %16
%20 = sext i32 %17 to i64
%21 = shl i64 %20, 2
%22 = call i8* @llvm.load.relative.i64(i8* bitcast ([8 x i32]* @reltable.main to i8*), i64 %21)
br label %23
23: ; preds = %16, %19, %13
%24 = phi i8* [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), %13 ], [ %22, %19 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), %16 ]
%25 = tail call i32 @puts(i8* dereferenceable(1) %24)
%26 = load i32, i32* @EXIT_SUCCESS
ret i32 %26
}