#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 main(int argc, char *argv[]) {
  if (argc < 2)
    return 1;
  int number, i = 0, j, digit;
  char *word[1000];
  number = argv[1][0];
  while (number) {
    digit = number % 10;
    number = number / 10;
    switch (digit) {
    case 0:
      word[i++] = "zero";
      break;
    case 1:
      word[i++] = "one";
      break;
    case 2:
      word[i++] = "two";
      break;
    case 3:
      word[i++] = "three";
      break;
    case 4:
      word[i++] = "four";
      break;
    case 5:
      word[i++] = "five";
      break;
    case 6:
      word[i++] = "six";
      break;
    case 7:
      word[i++] = "seven";
      break;
    case 8:
      word[i++] = "eight";
      break;
    case 9:
      word[i++] = "nine";
      break;
    }
  }
  for (j = i - 1; j >= 0; j--) {
    printf("%s ", word[j]);
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    113f <main+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    1364 <main+0x254>
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1314 <main+0x204>
movslq -0x14(%rbp),%rcx
mov    %ecx,%eax
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rdx
add    %ecx,%edx
add    %edx,%edx
mov    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,-0x20(%rbp)
movslq -0x14(%rbp),%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%eax
mov    %rax,-0x1f68(%rbp)
sub    $0x9,%rax
ja     130f <main+0x1ff>
mov    -0x1f68(%rbp),%rax
lea    0xe3f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
cltq
lea    0xe4a(%rip),%rcx
mov    %rcx,-0x1f60(%rbp,%rax,8)
ff
jmp    130f <main+0x1ff>
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
cltq
lea    0xe2e(%rip),%rcx
mov    %rcx,-0x1f60(%rbp,%rax,8)
ff
jmp    130f <main+0x1ff>
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
cltq
lea    0xe11(%rip),%rcx
mov    %rcx,-0x1f60(%rbp,%rax,8)
ff
jmp    130f <main+0x1ff>
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
cltq
lea    0xdf4(%rip),%rcx
mov    %rcx,-0x1f60(%rbp,%rax,8)
ff
jmp    130f <main+0x1ff>
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
cltq
lea    0xdd9(%rip),%rcx
mov    %rcx,-0x1f60(%rbp,%rax,8)
ff
jmp    130f <main+0x1ff>
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
cltq
lea    0xdbd(%rip),%rcx
mov    %rcx,-0x1f60(%rbp,%rax,8)
ff
jmp    130f <main+0x1ff>
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
cltq
lea    0xda1(%rip),%rcx
mov    %rcx,-0x1f60(%rbp,%rax,8)
ff
jmp    130f <main+0x1ff>
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
cltq
lea    0xd84(%rip),%rcx
mov    %rcx,-0x1f60(%rbp,%rax,8)
ff
jmp    130f <main+0x1ff>
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
cltq
lea    0xd69(%rip),%rcx
mov    %rcx,-0x1f60(%rbp,%rax,8)
ff
jmp    130f <main+0x1ff>
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
cltq
lea    0xd4e(%rip),%rcx
mov    %rcx,-0x1f60(%rbp,%rax,8)
ff
jmp    1154 <main+0x44>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jl     134f <main+0x23f>
movslq -0x1c(%rbp),%rax
mov    -0x1f60(%rbp,%rax,8),%rsi
ff
lea    0xd20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    131d <main+0x20d>
lea    0xd08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1f70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%eax
cmp    $0x2,%edi
jl     11f1 <main+0xd1>
push   %r14
push   %rbx
sub    $0x1f48,%rsp
mov    0x8(%rsi),%rax
movsbl (%rax),%ecx
test   %ecx,%ecx
je     11db <main+0xbb>
xor    %eax,%eax
lea    0xee8(%rip),%rdx
jmp    116a <main+0x4a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x9,%ecx
cmp    $0x13,%ecx
mov    %esi,%ecx
jb     11a4 <main+0x84>
movslq %ecx,%rdi
imul   $0x66666667,%rdi,%rsi
mov    %rsi,%rbx
shr    $0x3f,%rbx
sar    $0x22,%rsi
add    %ebx,%esi
lea    (%rsi,%rsi,1),%ebx
lea    (%rbx,%rbx,4),%ebx
sub    %ebx,%edi
cmp    $0x9,%edi
ja     1160 <main+0x40>
movslq %edi,%rdi
movslq (%rdx,%rdi,4),%rdi
add    %rdx,%rdi
movslq %eax,%rbx
add    $0x1,%eax
mov    %rdi,(%rsp,%rbx,8)
jmp    1160 <main+0x40>
test   %eax,%eax
jle    11db <main+0xbb>
mov    %eax,%ebx
add    $0x1,%rbx
lea    0xe7d(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
lea    -0x2(%rbx),%eax
mov    (%rsp,%rax,8),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     11c0 <main+0xa0>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x1f48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"zero\00"
@.str.1 = [4 x i8] c"one\00"
@.str.2 = [4 x i8] c"two\00"
@.str.3 = [6 x i8] c"three\00"
@.str.4 = [5 x i8] c"four\00"
@.str.5 = [5 x i8] c"five\00"
@.str.6 = [4 x i8] c"six\00"
@.str.7 = [6 x i8] c"seven\00"
@.str.8 = [6 x i8] c"eight\00"
@.str.9 = [5 x i8] c"nine\00"
@.str.10 = [4 x i8] c"%s \00"
@.str.11 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [1000 x i8*]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 2
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 1, i32* %3
br label %98
14: ; preds = %2
store i32 0, i32* %7
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = getelementptr inbounds i8, i8* %17, i64 0
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
store i32 %20, i32* %6
br label %21
21: ; preds = %80, %14
%22 = load i32, i32* %6
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %81
24: ; preds = %21
%25 = load i32, i32* %6
%26 = srem i32 %25, 10
store i32 %26, i32* %9
%27 = load i32, i32* %6
%28 = sdiv i32 %27, 10
store i32 %28, i32* %6
%29 = load i32, i32* %9
switch i32 %29, label %80 [
i32 0, label %30
i32 1, label %35
i32 2, label %40
i32 3, label %45
i32 4, label %50
i32 5, label %55
i32 6, label %60
i32 7, label %65
i32 8, label %70
i32 9, label %75
]
30: ; preds = %24
%31 = load i32, i32* %7
%32 = add nsw i32 %31, 1
store i32 %32, i32* %7
%33 = sext i32 %31 to i64
%34 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %10, i64 0, i64 %33
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %34
br label %80
35: ; preds = %24
%36 = load i32, i32* %7
%37 = add nsw i32 %36, 1
store i32 %37, i32* %7
%38 = sext i32 %36 to i64
%39 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %10, i64 0, i64 %38
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %39
br label %80
40: ; preds = %24
%41 = load i32, i32* %7
%42 = add nsw i32 %41, 1
store i32 %42, i32* %7
%43 = sext i32 %41 to i64
%44 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %10, i64 0, i64 %43
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %44
br label %80
45: ; preds = %24
%46 = load i32, i32* %7
%47 = add nsw i32 %46, 1
store i32 %47, i32* %7
%48 = sext i32 %46 to i64
%49 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %10, i64 0, i64 %48
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8** %49
br label %80
50: ; preds = %24
%51 = load i32, i32* %7
%52 = add nsw i32 %51, 1
store i32 %52, i32* %7
%53 = sext i32 %51 to i64
%54 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %10, i64 0, i64 %53
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8** %54
br label %80
55: ; preds = %24
%56 = load i32, i32* %7
%57 = add nsw i32 %56, 1
store i32 %57, i32* %7
%58 = sext i32 %56 to i64
%59 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %10, i64 0, i64 %58
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8** %59
br label %80
60: ; preds = %24
%61 = load i32, i32* %7
%62 = add nsw i32 %61, 1
store i32 %62, i32* %7
%63 = sext i32 %61 to i64
%64 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %10, i64 0, i64 %63
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8** %64
br label %80
65: ; preds = %24
%66 = load i32, i32* %7
%67 = add nsw i32 %66, 1
store i32 %67, i32* %7
%68 = sext i32 %66 to i64
%69 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %10, i64 0, i64 %68
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8** %69
br label %80
70: ; preds = %24
%71 = load i32, i32* %7
%72 = add nsw i32 %71, 1
store i32 %72, i32* %7
%73 = sext i32 %71 to i64
%74 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %10, i64 0, i64 %73
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8** %74
br label %80
75: ; preds = %24
%76 = load i32, i32* %7
%77 = add nsw i32 %76, 1
store i32 %77, i32* %7
%78 = sext i32 %76 to i64
%79 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %10, i64 0, i64 %78
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8** %79
br label %80
80: ; preds = %24, %75, %70, %65, %60, %55, %50, %45, %40, %35, %30
br label %21
81: ; preds = %21
%82 = load i32, i32* %7
%83 = sub nsw i32 %82, 1
store i32 %83, i32* %8
br label %84
84: ; preds = %93, %81
%85 = load i32, i32* %8
%86 = icmp sge i32 %85, 0
br i1 %86, label %87, label %96
87: ; preds = %84
%88 = load i32, i32* %8
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %10, i64 0, i64 %89
%91 = load i8*, i8** %90
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %91)
br label %93
93: ; preds = %87
%94 = load i32, i32* %8
%95 = add nsw i32 %94, -1
store i32 %95, i32* %8
br label %84
96: ; preds = %84
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
store i32 0, i32* %3
br label %98
98: ; preds = %96, %13
%99 = load i32, i32* %3
ret i32 %99
}

LLVM IR (-O2):
@.str = [5 x i8] c"zero\00"
@.str.1 = [4 x i8] c"one\00"
@.str.2 = [4 x i8] c"two\00"
@.str.3 = [6 x i8] c"three\00"
@.str.4 = [5 x i8] c"four\00"
@.str.5 = [5 x i8] c"five\00"
@.str.6 = [4 x i8] c"six\00"
@.str.7 = [6 x i8] c"seven\00"
@.str.8 = [6 x i8] c"eight\00"
@.str.9 = [5 x i8] c"nine\00"
@.str.10 = [4 x i8] c"%s \00"
@reltable.main = [10 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.1 to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.2 to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.3 to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.4 to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.5 to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.6 to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.7 to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.8 to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.9 to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32)]
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1000 x i8*]
%4 = icmp slt i32 %0, 2
br i1 %4, label %44, label %5
5: ; preds = %2
%6 = bitcast [1000 x i8*]* %3 to i8*
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %42, label %11
11: ; preds = %5
%12 = sext i8 %9 to i32
br label %17
13: ; preds = %30
%14 = icmp sgt i32 %31, 0
br i1 %14, label %15, label %42
15: ; preds = %13
%16 = zext i32 %31 to i64
br label %34
17: ; preds = %11, %30
%18 = phi i32 [ %31, %30 ], [ 0, %11 ]
%19 = phi i32 [ %21, %30 ], [ %12, %11 ]
%20 = srem i32 %19, 10
%21 = sdiv i32 %19, 10
%22 = icmp ult i32 %20, 10
br i1 %22, label %23, label %30
23: ; preds = %17
%24 = sext i32 %20 to i64
%25 = shl i64 %24, 2
%26 = call i8* @llvm.load.relative.i64(i8* bitcast ([10 x i32]* @reltable.main to i8*), i64 %25)
%27 = add nsw i32 %18, 1
%28 = sext i32 %18 to i64
%29 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %3, i64 0, i64 %28
store i8* %26, i8** %29
br label %30
30: ; preds = %17, %23
%31 = phi i32 [ %18, %17 ], [ %27, %23 ]
%32 = add nsw i32 %19, 9
%33 = icmp ult i32 %32, 19
br i1 %33, label %13, label %17
34: ; preds = %15, %34
%35 = phi i64 [ %16, %15 ], [ %36, %34 ]
%36 = add nsw i64 %35, -1
%37 = and i64 %36, 4294967295
%38 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %3, i64 0, i64 %37
%39 = load i8*, i8** %38
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %39)
%41 = icmp ugt i64 %35, 1
br i1 %41, label %34, label %42
42: ; preds = %34, %5, %13
%43 = tail call i32 @putchar(i32 10)
br label %44
44: ; preds = %2, %42
%45 = phi i32 [ 0, %42 ], [ 1, %2 ]
ret i32 %45
}