#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ getchar();
scalar_t__ playagain();
int /*<<< orphan*/ playgame();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  puts(
      "Reflex\n------\n\n"
      "How's your reflexes? In this game see how accurately you can tell how\n"
      "much time has elapsed. The computer will give you a number of seconds.\n"
      "When you are ready press ENTER to start the timer, then press ENTER\n"
      "again when you think the given amount of time has elapsed.\n");
  srand(time(NULL));
  do
    playgame();
  while (playagain());
  puts(
      "\n\n\n\n\n\n\n\n\tCymon's Games\n\n\thttp://WWW.CYMONSGAMES.COM\n\n\n"
      "   This game and its code is a 2008 Cymon's Games game.\n"
      "   If you have enjoyed this game or would just like to have a new game\n"
      "   each week please visit:\n"
      "   http://WWW.CYMONSGAMES.COM for C/C++ programming resources and "
      "programs\n"
      "   for everyone, beginners and advanced users alike.\n\n");
  printf("\n\tPress ENTER to continue...\n\n\n\n\n\n");
  getchar();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe6a(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
mov    $0x0,%al
call   1090 <playgame@plt>
mov    $0x0,%al
call   1080 <playagain@plt>
cmp    $0x0,%rax
jne    11ab <main+0x2b>
lea    0xf52(%rip),%rdi
call   1030 <puts@plt>
lea    0x1098(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
xor    %edi,%edi
call   10a0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xe88(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1080 <playgame@plt>
xor    %eax,%eax
call   1070 <playagain@plt>
test   %rax,%rax
jne    1190 <main+0x20>
lea    0xf72(%rip),%rdi
call   1030 <puts@plt>
lea    0x10b8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %edi,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [284 x i8] c"Reflex\0A------\0A\0AHow's your reflexes? In this game see how accurately you can tell how\0Amuch time has elapsed. The computer will give you a number of seconds.\0AWhen you are ready press ENTER to start the timer, then press ENTER\0Aagain when you think the given amount of time has elapsed.\0A\00"
@.str.1 = [338 x i8] c"\0A\0A\0A\0A\0A\0A\0A\0A\09Cymon's Games\0A\0A\09http://WWW.CYMONSGAMES.COM\0A\0A\0A This game and its code is a 2008 Cymon's Games game.\0A If you have enjoyed this game or would just like to have a new game\0A each week please visit:\0A http://WWW.CYMONSGAMES.COM for C/C++ programming resources and programs\0A for everyone, beginners and advanced users alike.\0A\0A\00"
@.str.2 = [35 x i8] c"\0A\09Press ENTER to continue...\0A\0A\0A\0A\0A\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([284 x i8], [284 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
br label %5
5: ; preds = %7, %0
%6 = call i32 (...) @playgame()
br label %7
7: ; preds = %5
%8 = call i64 (...) @playagain()
%9 = icmp ne i64 %8, 0
br i1 %9, label %5, label %10
10: ; preds = %7
%11 = call i32 @puts(i8* getelementptr inbounds ([338 x i8], [338 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 (...) @getchar()
%14 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [284 x i8] c"Reflex\0A------\0A\0AHow's your reflexes? In this game see how accurately you can tell how\0Amuch time has elapsed. The computer will give you a number of seconds.\0AWhen you are ready press ENTER to start the timer, then press ENTER\0Aagain when you think the given amount of time has elapsed.\0A\00"
@.str.1 = [338 x i8] c"\0A\0A\0A\0A\0A\0A\0A\0A\09Cymon's Games\0A\0A\09http://WWW.CYMONSGAMES.COM\0A\0A\0A This game and its code is a 2008 Cymon's Games game.\0A If you have enjoyed this game or would just like to have a new game\0A each week please visit:\0A http://WWW.CYMONSGAMES.COM for C/C++ programming resources and programs\0A for everyone, beginners and advanced users alike.\0A\0A\00"
@str = [34 x i8] c"\0A\09Press ENTER to continue...\0A\0A\0A\0A\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([284 x i8], [284 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @time(i32* null)
%3 = tail call i32 @srand(i32 %2)
br label %4
4: ; preds = %4, %0
%5 = tail call i32 (...) @playgame()
%6 = tail call i64 (...) @playagain()
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %4
8: ; preds = %4
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([338 x i8], [338 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%11 = tail call i32 (...) @getchar()
%12 = tail call i32 @exit(i32 0)
unreachable
}