#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*/ benchmark(int);
int /*<<< orphan*/ initialise_board();
int /*<<< orphan*/ start_trigger();
int /*<<< orphan*/ stop_trigger();
int main() {
  int n;
  initialise_board();
  start_trigger();
  for (n = 0; n < (4096 >> 8); ++n)
    benchmark(100);
  stop_trigger();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <initialise_board@plt>
mov    $0x0,%al
call   1030 <start_trigger@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x10,-0x8(%rbp)
jge    1186 <main+0x46>
mov    $0x64,%edi
call   1050 <benchmark@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1164 <main+0x24>
mov    $0x0,%al
call   1040 <stop_trigger@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <initialise_board@plt>
xor    %eax,%eax
call   1030 <start_trigger@plt>
mov    $0x64,%edi
call   1050 <benchmark@plt>
mov    $0x64,%edi
call   1050 <benchmark@plt>
mov    $0x64,%edi
call   1050 <benchmark@plt>
mov    $0x64,%edi
call   1050 <benchmark@plt>
mov    $0x64,%edi
call   1050 <benchmark@plt>
mov    $0x64,%edi
call   1050 <benchmark@plt>
mov    $0x64,%edi
call   1050 <benchmark@plt>
mov    $0x64,%edi
call   1050 <benchmark@plt>
mov    $0x64,%edi
call   1050 <benchmark@plt>
mov    $0x64,%edi
call   1050 <benchmark@plt>
mov    $0x64,%edi
call   1050 <benchmark@plt>
mov    $0x64,%edi
call   1050 <benchmark@plt>
mov    $0x64,%edi
call   1050 <benchmark@plt>
mov    $0x64,%edi
call   1050 <benchmark@plt>
mov    $0x64,%edi
call   1050 <benchmark@plt>
mov    $0x64,%edi
call   1050 <benchmark@plt>
xor    %eax,%eax
call   1040 <stop_trigger@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @initialise_board()
%4 = call i32 (...) @start_trigger()
store i32 0, i32* %2
br label %5
5: ; preds = %10, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 16
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = call i32 @benchmark(i32 100)
br label %10
10: ; preds = %8
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %5
13: ; preds = %5
%14 = call i32 (...) @stop_trigger()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @initialise_board()
%2 = tail call i32 (...) @start_trigger()
%3 = tail call i32 @benchmark(i32 100)
%4 = tail call i32 @benchmark(i32 100)
%5 = tail call i32 @benchmark(i32 100)
%6 = tail call i32 @benchmark(i32 100)
%7 = tail call i32 @benchmark(i32 100)
%8 = tail call i32 @benchmark(i32 100)
%9 = tail call i32 @benchmark(i32 100)
%10 = tail call i32 @benchmark(i32 100)
%11 = tail call i32 @benchmark(i32 100)
%12 = tail call i32 @benchmark(i32 100)
%13 = tail call i32 @benchmark(i32 100)
%14 = tail call i32 @benchmark(i32 100)
%15 = tail call i32 @benchmark(i32 100)
%16 = tail call i32 @benchmark(i32 100)
%17 = tail call i32 @benchmark(i32 100)
%18 = tail call i32 @benchmark(i32 100)
%19 = tail call i32 (...) @stop_trigger()
ret i32 0
}