#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 */
scalar_t__ getpid();
int /*<<< orphan*/ measure(int, int);
int rand64();
int rand8();
int /*<<< orphan*/ srand(scalar_t__);
scalar_t__ time(int /*<<< orphan*/);
int main(void) {
  srand(getpid() + time(0));
  int i;
  for (i = 0; i < 5; i++)
    measure(rand8(), 1 + rand8());
  for (i = 0; i < 5; i++)
    measure(rand64(), rand64());
  for (i = 0; i < 5; i++)
    measure(rand64(), 1 + rand8());
  for (i = 0; i < 5; i++)
    measure(rand8(), rand64());
  for (i = 0; i < 5; i++)
    measure(rand8() << 48, (rand8() + 1) << 48);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %rax,-0x10(%rbp)
xor    %edi,%edi
call   1060 <time@plt>
mov    -0x10(%rbp),%rdi
add    %rax,%rdi
call   1040 <srand@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    11ca <main+0x6a>
mov    $0x0,%al
call   1070 <rand8@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1070 <rand8@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
add    $0x1,%esi
call   1050 <measure@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1194 <main+0x34>
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1204 <main+0xa4>
mov    $0x0,%al
call   1080 <rand64@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1080 <rand64@plt>
mov    -0x18(%rbp),%edi
mov    %eax,%esi
call   1050 <measure@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11d1 <main+0x71>
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1241 <main+0xe1>
mov    $0x0,%al
call   1080 <rand64@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1070 <rand8@plt>
mov    -0x1c(%rbp),%edi
mov    %eax,%esi
add    $0x1,%esi
call   1050 <measure@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    120b <main+0xab>
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    127b <main+0x11b>
mov    $0x0,%al
call   1070 <rand8@plt>
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1080 <rand64@plt>
mov    -0x20(%rbp),%edi
mov    %eax,%esi
call   1050 <measure@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1248 <main+0xe8>
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    12c6 <main+0x166>
mov    $0x0,%al
call   1070 <rand8@plt>
mov    $0x30,%ecx
shl    %cl,%eax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1070 <rand8@plt>
mov    -0x24(%rbp),%edi
mov    %eax,%esi
add    $0x1,%esi
mov    $0x30,%ecx
shl    %cl,%esi
call   1050 <measure@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1282 <main+0x122>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %rax,%rbx
xor    %edi,%edi
call   1060 <time@plt>
add    %rax,%rbx
mov    %rbx,%rdi
call   1040 <srand@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <rand8@plt>
lea    0x1(%rax),%esi
mov    %ebx,%edi
call   1050 <measure@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <rand8@plt>
lea    0x1(%rax),%esi
mov    %ebx,%edi
call   1050 <measure@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <rand8@plt>
lea    0x1(%rax),%esi
mov    %ebx,%edi
call   1050 <measure@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <rand8@plt>
lea    0x1(%rax),%esi
mov    %ebx,%edi
call   1050 <measure@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <rand8@plt>
lea    0x1(%rax),%esi
mov    %ebx,%edi
call   1050 <measure@plt>
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1050 <measure@plt>
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1050 <measure@plt>
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1050 <measure@plt>
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1050 <measure@plt>
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1050 <measure@plt>
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <rand8@plt>
lea    0x1(%rax),%esi
mov    %ebx,%edi
call   1050 <measure@plt>
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <rand8@plt>
lea    0x1(%rax),%esi
mov    %ebx,%edi
call   1050 <measure@plt>
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <rand8@plt>
lea    0x1(%rax),%esi
mov    %ebx,%edi
call   1050 <measure@plt>
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <rand8@plt>
lea    0x1(%rax),%esi
mov    %ebx,%edi
call   1050 <measure@plt>
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <rand8@plt>
lea    0x1(%rax),%esi
mov    %ebx,%edi
call   1050 <measure@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1050 <measure@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1050 <measure@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1050 <measure@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1050 <measure@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1080 <rand64@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1050 <measure@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
call   1050 <measure@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
call   1050 <measure@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
call   1050 <measure@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
call   1050 <measure@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
xor    %eax,%eax
call   1070 <rand8@plt>
call   1050 <measure@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i64 (...) @getpid()
%4 = call i64 @time(i32 0)
%5 = add nsw i64 %3, %4
%6 = call i32 @srand(i64 %5)
store i32 0, i32* %2
br label %7
7: ; preds = %15, %0
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 5
br i1 %9, label %10, label %18
10: ; preds = %7
%11 = call i32 (...) @rand8()
%12 = call i32 (...) @rand8()
%13 = add nsw i32 1, %12
%14 = call i32 @measure(i32 %11, i32 %13)
br label %15
15: ; preds = %10
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %7
18: ; preds = %7
store i32 0, i32* %2
br label %19
19: ; preds = %26, %18
%20 = load i32, i32* %2
%21 = icmp slt i32 %20, 5
br i1 %21, label %22, label %29
22: ; preds = %19
%23 = call i32 (...) @rand64()
%24 = call i32 (...) @rand64()
%25 = call i32 @measure(i32 %23, i32 %24)
br label %26
26: ; preds = %22
%27 = load i32, i32* %2
%28 = add nsw i32 %27, 1
store i32 %28, i32* %2
br label %19
29: ; preds = %19
store i32 0, i32* %2
br label %30
30: ; preds = %38, %29
%31 = load i32, i32* %2
%32 = icmp slt i32 %31, 5
br i1 %32, label %33, label %41
33: ; preds = %30
%34 = call i32 (...) @rand64()
%35 = call i32 (...) @rand8()
%36 = add nsw i32 1, %35
%37 = call i32 @measure(i32 %34, i32 %36)
br label %38
38: ; preds = %33
%39 = load i32, i32* %2
%40 = add nsw i32 %39, 1
store i32 %40, i32* %2
br label %30
41: ; preds = %30
store i32 0, i32* %2
br label %42
42: ; preds = %49, %41
%43 = load i32, i32* %2
%44 = icmp slt i32 %43, 5
br i1 %44, label %45, label %52
45: ; preds = %42
%46 = call i32 (...) @rand8()
%47 = call i32 (...) @rand64()
%48 = call i32 @measure(i32 %46, i32 %47)
br label %49
49: ; preds = %45
%50 = load i32, i32* %2
%51 = add nsw i32 %50, 1
store i32 %51, i32* %2
br label %42
52: ; preds = %42
store i32 0, i32* %2
br label %53
53: ; preds = %63, %52
%54 = load i32, i32* %2
%55 = icmp slt i32 %54, 5
br i1 %55, label %56, label %66
56: ; preds = %53
%57 = call i32 (...) @rand8()
%58 = shl i32 %57, 48
%59 = call i32 (...) @rand8()
%60 = add nsw i32 %59, 1
%61 = shl i32 %60, 48
%62 = call i32 @measure(i32 %58, i32 %61)
br label %63
63: ; preds = %56
%64 = load i32, i32* %2
%65 = add nsw i32 %64, 1
store i32 %65, i32* %2
br label %53
66: ; preds = %53
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @getpid()
%2 = tail call i64 @time(i32 0)
%3 = add nsw i64 %2, %1
%4 = tail call i32 @srand(i64 %3)
%5 = tail call i32 (...) @rand8()
%6 = tail call i32 (...) @rand8()
%7 = add nsw i32 %6, 1
%8 = tail call i32 @measure(i32 %5, i32 %7)
%9 = tail call i32 (...) @rand8()
%10 = tail call i32 (...) @rand8()
%11 = add nsw i32 %10, 1
%12 = tail call i32 @measure(i32 %9, i32 %11)
%13 = tail call i32 (...) @rand8()
%14 = tail call i32 (...) @rand8()
%15 = add nsw i32 %14, 1
%16 = tail call i32 @measure(i32 %13, i32 %15)
%17 = tail call i32 (...) @rand8()
%18 = tail call i32 (...) @rand8()
%19 = add nsw i32 %18, 1
%20 = tail call i32 @measure(i32 %17, i32 %19)
%21 = tail call i32 (...) @rand8()
%22 = tail call i32 (...) @rand8()
%23 = add nsw i32 %22, 1
%24 = tail call i32 @measure(i32 %21, i32 %23)
%25 = tail call i32 (...) @rand64()
%26 = tail call i32 (...) @rand64()
%27 = tail call i32 @measure(i32 %25, i32 %26)
%28 = tail call i32 (...) @rand64()
%29 = tail call i32 (...) @rand64()
%30 = tail call i32 @measure(i32 %28, i32 %29)
%31 = tail call i32 (...) @rand64()
%32 = tail call i32 (...) @rand64()
%33 = tail call i32 @measure(i32 %31, i32 %32)
%34 = tail call i32 (...) @rand64()
%35 = tail call i32 (...) @rand64()
%36 = tail call i32 @measure(i32 %34, i32 %35)
%37 = tail call i32 (...) @rand64()
%38 = tail call i32 (...) @rand64()
%39 = tail call i32 @measure(i32 %37, i32 %38)
%40 = tail call i32 (...) @rand64()
%41 = tail call i32 (...) @rand8()
%42 = add nsw i32 %41, 1
%43 = tail call i32 @measure(i32 %40, i32 %42)
%44 = tail call i32 (...) @rand64()
%45 = tail call i32 (...) @rand8()
%46 = add nsw i32 %45, 1
%47 = tail call i32 @measure(i32 %44, i32 %46)
%48 = tail call i32 (...) @rand64()
%49 = tail call i32 (...) @rand8()
%50 = add nsw i32 %49, 1
%51 = tail call i32 @measure(i32 %48, i32 %50)
%52 = tail call i32 (...) @rand64()
%53 = tail call i32 (...) @rand8()
%54 = add nsw i32 %53, 1
%55 = tail call i32 @measure(i32 %52, i32 %54)
%56 = tail call i32 (...) @rand64()
%57 = tail call i32 (...) @rand8()
%58 = add nsw i32 %57, 1
%59 = tail call i32 @measure(i32 %56, i32 %58)
%60 = tail call i32 (...) @rand8()
%61 = tail call i32 (...) @rand64()
%62 = tail call i32 @measure(i32 %60, i32 %61)
%63 = tail call i32 (...) @rand8()
%64 = tail call i32 (...) @rand64()
%65 = tail call i32 @measure(i32 %63, i32 %64)
%66 = tail call i32 (...) @rand8()
%67 = tail call i32 (...) @rand64()
%68 = tail call i32 @measure(i32 %66, i32 %67)
%69 = tail call i32 (...) @rand8()
%70 = tail call i32 (...) @rand64()
%71 = tail call i32 @measure(i32 %69, i32 %70)
%72 = tail call i32 (...) @rand8()
%73 = tail call i32 (...) @rand64()
%74 = tail call i32 @measure(i32 %72, i32 %73)
%75 = tail call i32 (...) @rand8()
%76 = tail call i32 (...) @rand8()
%77 = tail call i32 @measure(i32 poison, i32 poison)
%78 = tail call i32 (...) @rand8()
%79 = tail call i32 (...) @rand8()
%80 = tail call i32 @measure(i32 poison, i32 poison)
%81 = tail call i32 (...) @rand8()
%82 = tail call i32 (...) @rand8()
%83 = tail call i32 @measure(i32 poison, i32 poison)
%84 = tail call i32 (...) @rand8()
%85 = tail call i32 (...) @rand8()
%86 = tail call i32 @measure(i32 poison, i32 poison)
%87 = tail call i32 (...) @rand8()
%88 = tail call i32 (...) @rand8()
%89 = tail call i32 @measure(i32 poison, i32 poison)
ret i32 0
}