#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*/ print_ones(int);
int /*<<< orphan*/ printf(char *);
void print_tens(int tens, int ones) {
  switch (tens) {
  case 0:
    print_ones(ones);
    break;
  case 1:
    switch (ones) {
    case 0:
      printf("Ten ");
      break;
    case 1:
      printf("Eleven ");
      break;
    case 2:
      printf("Twelve ");
      break;
    case 3:
      printf("Thirteen ");
      break;
    case 4:
      printf("Fourteen ");
      break;
    case 5:
      printf("Fifteen ");
      break;
    case 6:
      printf("Sixteen ");
      break;
    case 7:
      printf("Seventeen ");
      break;
    case 8:
      printf("Eighteen ");
      break;
    case 9:
      printf("Ninteen ");
    }
    break;
  case 2:
    printf("Twenty ");
    print_ones(ones);
    break;
  case 3:
    printf("Thirty ");
    print_ones(ones);
    break;
  case 4:
    printf("Fourty ");
    print_ones(ones);
    break;
  case 5:
    printf("Fifty ");
    print_ones(ones);
    break;
  case 6:
    printf("Sixty ");
    print_ones(ones);
    break;
  case 7:
    printf("Seventy ");
    print_ones(ones);
    break;
  case 8:
    printf("Eighty ");
    print_ones(ones);
    break;
  case 9:
    printf("Ninty ");
    print_ones(ones);
  }
}


x86 assembly (clang, -O0):
<print_tens>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x9,%rax
ja     12f2 <print_tens+0x1d2>
mov    -0x10(%rbp),%rax
lea    0xeb6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%edi
call   1040 <print_ones@plt>
jmp    12f2 <print_tens+0x1d2>
mov    -0x8(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x9,%rax
ja     122a <print_tens+0x10a>
mov    -0x18(%rbp),%rax
lea    0xeac(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
jmp    122a <print_tens+0x10a>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
jmp    122a <print_tens+0x10a>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
jmp    122a <print_tens+0x10a>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
jmp    122a <print_tens+0x10a>
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
jmp    122a <print_tens+0x10a>
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
jmp    122a <print_tens+0x10a>
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
jmp    122a <print_tens+0x10a>
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
jmp    122a <print_tens+0x10a>
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
jmp    122a <print_tens+0x10a>
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
jmp    12f2 <print_tens+0x1d2>
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <print_ones@plt>
jmp    12f2 <print_tens+0x1d2>
lea    0xe62(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <print_ones@plt>
jmp    12f2 <print_tens+0x1d2>
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <print_ones@plt>
jmp    12f2 <print_tens+0x1d2>
lea    0xe40(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <print_ones@plt>
jmp    12f2 <print_tens+0x1d2>
lea    0xe2e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <print_ones@plt>
jmp    12f2 <print_tens+0x1d2>
lea    0xe1c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <print_ones@plt>
jmp    12f2 <print_tens+0x1d2>
lea    0xe0c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <print_ones@plt>
jmp    12f2 <print_tens+0x1d2>
lea    0xdfb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <print_ones@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_tens>:
push   %rbx
cmp    $0x9,%edi
ja     115e <print_tens+0x3e>
mov    %esi,%ebx
mov    %edi,%eax
lea    0xecf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmp    $0x9,%ebx
ja     115e <print_tens+0x3e>
mov    %ebx,%eax
lea    0xee0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xef8(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>
pop    %rbx
ret
lea    0xf42(%rip),%rdi
jmp    11a6 <print_tens+0x86>
lea    0xf41(%rip),%rdi
jmp    11a6 <print_tens+0x86>
lea    0xf40(%rip),%rdi
jmp    11a6 <print_tens+0x86>
lea    0xf3f(%rip),%rdi
jmp    11a6 <print_tens+0x86>
lea    0xf3d(%rip),%rdi
jmp    11a6 <print_tens+0x86>
lea    0xf3b(%rip),%rdi
jmp    11a6 <print_tens+0x86>
lea    0xf3b(%rip),%rdi
jmp    11a6 <print_tens+0x86>
lea    0xf3a(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <print_ones@plt>
lea    0xe9b(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>
lea    0xe96(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>
lea    0xe91(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>
lea    0xe8e(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>
lea    0xe8b(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>
lea    0xe87(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>
lea    0xe83(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>
lea    0xe81(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>
lea    0xe7e(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"Ten \00"
@.str.1 = [8 x i8] c"Eleven \00"
@.str.2 = [8 x i8] c"Twelve \00"
@.str.3 = [10 x i8] c"Thirteen \00"
@.str.4 = [10 x i8] c"Fourteen \00"
@.str.5 = [9 x i8] c"Fifteen \00"
@.str.6 = [9 x i8] c"Sixteen \00"
@.str.7 = [11 x i8] c"Seventeen \00"
@.str.8 = [10 x i8] c"Eighteen \00"
@.str.9 = [9 x i8] c"Ninteen \00"
@.str.10 = [8 x i8] c"Twenty \00"
@.str.11 = [8 x i8] c"Thirty \00"
@.str.12 = [8 x i8] c"Fourty \00"
@.str.13 = [7 x i8] c"Fifty \00"
@.str.14 = [7 x i8] c"Sixty \00"
@.str.15 = [9 x i8] c"Seventy \00"
@.str.16 = [8 x i8] c"Eighty \00"
@.str.17 = [7 x i8] c"Ninty \00"
define void @print_tens(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 %64 [
i32 0, label %6
i32 1, label %9
i32 2, label %32
i32 3, label %36
i32 4, label %40
i32 5, label %44
i32 6, label %48
i32 7, label %52
i32 8, label %56
i32 9, label %60
]
6: ; preds = %2
%7 = load i32, i32* %4
%8 = call i32 @print_ones(i32 %7)
br label %64
9: ; preds = %2
%10 = load i32, i32* %4
switch i32 %10, label %31 [
i32 0, label %11
i32 1, label %13
i32 2, label %15
i32 3, label %17
i32 4, label %19
i32 5, label %21
i32 6, label %23
i32 7, label %25
i32 8, label %27
i32 9, label %29
]
11: ; preds = %9
%12 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %31
13: ; preds = %9
%14 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %31
15: ; preds = %9
%16 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %31
17: ; preds = %9
%18 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %31
19: ; preds = %9
%20 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
br label %31
21: ; preds = %9
%22 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
br label %31
23: ; preds = %9
%24 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
br label %31
25: ; preds = %9
%26 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
br label %31
27: ; preds = %9
%28 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
br label %31
29: ; preds = %9
%30 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
br label %31
31: ; preds = %29, %9, %27, %25, %23, %21, %19, %17, %15, %13, %11
br label %64
32: ; preds = %2
%33 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%34 = load i32, i32* %4
%35 = call i32 @print_ones(i32 %34)
br label %64
36: ; preds = %2
%37 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
%38 = load i32, i32* %4
%39 = call i32 @print_ones(i32 %38)
br label %64
40: ; preds = %2
%41 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%42 = load i32, i32* %4
%43 = call i32 @print_ones(i32 %42)
br label %64
44: ; preds = %2
%45 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
%46 = load i32, i32* %4
%47 = call i32 @print_ones(i32 %46)
br label %64
48: ; preds = %2
%49 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0))
%50 = load i32, i32* %4
%51 = call i32 @print_ones(i32 %50)
br label %64
52: ; preds = %2
%53 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0))
%54 = load i32, i32* %4
%55 = call i32 @print_ones(i32 %54)
br label %64
56: ; preds = %2
%57 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0))
%58 = load i32, i32* %4
%59 = call i32 @print_ones(i32 %58)
br label %64
60: ; preds = %2
%61 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0))
%62 = load i32, i32* %4
%63 = call i32 @print_ones(i32 %62)
br label %64
64: ; preds = %60, %2, %56, %52, %48, %44, %40, %36, %32, %31, %6
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"Ten \00"
@.str.1 = [8 x i8] c"Eleven \00"
@.str.2 = [8 x i8] c"Twelve \00"
@.str.3 = [10 x i8] c"Thirteen \00"
@.str.4 = [10 x i8] c"Fourteen \00"
@.str.5 = [9 x i8] c"Fifteen \00"
@.str.6 = [9 x i8] c"Sixteen \00"
@.str.7 = [11 x i8] c"Seventeen \00"
@.str.8 = [10 x i8] c"Eighteen \00"
@.str.9 = [9 x i8] c"Ninteen \00"
@.str.10 = [8 x i8] c"Twenty \00"
@.str.11 = [8 x i8] c"Thirty \00"
@.str.12 = [8 x i8] c"Fourty \00"
@.str.13 = [7 x i8] c"Fifty \00"
@.str.14 = [7 x i8] c"Sixty \00"
@.str.15 = [9 x i8] c"Seventy \00"
@.str.16 = [8 x i8] c"Eighty \00"
@.str.17 = [7 x i8] c"Ninty \00"
define void @print_tens(i32 %0, i32 %1) {
switch i32 %0, label %50 [
i32 0, label %3
i32 1, label %5
i32 2, label %26
i32 3, label %29
i32 4, label %32
i32 5, label %35
i32 6, label %38
i32 7, label %41
i32 8, label %44
i32 9, label %47
]
3: ; preds = %2
%4 = tail call i32 @print_ones(i32 %1)
br label %50
5: ; preds = %2
switch i32 %1, label %50 [
i32 0, label %6
i32 1, label %8
i32 2, label %10
i32 3, label %12
i32 4, label %14
i32 5, label %16
i32 6, label %18
i32 7, label %20
i32 8, label %22
i32 9, label %24
]
6: ; preds = %5
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %50
8: ; preds = %5
%9 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %50
10: ; preds = %5
%11 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %50
12: ; preds = %5
%13 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %50
14: ; preds = %5
%15 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
br label %50
16: ; preds = %5
%17 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
br label %50
18: ; preds = %5
%19 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
br label %50
20: ; preds = %5
%21 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
br label %50
22: ; preds = %5
%23 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
br label %50
24: ; preds = %5
%25 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
br label %50
26: ; preds = %2
%27 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%28 = tail call i32 @print_ones(i32 %1)
br label %50
29: ; preds = %2
%30 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
%31 = tail call i32 @print_ones(i32 %1)
br label %50
32: ; preds = %2
%33 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%34 = tail call i32 @print_ones(i32 %1)
br label %50
35: ; preds = %2
%36 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
%37 = tail call i32 @print_ones(i32 %1)
br label %50
38: ; preds = %2
%39 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0))
%40 = tail call i32 @print_ones(i32 %1)
br label %50
41: ; preds = %2
%42 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0))
%43 = tail call i32 @print_ones(i32 %1)
br label %50
44: ; preds = %2
%45 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0))
%46 = tail call i32 @print_ones(i32 %1)
br label %50
47: ; preds = %2
%48 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0))
%49 = tail call i32 @print_ones(i32 %1)
br label %50
50: ; preds = %6, %8, %10, %12, %14, %16, %18, %20, %22, %5, %24, %47, %2, %44, %41, %38, %35, %32, %29, %26, %3
ret void
}