#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*/ init(int, char **);
int /*<<< orphan*/ ramdom_read(int);
int /*<<< orphan*/ ramdom_write(int);
int main(int argc, char *argv[]) {
  init(argc, argv);
  ramdom_write(8 << 20);
  ramdom_write(1 << 20);
  ramdom_write(128 << 10);
  ramdom_write(16 << 10);
  ramdom_write(2 << 10);
  ramdom_write(1 << 10);
  ramdom_read(512 << 10);
  ramdom_read(8 << 10);
  ramdom_read(4 << 10);
  ramdom_read(2 << 10);
  ramdom_read(1 << 10);
  ramdom_read(256);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <init@plt>
mov    $0x800000,%edi
call   1040 <ramdom_write@plt>
mov    $0x100000,%edi
call   1040 <ramdom_write@plt>
mov    $0x20000,%edi
call   1040 <ramdom_write@plt>
mov    $0x4000,%edi
call   1040 <ramdom_write@plt>
mov    $0x800,%edi
call   1040 <ramdom_write@plt>
mov    $0x400,%edi
call   1040 <ramdom_write@plt>
mov    $0x80000,%edi
call   1050 <ramdom_read@plt>
mov    $0x2000,%edi
call   1050 <ramdom_read@plt>
mov    $0x1000,%edi
call   1050 <ramdom_read@plt>
mov    $0x800,%edi
call   1050 <ramdom_read@plt>
mov    $0x400,%edi
call   1050 <ramdom_read@plt>
mov    $0x100,%edi
call   1050 <ramdom_read@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <init@plt>
mov    $0x800000,%edi
call   1040 <ramdom_write@plt>
mov    $0x100000,%edi
call   1040 <ramdom_write@plt>
mov    $0x20000,%edi
call   1040 <ramdom_write@plt>
mov    $0x4000,%edi
call   1040 <ramdom_write@plt>
mov    $0x800,%edi
call   1040 <ramdom_write@plt>
mov    $0x400,%edi
call   1040 <ramdom_write@plt>
mov    $0x80000,%edi
call   1050 <ramdom_read@plt>
mov    $0x2000,%edi
call   1050 <ramdom_read@plt>
mov    $0x1000,%edi
call   1050 <ramdom_read@plt>
mov    $0x800,%edi
call   1050 <ramdom_read@plt>
mov    $0x400,%edi
call   1050 <ramdom_read@plt>
mov    $0x100,%edi
call   1050 <ramdom_read@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @init(i32 %6, i8** %7)
%9 = call i32 @ramdom_write(i32 8388608)
%10 = call i32 @ramdom_write(i32 1048576)
%11 = call i32 @ramdom_write(i32 131072)
%12 = call i32 @ramdom_write(i32 16384)
%13 = call i32 @ramdom_write(i32 2048)
%14 = call i32 @ramdom_write(i32 1024)
%15 = call i32 @ramdom_read(i32 524288)
%16 = call i32 @ramdom_read(i32 8192)
%17 = call i32 @ramdom_read(i32 4096)
%18 = call i32 @ramdom_read(i32 2048)
%19 = call i32 @ramdom_read(i32 1024)
%20 = call i32 @ramdom_read(i32 256)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @init(i32 %0, i8** %1)
%4 = tail call i32 @ramdom_write(i32 8388608)
%5 = tail call i32 @ramdom_write(i32 1048576)
%6 = tail call i32 @ramdom_write(i32 131072)
%7 = tail call i32 @ramdom_write(i32 16384)
%8 = tail call i32 @ramdom_write(i32 2048)
%9 = tail call i32 @ramdom_write(i32 1024)
%10 = tail call i32 @ramdom_read(i32 524288)
%11 = tail call i32 @ramdom_read(i32 8192)
%12 = tail call i32 @ramdom_read(i32 4096)
%13 = tail call i32 @ramdom_read(i32 2048)
%14 = tail call i32 @ramdom_read(i32 1024)
%15 = tail call i32 @ramdom_read(i32 256)
ret i32 0
}