#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 */
float dummy();
float dummy2();
double get_seconds();
float my_random_double();
float my_random_float();
float my_random_float2();
int /*<<< orphan*/ printf(char *, double);
float random_float();
int /*<<< orphan*/ srandom(int);
main(int argc, char *argv[]) {
  int i;
  float f;
  double t0, t1;
  int iters = 1000000000;
  int seed = 17;
  srandom(seed);
  t0 = get_seconds();
  for (i = 0; i < iters; i++) {
    f = dummy();
  }
  t1 = get_seconds();
  printf("dummy \t %f ms\n", t1 - t0);
  srandom(seed);
  t0 = get_seconds();
  for (i = 0; i < iters; i++) {
    f = dummy();
  }
  t1 = get_seconds();
  printf("dummy \t %f ms\n", t1 - t0);
  srandom(seed);
  t0 = get_seconds();
  for (i = 0; i < iters; i++) {
    f = dummy2();
  }
  t1 = get_seconds();
  printf("dummy2 \t %f ms\n", t1 - t0);
  srandom(seed);
  t0 = get_seconds();
  for (i = 0; i < iters; i++) {
    f = dummy2();
  }
  t1 = get_seconds();
  printf("dummy2 \t %f ms\n", t1 - t0);
  srandom(seed);
  t0 = get_seconds();
  for (i = 0; i < iters; i++) {
    f = my_random_float();
  }
  t1 = get_seconds();
  printf("mine \t %f ms\n", t1 - t0);
  srandom(seed);
  t0 = get_seconds();
  for (i = 0; i < iters; i++) {
    f = my_random_float();
  }
  t1 = get_seconds();
  printf("mine \t %f ms\n", t1 - t0);
  srandom(seed);
  t0 = get_seconds();
  for (i = 0; i < iters; i++) {
    f = my_random_float2();
  }
  t1 = get_seconds();
  printf("mine2 \t %f ms\n", t1 - t0);
  srandom(seed);
  t0 = get_seconds();
  for (i = 0; i < iters; i++) {
    f = my_random_float2();
  }
  t1 = get_seconds();
  printf("mine2 \t %f ms\n", t1 - t0);
  srandom(seed);
  t0 = get_seconds();
  for (i = 0; i < iters; i++) {
    f = my_random_double();
  }
  t1 = get_seconds();
  printf("mine2 \t %f ms\n", t1 - t0);
  srandom(seed);
  t0 = get_seconds();
  for (i = 0; i < iters; i++) {
    f = my_random_double();
  }
  t1 = get_seconds();
  printf("mine2 \t %f ms\n", t1 - t0);
  srandom(seed);
  t0 = get_seconds();
  for (i = 0; i < iters; i++) {
    f = random_float();
  }
  t1 = get_seconds();
  printf("theirs \t %f ms\n", t1 - t0);
  srandom(seed);
  t0 = get_seconds();
  for (i = 0; i < iters; i++) {
    f = random_float();
  }
  t1 = get_seconds();
  printf("theirs \t %f ms\n", t1 - t0);
}


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)
movl   $0x3b9aca00,-0x2c(%rbp)
movl   $0x11,-0x30(%rbp)
mov    -0x30(%rbp),%edi
call   1050 <srandom@plt>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    11f5 <main+0x65>
mov    $0x0,%al
call   1040 <dummy@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11cf <main+0x3f>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
lea    0xdee(%rip),%rdi
call   1080 <printf@plt>
mov    -0x30(%rbp),%edi
call   1050 <srandom@plt>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1258 <main+0xc8>
mov    $0x0,%al
call   1040 <dummy@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1232 <main+0xa2>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
lea    0xd8b(%rip),%rdi
call   1080 <printf@plt>
mov    -0x30(%rbp),%edi
call   1050 <srandom@plt>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    12bb <main+0x12b>
mov    $0x0,%al
call   10b0 <dummy2@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1295 <main+0x105>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
lea    0xd37(%rip),%rdi
call   1080 <printf@plt>
mov    -0x30(%rbp),%edi
call   1050 <srandom@plt>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    131e <main+0x18e>
mov    $0x0,%al
call   10b0 <dummy2@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12f8 <main+0x168>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
lea    0xcd4(%rip),%rdi
call   1080 <printf@plt>
mov    -0x30(%rbp),%edi
call   1050 <srandom@plt>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1381 <main+0x1f1>
mov    $0x0,%al
call   10a0 <my_random_float@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    135b <main+0x1cb>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
lea    0xc81(%rip),%rdi
call   1080 <printf@plt>
mov    -0x30(%rbp),%edi
call   1050 <srandom@plt>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    13e4 <main+0x254>
mov    $0x0,%al
call   10a0 <my_random_float@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13be <main+0x22e>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
lea    0xc1e(%rip),%rdi
call   1080 <printf@plt>
mov    -0x30(%rbp),%edi
call   1050 <srandom@plt>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1447 <main+0x2b7>
mov    $0x0,%al
call   1060 <my_random_float2@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1421 <main+0x291>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
lea    0xbc9(%rip),%rdi
call   1080 <printf@plt>
mov    -0x30(%rbp),%edi
call   1050 <srandom@plt>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    14aa <main+0x31a>
mov    $0x0,%al
call   1060 <my_random_float2@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1484 <main+0x2f4>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
lea    0xb66(%rip),%rdi
call   1080 <printf@plt>
mov    -0x30(%rbp),%edi
call   1050 <srandom@plt>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    150d <main+0x37d>
mov    $0x0,%al
call   1090 <my_random_double@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    14e7 <main+0x357>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
lea    0xb03(%rip),%rdi
call   1080 <printf@plt>
mov    -0x30(%rbp),%edi
call   1050 <srandom@plt>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1570 <main+0x3e0>
mov    $0x0,%al
call   1090 <my_random_double@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    154a <main+0x3ba>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
lea    0xaa0(%rip),%rdi
call   1080 <printf@plt>
mov    -0x30(%rbp),%edi
call   1050 <srandom@plt>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    15d3 <main+0x443>
mov    $0x0,%al
call   1070 <random_float@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    15ad <main+0x41d>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
lea    0xa4c(%rip),%rdi
call   1080 <printf@plt>
mov    -0x30(%rbp),%edi
call   1050 <srandom@plt>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1636 <main+0x4a6>
mov    $0x0,%al
call   1070 <random_float@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1610 <main+0x480>
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
lea    0x9e9(%rip),%rdi
call   1080 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    $0x11,%edi
call   1050 <srandom@plt>
xor    %eax,%eax
call   1030 <get_seconds@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x3b9aca00,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <dummy@plt>
add    $0xffffffff,%ebx
jne    11c0 <main+0x30>
xor    %eax,%eax
call   1030 <get_seconds@plt>
subsd  0x8(%rsp),%xmm0
lea    0xe20(%rip),%rdi
call   1080 <printf@plt>
mov    $0x11,%edi
call   1050 <srandom@plt>
xor    %eax,%eax
call   1030 <get_seconds@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x3b9aca00,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <dummy@plt>
add    $0xffffffff,%ebx
jne    1210 <main+0x80>
xor    %eax,%eax
call   1030 <get_seconds@plt>
subsd  0x8(%rsp),%xmm0
lea    0xdd0(%rip),%rdi
call   1080 <printf@plt>
mov    $0x11,%edi
call   1050 <srandom@plt>
xor    %eax,%eax
call   1030 <get_seconds@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x3b9aca00,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10b0 <dummy2@plt>
add    $0xffffffff,%ebx
jne    1260 <main+0xd0>
xor    %eax,%eax
call   1030 <get_seconds@plt>
subsd  0x8(%rsp),%xmm0
lea    0xd8f(%rip),%rdi
call   1080 <printf@plt>
mov    $0x11,%edi
call   1050 <srandom@plt>
xor    %eax,%eax
call   1030 <get_seconds@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x3b9aca00,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10b0 <dummy2@plt>
add    $0xffffffff,%ebx
jne    12b0 <main+0x120>
xor    %eax,%eax
call   1030 <get_seconds@plt>
subsd  0x8(%rsp),%xmm0
lea    0xd3f(%rip),%rdi
call   1080 <printf@plt>
mov    $0x11,%edi
call   1050 <srandom@plt>
xor    %eax,%eax
call   1030 <get_seconds@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x3b9aca00,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10a0 <my_random_float@plt>
add    $0xffffffff,%ebx
jne    1300 <main+0x170>
xor    %eax,%eax
call   1030 <get_seconds@plt>
subsd  0x8(%rsp),%xmm0
lea    0xcff(%rip),%rdi
call   1080 <printf@plt>
mov    $0x11,%edi
call   1050 <srandom@plt>
xor    %eax,%eax
call   1030 <get_seconds@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x3b9aca00,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10a0 <my_random_float@plt>
add    $0xffffffff,%ebx
jne    1350 <main+0x1c0>
xor    %eax,%eax
call   1030 <get_seconds@plt>
subsd  0x8(%rsp),%xmm0
lea    0xcaf(%rip),%rdi
call   1080 <printf@plt>
mov    $0x11,%edi
call   1050 <srandom@plt>
xor    %eax,%eax
call   1030 <get_seconds@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x3b9aca00,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1060 <my_random_float2@plt>
add    $0xffffffff,%ebx
jne    13a0 <main+0x210>
xor    %eax,%eax
call   1030 <get_seconds@plt>
subsd  0x8(%rsp),%xmm0
lea    0xc6d(%rip),%rdi
call   1080 <printf@plt>
mov    $0x11,%edi
call   1050 <srandom@plt>
xor    %eax,%eax
call   1030 <get_seconds@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x3b9aca00,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1060 <my_random_float2@plt>
add    $0xffffffff,%ebx
jne    13f0 <main+0x260>
xor    %eax,%eax
call   1030 <get_seconds@plt>
subsd  0x8(%rsp),%xmm0
lea    0xc1d(%rip),%rdi
call   1080 <printf@plt>
mov    $0x11,%edi
call   1050 <srandom@plt>
xor    %eax,%eax
call   1030 <get_seconds@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x3b9aca00,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1090 <my_random_double@plt>
add    $0xffffffff,%ebx
jne    1440 <main+0x2b0>
xor    %eax,%eax
call   1030 <get_seconds@plt>
subsd  0x8(%rsp),%xmm0
lea    0xbcd(%rip),%rdi
call   1080 <printf@plt>
mov    $0x11,%edi
call   1050 <srandom@plt>
xor    %eax,%eax
call   1030 <get_seconds@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x3b9aca00,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1090 <my_random_double@plt>
add    $0xffffffff,%ebx
jne    1490 <main+0x300>
xor    %eax,%eax
call   1030 <get_seconds@plt>
subsd  0x8(%rsp),%xmm0
lea    0xb7d(%rip),%rdi
call   1080 <printf@plt>
mov    $0x11,%edi
call   1050 <srandom@plt>
xor    %eax,%eax
call   1030 <get_seconds@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x3b9aca00,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1070 <random_float@plt>
add    $0xffffffff,%ebx
jne    14e0 <main+0x350>
xor    %eax,%eax
call   1030 <get_seconds@plt>
subsd  0x8(%rsp),%xmm0
lea    0xb3c(%rip),%rdi
call   1080 <printf@plt>
mov    $0x11,%edi
call   1050 <srandom@plt>
xor    %eax,%eax
call   1030 <get_seconds@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x3b9aca00,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1070 <random_float@plt>
add    $0xffffffff,%ebx
jne    1530 <main+0x3a0>
xor    %eax,%eax
call   1030 <get_seconds@plt>
subsd  0x8(%rsp),%xmm0
lea    0xaec(%rip),%rdi
call   1080 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"dummy \09 %f ms\0A\00"
@.str.1 = [16 x i8] c"dummy2 \09 %f ms\0A\00"
@.str.2 = [14 x i8] c"mine \09 %f ms\0A\00"
@.str.3 = [15 x i8] c"mine2 \09 %f ms\0A\00"
@.str.4 = [16 x i8] c"theirs \09 %f ms\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca float
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1000000000, i32* %10
store i32 17, i32* %11
%12 = load i32, i32* %11
%13 = call i32 @srandom(i32 %12)
%14 = call double (...) @get_seconds()
store double %14, double* %8
store i32 0, i32* %6
br label %15
15: ; preds = %21, %2
%16 = load i32, i32* %6
%17 = load i32, i32* %10
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %24
19: ; preds = %15
%20 = call float (...) @dummy()
store float %20, float* %7
br label %21
21: ; preds = %19
%22 = load i32, i32* %6
%23 = add nsw i32 %22, 1
store i32 %23, i32* %6
br label %15
24: ; preds = %15
%25 = call double (...) @get_seconds()
store double %25, double* %9
%26 = load double, double* %9
%27 = load double, double* %8
%28 = fsub double %26, %27
%29 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), double %28)
%30 = load i32, i32* %11
%31 = call i32 @srandom(i32 %30)
%32 = call double (...) @get_seconds()
store double %32, double* %8
store i32 0, i32* %6
br label %33
33: ; preds = %39, %24
%34 = load i32, i32* %6
%35 = load i32, i32* %10
%36 = icmp slt i32 %34, %35
br i1 %36, label %37, label %42
37: ; preds = %33
%38 = call float (...) @dummy()
store float %38, float* %7
br label %39
39: ; preds = %37
%40 = load i32, i32* %6
%41 = add nsw i32 %40, 1
store i32 %41, i32* %6
br label %33
42: ; preds = %33
%43 = call double (...) @get_seconds()
store double %43, double* %9
%44 = load double, double* %9
%45 = load double, double* %8
%46 = fsub double %44, %45
%47 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), double %46)
%48 = load i32, i32* %11
%49 = call i32 @srandom(i32 %48)
%50 = call double (...) @get_seconds()
store double %50, double* %8
store i32 0, i32* %6
br label %51
51: ; preds = %57, %42
%52 = load i32, i32* %6
%53 = load i32, i32* %10
%54 = icmp slt i32 %52, %53
br i1 %54, label %55, label %60
55: ; preds = %51
%56 = call float (...) @dummy2()
store float %56, float* %7
br label %57
57: ; preds = %55
%58 = load i32, i32* %6
%59 = add nsw i32 %58, 1
store i32 %59, i32* %6
br label %51
60: ; preds = %51
%61 = call double (...) @get_seconds()
store double %61, double* %9
%62 = load double, double* %9
%63 = load double, double* %8
%64 = fsub double %62, %63
%65 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %64)
%66 = load i32, i32* %11
%67 = call i32 @srandom(i32 %66)
%68 = call double (...) @get_seconds()
store double %68, double* %8
store i32 0, i32* %6
br label %69
69: ; preds = %75, %60
%70 = load i32, i32* %6
%71 = load i32, i32* %10
%72 = icmp slt i32 %70, %71
br i1 %72, label %73, label %78
73: ; preds = %69
%74 = call float (...) @dummy2()
store float %74, float* %7
br label %75
75: ; preds = %73
%76 = load i32, i32* %6
%77 = add nsw i32 %76, 1
store i32 %77, i32* %6
br label %69
78: ; preds = %69
%79 = call double (...) @get_seconds()
store double %79, double* %9
%80 = load double, double* %9
%81 = load double, double* %8
%82 = fsub double %80, %81
%83 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %82)
%84 = load i32, i32* %11
%85 = call i32 @srandom(i32 %84)
%86 = call double (...) @get_seconds()
store double %86, double* %8
store i32 0, i32* %6
br label %87
87: ; preds = %93, %78
%88 = load i32, i32* %6
%89 = load i32, i32* %10
%90 = icmp slt i32 %88, %89
br i1 %90, label %91, label %96
91: ; preds = %87
%92 = call float (...) @my_random_float()
store float %92, float* %7
br label %93
93: ; preds = %91
%94 = load i32, i32* %6
%95 = add nsw i32 %94, 1
store i32 %95, i32* %6
br label %87
96: ; preds = %87
%97 = call double (...) @get_seconds()
store double %97, double* %9
%98 = load double, double* %9
%99 = load double, double* %8
%100 = fsub double %98, %99
%101 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), double %100)
%102 = load i32, i32* %11
%103 = call i32 @srandom(i32 %102)
%104 = call double (...) @get_seconds()
store double %104, double* %8
store i32 0, i32* %6
br label %105
105: ; preds = %111, %96
%106 = load i32, i32* %6
%107 = load i32, i32* %10
%108 = icmp slt i32 %106, %107
br i1 %108, label %109, label %114
109: ; preds = %105
%110 = call float (...) @my_random_float()
store float %110, float* %7
br label %111
111: ; preds = %109
%112 = load i32, i32* %6
%113 = add nsw i32 %112, 1
store i32 %113, i32* %6
br label %105
114: ; preds = %105
%115 = call double (...) @get_seconds()
store double %115, double* %9
%116 = load double, double* %9
%117 = load double, double* %8
%118 = fsub double %116, %117
%119 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), double %118)
%120 = load i32, i32* %11
%121 = call i32 @srandom(i32 %120)
%122 = call double (...) @get_seconds()
store double %122, double* %8
store i32 0, i32* %6
br label %123
123: ; preds = %129, %114
%124 = load i32, i32* %6
%125 = load i32, i32* %10
%126 = icmp slt i32 %124, %125
br i1 %126, label %127, label %132
127: ; preds = %123
%128 = call float (...) @my_random_float2()
store float %128, float* %7
br label %129
129: ; preds = %127
%130 = load i32, i32* %6
%131 = add nsw i32 %130, 1
store i32 %131, i32* %6
br label %123
132: ; preds = %123
%133 = call double (...) @get_seconds()
store double %133, double* %9
%134 = load double, double* %9
%135 = load double, double* %8
%136 = fsub double %134, %135
%137 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %136)
%138 = load i32, i32* %11
%139 = call i32 @srandom(i32 %138)
%140 = call double (...) @get_seconds()
store double %140, double* %8
store i32 0, i32* %6
br label %141
141: ; preds = %147, %132
%142 = load i32, i32* %6
%143 = load i32, i32* %10
%144 = icmp slt i32 %142, %143
br i1 %144, label %145, label %150
145: ; preds = %141
%146 = call float (...) @my_random_float2()
store float %146, float* %7
br label %147
147: ; preds = %145
%148 = load i32, i32* %6
%149 = add nsw i32 %148, 1
store i32 %149, i32* %6
br label %141
150: ; preds = %141
%151 = call double (...) @get_seconds()
store double %151, double* %9
%152 = load double, double* %9
%153 = load double, double* %8
%154 = fsub double %152, %153
%155 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %154)
%156 = load i32, i32* %11
%157 = call i32 @srandom(i32 %156)
%158 = call double (...) @get_seconds()
store double %158, double* %8
store i32 0, i32* %6
br label %159
159: ; preds = %165, %150
%160 = load i32, i32* %6
%161 = load i32, i32* %10
%162 = icmp slt i32 %160, %161
br i1 %162, label %163, label %168
163: ; preds = %159
%164 = call float (...) @my_random_double()
store float %164, float* %7
br label %165
165: ; preds = %163
%166 = load i32, i32* %6
%167 = add nsw i32 %166, 1
store i32 %167, i32* %6
br label %159
168: ; preds = %159
%169 = call double (...) @get_seconds()
store double %169, double* %9
%170 = load double, double* %9
%171 = load double, double* %8
%172 = fsub double %170, %171
%173 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %172)
%174 = load i32, i32* %11
%175 = call i32 @srandom(i32 %174)
%176 = call double (...) @get_seconds()
store double %176, double* %8
store i32 0, i32* %6
br label %177
177: ; preds = %183, %168
%178 = load i32, i32* %6
%179 = load i32, i32* %10
%180 = icmp slt i32 %178, %179
br i1 %180, label %181, label %186
181: ; preds = %177
%182 = call float (...) @my_random_double()
store float %182, float* %7
br label %183
183: ; preds = %181
%184 = load i32, i32* %6
%185 = add nsw i32 %184, 1
store i32 %185, i32* %6
br label %177
186: ; preds = %177
%187 = call double (...) @get_seconds()
store double %187, double* %9
%188 = load double, double* %9
%189 = load double, double* %8
%190 = fsub double %188, %189
%191 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %190)
%192 = load i32, i32* %11
%193 = call i32 @srandom(i32 %192)
%194 = call double (...) @get_seconds()
store double %194, double* %8
store i32 0, i32* %6
br label %195
195: ; preds = %201, %186
%196 = load i32, i32* %6
%197 = load i32, i32* %10
%198 = icmp slt i32 %196, %197
br i1 %198, label %199, label %204
199: ; preds = %195
%200 = call float (...) @random_float()
store float %200, float* %7
br label %201
201: ; preds = %199
%202 = load i32, i32* %6
%203 = add nsw i32 %202, 1
store i32 %203, i32* %6
br label %195
204: ; preds = %195
%205 = call double (...) @get_seconds()
store double %205, double* %9
%206 = load double, double* %9
%207 = load double, double* %8
%208 = fsub double %206, %207
%209 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), double %208)
%210 = load i32, i32* %11
%211 = call i32 @srandom(i32 %210)
%212 = call double (...) @get_seconds()
store double %212, double* %8
store i32 0, i32* %6
br label %213
213: ; preds = %219, %204
%214 = load i32, i32* %6
%215 = load i32, i32* %10
%216 = icmp slt i32 %214, %215
br i1 %216, label %217, label %222
217: ; preds = %213
%218 = call float (...) @random_float()
store float %218, float* %7
br label %219
219: ; preds = %217
%220 = load i32, i32* %6
%221 = add nsw i32 %220, 1
store i32 %221, i32* %6
br label %213
222: ; preds = %213
%223 = call double (...) @get_seconds()
store double %223, double* %9
%224 = load double, double* %9
%225 = load double, double* %8
%226 = fsub double %224, %225
%227 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), double %226)
%228 = load i32, i32* %3
ret i32 %228
}

LLVM IR (-O2):
@.str = [15 x i8] c"dummy \09 %f ms\0A\00"
@.str.1 = [16 x i8] c"dummy2 \09 %f ms\0A\00"
@.str.2 = [14 x i8] c"mine \09 %f ms\0A\00"
@.str.3 = [15 x i8] c"mine2 \09 %f ms\0A\00"
@.str.4 = [16 x i8] c"theirs \09 %f ms\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @srandom(i32 17)
%4 = tail call double (...) @get_seconds()
br label %5
5: ; preds = %2, %5
%6 = phi i32 [ 0, %2 ], [ %8, %5 ]
%7 = tail call float (...) @dummy()
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, 1000000000
br i1 %9, label %10, label %5
10: ; preds = %5
%11 = tail call double (...) @get_seconds()
%12 = fsub double %11, %4
%13 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), double %12)
%14 = tail call i32 @srandom(i32 17)
%15 = tail call double (...) @get_seconds()
br label %16
16: ; preds = %10, %16
%17 = phi i32 [ 0, %10 ], [ %19, %16 ]
%18 = tail call float (...) @dummy()
%19 = add nuw nsw i32 %17, 1
%20 = icmp eq i32 %19, 1000000000
br i1 %20, label %21, label %16
21: ; preds = %16
%22 = tail call double (...) @get_seconds()
%23 = fsub double %22, %15
%24 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), double %23)
%25 = tail call i32 @srandom(i32 17)
%26 = tail call double (...) @get_seconds()
br label %27
27: ; preds = %21, %27
%28 = phi i32 [ 0, %21 ], [ %30, %27 ]
%29 = tail call float (...) @dummy2()
%30 = add nuw nsw i32 %28, 1
%31 = icmp eq i32 %30, 1000000000
br i1 %31, label %32, label %27
32: ; preds = %27
%33 = tail call double (...) @get_seconds()
%34 = fsub double %33, %26
%35 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %34)
%36 = tail call i32 @srandom(i32 17)
%37 = tail call double (...) @get_seconds()
br label %38
38: ; preds = %32, %38
%39 = phi i32 [ 0, %32 ], [ %41, %38 ]
%40 = tail call float (...) @dummy2()
%41 = add nuw nsw i32 %39, 1
%42 = icmp eq i32 %41, 1000000000
br i1 %42, label %43, label %38
43: ; preds = %38
%44 = tail call double (...) @get_seconds()
%45 = fsub double %44, %37
%46 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %45)
%47 = tail call i32 @srandom(i32 17)
%48 = tail call double (...) @get_seconds()
br label %49
49: ; preds = %43, %49
%50 = phi i32 [ 0, %43 ], [ %52, %49 ]
%51 = tail call float (...) @my_random_float()
%52 = add nuw nsw i32 %50, 1
%53 = icmp eq i32 %52, 1000000000
br i1 %53, label %54, label %49
54: ; preds = %49
%55 = tail call double (...) @get_seconds()
%56 = fsub double %55, %48
%57 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), double %56)
%58 = tail call i32 @srandom(i32 17)
%59 = tail call double (...) @get_seconds()
br label %60
60: ; preds = %54, %60
%61 = phi i32 [ 0, %54 ], [ %63, %60 ]
%62 = tail call float (...) @my_random_float()
%63 = add nuw nsw i32 %61, 1
%64 = icmp eq i32 %63, 1000000000
br i1 %64, label %65, label %60
65: ; preds = %60
%66 = tail call double (...) @get_seconds()
%67 = fsub double %66, %59
%68 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), double %67)
%69 = tail call i32 @srandom(i32 17)
%70 = tail call double (...) @get_seconds()
br label %71
71: ; preds = %65, %71
%72 = phi i32 [ 0, %65 ], [ %74, %71 ]
%73 = tail call float (...) @my_random_float2()
%74 = add nuw nsw i32 %72, 1
%75 = icmp eq i32 %74, 1000000000
br i1 %75, label %76, label %71
76: ; preds = %71
%77 = tail call double (...) @get_seconds()
%78 = fsub double %77, %70
%79 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %78)
%80 = tail call i32 @srandom(i32 17)
%81 = tail call double (...) @get_seconds()
br label %82
82: ; preds = %76, %82
%83 = phi i32 [ 0, %76 ], [ %85, %82 ]
%84 = tail call float (...) @my_random_float2()
%85 = add nuw nsw i32 %83, 1
%86 = icmp eq i32 %85, 1000000000
br i1 %86, label %87, label %82
87: ; preds = %82
%88 = tail call double (...) @get_seconds()
%89 = fsub double %88, %81
%90 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %89)
%91 = tail call i32 @srandom(i32 17)
%92 = tail call double (...) @get_seconds()
br label %93
93: ; preds = %87, %93
%94 = phi i32 [ 0, %87 ], [ %96, %93 ]
%95 = tail call float (...) @my_random_double()
%96 = add nuw nsw i32 %94, 1
%97 = icmp eq i32 %96, 1000000000
br i1 %97, label %98, label %93
98: ; preds = %93
%99 = tail call double (...) @get_seconds()
%100 = fsub double %99, %92
%101 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %100)
%102 = tail call i32 @srandom(i32 17)
%103 = tail call double (...) @get_seconds()
br label %104
104: ; preds = %98, %104
%105 = phi i32 [ 0, %98 ], [ %107, %104 ]
%106 = tail call float (...) @my_random_double()
%107 = add nuw nsw i32 %105, 1
%108 = icmp eq i32 %107, 1000000000
br i1 %108, label %109, label %104
109: ; preds = %104
%110 = tail call double (...) @get_seconds()
%111 = fsub double %110, %103
%112 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %111)
%113 = tail call i32 @srandom(i32 17)
%114 = tail call double (...) @get_seconds()
br label %115
115: ; preds = %109, %115
%116 = phi i32 [ 0, %109 ], [ %118, %115 ]
%117 = tail call float (...) @random_float()
%118 = add nuw nsw i32 %116, 1
%119 = icmp eq i32 %118, 1000000000
br i1 %119, label %120, label %115
120: ; preds = %115
%121 = tail call double (...) @get_seconds()
%122 = fsub double %121, %114
%123 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), double %122)
%124 = tail call i32 @srandom(i32 17)
%125 = tail call double (...) @get_seconds()
br label %126
126: ; preds = %120, %126
%127 = phi i32 [ 0, %120 ], [ %129, %126 ]
%128 = tail call float (...) @random_float()
%129 = add nuw nsw i32 %127, 1
%130 = icmp eq i32 %129, 1000000000
br i1 %130, label %131, label %126
131: ; preds = %126
%132 = tail call double (...) @get_seconds()
%133 = fsub double %132, %125
%134 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), double %133)
ret i32 0
}