#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*/ dataAnalyzer();
int /*<<< orphan*/ delay(double);
char getch();
int /*<<< orphan*/ initialize();
scalar_t__ kbhit();
int /*<<< orphan*/ printField();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ userInput();
int main() {
  int t = 0;
  printf("%c This is a demonstration of life being evolving.\n\n", 2);
  initialize();
  userInput();
  while (1) {
    while (1) {
      system("cls");
      printf("Frame: %d", t++);
      printField();
      delay(0.1);
      if (kbhit())
        break;
      dataAnalyzer();
    }
    getch();
    printf("\n# Enter 'e' to exit or else to continue.");
    if (getch() == 'e')
      break;
  }
  printField();
  printf("\n%c It was a simple demonstration of evolution.\nThanks...", 2);
  getch();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xe5b(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1080 <initialize@plt>
mov    $0x0,%al
call   1040 <userInput@plt>
jmp    11cc <main+0x3c>
lea    0xe6a(%rip),%rdi
call   1050 <system@plt>
mov    -0x8(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   10a0 <printField@plt>
movsd  0xe00(%rip),%xmm0
call   1090 <delay@plt>
mov    $0x0,%al
call   1070 <kbhit@plt>
cmp    $0x0,%rax
je     121b <main+0x8b>
jmp    1227 <main+0x97>
mov    $0x0,%al
call   1030 <dataAnalyzer@plt>
jmp    11cc <main+0x3c>
mov    $0x0,%al
call   10b0 <getch@plt>
lea    0xe16(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   10b0 <getch@plt>
movsbl %al,%eax
cmp    $0x65,%eax
jne    1254 <main+0xc4>
jmp    1259 <main+0xc9>
jmp    11c7 <main+0x37>
mov    $0x0,%al
call   10a0 <printField@plt>
lea    0xe0e(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   10b0 <getch@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
lea    0xe68(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   1080 <initialize@plt>
xor    %eax,%eax
call   1040 <userInput@plt>
lea    0xe7c(%rip),%r14
lea    0xe79(%rip),%r12
lea    0xe7c(%rip),%r15
xor    %r13d,%r13d
jmp    1203 <main+0x73>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebx,%r13d
xor    %eax,%eax
call   10b0 <getch@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   10b0 <getch@plt>
cmp    $0x65,%al
je     1287 <main+0xf7>
mov    %r14,%rdi
call   1050 <system@plt>
lea    0x1(%r13),%ebx
mov    %r12,%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   10a0 <printField@plt>
movsd  0xdd5(%rip),%xmm0
call   1090 <delay@plt>
xor    %eax,%eax
call   1070 <kbhit@plt>
test   %rax,%rax
jne    11e0 <main+0x50>
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <dataAnalyzer@plt>
mov    %r14,%rdi
call   1050 <system@plt>
lea    0x1(%rbx),%r13d
mov    %r12,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   10a0 <printField@plt>
movsd  0xd92(%rip),%xmm0
call   1090 <delay@plt>
xor    %eax,%eax
call   1070 <kbhit@plt>
mov    %r13d,%ebx
test   %rax,%rax
je     1240 <main+0xb0>
jmp    11e3 <main+0x53>
xor    %eax,%eax
call   10a0 <printField@plt>
lea    0xde0(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   10b0 <getch@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [53 x i8] c"%c This is a demonstration of life being evolving.\0A\0A\00"
@.str.1 = [4 x i8] c"cls\00"
@.str.2 = [10 x i8] c"Frame: %d\00"
@.str.3 = [42 x i8] c"\0A# Enter 'e' to exit or else to continue.\00"
@.str.4 = [58 x i8] c"\0A%c It was a simple demonstration of evolution.\0AThanks...\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = call i32 (...) @initialize()
%5 = call i32 (...) @userInput()
br label %6
6: ; preds = %0, %26
br label %7
7: ; preds = %6, %17
%8 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%12 = call i32 (...) @printField()
%13 = call i32 @delay(double 1.000000e-01)
%14 = call i64 (...) @kbhit()
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %7
br label %19
17: ; preds = %7
%18 = call i32 (...) @dataAnalyzer()
br label %7
19: ; preds = %16
%20 = call signext i8 (...) @getch()
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
%22 = call signext i8 (...) @getch()
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 101
br i1 %24, label %25, label %26
25: ; preds = %19
br label %27
26: ; preds = %19
br label %6
27: ; preds = %25
%28 = call i32 (...) @printField()
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.4, i64 0, i64 0), i32 2)
%30 = call signext i8 (...) @getch()
ret i32 0
}

LLVM IR (-O2):
@.str = [53 x i8] c"%c This is a demonstration of life being evolving.\0A\0A\00"
@.str.1 = [4 x i8] c"cls\00"
@.str.2 = [10 x i8] c"Frame: %d\00"
@.str.3 = [42 x i8] c"\0A# Enter 'e' to exit or else to continue.\00"
@.str.4 = [58 x i8] c"\0A%c It was a simple demonstration of evolution.\0AThanks...\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 2)
%2 = tail call i32 (...) @initialize()
%3 = tail call i32 (...) @userInput()
br label %4
4: ; preds = %23, %0
%5 = phi i32 [ 0, %0 ], [ %24, %23 ]
%6 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%7 = add nsw i32 %5, 1
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%9 = tail call i32 (...) @printField()
%10 = tail call i32 @delay(double 1.000000e-01)
%11 = tail call i64 (...) @kbhit()
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %23
13: ; preds = %4, %13
%14 = phi i32 [ %17, %13 ], [ %7, %4 ]
%15 = tail call i32 (...) @dataAnalyzer()
%16 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%17 = add nsw i32 %14, 1
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %14)
%19 = tail call i32 (...) @printField()
%20 = tail call i32 @delay(double 1.000000e-01)
%21 = tail call i64 (...) @kbhit()
%22 = icmp eq i64 %21, 0
br i1 %22, label %13, label %23
23: ; preds = %13, %4
%24 = phi i32 [ %7, %4 ], [ %17, %13 ]
%25 = tail call signext i8 (...) @getch()
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
%27 = tail call signext i8 (...) @getch()
%28 = icmp eq i8 %27, 101
br i1 %28, label %29, label %4
29: ; preds = %23
%30 = tail call i32 (...) @printField()
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.4, i64 0, i64 0), i32 2)
%32 = tail call signext i8 (...) @getch()
ret i32 0
}