#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*/ avevar(float *, int, float *, float *);
int /*<<< orphan*/ free_vector(float *, int, int);
double gasdev(long *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ tptest(float *, float *, int, float *, float *);
float *vector(int, int);
int main(void) {
  long idum = (-5);
  int i, j;
  float ave1, ave2, ave3;
  float offset, prob1, prob2, shift, t1, t2;
  float var1, var2, var3, *data1, *data2, *data3;
  data1 = vector(1, 500);
  data2 = vector(1, 500);
  data3 = vector(1, 500);
  printf("%29s %31s\n", "Correlated:", "Uncorrelated:");
  printf("%7s %11s %17s %11s %17s\n", "Shift", "t", "Probability", "t",
         "Probability");
  offset = (11 / 2) * 0.01;
  for (j = 1; j <= 500; j++) {
    data1[j] = gasdev(&idum);
    data2[j] = data1[j] + 0.3 * gasdev(&idum);
    data3[j] = gasdev(&idum);
    data3[j] += 0.3 * gasdev(&idum);
  }
  avevar(data1, 500, &ave1, &var1);
  avevar(data2, 500, &ave2, &var2);
  avevar(data3, 500, &ave3, &var3);
  for (j = 1; j <= 500; j++) {
    data1[j] -= ave1 - offset;
    data2[j] -= ave2;
    data3[j] -= ave3;
  }
  for (i = 1; i <= 11; i++) {
    shift = i * 0.01;
    for (j = 1; j <= 500; j++) {
      data2[j] += 0.01;
      data3[j] += 0.01;
    }
    tptest(data1, data2, 500, &t1, &prob1);
    tptest(data1, data3, 500, &t2, &prob2);
    printf("%6.2f %14.4f %12.4f %16.4f %12.4f\n", shift, t1, prob1, t2, prob2);
  }
  free_vector(data3, 1, 500);
  free_vector(data2, 1, 500);
  free_vector(data1, 1, 500);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0xfffffffffffffffb,-0x10(%rbp)
ff
mov    $0x1,%edi
mov    $0x1f4,%esi
call   1060 <vector@plt>
mov    %rax,-0x50(%rbp)
mov    $0x1,%edi
mov    $0x1f4,%esi
call   1060 <vector@plt>
mov    %rax,-0x58(%rbp)
mov    $0x1,%edi
mov    $0x1f4,%esi
call   1060 <vector@plt>
mov    %rax,-0x60(%rbp)
lea    0xe61(%rip),%rdi
lea    0xe65(%rip),%rsi
lea    0xe6a(%rip),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe6a(%rip),%rdi
lea    0xe7c(%rip),%rsi
lea    0xe79(%rip),%r8
lea    0xe74(%rip),%r9
mov    %r8,%rdx
mov    %r9,%rcx
mov    $0x0,%al
call   1040 <printf@plt>
movss  0xe03(%rip),%xmm0
movss  %xmm0,-0x28(%rbp)
movl   $0x1,-0x18(%rbp)
cmpl   $0x1f4,-0x18(%rbp)
jg     12d0 <main+0x170>
lea    -0x10(%rbp),%rdi
call   1080 <gasdev@plt>
cvtsd2ss %xmm0,%xmm0
mov    -0x50(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x50(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
lea    -0x10(%rbp),%rdi
call   1080 <gasdev@plt>
movsd  -0x68(%rbp),%xmm1
movsd  0xdb4(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x58(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
lea    -0x10(%rbp),%rdi
call   1080 <gasdev@plt>
cvtsd2ss %xmm0,%xmm0
mov    -0x60(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
lea    -0x10(%rbp),%rdi
call   1080 <gasdev@plt>
mov    -0x60(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xd5f(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1209 <main+0xa9>
mov    -0x50(%rbp),%rdi
mov    $0x1f4,%esi
lea    -0x1c(%rbp),%rdx
lea    -0x40(%rbp),%rcx
call   1030 <avevar@plt>
mov    -0x58(%rbp),%rdi
mov    $0x1f4,%esi
lea    -0x20(%rbp),%rdx
lea    -0x44(%rbp),%rcx
call   1030 <avevar@plt>
mov    -0x60(%rbp),%rdi
mov    $0x1f4,%esi
lea    -0x24(%rbp),%rdx
lea    -0x48(%rbp),%rcx
call   1030 <avevar@plt>
movl   $0x1,-0x18(%rbp)
cmpl   $0x1f4,-0x18(%rbp)
jg     138a <main+0x22a>
movss  -0x1c(%rbp),%xmm1
subss  -0x28(%rbp),%xmm1
mov    -0x50(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,(%rax,%rcx,4)
movss  -0x20(%rbp),%xmm1
mov    -0x58(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,(%rax,%rcx,4)
movss  -0x24(%rbp),%xmm1
mov    -0x60(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1319 <main+0x1b9>
movl   $0x1,-0x14(%rbp)
cmpl   $0xb,-0x14(%rbp)
jg     14a0 <main+0x340>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xc60(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
movl   $0x1,-0x18(%rbp)
cmpl   $0x1f4,-0x18(%rbp)
jg     1423 <main+0x2c3>
mov    -0x58(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc26(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x60(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc00(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    13bc <main+0x25c>
mov    -0x50(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    $0x1f4,%edx
lea    -0x38(%rbp),%rcx
lea    -0x2c(%rbp),%r8
call   1070 <tptest@plt>
mov    -0x50(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    $0x1f4,%edx
lea    -0x3c(%rbp),%rcx
lea    -0x30(%rbp),%r8
call   1070 <tptest@plt>
movss  -0x34(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x38(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x2c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x3c(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  -0x30(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
lea    0xbdd(%rip),%rdi
mov    $0x5,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1391 <main+0x231>
mov    -0x60(%rbp),%rdi
mov    $0x1,%esi
mov    $0x1f4,%edx
call   1050 <free_vector@plt>
mov    -0x58(%rbp),%rdi
mov    $0x1,%esi
mov    $0x1f4,%edx
call   1050 <free_vector@plt>
mov    -0x50(%rbp),%rdi
mov    $0x1,%esi
mov    $0x1f4,%edx
call   1050 <free_vector@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
movq   $0xfffffffffffffffb,0x30(%rsp)
ff ff
mov    $0x1,%edi
mov    $0x1f4,%esi
call   1060 <vector@plt>
mov    %rax,%r14
mov    $0x1,%edi
mov    $0x1f4,%esi
call   1060 <vector@plt>
mov    %rax,%r15
mov    $0x1,%edi
mov    $0x1f4,%esi
call   1060 <vector@plt>
mov    %rax,%rbx
lea    0xe7c(%rip),%rdi
lea    0xe80(%rip),%rsi
lea    0xe85(%rip),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe85(%rip),%rdi
lea    0xe97(%rip),%rsi
lea    0xe94(%rip),%rdx
lea    0xe8f(%rip),%rcx
mov    %rdx,%r8
mov    %rcx,%r9
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebp
lea    0x30(%rsp),%r12
nopl   0x0(%rax)
mov    %r12,%rdi
call   1080 <gasdev@plt>
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%r14,%rbp,4)
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %r12,%rdi
call   1080 <gasdev@plt>
movsd  0xdd4(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  0x8(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%r15,%rbp,4)
mov    %r12,%rdi
call   1080 <gasdev@plt>
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rbx,%rbp,4)
mov    %r12,%rdi
call   1080 <gasdev@plt>
movss  (%rbx,%rbp,4),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  0xd96(%rip),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rbx,%rbp,4)
add    $0x1,%rbp
cmp    $0x1f5,%rbp
jne    1200 <main+0xa0>
lea    0x2c(%rsp),%rdx
lea    0x44(%rsp),%rcx
mov    %r14,%rdi
mov    $0x1f4,%esi
call   1030 <avevar@plt>
lea    0x28(%rsp),%rdx
lea    0x40(%rsp),%rcx
mov    %r15,%rdi
mov    $0x1f4,%esi
call   1030 <avevar@plt>
lea    0x24(%rsp),%rdx
lea    0x3c(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x1f4,%esi
call   1030 <avevar@plt>
mov    $0x1,%eax
movss  0xd3e(%rip),%xmm0
nopw   0x0(%rax,%rax,1)
movss  0x2c(%rsp),%xmm1
addss  %xmm0,%xmm1
movss  (%r14,%rax,4),%xmm2
subss  %xmm1,%xmm2
movss  %xmm2,(%r14,%rax,4)
movss  (%r15,%rax,4),%xmm1
subss  0x28(%rsp),%xmm1
movss  %xmm1,(%r15,%rax,4)
movss  (%rbx,%rax,4),%xmm1
subss  0x24(%rsp),%xmm1
movss  %xmm1,(%rbx,%rax,4)
add    $0x1,%rax
cmp    $0x1f5,%rax
jne    12e0 <main+0x180>
lea    0x4(%r15),%rax
mov    %r15,%rcx
add    $0x7d4,%rcx
lea    0x4(%rbx),%rdx
mov    %rbx,%rsi
add    $0x7d4,%rsi
cmp    %rsi,%rax
setb   %al
cmp    %rcx,%rdx
setb   %bpl
and    %al,%bpl
mov    $0x1,%r12d
movsd  0xca6(%rip),%xmm1
movsd  0xca6(%rip),%xmm2
lea    0xd0f(%rip),%r13
movapd 0xca7(%rip),%xmm3
jmp    1426 <main+0x2c6>
xchg   %ax,%ax
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x10(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x1f4,%edx
lea    0x18(%rsp),%rcx
lea    0x20(%rsp),%r8
call   1070 <tptest@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x1f4,%edx
lea    0x14(%rsp),%rcx
lea    0x1c(%rsp),%r8
call   1070 <tptest@plt>
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x18(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  0x20(%rsp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  0x14(%rsp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  0x1c(%rsp),%xmm4
cvtss2sd %xmm4,%xmm4
mov    %r13,%rdi
mov    $0x5,%al
call   1040 <printf@plt>
movapd 0xc1e(%rip),%xmm3
movsd  0xc06(%rip),%xmm2
movsd  0x8(%rsp),%xmm1
addsd  0xbf0(%rip),%xmm1
add    $0x1,%r12d
cmp    $0xc,%r12d
je     1587 <main+0x427>
movapd %xmm1,%xmm0
mulsd  %xmm2,%xmm0
test   %bpl,%bpl
movsd  %xmm1,0x8(%rsp)
je     14d0 <main+0x370>
mov    $0x2,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movss  -0x4(%r15,%rax,4),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,-0x4(%r15,%rax,4)
movss  -0x4(%rbx,%rax,4),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,-0x4(%rbx,%rax,4)
movss  (%r15,%rax,4),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,(%r15,%rax,4)
movss  (%rbx,%rax,4),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,(%rbx,%rax,4)
add    $0x2,%rax
cmp    $0x1f6,%rax
jne    1450 <main+0x2f0>
jmp    1380 <main+0x220>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x5,%eax
cs nopw 0x0(%rax,%rax,1)
nop
cvtps2pd -0x8(%r15,%rax,4),%xmm1
cvtps2pd -0x10(%r15,%rax,4),%xmm2
addpd  %xmm3,%xmm2
addpd  %xmm3,%xmm1
cvtpd2ps %xmm1,%xmm1
cvtpd2ps %xmm2,%xmm2
unpcklpd %xmm1,%xmm2
movupd %xmm2,-0x10(%r15,%rax,4)
cvtps2pd -0x8(%rbx,%rax,4),%xmm1
cvtps2pd -0x10(%rbx,%rax,4),%xmm2
addpd  %xmm3,%xmm2
addpd  %xmm3,%xmm1
cvtpd2ps %xmm1,%xmm1
cvtpd2ps %xmm2,%xmm2
unpcklpd %xmm1,%xmm2
movupd %xmm2,-0x10(%rbx,%rax,4)
cmp    $0x1f5,%rax
je     1380 <main+0x220>
cvtps2pd 0x8(%r15,%rax,4),%xmm1
cvtps2pd (%r15,%rax,4),%xmm2
addpd  %xmm3,%xmm2
addpd  %xmm3,%xmm1
cvtpd2ps %xmm1,%xmm1
cvtpd2ps %xmm2,%xmm2
unpcklpd %xmm1,%xmm2
movupd %xmm2,(%r15,%rax,4)
cvtps2pd 0x8(%rbx,%rax,4),%xmm1
cvtps2pd (%rbx,%rax,4),%xmm2
addpd  %xmm3,%xmm2
addpd  %xmm3,%xmm1
cvtpd2ps %xmm1,%xmm1
cvtpd2ps %xmm2,%xmm2
unpcklpd %xmm1,%xmm2
movupd %xmm2,(%rbx,%rax,4)
add    $0x8,%rax
jmp    14e0 <main+0x380>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1f4,%edx
call   1050 <free_vector@plt>
mov    %r15,%rdi
mov    $0x1,%esi
mov    $0x1f4,%edx
call   1050 <free_vector@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x1f4,%edx
call   1050 <free_vector@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%29s %31s\0A\00"
@.str.1 = [12 x i8] c"Correlated:\00"
@.str.2 = [14 x i8] c"Uncorrelated:\00"
@.str.3 = [25 x i8] c"%7s %11s %17s %11s %17s\0A\00"
@.str.4 = [6 x i8] c"Shift\00"
@.str.5 = [2 x i8] c"t\00"
@.str.6 = [12 x i8] c"Probability\00"
@.str.7 = [35 x i8] c"%6.2f %14.4f %12.4f %16.4f %12.4f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca float*
%18 = alloca float*
%19 = alloca float*
store i32 0, i32* %1
store i64 -5, i64* %2
%20 = call float* @vector(i32 1, i32 500)
store float* %20, float** %17
%21 = call float* @vector(i32 1, i32 500)
store float* %21, float** %18
%22 = call float* @vector(i32 1, i32 500)
store float* %22, float** %19
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
store float 0x3FA99999A0000000, float* %8
store i32 1, i32* %4
br label %25
25: ; preds = %63, %0
%26 = load i32, i32* %4
%27 = icmp sle i32 %26, 500
br i1 %27, label %28, label %66
28: ; preds = %25
%29 = call double @gasdev(i64* %2)
%30 = fptrunc double %29 to float
%31 = load float*, float** %17
%32 = load i32, i32* %4
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds float, float* %31, i64 %33
store float %30, float* %34
%35 = load float*, float** %17
%36 = load i32, i32* %4
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds float, float* %35, i64 %37
%39 = load float, float* %38
%40 = fpext float %39 to double
%41 = call double @gasdev(i64* %2)
%42 = call double @llvm.fmuladd.f64(double 3.000000e-01, double %41, double %40)
%43 = fptrunc double %42 to float
%44 = load float*, float** %18
%45 = load i32, i32* %4
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds float, float* %44, i64 %46
store float %43, float* %47
%48 = call double @gasdev(i64* %2)
%49 = fptrunc double %48 to float
%50 = load float*, float** %19
%51 = load i32, i32* %4
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds float, float* %50, i64 %52
store float %49, float* %53
%54 = call double @gasdev(i64* %2)
%55 = load float*, float** %19
%56 = load i32, i32* %4
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds float, float* %55, i64 %57
%59 = load float, float* %58
%60 = fpext float %59 to double
%61 = call double @llvm.fmuladd.f64(double 3.000000e-01, double %54, double %60)
%62 = fptrunc double %61 to float
store float %62, float* %58
br label %63
63: ; preds = %28
%64 = load i32, i32* %4
%65 = add nsw i32 %64, 1
store i32 %65, i32* %4
br label %25
66: ; preds = %25
%67 = load float*, float** %17
%68 = call i32 @avevar(float* %67, i32 500, float* %5, float* %14)
%69 = load float*, float** %18
%70 = call i32 @avevar(float* %69, i32 500, float* %6, float* %15)
%71 = load float*, float** %19
%72 = call i32 @avevar(float* %71, i32 500, float* %7, float* %16)
store i32 1, i32* %4
br label %73
73: ; preds = %100, %66
%74 = load i32, i32* %4
%75 = icmp sle i32 %74, 500
br i1 %75, label %76, label %103
76: ; preds = %73
%77 = load float, float* %5
%78 = load float, float* %8
%79 = fsub float %77, %78
%80 = load float*, float** %17
%81 = load i32, i32* %4
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds float, float* %80, i64 %82
%84 = load float, float* %83
%85 = fsub float %84, %79
store float %85, float* %83
%86 = load float, float* %6
%87 = load float*, float** %18
%88 = load i32, i32* %4
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds float, float* %87, i64 %89
%91 = load float, float* %90
%92 = fsub float %91, %86
store float %92, float* %90
%93 = load float, float* %7
%94 = load float*, float** %19
%95 = load i32, i32* %4
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds float, float* %94, i64 %96
%98 = load float, float* %97
%99 = fsub float %98, %93
store float %99, float* %97
br label %100
100: ; preds = %76
%101 = load i32, i32* %4
%102 = add nsw i32 %101, 1
store i32 %102, i32* %4
br label %73
103: ; preds = %73
store i32 1, i32* %3
br label %104
104: ; preds = %153, %103
%105 = load i32, i32* %3
%106 = icmp sle i32 %105, 11
br i1 %106, label %107, label %156
107: ; preds = %104
%108 = load i32, i32* %3
%109 = sitofp i32 %108 to double
%110 = fmul double %109, 1.000000e-02
%111 = fptrunc double %110 to float
store float %111, float* %11
store i32 1, i32* %4
br label %112
112: ; preds = %132, %107
%113 = load i32, i32* %4
%114 = icmp sle i32 %113, 500
br i1 %114, label %115, label %135
115: ; preds = %112
%116 = load float*, float** %18
%117 = load i32, i32* %4
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds float, float* %116, i64 %118
%120 = load float, float* %119
%121 = fpext float %120 to double
%122 = fadd double %121, 1.000000e-02
%123 = fptrunc double %122 to float
store float %123, float* %119
%124 = load float*, float** %19
%125 = load i32, i32* %4
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds float, float* %124, i64 %126
%128 = load float, float* %127
%129 = fpext float %128 to double
%130 = fadd double %129, 1.000000e-02
%131 = fptrunc double %130 to float
store float %131, float* %127
br label %132
132: ; preds = %115
%133 = load i32, i32* %4
%134 = add nsw i32 %133, 1
store i32 %134, i32* %4
br label %112
135: ; preds = %112
%136 = load float*, float** %17
%137 = load float*, float** %18
%138 = call i32 @tptest(float* %136, float* %137, i32 500, float* %12, float* %9)
%139 = load float*, float** %17
%140 = load float*, float** %19
%141 = call i32 @tptest(float* %139, float* %140, i32 500, float* %13, float* %10)
%142 = load float, float* %11
%143 = fpext float %142 to double
%144 = load float, float* %12
%145 = fpext float %144 to double
%146 = load float, float* %9
%147 = fpext float %146 to double
%148 = load float, float* %13
%149 = fpext float %148 to double
%150 = load float, float* %10
%151 = fpext float %150 to double
%152 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), double %143, double %145, double %147, double %149, double %151)
br label %153
153: ; preds = %135
%154 = load i32, i32* %3
%155 = add nsw i32 %154, 1
store i32 %155, i32* %3
br label %104
156: ; preds = %104
%157 = load float*, float** %19
%158 = call i32 @free_vector(float* %157, i32 1, i32 500)
%159 = load float*, float** %18
%160 = call i32 @free_vector(float* %159, i32 1, i32 500)
%161 = load float*, float** %17
%162 = call i32 @free_vector(float* %161, i32 1, i32 500)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"%29s %31s\0A\00"
@.str.1 = [12 x i8] c"Correlated:\00"
@.str.2 = [14 x i8] c"Uncorrelated:\00"
@.str.3 = [25 x i8] c"%7s %11s %17s %11s %17s\0A\00"
@.str.4 = [6 x i8] c"Shift\00"
@.str.5 = [2 x i8] c"t\00"
@.str.6 = [12 x i8] c"Probability\00"
@.str.7 = [35 x i8] c"%6.2f %14.4f %12.4f %16.4f %12.4f\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = bitcast i64* %1 to i8*
store i64 -5, i64* %1
%13 = bitcast float* %2 to i8*
%14 = bitcast float* %3 to i8*
%15 = bitcast float* %4 to i8*
%16 = bitcast float* %5 to i8*
%17 = bitcast float* %6 to i8*
%18 = bitcast float* %7 to i8*
%19 = bitcast float* %8 to i8*
%20 = bitcast float* %9 to i8*
%21 = bitcast float* %10 to i8*
%22 = bitcast float* %11 to i8*
%23 = tail call float* @vector(i32 1, i32 500)
%24 = tail call float* @vector(i32 1, i32 500)
%25 = tail call float* @vector(i32 1, i32 500)
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
br label %28
28: ; preds = %0, %28
%29 = phi i64 [ 1, %0 ], [ %46, %28 ]
%30 = call double @gasdev(i64* %1)
%31 = fptrunc double %30 to float
%32 = getelementptr inbounds float, float* %23, i64 %29
store float %31, float* %32
%33 = fpext float %31 to double
%34 = call double @gasdev(i64* %1)
%35 = call double @llvm.fmuladd.f64(double %34, double 3.000000e-01, double %33)
%36 = fptrunc double %35 to float
%37 = getelementptr inbounds float, float* %24, i64 %29
store float %36, float* %37
%38 = call double @gasdev(i64* %1)
%39 = fptrunc double %38 to float
%40 = getelementptr inbounds float, float* %25, i64 %29
store float %39, float* %40
%41 = call double @gasdev(i64* %1)
%42 = load float, float* %40
%43 = fpext float %42 to double
%44 = call double @llvm.fmuladd.f64(double %41, double 3.000000e-01, double %43)
%45 = fptrunc double %44 to float
store float %45, float* %40
%46 = add nuw nsw i64 %29, 1
%47 = icmp eq i64 %46, 501
br i1 %47, label %48, label %28
48: ; preds = %28
%49 = call i32 @avevar(float* %23, i32 500, float* %2, float* %9)
%50 = call i32 @avevar(float* %24, i32 500, float* %3, float* %10)
%51 = call i32 @avevar(float* %25, i32 500, float* %4, float* %11)
br label %52
52: ; preds = %48, %52
%53 = phi i64 [ 1, %48 ], [ %67, %52 ]
%54 = load float, float* %2
%55 = fadd float %54, 0xBFA99999A0000000
%56 = getelementptr inbounds float, float* %23, i64 %53
%57 = load float, float* %56
%58 = fsub float %57, %55
store float %58, float* %56
%59 = load float, float* %3
%60 = getelementptr inbounds float, float* %24, i64 %53
%61 = load float, float* %60
%62 = fsub float %61, %59
store float %62, float* %60
%63 = load float, float* %4
%64 = getelementptr inbounds float, float* %25, i64 %53
%65 = load float, float* %64
%66 = fsub float %65, %63
store float %66, float* %64
%67 = add nuw nsw i64 %53, 1
%68 = icmp eq i64 %67, 501
br i1 %68, label %69, label %52
69: ; preds = %52
%70 = getelementptr float, float* %24, i64 1
%71 = getelementptr float, float* %24, i64 501
%72 = getelementptr float, float* %25, i64 1
%73 = getelementptr float, float* %25, i64 501
%74 = icmp ult float* %70, %73
%75 = icmp ult float* %72, %71
%76 = and i1 %74, %75
br label %77
77: ; preds = %69, %141
%78 = phi i32 [ %155, %141 ], [ 1, %69 ]
%79 = sitofp i32 %78 to double
%80 = fmul double %79, 1.000000e-02
br i1 %76, label %116, label %81
81: ; preds = %77, %99
%82 = phi i64 [ %115, %99 ], [ 0, %77 ]
%83 = or i64 %82, 1
%84 = getelementptr inbounds float, float* %24, i64 %83
%85 = bitcast float* %84 to <4 x float>*
%86 = load <4 x float>, <4 x float>* %85
%87 = fpext <4 x float> %86 to <4 x double>
%88 = fadd <4 x double> %87, <double 1.000000e-02, double 1.000000e-02, double 1.000000e-02, double 1.000000e-02>
%89 = fptrunc <4 x double> %88 to <4 x float>
%90 = bitcast float* %84 to <4 x float>*
store <4 x float> %89, <4 x float>* %90
%91 = getelementptr inbounds float, float* %25, i64 %83
%92 = bitcast float* %91 to <4 x float>*
%93 = load <4 x float>, <4 x float>* %92
%94 = fpext <4 x float> %93 to <4 x double>
%95 = fadd <4 x double> %94, <double 1.000000e-02, double 1.000000e-02, double 1.000000e-02, double 1.000000e-02>
%96 = fptrunc <4 x double> %95 to <4 x float>
%97 = bitcast float* %91 to <4 x float>*
store <4 x float> %96, <4 x float>* %97
%98 = icmp eq i64 %82, 496
br i1 %98, label %141, label %99
99: ; preds = %81
%100 = or i64 %82, 5
%101 = getelementptr inbounds float, float* %24, i64 %100
%102 = bitcast float* %101 to <4 x float>*
%103 = load <4 x float>, <4 x float>* %102
%104 = fpext <4 x float> %103 to <4 x double>
%105 = fadd <4 x double> %104, <double 1.000000e-02, double 1.000000e-02, double 1.000000e-02, double 1.000000e-02>
%106 = fptrunc <4 x double> %105 to <4 x float>
%107 = bitcast float* %101 to <4 x float>*
store <4 x float> %106, <4 x float>* %107
%108 = getelementptr inbounds float, float* %25, i64 %100
%109 = bitcast float* %108 to <4 x float>*
%110 = load <4 x float>, <4 x float>* %109
%111 = fpext <4 x float> %110 to <4 x double>
%112 = fadd <4 x double> %111, <double 1.000000e-02, double 1.000000e-02, double 1.000000e-02, double 1.000000e-02>
%113 = fptrunc <4 x double> %112 to <4 x float>
%114 = bitcast float* %108 to <4 x float>*
store <4 x float> %113, <4 x float>* %114
%115 = add nuw nsw i64 %82, 8
br label %81
116: ; preds = %77, %116
%117 = phi i64 [ %139, %116 ], [ 1, %77 ]
%118 = getelementptr inbounds float, float* %24, i64 %117
%119 = load float, float* %118
%120 = fpext float %119 to double
%121 = fadd double %120, 1.000000e-02
%122 = fptrunc double %121 to float
store float %122, float* %118
%123 = getelementptr inbounds float, float* %25, i64 %117
%124 = load float, float* %123
%125 = fpext float %124 to double
%126 = fadd double %125, 1.000000e-02
%127 = fptrunc double %126 to float
store float %127, float* %123
%128 = add nuw nsw i64 %117, 1
%129 = getelementptr inbounds float, float* %24, i64 %128
%130 = load float, float* %129
%131 = fpext float %130 to double
%132 = fadd double %131, 1.000000e-02
%133 = fptrunc double %132 to float
store float %133, float* %129
%134 = getelementptr inbounds float, float* %25, i64 %128
%135 = load float, float* %134
%136 = fpext float %135 to double
%137 = fadd double %136, 1.000000e-02
%138 = fptrunc double %137 to float
store float %138, float* %134
%139 = add nuw nsw i64 %117, 2
%140 = icmp eq i64 %139, 501
br i1 %140, label %141, label %116
141: ; preds = %81, %116
%142 = fptrunc double %80 to float
%143 = call i32 @tptest(float* %23, float* %24, i32 500, float* %7, float* %5)
%144 = call i32 @tptest(float* %23, float* %25, i32 500, float* %8, float* %6)
%145 = fpext float %142 to double
%146 = load float, float* %7
%147 = fpext float %146 to double
%148 = load float, float* %5
%149 = fpext float %148 to double
%150 = load float, float* %8
%151 = fpext float %150 to double
%152 = load float, float* %6
%153 = fpext float %152 to double
%154 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), double %145, double %147, double %149, double %151, double %153)
%155 = add nuw nsw i32 %78, 1
%156 = icmp eq i32 %155, 12
br i1 %156, label %157, label %77
157: ; preds = %141
%158 = call i32 @free_vector(float* %25, i32 1, i32 500)
%159 = call i32 @free_vector(float* %24, i32 1, i32 500)
%160 = call i32 @free_vector(float* %23, i32 1, i32 500)
ret i32 0
}