#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 atoi(char *);
int /*<<< orphan*/ fork0();
int /*<<< orphan*/ fork1();
int /*<<< orphan*/ fork10();
int /*<<< orphan*/ fork11();
int /*<<< orphan*/ fork12();
int /*<<< orphan*/ fork13();
int /*<<< orphan*/ fork14();
int /*<<< orphan*/ fork15();
int /*<<< orphan*/ fork2();
int /*<<< orphan*/ fork3();
int /*<<< orphan*/ fork4();
int /*<<< orphan*/ fork5();
int /*<<< orphan*/ fork6();
int /*<<< orphan*/ fork7();
int /*<<< orphan*/ fork8();
int /*<<< orphan*/ fork9();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int option = 0;
  if (argc > 1)
    option = atoi(argv[1]);
  switch (option) {
  case 0:
    fork0();
    break;
  case 1:
    fork1();
    break;
  case 2:
    fork2();
    break;
  case 3:
    fork3();
    break;
  case 4:
    fork4();
    break;
  case 5:
    fork5();
    break;
  case 6:
    fork6();
    break;
  case 7:
    fork7();
    break;
  case 8:
    fork8();
    break;
  case 9:
    fork9();
    break;
  case 10:
    fork10();
    break;
  case 11:
    fork11();
    break;
  case 12:
    fork12();
    break;
  case 13:
    fork13();
    break;
  case 14:
    fork14();
    break;
  case 15:
    fork15();
    break;
  default:
    printf("Unknown option %d\n", option);
    break;
  }
  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)
movl   $0x0,-0x14(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1257 <main+0x37>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1130 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %rax,-0x20(%rbp)
sub    $0xf,%rax
ja     133c <main+0x11c>
mov    -0x20(%rbp),%rax
lea    0xd8d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1070 <fork0@plt>
jmp    134b <main+0x12b>
mov    $0x0,%al
call   10f0 <fork1@plt>
jmp    134b <main+0x12b>
mov    $0x0,%al
call   1060 <fork2@plt>
jmp    134b <main+0x12b>
mov    $0x0,%al
call   10e0 <fork3@plt>
jmp    134b <main+0x12b>
mov    $0x0,%al
call   1040 <fork4@plt>
jmp    134b <main+0x12b>
mov    $0x0,%al
call   1100 <fork5@plt>
jmp    134b <main+0x12b>
mov    $0x0,%al
call   1050 <fork6@plt>
jmp    134b <main+0x12b>
mov    $0x0,%al
call   10d0 <fork7@plt>
jmp    134b <main+0x12b>
mov    $0x0,%al
call   1030 <fork8@plt>
jmp    134b <main+0x12b>
mov    $0x0,%al
call   10c0 <fork9@plt>
jmp    134b <main+0x12b>
mov    $0x0,%al
call   1120 <fork10@plt>
jmp    134b <main+0x12b>
mov    $0x0,%al
call   1090 <fork11@plt>
jmp    134b <main+0x12b>
mov    $0x0,%al
call   10b0 <fork12@plt>
jmp    134b <main+0x12b>
mov    $0x0,%al
call   1140 <fork13@plt>
jmp    134b <main+0x12b>
mov    $0x0,%al
call   1110 <fork14@plt>
jmp    134b <main+0x12b>
mov    $0x0,%al
call   1080 <fork15@plt>
jmp    134b <main+0x12b>
mov    -0x14(%rbp),%esi
lea    0xcfa(%rip),%rdi
call   10a0 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jl     1246 <main+0x26>
mov    0x8(%rsi),%rdi
call   1130 <atoi@plt>
cmp    $0xf,%eax
ja     1251 <main+0x31>
mov    %eax,%eax
lea    0xdc3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xor    %eax,%eax
call   1070 <fork0@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xde8(%rip),%rdi
mov    %eax,%esi
call   10a0 <printf@plt>
jmp    124d <main+0x2d>
xor    %eax,%eax
call   10f0 <fork1@plt>
jmp    124d <main+0x2d>
xor    %eax,%eax
call   1060 <fork2@plt>
jmp    124d <main+0x2d>
xor    %eax,%eax
call   10e0 <fork3@plt>
jmp    124d <main+0x2d>
xor    %eax,%eax
call   1040 <fork4@plt>
jmp    124d <main+0x2d>
xor    %eax,%eax
call   1100 <fork5@plt>
jmp    124d <main+0x2d>
xor    %eax,%eax
call   1050 <fork6@plt>
jmp    124d <main+0x2d>
xor    %eax,%eax
call   10d0 <fork7@plt>
jmp    124d <main+0x2d>
xor    %eax,%eax
call   1030 <fork8@plt>
jmp    124d <main+0x2d>
xor    %eax,%eax
call   10c0 <fork9@plt>
jmp    124d <main+0x2d>
xor    %eax,%eax
call   1120 <fork10@plt>
jmp    124d <main+0x2d>
xor    %eax,%eax
call   1090 <fork11@plt>
jmp    124d <main+0x2d>
xor    %eax,%eax
call   10b0 <fork12@plt>
jmp    124d <main+0x2d>
xor    %eax,%eax
call   1140 <fork13@plt>
jmp    124d <main+0x2d>
xor    %eax,%eax
call   1110 <fork14@plt>
jmp    124d <main+0x2d>
xor    %eax,%eax
call   1080 <fork15@plt>
jmp    124d <main+0x2d>

LLVM IR (-O0):
@.str = [19 x i8] c"Unknown option %d\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
store i32 0, i32* %6
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @atoi(i8* %12)
store i32 %13, i32* %6
br label %14
14: ; preds = %9, %2
%15 = load i32, i32* %6
switch i32 %15, label %48 [
i32 0, label %16
i32 1, label %18
i32 2, label %20
i32 3, label %22
i32 4, label %24
i32 5, label %26
i32 6, label %28
i32 7, label %30
i32 8, label %32
i32 9, label %34
i32 10, label %36
i32 11, label %38
i32 12, label %40
i32 13, label %42
i32 14, label %44
i32 15, label %46
]
16: ; preds = %14
%17 = call i32 (...) @fork0()
br label %51
18: ; preds = %14
%19 = call i32 (...) @fork1()
br label %51
20: ; preds = %14
%21 = call i32 (...) @fork2()
br label %51
22: ; preds = %14
%23 = call i32 (...) @fork3()
br label %51
24: ; preds = %14
%25 = call i32 (...) @fork4()
br label %51
26: ; preds = %14
%27 = call i32 (...) @fork5()
br label %51
28: ; preds = %14
%29 = call i32 (...) @fork6()
br label %51
30: ; preds = %14
%31 = call i32 (...) @fork7()
br label %51
32: ; preds = %14
%33 = call i32 (...) @fork8()
br label %51
34: ; preds = %14
%35 = call i32 (...) @fork9()
br label %51
36: ; preds = %14
%37 = call i32 (...) @fork10()
br label %51
38: ; preds = %14
%39 = call i32 (...) @fork11()
br label %51
40: ; preds = %14
%41 = call i32 (...) @fork12()
br label %51
42: ; preds = %14
%43 = call i32 (...) @fork13()
br label %51
44: ; preds = %14
%45 = call i32 (...) @fork14()
br label %51
46: ; preds = %14
%47 = call i32 (...) @fork15()
br label %51
48: ; preds = %14
%49 = load i32, i32* %6
%50 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %49)
br label %51
51: ; preds = %48, %46, %44, %42, %40, %38, %36, %34, %32, %30, %28, %26, %24, %22, %20, %18, %16
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Unknown option %d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
switch i32 %7, label %40 [
i32 0, label %8
i32 1, label %10
i32 2, label %12
i32 3, label %14
i32 4, label %16
i32 5, label %18
i32 6, label %20
i32 7, label %22
i32 8, label %24
i32 9, label %26
i32 10, label %28
i32 11, label %30
i32 12, label %32
i32 13, label %34
i32 14, label %36
i32 15, label %38
]
8: ; preds = %2, %4
%9 = tail call i32 (...) @fork0()
br label %42
10: ; preds = %4
%11 = tail call i32 (...) @fork1()
br label %42
12: ; preds = %4
%13 = tail call i32 (...) @fork2()
br label %42
14: ; preds = %4
%15 = tail call i32 (...) @fork3()
br label %42
16: ; preds = %4
%17 = tail call i32 (...) @fork4()
br label %42
18: ; preds = %4
%19 = tail call i32 (...) @fork5()
br label %42
20: ; preds = %4
%21 = tail call i32 (...) @fork6()
br label %42
22: ; preds = %4
%23 = tail call i32 (...) @fork7()
br label %42
24: ; preds = %4
%25 = tail call i32 (...) @fork8()
br label %42
26: ; preds = %4
%27 = tail call i32 (...) @fork9()
br label %42
28: ; preds = %4
%29 = tail call i32 (...) @fork10()
br label %42
30: ; preds = %4
%31 = tail call i32 (...) @fork11()
br label %42
32: ; preds = %4
%33 = tail call i32 (...) @fork12()
br label %42
34: ; preds = %4
%35 = tail call i32 (...) @fork13()
br label %42
36: ; preds = %4
%37 = tail call i32 (...) @fork14()
br label %42
38: ; preds = %4
%39 = tail call i32 (...) @fork15()
br label %42
40: ; preds = %4
%41 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %42
42: ; preds = %40, %38, %36, %34, %32, %30, %28, %26, %24, %22, %20, %18, %16, %14, %12, %10, %8
ret i32 0
}