#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*/ bench(int, int);
int /*<<< orphan*/ random_bench(int, int);
int main(void) {
  bench(32, 0x1000000);
  bench(64, 0x1000000);
  bench(512, 0x800000);
  bench(1024, 0x400000);
  bench(4096, 0x80000);
  bench(8192, 0x40000);
  bench(1024 * 1024 * 1, 0x800);
  bench(1024 * 1024 * 4, 0x200);
  bench(1024 * 1024 * 8, 0x100);
  random_bench(2048, 8000000);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x20,%edi
mov    $0x1000000,%esi
call   1030 <bench@plt>
mov    $0x40,%edi
mov    $0x1000000,%esi
call   1030 <bench@plt>
mov    $0x200,%edi
mov    $0x800000,%esi
call   1030 <bench@plt>
mov    $0x400,%edi
mov    $0x400000,%esi
call   1030 <bench@plt>
mov    $0x1000,%edi
mov    $0x80000,%esi
call   1030 <bench@plt>
mov    $0x2000,%edi
mov    $0x40000,%esi
call   1030 <bench@plt>
mov    $0x100000,%edi
mov    $0x800,%esi
call   1030 <bench@plt>
mov    $0x400000,%edi
mov    $0x200,%esi
call   1030 <bench@plt>
mov    $0x800000,%edi
mov    $0x100,%esi
call   1030 <bench@plt>
mov    $0x800,%edi
mov    $0x7a1200,%esi
call   1040 <random_bench@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x20,%edi
mov    $0x1000000,%esi
call   1030 <bench@plt>
mov    $0x40,%edi
mov    $0x1000000,%esi
call   1030 <bench@plt>
mov    $0x200,%edi
mov    $0x800000,%esi
call   1030 <bench@plt>
mov    $0x400,%edi
mov    $0x400000,%esi
call   1030 <bench@plt>
mov    $0x1000,%edi
mov    $0x80000,%esi
call   1030 <bench@plt>
mov    $0x2000,%edi
mov    $0x40000,%esi
call   1030 <bench@plt>
mov    $0x100000,%edi
mov    $0x800,%esi
call   1030 <bench@plt>
mov    $0x400000,%edi
mov    $0x200,%esi
call   1030 <bench@plt>
mov    $0x800000,%edi
mov    $0x100,%esi
call   1030 <bench@plt>
mov    $0x800,%edi
mov    $0x7a1200,%esi
call   1040 <random_bench@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @bench(i32 32, i32 16777216)
%3 = call i32 @bench(i32 64, i32 16777216)
%4 = call i32 @bench(i32 512, i32 8388608)
%5 = call i32 @bench(i32 1024, i32 4194304)
%6 = call i32 @bench(i32 4096, i32 524288)
%7 = call i32 @bench(i32 8192, i32 262144)
%8 = call i32 @bench(i32 1048576, i32 2048)
%9 = call i32 @bench(i32 4194304, i32 512)
%10 = call i32 @bench(i32 8388608, i32 256)
%11 = call i32 @random_bench(i32 2048, i32 8000000)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @bench(i32 32, i32 16777216)
%2 = tail call i32 @bench(i32 64, i32 16777216)
%3 = tail call i32 @bench(i32 512, i32 8388608)
%4 = tail call i32 @bench(i32 1024, i32 4194304)
%5 = tail call i32 @bench(i32 4096, i32 524288)
%6 = tail call i32 @bench(i32 8192, i32 262144)
%7 = tail call i32 @bench(i32 1048576, i32 2048)
%8 = tail call i32 @bench(i32 4194304, i32 512)
%9 = tail call i32 @bench(i32 8388608, i32 256)
%10 = tail call i32 @random_bench(i32 2048, i32 8000000)
ret i32 0
}