#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*/ printf(char *, int);
int problem_1();
int problem_2();
int problem_3();
int problem_4();
int problem_5();
int problem_6();
int problem_7();
int problem_9();
int main(void) {
  printf("Problem #1: %i\n", problem_1());
  printf("Problem #2: %i\n", problem_2());
  printf("Problem #3: %i\n", problem_3());
  printf("Problem #4: %i\n", problem_4());
  printf("Problem #5: %i\n", problem_5());
  printf("Problem #6: %i\n", problem_6());
  printf("Problem #7: %i\n", problem_7());
  printf("Problem #9: %i\n", problem_9());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <problem_1@plt>
mov    %eax,%esi
lea    0xe51(%rip),%rdi
call   1080 <printf@plt>
mov    $0x0,%al
call   1090 <problem_2@plt>
mov    %eax,%esi
lea    0xe4c(%rip),%rdi
call   1080 <printf@plt>
mov    $0x0,%al
call   1060 <problem_3@plt>
mov    %eax,%esi
lea    0xe47(%rip),%rdi
call   1080 <printf@plt>
mov    $0x0,%al
call   10b0 <problem_4@plt>
mov    %eax,%esi
lea    0xe42(%rip),%rdi
call   1080 <printf@plt>
mov    $0x0,%al
call   1050 <problem_5@plt>
mov    %eax,%esi
lea    0xe3d(%rip),%rdi
call   1080 <printf@plt>
mov    $0x0,%al
call   10a0 <problem_6@plt>
mov    %eax,%esi
lea    0xe38(%rip),%rdi
call   1080 <printf@plt>
mov    $0x0,%al
call   1030 <problem_7@plt>
mov    %eax,%esi
lea    0xe33(%rip),%rdi
call   1080 <printf@plt>
mov    $0x0,%al
call   1070 <problem_9@plt>
mov    %eax,%esi
lea    0xe2e(%rip),%rdi
call   1080 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <problem_1@plt>
lea    0xe61(%rip),%rdi
mov    %eax,%esi
call   1080 <printf@plt>
xor    %eax,%eax
call   1090 <problem_2@plt>
lea    0xe5c(%rip),%rdi
mov    %eax,%esi
call   1080 <printf@plt>
xor    %eax,%eax
call   1060 <problem_3@plt>
lea    0xe57(%rip),%rdi
mov    %eax,%esi
call   1080 <printf@plt>
xor    %eax,%eax
call   10b0 <problem_4@plt>
lea    0xe52(%rip),%rdi
mov    %eax,%esi
call   1080 <printf@plt>
xor    %eax,%eax
call   1050 <problem_5@plt>
lea    0xe4d(%rip),%rdi
mov    %eax,%esi
call   1080 <printf@plt>
xor    %eax,%eax
call   10a0 <problem_6@plt>
lea    0xe48(%rip),%rdi
mov    %eax,%esi
call   1080 <printf@plt>
xor    %eax,%eax
call   1030 <problem_7@plt>
lea    0xe43(%rip),%rdi
mov    %eax,%esi
call   1080 <printf@plt>
xor    %eax,%eax
call   1070 <problem_9@plt>
lea    0xe3e(%rip),%rdi
mov    %eax,%esi
call   1080 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Problem: %i\0A\00"
@.str.1 = [16 x i8] c"Problem: %i\0A\00"
@.str.2 = [16 x i8] c"Problem: %i\0A\00"
@.str.3 = [16 x i8] c"Problem: %i\0A\00"
@.str.4 = [16 x i8] c"Problem: %i\0A\00"
@.str.5 = [16 x i8] c"Problem: %i\0A\00"
@.str.6 = [16 x i8] c"Problem: %i\0A\00"
@.str.7 = [16 x i8] c"Problem: %i\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @problem_1()
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 (...) @problem_2()
%5 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = call i32 (...) @problem_3()
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = call i32 (...) @problem_4()
%9 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %8)
%10 = call i32 (...) @problem_5()
%11 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %10)
%12 = call i32 (...) @problem_6()
%13 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 %12)
%14 = call i32 (...) @problem_7()
%15 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 %14)
%16 = call i32 (...) @problem_9()
%17 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Problem: %i\0A\00"
@.str.1 = [16 x i8] c"Problem: %i\0A\00"
@.str.2 = [16 x i8] c"Problem: %i\0A\00"
@.str.3 = [16 x i8] c"Problem: %i\0A\00"
@.str.4 = [16 x i8] c"Problem: %i\0A\00"
@.str.5 = [16 x i8] c"Problem: %i\0A\00"
@.str.6 = [16 x i8] c"Problem: %i\0A\00"
@.str.7 = [16 x i8] c"Problem: %i\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @problem_1()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @problem_2()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 (...) @problem_3()
%6 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = tail call i32 (...) @problem_4()
%8 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = tail call i32 (...) @problem_5()
%10 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = tail call i32 (...) @problem_6()
%12 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = tail call i32 (...) @problem_7()
%14 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = tail call i32 (...) @problem_9()
%16 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i32 %15)
ret i32 0
}