#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*/ atoi(char const *);
long long bench_random(int /*<<< orphan*/);
long long bench_urandom(int /*<<< orphan*/);
long long bench_urandom2(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, long long, long long, long long);
int main(int argc, char const *argv[]) {
  long long times1 = bench_urandom(atoi(argv[1]));
  long long times2 = bench_urandom2(atoi(argv[1]));
  long long times3 = bench_random(atoi(argv[1]));
  printf("%lld vs %lld vs %lld\n", times1, times2, times3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,%edi
call   1030 <bench_urandom@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,%edi
call   1050 <bench_urandom2@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,%edi
call   1040 <bench_random@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
lea    0xe3f(%rip),%rdi
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1070 <atoi@plt>
mov    %eax,%edi
call   1030 <bench_urandom@plt>
mov    %rax,%r14
mov    0x8(%rbx),%rdi
call   1070 <atoi@plt>
mov    %eax,%edi
call   1050 <bench_urandom2@plt>
mov    %rax,%r15
mov    0x8(%rbx),%rdi
call   1070 <atoi@plt>
mov    %eax,%edi
call   1040 <bench_random@plt>
lea    0xe6b(%rip),%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    %rax,%rcx
call   1060 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [22 x i8] c"%lld vs %lld vs %lld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @atoi(i8* %11)
%13 = call i64 @bench_urandom(i32 %12)
store i64 %13, i64* %6
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @atoi(i8* %16)
%18 = call i64 @bench_urandom2(i32 %17)
store i64 %18, i64* %7
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = call i32 @atoi(i8* %21)
%23 = call i64 @bench_random(i32 %22)
store i64 %23, i64* %8
%24 = load i64, i64* %6
%25 = load i64, i64* %7
%26 = load i64, i64* %8
%27 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 %24, i64 %25, i64 %26)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"%lld vs %lld vs %lld\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = tail call i64 @bench_urandom(i32 %5)
%7 = load i8*, i8** %3
%8 = tail call i32 @atoi(i8* %7)
%9 = tail call i64 @bench_urandom2(i32 %8)
%10 = load i8*, i8** %3
%11 = tail call i32 @atoi(i8* %10)
%12 = tail call i64 @bench_random(i32 %11)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 %6, i64 %9, i64 %12)
ret i32 0
}