#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*/ generate2DimensionalArray();
int /*<<< orphan*/ printDirections();
int /*<<< orphan*/ printField(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int runSeveralRounds(int);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  int WINNER = 0;
  srand(time(NULL));
  generate2DimensionalArray();
  printField(0);
  printDirections();
  WINNER = runSeveralRounds(100);
  if (WINNER == 0) {
    printf("No team won this match in the %d rounds provided.\n", 100);
  }
  return WINNER;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
mov    $0x0,%al
call   1080 <generate2DimensionalArray@plt>
xor    %edi,%edi
call   1060 <printField@plt>
mov    $0x0,%al
call   1090 <printDirections@plt>
mov    $0x64,%edi
call   1030 <runSeveralRounds@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    11d3 <main+0x63>
lea    0xe37(%rip),%rdi
mov    $0x64,%esi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
xor    %eax,%eax
call   1080 <generate2DimensionalArray@plt>
xor    %edi,%edi
call   1060 <printField@plt>
xor    %eax,%eax
call   1090 <printDirections@plt>
mov    $0x64,%edi
call   1030 <runSeveralRounds@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    11b5 <main+0x45>
lea    0xe55(%rip),%rdi
mov    $0x64,%esi
call   1040 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [51 x i8] c"No team won this match in the %d rounds provided.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
%5 = call i32 (...) @generate2DimensionalArray()
%6 = call i32 @printField(i32 0)
%7 = call i32 (...) @printDirections()
%8 = call i32 @runSeveralRounds(i32 100)
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i32 100)
br label %13
13: ; preds = %11, %0
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str = [51 x i8] c"No team won this match in the %d rounds provided.\0A\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @generate2DimensionalArray()
%4 = tail call i32 @printField(i32 0)
%5 = tail call i32 (...) @printDirections()
%6 = tail call i32 @runSeveralRounds(i32 100)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = tail call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i32 100)
br label %10
10: ; preds = %8, %0
ret i32 %6
}