#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 */
typedef int /*<<< orphan*/ indices;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
double RAND_MAX;
double fabs(double);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
scalar_t__ malloc(int);
double mean(double *, int);
int /*<<< orphan*/ printf(char *, double, ...);
scalar_t__ rand();
double var(double *, int);
int main() {
  int i, j;
  int indices[] = {10, 24, 76, 109, 145, 180, 198};
  double *x, *means, *vars, *fracs;
  x = (double *)malloc(200 * sizeof(double));
  for (i = 0; i < 200; i++) {
    x[i] = (double)rand() / RAND_MAX;
  }
  printf("Ave  global : %f\nVar  global : %f\nSize global : %d\n", mean(x, 200),
         var(x, 200), 200);
  int partitions_n = sizeof(indices) / sizeof(*indices) + 1;
  int *sizes, *firsts, *lasts;
  sizes = (int *)malloc(partitions_n * sizeof(int));
  firsts = (int *)malloc(partitions_n * sizeof(int));
  lasts = (int *)malloc(partitions_n * sizeof(int));
  double **partitions;
  partitions = (double **)malloc(partitions_n * sizeof(double *));
  means = (double *)malloc(partitions_n * sizeof(double));
  vars = (double *)malloc(partitions_n * sizeof(double));
  fracs = (double *)malloc(partitions_n * sizeof(double));
  sizes[0] = indices[0];
  firsts[0] = 0;
  lasts[0] = indices[0] - 1;
  for (i = 1; i < partitions_n - 1; i++) {
    sizes[i] = indices[i] - indices[i - 1];
    firsts[i] = indices[i - 1];
    lasts[i] = indices[i] - 1;
  }
  sizes[partitions_n - 1] = 200 - indices[partitions_n - 2];
  firsts[partitions_n - 1] = indices[partitions_n - 2];
  lasts[partitions_n - 1] = 200 - 1;
  for (i = 0; i < partitions_n; i++) {
    partitions[i] = (double *)malloc(sizes[i] * sizeof(double));
    for (j = 0; j < sizes[i]; j++) {
      partitions[i][j] = x[j + ((i == 0) ? 0 : indices[i - 1])];
    }
    means[i] = mean(partitions[i], sizes[i]);
    vars[i] = var(partitions[i], sizes[i]);
    fracs[i] = (double)sizes[i] / 200;
  }
  printf("\n\nPartitions number : %d\n", partitions_n);
  for (i = 0; i < partitions_n; i++) {
    printf("%2d    %2d   %3d - %3d   %7.6f   %f    %4.3f\n", i, sizes[i],
           firsts[i], lasts[i], means[i], vars[i], fracs[i]);
  }
  double tot_var = 0;
  for (i = 0; i < partitions_n; i++) {
    tot_var +=
        vars[i] * fracs[i] + means[i] * means[i] * (1 - fracs[i]) * fracs[i];
    for (j = 0; j <= i - 1 && i > 0; j++) {
      tot_var -= 2 * means[i] * fracs[i] * means[j] * fracs[j];
    }
  }
  printf("\nCompare %f vs %f diff %f\n", var(x, 200), tot_var,
         fabs(var(x, 200) - tot_var));
  FILE *debug = fopen("pd.txt", "w");
  fprintf(debug, "full buffer\n");
  for (i = 0; i < 200; i++)
    fprintf(debug, "%3.3f%c", x[i], ((i + 1) % 10) ? ' ' : '\n');
  fprintf(debug, "\n");
  for (i = 0; i < partitions_n; i++) {
    fprintf(debug, "\npartitions # %d size %d\n", i + 1, sizes[i]);
    for (j = 0; j < sizes[i]; j++) {
      fprintf(debug, "%3.3f ", partitions[i][j]);
    }
    fprintf(debug, "\n");
  }
  fclose(debug);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xe97(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe94(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe91(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe8f(%rip),%eax
mov    %eax,-0x18(%rbp)
mov    $0x640,%edi
call   1070 <malloc@plt>
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xc8,-0x8(%rbp)
jge    1210 <main+0x90>
mov    $0x0,%al
call   10a0 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2df7(%rip),%rax
divsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11d1 <main+0x51>
mov    -0x38(%rbp),%rdi
mov    $0xc8,%esi
call   1090 <mean@plt>
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x38(%rbp),%rdi
mov    $0xc8,%esi
call   1050 <var@plt>
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
lea    0xe06(%rip),%rdi
mov    $0xc8,%esi
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x8,-0x54(%rbp)
movslq -0x54(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x60(%rbp)
movslq -0x54(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x68(%rbp)
movslq -0x54(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x70(%rbp)
movslq -0x54(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x78(%rbp)
movslq -0x54(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x40(%rbp)
movslq -0x54(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x48(%rbp)
movslq -0x54(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x50(%rbp)
mov    -0x30(%rbp),%ecx
mov    -0x60(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x68(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x30(%rbp),%ecx
sub    $0x1,%ecx
mov    -0x70(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x54(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    136f <main+0x1ef>
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edx
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
sub    -0x30(%rbp,%rax,4),%edx
mov    -0x60(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x30(%rbp,%rax,4),%edx
mov    -0x68(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edx
sub    $0x1,%edx
mov    -0x70(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1304 <main+0x184>
mov    -0x54(%rbp),%eax
sub    $0x2,%eax
cltq
mov    $0xc8,%edx
sub    -0x30(%rbp,%rax,4),%edx
mov    -0x60(%rbp),%rax
mov    -0x54(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x54(%rbp),%eax
sub    $0x2,%eax
cltq
mov    -0x30(%rbp,%rax,4),%edx
mov    -0x68(%rbp),%rax
mov    -0x54(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x70(%rbp),%rax
mov    -0x54(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movl   $0xc7,(%rax,%rcx,4)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    1517 <main+0x397>
mov    -0x60(%rbp),%rax
movslq -0x8(%rbp),%rcx
movslq (%rax,%rcx,4),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0x78(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x60(%rbp),%rcx
movslq -0x8(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jge    1491 <main+0x311>
mov    -0x38(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x94(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    143f <main+0x2bf>
xor    %eax,%eax
mov    %eax,-0xa4(%rbp)
jmp    1451 <main+0x2d1>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x30(%rbp,%rax,4),%eax
mov    %eax,-0xa4(%rbp)
mov    -0xa0(%rbp),%rax
mov    -0x94(%rbp),%ecx
mov    -0xa4(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x78(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0xc(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1400 <main+0x280>
mov    -0x78(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x60(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1090 <mean@plt>
mov    -0x40(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x78(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x60(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1050 <var@plt>
mov    -0x48(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%rax
movslq -0x8(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  0xb28(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x50(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    13c7 <main+0x247>
cvtsi2sdl -0x54(%rbp),%xmm0
lea    0xb5d(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    15a6 <main+0x426>
cvtsi2sdl -0x8(%rbp),%xmm0
mov    -0x60(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x68(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x70(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
mov    -0x40(%rbp),%rax
movslq -0x8(%rbp),%rdi
movsd  (%rax,%rdi,8),%xmm1
mov    -0x48(%rbp),%rax
movslq -0x8(%rbp),%rdi
movsd  (%rax,%rdi,8),%xmm2
mov    -0x50(%rbp),%rax
movslq -0x8(%rbp),%rdi
movsd  (%rax,%rdi,8),%xmm3
lea    0xb09(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1531 <main+0x3b1>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    16f3 <main+0x573>
mov    -0x48(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x40(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x40(%rbp),%rax
movslq -0x8(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mov    -0x50(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsd  0xa0b(%rip),%xmm3
subsd  (%rax,%rcx,8),%xmm3
mulsd  %xmm3,%xmm1
mov    -0x50(%rbp),%rax
movslq -0x8(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%edx
sub    $0x1,%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0xa5(%rbp)
jg     165a <main+0x4da>
cmpl   $0x0,-0x8(%rbp)
setg   %al
mov    %al,-0xa5(%rbp)
mov    -0xa5(%rbp),%al
test   $0x1,%al
jne    166d <main+0x4ed>
jmp    16e0 <main+0x560>
mov    -0x40(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsd  0x99b(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x8(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0xc(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x50(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x80(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1634 <main+0x4b4>
jmp    16e5 <main+0x565>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    15b5 <main+0x435>
mov    -0x38(%rbp),%rdi
mov    $0xc8,%esi
call   1050 <var@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x38(%rbp),%rdi
mov    $0xc8,%esi
call   1050 <var@plt>
movsd  -0xb8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xb0(%rbp),%xmm0
ff
subsd  -0x80(%rbp),%xmm2
movaps 0x8bd(%rip),%xmm3
pand   %xmm3,%xmm2
lea    0x97a(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
lea    0x987(%rip),%rdi
lea    0x987(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rdi
lea    0x96f(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0xc8,-0x8(%rbp)
jge    17e8 <main+0x668>
mov    -0x88(%rbp),%rdi
mov    -0x38(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    $0xa,%edx
mov    $0x20,%eax
cmp    $0x0,%ecx
cmovne %eax,%edx
lea    0x926(%rip),%rsi
mov    $0x1,%al
call   1060 <fprintf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    178b <main+0x60b>
mov    -0x88(%rbp),%rdi
lea    0x888(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    18ac <main+0x72c>
mov    -0x88(%rbp),%rdi
mov    -0x8(%rbp),%edx
add    $0x1,%edx
mov    -0x60(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
lea    0x8d2(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x60(%rbp),%rcx
movslq -0x8(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jge    1889 <main+0x709>
mov    -0x88(%rbp),%rdi
mov    -0x78(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0x8a7(%rip),%rsi
mov    $0x1,%al
call   1060 <fprintf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    183d <main+0x6bd>
mov    -0x88(%rbp),%rdi
lea    0x7e7(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1804 <main+0x684>
mov    -0x88(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    $0x640,%edi
call   1080 <malloc@plt>
mov    %rax,%rdi
mov    0x2e26(%rip),%rbx
xor    %ebp,%ebp
mov    %rax,0x8(%rsp)
nopl   0x0(%rax)
xor    %eax,%eax
call   10c0 <rand@plt>
mov    0x8(%rsp),%rdi
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
divsd  (%rbx),%xmm0
movsd  %xmm0,(%rdi,%rbp,8)
add    $0x1,%rbp
cmp    $0xc8,%rbp
jne    11d0 <main+0x30>
mov    $0xc8,%esi
mov    %rdi,%rbx
call   10a0 <mean@plt>
movsd  %xmm0,0x10(%rsp)
mov    %rbx,%rdi
mov    $0xc8,%esi
call   1060 <var@plt>
movapd %xmm0,%xmm1
lea    0xe57(%rip),%rdi
movsd  0x10(%rsp),%xmm0
mov    $0xc8,%esi
mov    $0x2,%al
call   1040 <printf@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,%rbx
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,%r15
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,%r13
mov    $0x40,%edi
call   1080 <malloc@plt>
mov    %rax,%rbp
mov    $0x40,%edi
call   1080 <malloc@plt>
mov    %rax,%r14
mov    $0x40,%edi
call   1080 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    $0x40,%edi
call   1080 <malloc@plt>
mov    %rax,%r12
movl   $0xa,(%rbx)
movl   $0x0,(%r15)
movl   $0x9,0x0(%r13)
movl   $0xe,0x4(%rbx)
movl   $0xa,0x4(%r15)
movl   $0x17,0x4(%r13)
movl   $0x34,0x8(%rbx)
movl   $0x18,0x8(%r15)
movl   $0x4b,0x8(%r13)
movl   $0x21,0xc(%rbx)
movl   $0x4c,0xc(%r15)
movl   $0x6c,0xc(%r13)
movl   $0x24,0x10(%rbx)
movl   $0x6d,0x10(%r15)
movl   $0x90,0x10(%r13)
movl   $0x23,0x14(%rbx)
movl   $0x91,0x14(%r15)
movl   $0xb3,0x14(%r13)
movl   $0x12,0x18(%rbx)
movl   $0xb4,0x18(%r15)
movl   $0xc5,0x18(%r13)
movl   $0x2,0x1c(%rbx)
mov    %r15,0x18(%rsp)
movl   $0xc6,0x1c(%r15)
mov    %r13,0x30(%rsp)
movl   $0xc7,0x1c(%r13)
xor    %r13d,%r13d
lea    0xd02(%rip),%r15
mov    %rbp,0x28(%rsp)
mov    %rbx,0x20(%rsp)
jmp    13d4 <main+0x234>
mov    -0x4(%r15,%r13,4),%edx
mov    0x8(%rsp),%rdi
add    %ecx,%edx
movslq %edx,%rdx
movsd  (%rdi,%rdx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    %rax,%rdi
call   10a0 <mean@plt>
movsd  %xmm0,(%r14,%r13,8)
mov    0x0(%rbp,%r13,8),%rdi
mov    0x20(%rsp),%rbx
mov    (%rbx,%r13,4),%esi
call   1060 <var@plt>
mov    0x10(%rsp),%rax
movsd  %xmm0,(%rax,%r13,8)
xorps  %xmm0,%xmm0
cvtsi2sdl (%rbx,%r13,4),%xmm0
divsd  0xc40(%rip),%xmm0
movsd  %xmm0,(%r12,%r13,8)
add    $0x1,%r13
cmp    $0x8,%r13
je     146a <main+0x2ca>
mov    (%rbx,%r13,4),%edi
shl    $0x3,%edi
call   1080 <malloc@plt>
mov    %rax,0x0(%rbp,%r13,8)
mov    (%rbx,%r13,4),%esi
test   %esi,%esi
jle    1383 <main+0x1e3>
cmp    $0x1,%esi
jne    1410 <main+0x270>
xor    %ecx,%ecx
test   $0x1,%sil
mov    0x28(%rsp),%rbp
je     1383 <main+0x1e3>
test   %r13,%r13
jne    136a <main+0x1ca>
xor    %edx,%edx
jmp    136f <main+0x1cf>
nop
mov    %esi,%edx
and    $0xfffffffe,%edx
xor    %ecx,%ecx
mov    0x8(%rsp),%rbp
jmp    143d <main+0x29d>
xchg   %ax,%ax
add    %ecx,%edi
add    $0x1,%edi
movslq %edi,%rdi
movsd  0x0(%rbp,%rdi,8),%xmm0
movsd  %xmm0,0x8(%rax,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%rdx
je     13f4 <main+0x254>
xor    %edi,%edi
mov    $0x0,%ebx
test   %r13,%r13
je     144e <main+0x2ae>
mov    -0x4(%r15,%r13,4),%ebx
add    %ecx,%ebx
movslq %ebx,%rbx
movsd  0x0(%rbp,%rbx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
test   %r13,%r13
je     1420 <main+0x280>
mov    -0x4(%r15,%r13,4),%edi
jmp    1420 <main+0x280>
lea    0xc3f(%rip),%rdi
movsd  0xb8f(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
mov    (%rbx),%esi
mov    0x18(%rsp),%r15
mov    (%r15),%edx
mov    0x30(%rsp),%r13
mov    0x0(%r13),%ecx
movsd  (%r14),%xmm1
mov    0x10(%rsp),%rbp
movsd  0x0(%rbp),%xmm2
movsd  (%r12),%xmm3
lea    0xc1b(%rip),%rdi
xorps  %xmm0,%xmm0
mov    $0x4,%al
call   1040 <printf@plt>
mov    0x4(%rbx),%esi
mov    0x4(%r15),%edx
mov    0x4(%r13),%ecx
movsd  0x8(%r14),%xmm1
movsd  0x8(%rbp),%xmm2
movsd  0x8(%r12),%xmm3
movsd  0xb32(%rip),%xmm0
lea    0xbe5(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
mov    0x8(%rbx),%esi
mov    0x8(%r15),%edx
mov    0x8(%r13),%ecx
movsd  0x10(%r14),%xmm1
movsd  0x10(%rbp),%xmm2
movsd  0x10(%r12),%xmm3
movsd  0xb07(%rip),%xmm0
lea    0xbb2(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
mov    0xc(%rbx),%esi
mov    0xc(%r15),%edx
mov    0xc(%r13),%ecx
movsd  0x18(%r14),%xmm1
movsd  0x18(%rbp),%xmm2
movsd  0x18(%r12),%xmm3
movsd  0xadc(%rip),%xmm0
lea    0xb7f(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
mov    0x10(%rbx),%esi
mov    0x10(%r15),%edx
mov    0x10(%r13),%ecx
movsd  0x20(%r14),%xmm1
movsd  0x20(%rbp),%xmm2
movsd  0x20(%r12),%xmm3
movsd  0xab1(%rip),%xmm0
lea    0xb4c(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
mov    0x14(%rbx),%esi
mov    0x14(%r15),%edx
mov    0x14(%r13),%ecx
movsd  0x28(%r14),%xmm1
movsd  0x28(%rbp),%xmm2
movsd  0x28(%r12),%xmm3
movsd  0xa86(%rip),%xmm0
lea    0xb19(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
mov    0x18(%rbx),%esi
mov    0x18(%r15),%edx
mov    0x18(%r13),%ecx
movsd  0x30(%r14),%xmm1
movsd  0x30(%rbp),%xmm2
movsd  0x30(%r12),%xmm3
movsd  0xa5b(%rip),%xmm0
lea    0xae6(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
mov    0x1c(%rbx),%esi
mov    0x1c(%r15),%edx
mov    0x1c(%r13),%ecx
movsd  0x38(%r14),%xmm1
movsd  0x38(%rbp),%xmm2
movsd  0x38(%r12),%xmm3
movsd  0xa30(%rip),%xmm0
lea    0xab3(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
movsd  0x9ea(%rip),%xmm6
xorpd  %xmm4,%xmm4
xor    %eax,%eax
movsd  0xa14(%rip),%xmm0
mov    0x8(%rsp),%rbx
jmp    164e <main+0x4ae>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rax
cmp    $0x8,%rax
je     1760 <main+0x5c0>
movapd %xmm4,%xmm3
movsd  (%r12,%rax,8),%xmm1
movsd  (%r14,%rax,8),%xmm2
movapd %xmm2,%xmm4
mulsd  %xmm2,%xmm4
movapd %xmm6,%xmm5
subsd  %xmm1,%xmm5
mulsd  %xmm4,%xmm5
mulsd  %xmm1,%xmm5
mov    0x10(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm5,%xmm4
addsd  %xmm3,%xmm4
test   %rax,%rax
je     1640 <main+0x4a0>
lea    -0x1(%rax),%rcx
mulsd  %xmm0,%xmm2
mulsd  %xmm2,%xmm1
cmp    $0x3,%rcx
jae    16b0 <main+0x510>
xor    %ecx,%ecx
jmp    171f <main+0x57f>
nopw   0x0(%rax,%rax,1)
mov    %rax,%rdx
and    $0xfffffffffffffffc,%rdx
xor    %ecx,%ecx
nopl   0x0(%rax)
movsd  (%r14,%rcx,8),%xmm2
mulsd  %xmm1,%xmm2
mulsd  (%r12,%rcx,8),%xmm2
addsd  %xmm4,%xmm2
movsd  0x8(%r14,%rcx,8),%xmm3
mulsd  %xmm1,%xmm3
mulsd  0x8(%r12,%rcx,8),%xmm3
addsd  %xmm2,%xmm3
movsd  0x10(%r14,%rcx,8),%xmm2
mulsd  %xmm1,%xmm2
mulsd  0x10(%r12,%rcx,8),%xmm2
movsd  0x18(%r14,%rcx,8),%xmm4
mulsd  %xmm1,%xmm4
mulsd  0x18(%r12,%rcx,8),%xmm4
addsd  %xmm3,%xmm2
addsd  %xmm2,%xmm4
add    $0x4,%rcx
cmp    %rcx,%rdx
jne    16c0 <main+0x520>
test   $0x3,%al
je     1640 <main+0x4a0>
mov    %eax,%edx
and    $0x3,%edx
lea    (%r12,%rcx,8),%rsi
lea    (%r14,%rcx,8),%rcx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
movsd  (%rcx,%rbp,8),%xmm2
mulsd  %xmm1,%xmm2
mulsd  (%rsi,%rbp,8),%xmm2
addsd  %xmm2,%xmm4
add    $0x1,%rbp
cmp    %rbp,%rdx
jne    1740 <main+0x5a0>
jmp    1640 <main+0x4a0>
mov    %rbx,%rdi
mov    $0xc8,%esi
movsd  %xmm4,0x18(%rsp)
call   1060 <var@plt>
movsd  %xmm0,0x10(%rsp)
mov    %rbx,%rdi
mov    $0xc8,%esi
call   1060 <var@plt>
movapd %xmm0,%xmm2
movsd  0x18(%rsp),%xmm1
subsd  %xmm1,%xmm2
andpd  0x8b4(%rip),%xmm2
lea    0x955(%rip),%rdi
movsd  0x10(%rsp),%xmm0
mov    $0x3,%al
call   1040 <printf@plt>
lea    0x95c(%rip),%rdi
lea    0x95c(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%r12
lea    0x94f(%rip),%rdi
mov    $0xc,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   10b0 <fwrite@plt>
mov    $0x1,%r15b
xor    %eax,%eax
lea    0x93e(%rip),%r13
mov    0x20(%rsp),%rbx
jmp    1827 <main+0x687>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x8(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm0
mov    %r12,%rdi
mov    %r13,%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
add    $0x1,%r15b
mov    %rbp,%rax
cmp    $0xc8,%rbp
je     1851 <main+0x6b1>
movzbl %r15b,%ecx
imul   $0xcd,%ecx,%ecx
shr    $0xa,%ecx
and    $0xfffffffe,%ecx
lea    (%rcx,%rcx,4),%ecx
lea    0x1(%rax),%rbp
add    $0xff,%cl
mov    $0xa,%edx
cmp    %al,%cl
je     1800 <main+0x660>
mov    $0x20,%edx
jmp    1800 <main+0x660>
mov    $0xa,%edi
mov    %r12,%rsi
call   1050 <fputc@plt>
lea    0x8e6(%rip),%r15
xor    %ebp,%ebp
mov    0x28(%rsp),%r13
jmp    188b <main+0x6eb>
xchg   %ax,%ax
mov    $0xa,%edi
mov    %r12,%rsi
call   1050 <fputc@plt>
mov    0x8(%rsp),%rax
mov    %rax,%rbp
cmp    $0x8,%rax
je     18e7 <main+0x747>
lea    0x1(%rbp),%rdx
mov    (%rbx,%rbp,4),%ecx
mov    %r12,%rdi
lea    0x895(%rip),%rsi
mov    %rdx,0x8(%rsp)
xor    %eax,%eax
call   1070 <fprintf@plt>
cmpl   $0x0,(%rbx,%rbp,4)
jle    1870 <main+0x6d0>
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x0(%r13,%rbp,8),%rax
movsd  (%rax,%r14,8),%xmm0
mov    %r12,%rdi
mov    %r15,%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
add    $0x1,%r14
movslq (%rbx,%rbp,4),%rax
cmp    %rax,%r14
jl     18c0 <main+0x720>
jmp    1870 <main+0x6d0>
mov    %r12,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.indices = [7 x i32] [i32 10, i32 24, i32 76, i32 109, i32 145, i32 180, i32 198]
@RAND_MAX = global double 0.000000e+00
@.str = [52 x i8] c"Ave global : %f\0AVar global : %f\0ASize global : %d\0A\00"
@.str.1 = [26 x i8] c"\0A\0APartitions number : %d\0A\00"
@.str.2 = [46 x i8] c"%2d %2d %3d - %3d %7.6f %f %4.3f\0A\00"
@.str.3 = [27 x i8] c"\0ACompare %f vs %f diff %f\0A\00"
@.str.4 = [7 x i8] c"pd.txt\00"
@.str.5 = [2 x i8] c"w\00"
@.str.6 = [13 x i8] c"full buffer\0A\00"
@.str.7 = [8 x i8] c"%3.3f%c\00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [26 x i8] c"\0Apartitions # %d size %d\0A\00"
@.str.10 = [7 x i8] c"%3.3f \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [7 x i32]
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca double**
%14 = alloca double
%15 = alloca i32*
store i32 0, i32* %1
%16 = bitcast [7 x i32]* %4 to i8*
%17 = call i64 @malloc(i32 1600)
%18 = inttoptr i64 %17 to double*
store double* %18, double** %5
store i32 0, i32* %2
br label %19
19: ; preds = %31, %0
%20 = load i32, i32* %2
%21 = icmp slt i32 %20, 200
br i1 %21, label %22, label %34
22: ; preds = %19
%23 = call i64 (...) @rand()
%24 = sitofp i64 %23 to double
%25 = load double, double* @RAND_MAX
%26 = fdiv double %24, %25
%27 = load double*, double** %5
%28 = load i32, i32* %2
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds double, double* %27, i64 %29
store double %26, double* %30
br label %31
31: ; preds = %22
%32 = load i32, i32* %2
%33 = add nsw i32 %32, 1
store i32 %33, i32* %2
br label %19
34: ; preds = %19
%35 = load double*, double** %5
%36 = call double @mean(double* %35, i32 200)
%37 = load double*, double** %5
%38 = call double @var(double* %37, i32 200)
%39 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), double %36, double %38, i32 200)
store i32 8, i32* %9
%40 = load i32, i32* %9
%41 = sext i32 %40 to i64
%42 = mul i64 %41, 4
%43 = trunc i64 %42 to i32
%44 = call i64 @malloc(i32 %43)
%45 = inttoptr i64 %44 to i32*
store i32* %45, i32** %10
%46 = load i32, i32* %9
%47 = sext i32 %46 to i64
%48 = mul i64 %47, 4
%49 = trunc i64 %48 to i32
%50 = call i64 @malloc(i32 %49)
%51 = inttoptr i64 %50 to i32*
store i32* %51, i32** %11
%52 = load i32, i32* %9
%53 = sext i32 %52 to i64
%54 = mul i64 %53, 4
%55 = trunc i64 %54 to i32
%56 = call i64 @malloc(i32 %55)
%57 = inttoptr i64 %56 to i32*
store i32* %57, i32** %12
%58 = load i32, i32* %9
%59 = sext i32 %58 to i64
%60 = mul i64 %59, 8
%61 = trunc i64 %60 to i32
%62 = call i64 @malloc(i32 %61)
%63 = inttoptr i64 %62 to double**
store double** %63, double*** %13
%64 = load i32, i32* %9
%65 = sext i32 %64 to i64
%66 = mul i64 %65, 8
%67 = trunc i64 %66 to i32
%68 = call i64 @malloc(i32 %67)
%69 = inttoptr i64 %68 to double*
store double* %69, double** %6
%70 = load i32, i32* %9
%71 = sext i32 %70 to i64
%72 = mul i64 %71, 8
%73 = trunc i64 %72 to i32
%74 = call i64 @malloc(i32 %73)
%75 = inttoptr i64 %74 to double*
store double* %75, double** %7
%76 = load i32, i32* %9
%77 = sext i32 %76 to i64
%78 = mul i64 %77, 8
%79 = trunc i64 %78 to i32
%80 = call i64 @malloc(i32 %79)
%81 = inttoptr i64 %80 to double*
store double* %81, double** %8
%82 = getelementptr inbounds [7 x i32], [7 x i32]* %4, i64 0, i64 0
%83 = load i32, i32* %82
%84 = load i32*, i32** %10
%85 = getelementptr inbounds i32, i32* %84, i64 0
store i32 %83, i32* %85
%86 = load i32*, i32** %11
%87 = getelementptr inbounds i32, i32* %86, i64 0
store i32 0, i32* %87
%88 = getelementptr inbounds [7 x i32], [7 x i32]* %4, i64 0, i64 0
%89 = load i32, i32* %88
%90 = sub nsw i32 %89, 1
%91 = load i32*, i32** %12
%92 = getelementptr inbounds i32, i32* %91, i64 0
store i32 %90, i32* %92
store i32 1, i32* %2
br label %93
93: ; preds = %131, %34
%94 = load i32, i32* %2
%95 = load i32, i32* %9
%96 = sub nsw i32 %95, 1
%97 = icmp slt i32 %94, %96
br i1 %97, label %98, label %134
98: ; preds = %93
%99 = load i32, i32* %2
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [7 x i32], [7 x i32]* %4, i64 0, i64 %100
%102 = load i32, i32* %101
%103 = load i32, i32* %2
%104 = sub nsw i32 %103, 1
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [7 x i32], [7 x i32]* %4, i64 0, i64 %105
%107 = load i32, i32* %106
%108 = sub nsw i32 %102, %107
%109 = load i32*, i32** %10
%110 = load i32, i32* %2
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds i32, i32* %109, i64 %111
store i32 %108, i32* %112
%113 = load i32, i32* %2
%114 = sub nsw i32 %113, 1
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [7 x i32], [7 x i32]* %4, i64 0, i64 %115
%117 = load i32, i32* %116
%118 = load i32*, i32** %11
%119 = load i32, i32* %2
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds i32, i32* %118, i64 %120
store i32 %117, i32* %121
%122 = load i32, i32* %2
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds [7 x i32], [7 x i32]* %4, i64 0, i64 %123
%125 = load i32, i32* %124
%126 = sub nsw i32 %125, 1
%127 = load i32*, i32** %12
%128 = load i32, i32* %2
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds i32, i32* %127, i64 %129
store i32 %126, i32* %130
br label %131
131: ; preds = %98
%132 = load i32, i32* %2
%133 = add nsw i32 %132, 1
store i32 %133, i32* %2
br label %93
134: ; preds = %93
%135 = load i32, i32* %9
%136 = sub nsw i32 %135, 2
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds [7 x i32], [7 x i32]* %4, i64 0, i64 %137
%139 = load i32, i32* %138
%140 = sub nsw i32 200, %139
%141 = load i32*, i32** %10
%142 = load i32, i32* %9
%143 = sub nsw i32 %142, 1
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds i32, i32* %141, i64 %144
store i32 %140, i32* %145
%146 = load i32, i32* %9
%147 = sub nsw i32 %146, 2
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds [7 x i32], [7 x i32]* %4, i64 0, i64 %148
%150 = load i32, i32* %149
%151 = load i32*, i32** %11
%152 = load i32, i32* %9
%153 = sub nsw i32 %152, 1
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds i32, i32* %151, i64 %154
store i32 %150, i32* %155
%156 = load i32*, i32** %12
%157 = load i32, i32* %9
%158 = sub nsw i32 %157, 1
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds i32, i32* %156, i64 %159
store i32 199, i32* %160
store i32 0, i32* %2
br label %161
161: ; preds = %259, %134
%162 = load i32, i32* %2
%163 = load i32, i32* %9
%164 = icmp slt i32 %162, %163
br i1 %164, label %165, label %262
165: ; preds = %161
%166 = load i32*, i32** %10
%167 = load i32, i32* %2
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds i32, i32* %166, i64 %168
%170 = load i32, i32* %169
%171 = sext i32 %170 to i64
%172 = mul i64 %171, 8
%173 = trunc i64 %172 to i32
%174 = call i64 @malloc(i32 %173)
%175 = inttoptr i64 %174 to double*
%176 = load double**, double*** %13
%177 = load i32, i32* %2
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds double*, double** %176, i64 %178
store double* %175, double** %179
store i32 0, i32* %3
br label %180
180: ; preds = %214, %165
%181 = load i32, i32* %3
%182 = load i32*, i32** %10
%183 = load i32, i32* %2
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds i32, i32* %182, i64 %184
%186 = load i32, i32* %185
%187 = icmp slt i32 %181, %186
br i1 %187, label %188, label %217
188: ; preds = %180
%189 = load double*, double** %5
%190 = load i32, i32* %3
%191 = load i32, i32* %2
%192 = icmp eq i32 %191, 0
br i1 %192, label %193, label %194
193: ; preds = %188
br label %200
194: ; preds = %188
%195 = load i32, i32* %2
%196 = sub nsw i32 %195, 1
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds [7 x i32], [7 x i32]* %4, i64 0, i64 %197
%199 = load i32, i32* %198
br label %200
200: ; preds = %194, %193
%201 = phi i32 [ 0, %193 ], [ %199, %194 ]
%202 = add nsw i32 %190, %201
%203 = sext i32 %202 to i64
%204 = getelementptr inbounds double, double* %189, i64 %203
%205 = load double, double* %204
%206 = load double**, double*** %13
%207 = load i32, i32* %2
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds double*, double** %206, i64 %208
%210 = load double*, double** %209
%211 = load i32, i32* %3
%212 = sext i32 %211 to i64
%213 = getelementptr inbounds double, double* %210, i64 %212
store double %205, double* %213
br label %214
214: ; preds = %200
%215 = load i32, i32* %3
%216 = add nsw i32 %215, 1
store i32 %216, i32* %3
br label %180
217: ; preds = %180
%218 = load double**, double*** %13
%219 = load i32, i32* %2
%220 = sext i32 %219 to i64
%221 = getelementptr inbounds double*, double** %218, i64 %220
%222 = load double*, double** %221
%223 = load i32*, i32** %10
%224 = load i32, i32* %2
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds i32, i32* %223, i64 %225
%227 = load i32, i32* %226
%228 = call double @mean(double* %222, i32 %227)
%229 = load double*, double** %6
%230 = load i32, i32* %2
%231 = sext i32 %230 to i64
%232 = getelementptr inbounds double, double* %229, i64 %231
store double %228, double* %232
%233 = load double**, double*** %13
%234 = load i32, i32* %2
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds double*, double** %233, i64 %235
%237 = load double*, double** %236
%238 = load i32*, i32** %10
%239 = load i32, i32* %2
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds i32, i32* %238, i64 %240
%242 = load i32, i32* %241
%243 = call double @var(double* %237, i32 %242)
%244 = load double*, double** %7
%245 = load i32, i32* %2
%246 = sext i32 %245 to i64
%247 = getelementptr inbounds double, double* %244, i64 %246
store double %243, double* %247
%248 = load i32*, i32** %10
%249 = load i32, i32* %2
%250 = sext i32 %249 to i64
%251 = getelementptr inbounds i32, i32* %248, i64 %250
%252 = load i32, i32* %251
%253 = sitofp i32 %252 to double
%254 = fdiv double %253, 2.000000e+02
%255 = load double*, double** %8
%256 = load i32, i32* %2
%257 = sext i32 %256 to i64
%258 = getelementptr inbounds double, double* %255, i64 %257
store double %254, double* %258
br label %259
259: ; preds = %217
%260 = load i32, i32* %2
%261 = add nsw i32 %260, 1
store i32 %261, i32* %2
br label %161
262: ; preds = %161
%263 = load i32, i32* %9
%264 = sitofp i32 %263 to double
%265 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), double %264)
store i32 0, i32* %2
br label %266
266: ; preds = %304, %262
%267 = load i32, i32* %2
%268 = load i32, i32* %9
%269 = icmp slt i32 %267, %268
br i1 %269, label %270, label %307
270: ; preds = %266
%271 = load i32, i32* %2
%272 = sitofp i32 %271 to double
%273 = load i32*, i32** %10
%274 = load i32, i32* %2
%275 = sext i32 %274 to i64
%276 = getelementptr inbounds i32, i32* %273, i64 %275
%277 = load i32, i32* %276
%278 = load i32*, i32** %11
%279 = load i32, i32* %2
%280 = sext i32 %279 to i64
%281 = getelementptr inbounds i32, i32* %278, i64 %280
%282 = load i32, i32* %281
%283 = load i32*, i32** %12
%284 = load i32, i32* %2
%285 = sext i32 %284 to i64
%286 = getelementptr inbounds i32, i32* %283, i64 %285
%287 = load i32, i32* %286
%288 = load double*, double** %6
%289 = load i32, i32* %2
%290 = sext i32 %289 to i64
%291 = getelementptr inbounds double, double* %288, i64 %290
%292 = load double, double* %291
%293 = load double*, double** %7
%294 = load i32, i32* %2
%295 = sext i32 %294 to i64
%296 = getelementptr inbounds double, double* %293, i64 %295
%297 = load double, double* %296
%298 = load double*, double** %8
%299 = load i32, i32* %2
%300 = sext i32 %299 to i64
%301 = getelementptr inbounds double, double* %298, i64 %300
%302 = load double, double* %301
%303 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), double %272, i32 %277, i32 %282, i32 %287, double %292, double %297, double %302)
br label %304
304: ; preds = %270
%305 = load i32, i32* %2
%306 = add nsw i32 %305, 1
store i32 %306, i32* %2
br label %266
307: ; preds = %266
store double 0.000000e+00, double* %14
store i32 0, i32* %2
br label %308
308: ; preds = %391, %307
%309 = load i32, i32* %2
%310 = load i32, i32* %9
%311 = icmp slt i32 %309, %310
br i1 %311, label %312, label %394
312: ; preds = %308
%313 = load double*, double** %7
%314 = load i32, i32* %2
%315 = sext i32 %314 to i64
%316 = getelementptr inbounds double, double* %313, i64 %315
%317 = load double, double* %316
%318 = load double*, double** %8
%319 = load i32, i32* %2
%320 = sext i32 %319 to i64
%321 = getelementptr inbounds double, double* %318, i64 %320
%322 = load double, double* %321
%323 = load double*, double** %6
%324 = load i32, i32* %2
%325 = sext i32 %324 to i64
%326 = getelementptr inbounds double, double* %323, i64 %325
%327 = load double, double* %326
%328 = load double*, double** %6
%329 = load i32, i32* %2
%330 = sext i32 %329 to i64
%331 = getelementptr inbounds double, double* %328, i64 %330
%332 = load double, double* %331
%333 = fmul double %327, %332
%334 = load double*, double** %8
%335 = load i32, i32* %2
%336 = sext i32 %335 to i64
%337 = getelementptr inbounds double, double* %334, i64 %336
%338 = load double, double* %337
%339 = fsub double 1.000000e+00, %338
%340 = fmul double %333, %339
%341 = load double*, double** %8
%342 = load i32, i32* %2
%343 = sext i32 %342 to i64
%344 = getelementptr inbounds double, double* %341, i64 %343
%345 = load double, double* %344
%346 = fmul double %340, %345
%347 = call double @llvm.fmuladd.f64(double %317, double %322, double %346)
%348 = load double, double* %14
%349 = fadd double %348, %347
store double %349, double* %14
store i32 0, i32* %3
br label %350
350: ; preds = %387, %312
%351 = load i32, i32* %3
%352 = load i32, i32* %2
%353 = sub nsw i32 %352, 1
%354 = icmp sle i32 %351, %353
br i1 %354, label %355, label %358
355: ; preds = %350
%356 = load i32, i32* %2
%357 = icmp sgt i32 %356, 0
br label %358
358: ; preds = %355, %350
%359 = phi i1 [ false, %350 ], [ %357, %355 ]
br i1 %359, label %360, label %390
360: ; preds = %358
%361 = load double*, double** %6
%362 = load i32, i32* %2
%363 = sext i32 %362 to i64
%364 = getelementptr inbounds double, double* %361, i64 %363
%365 = load double, double* %364
%366 = fmul double 2.000000e+00, %365
%367 = load double*, double** %8
%368 = load i32, i32* %2
%369 = sext i32 %368 to i64
%370 = getelementptr inbounds double, double* %367, i64 %369
%371 = load double, double* %370
%372 = fmul double %366, %371
%373 = load double*, double** %6
%374 = load i32, i32* %3
%375 = sext i32 %374 to i64
%376 = getelementptr inbounds double, double* %373, i64 %375
%377 = load double, double* %376
%378 = fmul double %372, %377
%379 = load double*, double** %8
%380 = load i32, i32* %3
%381 = sext i32 %380 to i64
%382 = getelementptr inbounds double, double* %379, i64 %381
%383 = load double, double* %382
%384 = load double, double* %14
%385 = fneg double %378
%386 = call double @llvm.fmuladd.f64(double %385, double %383, double %384)
store double %386, double* %14
br label %387
387: ; preds = %360
%388 = load i32, i32* %3
%389 = add nsw i32 %388, 1
store i32 %389, i32* %3
br label %350
390: ; preds = %358
br label %391
391: ; preds = %390
%392 = load i32, i32* %2
%393 = add nsw i32 %392, 1
store i32 %393, i32* %2
br label %308
394: ; preds = %308
%395 = load double*, double** %5
%396 = call double @var(double* %395, i32 200)
%397 = load double, double* %14
%398 = load double*, double** %5
%399 = call double @var(double* %398, i32 200)
%400 = load double, double* %14
%401 = fsub double %399, %400
%402 = call double @llvm.fabs.f64(double %401)
%403 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), double %396, double %397, double %402)
%404 = call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i32* %404, i32** %15
%405 = load i32*, i32** %15
%406 = call i32 (i32*, i8*, ...) @fprintf(i32* %405, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %2
br label %407
407: ; preds = %424, %394
%408 = load i32, i32* %2
%409 = icmp slt i32 %408, 200
br i1 %409, label %410, label %427
410: ; preds = %407
%411 = load i32*, i32** %15
%412 = load double*, double** %5
%413 = load i32, i32* %2
%414 = sext i32 %413 to i64
%415 = getelementptr inbounds double, double* %412, i64 %414
%416 = load double, double* %415
%417 = load i32, i32* %2
%418 = add nsw i32 %417, 1
%419 = srem i32 %418, 10
%420 = icmp ne i32 %419, 0
%421 = zext i1 %420 to i64
%422 = select i1 %420, i32 32, i32 10
%423 = call i32 (i32*, i8*, ...) @fprintf(i32* %411, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), double %416, i32 %422)
br label %424
424: ; preds = %410
%425 = load i32, i32* %2
%426 = add nsw i32 %425, 1
store i32 %426, i32* %2
br label %407
427: ; preds = %407
%428 = load i32*, i32** %15
%429 = call i32 (i32*, i8*, ...) @fprintf(i32* %428, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %2
br label %430
430: ; preds = %470, %427
%431 = load i32, i32* %2
%432 = load i32, i32* %9
%433 = icmp slt i32 %431, %432
br i1 %433, label %434, label %473
434: ; preds = %430
%435 = load i32*, i32** %15
%436 = load i32, i32* %2
%437 = add nsw i32 %436, 1
%438 = load i32*, i32** %10
%439 = load i32, i32* %2
%440 = sext i32 %439 to i64
%441 = getelementptr inbounds i32, i32* %438, i64 %440
%442 = load i32, i32* %441
%443 = call i32 (i32*, i8*, ...) @fprintf(i32* %435, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i32 %437, i32 %442)
store i32 0, i32* %3
br label %444
444: ; preds = %464, %434
%445 = load i32, i32* %3
%446 = load i32*, i32** %10
%447 = load i32, i32* %2
%448 = sext i32 %447 to i64
%449 = getelementptr inbounds i32, i32* %446, i64 %448
%450 = load i32, i32* %449
%451 = icmp slt i32 %445, %450
br i1 %451, label %452, label %467
452: ; preds = %444
%453 = load i32*, i32** %15
%454 = load double**, double*** %13
%455 = load i32, i32* %2
%456 = sext i32 %455 to i64
%457 = getelementptr inbounds double*, double** %454, i64 %456
%458 = load double*, double** %457
%459 = load i32, i32* %3
%460 = sext i32 %459 to i64
%461 = getelementptr inbounds double, double* %458, i64 %460
%462 = load double, double* %461
%463 = call i32 (i32*, i8*, ...) @fprintf(i32* %453, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), double %462)
br label %464
464: ; preds = %452
%465 = load i32, i32* %3
%466 = add nsw i32 %465, 1
store i32 %466, i32* %3
br label %444
467: ; preds = %444
%468 = load i32*, i32** %15
%469 = call i32 (i32*, i8*, ...) @fprintf(i32* %468, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %470
470: ; preds = %467
%471 = load i32, i32* %2
%472 = add nsw i32 %471, 1
store i32 %472, i32* %2
br label %430
473: ; preds = %430
%474 = load i32*, i32** %15
%475 = call i32 @fclose(i32* %474)
ret i32 0
}

LLVM IR (-O2):
@__const.main.indices = [7 x i32] [i32 10, i32 24, i32 76, i32 109, i32 145, i32 180, i32 198]
@RAND_MAX = global double 0.000000e+00
@.str = [52 x i8] c"Ave global : %f\0AVar global : %f\0ASize global : %d\0A\00"
@.str.1 = [26 x i8] c"\0A\0APartitions number : %d\0A\00"
@.str.2 = [46 x i8] c"%2d %2d %3d - %3d %7.6f %f %4.3f\0A\00"
@.str.3 = [27 x i8] c"\0ACompare %f vs %f diff %f\0A\00"
@.str.4 = [7 x i8] c"pd.txt\00"
@.str.5 = [2 x i8] c"w\00"
@.str.6 = [13 x i8] c"full buffer\0A\00"
@.str.7 = [8 x i8] c"%3.3f%c\00"
@.str.9 = [26 x i8] c"\0Apartitions # %d size %d\0A\00"
@.str.10 = [7 x i8] c"%3.3f \00"
define i32 @main() {
%1 = tail call i64 @malloc(i32 1600)
%2 = inttoptr i64 %1 to double*
br label %3
3: ; preds = %0, %3
%4 = phi i64 [ 0, %0 ], [ %10, %3 ]
%5 = tail call i64 (...) @rand()
%6 = sitofp i64 %5 to double
%7 = load double, double* @RAND_MAX
%8 = fdiv double %6, %7
%9 = getelementptr inbounds double, double* %2, i64 %4
store double %8, double* %9
%10 = add nuw nsw i64 %4, 1
%11 = icmp eq i64 %10, 200
br i1 %11, label %12, label %3
12: ; preds = %3
%13 = tail call double @mean(double* %2, i32 200)
%14 = tail call double @var(double* %2, i32 200)
%15 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), double %13, double %14, i32 200)
%16 = tail call i64 @malloc(i32 32)
%17 = inttoptr i64 %16 to i32*
%18 = tail call i64 @malloc(i32 32)
%19 = inttoptr i64 %18 to i32*
%20 = tail call i64 @malloc(i32 32)
%21 = inttoptr i64 %20 to i32*
%22 = tail call i64 @malloc(i32 64)
%23 = tail call i64 @malloc(i32 64)
%24 = tail call i64 @malloc(i32 64)
%25 = tail call i64 @malloc(i32 64)
store i32 10, i32* %17
store i32 0, i32* %19
store i32 9, i32* %21
%26 = getelementptr inbounds i32, i32* %17, i64 1
store i32 14, i32* %26
%27 = getelementptr inbounds i32, i32* %19, i64 1
store i32 10, i32* %27
%28 = getelementptr inbounds i32, i32* %21, i64 1
store i32 23, i32* %28
%29 = getelementptr inbounds i32, i32* %17, i64 2
store i32 52, i32* %29
%30 = getelementptr inbounds i32, i32* %19, i64 2
store i32 24, i32* %30
%31 = getelementptr inbounds i32, i32* %21, i64 2
store i32 75, i32* %31
%32 = getelementptr inbounds i32, i32* %17, i64 3
store i32 33, i32* %32
%33 = getelementptr inbounds i32, i32* %19, i64 3
store i32 76, i32* %33
%34 = getelementptr inbounds i32, i32* %21, i64 3
store i32 108, i32* %34
%35 = getelementptr inbounds i32, i32* %17, i64 4
store i32 36, i32* %35
%36 = getelementptr inbounds i32, i32* %19, i64 4
store i32 109, i32* %36
%37 = getelementptr inbounds i32, i32* %21, i64 4
store i32 144, i32* %37
%38 = getelementptr inbounds i32, i32* %17, i64 5
store i32 35, i32* %38
%39 = getelementptr inbounds i32, i32* %19, i64 5
store i32 145, i32* %39
%40 = getelementptr inbounds i32, i32* %21, i64 5
store i32 179, i32* %40
%41 = getelementptr inbounds i32, i32* %17, i64 6
store i32 18, i32* %41
%42 = getelementptr inbounds i32, i32* %19, i64 6
store i32 180, i32* %42
%43 = getelementptr inbounds i32, i32* %21, i64 6
store i32 197, i32* %43
%44 = inttoptr i64 %22 to double**
%45 = inttoptr i64 %23 to double*
%46 = inttoptr i64 %24 to double*
%47 = inttoptr i64 %25 to double*
%48 = getelementptr inbounds i32, i32* %17, i64 7
store i32 2, i32* %48
%49 = getelementptr inbounds i32, i32* %19, i64 7
store i32 198, i32* %49
%50 = getelementptr inbounds i32, i32* %21, i64 7
store i32 199, i32* %50
br label %51
51: ; preds = %12, %111
%52 = phi i64 [ 0, %12 ], [ %122, %111 ]
%53 = getelementptr inbounds i32, i32* %17, i64 %52
%54 = load i32, i32* %53
%55 = shl i32 %54, 3
%56 = tail call i64 @malloc(i32 %55)
%57 = inttoptr i64 %56 to double*
%58 = getelementptr inbounds double*, double** %44, i64 %52
store double* %57, double** %58
%59 = load i32, i32* %53
%60 = icmp sgt i32 %59, 0
br i1 %60, label %61, label %111
61: ; preds = %51
%62 = icmp eq i64 %52, 0
%63 = add nsw i64 %52, -1
%64 = getelementptr inbounds [7 x i32], [7 x i32]* @__const.main.indices, i64 0, i64 %63
%65 = zext i32 %59 to i64
%66 = and i64 %65, 1
%67 = icmp eq i32 %59, 1
br i1 %67, label %97, label %68
68: ; preds = %61
%69 = and i64 %65, 4294967294
br label %70
70: ; preds = %86, %68
%71 = phi i64 [ 0, %68 ], [ %94, %86 ]
%72 = phi i64 [ 0, %68 ], [ %95, %86 ]
br i1 %62, label %75, label %73
73: ; preds = %70
%74 = load i32, i32* %64
br label %75
75: ; preds = %70, %73
%76 = phi i32 [ %74, %73 ], [ 0, %70 ]
%77 = trunc i64 %71 to i32
%78 = add nsw i32 %76, %77
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds double, double* %2, i64 %79
%81 = load double, double* %80
%82 = getelementptr inbounds double, double* %57, i64 %71
store double %81, double* %82
%83 = or i64 %71, 1
br i1 %62, label %86, label %84
84: ; preds = %75
%85 = load i32, i32* %64
br label %86
86: ; preds = %84, %75
%87 = phi i32 [ %85, %84 ], [ 0, %75 ]
%88 = trunc i64 %83 to i32
%89 = add nsw i32 %87, %88
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds double, double* %2, i64 %90
%92 = load double, double* %91
%93 = getelementptr inbounds double, double* %57, i64 %83
store double %92, double* %93
%94 = add nuw nsw i64 %71, 2
%95 = add i64 %72, 2
%96 = icmp eq i64 %95, %69
br i1 %96, label %97, label %70
97: ; preds = %86, %61
%98 = phi i64 [ 0, %61 ], [ %94, %86 ]
%99 = icmp eq i64 %66, 0
br i1 %99, label %111, label %100
100: ; preds = %97
br i1 %62, label %103, label %101
101: ; preds = %100
%102 = load i32, i32* %64
br label %103
103: ; preds = %101, %100
%104 = phi i32 [ %102, %101 ], [ 0, %100 ]
%105 = trunc i64 %98 to i32
%106 = add nsw i32 %104, %105
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds double, double* %2, i64 %107
%109 = load double, double* %108
%110 = getelementptr inbounds double, double* %57, i64 %98
store double %109, double* %110
br label %111
111: ; preds = %103, %97, %51
%112 = tail call double @mean(double* %57, i32 %59)
%113 = getelementptr inbounds double, double* %45, i64 %52
store double %112, double* %113
%114 = load double*, double** %58
%115 = load i32, i32* %53
%116 = tail call double @var(double* %114, i32 %115)
%117 = getelementptr inbounds double, double* %46, i64 %52
store double %116, double* %117
%118 = load i32, i32* %53
%119 = sitofp i32 %118 to double
%120 = fdiv double %119, 2.000000e+02
%121 = getelementptr inbounds double, double* %47, i64 %52
store double %120, double* %121
%122 = add nuw nsw i64 %52, 1
%123 = icmp eq i64 %122, 8
br i1 %123, label %124, label %51
124: ; preds = %111
%125 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), double 8.000000e+00)
%126 = load i32, i32* %17
%127 = load i32, i32* %19
%128 = load i32, i32* %21
%129 = load double, double* %45
%130 = load double, double* %46
%131 = load double, double* %47
%132 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), double 0.000000e+00, i32 %126, i32 %127, i32 %128, double %129, double %130, double %131)
%133 = load i32, i32* %26
%134 = load i32, i32* %27
%135 = load i32, i32* %28
%136 = getelementptr inbounds double, double* %45, i64 1
%137 = load double, double* %136
%138 = getelementptr inbounds double, double* %46, i64 1
%139 = load double, double* %138
%140 = getelementptr inbounds double, double* %47, i64 1
%141 = load double, double* %140
%142 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), double 1.000000e+00, i32 %133, i32 %134, i32 %135, double %137, double %139, double %141)
%143 = load i32, i32* %29
%144 = load i32, i32* %30
%145 = load i32, i32* %31
%146 = getelementptr inbounds double, double* %45, i64 2
%147 = load double, double* %146
%148 = getelementptr inbounds double, double* %46, i64 2
%149 = load double, double* %148
%150 = getelementptr inbounds double, double* %47, i64 2
%151 = load double, double* %150
%152 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), double 2.000000e+00, i32 %143, i32 %144, i32 %145, double %147, double %149, double %151)
%153 = load i32, i32* %32
%154 = load i32, i32* %33
%155 = load i32, i32* %34
%156 = getelementptr inbounds double, double* %45, i64 3
%157 = load double, double* %156
%158 = getelementptr inbounds double, double* %46, i64 3
%159 = load double, double* %158
%160 = getelementptr inbounds double, double* %47, i64 3
%161 = load double, double* %160
%162 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), double 3.000000e+00, i32 %153, i32 %154, i32 %155, double %157, double %159, double %161)
%163 = load i32, i32* %35
%164 = load i32, i32* %36
%165 = load i32, i32* %37
%166 = getelementptr inbounds double, double* %45, i64 4
%167 = load double, double* %166
%168 = getelementptr inbounds double, double* %46, i64 4
%169 = load double, double* %168
%170 = getelementptr inbounds double, double* %47, i64 4
%171 = load double, double* %170
%172 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), double 4.000000e+00, i32 %163, i32 %164, i32 %165, double %167, double %169, double %171)
%173 = load i32, i32* %38
%174 = load i32, i32* %39
%175 = load i32, i32* %40
%176 = getelementptr inbounds double, double* %45, i64 5
%177 = load double, double* %176
%178 = getelementptr inbounds double, double* %46, i64 5
%179 = load double, double* %178
%180 = getelementptr inbounds double, double* %47, i64 5
%181 = load double, double* %180
%182 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), double 5.000000e+00, i32 %173, i32 %174, i32 %175, double %177, double %179, double %181)
%183 = load i32, i32* %41
%184 = load i32, i32* %42
%185 = load i32, i32* %43
%186 = getelementptr inbounds double, double* %45, i64 6
%187 = load double, double* %186
%188 = getelementptr inbounds double, double* %46, i64 6
%189 = load double, double* %188
%190 = getelementptr inbounds double, double* %47, i64 6
%191 = load double, double* %190
%192 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), double 6.000000e+00, i32 %183, i32 %184, i32 %185, double %187, double %189, double %191)
%193 = load i32, i32* %48
%194 = load i32, i32* %49
%195 = load i32, i32* %50
%196 = getelementptr inbounds double, double* %45, i64 7
%197 = load double, double* %196
%198 = getelementptr inbounds double, double* %46, i64 7
%199 = load double, double* %198
%200 = getelementptr inbounds double, double* %47, i64 7
%201 = load double, double* %200
%202 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), double 7.000000e+00, i32 %193, i32 %194, i32 %195, double %197, double %199, double %201)
br label %203
203: ; preds = %124, %279
%204 = phi i64 [ 0, %124 ], [ %281, %279 ]
%205 = phi double [ 0.000000e+00, %124 ], [ %280, %279 ]
%206 = getelementptr inbounds double, double* %46, i64 %204
%207 = load double, double* %206
%208 = getelementptr inbounds double, double* %47, i64 %204
%209 = load double, double* %208
%210 = getelementptr inbounds double, double* %45, i64 %204
%211 = load double, double* %210
%212 = fmul double %211, %211
%213 = fsub double 1.000000e+00, %209
%214 = fmul double %213, %212
%215 = fmul double %209, %214
%216 = tail call double @llvm.fmuladd.f64(double %207, double %209, double %215)
%217 = fadd double %205, %216
%218 = icmp eq i64 %204, 0
br i1 %218, label %279, label %219
219: ; preds = %203
%220 = add nsw i64 %204, -1
%221 = fmul double %211, -2.000000e+00
%222 = fmul double %209, %221
%223 = and i64 %204, 3
%224 = icmp ult i64 %220, 3
br i1 %224, label %261, label %225
225: ; preds = %219
%226 = and i64 %204, 9223372036854775804
br label %227
227: ; preds = %227, %225
%228 = phi i64 [ 0, %225 ], [ %258, %227 ]
%229 = phi double [ %217, %225 ], [ %257, %227 ]
%230 = phi i64 [ 0, %225 ], [ %259, %227 ]
%231 = getelementptr inbounds double, double* %45, i64 %228
%232 = load double, double* %231
%233 = getelementptr inbounds double, double* %47, i64 %228
%234 = load double, double* %233
%235 = fmul double %222, %232
%236 = tail call double @llvm.fmuladd.f64(double %235, double %234, double %229)
%237 = or i64 %228, 1
%238 = getelementptr inbounds double, double* %45, i64 %237
%239 = load double, double* %238
%240 = getelementptr inbounds double, double* %47, i64 %237
%241 = load double, double* %240
%242 = fmul double %222, %239
%243 = tail call double @llvm.fmuladd.f64(double %242, double %241, double %236)
%244 = or i64 %228, 2
%245 = getelementptr inbounds double, double* %45, i64 %244
%246 = load double, double* %245
%247 = getelementptr inbounds double, double* %47, i64 %244
%248 = load double, double* %247
%249 = fmul double %222, %246
%250 = tail call double @llvm.fmuladd.f64(double %249, double %248, double %243)
%251 = or i64 %228, 3
%252 = getelementptr inbounds double, double* %45, i64 %251
%253 = load double, double* %252
%254 = getelementptr inbounds double, double* %47, i64 %251
%255 = load double, double* %254
%256 = fmul double %222, %253
%257 = tail call double @llvm.fmuladd.f64(double %256, double %255, double %250)
%258 = add nuw nsw i64 %228, 4
%259 = add i64 %230, 4
%260 = icmp eq i64 %259, %226
br i1 %260, label %261, label %227
261: ; preds = %227, %219
%262 = phi double [ undef, %219 ], [ %257, %227 ]
%263 = phi i64 [ 0, %219 ], [ %258, %227 ]
%264 = phi double [ %217, %219 ], [ %257, %227 ]
%265 = icmp eq i64 %223, 0
br i1 %265, label %279, label %266
266: ; preds = %261, %266
%267 = phi i64 [ %276, %266 ], [ %263, %261 ]
%268 = phi double [ %275, %266 ], [ %264, %261 ]
%269 = phi i64 [ %277, %266 ], [ 0, %261 ]
%270 = getelementptr inbounds double, double* %45, i64 %267
%271 = load double, double* %270
%272 = getelementptr inbounds double, double* %47, i64 %267
%273 = load double, double* %272
%274 = fmul double %222, %271
%275 = tail call double @llvm.fmuladd.f64(double %274, double %273, double %268)
%276 = add nuw nsw i64 %267, 1
%277 = add i64 %269, 1
%278 = icmp eq i64 %277, %223
br i1 %278, label %279, label %266
279: ; preds = %261, %266, %203
%280 = phi double [ %217, %203 ], [ %262, %261 ], [ %275, %266 ]
%281 = add nuw nsw i64 %204, 1
%282 = icmp eq i64 %281, 8
br i1 %282, label %283, label %203
283: ; preds = %279
%284 = tail call double @var(double* %2, i32 200)
%285 = tail call double @var(double* %2, i32 200)
%286 = fsub double %285, %280
%287 = tail call double @llvm.fabs.f64(double %286)
%288 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), double %284, double %280, double %287)
%289 = tail call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%290 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i64 12, i64 1, i32* %289)
br label %291
291: ; preds = %283, %291
%292 = phi i64 [ 0, %283 ], [ %295, %291 ]
%293 = getelementptr inbounds double, double* %2, i64 %292
%294 = load double, double* %293
%295 = add nuw nsw i64 %292, 1
%296 = trunc i64 %295 to i8
%297 = urem i8 %296, 10
%298 = icmp eq i8 %297, 0
%299 = select i1 %298, i32 10, i32 32
%300 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %289, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), double %294, i32 %299)
%301 = icmp eq i64 %295, 200
br i1 %301, label %302, label %291
302: ; preds = %291
%303 = tail call i32 @fputc(i32 10, i32* %289)
br label %304
304: ; preds = %302, %325
%305 = phi i64 [ 0, %302 ], [ %306, %325 ]
%306 = add nuw nsw i64 %305, 1
%307 = getelementptr inbounds i32, i32* %17, i64 %305
%308 = load i32, i32* %307
%309 = trunc i64 %306 to i32
%310 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %289, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i32 %309, i32 %308)
%311 = load i32, i32* %307
%312 = icmp sgt i32 %311, 0
br i1 %312, label %313, label %325
313: ; preds = %304
%314 = getelementptr inbounds double*, double** %44, i64 %305
br label %315
315: ; preds = %313, %315
%316 = phi i64 [ 0, %313 ], [ %321, %315 ]
%317 = load double*, double** %314
%318 = getelementptr inbounds double, double* %317, i64 %316
%319 = load double, double* %318
%320 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %289, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), double %319)
%321 = add nuw nsw i64 %316, 1
%322 = load i32, i32* %307
%323 = sext i32 %322 to i64
%324 = icmp slt i64 %321, %323
br i1 %324, label %315, label %325
325: ; preds = %315, %304
%326 = tail call i32 @fputc(i32 10, i32* %289)
%327 = icmp eq i64 %306, 8
br i1 %327, label %328, label %304
328: ; preds = %325
%329 = tail call i32 @fclose(i32* %289)
ret i32 0
}