#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*/ free(double *);
int /*<<< orphan*/ linreg_multi(int, double *, double *, int, double *,
                                double *, double *, double *, double *, double,
                                double *, double *, double *, char *, int);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ zerohyp_multi(int, double *, int, double *, double *,
                                 double *);
int main(void) {
  int N, p, intercept;
  double alpha;
  double *res2;
  char *llsmethod = "qr";
  N = 15;
  p = 3;
  intercept = 1;
  res2 = (double *)malloc(sizeof(double) * N);
  double b2[3] = {0.0, 0.0, 0.0};
  double anv2[7] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
  double low[4] = {0.0, 0.0, 0.0, 0.0};
  double up[4] = {0.0, 0.0, 0.0, 0.0};
  double tval2[3] = {0.0, 0.0, 0.0};
  double pval2[3] = {0.0, 0.0, 0.0};
  double sig2[1] = {0.0};
  double R2[2] = {0.0, 0.0};
  double varcovar[9] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
  alpha = 0.05;
  double XX[30] = {1839, 1844, 1831, 1881, 1883, 1910, 1969, 2016, 2126, 2239,
                   2336, 2404, 2487, 2535, 2595, 1,    2,    3,    4,    5,
                   6,    7,    8,    9,    10,   11,   12,   13,   14,   15};
  double YY[15] = {1673, 1688, 1666, 1735, 1749, 1756, 1815, 1867,
                   1948, 2048, 2128, 2165, 2257, 2316, 2324};
  linreg_multi(p, XX, YY, N, b2, sig2, varcovar, R2, res2, alpha, anv2, low, up,
               llsmethod, intercept);
  printf("Estimates Regression Parameters : Beta1 = %lf ,Beta 2 = %lf ,Beta 3 "
         "= %lf \n",
         b2[0], b2[1], b2[2]);
  printf("sigma2 = %lf , R^2 = %lf R^2 (Adj.) = %lf \n", sig2[0], R2[0], R2[1]);
  printf("Confidence Interval %lf \n", (1. - alpha) * 100.);
  printf("Beta1 : Lower Limit = %lf ,Upper Limit = %lf \n", low[0], up[0]);
  printf("Beta2 : Lower Limit = %lf ,Upper Limit = %lf \n", low[1], up[1]);
  printf("Beta3 : Lower Limit = %lf ,Upper Limit = %lf \n", low[2], up[2]);
  printf("Variance : Lower Limit = %lf ,Upper Limit = %lf \n", low[3], up[3]);
  zerohyp_multi(N, b2, p, varcovar, tval2, pval2);
  printf("Beta1 : T Value = %g ,P Value = %g \n", tval2[0], pval2[0]);
  printf("Beta2 : T Value = %g ,P Value = %g \n", tval2[1], pval2[1]);
  printf("Beta3 : T Value = %g ,P Value = %g \n", tval2[2], pval2[2]);
  printf("\n ANOVA : \n");
  printf("Regression :  df = %lf ,SS = %lf ,MSS = %lf ,F Stat = %lf \n",
         anv2[3], anv2[1], anv2[1] / anv2[3], anv2[5]);
  printf("Residual :  df = %lf ,SS = %lf ,MSS = %lf \n", anv2[4], anv2[2],
         anv2[2] / anv2[4]);
  printf("Total :  df = %lf ,SS = %lf  \n", anv2[3] + anv2[4], anv2[0]);
  printf("F pvalue = %g \n", anv2[6]);
  free(res2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x328,%rsp
movl   $0x0,-0x2c(%rbp)
lea    0xe86(%rip),%rax
mov    %rax,-0x50(%rbp)
movl   $0xf,-0x30(%rbp)
movl   $0x3,-0x34(%rbp)
movl   $0x1,-0x38(%rbp)
movslq -0x30(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x48(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1070 <memset@plt>
lea    -0xb0(%rbp),%rdi
xor    %esi,%esi
mov    $0x38,%edx
call   1070 <memset@plt>
lea    -0xd0(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1070 <memset@plt>
lea    -0xf0(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1070 <memset@plt>
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1070 <memset@plt>
lea    -0x130(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1070 <memset@plt>
lea    -0x138(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1070 <memset@plt>
lea    -0x150(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1070 <memset@plt>
lea    -0x1a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x48,%edx
call   1070 <memset@plt>
movsd  0xda2(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
lea    -0x290(%rbp),%rdi
lea    0xfff(%rip),%rsi
mov    $0xf0,%edx
call   1080 <memcpy@plt>
lea    -0x310(%rbp),%rdi
lea    0x10d7(%rip),%rsi
mov    $0x78,%edx
call   1080 <memcpy@plt>
mov    -0x34(%rbp),%edi
lea    -0x290(%rbp),%rsi
lea    -0x310(%rbp),%rdx
mov    -0x30(%rbp),%ecx
lea    -0x70(%rbp),%r8
lea    -0x138(%rbp),%r9
lea    -0x1a0(%rbp),%r13
lea    -0x150(%rbp),%r12
mov    -0x48(%rbp),%r15
movsd  -0x40(%rbp),%xmm0
lea    -0xb0(%rbp),%r14
lea    -0xd0(%rbp),%rbx
lea    -0xf0(%rbp),%r11
mov    -0x50(%rbp),%r10
mov    -0x38(%rbp),%eax
mov    %r13,(%rsp)
mov    %r12,0x8(%rsp)
mov    %r15,0x10(%rsp)
mov    %r14,0x18(%rsp)
mov    %rbx,0x20(%rsp)
mov    %r11,0x28(%rsp)
mov    %r10,0x30(%rsp)
mov    %eax,0x38(%rsp)
call   1050 <linreg_multi@plt>
movsd  -0x70(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
lea    0xce5(%rip),%rdi
mov    $0x3,%al
call   1060 <printf@plt>
movsd  -0x138(%rbp),%xmm0
ff
movsd  -0x150(%rbp),%xmm1
ff
movsd  -0x148(%rbp),%xmm2
ff
lea    0xd0b(%rip),%rdi
mov    $0x3,%al
call   1060 <printf@plt>
movsd  0xc9d(%rip),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  0xc88(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    0xd10(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  -0xd0(%rbp),%xmm0
ff
movsd  -0xf0(%rbp),%xmm1
ff
lea    0xd0c(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0xe8(%rbp),%xmm1
ff
lea    0xd1d(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xe0(%rbp),%xmm1
ff
lea    0xd2e(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
movsd  -0xb8(%rbp),%xmm0
ff
movsd  -0xd8(%rbp),%xmm1
ff
lea    0xd3f(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
mov    -0x30(%rbp),%edi
lea    -0x70(%rbp),%rsi
mov    -0x34(%rbp),%edx
lea    -0x1a0(%rbp),%rcx
lea    -0x110(%rbp),%r8
lea    -0x130(%rbp),%r9
call   1040 <zerohyp_multi@plt>
movsd  -0x110(%rbp),%xmm0
ff
movsd  -0x130(%rbp),%xmm1
ff
lea    0xd2f(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
movsd  -0x108(%rbp),%xmm0
ff
movsd  -0x128(%rbp),%xmm1
ff
lea    0xd36(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
movsd  -0x100(%rbp),%xmm0
ff
movsd  -0x120(%rbp),%xmm1
ff
lea    0xd3d(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
lea    0xd54(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movsd  -0x98(%rbp),%xmm0
ff
movsd  -0xa8(%rbp),%xmm1
ff
movsd  -0xa8(%rbp),%xmm2
ff
divsd  -0x98(%rbp),%xmm2
ff
movsd  -0x88(%rbp),%xmm3
ff
lea    0xd2a(%rip),%rdi
mov    $0x4,%al
call   1060 <printf@plt>
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0xa0(%rbp),%xmm2
ff
divsd  -0x90(%rbp),%xmm2
ff
lea    0xd38(%rip),%rdi
mov    $0x3,%al
call   1060 <printf@plt>
movsd  -0x98(%rbp),%xmm0
ff
addsd  -0x90(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm1
ff
lea    0xd3e(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
movsd  -0x80(%rbp),%xmm0
lea    0xd4a(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x328,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2c8,%rsp
mov    $0x78,%edi
call   1090 <malloc@plt>
mov    %rax,%r14
xorps  %xmm0,%xmm0
movaps %xmm0,0xa0(%rsp)
movq   $0x0,0xb0(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movq   $0x0,0x90(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0x40(%rsp)
movq   $0x0,0x50(%rsp)
movaps %xmm0,0x20(%rsp)
movq   $0x0,0x30(%rsp)
movq   $0x0,0x8(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x120(%rsp)
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movq   $0x0,0x140(%rsp)
lea    0x1040(%rip),%rsi
lea    0x1d0(%rsp),%rbx
mov    $0xf0,%edx
mov    %rbx,%rdi
call   1080 <memcpy@plt>
mov    0x1184(%rip),%rax
mov    %rax,0x1c0(%rsp)
movaps 0x1165(%rip),%xmm0
movaps %xmm0,0x1b0(%rsp)
movaps 0x1146(%rip),%xmm0
movaps %xmm0,0x1a0(%rsp)
movaps 0x1127(%rip),%xmm0
movaps %xmm0,0x190(%rsp)
movaps 0x1108(%rip),%xmm0
movaps %xmm0,0x180(%rsp)
movaps 0x10e9(%rip),%xmm0
movaps %xmm0,0x170(%rsp)
movaps 0x10ca(%rip),%xmm0
movaps %xmm0,0x160(%rsp)
movaps 0x10ab(%rip),%xmm0
movaps %xmm0,0x150(%rsp)
lea    0xd3c(%rip),%rax
lea    0xc0(%rsp),%r10
lea    0xe0(%rsp),%r11
lea    0x60(%rsp),%r13
lea    0x10(%rsp),%rbp
lea    0x100(%rsp),%r15
lea    0x150(%rsp),%rdx
lea    0xa0(%rsp),%r12
lea    0x8(%rsp),%r9
movsd  0xced(%rip),%xmm0
mov    $0x3,%edi
mov    %rbx,%rsi
mov    $0xf,%ecx
mov    %r12,%r8
push   $0x1
push   %rax
push   %r10
push   %r11
push   %r13
push   %r14
push   %rbp
push   %r15
call   1060 <linreg_multi@plt>
add    $0x40,%rsp
movsd  0xa0(%rsp),%xmm0
movsd  0xa8(%rsp),%xmm1
movsd  0xb0(%rsp),%xmm2
lea    0xcb7(%rip),%rdi
mov    $0x3,%al
call   1070 <printf@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
lea    0xce3(%rip),%rdi
mov    $0x3,%al
call   1070 <printf@plt>
lea    0xd01(%rip),%rdi
movsd  0xc76(%rip),%xmm0
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0xe0(%rsp),%xmm0
movsd  0xc0(%rsp),%xmm1
lea    0xcf3(%rip),%rdi
mov    $0x2,%al
call   1070 <printf@plt>
movsd  0xe8(%rsp),%xmm0
movsd  0xc8(%rsp),%xmm1
lea    0xd02(%rip),%rdi
mov    $0x2,%al
call   1070 <printf@plt>
movsd  0xf0(%rsp),%xmm0
movsd  0xd0(%rsp),%xmm1
lea    0xd11(%rip),%rdi
mov    $0x2,%al
call   1070 <printf@plt>
movsd  0xf8(%rsp),%xmm0
movsd  0xd8(%rsp),%xmm1
lea    0xd20(%rip),%rdi
mov    $0x2,%al
call   1070 <printf@plt>
lea    0x40(%rsp),%r8
lea    0x20(%rsp),%r9
mov    $0xf,%edi
mov    %r12,%rsi
mov    $0x3,%edx
mov    %r15,%rcx
call   1050 <zerohyp_multi@plt>
movsd  0x40(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
lea    0xd19(%rip),%rdi
mov    $0x2,%al
call   1070 <printf@plt>
movsd  0x48(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
lea    0xd24(%rip),%rdi
mov    $0x2,%al
call   1070 <printf@plt>
movsd  0x50(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
lea    0xd2f(%rip),%rdi
mov    $0x2,%al
call   1070 <printf@plt>
lea    0xddd(%rip),%rdi
call   1040 <puts@plt>
movsd  0x68(%rsp),%xmm1
movsd  0x78(%rsp),%xmm0
movapd %xmm1,%xmm2
divsd  %xmm0,%xmm2
movsd  0x88(%rsp),%xmm3
lea    0xd1d(%rip),%rdi
mov    $0x4,%al
call   1070 <printf@plt>
movsd  0x70(%rsp),%xmm1
movsd  0x80(%rsp),%xmm0
movapd %xmm1,%xmm2
divsd  %xmm0,%xmm2
lea    0xd34(%rip),%rdi
mov    $0x3,%al
call   1070 <printf@plt>
movsd  0x60(%rsp),%xmm1
movsd  0x78(%rsp),%xmm0
addsd  0x80(%rsp),%xmm0
lea    0xd3d(%rip),%rdi
mov    $0x2,%al
call   1070 <printf@plt>
movsd  0x90(%rsp),%xmm0
lea    0xd45(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
mov    %r14,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x2c8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"qr\00"
@__const.main.XX = [30 x double] [double 1.839000e+03, double 1.844000e+03, double 1.831000e+03, double 1.881000e+03, double 1.883000e+03, double 1.910000e+03, double 1.969000e+03, double 2.016000e+03, double 2.126000e+03, double 2.239000e+03, double 2.336000e+03, double 2.404000e+03, double 2.487000e+03, double 2.535000e+03, double 2.595000e+03, double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00, double 9.000000e+00, double 1.000000e+01, double 1.100000e+01, double 1.200000e+01, double 1.300000e+01, double 1.400000e+01, double 1.500000e+01]
@__const.main.YY = [15 x double] [double 1.673000e+03, double 1.688000e+03, double 1.666000e+03, double 1.735000e+03, double 1.749000e+03, double 1.756000e+03, double 1.815000e+03, double 1.867000e+03, double 1.948000e+03, double 2.048000e+03, double 2.128000e+03, double 2.165000e+03, double 2.257000e+03, double 2.316000e+03, double 2.324000e+03]
@.str.1 = [76 x i8] c"Estimates Regression Parameters : Beta1 = %lf ,Beta 2 = %lf ,Beta 3 = %lf \0A\00"
@.str.2 = [44 x i8] c"sigma2 = %lf , R^2 = %lf R^2 (Adj.) = %lf \0A\00"
@.str.3 = [26 x i8] c"Confidence Interval %lf \0A\00"
@.str.4 = [47 x i8] c"Beta1 : Lower Limit = %lf ,Upper Limit = %lf \0A\00"
@.str.5 = [47 x i8] c"Beta2 : Lower Limit = %lf ,Upper Limit = %lf \0A\00"
@.str.6 = [47 x i8] c"Beta3 : Lower Limit = %lf ,Upper Limit = %lf \0A\00"
@.str.7 = [50 x i8] c"Variance : Lower Limit = %lf ,Upper Limit = %lf \0A\00"
@.str.8 = [37 x i8] c"Beta1 : T Value = %g ,P Value = %g \0A\00"
@.str.9 = [37 x i8] c"Beta2 : T Value = %g ,P Value = %g \0A\00"
@.str.10 = [37 x i8] c"Beta3 : T Value = %g ,P Value = %g \0A\00"
@.str.11 = [12 x i8] c"\0A ANOVA : \0A\00"
@.str.12 = [60 x i8] c"Regression : df = %lf ,SS = %lf ,MSS = %lf ,F Stat = %lf \0A\00"
@.str.13 = [44 x i8] c"Residual : df = %lf ,SS = %lf ,MSS = %lf \0A\00"
@.str.14 = [31 x i8] c"Total : df = %lf ,SS = %lf \0A\00"
@.str.15 = [16 x i8] c"F pvalue = %g \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
%6 = alloca double*
%7 = alloca i8*
%8 = alloca [3 x double]
%9 = alloca [7 x double]
%10 = alloca [4 x double]
%11 = alloca [4 x double]
%12 = alloca [3 x double]
%13 = alloca [3 x double]
%14 = alloca [1 x double]
%15 = alloca [2 x double]
%16 = alloca [9 x double]
%17 = alloca [30 x double]
%18 = alloca [15 x double]
store i32 0, i32* %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %7
store i32 15, i32* %2
store i32 3, i32* %3
store i32 1, i32* %4
%19 = load i32, i32* %2
%20 = sext i32 %19 to i64
%21 = mul i64 8, %20
%22 = trunc i64 %21 to i32
%23 = call i64 @malloc(i32 %22)
%24 = inttoptr i64 %23 to double*
store double* %24, double** %6
%25 = bitcast [3 x double]* %8 to i8*
%26 = bitcast [7 x double]* %9 to i8*
%27 = bitcast [4 x double]* %10 to i8*
%28 = bitcast [4 x double]* %11 to i8*
%29 = bitcast [3 x double]* %12 to i8*
%30 = bitcast [3 x double]* %13 to i8*
%31 = bitcast [1 x double]* %14 to i8*
%32 = bitcast [2 x double]* %15 to i8*
%33 = bitcast [9 x double]* %16 to i8*
store double 5.000000e-02, double* %5
%34 = bitcast [30 x double]* %17 to i8*
%35 = bitcast [15 x double]* %18 to i8*
%36 = load i32, i32* %3
%37 = getelementptr inbounds [30 x double], [30 x double]* %17, i64 0, i64 0
%38 = getelementptr inbounds [15 x double], [15 x double]* %18, i64 0, i64 0
%39 = load i32, i32* %2
%40 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%41 = getelementptr inbounds [1 x double], [1 x double]* %14, i64 0, i64 0
%42 = getelementptr inbounds [9 x double], [9 x double]* %16, i64 0, i64 0
%43 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 0
%44 = load double*, double** %6
%45 = load double, double* %5
%46 = getelementptr inbounds [7 x double], [7 x double]* %9, i64 0, i64 0
%47 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 0
%48 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 0
%49 = load i8*, i8** %7
%50 = load i32, i32* %4
%51 = call i32 @linreg_multi(i32 %36, double* %37, double* %38, i32 %39, double* %40, double* %41, double* %42, double* %43, double* %44, double %45, double* %46, double* %47, double* %48, i8* %49, i32 %50)
%52 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%53 = load double, double* %52
%54 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 1
%55 = load double, double* %54
%56 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 2
%57 = load double, double* %56
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), double %53, double %55, double %57)
%59 = getelementptr inbounds [1 x double], [1 x double]* %14, i64 0, i64 0
%60 = load double, double* %59
%61 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 0
%62 = load double, double* %61
%63 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 1
%64 = load double, double* %63
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), double %60, double %62, double %64)
%66 = load double, double* %5
%67 = fsub double 1.000000e+00, %66
%68 = fmul double %67, 1.000000e+02
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), double %68)
%70 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 0
%71 = load double, double* %70
%72 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 0
%73 = load double, double* %72
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0), double %71, double %73)
%75 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 1
%76 = load double, double* %75
%77 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 1
%78 = load double, double* %77
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0), double %76, double %78)
%80 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 2
%81 = load double, double* %80
%82 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 2
%83 = load double, double* %82
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0), double %81, double %83)
%85 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 3
%86 = load double, double* %85
%87 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 3
%88 = load double, double* %87
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.7, i64 0, i64 0), double %86, double %88)
%90 = load i32, i32* %2
%91 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%92 = load i32, i32* %3
%93 = getelementptr inbounds [9 x double], [9 x double]* %16, i64 0, i64 0
%94 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 0
%95 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 0
%96 = call i32 @zerohyp_multi(i32 %90, double* %91, i32 %92, double* %93, double* %94, double* %95)
%97 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 0
%98 = load double, double* %97
%99 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 0
%100 = load double, double* %99
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0), double %98, double %100)
%102 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 1
%103 = load double, double* %102
%104 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 1
%105 = load double, double* %104
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0), double %103, double %105)
%107 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 2
%108 = load double, double* %107
%109 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 2
%110 = load double, double* %109
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0), double %108, double %110)
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
%113 = getelementptr inbounds [7 x double], [7 x double]* %9, i64 0, i64 3
%114 = load double, double* %113
%115 = getelementptr inbounds [7 x double], [7 x double]* %9, i64 0, i64 1
%116 = load double, double* %115
%117 = getelementptr inbounds [7 x double], [7 x double]* %9, i64 0, i64 1
%118 = load double, double* %117
%119 = getelementptr inbounds [7 x double], [7 x double]* %9, i64 0, i64 3
%120 = load double, double* %119
%121 = fdiv double %118, %120
%122 = getelementptr inbounds [7 x double], [7 x double]* %9, i64 0, i64 5
%123 = load double, double* %122
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.12, i64 0, i64 0), double %114, double %116, double %121, double %123)
%125 = getelementptr inbounds [7 x double], [7 x double]* %9, i64 0, i64 4
%126 = load double, double* %125
%127 = getelementptr inbounds [7 x double], [7 x double]* %9, i64 0, i64 2
%128 = load double, double* %127
%129 = getelementptr inbounds [7 x double], [7 x double]* %9, i64 0, i64 2
%130 = load double, double* %129
%131 = getelementptr inbounds [7 x double], [7 x double]* %9, i64 0, i64 4
%132 = load double, double* %131
%133 = fdiv double %130, %132
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.13, i64 0, i64 0), double %126, double %128, double %133)
%135 = getelementptr inbounds [7 x double], [7 x double]* %9, i64 0, i64 3
%136 = load double, double* %135
%137 = getelementptr inbounds [7 x double], [7 x double]* %9, i64 0, i64 4
%138 = load double, double* %137
%139 = fadd double %136, %138
%140 = getelementptr inbounds [7 x double], [7 x double]* %9, i64 0, i64 0
%141 = load double, double* %140
%142 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0), double %139, double %141)
%143 = getelementptr inbounds [7 x double], [7 x double]* %9, i64 0, i64 6
%144 = load double, double* %143
%145 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), double %144)
%146 = load double*, double** %6
%147 = call i32 @free(double* %146)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"qr\00"
@__const.main.XX = [30 x double] [double 1.839000e+03, double 1.844000e+03, double 1.831000e+03, double 1.881000e+03, double 1.883000e+03, double 1.910000e+03, double 1.969000e+03, double 2.016000e+03, double 2.126000e+03, double 2.239000e+03, double 2.336000e+03, double 2.404000e+03, double 2.487000e+03, double 2.535000e+03, double 2.595000e+03, double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00, double 9.000000e+00, double 1.000000e+01, double 1.100000e+01, double 1.200000e+01, double 1.300000e+01, double 1.400000e+01, double 1.500000e+01]
@__const.main.YY = [15 x double] [double 1.673000e+03, double 1.688000e+03, double 1.666000e+03, double 1.735000e+03, double 1.749000e+03, double 1.756000e+03, double 1.815000e+03, double 1.867000e+03, double 1.948000e+03, double 2.048000e+03, double 2.128000e+03, double 2.165000e+03, double 2.257000e+03, double 2.316000e+03, double 2.324000e+03]
@.str.1 = [76 x i8] c"Estimates Regression Parameters : Beta1 = %lf ,Beta 2 = %lf ,Beta 3 = %lf \0A\00"
@.str.2 = [44 x i8] c"sigma2 = %lf , R^2 = %lf R^2 (Adj.) = %lf \0A\00"
@.str.3 = [26 x i8] c"Confidence Interval %lf \0A\00"
@.str.4 = [47 x i8] c"Beta1 : Lower Limit = %lf ,Upper Limit = %lf \0A\00"
@.str.5 = [47 x i8] c"Beta2 : Lower Limit = %lf ,Upper Limit = %lf \0A\00"
@.str.6 = [47 x i8] c"Beta3 : Lower Limit = %lf ,Upper Limit = %lf \0A\00"
@.str.7 = [50 x i8] c"Variance : Lower Limit = %lf ,Upper Limit = %lf \0A\00"
@.str.8 = [37 x i8] c"Beta1 : T Value = %g ,P Value = %g \0A\00"
@.str.9 = [37 x i8] c"Beta2 : T Value = %g ,P Value = %g \0A\00"
@.str.10 = [37 x i8] c"Beta3 : T Value = %g ,P Value = %g \0A\00"
@.str.12 = [60 x i8] c"Regression : df = %lf ,SS = %lf ,MSS = %lf ,F Stat = %lf \0A\00"
@.str.13 = [44 x i8] c"Residual : df = %lf ,SS = %lf ,MSS = %lf \0A\00"
@.str.14 = [31 x i8] c"Total : df = %lf ,SS = %lf \0A\00"
@.str.15 = [16 x i8] c"F pvalue = %g \0A\00"
@str = [11 x i8] c"\0A ANOVA : \00"
define i32 @main() {
%1 = alloca [3 x double]
%2 = alloca [7 x double]
%3 = alloca [4 x double]
%4 = alloca [4 x double]
%5 = alloca [3 x double]
%6 = alloca [3 x double]
%7 = alloca [1 x double]
%8 = alloca [2 x double]
%9 = alloca [9 x double]
%10 = alloca [30 x double]
%11 = alloca [15 x double]
%12 = tail call i64 @malloc(i32 120)
%13 = inttoptr i64 %12 to double*
%14 = bitcast [3 x double]* %1 to i8*
%15 = bitcast [7 x double]* %2 to i8*
%16 = bitcast [4 x double]* %3 to i8*
%17 = bitcast [4 x double]* %4 to i8*
%18 = bitcast [3 x double]* %5 to i8*
%19 = bitcast [3 x double]* %6 to i8*
%20 = bitcast [1 x double]* %7 to i8*
%21 = bitcast [1 x double]* %7 to i64*
store i64 0, i64* %21
%22 = bitcast [2 x double]* %8 to i8*
%23 = bitcast [9 x double]* %9 to i8*
%24 = bitcast [30 x double]* %10 to i8*
%25 = bitcast [15 x double]* %11 to i8*
%26 = getelementptr inbounds [30 x double], [30 x double]* %10, i64 0, i64 0
%27 = getelementptr inbounds [15 x double], [15 x double]* %11, i64 0, i64 0
%28 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 0
%29 = getelementptr inbounds [1 x double], [1 x double]* %7, i64 0, i64 0
%30 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 0
%31 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 0
%32 = getelementptr inbounds [7 x double], [7 x double]* %2, i64 0, i64 0
%33 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%34 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%35 = call i32 @linreg_multi(i32 3, double* %26, double* %27, i32 15, double* %28, double* %29, double* %30, double* %31, double* %13, double 5.000000e-02, double* %32, double* %33, double* %34, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
%36 = load double, double* %28
%37 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 1
%38 = load double, double* %37
%39 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 2
%40 = load double, double* %39
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), double %36, double %38, double %40)
%42 = load double, double* %29
%43 = load double, double* %31
%44 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 1
%45 = load double, double* %44
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), double %42, double %43, double %45)
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), double 9.500000e+01)
%48 = load double, double* %33
%49 = load double, double* %34
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0), double %48, double %49)
%51 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 1
%52 = load double, double* %51
%53 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 1
%54 = load double, double* %53
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0), double %52, double %54)
%56 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 2
%57 = load double, double* %56
%58 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 2
%59 = load double, double* %58
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0), double %57, double %59)
%61 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 3
%62 = load double, double* %61
%63 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 3
%64 = load double, double* %63
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.7, i64 0, i64 0), double %62, double %64)
%66 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 0
%67 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 0
%68 = call i32 @zerohyp_multi(i32 15, double* %28, i32 3, double* %30, double* %66, double* %67)
%69 = load double, double* %66
%70 = load double, double* %67
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0), double %69, double %70)
%72 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 1
%73 = load double, double* %72
%74 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 1
%75 = load double, double* %74
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0), double %73, double %75)
%77 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 2
%78 = load double, double* %77
%79 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 2
%80 = load double, double* %79
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0), double %78, double %80)
%82 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%83 = getelementptr inbounds [7 x double], [7 x double]* %2, i64 0, i64 3
%84 = load double, double* %83
%85 = getelementptr inbounds [7 x double], [7 x double]* %2, i64 0, i64 1
%86 = load double, double* %85
%87 = fdiv double %86, %84
%88 = getelementptr inbounds [7 x double], [7 x double]* %2, i64 0, i64 5
%89 = load double, double* %88
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.12, i64 0, i64 0), double %84, double %86, double %87, double %89)
%91 = getelementptr inbounds [7 x double], [7 x double]* %2, i64 0, i64 4
%92 = load double, double* %91
%93 = getelementptr inbounds [7 x double], [7 x double]* %2, i64 0, i64 2
%94 = load double, double* %93
%95 = fdiv double %94, %92
%96 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.13, i64 0, i64 0), double %92, double %94, double %95)
%97 = load double, double* %83
%98 = load double, double* %91
%99 = fadd double %97, %98
%100 = load double, double* %32
%101 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0), double %99, double %100)
%102 = getelementptr inbounds [7 x double], [7 x double]* %2, i64 0, i64 6
%103 = load double, double* %102
%104 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), double %103)
%105 = call i32 @free(double* %13)
ret i32 0
}