#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 */
double exp(double);
scalar_t__ fabs(double);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ log(double);
double sqrt(double);
int /*<<< orphan*/ stderr;
int stat(double a[], int n, double *min, double *max, double *amp, double *sum,
         double *sum2, double *ave, double *gmean, double *hmean, double *amad,
         double *s, double *v, double *st, double *uv, double *squv, double *cv,
         double *sk, double *ku) {
  double dn, *p, sum3, sum4, w, w3;
  int flag, i;
  if (n < 2) {
    fprintf(stderr, "Error : n < 2  in stat()\n");
    return -1;
  }
  dn = (double)n;
  *min = *max = a[0];
  *sum = *sum2 = sum3 = sum4 = 0.;
  for (i = 0, p = a; i < n; i++, p++) {
    if (*min > *p)
      *min = *p;
    else if (*max < *p)
      *max = *p;
    *sum += *p;
    *sum2 += (w = *p * *p);
  }
  *amp = (*min + *max) / 2.;
  *ave = *sum / dn;
  for (i = 0, *amad = 0., p = a; i < n; i++, p++) {
    *amad += fabs(w = *p - *ave);
    sum3 += (w3 = w * w * w);
    sum4 += (w3 * w);
  }
  *amad /= dn;
  *v = *sum2 / dn - *ave * *ave;
  *s = *v * dn;
  *st = sqrt(*v);
  *uv = *s / (dn - 1.);
  *squv = sqrt(*uv);
  *cv = sqrt(*v) / *ave * 100.;
  *sk = sum3 / dn / *st / *st / *st;
  *ku = sum4 / dn / *v / *v;
  for (i = 0, p = a, flag = 0, *gmean = *hmean = 0.; i < n; i++, p++) {
    if (*p == 0.) {
      fprintf(stderr, "Warning : (data) = 0  in geometric & harmonic mean "
                      "calculation of stat()\n");
      flag = 1;
      break;
    }
    if (*p < 0.) {
      fprintf(
          stderr,
          "Warning : (data) < 0  in geometric mean calculation of stat()\n");
      flag = 1;
      break;
    }
    *gmean += log(*p);
    *hmean += 1. / *p;
  }
  if (flag) {
    *gmean = *hmean = 0.;
    return 1;
  }
  *gmean = exp(*gmean / dn);
  *hmean = dn / *hmean;
  return 0;
}


x86 assembly (clang, -O0):
<stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x70(%rbp),%rax
mov    0x68(%rbp),%rax
mov    0x60(%rbp),%rax
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    11ce <stat+0x7e>
mov    0x2e2c(%rip),%rax
mov    (%rax),%edi
lea    0xe5b(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1646 <stat+0x4f6>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x70(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    12da <stat+0x18a>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x48(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    125c <stat+0x10c>
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    128b <stat+0x13b>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1286 <stat+0x136>
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    128b <stat+0x13b>
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x48(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    0x10(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
mov    -0x48(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x48(%rbp)
jmp    1225 <stat+0xd5>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
addsd  (%rax),%xmm0
movsd  0xd0e(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
divsd  -0x40(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x0,-0x70(%rbp)
mov    0x30(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x70(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    13b8 <stat+0x268>
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x18(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
call   1030 <fabs@plt>
cvtsi2sd %rax,%xmm0
mov    0x30(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x60(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
mov    -0x48(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x48(%rbp)
jmp    132d <stat+0x1dd>
movsd  -0x40(%rbp),%xmm1
mov    0x30(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm1
divsd  -0x40(%rbp),%xmm1
mov    0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x18(%rbp),%rax
movsd  (%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x40(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x40(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0x40(%rbp),%xmm0
mov    0x38(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x40(%rbp),%rax
movsd  (%rax),%xmm0
call   1070 <sqrt@plt>
mov    0x48(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x38(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  0xbc0(%rip),%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    0x50(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x50(%rbp),%rax
movsd  (%rax),%xmm0
call   1070 <sqrt@plt>
mov    0x58(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x40(%rbp),%rax
movsd  (%rax),%xmm0
call   1070 <sqrt@plt>
mov    0x18(%rbp),%rax
divsd  (%rax),%xmm0
movsd  0xb76(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x60(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x50(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
mov    0x48(%rbp),%rax
divsd  (%rax),%xmm0
mov    0x48(%rbp),%rax
divsd  (%rax),%xmm0
mov    0x48(%rbp),%rax
divsd  (%rax),%xmm0
mov    0x68(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x58(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
mov    0x40(%rbp),%rax
divsd  (%rax),%xmm0
mov    0x40(%rbp),%rax
divsd  (%rax),%xmm0
mov    0x70(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x6c(%rbp)
mov    0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x70(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    15e4 <stat+0x494>
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    155e <stat+0x40e>
jp     155e <stat+0x40e>
mov    0x2a9c(%rip),%rax
mov    (%rax),%edi
lea    0xae5(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x6c(%rbp)
jmp    15e4 <stat+0x494>
mov    -0x48(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jbe    1590 <stat+0x440>
mov    0x2a6a(%rip),%rax
mov    (%rax),%edi
lea    0xafd(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x6c(%rbp)
jmp    15e4 <stat+0x494>
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm0
call   1060 <log@plt>
cvtsi2sd %rax,%xmm0
mov    0x20(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x48(%rbp),%rax
movsd  0xa56(%rip),%xmm0
divsd  (%rax),%xmm0
mov    0x28(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
mov    -0x48(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x48(%rbp)
jmp    1516 <stat+0x3c6>
cmpl   $0x0,-0x6c(%rbp)
je     1610 <stat+0x4c0>
mov    0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1646 <stat+0x4f6>
mov    0x20(%rbp),%rax
movsd  (%rax),%xmm0
divsd  -0x40(%rbp),%xmm0
call   1050 <exp@plt>
mov    0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x40(%rbp),%xmm0
mov    0x28(%rbp),%rax
divsd  (%rax),%xmm0
mov    0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stat>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
cmp    $0x1,%esi
jg     1182 <stat+0x32>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xffffffff,%eax
jmp    1516 <stat+0x3c6>
mov    %rdi,%rbx
mov    0x80(%rsp),%r14
mov    0x68(%rsp),%rbp
mov    0x60(%rsp),%r12
mov    %esi,%r13d
cvtsi2sd %esi,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rdi),%xmm0
movsd  %xmm0,(%rcx)
movsd  %xmm0,(%rdx)
movq   $0x0,(%r12)
movq   $0x0,(%r9)
xor    %eax,%eax
jmp    1201 <stat+0xb1>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  %xmm0,(%rsi)
movsd  (%rbx,%rax,8),%xmm0
addsd  (%r9),%xmm0
movsd  %xmm0,(%r9)
movsd  (%rbx,%rax,8),%xmm0
mulsd  %xmm0,%xmm0
addsd  (%r12),%xmm0
movsd  %xmm0,(%r12)
add    $0x1,%rax
cmp    %eax,%r13d
je     121e <stat+0xce>
movsd  (%rdx),%xmm1
movsd  (%rbx,%rax,8),%xmm0
ucomisd %xmm0,%xmm1
mov    %rdx,%rsi
ja     11d0 <stat+0x80>
ucomisd (%rcx),%xmm0
mov    %rcx,%rsi
ja     11d0 <stat+0x80>
jmp    11d4 <stat+0x84>
movsd  (%rdx),%xmm0
addsd  (%rcx),%xmm0
mulsd  0xdd2(%rip),%xmm0
movsd  %xmm0,(%r8)
movsd  (%r9),%xmm0
divsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x0(%rbp)
movq   $0x0,(%r14)
xorpd  %xmm0,%xmm0
xorpd  %xmm4,%xmm4
xorpd  %xmm3,%xmm3
test   %r13d,%r13d
jle    12d7 <stat+0x187>
xorpd  %xmm3,%xmm3
xor    %r15d,%r15d
xorpd  %xmm4,%xmm4
cs nopw 0x0(%rax,%rax,1)
movsd  %xmm4,0x10(%rsp)
movsd  %xmm3,0x18(%rsp)
movsd  (%rbx,%r15,8),%xmm0
subsd  0x0(%rbp),%xmm0
movsd  %xmm0,0x20(%rsp)
call   1030 <fabs@plt>
movsd  0x10(%rsp),%xmm4
movsd  0x18(%rsp),%xmm3
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%r14),%xmm0
movsd  %xmm0,(%r14)
movsd  0x20(%rsp),%xmm2
movapd %xmm2,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm4
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm3
add    $0x1,%r15
cmp    %r15d,%r13d
jne    1270 <stat+0x120>
movsd  0x8(%rsp),%xmm2
divsd  %xmm2,%xmm0
movsd  %xmm0,(%r14)
movsd  (%r12),%xmm0
divsd  %xmm2,%xmm0
movsd  0x0(%rbp),%xmm1
mulsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
mov    0x90(%rsp),%r15
movsd  %xmm0,(%r15)
mulsd  %xmm2,%xmm0
mov    0x88(%rsp),%rdx
movsd  %xmm0,(%rdx)
movsd  (%r15),%xmm0
ucomisd 0xcf9(%rip),%xmm0
movsd  %xmm3,0x18(%rsp)
movsd  %xmm4,0x10(%rsp)
jb     133b <stat+0x1eb>
sqrtsd %xmm0,%xmm0
jmp    1348 <stat+0x1f8>
call   1070 <sqrt@plt>
mov    0x88(%rsp),%rdx
mov    0x78(%rsp),%r12
mov    0x70(%rsp),%r14
mov    0xa0(%rsp),%rcx
mov    0x98(%rsp),%rax
movsd  %xmm0,(%rax)
movsd  (%rdx),%xmm0
movsd  0xc96(%rip),%xmm1
addsd  0x8(%rsp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rcx)
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1390 <stat+0x240>
sqrtsd %xmm0,%xmm0
jmp    1399 <stat+0x249>
call   1070 <sqrt@plt>
xorpd  %xmm1,%xmm1
mov    0xa8(%rsp),%rax
movsd  %xmm0,(%rax)
movsd  (%r15),%xmm0
ucomisd %xmm1,%xmm0
jb     13b6 <stat+0x266>
sqrtsd %xmm0,%xmm0
jmp    13bb <stat+0x26b>
call   1070 <sqrt@plt>
mov    0xc0(%rsp),%rax
mov    0xb8(%rsp),%rcx
mov    0xb0(%rsp),%rdx
movsd  0x18(%rsp),%xmm2
movsd  0x10(%rsp),%xmm3
divsd  0x0(%rbp),%xmm0
mulsd  0xc24(%rip),%xmm0
movsd  %xmm0,(%rdx)
movsd  0x8(%rsp),%xmm1
divsd  %xmm1,%xmm3
mov    0x98(%rsp),%rdx
movsd  (%rdx),%xmm0
divsd  %xmm0,%xmm3
divsd  %xmm0,%xmm3
divsd  %xmm0,%xmm3
movsd  %xmm3,(%rcx)
divsd  %xmm1,%xmm2
movsd  (%r15),%xmm0
divsd  %xmm0,%xmm2
divsd  %xmm0,%xmm2
movsd  %xmm2,(%rax)
movq   $0x0,(%r12)
movq   $0x0,(%r14)
test   %r13d,%r13d
jle    14bf <stat+0x36f>
xor    %ebp,%ebp
lea    0xbf6(%rip),%r14
xorpd  %xmm1,%xmm1
lea    0xc35(%rip),%r15
nopw   0x0(%rax,%rax,1)
movsd  (%rbx,%rbp,8),%xmm0
ucomisd %xmm1,%xmm0
jne    146d <stat+0x31d>
jnp    14ec <stat+0x39c>
ucomisd %xmm0,%xmm1
ja     14e9 <stat+0x399>
call   1060 <log@plt>
xorpd  %xmm1,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mov    0x70(%rsp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  0xb7f(%rip),%xmm0
divsd  (%rbx,%rbp,8),%xmm0
addsd  (%r12),%xmm0
movsd  %xmm0,(%r12)
add    $0x1,%rbp
cmp    %ebp,%r13d
jne    1460 <stat+0x310>
mov    0x70(%rsp),%r14
movsd  (%r14),%xmm0
jmp    14c3 <stat+0x373>
xorpd  %xmm0,%xmm0
divsd  0x8(%rsp),%xmm0
call   1050 <exp@plt>
movsd  %xmm0,(%r14)
movsd  0x8(%rsp),%xmm0
divsd  (%r12),%xmm0
movsd  %xmm0,(%r12)
xor    %eax,%eax
jmp    1516 <stat+0x3c6>
mov    %r15,%r14
mov    0x2aed(%rip),%rax
mov    (%rax),%edi
mov    %r14,%rsi
call   1040 <fprintf@plt>
movq   $0x0,(%r12)
mov    0x70(%rsp),%rax
movq   $0x0,(%rax)
mov    $0x1,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"Error : n < 2 in stat()\0A\00"
@.str.1 = [74 x i8] c"Warning : (data) = 0 in geometric & harmonic mean calculation of stat()\0A\00"
@.str.2 = [63 x i8] c"Warning : (data) < 0 in geometric mean calculation of stat()\0A\00"
define i32 @stat(double* %0, i32 %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7, double* %8, double* %9, double* %10, double* %11, double* %12, double* %13, double* %14, double* %15, double* %16, double* %17, double* %18) {
%20 = alloca i32
%21 = alloca double*
%22 = alloca i32
%23 = alloca double*
%24 = alloca double*
%25 = alloca double*
%26 = alloca double*
%27 = alloca double*
%28 = alloca double*
%29 = alloca double*
%30 = alloca double*
%31 = alloca double*
%32 = alloca double*
%33 = alloca double*
%34 = alloca double*
%35 = alloca double*
%36 = alloca double*
%37 = alloca double*
%38 = alloca double*
%39 = alloca double*
%40 = alloca double
%41 = alloca double*
%42 = alloca double
%43 = alloca double
%44 = alloca double
%45 = alloca double
%46 = alloca i32
%47 = alloca i32
store double* %0, double** %21
store i32 %1, i32* %22
store double* %2, double** %23
store double* %3, double** %24
store double* %4, double** %25
store double* %5, double** %26
store double* %6, double** %27
store double* %7, double** %28
store double* %8, double** %29
store double* %9, double** %30
store double* %10, double** %31
store double* %11, double** %32
store double* %12, double** %33
store double* %13, double** %34
store double* %14, double** %35
store double* %15, double** %36
store double* %16, double** %37
store double* %17, double** %38
store double* %18, double** %39
%48 = load i32, i32* %22
%49 = icmp slt i32 %48, 2
br i1 %49, label %50, label %53
50: ; preds = %19
%51 = load i32, i32* @stderr
%52 = call i32 @fprintf(i32 %51, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %20
br label %278
53: ; preds = %19
%54 = load i32, i32* %22
%55 = sitofp i32 %54 to double
store double %55, double* %40
%56 = load double*, double** %21
%57 = getelementptr inbounds double, double* %56, i64 0
%58 = load double, double* %57
%59 = load double*, double** %24
store double %58, double* %59
%60 = load double*, double** %23
store double %58, double* %60
store double 0.000000e+00, double* %43
store double 0.000000e+00, double* %42
%61 = load double*, double** %27
store double 0.000000e+00, double* %61
%62 = load double*, double** %26
store double 0.000000e+00, double* %62
store i32 0, i32* %47
%63 = load double*, double** %21
store double* %63, double** %41
br label %64
64: ; preds = %103, %53
%65 = load i32, i32* %47
%66 = load i32, i32* %22
%67 = icmp slt i32 %65, %66
br i1 %67, label %68, label %108
68: ; preds = %64
%69 = load double*, double** %23
%70 = load double, double* %69
%71 = load double*, double** %41
%72 = load double, double* %71
%73 = fcmp ogt double %70, %72
br i1 %73, label %74, label %78
74: ; preds = %68
%75 = load double*, double** %41
%76 = load double, double* %75
%77 = load double*, double** %23
store double %76, double* %77
br label %89
78: ; preds = %68
%79 = load double*, double** %24
%80 = load double, double* %79
%81 = load double*, double** %41
%82 = load double, double* %81
%83 = fcmp olt double %80, %82
br i1 %83, label %84, label %88
84: ; preds = %78
%85 = load double*, double** %41
%86 = load double, double* %85
%87 = load double*, double** %24
store double %86, double* %87
br label %88
88: ; preds = %84, %78
br label %89
89: ; preds = %88, %74
%90 = load double*, double** %41
%91 = load double, double* %90
%92 = load double*, double** %26
%93 = load double, double* %92
%94 = fadd double %93, %91
store double %94, double* %92
%95 = load double*, double** %41
%96 = load double, double* %95
%97 = load double*, double** %41
%98 = load double, double* %97
%99 = fmul double %96, %98
store double %99, double* %44
%100 = load double*, double** %27
%101 = load double, double* %100
%102 = fadd double %101, %99
store double %102, double* %100
br label %103
103: ; preds = %89
%104 = load i32, i32* %47
%105 = add nsw i32 %104, 1
store i32 %105, i32* %47
%106 = load double*, double** %41
%107 = getelementptr inbounds double, double* %106, i32 1
store double* %107, double** %41
br label %64
108: ; preds = %64
%109 = load double*, double** %23
%110 = load double, double* %109
%111 = load double*, double** %24
%112 = load double, double* %111
%113 = fadd double %110, %112
%114 = fdiv double %113, 2.000000e+00
%115 = load double*, double** %25
store double %114, double* %115
%116 = load double*, double** %26
%117 = load double, double* %116
%118 = load double, double* %40
%119 = fdiv double %117, %118
%120 = load double*, double** %28
store double %119, double* %120
store i32 0, i32* %47
%121 = load double*, double** %31
store double 0.000000e+00, double* %121
%122 = load double*, double** %21
store double* %122, double** %41
br label %123
123: ; preds = %149, %108
%124 = load i32, i32* %47
%125 = load i32, i32* %22
%126 = icmp slt i32 %124, %125
br i1 %126, label %127, label %154
127: ; preds = %123
%128 = load double*, double** %41
%129 = load double, double* %128
%130 = load double*, double** %28
%131 = load double, double* %130
%132 = fsub double %129, %131
store double %132, double* %44
%133 = call i64 @fabs(double %132)
%134 = sitofp i64 %133 to double
%135 = load double*, double** %31
%136 = load double, double* %135
%137 = fadd double %136, %134
store double %137, double* %135
%138 = load double, double* %44
%139 = load double, double* %44
%140 = fmul double %138, %139
%141 = load double, double* %44
%142 = fmul double %140, %141
store double %142, double* %45
%143 = load double, double* %42
%144 = fadd double %143, %142
store double %144, double* %42
%145 = load double, double* %45
%146 = load double, double* %44
%147 = load double, double* %43
%148 = call double @llvm.fmuladd.f64(double %145, double %146, double %147)
store double %148, double* %43
br label %149
149: ; preds = %127
%150 = load i32, i32* %47
%151 = add nsw i32 %150, 1
store i32 %151, i32* %47
%152 = load double*, double** %41
%153 = getelementptr inbounds double, double* %152, i32 1
store double* %153, double** %41
br label %123
154: ; preds = %123
%155 = load double, double* %40
%156 = load double*, double** %31
%157 = load double, double* %156
%158 = fdiv double %157, %155
store double %158, double* %156
%159 = load double*, double** %27
%160 = load double, double* %159
%161 = load double, double* %40
%162 = fdiv double %160, %161
%163 = load double*, double** %28
%164 = load double, double* %163
%165 = load double*, double** %28
%166 = load double, double* %165
%167 = fneg double %164
%168 = call double @llvm.fmuladd.f64(double %167, double %166, double %162)
%169 = load double*, double** %33
store double %168, double* %169
%170 = load double*, double** %33
%171 = load double, double* %170
%172 = load double, double* %40
%173 = fmul double %171, %172
%174 = load double*, double** %32
store double %173, double* %174
%175 = load double*, double** %33
%176 = load double, double* %175
%177 = call double @sqrt(double %176)
%178 = load double*, double** %34
store double %177, double* %178
%179 = load double*, double** %32
%180 = load double, double* %179
%181 = load double, double* %40
%182 = fsub double %181, 1.000000e+00
%183 = fdiv double %180, %182
%184 = load double*, double** %35
store double %183, double* %184
%185 = load double*, double** %35
%186 = load double, double* %185
%187 = call double @sqrt(double %186)
%188 = load double*, double** %36
store double %187, double* %188
%189 = load double*, double** %33
%190 = load double, double* %189
%191 = call double @sqrt(double %190)
%192 = load double*, double** %28
%193 = load double, double* %192
%194 = fdiv double %191, %193
%195 = fmul double %194, 1.000000e+02
%196 = load double*, double** %37
store double %195, double* %196
%197 = load double, double* %42
%198 = load double, double* %40
%199 = fdiv double %197, %198
%200 = load double*, double** %34
%201 = load double, double* %200
%202 = fdiv double %199, %201
%203 = load double*, double** %34
%204 = load double, double* %203
%205 = fdiv double %202, %204
%206 = load double*, double** %34
%207 = load double, double* %206
%208 = fdiv double %205, %207
%209 = load double*, double** %38
store double %208, double* %209
%210 = load double, double* %43
%211 = load double, double* %40
%212 = fdiv double %210, %211
%213 = load double*, double** %33
%214 = load double, double* %213
%215 = fdiv double %212, %214
%216 = load double*, double** %33
%217 = load double, double* %216
%218 = fdiv double %215, %217
%219 = load double*, double** %39
store double %218, double* %219
store i32 0, i32* %47
%220 = load double*, double** %21
store double* %220, double** %41
store i32 0, i32* %46
%221 = load double*, double** %30
store double 0.000000e+00, double* %221
%222 = load double*, double** %29
store double 0.000000e+00, double* %222
br label %223
223: ; preds = %255, %154
%224 = load i32, i32* %47
%225 = load i32, i32* %22
%226 = icmp slt i32 %224, %225
br i1 %226, label %227, label %260
227: ; preds = %223
%228 = load double*, double** %41
%229 = load double, double* %228
%230 = fcmp oeq double %229, 0.000000e+00
br i1 %230, label %231, label %234
231: ; preds = %227
%232 = load i32, i32* @stderr
%233 = call i32 @fprintf(i32 %232, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %46
br label %260
234: ; preds = %227
%235 = load double*, double** %41
%236 = load double, double* %235
%237 = fcmp olt double %236, 0.000000e+00
br i1 %237, label %238, label %241
238: ; preds = %234
%239 = load i32, i32* @stderr
%240 = call i32 @fprintf(i32 %239, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %46
br label %260
241: ; preds = %234
%242 = load double*, double** %41
%243 = load double, double* %242
%244 = call i64 @log(double %243)
%245 = sitofp i64 %244 to double
%246 = load double*, double** %29
%247 = load double, double* %246
%248 = fadd double %247, %245
store double %248, double* %246
%249 = load double*, double** %41
%250 = load double, double* %249
%251 = fdiv double 1.000000e+00, %250
%252 = load double*, double** %30
%253 = load double, double* %252
%254 = fadd double %253, %251
store double %254, double* %252
br label %255
255: ; preds = %241
%256 = load i32, i32* %47
%257 = add nsw i32 %256, 1
store i32 %257, i32* %47
%258 = load double*, double** %41
%259 = getelementptr inbounds double, double* %258, i32 1
store double* %259, double** %41
br label %223
260: ; preds = %238, %231, %223
%261 = load i32, i32* %46
%262 = icmp ne i32 %261, 0
br i1 %262, label %263, label %266
263: ; preds = %260
%264 = load double*, double** %30
store double 0.000000e+00, double* %264
%265 = load double*, double** %29
store double 0.000000e+00, double* %265
store i32 1, i32* %20
br label %278
266: ; preds = %260
%267 = load double*, double** %29
%268 = load double, double* %267
%269 = load double, double* %40
%270 = fdiv double %268, %269
%271 = call double @exp(double %270)
%272 = load double*, double** %29
store double %271, double* %272
%273 = load double, double* %40
%274 = load double*, double** %30
%275 = load double, double* %274
%276 = fdiv double %273, %275
%277 = load double*, double** %30
store double %276, double* %277
store i32 0, i32* %20
br label %278
278: ; preds = %266, %263, %50
%279 = load i32, i32* %20
ret i32 %279
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"Error : n < 2 in stat()\0A\00"
@.str.1 = [74 x i8] c"Warning : (data) = 0 in geometric & harmonic mean calculation of stat()\0A\00"
@.str.2 = [63 x i8] c"Warning : (data) < 0 in geometric mean calculation of stat()\0A\00"
define i32 @stat(double* nocapture %0, i32 %1, double* nocapture %2, double* nocapture %3, double* nocapture writeonly %4, double* nocapture %5, double* nocapture %6, double* nocapture %7, double* nocapture %8, double* nocapture %9, double* nocapture %10, double* nocapture %11, double* nocapture %12, double* nocapture %13, double* nocapture writeonly %14, double* nocapture writeonly %15, double* nocapture writeonly %16, double* nocapture writeonly %17, double* nocapture writeonly %18) {
%20 = icmp slt i32 %1, 2
br i1 %20, label %21, label %24
21: ; preds = %19
%22 = load i32, i32* @stderr
%23 = tail call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %138
24: ; preds = %19
%25 = sitofp i32 %1 to double
%26 = load double, double* %0
store double %26, double* %3
store double %26, double* %2
store double 0.000000e+00, double* %6
store double 0.000000e+00, double* %5
br label %27
27: ; preds = %24, %38
%28 = phi i32 [ %46, %38 ], [ 0, %24 ]
%29 = phi double* [ %47, %38 ], [ %0, %24 ]
%30 = load double, double* %2
%31 = load double, double* %29
%32 = fcmp ogt double %30, %31
br i1 %32, label %36, label %33
33: ; preds = %27
%34 = load double, double* %3
%35 = fcmp olt double %34, %31
br i1 %35, label %36, label %38
36: ; preds = %33, %27
%37 = phi double* [ %2, %27 ], [ %3, %33 ]
store double %31, double* %37
br label %38
38: ; preds = %36, %33
%39 = load double, double* %29
%40 = load double, double* %5
%41 = fadd double %39, %40
store double %41, double* %5
%42 = load double, double* %29
%43 = fmul double %42, %42
%44 = load double, double* %6
%45 = fadd double %44, %43
store double %45, double* %6
%46 = add nuw nsw i32 %28, 1
%47 = getelementptr inbounds double, double* %29, i64 1
%48 = icmp eq i32 %46, %1
br i1 %48, label %49, label %27
49: ; preds = %38
%50 = load double, double* %2
%51 = load double, double* %3
%52 = fadd double %50, %51
%53 = fmul double %52, 5.000000e-01
store double %53, double* %4
%54 = load double, double* %5
%55 = fdiv double %54, %25
store double %55, double* %7
store double 0.000000e+00, double* %10
%56 = icmp sgt i32 %1, 0
br i1 %56, label %57, label %76
57: ; preds = %49, %57
%58 = phi i32 [ %73, %57 ], [ 0, %49 ]
%59 = phi double [ %72, %57 ], [ 0.000000e+00, %49 ]
%60 = phi double [ %71, %57 ], [ 0.000000e+00, %49 ]
%61 = phi double* [ %74, %57 ], [ %0, %49 ]
%62 = load double, double* %61
%63 = load double, double* %7
%64 = fsub double %62, %63
%65 = tail call i64 @fabs(double %64)
%66 = sitofp i64 %65 to double
%67 = load double, double* %10
%68 = fadd double %67, %66
store double %68, double* %10
%69 = fmul double %64, %64
%70 = fmul double %64, %69
%71 = fadd double %60, %70
%72 = tail call double @llvm.fmuladd.f64(double %70, double %64, double %59)
%73 = add nuw nsw i32 %58, 1
%74 = getelementptr inbounds double, double* %61, i64 1
%75 = icmp eq i32 %73, %1
br i1 %75, label %76, label %57
76: ; preds = %57, %49
%77 = phi double [ 0.000000e+00, %49 ], [ %68, %57 ]
%78 = phi double [ 0.000000e+00, %49 ], [ %71, %57 ]
%79 = phi double [ 0.000000e+00, %49 ], [ %72, %57 ]
%80 = fdiv double %77, %25
store double %80, double* %10
%81 = load double, double* %6
%82 = fdiv double %81, %25
%83 = load double, double* %7
%84 = fneg double %83
%85 = tail call double @llvm.fmuladd.f64(double %84, double %83, double %82)
store double %85, double* %12
%86 = fmul double %85, %25
store double %86, double* %11
%87 = load double, double* %12
%88 = tail call double @sqrt(double %87)
store double %88, double* %13
%89 = load double, double* %11
%90 = fadd double %25, -1.000000e+00
%91 = fdiv double %89, %90
store double %91, double* %14
%92 = tail call double @sqrt(double %91)
store double %92, double* %15
%93 = load double, double* %12
%94 = tail call double @sqrt(double %93)
%95 = load double, double* %7
%96 = fdiv double %94, %95
%97 = fmul double %96, 1.000000e+02
store double %97, double* %16
%98 = fdiv double %78, %25
%99 = load double, double* %13
%100 = fdiv double %98, %99
%101 = fdiv double %100, %99
%102 = fdiv double %101, %99
store double %102, double* %17
%103 = fdiv double %79, %25
%104 = load double, double* %12
%105 = fdiv double %103, %104
%106 = fdiv double %105, %104
store double %106, double* %18
store double 0.000000e+00, double* %9
store double 0.000000e+00, double* %8
br i1 %56, label %107, label %132
107: ; preds = %76, %114
%108 = phi i32 [ %123, %114 ], [ 0, %76 ]
%109 = phi double* [ %124, %114 ], [ %0, %76 ]
%110 = load double, double* %109
%111 = fcmp oeq double %110, 0.000000e+00
br i1 %111, label %126, label %112
112: ; preds = %107
%113 = fcmp olt double %110, 0.000000e+00
br i1 %113, label %126, label %114
114: ; preds = %112
%115 = tail call i64 @log(double %110)
%116 = sitofp i64 %115 to double
%117 = load double, double* %8
%118 = fadd double %117, %116
store double %118, double* %8
%119 = load double, double* %109
%120 = fdiv double 1.000000e+00, %119
%121 = load double, double* %9
%122 = fadd double %121, %120
store double %122, double* %9
%123 = add nuw nsw i32 %108, 1
%124 = getelementptr inbounds double, double* %109, i64 1
%125 = icmp eq i32 %123, %1
br i1 %125, label %130, label %107
126: ; preds = %112, %107
%127 = phi i8* [ getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0), %107 ], [ getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0), %112 ]
%128 = load i32, i32* @stderr
%129 = tail call i32 @fprintf(i32 %128, i8* %127)
store double 0.000000e+00, double* %9
store double 0.000000e+00, double* %8
br label %138
130: ; preds = %114
%131 = load double, double* %8
br label %132
132: ; preds = %130, %76
%133 = phi double [ %131, %130 ], [ 0.000000e+00, %76 ]
%134 = fdiv double %133, %25
%135 = tail call double @exp(double %134)
store double %135, double* %8
%136 = load double, double* %9
%137 = fdiv double %25, %136
store double %137, double* %9
br label %138
138: ; preds = %132, %126, %21
%139 = phi i32 [ -1, %21 ], [ 1, %126 ], [ 0, %132 ]
ret i32 %139
}