#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) {
  switch (argc) {
  case 2:
    printf("Two!\n");
    break;
  case 3:
    printf("Three!\n");
    break;
  case 4:
    printf("Four!\n");
    break;
  case 5:
    printf("Five!\n");
    break;
  case 6:
    printf("Six!\n");
    break;
  case 7:
    printf("Seven!\n");
    break;
  default:
    printf("Other!\n");
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xfffffffe,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x5,%eax
ja     11b1 <main+0xa1>
mov    -0x10(%rbp),%rax
lea    0xebe(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
jmp    11bd <main+0xad>
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
jmp    11bd <main+0xad>
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
jmp    11bd <main+0xad>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
jmp    11bd <main+0xad>
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
jmp    11bd <main+0xad>
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
jmp    11bd <main+0xad>
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
add    $0xfffffffe,%edi
cmp    $0x5,%edi
ja     112c <main+0x1c>
movslq %edi,%rax
lea    0xf09(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    1133 <main+0x23>
lea    0xef1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Two!\0A\00"
@.str.1 = [8 x i8] c"Three!\0A\00"
@.str.2 = [7 x i8] c"Four!\0A\00"
@.str.3 = [7 x i8] c"Five!\0A\00"
@.str.4 = [6 x i8] c"Six!\0A\00"
@.str.5 = [8 x i8] c"Seven!\0A\00"
@.str.6 = [8 x i8] c"Other!\0A\00"
define i32 @main(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %2
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %17 [
i32 2, label %5
i32 3, label %7
i32 4, label %9
i32 5, label %11
i32 6, label %13
i32 7, label %15
]
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %19
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %19
9: ; preds = %1
%10 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %19
11: ; preds = %1
%12 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %19
13: ; preds = %1
%14 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %19
15: ; preds = %1
%16 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
br label %19
17: ; preds = %1
%18 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %19
19: ; preds = %17, %15, %13, %11, %9, %7, %5
ret i32 0
}

LLVM IR (-O2):
@str = [7 x i8] c"Seven!\00"
@str.7 = [5 x i8] c"Six!\00"
@str.8 = [6 x i8] c"Five!\00"
@str.9 = [6 x i8] c"Four!\00"
@str.10 = [7 x i8] c"Three!\00"
@str.11 = [5 x i8] c"Two!\00"
@str.12 = [7 x i8] c"Other!\00"
@reltable.main = [6 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @str.11 to i64), i64 ptrtoint ([6 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @str.10 to i64), i64 ptrtoint ([6 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @str.9 to i64), i64 ptrtoint ([6 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @str.8 to i64), i64 ptrtoint ([6 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @str.7 to i64), i64 ptrtoint ([6 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @str to i64), i64 ptrtoint ([6 x i32]* @reltable.main to i64)) to i32)]
define i32 @main(i32 %0) {
%2 = add i32 %0, -2
%3 = icmp ult i32 %2, 6
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = shl i64 %5, 2
%7 = call i8* @llvm.load.relative.i64(i8* bitcast ([6 x i32]* @reltable.main to i8*), i64 %6)
br label %8
8: ; preds = %1, %4
%9 = phi i8* [ %7, %4 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.12, i64 0, i64 0), %1 ]
%10 = tail call i32 @puts(i8* dereferenceable(1) %9)
ret i32 0
}