#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*/ initialize_bomb();
int /*<<< orphan*/ phase_1();
int /*<<< orphan*/ phase_2();
int /*<<< orphan*/ phase_3();
int /*<<< orphan*/ phase_4();
int /*<<< orphan*/ phase_5();
int /*<<< orphan*/ phase_6();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Welcome to my fiendish little bomb.\n");
  initialize_bomb();
  printf("There are 6 phases with which to blow yourself up.\n");
  printf("You have 300 seconds to complete them. Have a nice day!\n");
  phase_1();
  printf("Phase 1 defused. How about the next one?\n");
  phase_2();
  printf("That's number 2. Keep going!\n");
  phase_3();
  printf("Halfway there!\n");
  phase_4();
  printf("So you got that one. Try this one.\n");
  phase_5();
  printf("Good work! On to the next...\n");
  phase_6();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe6a(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   10a0 <initialize_bomb@plt>
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <phase_1@plt>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1090 <phase_2@plt>
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <phase_3@plt>
lea    0xeec(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1070 <phase_4@plt>
lea    0xee9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <phase_5@plt>
lea    0xefa(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1080 <phase_6@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xe78(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   10a0 <initialize_bomb@plt>
lea    0xe89(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <phase_1@plt>
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1090 <phase_2@plt>
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <phase_3@plt>
lea    0xef5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1070 <phase_4@plt>
lea    0xef1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <phase_5@plt>
lea    0xf01(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1080 <phase_6@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Welcome to my fiendish little bomb.\0A\00"
@.str.1 = [52 x i8] c"There are 6 phases with which to blow yourself up.\0A\00"
@.str.2 = [57 x i8] c"You have 300 seconds to complete them. Have a nice day!\0A\00"
@.str.3 = [42 x i8] c"Phase 1 defused. How about the next one?\0A\00"
@.str.4 = [30 x i8] c"That's number 2. Keep going!\0A\00"
@.str.5 = [16 x i8] c"Halfway there!\0A\00"
@.str.6 = [36 x i8] c"So you got that one. Try this one.\0A\00"
@.str.7 = [30 x i8] c"Good work! On to the next...\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @initialize_bomb()
%4 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 (...) @phase_1()
%7 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (...) @phase_2()
%9 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 (...) @phase_3()
%11 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
%12 = call i32 (...) @phase_4()
%13 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 (...) @phase_5()
%15 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
%16 = call i32 (...) @phase_6()
ret i32 0
}

LLVM IR (-O2):
@str = [36 x i8] c"Welcome to my fiendish little bomb.\00"
@str.8 = [51 x i8] c"There are 6 phases with which to blow yourself up.\00"
@str.9 = [56 x i8] c"You have 300 seconds to complete them. Have a nice day!\00"
@str.10 = [41 x i8] c"Phase 1 defused. How about the next one?\00"
@str.11 = [29 x i8] c"That's number 2. Keep going!\00"
@str.12 = [15 x i8] c"Halfway there!\00"
@str.13 = [35 x i8] c"So you got that one. Try this one.\00"
@str.14 = [29 x i8] c"Good work! On to the next...\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @initialize_bomb()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.8, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.9, i64 0, i64 0))
%5 = tail call i32 (...) @phase_1()
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.10, i64 0, i64 0))
%7 = tail call i32 (...) @phase_2()
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.11, i64 0, i64 0))
%9 = tail call i32 (...) @phase_3()
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.12, i64 0, i64 0))
%11 = tail call i32 (...) @phase_4()
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.13, i64 0, i64 0))
%13 = tail call i32 (...) @phase_5()
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.14, i64 0, i64 0))
%15 = tail call i32 (...) @phase_6()
ret i32 0
}