#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*/ stop_error();
int /*<<< orphan*/ stop_execnone();
int /*<<< orphan*/ stop_normal();
int /*<<< orphan*/ stop_nostart();
int /*<<< orphan*/ stop_segfault();
int /*<<< orphan*/ stop_symbolic();
int /*<<< orphan*/ stop_syscall();
int main(int argc, char **argv) {
  switch (argc) {
  case 1:
    stop_normal();
    break;
  case 2:
    stop_symbolic();
    break;
  case 3:
    stop_error();
    break;
  case 4:
    stop_syscall();
    break;
  case 5:
    stop_execnone();
    break;
  case 6:
    stop_nostart();
    break;
  case 7:
    stop_segfault();
    break;
  }
}


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    $0x6,%eax
ja     11fe <main+0x8e>
mov    -0x18(%rbp),%rax
lea    0xe5a(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1040 <stop_normal@plt>
jmp    11fe <main+0x8e>
mov    $0x0,%al
call   1050 <stop_symbolic@plt>
jmp    11fe <main+0x8e>
mov    $0x0,%al
call   1060 <stop_error@plt>
jmp    11fe <main+0x8e>
mov    $0x0,%al
call   1080 <stop_syscall@plt>
jmp    11fe <main+0x8e>
mov    $0x0,%al
call   1090 <stop_execnone@plt>
jmp    11fe <main+0x8e>
mov    $0x0,%al
call   1070 <stop_nostart@plt>
jmp    11fe <main+0x8e>
mov    $0x0,%al
call   1030 <stop_segfault@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
add    $0xffffffff,%edi
cmp    $0x6,%edi
ja     11c6 <main+0x56>
lea    0xe80(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
xor    %eax,%eax
call   1040 <stop_normal@plt>
jmp    11c6 <main+0x56>
xor    %eax,%eax
call   1050 <stop_symbolic@plt>
jmp    11c6 <main+0x56>
xor    %eax,%eax
call   1060 <stop_error@plt>
jmp    11c6 <main+0x56>
xor    %eax,%eax
call   1080 <stop_syscall@plt>
jmp    11c6 <main+0x56>
xor    %eax,%eax
call   1090 <stop_execnone@plt>
jmp    11c6 <main+0x56>
xor    %eax,%eax
call   1070 <stop_nostart@plt>
jmp    11c6 <main+0x56>
xor    %eax,%eax
call   1030 <stop_segfault@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 %21 [
i32 1, label %7
i32 2, label %9
i32 3, label %11
i32 4, label %13
i32 5, label %15
i32 6, label %17
i32 7, label %19
]
7: ; preds = %2
%8 = call i32 (...) @stop_normal()
br label %21
9: ; preds = %2
%10 = call i32 (...) @stop_symbolic()
br label %21
11: ; preds = %2
%12 = call i32 (...) @stop_error()
br label %21
13: ; preds = %2
%14 = call i32 (...) @stop_syscall()
br label %21
15: ; preds = %2
%16 = call i32 (...) @stop_execnone()
br label %21
17: ; preds = %2
%18 = call i32 (...) @stop_nostart()
br label %21
19: ; preds = %2
%20 = call i32 (...) @stop_segfault()
br label %21
21: ; preds = %2, %19, %17, %15, %13, %11, %9, %7
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
switch i32 %0, label %17 [
i32 1, label %3
i32 2, label %5
i32 3, label %7
i32 4, label %9
i32 5, label %11
i32 6, label %13
i32 7, label %15
]
3: ; preds = %2
%4 = tail call i32 (...) @stop_normal()
br label %17
5: ; preds = %2
%6 = tail call i32 (...) @stop_symbolic()
br label %17
7: ; preds = %2
%8 = tail call i32 (...) @stop_error()
br label %17
9: ; preds = %2
%10 = tail call i32 (...) @stop_syscall()
br label %17
11: ; preds = %2
%12 = tail call i32 (...) @stop_execnone()
br label %17
13: ; preds = %2
%14 = tail call i32 (...) @stop_nostart()
br label %17
15: ; preds = %2
%16 = tail call i32 (...) @stop_segfault()
br label %17
17: ; preds = %2, %15, %13, %11, %9, %7, %5, %3
ret i32 0
}