#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 arr[4];
  printf("\n enter 4 digits : ");
  for (int i = 0; i < 4; i++) {
    scanf("%d", &arr[i]);
  }
  for (int i = 0; i < 4; i++) {
    switch (arr[i]) {
    case 1:
      printf("one ");
      break;
    case 2:
      printf("TWO ");
      break;
    case 3:
      printf("three ");
      break;
    case 4:
      printf("four ");
      break;
    case 5:
      printf("five ");
      break;
    case 6:
      printf("six ");
      break;
    case 7:
      printf("seven ");
      break;
    case 8:
      printf("eight ");
      break;
    case 9:
      printf("nine ");
      break;
    default:
      printf(" ");
      break;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeee(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x4,-0x24(%rbp)
jge    1175 <main+0x55>
movslq -0x24(%rbp),%rax
lea    -0x20(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xed6(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1142 <main+0x22>
movl   $0x0,-0x28(%rbp)
cmpl   $0x4,-0x28(%rbp)
jge    126c <main+0x14c>
movslq -0x28(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x30(%rbp)
sub    $0x8,%eax
ja     124d <main+0x12d>
mov    -0x30(%rbp),%rax
lea    0xe55(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
jmp    1259 <main+0x139>
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
jmp    1259 <main+0x139>
lea    0xe68(%rip),%rdi
call   1030 <printf@plt>
jmp    1259 <main+0x139>
lea    0xe5e(%rip),%rdi
call   1030 <printf@plt>
jmp    1259 <main+0x139>
lea    0xe53(%rip),%rdi
call   1030 <printf@plt>
jmp    1259 <main+0x139>
lea    0xe48(%rip),%rdi
call   1030 <printf@plt>
jmp    1259 <main+0x139>
lea    0xe3c(%rip),%rdi
call   1030 <printf@plt>
jmp    1259 <main+0x139>
lea    0xe32(%rip),%rdi
call   1030 <printf@plt>
jmp    1259 <main+0x139>
lea    0xe28(%rip),%rdi
call   1030 <printf@plt>
jmp    1259 <main+0x139>
lea    0xde2(%rip),%rdi
call   1030 <printf@plt>
jmp    125e <main+0x13e>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    117c <main+0x5c>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xf54(%rip),%rdi
call   1040 <printf@plt>
lea    0xf5c(%rip),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    (%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x8,%eax
ja     119e <main+0x6e>
lea    0xe74(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf0b(%rip),%rdi
jmp    11f0 <main+0xc0>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    11f5 <main+0xc5>
lea    0xefb(%rip),%rdi
jmp    11f0 <main+0xc0>
lea    0xef7(%rip),%rdi
jmp    11f0 <main+0xc0>
lea    0xef5(%rip),%rdi
jmp    11f0 <main+0xc0>
lea    0xef2(%rip),%rdi
jmp    11f0 <main+0xc0>
lea    0xeef(%rip),%rdi
jmp    11f0 <main+0xc0>
lea    0xeeb(%rip),%rdi
jmp    11f0 <main+0xc0>
lea    0xee9(%rip),%rdi
jmp    11f0 <main+0xc0>
lea    0xee7(%rip),%rdi
call   1040 <printf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x8,%eax
ja     121a <main+0xea>
lea    0xe1c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe8f(%rip),%rdi
jmp    126c <main+0x13c>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    1271 <main+0x141>
lea    0xe7f(%rip),%rdi
jmp    126c <main+0x13c>
lea    0xe7b(%rip),%rdi
jmp    126c <main+0x13c>
lea    0xe79(%rip),%rdi
jmp    126c <main+0x13c>
lea    0xe76(%rip),%rdi
jmp    126c <main+0x13c>
lea    0xe73(%rip),%rdi
jmp    126c <main+0x13c>
lea    0xe6f(%rip),%rdi
jmp    126c <main+0x13c>
lea    0xe6d(%rip),%rdi
jmp    126c <main+0x13c>
lea    0xe6b(%rip),%rdi
call   1040 <printf@plt>
mov    0x8(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x8,%eax
ja     1296 <main+0x166>
lea    0xdc4(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe13(%rip),%rdi
jmp    12e8 <main+0x1b8>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    12ed <main+0x1bd>
lea    0xe03(%rip),%rdi
jmp    12e8 <main+0x1b8>
lea    0xdff(%rip),%rdi
jmp    12e8 <main+0x1b8>
lea    0xdfd(%rip),%rdi
jmp    12e8 <main+0x1b8>
lea    0xdfa(%rip),%rdi
jmp    12e8 <main+0x1b8>
lea    0xdf7(%rip),%rdi
jmp    12e8 <main+0x1b8>
lea    0xdf3(%rip),%rdi
jmp    12e8 <main+0x1b8>
lea    0xdf1(%rip),%rdi
jmp    12e8 <main+0x1b8>
lea    0xdef(%rip),%rdi
call   1040 <printf@plt>
mov    0xc(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x8,%eax
ja     1312 <main+0x1e2>
lea    0xd6c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xd97(%rip),%rdi
jmp    1364 <main+0x234>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    1369 <main+0x239>
lea    0xd87(%rip),%rdi
jmp    1364 <main+0x234>
lea    0xd83(%rip),%rdi
jmp    1364 <main+0x234>
lea    0xd81(%rip),%rdi
jmp    1364 <main+0x234>
lea    0xd7e(%rip),%rdi
jmp    1364 <main+0x234>
lea    0xd7b(%rip),%rdi
jmp    1364 <main+0x234>
lea    0xd77(%rip),%rdi
jmp    1364 <main+0x234>
lea    0xd75(%rip),%rdi
jmp    1364 <main+0x234>
lea    0xd73(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"\0A enter 4 digits : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c"one \00"
@.str.3 = [5 x i8] c"TWO \00"
@.str.4 = [7 x i8] c"three \00"
@.str.5 = [6 x i8] c"four \00"
@.str.6 = [6 x i8] c"five \00"
@.str.7 = [5 x i8] c"six \00"
@.str.8 = [7 x i8] c"seven \00"
@.str.9 = [7 x i8] c"eight \00"
@.str.10 = [6 x i8] c"nine \00"
@.str.11 = [2 x i8] c" \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i32]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %6
6: ; preds = %14, %0
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 4
br i1 %8, label %9, label %17
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 %11
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %12)
br label %14
14: ; preds = %9
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %6
17: ; preds = %6
store i32 0, i32* %4
br label %18
18: ; preds = %47, %17
%19 = load i32, i32* %4
%20 = icmp slt i32 %19, 4
br i1 %20, label %21, label %50
21: ; preds = %18
%22 = load i32, i32* %4
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 %23
%25 = load i32, i32* %24
switch i32 %25, label %44 [
i32 1, label %26
i32 2, label %28
i32 3, label %30
i32 4, label %32
i32 5, label %34
i32 6, label %36
i32 7, label %38
i32 8, label %40
i32 9, label %42
]
26: ; preds = %21
%27 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %46
28: ; preds = %21
%29 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %46
30: ; preds = %21
%31 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %46
32: ; preds = %21
%33 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %46
34: ; preds = %21
%35 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
br label %46
36: ; preds = %21
%37 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
br label %46
38: ; preds = %21
%39 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %46
40: ; preds = %21
%41 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
br label %46
42: ; preds = %21
%43 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
br label %46
44: ; preds = %21
%45 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
br label %46
46: ; preds = %44, %42, %40, %38, %36, %34, %32, %30, %28, %26
br label %47
47: ; preds = %46
%48 = load i32, i32* %4
%49 = add nsw i32 %48, 1
store i32 %49, i32* %4
br label %18
50: ; preds = %18
ret i32 0
}

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