#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*/ exercise1(int, char **);
int /*<<< orphan*/ exercise1112(int, char **, int);
int /*<<< orphan*/ exercise13(int, char **);
int /*<<< orphan*/ exercise14(int, char **);
int /*<<< orphan*/ exercise1516(int, char **, int);
int /*<<< orphan*/ exercise17(int, char **);
int /*<<< orphan*/ exercise1920(int, char **, int);
int /*<<< orphan*/ exercise2(int, char **);
int /*<<< orphan*/ exercise21(int, char **);
int /*<<< orphan*/ exercise22(int, char **);
int /*<<< orphan*/ exercise23(int, char **);
int /*<<< orphan*/ exercise2425(int, char **, int);
int /*<<< orphan*/ exercise3(int, char **);
int /*<<< orphan*/ exercise45(int, char **, int);
int /*<<< orphan*/ exercise67(int, char **, int);
int /*<<< orphan*/ exercise8(int, char **);
int /*<<< orphan*/ exercise910(int, char **, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  if (argc < 2) {
    printf("USAGE:\n%s <exercise number> ...\n", argv[0]);
    exit(-1);
  }
  switch (atoi(argv[1])) {
  case 1:
    exercise1(argc, argv);
    break;
  case 2:
    exercise2(argc, argv);
    break;
  case 3:
    exercise3(argc, argv);
    break;
  case 4:
    exercise45(argc, argv, 1);
    break;
  case 5:
    exercise45(argc, argv, 0);
    break;
  case 6:
    exercise67(argc, argv, 1);
    break;
  case 7:
    exercise67(argc, argv, 0);
    break;
  case 8:
    exercise8(argc, argv);
    break;
  case 9:
    exercise910(argc, argv, 1);
    break;
  case 10:
    exercise910(argc, argv, 0);
    break;
  case 11:
    exercise1112(argc, argv, 1);
    break;
  case 12:
    exercise1112(argc, argv, 0);
    break;
  case 13:
    exercise13(argc, argv);
    break;
  case 14:
    exercise14(argc, argv);
    break;
  case 15:
    exercise1516(argc, argv, 1);
    break;
  case 16:
    exercise1516(argc, argv, 0);
    break;
  case 17:
    exercise17(argc, argv);
    break;
  case 19:
    exercise1920(argc, argv, 1);
    break;
  case 20:
    exercise1920(argc, argv, 0);
    break;
  case 21:
    exercise21(argc, argv);
    break;
  case 22:
    exercise22(argc, argv);
    break;
  case 23:
    exercise23(argc, argv);
    break;
  case 24:
    exercise2425(argc, argv, 1);
    break;
  case 25:
    exercise2425(argc, argv, 0);
    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)
cmpl   $0x2,-0x8(%rbp)
jge    127d <main+0x3d>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xdf6(%rip),%rdi
call   1080 <printf@plt>
mov    $0xffffffff,%edi
call   1160 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1120 <atoi@plt>
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x18,%eax
ja     1474 <main+0x234>
mov    -0x18(%rbp),%rax
lea    0xd59(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <exercise1@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   10c0 <exercise2@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1060 <exercise3@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1140 <exercise45@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1140 <exercise45@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   10e0 <exercise67@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   10e0 <exercise67@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   10a0 <exercise8@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1030 <exercise910@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <exercise910@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   10f0 <exercise1112@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   10f0 <exercise1112@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1070 <exercise13@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1100 <exercise14@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1090 <exercise1516@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1090 <exercise1516@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1110 <exercise17@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1150 <exercise1920@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1150 <exercise1920@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   10d0 <exercise21@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <exercise22@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   10b0 <exercise23@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1130 <exercise2425@plt>
jmp    1474 <main+0x234>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1130 <exercise2425@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x1,%edi
jle    13f3 <main+0x1b3>
mov    %edi,%ebp
mov    0x8(%rbx),%rdi
call   1120 <atoi@plt>
add    $0xffffffff,%eax
cmp    $0x18,%eax
ja     13ea <main+0x1aa>
lea    0xd93(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <exercise1@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
call   10c0 <exercise2@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1060 <exercise3@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   10e0 <exercise67@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   10e0 <exercise67@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
call   10a0 <exercise8@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   10f0 <exercise1112@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   10f0 <exercise1112@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1070 <exercise13@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1100 <exercise14@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1150 <exercise1920@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
call   10d0 <exercise21@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
call   10b0 <exercise23@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
jmp    135c <main+0x11c>
mov    %ebp,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1130 <exercise2425@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1140 <exercise45@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1140 <exercise45@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <exercise910@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <exercise910@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1090 <exercise1516@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1090 <exercise1516@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1110 <exercise17@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1150 <exercise1920@plt>
jmp    13ea <main+0x1aa>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <exercise22@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    (%rbx),%rsi
lea    0xc67(%rip),%rdi
call   1080 <printf@plt>
mov    $0xffffffff,%edi
call   1160 <exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"USAGE:\0A%s <exercise number> ...\0A\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
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = call i32 @exit(i32 -1)
unreachable
14: ; preds = %2
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @atoi(i8* %17)
switch i32 %18, label %115 [
i32 1, label %19
i32 2, label %23
i32 3, label %27
i32 4, label %31
i32 5, label %35
i32 6, label %39
i32 7, label %43
i32 8, label %47
i32 9, label %51
i32 10, label %55
i32 11, label %59
i32 12, label %63
i32 13, label %67
i32 14, label %71
i32 15, label %75
i32 16, label %79
i32 17, label %83
i32 19, label %87
i32 20, label %91
i32 21, label %95
i32 22, label %99
i32 23, label %103
i32 24, label %107
i32 25, label %111
]
19: ; preds = %14
%20 = load i32, i32* %4
%21 = load i8**, i8*** %5
%22 = call i32 @exercise1(i32 %20, i8** %21)
br label %115
23: ; preds = %14
%24 = load i32, i32* %4
%25 = load i8**, i8*** %5
%26 = call i32 @exercise2(i32 %24, i8** %25)
br label %115
27: ; preds = %14
%28 = load i32, i32* %4
%29 = load i8**, i8*** %5
%30 = call i32 @exercise3(i32 %28, i8** %29)
br label %115
31: ; preds = %14
%32 = load i32, i32* %4
%33 = load i8**, i8*** %5
%34 = call i32 @exercise45(i32 %32, i8** %33, i32 1)
br label %115
35: ; preds = %14
%36 = load i32, i32* %4
%37 = load i8**, i8*** %5
%38 = call i32 @exercise45(i32 %36, i8** %37, i32 0)
br label %115
39: ; preds = %14
%40 = load i32, i32* %4
%41 = load i8**, i8*** %5
%42 = call i32 @exercise67(i32 %40, i8** %41, i32 1)
br label %115
43: ; preds = %14
%44 = load i32, i32* %4
%45 = load i8**, i8*** %5
%46 = call i32 @exercise67(i32 %44, i8** %45, i32 0)
br label %115
47: ; preds = %14
%48 = load i32, i32* %4
%49 = load i8**, i8*** %5
%50 = call i32 @exercise8(i32 %48, i8** %49)
br label %115
51: ; preds = %14
%52 = load i32, i32* %4
%53 = load i8**, i8*** %5
%54 = call i32 @exercise910(i32 %52, i8** %53, i32 1)
br label %115
55: ; preds = %14
%56 = load i32, i32* %4
%57 = load i8**, i8*** %5
%58 = call i32 @exercise910(i32 %56, i8** %57, i32 0)
br label %115
59: ; preds = %14
%60 = load i32, i32* %4
%61 = load i8**, i8*** %5
%62 = call i32 @exercise1112(i32 %60, i8** %61, i32 1)
br label %115
63: ; preds = %14
%64 = load i32, i32* %4
%65 = load i8**, i8*** %5
%66 = call i32 @exercise1112(i32 %64, i8** %65, i32 0)
br label %115
67: ; preds = %14
%68 = load i32, i32* %4
%69 = load i8**, i8*** %5
%70 = call i32 @exercise13(i32 %68, i8** %69)
br label %115
71: ; preds = %14
%72 = load i32, i32* %4
%73 = load i8**, i8*** %5
%74 = call i32 @exercise14(i32 %72, i8** %73)
br label %115
75: ; preds = %14
%76 = load i32, i32* %4
%77 = load i8**, i8*** %5
%78 = call i32 @exercise1516(i32 %76, i8** %77, i32 1)
br label %115
79: ; preds = %14
%80 = load i32, i32* %4
%81 = load i8**, i8*** %5
%82 = call i32 @exercise1516(i32 %80, i8** %81, i32 0)
br label %115
83: ; preds = %14
%84 = load i32, i32* %4
%85 = load i8**, i8*** %5
%86 = call i32 @exercise17(i32 %84, i8** %85)
br label %115
87: ; preds = %14
%88 = load i32, i32* %4
%89 = load i8**, i8*** %5
%90 = call i32 @exercise1920(i32 %88, i8** %89, i32 1)
br label %115
91: ; preds = %14
%92 = load i32, i32* %4
%93 = load i8**, i8*** %5
%94 = call i32 @exercise1920(i32 %92, i8** %93, i32 0)
br label %115
95: ; preds = %14
%96 = load i32, i32* %4
%97 = load i8**, i8*** %5
%98 = call i32 @exercise21(i32 %96, i8** %97)
br label %115
99: ; preds = %14
%100 = load i32, i32* %4
%101 = load i8**, i8*** %5
%102 = call i32 @exercise22(i32 %100, i8** %101)
br label %115
103: ; preds = %14
%104 = load i32, i32* %4
%105 = load i8**, i8*** %5
%106 = call i32 @exercise23(i32 %104, i8** %105)
br label %115
107: ; preds = %14
%108 = load i32, i32* %4
%109 = load i8**, i8*** %5
%110 = call i32 @exercise2425(i32 %108, i8** %109, i32 1)
br label %115
111: ; preds = %14
%112 = load i32, i32* %4
%113 = load i8**, i8*** %5
%114 = call i32 @exercise2425(i32 %112, i8** %113, i32 0)
br label %115
115: ; preds = %14, %111, %107, %103, %99, %95, %91, %87, %83, %79, %75, %71, %67, %63, %59, %55, %51, %47, %43, %39, %35, %31, %27, %23, %19
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"USAGE:\0A%s <exercise number> ...\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @atoi(i8* %10)
switch i32 %11, label %60 [
i32 1, label %12
i32 2, label %14
i32 3, label %16
i32 4, label %18
i32 5, label %20
i32 6, label %22
i32 7, label %24
i32 8, label %26
i32 9, label %28
i32 10, label %30
i32 11, label %32
i32 12, label %34
i32 13, label %36
i32 14, label %38
i32 15, label %40
i32 16, label %42
i32 17, label %44
i32 19, label %46
i32 20, label %48
i32 21, label %50
i32 22, label %52
i32 23, label %54
i32 24, label %56
i32 25, label %58
]
12: ; preds = %8
%13 = tail call i32 @exercise1(i32 %0, i8** %1)
br label %60
14: ; preds = %8
%15 = tail call i32 @exercise2(i32 %0, i8** %1)
br label %60
16: ; preds = %8
%17 = tail call i32 @exercise3(i32 %0, i8** %1)
br label %60
18: ; preds = %8
%19 = tail call i32 @exercise45(i32 %0, i8** %1, i32 1)
br label %60
20: ; preds = %8
%21 = tail call i32 @exercise45(i32 %0, i8** %1, i32 0)
br label %60
22: ; preds = %8
%23 = tail call i32 @exercise67(i32 %0, i8** %1, i32 1)
br label %60
24: ; preds = %8
%25 = tail call i32 @exercise67(i32 %0, i8** %1, i32 0)
br label %60
26: ; preds = %8
%27 = tail call i32 @exercise8(i32 %0, i8** %1)
br label %60
28: ; preds = %8
%29 = tail call i32 @exercise910(i32 %0, i8** %1, i32 1)
br label %60
30: ; preds = %8
%31 = tail call i32 @exercise910(i32 %0, i8** %1, i32 0)
br label %60
32: ; preds = %8
%33 = tail call i32 @exercise1112(i32 %0, i8** %1, i32 1)
br label %60
34: ; preds = %8
%35 = tail call i32 @exercise1112(i32 %0, i8** %1, i32 0)
br label %60
36: ; preds = %8
%37 = tail call i32 @exercise13(i32 %0, i8** %1)
br label %60
38: ; preds = %8
%39 = tail call i32 @exercise14(i32 %0, i8** %1)
br label %60
40: ; preds = %8
%41 = tail call i32 @exercise1516(i32 %0, i8** %1, i32 1)
br label %60
42: ; preds = %8
%43 = tail call i32 @exercise1516(i32 %0, i8** %1, i32 0)
br label %60
44: ; preds = %8
%45 = tail call i32 @exercise17(i32 %0, i8** %1)
br label %60
46: ; preds = %8
%47 = tail call i32 @exercise1920(i32 %0, i8** %1, i32 1)
br label %60
48: ; preds = %8
%49 = tail call i32 @exercise1920(i32 %0, i8** %1, i32 0)
br label %60
50: ; preds = %8
%51 = tail call i32 @exercise21(i32 %0, i8** %1)
br label %60
52: ; preds = %8
%53 = tail call i32 @exercise22(i32 %0, i8** %1)
br label %60
54: ; preds = %8
%55 = tail call i32 @exercise23(i32 %0, i8** %1)
br label %60
56: ; preds = %8
%57 = tail call i32 @exercise2425(i32 %0, i8** %1, i32 1)
br label %60
58: ; preds = %8
%59 = tail call i32 @exercise2425(i32 %0, i8** %1, i32 0)
br label %60
60: ; preds = %8, %58, %56, %54, %52, %50, %48, %46, %44, %42, %40, %38, %36, %34, %32, %30, %28, %26, %24, %22, %20, %18, %16, %14, %12
ret i32 0
}