#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);
int /*<<< orphan*/ printf(char *, int);
int runSeveralRounds(int);
int main() {
  int WINNER = 0;
  generate2DimensionalArray();
  printField(0);
  printDirections();
  WINNER = runSeveralRounds(100);
  if (WINNER == 0) {
    printField(100);
    printDirections();
    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)
mov    $0x0,%al
call   1060 <generate2DimensionalArray@plt>
xor    %edi,%edi
call   1050 <printField@plt>
mov    $0x0,%al
call   1070 <printDirections@plt>
mov    $0x64,%edi
call   1030 <runSeveralRounds@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    11b4 <main+0x64>
mov    $0x64,%edi
call   1050 <printField@plt>
mov    $0x0,%al
call   1070 <printDirections@plt>
lea    0xe56(%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    %eax,%eax
call   1060 <generate2DimensionalArray@plt>
xor    %edi,%edi
call   1050 <printField@plt>
xor    %eax,%eax
call   1070 <printDirections@plt>
mov    $0x64,%edi
call   1030 <runSeveralRounds@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    1198 <main+0x48>
mov    $0x64,%edi
call   1050 <printField@plt>
xor    %eax,%eax
call   1070 <printDirections@plt>
lea    0xe72(%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 (...) @generate2DimensionalArray()
%4 = call i32 @printField(i32 0)
%5 = call i32 (...) @printDirections()
%6 = call i32 @runSeveralRounds(i32 100)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %0
%10 = call i32 @printField(i32 100)
%11 = call i32 (...) @printDirections()
%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 = %9, %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 (...) @generate2DimensionalArray()
%2 = tail call i32 @printField(i32 0)
%3 = tail call i32 (...) @printDirections()
%4 = tail call i32 @runSeveralRounds(i32 100)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = tail call i32 @printField(i32 100)
%8 = tail call i32 (...) @printDirections()
%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 = %6, %0
ret i32 %4
}