#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 atoi(char *);
int /*<<< orphan*/ time_map_fetch_empty(int);
int /*<<< orphan*/ time_map_fetch_random(int);
int /*<<< orphan*/ time_map_fetch_sequential(int);
int /*<<< orphan*/ time_map_grow(int);
int /*<<< orphan*/ time_map_grow_predicted(int);
int /*<<< orphan*/ time_map_remove(int);
int /*<<< orphan*/ time_map_replace(int);
int /*<<< orphan*/ time_map_toggle(int);
int main(int argc, char **argv) {
  int iters = 10000000;
  if (argc > 1) {
    iters = atoi(argv[1]);
  }
  time_map_grow(iters);
  time_map_grow_predicted(iters);
  time_map_replace(iters);
  time_map_fetch_random(iters);
  time_map_fetch_sequential(iters);
  time_map_fetch_empty(iters);
  time_map_remove(iters);
  time_map_toggle(iters);
  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)
movl   $0x989680,-0x14(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    11c7 <main+0x37>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1090 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   10b0 <time_map_grow@plt>
mov    -0x14(%rbp),%edi
call   1040 <time_map_grow_predicted@plt>
mov    -0x14(%rbp),%edi
call   1050 <time_map_replace@plt>
mov    -0x14(%rbp),%edi
call   1060 <time_map_fetch_random@plt>
mov    -0x14(%rbp),%edi
call   10a0 <time_map_fetch_sequential@plt>
mov    -0x14(%rbp),%edi
call   1080 <time_map_fetch_empty@plt>
mov    -0x14(%rbp),%edi
call   1030 <time_map_remove@plt>
mov    -0x14(%rbp),%edi
call   1070 <time_map_toggle@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x989680,%ebx
cmp    $0x2,%edi
jl     11a6 <main+0x16>
mov    0x8(%rsi),%rdi
call   1090 <atoi@plt>
mov    %eax,%ebx
mov    %ebx,%edi
call   10b0 <time_map_grow@plt>
mov    %ebx,%edi
call   1040 <time_map_grow_predicted@plt>
mov    %ebx,%edi
call   1050 <time_map_replace@plt>
mov    %ebx,%edi
call   1060 <time_map_fetch_random@plt>
mov    %ebx,%edi
call   10a0 <time_map_fetch_sequential@plt>
mov    %ebx,%edi
call   1080 <time_map_fetch_empty@plt>
mov    %ebx,%edi
call   1030 <time_map_remove@plt>
mov    %ebx,%edi
call   1070 <time_map_toggle@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
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
store i32 10000000, i32* %6
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @atoi(i8* %12)
store i32 %13, i32* %6
br label %14
14: ; preds = %9, %2
%15 = load i32, i32* %6
%16 = call i32 @time_map_grow(i32 %15)
%17 = load i32, i32* %6
%18 = call i32 @time_map_grow_predicted(i32 %17)
%19 = load i32, i32* %6
%20 = call i32 @time_map_replace(i32 %19)
%21 = load i32, i32* %6
%22 = call i32 @time_map_fetch_random(i32 %21)
%23 = load i32, i32* %6
%24 = call i32 @time_map_fetch_sequential(i32 %23)
%25 = load i32, i32* %6
%26 = call i32 @time_map_fetch_empty(i32 %25)
%27 = load i32, i32* %6
%28 = call i32 @time_map_remove(i32 %27)
%29 = load i32, i32* %6
%30 = call i32 @time_map_toggle(i32 %29)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
br label %8
8: ; preds = %4, %2
%9 = phi i32 [ %7, %4 ], [ 10000000, %2 ]
%10 = tail call i32 @time_map_grow(i32 %9)
%11 = tail call i32 @time_map_grow_predicted(i32 %9)
%12 = tail call i32 @time_map_replace(i32 %9)
%13 = tail call i32 @time_map_fetch_random(i32 %9)
%14 = tail call i32 @time_map_fetch_sequential(i32 %9)
%15 = tail call i32 @time_map_fetch_empty(i32 %9)
%16 = tail call i32 @time_map_remove(i32 %9)
%17 = tail call i32 @time_map_toggle(i32 %9)
ret i32 0
}