#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 problem1();
int problem10();
int problem11();
int problem12();
int problem13();
int problem14();
int problem2();
int problem3();
int problem4();
int problem5();
int problem6();
int problem7();
int problem8();
int problem9();
int do_problem(int num) {
  switch (num) {
  case 1:
    return problem1();
  case 2:
    return problem2();
  case 3:
    return problem3();
  case 4:
    return problem4();
  case 5:
    return problem5();
  case 6:
    return problem6();
  case 7:
    return problem7();
  case 8:
    return problem8();
  case 9:
    return problem9();
  case 10:
    return problem10();
  case 11:
    return problem11();
  case 12:
    return problem12();
  case 13:
    return problem13();
  case 14:
    return problem14();
  }
  return -1;
}


x86 assembly (clang, -O0):
<do_problem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0xd,%eax
ja     12e6 <do_problem+0x106>
mov    -0x10(%rbp),%rax
lea    0xdf5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   10e0 <problem1@plt>
mov    %eax,-0x4(%rbp)
jmp    12ed <do_problem+0x10d>
mov    $0x0,%al
call   1080 <problem2@plt>
mov    %eax,-0x4(%rbp)
jmp    12ed <do_problem+0x10d>
mov    $0x0,%al
call   10f0 <problem3@plt>
mov    %eax,-0x4(%rbp)
jmp    12ed <do_problem+0x10d>
mov    $0x0,%al
call   1090 <problem4@plt>
mov    %eax,-0x4(%rbp)
jmp    12ed <do_problem+0x10d>
mov    $0x0,%al
call   1100 <problem5@plt>
mov    %eax,-0x4(%rbp)
jmp    12ed <do_problem+0x10d>
mov    $0x0,%al
call   1060 <problem6@plt>
mov    %eax,-0x4(%rbp)
jmp    12ed <do_problem+0x10d>
mov    $0x0,%al
call   10c0 <problem7@plt>
mov    %eax,-0x4(%rbp)
jmp    12ed <do_problem+0x10d>
mov    $0x0,%al
call   1070 <problem8@plt>
mov    %eax,-0x4(%rbp)
jmp    12ed <do_problem+0x10d>
mov    $0x0,%al
call   10d0 <problem9@plt>
mov    %eax,-0x4(%rbp)
jmp    12ed <do_problem+0x10d>
mov    $0x0,%al
call   1030 <problem10@plt>
mov    %eax,-0x4(%rbp)
jmp    12ed <do_problem+0x10d>
mov    $0x0,%al
call   10a0 <problem11@plt>
mov    %eax,-0x4(%rbp)
jmp    12ed <do_problem+0x10d>
mov    $0x0,%al
call   1050 <problem12@plt>
mov    %eax,-0x4(%rbp)
jmp    12ed <do_problem+0x10d>
mov    $0x0,%al
call   10b0 <problem13@plt>
mov    %eax,-0x4(%rbp)
jmp    12ed <do_problem+0x10d>
mov    $0x0,%al
call   1040 <problem14@plt>
mov    %eax,-0x4(%rbp)
jmp    12ed <do_problem+0x10d>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_problem>:
add    $0xffffffff,%edi
cmp    $0xd,%edi
ja     11ff <do_problem+0x1f>
lea    0xe11(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
xor    %eax,%eax
jmp    10e0 <problem1@plt>
mov    $0xffffffff,%eax
ret
xor    %eax,%eax
jmp    1080 <problem2@plt>
xor    %eax,%eax
jmp    10f0 <problem3@plt>
xor    %eax,%eax
jmp    1090 <problem4@plt>
xor    %eax,%eax
jmp    1100 <problem5@plt>
xor    %eax,%eax
jmp    1060 <problem6@plt>
xor    %eax,%eax
jmp    10c0 <problem7@plt>
xor    %eax,%eax
jmp    1070 <problem8@plt>
xor    %eax,%eax
jmp    10d0 <problem9@plt>
xor    %eax,%eax
jmp    1030 <problem10@plt>
xor    %eax,%eax
jmp    10a0 <problem11@plt>
xor    %eax,%eax
jmp    1050 <problem12@plt>
xor    %eax,%eax
jmp    10b0 <problem13@plt>
xor    %eax,%eax
jmp    1040 <problem14@plt>

LLVM IR (-O0):
define i32 @do_problem(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %33 [
i32 1, label %5
i32 2, label %7
i32 3, label %9
i32 4, label %11
i32 5, label %13
i32 6, label %15
i32 7, label %17
i32 8, label %19
i32 9, label %21
i32 10, label %23
i32 11, label %25
i32 12, label %27
i32 13, label %29
i32 14, label %31
]
5: ; preds = %1
%6 = call i32 (...) @problem1()
store i32 %6, i32* %2
br label %34
7: ; preds = %1
%8 = call i32 (...) @problem2()
store i32 %8, i32* %2
br label %34
9: ; preds = %1
%10 = call i32 (...) @problem3()
store i32 %10, i32* %2
br label %34
11: ; preds = %1
%12 = call i32 (...) @problem4()
store i32 %12, i32* %2
br label %34
13: ; preds = %1
%14 = call i32 (...) @problem5()
store i32 %14, i32* %2
br label %34
15: ; preds = %1
%16 = call i32 (...) @problem6()
store i32 %16, i32* %2
br label %34
17: ; preds = %1
%18 = call i32 (...) @problem7()
store i32 %18, i32* %2
br label %34
19: ; preds = %1
%20 = call i32 (...) @problem8()
store i32 %20, i32* %2
br label %34
21: ; preds = %1
%22 = call i32 (...) @problem9()
store i32 %22, i32* %2
br label %34
23: ; preds = %1
%24 = call i32 (...) @problem10()
store i32 %24, i32* %2
br label %34
25: ; preds = %1
%26 = call i32 (...) @problem11()
store i32 %26, i32* %2
br label %34
27: ; preds = %1
%28 = call i32 (...) @problem12()
store i32 %28, i32* %2
br label %34
29: ; preds = %1
%30 = call i32 (...) @problem13()
store i32 %30, i32* %2
br label %34
31: ; preds = %1
%32 = call i32 (...) @problem14()
store i32 %32, i32* %2
br label %34
33: ; preds = %1
store i32 -1, i32* %2
br label %34
34: ; preds = %33, %31, %29, %27, %25, %23, %21, %19, %17, %15, %13, %11, %9, %7, %5
%35 = load i32, i32* %2
ret i32 %35
}

LLVM IR (-O2):
define i32 @do_problem(i32 %0) {
switch i32 %0, label %30 [
i32 1, label %2
i32 2, label %4
i32 3, label %6
i32 4, label %8
i32 5, label %10
i32 6, label %12
i32 7, label %14
i32 8, label %16
i32 9, label %18
i32 10, label %20
i32 11, label %22
i32 12, label %24
i32 13, label %26
i32 14, label %28
]
2: ; preds = %1
%3 = tail call i32 (...) @problem1()
br label %30
4: ; preds = %1
%5 = tail call i32 (...) @problem2()
br label %30
6: ; preds = %1
%7 = tail call i32 (...) @problem3()
br label %30
8: ; preds = %1
%9 = tail call i32 (...) @problem4()
br label %30
10: ; preds = %1
%11 = tail call i32 (...) @problem5()
br label %30
12: ; preds = %1
%13 = tail call i32 (...) @problem6()
br label %30
14: ; preds = %1
%15 = tail call i32 (...) @problem7()
br label %30
16: ; preds = %1
%17 = tail call i32 (...) @problem8()
br label %30
18: ; preds = %1
%19 = tail call i32 (...) @problem9()
br label %30
20: ; preds = %1
%21 = tail call i32 (...) @problem10()
br label %30
22: ; preds = %1
%23 = tail call i32 (...) @problem11()
br label %30
24: ; preds = %1
%25 = tail call i32 (...) @problem12()
br label %30
26: ; preds = %1
%27 = tail call i32 (...) @problem13()
br label %30
28: ; preds = %1
%29 = tail call i32 (...) @problem14()
br label %30
30: ; preds = %1, %28, %26, %24, %22, %20, %18, %16, %14, %12, %10, %8, %6, %4, %2
%31 = phi i32 [ %29, %28 ], [ %27, %26 ], [ %25, %24 ], [ %23, %22 ], [ %21, %20 ], [ %19, %18 ], [ %17, %16 ], [ %15, %14 ], [ %13, %12 ], [ %11, %10 ], [ %9, %8 ], [ %7, %6 ], [ %5, %4 ], [ %3, %2 ], [ -1, %1 ]
ret i32 %31
}