#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 argc, const char *argv[]) {
  int num;
  scanf("%d", &num);
  if (num == 1)
    printf("ONE\n");
  else if (num == 2)
    printf("TWO\n");
  else if (num == 3)
    printf("THREE\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x14(%rbp)
jne    1161 <main+0x41>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
jmp    119c <main+0x7c>
cmpl   $0x2,-0x14(%rbp)
jne    117c <main+0x5c>
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
jmp    1197 <main+0x77>
cmpl   $0x3,-0x14(%rbp)
jne    1192 <main+0x72>
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
jmp    1197 <main+0x77>
jmp    119c <main+0x7c>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x2,%eax
ja     1153 <main+0x33>
cltq
lea    0xecd(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"ONE\0A\00"
@.str.2 = [5 x i8] c"TWO\0A\00"
@.str.3 = [7 x i8] c"THREE\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%8 = load i32, i32* %6
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %24
12: ; preds = %2
%13 = load i32, i32* %6
%14 = icmp eq i32 %13, 2
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %23
17: ; preds = %12
%18 = load i32, i32* %6
%19 = icmp eq i32 %18, 3
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %22
22: ; preds = %20, %17
br label %23
23: ; preds = %22, %15
br label %24
24: ; preds = %23, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [6 x i8] c"THREE\00"
@str.4 = [4 x i8] c"TWO\00"
@str.5 = [4 x i8] c"ONE\00"
@reltable.main = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @str.5 to i64), i64 ptrtoint ([3 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @str.4 to i64), i64 ptrtoint ([3 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @str to i64), i64 ptrtoint ([3 x i32]* @reltable.main to i64)) to i32)]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = add i32 %6, -1
%8 = icmp ult i32 %7, 3
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = sext i32 %7 to i64
%11 = shl i64 %10, 2
%12 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.main to i8*), i64 %11)
%13 = call i32 @puts(i8* dereferenceable(1) %12)
br label %14
14: ; preds = %2, %9
ret i32 0
}