#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 */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ srand(unsigned int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ test_grid();
int /*<<< orphan*/ test_hashmap();
int /*<<< orphan*/ test_iter();
int /*<<< orphan*/ test_string();
int /*<<< orphan*/ test_vector();
scalar_t__ time(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  freopen("errors.txt", "w+", stderr);
  time_t t;
  srand((unsigned int)time(&t));
  test_iter();
  test_vector();
  test_grid();
  test_hashmap();
  test_string();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e43(%rip),%rax
mov    (%rax),%edx
lea    0xe5a(%rip),%rdi
lea    0xe5e(%rip),%rsi
call   1050 <freopen@plt>
lea    -0x14(%rbp),%rdi
call   1090 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
mov    $0x0,%al
call   1040 <test_iter@plt>
mov    $0x0,%al
call   1030 <test_vector@plt>
mov    $0x0,%al
call   1060 <test_grid@plt>
mov    $0x0,%al
call   10a0 <test_hashmap@plt>
mov    $0x0,%al
call   1080 <test_string@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2e58(%rip),%rax
mov    (%rax),%edx
lea    0xe6f(%rip),%rdi
lea    0xe73(%rip),%rsi
call   1050 <freopen@plt>
lea    0x4(%rsp),%rdi
call   1090 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
xor    %eax,%eax
call   1040 <test_iter@plt>
xor    %eax,%eax
call   1030 <test_vector@plt>
xor    %eax,%eax
call   1060 <test_grid@plt>
xor    %eax,%eax
call   10a0 <test_hashmap@plt>
xor    %eax,%eax
call   1080 <test_string@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"errors.txt\00"
@.str.1 = [3 x i8] c"w+\00"
@stderr = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* @stderr
%8 = call i32 @freopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = call i64 @time(i32* %6)
%10 = trunc i64 %9 to i32
%11 = call i32 @srand(i32 %10)
%12 = call i32 (...) @test_iter()
%13 = call i32 (...) @test_vector()
%14 = call i32 (...) @test_grid()
%15 = call i32 (...) @test_hashmap()
%16 = call i32 (...) @test_string()
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"errors.txt\00"
@.str.1 = [3 x i8] c"w+\00"
@stderr = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = load i32, i32* @stderr
%5 = tail call i32 @freopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = bitcast i32* %3 to i8*
%7 = call i64 @time(i32* %3)
%8 = trunc i64 %7 to i32
%9 = call i32 @srand(i32 %8)
%10 = call i32 (...) @test_iter()
%11 = call i32 (...) @test_vector()
%12 = call i32 (...) @test_grid()
%13 = call i32 (...) @test_hashmap()
%14 = call i32 (...) @test_string()
ret i32 0
}