#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 */
struct timeval {
  double tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
double RAND_MAX;
int atoi(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double log(float);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ rand();
int /*<<< orphan*/ srand(unsigned int);
int main(int argc, char *argv[]) {
  struct timeval tnow;
  gettimeofday(&tnow, NULL);
  unsigned int tseed =
      (unsigned int)((tnow.tv_usec / 100000.0 - tnow.tv_usec / 100000) *
                     RAND_MAX);
  srand(tseed);
  if (argc != 2) {
    printf("Error. Pls supply 1 argument: integer, number of exponential "
           "replicates\n");
    exit(EXIT_FAILURE);
  }
  int numreps = atoi(argv[1]);
  float ar = -0.75;
  float ar2 = 0.25;
  float count = 40.;
  float ar3 = 1 / count;
  int i = 0, j;
  float ura;
  float wt[6] = {0};
  int lessthanav = 0, grtthanav = 0;
  while (1) {
    ura = 1. - (float)rand() / (RAND_MAX);
    wt[0] = -1.0 / ar * log(1 + ura);
    wt[1] = -1.0 / ar * log(ura);
    wt[2] = -log(ura) / ar;
    wt[3] = -1.0 / ar2 * log(1 + ura);
    wt[4] = -1.0 / ar2 * log(ura);
    wt[5] = -log(ura) / ar3;
    if (wt[5] > count)
      grtthanav++;
    else if (wt[5] < count)
      lessthanav++;
    printf("For ura=%4.4f, logura= %4.4f wts=", ura, log(ura));
    for (j = 0; j < 6; ++j)
      printf("%.3f ", wt[j]);
    printf("\n");
    i++;
    if (i > numreps)
      break;
  }
  printf("Numb under avrate = %i, number over = %i.\n", lessthanav, grtthanav);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%esi
lea    -0x18(%rbp),%rdi
call   1040 <gettimeofday@plt>
movsd  -0x18(%rbp),%xmm0
movsd  0xe4d(%rip),%xmm1
divsd  %xmm1,%xmm0
subsd  %xmm0,%xmm0
mov    0x2e26(%rip),%rax
movsd  (%rax),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1060 <srand@plt>
cmpl   $0x2,-0x8(%rbp)
je     1200 <main+0x80>
lea    0xe3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2ddf(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x20(%rbp)
movss  0xe0c(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  0xdfb(%rip),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  0xdea(%rip),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  0xdd9(%rip),%xmm0
divss  -0x2c(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1050 <memset@plt>
movl   $0x0,-0x64(%rbp)
movl   $0x0,-0x68(%rbp)
mov    $0x0,%al
call   10a0 <rand@plt>
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm1
mov    0x2d63(%rip),%rax
divsd  (%rax),%xmm1
movsd  0xd7f(%rip),%xmm0
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd59(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movss  0xd55(%rip),%xmm0
addss  -0x3c(%rbp),%xmm0
call   1070 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd12(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movss  -0x3c(%rbp),%xmm0
call   1070 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x3c(%rbp),%xmm0
call   1070 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movss  -0x24(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x58(%rbp)
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xca2(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movss  0xca1(%rip),%xmm0
addss  -0x3c(%rbp),%xmm0
call   1070 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc61(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movss  -0x3c(%rbp),%xmm0
call   1070 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x3c(%rbp),%xmm0
call   1070 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movss  -0x30(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x4c(%rbp),%xmm0
ucomiss -0x2c(%rbp),%xmm0
jbe    1423 <main+0x2a3>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    1444 <main+0x2c4>
movss  -0x4c(%rbp),%xmm1
movss  -0x2c(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    143f <main+0x2bf>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1444 <main+0x2c4>
movss  -0x3c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movss  -0x3c(%rbp),%xmm0
call   1070 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
lea    0xc00(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movl   $0x0,-0x38(%rbp)
cmpl   $0x6,-0x38(%rbp)
jge    14b3 <main+0x333>
movslq -0x38(%rbp),%rax
movss  -0x60(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xbf5(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    147f <main+0x2ff>
lea    0xc08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    14db <main+0x35b>
jmp    14e0 <main+0x360>
jmp    126e <main+0xee>
mov    -0x64(%rbp),%esi
mov    -0x68(%rbp),%edx
lea    0xbac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %r14d,%r14d
lea    0x40(%rsp),%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
movsd  0x40(%rsp),%xmm0
divsd  0xe40(%rip),%xmm0
subsd  %xmm0,%xmm0
mov    0x2e1d(%rip),%r13
mulsd  0x0(%r13),%xmm0
cvttsd2si %xmm0,%rdi
call   1070 <srand@plt>
cmp    $0x2,%ebp
jne    1458 <main+0x2c8>
mov    0x8(%rbx),%rdi
call   1090 <atoi@plt>
mov    %eax,%ebx
test   %eax,%eax
cmovle %r14d,%ebx
add    $0x1,%ebx
lea    0xe39(%rip),%r15
lea    0xe54(%rip),%rbp
xor    %r14d,%r14d
xor    %r12d,%r12d
jmp    1359 <main+0x1c9>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r12d
movss  0x8(%rsp),%xmm1
movsd  0x30(%rsp),%xmm2
movsd  0x28(%rsp),%xmm3
movsd  0x20(%rsp),%xmm4
movsd  0x18(%rsp),%xmm5
movsd  0x10(%rsp),%xmm6
movsd  0xdc0(%rip),%xmm0
mulsd  %xmm0,%xmm2
cvtsd2ss %xmm2,%xmm2
movss  %xmm2,0x10(%rsp)
mulsd  %xmm0,%xmm3
xorps  %xmm0,%xmm0
cvtsd2ss %xmm3,%xmm0
movss  %xmm0,0x18(%rsp)
xorps  %xmm0,%xmm0
cvtsd2ss %xmm4,%xmm0
movss  %xmm0,0x20(%rsp)
movsd  0xd9c(%rip),%xmm0
mulsd  %xmm0,%xmm5
xorps  %xmm2,%xmm2
cvtsd2ss %xmm5,%xmm2
movss  %xmm2,0x28(%rsp)
mulsd  %xmm0,%xmm6
xorps  %xmm0,%xmm0
cvtsd2ss %xmm6,%xmm0
movss  %xmm0,0x30(%rsp)
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  %xmm0,0x38(%rsp)
movaps %xmm1,%xmm0
call   1080 <log@plt>
movaps %xmm0,%xmm1
mov    %r15,%rdi
movsd  0x38(%rsp),%xmm0
mov    $0x2,%al
call   1050 <printf@plt>
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x18(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x20(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x28(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x30(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
je     1433 <main+0x2a3>
xor    %eax,%eax
call   10b0 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
divsd  0x0(%r13),%xmm0
movsd  0xc8e(%rip),%xmm1
subsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,0x8(%rsp)
addss  0xc9d(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
call   1080 <log@plt>
movsd  %xmm0,0x30(%rsp)
movss  0x8(%rsp),%xmm0
call   1080 <log@plt>
movsd  %xmm0,0x28(%rsp)
movss  0x8(%rsp),%xmm0
call   1080 <log@plt>
divsd  0xc50(%rip),%xmm0
movsd  %xmm0,0x20(%rsp)
movss  0xc(%rsp),%xmm0
call   1080 <log@plt>
movsd  %xmm0,0x18(%rsp)
movss  0x8(%rsp),%xmm0
call   1080 <log@plt>
movsd  %xmm0,0x10(%rsp)
movss  0x8(%rsp),%xmm0
call   1080 <log@plt>
divsd  0xc25(%rip),%xmm0
xorps  %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm1
movss  0xc22(%rip),%xmm0
ucomiss %xmm0,%xmm1
movss  %xmm1,0xc(%rsp)
ja     1220 <main+0x90>
ucomiss %xmm1,%xmm0
jbe    1224 <main+0x94>
add    $0x1,%r14d
jmp    1224 <main+0x94>
lea    0xc26(%rip),%rdi
mov    %r14d,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc2c(%rip),%rdi
call   1040 <puts@plt>
mov    0x2b6d(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
%struct.timeval = type { double }
@RAND_MAX = global double 0.000000e+00
@.str = [73 x i8] c"Error. Pls supply 1 argument: integer, number of exponential replicates\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [34 x i8] c"For ura=%4.4f, logura= %4.4f wts=\00"
@.str.2 = [6 x i8] c"%.3f \00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [43 x i8] c"Numb under avrate = %i, number over = %i.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.timeval
%7 = alloca i32
%8 = alloca i32
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca i32
%14 = alloca i32
%15 = alloca float
%16 = alloca [6 x float]
%17 = alloca i32
%18 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%19 = call i32 @gettimeofday(%struct.timeval* %6, i32* null)
%20 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
%21 = load double, double* %20
%22 = fdiv double %21, 1.000000e+05
%23 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
%24 = load double, double* %23
%25 = fdiv double %24, 1.000000e+05
%26 = fsub double %22, %25
%27 = load double, double* @RAND_MAX
%28 = fmul double %26, %27
%29 = fptoui double %28 to i32
store i32 %29, i32* %7
%30 = load i32, i32* %7
%31 = call i32 @srand(i32 %30)
%32 = load i32, i32* %4
%33 = icmp ne i32 %32, 2
br i1 %33, label %34, label %38
34: ; preds = %2
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0))
%36 = load i32, i32* @EXIT_FAILURE
%37 = call i32 @exit(i32 %36)
unreachable
38: ; preds = %2
%39 = load i8**, i8*** %5
%40 = getelementptr inbounds i8*, i8** %39, i64 1
%41 = load i8*, i8** %40
%42 = call i32 @atoi(i8* %41)
store i32 %42, i32* %8
store float -7.500000e-01, float* %9
store float 2.500000e-01, float* %10
store float 4.000000e+01, float* %11
%43 = load float, float* %11
%44 = fdiv float 1.000000e+00, %43
store float %44, float* %12
store i32 0, i32* %13
%45 = bitcast [6 x float]* %16 to i8*
store i32 0, i32* %17
store i32 0, i32* %18
br label %46
46: ; preds = %38, %147
%47 = call i64 (...) @rand()
%48 = sitofp i64 %47 to float
%49 = fpext float %48 to double
%50 = load double, double* @RAND_MAX
%51 = fdiv double %49, %50
%52 = fsub double 1.000000e+00, %51
%53 = fptrunc double %52 to float
store float %53, float* %15
%54 = load float, float* %9
%55 = fpext float %54 to double
%56 = fdiv double -1.000000e+00, %55
%57 = load float, float* %15
%58 = fadd float 1.000000e+00, %57
%59 = call double @log(float %58)
%60 = fmul double %56, %59
%61 = fptrunc double %60 to float
%62 = getelementptr inbounds [6 x float], [6 x float]* %16, i64 0, i64 0
store float %61, float* %62
%63 = load float, float* %9
%64 = fpext float %63 to double
%65 = fdiv double -1.000000e+00, %64
%66 = load float, float* %15
%67 = call double @log(float %66)
%68 = fmul double %65, %67
%69 = fptrunc double %68 to float
%70 = getelementptr inbounds [6 x float], [6 x float]* %16, i64 0, i64 1
store float %69, float* %70
%71 = load float, float* %15
%72 = call double @log(float %71)
%73 = fneg double %72
%74 = load float, float* %9
%75 = fpext float %74 to double
%76 = fdiv double %73, %75
%77 = fptrunc double %76 to float
%78 = getelementptr inbounds [6 x float], [6 x float]* %16, i64 0, i64 2
store float %77, float* %78
%79 = load float, float* %10
%80 = fpext float %79 to double
%81 = fdiv double -1.000000e+00, %80
%82 = load float, float* %15
%83 = fadd float 1.000000e+00, %82
%84 = call double @log(float %83)
%85 = fmul double %81, %84
%86 = fptrunc double %85 to float
%87 = getelementptr inbounds [6 x float], [6 x float]* %16, i64 0, i64 3
store float %86, float* %87
%88 = load float, float* %10
%89 = fpext float %88 to double
%90 = fdiv double -1.000000e+00, %89
%91 = load float, float* %15
%92 = call double @log(float %91)
%93 = fmul double %90, %92
%94 = fptrunc double %93 to float
%95 = getelementptr inbounds [6 x float], [6 x float]* %16, i64 0, i64 4
store float %94, float* %95
%96 = load float, float* %15
%97 = call double @log(float %96)
%98 = fneg double %97
%99 = load float, float* %12
%100 = fpext float %99 to double
%101 = fdiv double %98, %100
%102 = fptrunc double %101 to float
%103 = getelementptr inbounds [6 x float], [6 x float]* %16, i64 0, i64 5
store float %102, float* %103
%104 = getelementptr inbounds [6 x float], [6 x float]* %16, i64 0, i64 5
%105 = load float, float* %104
%106 = load float, float* %11
%107 = fcmp ogt float %105, %106
br i1 %107, label %108, label %111
108: ; preds = %46
%109 = load i32, i32* %18
%110 = add nsw i32 %109, 1
store i32 %110, i32* %18
br label %120
111: ; preds = %46
%112 = getelementptr inbounds [6 x float], [6 x float]* %16, i64 0, i64 5
%113 = load float, float* %112
%114 = load float, float* %11
%115 = fcmp olt float %113, %114
br i1 %115, label %116, label %119
116: ; preds = %111
%117 = load i32, i32* %17
%118 = add nsw i32 %117, 1
store i32 %118, i32* %17
br label %119
119: ; preds = %116, %111
br label %120
120: ; preds = %119, %108
%121 = load float, float* %15
%122 = fpext float %121 to double
%123 = load float, float* %15
%124 = call double @log(float %123)
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), double %122, double %124)
store i32 0, i32* %14
br label %126
126: ; preds = %136, %120
%127 = load i32, i32* %14
%128 = icmp slt i32 %127, 6
br i1 %128, label %129, label %139
129: ; preds = %126
%130 = load i32, i32* %14
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds [6 x float], [6 x float]* %16, i64 0, i64 %131
%133 = load float, float* %132
%134 = fpext float %133 to double
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %134)
br label %136
136: ; preds = %129
%137 = load i32, i32* %14
%138 = add nsw i32 %137, 1
store i32 %138, i32* %14
br label %126
139: ; preds = %126
%140 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%141 = load i32, i32* %13
%142 = add nsw i32 %141, 1
store i32 %142, i32* %13
%143 = load i32, i32* %13
%144 = load i32, i32* %8
%145 = icmp sgt i32 %143, %144
br i1 %145, label %146, label %147
146: ; preds = %139
br label %148
147: ; preds = %139
br label %46
148: ; preds = %146
%149 = load i32, i32* %17
%150 = load i32, i32* %18
%151 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0), i32 %149, i32 %150)
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { double }
@RAND_MAX = global double 0.000000e+00
@EXIT_FAILURE = global i32 0
@.str.1 = [34 x i8] c"For ura=%4.4f, logura= %4.4f wts=\00"
@.str.2 = [6 x i8] c"%.3f \00"
@.str.4 = [43 x i8] c"Numb under avrate = %i, number over = %i.\0A\00"
@str = [72 x i8] c"Error. Pls supply 1 argument: integer, number of exponential replicates\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.timeval
%4 = bitcast %struct.timeval* %3 to i8*
%5 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 0
%7 = load double, double* %6
%8 = fdiv double %7, 1.000000e+05
%9 = fsub double %8, %8
%10 = load double, double* @RAND_MAX
%11 = fmul double %10, %9
%12 = fptoui double %11 to i32
%13 = tail call i32 @srand(i32 %12)
%14 = icmp eq i32 %0, 2
br i1 %14, label %19, label %15
15: ; preds = %2
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str, i64 0, i64 0))
%17 = load i32, i32* @EXIT_FAILURE
%18 = tail call i32 @exit(i32 %17)
unreachable
19: ; preds = %2
%20 = getelementptr inbounds i8*, i8** %1, i64 1
%21 = load i8*, i8** %20
%22 = tail call i32 @atoi(i8* %21)
%23 = call i32 @llvm.smax.i32(i32 %22, i32 0)
br label %24
24: ; preds = %61, %19
%25 = phi i32 [ 0, %19 ], [ %80, %61 ]
%26 = phi i32 [ 0, %19 ], [ %62, %61 ]
%27 = phi i32 [ 0, %19 ], [ %63, %61 ]
%28 = tail call i64 (...) @rand()
%29 = sitofp i64 %28 to float
%30 = fpext float %29 to double
%31 = load double, double* @RAND_MAX
%32 = fdiv double %30, %31
%33 = fsub double 1.000000e+00, %32
%34 = fptrunc double %33 to float
%35 = fadd float %34, 1.000000e+00
%36 = tail call double @log(float %35)
%37 = fmul double %36, 0x3FF5555555555555
%38 = fptrunc double %37 to float
%39 = tail call double @log(float %34)
%40 = fmul double %39, 0x3FF5555555555555
%41 = fptrunc double %40 to float
%42 = tail call double @log(float %34)
%43 = fdiv double %42, 7.500000e-01
%44 = fptrunc double %43 to float
%45 = tail call double @log(float %35)
%46 = fmul double %45, -4.000000e+00
%47 = fptrunc double %46 to float
%48 = tail call double @log(float %34)
%49 = fmul double %48, -4.000000e+00
%50 = fptrunc double %49 to float
%51 = tail call double @log(float %34)
%52 = fdiv double %51, 0xBF999999A0000000
%53 = fptrunc double %52 to float
%54 = fcmp ogt float %53, 4.000000e+01
br i1 %54, label %55, label %57
55: ; preds = %24
%56 = add nsw i32 %27, 1
br label %61
57: ; preds = %24
%58 = fcmp olt float %53, 4.000000e+01
br i1 %58, label %59, label %61
59: ; preds = %57
%60 = add nsw i32 %26, 1
br label %61
61: ; preds = %57, %59, %55
%62 = phi i32 [ %26, %55 ], [ %60, %59 ], [ %26, %57 ]
%63 = phi i32 [ %56, %55 ], [ %27, %59 ], [ %27, %57 ]
%64 = fpext float %34 to double
%65 = tail call double @log(float %34)
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), double %64, double %65)
%67 = fpext float %38 to double
%68 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %67)
%69 = fpext float %41 to double
%70 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %69)
%71 = fpext float %44 to double
%72 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %71)
%73 = fpext float %47 to double
%74 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %73)
%75 = fpext float %50 to double
%76 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %75)
%77 = fpext float %53 to double
%78 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %77)
%79 = tail call i32 @putchar(i32 10)
%80 = add nuw i32 %25, 1
%81 = icmp eq i32 %25, %23
br i1 %81, label %82, label %24
82: ; preds = %61
%83 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0), i32 %62, i32 %63)
ret i32 0
}