#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*/ puts(char *);
int main(int argc, char **argv) {
  switch (argc) {
  case 1:
    puts("case 1");
    break;
  case 2:
  case 3:
  case 4:
    puts("case 2,3,4");
    break;
  case 5:
    puts("case 5");
    break;
  case 6:
    puts("case 6");
    break;
  case 7:
    puts("case 7");
    break;
  case 9:
    puts("case 9");
    break;
  case 11:
    puts("case 11");
    break;
  case 12:
    puts("case 12");
    break;
  case 13:
    puts("case 13");
    break;
  default:
    puts("default");
  }
  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)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0xc,%eax
ja     11e8 <main+0xd8>
mov    -0x18(%rbp),%rax
lea    0xeba(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
jmp    11f4 <main+0xe4>
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
jmp    11f4 <main+0xe4>
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
jmp    11f4 <main+0xe4>
lea    0xec4(%rip),%rdi
call   1030 <puts@plt>
jmp    11f4 <main+0xe4>
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
jmp    11f4 <main+0xe4>
lea    0xeb0(%rip),%rdi
call   1030 <puts@plt>
jmp    11f4 <main+0xe4>
lea    0xea6(%rip),%rdi
call   1030 <puts@plt>
jmp    11f4 <main+0xe4>
lea    0xe9d(%rip),%rdi
call   1030 <puts@plt>
jmp    11f4 <main+0xe4>
lea    0xe94(%rip),%rdi
call   1030 <puts@plt>
jmp    11f4 <main+0xe4>
lea    0xe8b(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c"case 1\00"
@.str.1 = [11 x i8] c"case 2,3,4\00"
@.str.2 = [7 x i8] c"case 5\00"
@.str.3 = [7 x i8] c"case 6\00"
@.str.4 = [7 x i8] c"case 7\00"
@.str.5 = [7 x i8] c"case 9\00"
@.str.6 = [8 x i8] c"case 11\00"
@.str.7 = [8 x i8] c"case 12\00"
@.str.8 = [8 x i8] c"case 13\00"
@.str.9 = [8 x i8] c"default\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
switch i32 %6, label %25 [
i32 1, label %7
i32 2, label %9
i32 3, label %9
i32 4, label %9
i32 5, label %11
i32 6, label %13
i32 7, label %15
i32 9, label %17
i32 11, label %19
i32 12, label %21
i32 13, label %23
]
7: ; preds = %2
%8 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %27
9: ; preds = %2, %2, %2
%10 = call i32 @puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %27
11: ; preds = %2
%12 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %27
13: ; preds = %2
%14 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %27
15: ; preds = %2
%16 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %27
17: ; preds = %2
%18 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %27
19: ; preds = %2
%20 = call i32 @puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %27
21: ; preds = %2
%22 = call i32 @puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
br label %27
23: ; preds = %2
%24 = call i32 @puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
br label %27
25: ; preds = %2
%26 = call i32 @puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
br label %27
27: ; preds = %25, %23, %21, %19, %17, %15, %13, %11, %9, %7
ret i32 0
}

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