#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*/ Problem1();
int /*<<< orphan*/ Problem10();
int /*<<< orphan*/ Problem11();
int /*<<< orphan*/ Problem12();
int /*<<< orphan*/ Problem13();
int /*<<< orphan*/ Problem14();
int /*<<< orphan*/ Problem15();
int /*<<< orphan*/ Problem16();
int /*<<< orphan*/ Problem18();
int /*<<< orphan*/ Problem19();
int /*<<< orphan*/ Problem2();
int /*<<< orphan*/ Problem20();
int /*<<< orphan*/ Problem3();
int /*<<< orphan*/ Problem4();
int /*<<< orphan*/ Problem5();
int /*<<< orphan*/ Problem6();
int /*<<< orphan*/ Problem7();
int /*<<< orphan*/ Problem8();
int /*<<< orphan*/ Problem9();
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int test, exit = 0;
  while (exit == 0) {
    printf("Please enter a program number to test: ");
    scanf("%d", &test);
    getchar();
    if (test == 1) {
      Problem1();
    } else if (test == 2) {
      Problem2();
    } else if (test == 3) {
      Problem3();
    } else if (test == 4) {
      Problem4();
    } else if (test == 5) {
      Problem5();
    } else if (test == 6) {
      Problem6();
    } else if (test == 7) {
      Problem7();
    } else if (test == 8) {
      Problem8();
    } else if (test == 9) {
      Problem9();
    } else if (test == 10) {
      Problem10();
    } else if (test == 11) {
      Problem11();
    } else if (test == 12) {
      Problem12();
    } else if (test == 13) {
      Problem13();
    } else if (test == 14) {
      Problem14();
    } else if (test == 15) {
      Problem15();
    } else if (test == 16) {
      Problem16();
    } else if (test == 17) {
      printf("not available");
    } else if (test == 18) {
      Problem18();
    } else if (test == 19) {
      Problem19();
    } else if (test == 20) {
      Problem20();
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    14bf <main+0x25f>
lea    0xd79(%rip),%rdi
call   10e0 <printf@plt>
lea    0xd95(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1180 <scanf@plt>
mov    $0x0,%al
call   10f0 <getchar@plt>
cmpl   $0x1,-0x8(%rbp)
jne    12b9 <main+0x59>
mov    $0x0,%al
call   1070 <Problem1@plt>
jmp    14ba <main+0x25a>
cmpl   $0x2,-0x8(%rbp)
jne    12cf <main+0x6f>
mov    $0x0,%al
call   1120 <Problem2@plt>
jmp    14b5 <main+0x255>
cmpl   $0x3,-0x8(%rbp)
jne    12e5 <main+0x85>
mov    $0x0,%al
call   1080 <Problem3@plt>
jmp    14b0 <main+0x250>
cmpl   $0x4,-0x8(%rbp)
jne    12fb <main+0x9b>
mov    $0x0,%al
call   1130 <Problem4@plt>
jmp    14ab <main+0x24b>
cmpl   $0x5,-0x8(%rbp)
jne    1311 <main+0xb1>
mov    $0x0,%al
call   1040 <Problem5@plt>
jmp    14a6 <main+0x246>
cmpl   $0x6,-0x8(%rbp)
jne    1327 <main+0xc7>
mov    $0x0,%al
call   1100 <Problem6@plt>
jmp    14a1 <main+0x241>
cmpl   $0x7,-0x8(%rbp)
jne    133d <main+0xdd>
mov    $0x0,%al
call   1060 <Problem7@plt>
jmp    149c <main+0x23c>
cmpl   $0x8,-0x8(%rbp)
jne    1353 <main+0xf3>
mov    $0x0,%al
call   1110 <Problem8@plt>
jmp    1497 <main+0x237>
cmpl   $0x9,-0x8(%rbp)
jne    1369 <main+0x109>
mov    $0x0,%al
call   1030 <Problem9@plt>
jmp    1492 <main+0x232>
cmpl   $0xa,-0x8(%rbp)
jne    137f <main+0x11f>
mov    $0x0,%al
call   1090 <Problem10@plt>
jmp    148d <main+0x22d>
cmpl   $0xb,-0x8(%rbp)
jne    1395 <main+0x135>
mov    $0x0,%al
call   1140 <Problem11@plt>
jmp    1488 <main+0x228>
cmpl   $0xc,-0x8(%rbp)
jne    13ab <main+0x14b>
mov    $0x0,%al
call   10a0 <Problem12@plt>
jmp    1483 <main+0x223>
cmpl   $0xd,-0x8(%rbp)
jne    13c1 <main+0x161>
mov    $0x0,%al
call   1160 <Problem13@plt>
jmp    147e <main+0x21e>
cmpl   $0xe,-0x8(%rbp)
jne    13d7 <main+0x177>
mov    $0x0,%al
call   10c0 <Problem14@plt>
jmp    1479 <main+0x219>
cmpl   $0xf,-0x8(%rbp)
jne    13ed <main+0x18d>
mov    $0x0,%al
call   1170 <Problem15@plt>
jmp    1474 <main+0x214>
cmpl   $0x10,-0x8(%rbp)
jne    1403 <main+0x1a3>
mov    $0x0,%al
call   10b0 <Problem16@plt>
jmp    146f <main+0x20f>
cmpl   $0x11,-0x8(%rbp)
jne    141e <main+0x1be>
lea    0xc17(%rip),%rdi
call   10e0 <printf@plt>
jmp    146a <main+0x20a>
cmpl   $0x12,-0x8(%rbp)
jne    1434 <main+0x1d4>
mov    $0x0,%al
call   10d0 <Problem18@plt>
jmp    1465 <main+0x205>
cmpl   $0x13,-0x8(%rbp)
jne    144a <main+0x1ea>
mov    $0x0,%al
call   1150 <Problem19@plt>
jmp    1460 <main+0x200>
cmpl   $0x14,-0x8(%rbp)
jne    145b <main+0x1fb>
mov    $0x0,%al
call   1050 <Problem20@plt>
jmp    1460 <main+0x200>
jmp    1465 <main+0x205>
jmp    146a <main+0x20a>
jmp    146f <main+0x20f>
jmp    1474 <main+0x214>
jmp    1479 <main+0x219>
jmp    147e <main+0x21e>
jmp    1483 <main+0x223>
jmp    1488 <main+0x228>
jmp    148d <main+0x22d>
jmp    1492 <main+0x232>
jmp    1497 <main+0x237>
jmp    149c <main+0x23c>
jmp    14a1 <main+0x241>
jmp    14a6 <main+0x246>
jmp    14ab <main+0x24b>
jmp    14b0 <main+0x250>
jmp    14b5 <main+0x255>
jmp    14ba <main+0x25a>
jmp    1276 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xddc(%rip),%r14
lea    0xdfd(%rip),%r15
lea    0xc(%rsp),%r13
lea    0xd79(%rip),%rbx
lea    0xded(%rip),%r12
jmp    12a0 <main+0x40>
xor    %eax,%eax
call   1050 <Problem20@plt>
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   10e0 <printf@plt>
mov    %r15,%rdi
mov    %r13,%rsi
call   1180 <scanf@plt>
xor    %eax,%eax
call   10f0 <getchar@plt>
mov    0xc(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x13,%eax
ja     12a0 <main+0x40>
movslq (%rbx,%rax,4),%rax
add    %rbx,%rax
jmp    *%rax
xor    %eax,%eax
call   1070 <Problem1@plt>
jmp    12a0 <main+0x40>
xor    %eax,%eax
call   1120 <Problem2@plt>
jmp    12a0 <main+0x40>
xor    %eax,%eax
call   1080 <Problem3@plt>
jmp    12a0 <main+0x40>
xor    %eax,%eax
call   1130 <Problem4@plt>
jmp    12a0 <main+0x40>
xor    %eax,%eax
call   1040 <Problem5@plt>
jmp    12a0 <main+0x40>
xor    %eax,%eax
call   1100 <Problem6@plt>
jmp    12a0 <main+0x40>
xor    %eax,%eax
call   1060 <Problem7@plt>
jmp    12a0 <main+0x40>
xor    %eax,%eax
call   1110 <Problem8@plt>
jmp    12a0 <main+0x40>
xor    %eax,%eax
call   1030 <Problem9@plt>
jmp    12a0 <main+0x40>
xor    %eax,%eax
call   1090 <Problem10@plt>
jmp    12a0 <main+0x40>
xor    %eax,%eax
call   1140 <Problem11@plt>
jmp    12a0 <main+0x40>
xor    %eax,%eax
call   10a0 <Problem12@plt>
jmp    12a0 <main+0x40>
xor    %eax,%eax
call   1160 <Problem13@plt>
jmp    12a0 <main+0x40>
xor    %eax,%eax
call   10c0 <Problem14@plt>
jmp    12a0 <main+0x40>
xor    %eax,%eax
call   1170 <Problem15@plt>
jmp    12a0 <main+0x40>
xor    %eax,%eax
call   10b0 <Problem16@plt>
jmp    12a0 <main+0x40>
mov    %r12,%rdi
call   10e0 <printf@plt>
jmp    12a0 <main+0x40>
xor    %eax,%eax
call   10d0 <Problem18@plt>
jmp    12a0 <main+0x40>
xor    %eax,%eax
call   1150 <Problem19@plt>
jmp    12a0 <main+0x40>

LLVM IR (-O0):
@.str = [40 x i8] c"Please enter a program number to test: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [14 x i8] c"not available\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %129, %0
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %130
7: ; preds = %4
%8 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%10 = call i32 (...) @getchar()
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %15
13: ; preds = %7
%14 = call i32 (...) @Problem1()
br label %129
15: ; preds = %7
%16 = load i32, i32* %2
%17 = icmp eq i32 %16, 2
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 (...) @Problem2()
br label %128
20: ; preds = %15
%21 = load i32, i32* %2
%22 = icmp eq i32 %21, 3
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = call i32 (...) @Problem3()
br label %127
25: ; preds = %20
%26 = load i32, i32* %2
%27 = icmp eq i32 %26, 4
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 (...) @Problem4()
br label %126
30: ; preds = %25
%31 = load i32, i32* %2
%32 = icmp eq i32 %31, 5
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = call i32 (...) @Problem5()
br label %125
35: ; preds = %30
%36 = load i32, i32* %2
%37 = icmp eq i32 %36, 6
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = call i32 (...) @Problem6()
br label %124
40: ; preds = %35
%41 = load i32, i32* %2
%42 = icmp eq i32 %41, 7
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = call i32 (...) @Problem7()
br label %123
45: ; preds = %40
%46 = load i32, i32* %2
%47 = icmp eq i32 %46, 8
br i1 %47, label %48, label %50
48: ; preds = %45
%49 = call i32 (...) @Problem8()
br label %122
50: ; preds = %45
%51 = load i32, i32* %2
%52 = icmp eq i32 %51, 9
br i1 %52, label %53, label %55
53: ; preds = %50
%54 = call i32 (...) @Problem9()
br label %121
55: ; preds = %50
%56 = load i32, i32* %2
%57 = icmp eq i32 %56, 10
br i1 %57, label %58, label %60
58: ; preds = %55
%59 = call i32 (...) @Problem10()
br label %120
60: ; preds = %55
%61 = load i32, i32* %2
%62 = icmp eq i32 %61, 11
br i1 %62, label %63, label %65
63: ; preds = %60
%64 = call i32 (...) @Problem11()
br label %119
65: ; preds = %60
%66 = load i32, i32* %2
%67 = icmp eq i32 %66, 12
br i1 %67, label %68, label %70
68: ; preds = %65
%69 = call i32 (...) @Problem12()
br label %118
70: ; preds = %65
%71 = load i32, i32* %2
%72 = icmp eq i32 %71, 13
br i1 %72, label %73, label %75
73: ; preds = %70
%74 = call i32 (...) @Problem13()
br label %117
75: ; preds = %70
%76 = load i32, i32* %2
%77 = icmp eq i32 %76, 14
br i1 %77, label %78, label %80
78: ; preds = %75
%79 = call i32 (...) @Problem14()
br label %116
80: ; preds = %75
%81 = load i32, i32* %2
%82 = icmp eq i32 %81, 15
br i1 %82, label %83, label %85
83: ; preds = %80
%84 = call i32 (...) @Problem15()
br label %115
85: ; preds = %80
%86 = load i32, i32* %2
%87 = icmp eq i32 %86, 16
br i1 %87, label %88, label %90
88: ; preds = %85
%89 = call i32 (...) @Problem16()
br label %114
90: ; preds = %85
%91 = load i32, i32* %2
%92 = icmp eq i32 %91, 17
br i1 %92, label %93, label %95
93: ; preds = %90
%94 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %113
95: ; preds = %90
%96 = load i32, i32* %2
%97 = icmp eq i32 %96, 18
br i1 %97, label %98, label %100
98: ; preds = %95
%99 = call i32 (...) @Problem18()
br label %112
100: ; preds = %95
%101 = load i32, i32* %2
%102 = icmp eq i32 %101, 19
br i1 %102, label %103, label %105
103: ; preds = %100
%104 = call i32 (...) @Problem19()
br label %111
105: ; preds = %100
%106 = load i32, i32* %2
%107 = icmp eq i32 %106, 20
br i1 %107, label %108, label %110
108: ; preds = %105
%109 = call i32 (...) @Problem20()
br label %110
110: ; preds = %108, %105
br label %111
111: ; preds = %110, %103
br label %112
112: ; preds = %111, %98
br label %113
113: ; preds = %112, %93
br label %114
114: ; preds = %113, %88
br label %115
115: ; preds = %114, %83
br label %116
116: ; preds = %115, %78
br label %117
117: ; preds = %116, %73
br label %118
118: ; preds = %117, %68
br label %119
119: ; preds = %118, %63
br label %120
120: ; preds = %119, %58
br label %121
121: ; preds = %120, %53
br label %122
122: ; preds = %121, %48
br label %123
123: ; preds = %122, %43
br label %124
124: ; preds = %123, %38
br label %125
125: ; preds = %124, %33
br label %126
126: ; preds = %125, %28
br label %127
127: ; preds = %126, %23
br label %128
128: ; preds = %127, %18
br label %129
129: ; preds = %128, %13
br label %4
130: ; preds = %4
%131 = load i32, i32* %1
ret i32 %131
}

LLVM IR (-O2):
@.str = [40 x i8] c"Please enter a program number to test: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [14 x i8] c"not available\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %8, %0
%4 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = call i32 (...) @getchar()
%7 = load i32, i32* %1
switch i32 %7, label %8 [
i32 1, label %9
i32 2, label %11
i32 3, label %13
i32 4, label %15
i32 5, label %17
i32 6, label %19
i32 7, label %21
i32 8, label %23
i32 9, label %25
i32 10, label %27
i32 11, label %29
i32 12, label %31
i32 13, label %33
i32 14, label %35
i32 15, label %37
i32 16, label %39
i32 17, label %41
i32 18, label %43
i32 19, label %45
i32 20, label %47
]
8: ; preds = %3, %11, %15, %19, %23, %27, %31, %35, %39, %43, %47, %45, %41, %37, %33, %29, %25, %21, %17, %13, %9
br label %3
9: ; preds = %3
%10 = call i32 (...) @Problem1()
br label %8
11: ; preds = %3
%12 = call i32 (...) @Problem2()
br label %8
13: ; preds = %3
%14 = call i32 (...) @Problem3()
br label %8
15: ; preds = %3
%16 = call i32 (...) @Problem4()
br label %8
17: ; preds = %3
%18 = call i32 (...) @Problem5()
br label %8
19: ; preds = %3
%20 = call i32 (...) @Problem6()
br label %8
21: ; preds = %3
%22 = call i32 (...) @Problem7()
br label %8
23: ; preds = %3
%24 = call i32 (...) @Problem8()
br label %8
25: ; preds = %3
%26 = call i32 (...) @Problem9()
br label %8
27: ; preds = %3
%28 = call i32 (...) @Problem10()
br label %8
29: ; preds = %3
%30 = call i32 (...) @Problem11()
br label %8
31: ; preds = %3
%32 = call i32 (...) @Problem12()
br label %8
33: ; preds = %3
%34 = call i32 (...) @Problem13()
br label %8
35: ; preds = %3
%36 = call i32 (...) @Problem14()
br label %8
37: ; preds = %3
%38 = call i32 (...) @Problem15()
br label %8
39: ; preds = %3
%40 = call i32 (...) @Problem16()
br label %8
41: ; preds = %3
%42 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %8
43: ; preds = %3
%44 = call i32 (...) @Problem18()
br label %8
45: ; preds = %3
%46 = call i32 (...) @Problem19()
br label %8
47: ; preds = %3
%48 = call i32 (...) @Problem20()
br label %8
}