#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 */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ stderr;
int cgm(double a[], double c[], double x[], int n) {
  double *r1, *r2, *p1, *p2, *w2;
  double ai, atr1, bi, ww;
  int i, j, k = 1;
  if (n < 2) {
    fprintf(stderr, "Error : illegal parameter input in cgm()\n");
    return -1;
  }
  r1 = (double *)calloc(n, sizeof(double));
  r2 = (double *)calloc(n, sizeof(double));
  p1 = (double *)calloc(n, sizeof(double));
  p2 = (double *)calloc(n, sizeof(double));
  w2 = (double *)calloc(n, sizeof(double));
  if (r1 == NULL || r2 == NULL || p1 == NULL || p2 == NULL || w2 == NULL) {
    fprintf(stderr, "Error : Out of Memory in cgm()\n");
    return 999;
  }
  for (i = 0; i < n; i++) {
    x[i] = 0;
    r1[i] = c[i];
    ww = 0;
    for (j = 0; j < n; j++)
      ww += a[j * n + i] * c[j];
    p1[i] = ww;
  }
  for (;;) {
    atr1 = 0;
    for (i = 0; i < n; i++) {
      ww = 0;
      for (j = 0; j < n; j++)
        ww += a[j * n + i] * r1[j];
      atr1 += ww * ww;
    }
    bi = 0;
    for (i = 0; i < n; i++) {
      ww = 0;
      for (j = 0; j < n; j++)
        ww += a[i * n + j] * p1[j];
      w2[i] = ww;
      bi += ww * ww;
    }
    ai = atr1 / bi;
    for (i = 0; i < n; i++)
      x[i] += ai * p1[i];
    if (k == n)
      break;
    for (i = 0; i < n; i++)
      r2[i] = r1[i] - ai * w2[i];
    bi = 0;
    for (i = 0; i < n; i++) {
      ww = 0;
      for (j = 0; j < n; j++)
        ww += a[j * n + i] * r2[j];
      p2[i] = ww;
      bi += ww * ww;
    }
    bi /= atr1;
    for (i = 0; i < n; i++) {
      p1[i] = p2[i] + bi * p1[i];
      r1[i] = r2[i];
    }
    k++;
  }
  free((char *)r1);
  free((char *)r2);
  free((char *)p1);
  free((char *)p2);
  free((char *)w2);
  return 0;
}


x86 assembly (clang, -O0):
<cgm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
movl   $0x1,-0x7c(%rbp)
cmpl   $0x2,-0x24(%rbp)
jge    117c <cgm+0x4c>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
lea    0xe95(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1693 <cgm+0x563>
mov    -0x24(%rbp),%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x24(%rbp),%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,-0x38(%rbp)
mov    -0x24(%rbp),%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x24(%rbp),%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0x24(%rbp),%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1208 <cgm+0xd8>
cmpq   $0x0,-0x38(%rbp)
je     1208 <cgm+0xd8>
cmpq   $0x0,-0x40(%rbp)
je     1208 <cgm+0xd8>
cmpq   $0x0,-0x48(%rbp)
je     1208 <cgm+0xd8>
cmpq   $0x0,-0x50(%rbp)
jne    1229 <cgm+0xf9>
mov    0x2dd1(%rip),%rax
mov    (%rax),%edi
lea    0xe12(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x3e7,-0x4(%rbp)
jmp    1693 <cgm+0x563>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    12e4 <cgm+0x1b4>
mov    -0x20(%rbp),%rax
movslq -0x74(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    12c4 <cgm+0x194>
mov    -0x10(%rbp),%rax
mov    -0x78(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x74(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x78(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1275 <cgm+0x145>
movsd  -0x70(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1230 <cgm+0x100>
jmp    12e9 <cgm+0x1b9>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    138c <cgm+0x25c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1362 <cgm+0x232>
mov    -0x10(%rbp),%rax
mov    -0x78(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x74(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x78(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1313 <cgm+0x1e3>
movsd  -0x70(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    12f8 <cgm+0x1c8>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1441 <cgm+0x311>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1405 <cgm+0x2d5>
mov    -0x10(%rbp),%rax
mov    -0x74(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x78(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x78(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    13b6 <cgm+0x286>
movsd  -0x70(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    139b <cgm+0x26b>
movsd  -0x60(%rbp),%xmm0
divsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    149d <cgm+0x36d>
movsd  -0x58(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x20(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1457 <cgm+0x327>
mov    -0x7c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jne    14ae <cgm+0x37e>
jmp    165f <cgm+0x52f>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    151a <cgm+0x3ea>
mov    -0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x58(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    14b5 <cgm+0x385>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    15cf <cgm+0x49f>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1593 <cgm+0x463>
mov    -0x10(%rbp),%rax
mov    -0x78(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x74(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x78(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1544 <cgm+0x414>
movsd  -0x70(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1529 <cgm+0x3f9>
movsd  -0x60(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1651 <cgm+0x521>
mov    -0x48(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x68(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x40(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    15e9 <cgm+0x4b9>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    12e9 <cgm+0x1b9>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgm>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
cmp    $0x1,%ecx
jg     1165 <cgm+0x35>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0xffffffff,%eax
jmp    1bbc <cgm+0xa8c>
mov    %rsi,%r14
mov    %rdi,0x20(%rsp)
mov    %rdx,0x10(%rsp)
mov    %ecx,%edi
mov    $0x8,%esi
mov    %ecx,%r15d
call   1040 <calloc@plt>
mov    %rax,%rbp
mov    %r15d,%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,%r13
mov    %r15d,%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
mov    %r15d,%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,0x58(%rsp)
mov    %r15d,0x34(%rsp)
mov    %r15d,%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
test   %rbp,%rbp
je     12ef <cgm+0x1bf>
test   %r13,%r13
je     12ef <cgm+0x1bf>
test   %rbx,%rbx
je     12ef <cgm+0x1bf>
cmpq   $0x0,0x58(%rsp)
je     12ef <cgm+0x1bf>
test   %rax,%rax
je     12ef <cgm+0x1bf>
mov    0x34(%rsp),%r12d
lea    -0x1(%r12),%rcx
mov    %rcx,0x40(%rsp)
mov    %r12d,%ecx
and    $0xfffffffe,%ecx
mov    %r12,%r10
shl    $0x4,%r10
xor    %r15d,%r15d
mov    0x20(%rsp),%r11
mov    %r11,%r8
mov    0x10(%rsp),%r9
mov    %rax,0x18(%rsp)
jmp    124c <cgm+0x11c>
nopl   0x0(%rax,%rax,1)
movsd  %xmm0,(%rbx,%r15,8)
add    $0x1,%r15
add    $0x8,%r8
cmp    %r12,%r15
mov    0x18(%rsp),%rsi
je     130e <cgm+0x1de>
movq   $0x0,(%r9,%r15,8)
movsd  (%r14,%r15,8),%xmm0
movsd  %xmm0,0x0(%rbp,%r15,8)
cmpq   $0x0,0x40(%rsp)
je     12c0 <cgm+0x190>
xorpd  %xmm0,%xmm0
mov    %r8,%rsi
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rsi),%xmm1
mulsd  (%r14,%rdi,8),%xmm1
addsd  %xmm0,%xmm1
movsd  (%rsi,%r12,8),%xmm0
mulsd  0x8(%r14,%rdi,8),%xmm0
addsd  %xmm1,%xmm0
add    $0x2,%rdi
add    %r10,%rsi
cmp    %rdi,%rcx
jne    1280 <cgm+0x150>
test   $0x1,%r12b
je     1230 <cgm+0x100>
jmp    12d0 <cgm+0x1a0>
nopw   0x0(%rax,%rax,1)
xorpd  %xmm0,%xmm0
xor    %edi,%edi
test   $0x1,%r12b
je     1230 <cgm+0x100>
mov    %rdi,%rdx
imul   %r12,%rdx
add    %r15,%rdx
movsd  (%r11,%rdx,8),%xmm1
mulsd  (%r14,%rdi,8),%xmm1
addsd  %xmm1,%xmm0
jmp    1230 <cgm+0x100>
mov    0x2cea(%rip),%rax
mov    (%rax),%edi
lea    0xd3b(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x3e7,%eax
jmp    1bbc <cgm+0xa8c>
lea    (%rbx,%r12,8),%rcx
mov    %rcx,0x28(%rsp)
lea    0x0(,%r12,8),%r14
add    %rbp,%r14
lea    0x0(%r13,%r12,8),%r11
lea    (%rsi,%r12,8),%rax
mov    %rax,0x50(%rsp)
mov    0x10(%rsp),%rax
lea    (%rax,%r12,8),%r9
mov    %r12d,%eax
and    $0xfffffffc,%eax
mov    %rax,0x38(%rsp)
add    $0xfffffffffffffffc,%rax
mov    %rax,0x78(%rsp)
mov    %rax,%rdi
shr    $0x2,%rdi
add    $0x1,%rdi
mov    %r12d,%eax
and    $0xfffffffe,%eax
lea    -0x2(%rax),%r8
mov    %r8,0x90(%rsp)
shr    %r8
add    $0x1,%r8
mov    %r12d,%r15d
and    $0x3,%r15d
cmp    0x10(%rsp),%rcx
seta   %dl
cmp    %r9,%rbx
setb   %cl
and    %dl,%cl
mov    %cl,0xf(%rsp)
mov    %rdi,%rcx
mov    %rdi,0x70(%rsp)
and    $0xfffffffffffffffe,%rdi
mov    %rdi,0x68(%rsp)
mov    %r12,%rcx
neg    %rcx
mov    %rcx,0x60(%rsp)
mov    %r14,%rdi
mov    %r14,0x48(%rsp)
cmp    %r14,%r13
setb   %dl
cmp    %r11,%rbp
setb   %r14b
and    %dl,%r14b
cmp    0x50(%rsp),%r13
setb   %dl
cmp    %r11,%rsi
setb   %cl
and    %dl,%cl
or     %r14b,%cl
mov    %cl,0xe(%rsp)
cmp    %rdi,%rbx
setb   %r9b
mov    0x28(%rsp),%rcx
cmp    %rcx,%rbp
setb   %dl
and    %r9b,%dl
mov    0x58(%rsp),%rsi
lea    (%rsi,%r12,8),%rdi
cmp    %rdi,%rbx
setb   %r9b
cmp    %rcx,%rsi
setb   %cl
and    %r9b,%cl
or     %dl,%cl
cmp    %r11,%rbx
mov    0x20(%rsp),%r11
setb   %dl
cmp    0x28(%rsp),%r13
setb   %r9b
and    %dl,%r9b
cmp    %rdi,%rbp
setb   %dil
cmp    0x48(%rsp),%rsi
setb   %dl
and    %dil,%dl
or     %r9b,%dl
or     %cl,%dl
or     %r14b,%dl
mov    %dl,0x48(%rsp)
mov    %r8,%rcx
mov    %r8,0x88(%rsp)
and    $0xfffffffffffffffe,%r8
mov    %r8,0x80(%rsp)
lea    0x18(%r11),%rcx
mov    %rcx,0x50(%rsp)
lea    0x0(,%r12,8),%r8
movl   $0x1,0x28(%rsp)
movapd 0xb8b(%rip),%xmm8
jmp    1485 <cgm+0x355>
nopw   0x0(%rax,%rax,1)
addl   $0x1,0x28(%rsp)
xorpd  %xmm1,%xmm1
mov    %r11,%rdx
xor    %ecx,%ecx
jmp    14ae <cgm+0x37e>
mulsd  %xmm2,%xmm2
addsd  %xmm2,%xmm1
add    $0x1,%rcx
add    $0x8,%rdx
cmp    %r12,%rcx
mov    0x18(%rsp),%rdi
je     1530 <cgm+0x400>
cmpq   $0x0,0x40(%rsp)
je     1500 <cgm+0x3d0>
xorpd  %xmm2,%xmm2
mov    %rdx,%rdi
xor    %esi,%esi
nop
movsd  (%rdi),%xmm3
mulsd  0x0(%rbp,%rsi,8),%xmm3
addsd  %xmm2,%xmm3
movsd  (%rdi,%r12,8),%xmm2
mulsd  0x8(%rbp,%rsi,8),%xmm2
addsd  %xmm3,%xmm2
add    $0x2,%rsi
add    %r10,%rdi
cmp    %rsi,%rax
jne    14c0 <cgm+0x390>
test   $0x1,%r12b
je     1490 <cgm+0x360>
jmp    150c <cgm+0x3dc>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %esi,%esi
xorpd  %xmm2,%xmm2
test   $0x1,%r12b
je     1490 <cgm+0x360>
mov    %rsi,%rdi
imul   %r12,%rdi
add    %rcx,%rdi
movsd  (%r11,%rdi,8),%xmm3
mulsd  0x0(%rbp,%rsi,8),%xmm3
addsd  %xmm3,%xmm2
jmp    1490 <cgm+0x360>
nopl   0x0(%rax,%rax,1)
xorpd  %xmm3,%xmm3
mov    %r11,%r14
mov    0x50(%rsp),%r11
xor    %r9d,%r9d
jmp    1571 <cgm+0x441>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  %xmm2,(%rdi,%r9,8)
mulsd  %xmm2,%xmm2
addsd  %xmm2,%xmm3
add    $0x1,%r9
add    %r8,%r11
add    %r8,%r14
cmp    %r12,%r9
je     1620 <cgm+0x4f0>
cmpq   $0x3,0x40(%rsp)
mov    0x38(%rsp),%rdx
jae    1590 <cgm+0x460>
xor    %ecx,%ecx
xorpd  %xmm2,%xmm2
jmp    15eb <cgm+0x4bb>
cs nopw 0x0(%rax,%rax,1)
xorpd  %xmm2,%xmm2
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
movsd  -0x18(%r11,%rcx,8),%xmm4
movsd  -0x10(%r11,%rcx,8),%xmm5
mulsd  (%rbx,%rcx,8),%xmm4
mulsd  0x8(%rbx,%rcx,8),%xmm5
addsd  %xmm2,%xmm4
movsd  -0x8(%r11,%rcx,8),%xmm6
mulsd  0x10(%rbx,%rcx,8),%xmm6
addsd  %xmm4,%xmm5
movsd  (%r11,%rcx,8),%xmm2
mulsd  0x18(%rbx,%rcx,8),%xmm2
addsd  %xmm5,%xmm6
addsd  %xmm6,%xmm2
add    $0x4,%rcx
cmp    %rcx,%rdx
jne    15a0 <cgm+0x470>
test   %r15,%r15
je     1550 <cgm+0x420>
lea    (%rbx,%rcx,8),%rdx
lea    (%r14,%rcx,8),%rcx
xor    %esi,%esi
xchg   %ax,%ax
movsd  (%rcx,%rsi,8),%xmm4
mulsd  (%rdx,%rsi,8),%xmm4
addsd  %xmm4,%xmm2
add    $0x1,%rsi
cmp    %rsi,%r15
jne    1600 <cgm+0x4d0>
jmp    1550 <cgm+0x420>
nopl   0x0(%rax)
mov    0x34(%rsp),%r9d
cmp    $0x4,%r9d
setb   %cl
movapd %xmm1,%xmm2
divsd  %xmm3,%xmm2
or     0xf(%rsp),%cl
mov    0x58(%rsp),%r14
je     1650 <cgm+0x520>
xor    %edx,%edx
mov    0x10(%rsp),%rdi
mov    0x20(%rsp),%r11
jmp    172f <cgm+0x5ff>
movapd %xmm2,%xmm3
unpcklpd %xmm2,%xmm3
cmpq   $0x0,0x78(%rsp)
mov    0x38(%rsp),%rdx
je     1b43 <cgm+0xa13>
mov    0x68(%rsp),%rsi
xor    %ecx,%ecx
mov    0x10(%rsp),%rdi
mov    0x20(%rsp),%r11
nopw   0x0(%rax,%rax,1)
movupd (%rbx,%rcx,8),%xmm4
movupd 0x10(%rbx,%rcx,8),%xmm5
mulpd  %xmm3,%xmm4
movupd (%rdi,%rcx,8),%xmm6
addpd  %xmm4,%xmm6
movupd 0x10(%rdi,%rcx,8),%xmm4
movupd 0x20(%rdi,%rcx,8),%xmm7
movupd 0x30(%rdi,%rcx,8),%xmm0
mulpd  %xmm3,%xmm5
addpd  %xmm4,%xmm5
movupd %xmm6,(%rdi,%rcx,8)
movupd %xmm5,0x10(%rdi,%rcx,8)
movupd 0x20(%rbx,%rcx,8),%xmm4
movupd 0x30(%rbx,%rcx,8),%xmm5
mulpd  %xmm3,%xmm4
addpd  %xmm7,%xmm4
mulpd  %xmm3,%xmm5
addpd  %xmm0,%xmm5
movupd %xmm4,0x20(%rdi,%rcx,8)
movupd %xmm5,0x30(%rdi,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    1680 <cgm+0x550>
testb  $0x1,0x70(%rsp)
je     1727 <cgm+0x5f7>
movupd (%rbx,%rcx,8),%xmm0
movupd 0x10(%rbx,%rcx,8),%xmm4
movupd (%rdi,%rcx,8),%xmm5
movupd 0x10(%rdi,%rcx,8),%xmm6
mulpd  %xmm3,%xmm0
addpd  %xmm5,%xmm0
mulpd  %xmm3,%xmm4
addpd  %xmm6,%xmm4
movupd %xmm0,(%rdi,%rcx,8)
movupd %xmm4,0x10(%rdi,%rcx,8)
mov    %rdx,%rcx
cmp    %r12,%rdx
je     1792 <cgm+0x662>
mov    %rdx,%rcx
test   $0x1,%r12b
je     1752 <cgm+0x622>
movsd  (%rbx,%rdx,8),%xmm0
mulsd  %xmm2,%xmm0
addsd  (%rdi,%rdx,8),%xmm0
movsd  %xmm0,(%rdi,%rdx,8)
mov    %rdx,%rcx
or     $0x1,%rcx
not    %rdx
cmp    0x60(%rsp),%rdx
je     1792 <cgm+0x662>
nopl   0x0(%rax)
movsd  (%rbx,%rcx,8),%xmm0
mulsd  %xmm2,%xmm0
addsd  (%rdi,%rcx,8),%xmm0
movsd  %xmm0,(%rdi,%rcx,8)
movsd  0x8(%rbx,%rcx,8),%xmm0
mulsd  %xmm2,%xmm0
addsd  0x8(%rdi,%rcx,8),%xmm0
movsd  %xmm0,0x8(%rdi,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%r12
jne    1760 <cgm+0x630>
cmp    %r9d,0x28(%rsp)
je     1b90 <cgm+0xa60>
cmp    $0x4,%r9d
setb   %cl
xorpd  %xmm8,%xmm2
or     0xe(%rsp),%cl
je     17c0 <cgm+0x690>
xor    %edx,%edx
mov    0x18(%rsp),%rdi
jmp    18a9 <cgm+0x779>
nopl   0x0(%rax,%rax,1)
movapd %xmm2,%xmm3
unpcklpd %xmm2,%xmm3
cmpq   $0x0,0x78(%rsp)
je     1b5f <cgm+0xa2f>
mov    0x68(%rsp),%rsi
xor    %ecx,%ecx
mov    0x18(%rsp),%rdi
mov    0x38(%rsp),%rdx
cs nopw 0x0(%rax,%rax,1)
nop
movupd 0x0(%rbp,%rcx,8),%xmm0
movupd 0x10(%rbp,%rcx,8),%xmm4
movupd (%rdi,%rcx,8),%xmm5
movupd 0x10(%rdi,%rcx,8),%xmm6
mulpd  %xmm3,%xmm5
addpd  %xmm0,%xmm5
mulpd  %xmm3,%xmm6
addpd  %xmm4,%xmm6
movupd %xmm5,0x0(%r13,%rcx,8)
movupd %xmm6,0x10(%r13,%rcx,8)
movupd 0x20(%rbp,%rcx,8),%xmm0
movupd 0x30(%rbp,%rcx,8),%xmm4
movupd 0x20(%rdi,%rcx,8),%xmm5
movupd 0x30(%rdi,%rcx,8),%xmm6
mulpd  %xmm3,%xmm5
addpd  %xmm0,%xmm5
mulpd  %xmm3,%xmm6
addpd  %xmm4,%xmm6
movupd %xmm5,0x20(%r13,%rcx,8)
movupd %xmm6,0x30(%r13,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    17f0 <cgm+0x6c0>
testb  $0x1,0x70(%rsp)
je     18a1 <cgm+0x771>
movupd 0x0(%rbp,%rcx,8),%xmm0
movupd 0x10(%rbp,%rcx,8),%xmm4
movupd (%rdi,%rcx,8),%xmm5
movupd 0x10(%rdi,%rcx,8),%xmm6
mulpd  %xmm3,%xmm5
addpd  %xmm0,%xmm5
mulpd  %xmm3,%xmm6
addpd  %xmm4,%xmm6
movupd %xmm5,0x0(%r13,%rcx,8)
movupd %xmm6,0x10(%r13,%rcx,8)
mov    %rdx,%rcx
cmp    %r12,%rdx
je     1916 <cgm+0x7e6>
mov    %rdx,%rcx
test   $0x1,%r12b
je     18cf <cgm+0x79f>
movsd  (%rdi,%rdx,8),%xmm0
mulsd  %xmm2,%xmm0
addsd  0x0(%rbp,%rdx,8),%xmm0
movsd  %xmm0,0x0(%r13,%rdx,8)
mov    %rdx,%rcx
or     $0x1,%rcx
not    %rdx
cmp    0x60(%rsp),%rdx
je     1916 <cgm+0x7e6>
nopl   0x0(%rax)
movsd  (%rdi,%rcx,8),%xmm0
mulsd  %xmm2,%xmm0
addsd  0x0(%rbp,%rcx,8),%xmm0
movsd  %xmm0,0x0(%r13,%rcx,8)
movsd  0x8(%rdi,%rcx,8),%xmm0
mulsd  %xmm2,%xmm0
addsd  0x8(%rbp,%rcx,8),%xmm0
movsd  %xmm0,0x8(%r13,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%r12
jne    18e0 <cgm+0x7b0>
xorpd  %xmm2,%xmm2
mov    %r11,%rdi
xor    %ecx,%ecx
jmp    194f <cgm+0x81f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  %xmm3,(%r14,%rcx,8)
mulsd  %xmm3,%xmm3
addsd  %xmm3,%xmm2
add    $0x1,%rcx
add    $0x8,%rdi
cmp    %r12,%rcx
je     19d0 <cgm+0x8a0>
cmpq   $0x0,0x40(%rsp)
je     19a0 <cgm+0x870>
xorpd  %xmm3,%xmm3
mov    %rdi,%rdx
xor    %esi,%esi
movsd  (%rdx),%xmm0
mulsd  0x0(%r13,%rsi,8),%xmm0
addsd  %xmm3,%xmm0
movsd  (%rdx,%r8,1),%xmm3
mulsd  0x8(%r13,%rsi,8),%xmm3
addsd  %xmm0,%xmm3
add    $0x2,%rsi
add    %r10,%rdx
cmp    %rsi,%rax
jne    1960 <cgm+0x830>
test   $0x1,%r12b
je     1930 <cgm+0x800>
jmp    19ac <cgm+0x87c>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %esi,%esi
xorpd  %xmm3,%xmm3
test   $0x1,%r12b
je     1930 <cgm+0x800>
mov    %rsi,%rdx
imul   %r12,%rdx
add    %rcx,%rdx
movsd  (%r11,%rdx,8),%xmm0
mulsd  0x0(%r13,%rsi,8),%xmm0
addsd  %xmm0,%xmm3
jmp    1930 <cgm+0x800>
nopl   0x0(%rax)
cmp    $0x2,%r9d
setb   %cl
divsd  %xmm1,%xmm2
or     0x48(%rsp),%cl
je     19f0 <cgm+0x8c0>
xor    %edx,%edx
jmp    1ab0 <cgm+0x980>
nopl   0x0(%rax,%rax,1)
movapd %xmm2,%xmm1
unpcklpd %xmm2,%xmm1
cmpq   $0x0,0x90(%rsp)
je     1b7b <cgm+0xa4b>
mov    0x80(%rsp),%rsi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movupd (%r14,%rcx,8),%xmm0
movupd (%rbx,%rcx,8),%xmm3
mulpd  %xmm1,%xmm3
addpd  %xmm0,%xmm3
movupd %xmm3,(%rbx,%rcx,8)
movups 0x0(%r13,%rcx,8),%xmm0
movups %xmm0,0x0(%rbp,%rcx,8)
movupd 0x10(%r14,%rcx,8),%xmm0
movupd 0x10(%rbx,%rcx,8),%xmm3
mulpd  %xmm1,%xmm3
addpd  %xmm0,%xmm3
movupd %xmm3,0x10(%rbx,%rcx,8)
movupd 0x10(%r13,%rcx,8),%xmm0
movupd %xmm0,0x10(%rbp,%rcx,8)
add    $0x4,%rcx
add    $0xfffffffffffffffe,%rsi
jne    1a20 <cgm+0x8f0>
testb  $0x1,0x88(%rsp)
01
je     1aa4 <cgm+0x974>
movupd (%r14,%rcx,8),%xmm0
movupd (%rbx,%rcx,8),%xmm3
mulpd  %xmm3,%xmm1
addpd  %xmm0,%xmm1
movupd %xmm1,(%rbx,%rcx,8)
movupd 0x0(%r13,%rcx,8),%xmm0
movupd %xmm0,0x0(%rbp,%rcx,8)
mov    %rax,%rdx
cmp    %r12,%rax
je     1480 <cgm+0x350>
mov    %rdx,%rcx
test   $0x1,%r12b
je     1ae1 <cgm+0x9b1>
movsd  (%rbx,%rdx,8),%xmm0
mulsd  %xmm2,%xmm0
addsd  (%r14,%rdx,8),%xmm0
movsd  %xmm0,(%rbx,%rdx,8)
movsd  0x0(%r13,%rdx,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rdx,8)
mov    %rdx,%rcx
or     $0x1,%rcx
not    %rdx
cmp    0x60(%rsp),%rdx
je     1480 <cgm+0x350>
nop
movsd  (%rbx,%rcx,8),%xmm0
mulsd  %xmm2,%xmm0
addsd  (%r14,%rcx,8),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
movsd  0x0(%r13,%rcx,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rcx,8)
movsd  0x8(%rbx,%rcx,8),%xmm0
mulsd  %xmm2,%xmm0
addsd  0x8(%r14,%rcx,8),%xmm0
movsd  %xmm0,0x8(%rbx,%rcx,8)
movsd  0x8(%r13,%rcx,8),%xmm0
movsd  %xmm0,0x8(%rbp,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%r12
jne    1af0 <cgm+0x9c0>
jmp    1480 <cgm+0x350>
xor    %ecx,%ecx
mov    0x10(%rsp),%rdi
mov    0x20(%rsp),%r11
testb  $0x1,0x70(%rsp)
jne    16f6 <cgm+0x5c6>
jmp    1727 <cgm+0x5f7>
xor    %ecx,%ecx
mov    0x18(%rsp),%rdi
mov    0x38(%rsp),%rdx
testb  $0x1,0x70(%rsp)
jne    186c <cgm+0x73c>
jmp    18a1 <cgm+0x771>
xor    %ecx,%ecx
testb  $0x1,0x88(%rsp)
01
jne    1a7f <cgm+0x94f>
jmp    1aa4 <cgm+0x974>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"Error : illegal parameter input in cgm()\0A\00"
@.str.1 = [32 x i8] c"Error : Out of Memory in cgm()\0A\00"
define i32 @cgm(double* %0, double* %1, double* %2, i32 %3) {
%5 = alloca i32
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
store double* %0, double** %6
store double* %1, double** %7
store double* %2, double** %8
store i32 %3, i32* %9
store i32 1, i32* %21
%22 = load i32, i32* %9
%23 = icmp slt i32 %22, 2
br i1 %23, label %24, label %27
24: ; preds = %4
%25 = load i32, i32* @stderr
%26 = call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %5
br label %348
27: ; preds = %4
%28 = load i32, i32* %9
%29 = call i64 @calloc(i32 %28, i32 8)
%30 = inttoptr i64 %29 to double*
store double* %30, double** %10
%31 = load i32, i32* %9
%32 = call i64 @calloc(i32 %31, i32 8)
%33 = inttoptr i64 %32 to double*
store double* %33, double** %11
%34 = load i32, i32* %9
%35 = call i64 @calloc(i32 %34, i32 8)
%36 = inttoptr i64 %35 to double*
store double* %36, double** %12
%37 = load i32, i32* %9
%38 = call i64 @calloc(i32 %37, i32 8)
%39 = inttoptr i64 %38 to double*
store double* %39, double** %13
%40 = load i32, i32* %9
%41 = call i64 @calloc(i32 %40, i32 8)
%42 = inttoptr i64 %41 to double*
store double* %42, double** %14
%43 = load double*, double** %10
%44 = icmp eq double* %43, null
br i1 %44, label %57, label %45
45: ; preds = %27
%46 = load double*, double** %11
%47 = icmp eq double* %46, null
br i1 %47, label %57, label %48
48: ; preds = %45
%49 = load double*, double** %12
%50 = icmp eq double* %49, null
br i1 %50, label %57, label %51
51: ; preds = %48
%52 = load double*, double** %13
%53 = icmp eq double* %52, null
br i1 %53, label %57, label %54
54: ; preds = %51
%55 = load double*, double** %14
%56 = icmp eq double* %55, null
br i1 %56, label %57, label %60
57: ; preds = %54, %51, %48, %45, %27
%58 = load i32, i32* @stderr
%59 = call i32 @fprintf(i32 %58, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
store i32 999, i32* %5
br label %348
60: ; preds = %54
store i32 0, i32* %19
br label %61
61: ; preds = %109, %60
%62 = load i32, i32* %19
%63 = load i32, i32* %9
%64 = icmp slt i32 %62, %63
br i1 %64, label %65, label %112
65: ; preds = %61
%66 = load double*, double** %8
%67 = load i32, i32* %19
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %66, i64 %68
store double 0.000000e+00, double* %69
%70 = load double*, double** %7
%71 = load i32, i32* %19
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds double, double* %70, i64 %72
%74 = load double, double* %73
%75 = load double*, double** %10
%76 = load i32, i32* %19
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds double, double* %75, i64 %77
store double %74, double* %78
store double 0.000000e+00, double* %18
store i32 0, i32* %20
br label %79
79: ; preds = %100, %65
%80 = load i32, i32* %20
%81 = load i32, i32* %9
%82 = icmp slt i32 %80, %81
br i1 %82, label %83, label %103
83: ; preds = %79
%84 = load double*, double** %6
%85 = load i32, i32* %20
%86 = load i32, i32* %9
%87 = mul nsw i32 %85, %86
%88 = load i32, i32* %19
%89 = add nsw i32 %87, %88
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds double, double* %84, i64 %90
%92 = load double, double* %91
%93 = load double*, double** %7
%94 = load i32, i32* %20
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds double, double* %93, i64 %95
%97 = load double, double* %96
%98 = load double, double* %18
%99 = call double @llvm.fmuladd.f64(double %92, double %97, double %98)
store double %99, double* %18
br label %100
100: ; preds = %83
%101 = load i32, i32* %20
%102 = add nsw i32 %101, 1
store i32 %102, i32* %20
br label %79
103: ; preds = %79
%104 = load double, double* %18
%105 = load double*, double** %12
%106 = load i32, i32* %19
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds double, double* %105, i64 %107
store double %104, double* %108
br label %109
109: ; preds = %103
%110 = load i32, i32* %19
%111 = add nsw i32 %110, 1
store i32 %111, i32* %19
br label %61
112: ; preds = %61
br label %113
113: ; preds = %329, %112
store double 0.000000e+00, double* %16
store i32 0, i32* %19
br label %114
114: ; preds = %148, %113
%115 = load i32, i32* %19
%116 = load i32, i32* %9
%117 = icmp slt i32 %115, %116
br i1 %117, label %118, label %151
118: ; preds = %114
store double 0.000000e+00, double* %18
store i32 0, i32* %20
br label %119
119: ; preds = %140, %118
%120 = load i32, i32* %20
%121 = load i32, i32* %9
%122 = icmp slt i32 %120, %121
br i1 %122, label %123, label %143
123: ; preds = %119
%124 = load double*, double** %6
%125 = load i32, i32* %20
%126 = load i32, i32* %9
%127 = mul nsw i32 %125, %126
%128 = load i32, i32* %19
%129 = add nsw i32 %127, %128
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds double, double* %124, i64 %130
%132 = load double, double* %131
%133 = load double*, double** %10
%134 = load i32, i32* %20
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds double, double* %133, i64 %135
%137 = load double, double* %136
%138 = load double, double* %18
%139 = call double @llvm.fmuladd.f64(double %132, double %137, double %138)
store double %139, double* %18
br label %140
140: ; preds = %123
%141 = load i32, i32* %20
%142 = add nsw i32 %141, 1
store i32 %142, i32* %20
br label %119
143: ; preds = %119
%144 = load double, double* %18
%145 = load double, double* %18
%146 = load double, double* %16
%147 = call double @llvm.fmuladd.f64(double %144, double %145, double %146)
store double %147, double* %16
br label %148
148: ; preds = %143
%149 = load i32, i32* %19
%150 = add nsw i32 %149, 1
store i32 %150, i32* %19
br label %114
151: ; preds = %114
store double 0.000000e+00, double* %17
store i32 0, i32* %19
br label %152
152: ; preds = %191, %151
%153 = load i32, i32* %19
%154 = load i32, i32* %9
%155 = icmp slt i32 %153, %154
br i1 %155, label %156, label %194
156: ; preds = %152
store double 0.000000e+00, double* %18
store i32 0, i32* %20
br label %157
157: ; preds = %178, %156
%158 = load i32, i32* %20
%159 = load i32, i32* %9
%160 = icmp slt i32 %158, %159
br i1 %160, label %161, label %181
161: ; preds = %157
%162 = load double*, double** %6
%163 = load i32, i32* %19
%164 = load i32, i32* %9
%165 = mul nsw i32 %163, %164
%166 = load i32, i32* %20
%167 = add nsw i32 %165, %166
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds double, double* %162, i64 %168
%170 = load double, double* %169
%171 = load double*, double** %12
%172 = load i32, i32* %20
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds double, double* %171, i64 %173
%175 = load double, double* %174
%176 = load double, double* %18
%177 = call double @llvm.fmuladd.f64(double %170, double %175, double %176)
store double %177, double* %18
br label %178
178: ; preds = %161
%179 = load i32, i32* %20
%180 = add nsw i32 %179, 1
store i32 %180, i32* %20
br label %157
181: ; preds = %157
%182 = load double, double* %18
%183 = load double*, double** %14
%184 = load i32, i32* %19
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds double, double* %183, i64 %185
store double %182, double* %186
%187 = load double, double* %18
%188 = load double, double* %18
%189 = load double, double* %17
%190 = call double @llvm.fmuladd.f64(double %187, double %188, double %189)
store double %190, double* %17
br label %191
191: ; preds = %181
%192 = load i32, i32* %19
%193 = add nsw i32 %192, 1
store i32 %193, i32* %19
br label %152
194: ; preds = %152
%195 = load double, double* %16
%196 = load double, double* %17
%197 = fdiv double %195, %196
store double %197, double* %15
store i32 0, i32* %19
br label %198
198: ; preds = %215, %194
%199 = load i32, i32* %19
%200 = load i32, i32* %9
%201 = icmp slt i32 %199, %200
br i1 %201, label %202, label %218
202: ; preds = %198
%203 = load double, double* %15
%204 = load double*, double** %12
%205 = load i32, i32* %19
%206 = sext i32 %205 to i64
%207 = getelementptr inbounds double, double* %204, i64 %206
%208 = load double, double* %207
%209 = load double*, double** %8
%210 = load i32, i32* %19
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds double, double* %209, i64 %211
%213 = load double, double* %212
%214 = call double @llvm.fmuladd.f64(double %203, double %208, double %213)
store double %214, double* %212
br label %215
215: ; preds = %202
%216 = load i32, i32* %19
%217 = add nsw i32 %216, 1
store i32 %217, i32* %19
br label %198
218: ; preds = %198
%219 = load i32, i32* %21
%220 = load i32, i32* %9
%221 = icmp eq i32 %219, %220
br i1 %221, label %222, label %223
222: ; preds = %218
br label %332
223: ; preds = %218
store i32 0, i32* %19
br label %224
224: ; preds = %246, %223
%225 = load i32, i32* %19
%226 = load i32, i32* %9
%227 = icmp slt i32 %225, %226
br i1 %227, label %228, label %249
228: ; preds = %224
%229 = load double*, double** %10
%230 = load i32, i32* %19
%231 = sext i32 %230 to i64
%232 = getelementptr inbounds double, double* %229, i64 %231
%233 = load double, double* %232
%234 = load double, double* %15
%235 = load double*, double** %14
%236 = load i32, i32* %19
%237 = sext i32 %236 to i64
%238 = getelementptr inbounds double, double* %235, i64 %237
%239 = load double, double* %238
%240 = fneg double %234
%241 = call double @llvm.fmuladd.f64(double %240, double %239, double %233)
%242 = load double*, double** %11
%243 = load i32, i32* %19
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds double, double* %242, i64 %244
store double %241, double* %245
br label %246
246: ; preds = %228
%247 = load i32, i32* %19
%248 = add nsw i32 %247, 1
store i32 %248, i32* %19
br label %224
249: ; preds = %224
store double 0.000000e+00, double* %17
store i32 0, i32* %19
br label %250
250: ; preds = %289, %249
%251 = load i32, i32* %19
%252 = load i32, i32* %9
%253 = icmp slt i32 %251, %252
br i1 %253, label %254, label %292
254: ; preds = %250
store double 0.000000e+00, double* %18
store i32 0, i32* %20
br label %255
255: ; preds = %276, %254
%256 = load i32, i32* %20
%257 = load i32, i32* %9
%258 = icmp slt i32 %256, %257
br i1 %258, label %259, label %279
259: ; preds = %255
%260 = load double*, double** %6
%261 = load i32, i32* %20
%262 = load i32, i32* %9
%263 = mul nsw i32 %261, %262
%264 = load i32, i32* %19
%265 = add nsw i32 %263, %264
%266 = sext i32 %265 to i64
%267 = getelementptr inbounds double, double* %260, i64 %266
%268 = load double, double* %267
%269 = load double*, double** %11
%270 = load i32, i32* %20
%271 = sext i32 %270 to i64
%272 = getelementptr inbounds double, double* %269, i64 %271
%273 = load double, double* %272
%274 = load double, double* %18
%275 = call double @llvm.fmuladd.f64(double %268, double %273, double %274)
store double %275, double* %18
br label %276
276: ; preds = %259
%277 = load i32, i32* %20
%278 = add nsw i32 %277, 1
store i32 %278, i32* %20
br label %255
279: ; preds = %255
%280 = load double, double* %18
%281 = load double*, double** %13
%282 = load i32, i32* %19
%283 = sext i32 %282 to i64
%284 = getelementptr inbounds double, double* %281, i64 %283
store double %280, double* %284
%285 = load double, double* %18
%286 = load double, double* %18
%287 = load double, double* %17
%288 = call double @llvm.fmuladd.f64(double %285, double %286, double %287)
store double %288, double* %17
br label %289
289: ; preds = %279
%290 = load i32, i32* %19
%291 = add nsw i32 %290, 1
store i32 %291, i32* %19
br label %250
292: ; preds = %250
%293 = load double, double* %16
%294 = load double, double* %17
%295 = fdiv double %294, %293
store double %295, double* %17
store i32 0, i32* %19
br label %296
296: ; preds = %326, %292
%297 = load i32, i32* %19
%298 = load i32, i32* %9
%299 = icmp slt i32 %297, %298
br i1 %299, label %300, label %329
300: ; preds = %296
%301 = load double*, double** %13
%302 = load i32, i32* %19
%303 = sext i32 %302 to i64
%304 = getelementptr inbounds double, double* %301, i64 %303
%305 = load double, double* %304
%306 = load double, double* %17
%307 = load double*, double** %12
%308 = load i32, i32* %19
%309 = sext i32 %308 to i64
%310 = getelementptr inbounds double, double* %307, i64 %309
%311 = load double, double* %310
%312 = call double @llvm.fmuladd.f64(double %306, double %311, double %305)
%313 = load double*, double** %12
%314 = load i32, i32* %19
%315 = sext i32 %314 to i64
%316 = getelementptr inbounds double, double* %313, i64 %315
store double %312, double* %316
%317 = load double*, double** %11
%318 = load i32, i32* %19
%319 = sext i32 %318 to i64
%320 = getelementptr inbounds double, double* %317, i64 %319
%321 = load double, double* %320
%322 = load double*, double** %10
%323 = load i32, i32* %19
%324 = sext i32 %323 to i64
%325 = getelementptr inbounds double, double* %322, i64 %324
store double %321, double* %325
br label %326
326: ; preds = %300
%327 = load i32, i32* %19
%328 = add nsw i32 %327, 1
store i32 %328, i32* %19
br label %296
329: ; preds = %296
%330 = load i32, i32* %21
%331 = add nsw i32 %330, 1
store i32 %331, i32* %21
br label %113
332: ; preds = %222
%333 = load double*, double** %10
%334 = bitcast double* %333 to i8*
%335 = call i32 @free(i8* %334)
%336 = load double*, double** %11
%337 = bitcast double* %336 to i8*
%338 = call i32 @free(i8* %337)
%339 = load double*, double** %12
%340 = bitcast double* %339 to i8*
%341 = call i32 @free(i8* %340)
%342 = load double*, double** %13
%343 = bitcast double* %342 to i8*
%344 = call i32 @free(i8* %343)
%345 = load double*, double** %14
%346 = bitcast double* %345 to i8*
%347 = call i32 @free(i8* %346)
store i32 0, i32* %5
br label %348
348: ; preds = %332, %57, %24
%349 = load i32, i32* %5
ret i32 %349
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"Error : illegal parameter input in cgm()\0A\00"
@.str.1 = [32 x i8] c"Error : Out of Memory in cgm()\0A\00"
define i32 @cgm(double* nocapture %0, double* nocapture %1, double* nocapture %2, i32 %3) {
%5 = icmp slt i32 %3, 2
br i1 %5, label %6, label %9
6: ; preds = %4
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
br label %649
9: ; preds = %4
%10 = tail call i64 @calloc(i32 %3, i32 8)
%11 = inttoptr i64 %10 to double*
%12 = inttoptr i64 %10 to i8*
%13 = tail call i64 @calloc(i32 %3, i32 8)
%14 = inttoptr i64 %13 to double*
%15 = inttoptr i64 %13 to i8*
%16 = tail call i64 @calloc(i32 %3, i32 8)
%17 = inttoptr i64 %16 to double*
%18 = inttoptr i64 %16 to i8*
%19 = tail call i64 @calloc(i32 %3, i32 8)
%20 = inttoptr i64 %19 to double*
%21 = inttoptr i64 %19 to i8*
%22 = tail call i64 @calloc(i32 %3, i32 8)
%23 = inttoptr i64 %22 to double*
%24 = inttoptr i64 %22 to i8*
%25 = icmp eq i64 %10, 0
%26 = icmp eq i64 %13, 0
%27 = select i1 %25, i1 true, i1 %26
%28 = icmp eq i64 %16, 0
%29 = select i1 %27, i1 true, i1 %28
%30 = icmp eq i64 %19, 0
%31 = select i1 %29, i1 true, i1 %30
%32 = icmp eq i64 %22, 0
%33 = select i1 %31, i1 true, i1 %32
br i1 %33, label %42, label %34
34: ; preds = %9
%35 = zext i32 %3 to i64
%36 = zext i32 %3 to i64
%37 = add nsw i64 %36, -1
%38 = and i64 %36, 1
%39 = icmp eq i64 %37, 0
%40 = and i64 %36, 4294967294
%41 = icmp eq i64 %38, 0
br label %148
42: ; preds = %9
%43 = load i32, i32* @stderr
%44 = tail call i32 @fprintf(i32 %43, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
br label %649
45: ; preds = %188
%46 = zext i32 %3 to i64
%47 = zext i32 %3 to i64
%48 = zext i32 %3 to i64
%49 = zext i32 %3 to i64
%50 = zext i32 %3 to i64
%51 = zext i32 %3 to i64
%52 = getelementptr double, double* %17, i64 %36
%53 = bitcast double* %52 to i8*
%54 = getelementptr double, double* %11, i64 %36
%55 = bitcast double* %54 to i8*
%56 = getelementptr double, double* %20, i64 %36
%57 = bitcast double* %56 to i8*
%58 = getelementptr double, double* %14, i64 %36
%59 = bitcast double* %58 to i8*
%60 = getelementptr double, double* %14, i64 %36
%61 = bitcast double* %60 to i8*
%62 = getelementptr double, double* %11, i64 %36
%63 = bitcast double* %62 to i8*
%64 = getelementptr double, double* %23, i64 %36
%65 = bitcast double* %64 to i8*
%66 = getelementptr double, double* %2, i64 %36
%67 = bitcast double* %66 to i8*
%68 = getelementptr double, double* %17, i64 %36
%69 = and i64 %36, 4294967292
%70 = add nsw i64 %69, -4
%71 = lshr exact i64 %70, 2
%72 = add nuw nsw i64 %71, 1
%73 = and i64 %36, 4294967294
%74 = add nsw i64 %73, -2
%75 = lshr exact i64 %74, 1
%76 = add nuw i64 %75, 1
%77 = and i64 %36, 1
%78 = icmp eq i64 %37, 0
%79 = and i64 %36, 4294967294
%80 = icmp eq i64 %77, 0
%81 = and i64 %36, 3
%82 = icmp ult i64 %37, 3
%83 = and i64 %36, 4294967292
%84 = icmp eq i64 %81, 0
%85 = icmp ult i32 %3, 4
%86 = icmp ugt double* %68, %2
%87 = icmp ult i8* %18, %67
%88 = and i1 %86, %87
%89 = and i64 %36, 4294967292
%90 = and i64 %72, 1
%91 = icmp eq i64 %70, 0
%92 = and i64 %72, 9223372036854775806
%93 = icmp eq i64 %90, 0
%94 = icmp eq i64 %89, %36
%95 = and i64 %36, 1
%96 = icmp eq i64 %95, 0
%97 = sub nsw i64 0, %36
%98 = icmp ult i32 %3, 4
%99 = icmp ult i8* %15, %63
%100 = icmp ult i8* %12, %61
%101 = and i1 %99, %100
%102 = icmp ult i8* %15, %65
%103 = icmp ult i8* %24, %61
%104 = and i1 %102, %103
%105 = or i1 %101, %104
%106 = and i64 %36, 4294967292
%107 = and i64 %72, 1
%108 = icmp eq i64 %70, 0
%109 = and i64 %72, 9223372036854775806
%110 = icmp eq i64 %107, 0
%111 = icmp eq i64 %106, %36
%112 = and i64 %36, 1
%113 = icmp eq i64 %112, 0
%114 = sub nsw i64 0, %36
%115 = and i64 %36, 1
%116 = icmp eq i64 %37, 0
%117 = and i64 %36, 4294967294
%118 = icmp eq i64 %115, 0
%119 = icmp ult i32 %3, 2
%120 = icmp ult i8* %18, %55
%121 = icmp ult i8* %12, %53
%122 = and i1 %120, %121
%123 = icmp ult i8* %18, %57
%124 = icmp ult i8* %21, %53
%125 = and i1 %123, %124
%126 = or i1 %122, %125
%127 = icmp ult i8* %18, %59
%128 = icmp ult i8* %15, %53
%129 = and i1 %127, %128
%130 = or i1 %126, %129
%131 = icmp ult i8* %12, %57
%132 = icmp ult i8* %21, %55
%133 = and i1 %131, %132
%134 = or i1 %130, %133
%135 = icmp ult i8* %12, %59
%136 = icmp ult i8* %15, %55
%137 = and i1 %135, %136
%138 = or i1 %134, %137
%139 = and i64 %36, 4294967294
%140 = and i64 %76, 1
%141 = icmp eq i64 %74, 0
%142 = and i64 %76, -2
%143 = icmp eq i64 %140, 0
%144 = icmp eq i64 %139, %36
%145 = and i64 %36, 1
%146 = icmp eq i64 %145, 0
%147 = sub nsw i64 0, %36
br label %193
148: ; preds = %188, %34
%149 = phi i64 [ 0, %34 ], [ %191, %188 ]
%150 = getelementptr inbounds double, double* %2, i64 %149
store double 0.000000e+00, double* %150
%151 = getelementptr inbounds double, double* %1, i64 %149
%152 = load double, double* %151
%153 = getelementptr inbounds double, double* %11, i64 %149
store double %152, double* %153
br i1 %39, label %176, label %154
154: ; preds = %148, %154
%155 = phi i64 [ %173, %154 ], [ 0, %148 ]
%156 = phi double [ %172, %154 ], [ 0.000000e+00, %148 ]
%157 = phi i64 [ %174, %154 ], [ 0, %148 ]
%158 = mul nsw i64 %155, %35
%159 = add nuw nsw i64 %158, %149
%160 = getelementptr inbounds double, double* %0, i64 %159
%161 = load double, double* %160
%162 = getelementptr inbounds double, double* %1, i64 %155
%163 = load double, double* %162
%164 = tail call double @llvm.fmuladd.f64(double %161, double %163, double %156)
%165 = or i64 %155, 1
%166 = mul nsw i64 %165, %35
%167 = add nuw nsw i64 %166, %149
%168 = getelementptr inbounds double, double* %0, i64 %167
%169 = load double, double* %168
%170 = getelementptr inbounds double, double* %1, i64 %165
%171 = load double, double* %170
%172 = tail call double @llvm.fmuladd.f64(double %169, double %171, double %164)
%173 = add nuw nsw i64 %155, 2
%174 = add i64 %157, 2
%175 = icmp eq i64 %174, %40
br i1 %175, label %176, label %154
176: ; preds = %154, %148
%177 = phi double [ undef, %148 ], [ %172, %154 ]
%178 = phi i64 [ 0, %148 ], [ %173, %154 ]
%179 = phi double [ 0.000000e+00, %148 ], [ %172, %154 ]
br i1 %41, label %188, label %180
180: ; preds = %176
%181 = mul nsw i64 %178, %35
%182 = add nuw nsw i64 %181, %149
%183 = getelementptr inbounds double, double* %0, i64 %182
%184 = load double, double* %183
%185 = getelementptr inbounds double, double* %1, i64 %178
%186 = load double, double* %185
%187 = tail call double @llvm.fmuladd.f64(double %184, double %186, double %179)
br label %188
188: ; preds = %176, %180
%189 = phi double [ %177, %176 ], [ %187, %180 ]
%190 = getelementptr inbounds double, double* %17, i64 %149
store double %189, double* %190
%191 = add nuw nsw i64 %149, 1
%192 = icmp eq i64 %191, %36
br i1 %192, label %45, label %148
193: ; preds = %636, %45
%194 = phi i32 [ %637, %636 ], [ 1, %45 ]
br label %195
195: ; preds = %232, %193
%196 = phi i64 [ 0, %193 ], [ %235, %232 ]
%197 = phi double [ 0.000000e+00, %193 ], [ %234, %232 ]
br i1 %78, label %220, label %198
198: ; preds = %195, %198
%199 = phi i64 [ %217, %198 ], [ 0, %195 ]
%200 = phi double [ %216, %198 ], [ 0.000000e+00, %195 ]
%201 = phi i64 [ %218, %198 ], [ 0, %195 ]
%202 = mul nsw i64 %199, %35
%203 = add nuw nsw i64 %202, %196
%204 = getelementptr inbounds double, double* %0, i64 %203
%205 = load double, double* %204
%206 = getelementptr inbounds double, double* %11, i64 %199
%207 = load double, double* %206
%208 = tail call double @llvm.fmuladd.f64(double %205, double %207, double %200)
%209 = or i64 %199, 1
%210 = mul nsw i64 %209, %35
%211 = add nuw nsw i64 %210, %196
%212 = getelementptr inbounds double, double* %0, i64 %211
%213 = load double, double* %212
%214 = getelementptr inbounds double, double* %11, i64 %209
%215 = load double, double* %214
%216 = tail call double @llvm.fmuladd.f64(double %213, double %215, double %208)
%217 = add nuw nsw i64 %199, 2
%218 = add i64 %201, 2
%219 = icmp eq i64 %218, %79
br i1 %219, label %220, label %198
220: ; preds = %198, %195
%221 = phi double [ undef, %195 ], [ %216, %198 ]
%222 = phi i64 [ 0, %195 ], [ %217, %198 ]
%223 = phi double [ 0.000000e+00, %195 ], [ %216, %198 ]
br i1 %80, label %232, label %224
224: ; preds = %220
%225 = mul nsw i64 %222, %35
%226 = add nuw nsw i64 %225, %196
%227 = getelementptr inbounds double, double* %0, i64 %226
%228 = load double, double* %227
%229 = getelementptr inbounds double, double* %11, i64 %222
%230 = load double, double* %229
%231 = tail call double @llvm.fmuladd.f64(double %228, double %230, double %223)
br label %232
232: ; preds = %220, %224
%233 = phi double [ %221, %220 ], [ %231, %224 ]
%234 = tail call double @llvm.fmuladd.f64(double %233, double %233, double %197)
%235 = add nuw nsw i64 %196, 1
%236 = icmp eq i64 %235, %46
br i1 %236, label %237, label %195
237: ; preds = %232, %292
%238 = phi i64 [ %296, %292 ], [ 0, %232 ]
%239 = phi double [ %295, %292 ], [ 0.000000e+00, %232 ]
%240 = mul nsw i64 %238, %35
br i1 %82, label %275, label %241
241: ; preds = %237, %241
%242 = phi i64 [ %272, %241 ], [ 0, %237 ]
%243 = phi double [ %271, %241 ], [ 0.000000e+00, %237 ]
%244 = phi i64 [ %273, %241 ], [ 0, %237 ]
%245 = add nuw nsw i64 %242, %240
%246 = getelementptr inbounds double, double* %0, i64 %245
%247 = load double, double* %246
%248 = getelementptr inbounds double, double* %17, i64 %242
%249 = load double, double* %248
%250 = tail call double @llvm.fmuladd.f64(double %247, double %249, double %243)
%251 = or i64 %242, 1
%252 = add nuw nsw i64 %251, %240
%253 = getelementptr inbounds double, double* %0, i64 %252
%254 = load double, double* %253
%255 = getelementptr inbounds double, double* %17, i64 %251
%256 = load double, double* %255
%257 = tail call double @llvm.fmuladd.f64(double %254, double %256, double %250)
%258 = or i64 %242, 2
%259 = add nuw nsw i64 %258, %240
%260 = getelementptr inbounds double, double* %0, i64 %259
%261 = load double, double* %260
%262 = getelementptr inbounds double, double* %17, i64 %258
%263 = load double, double* %262
%264 = tail call double @llvm.fmuladd.f64(double %261, double %263, double %257)
%265 = or i64 %242, 3
%266 = add nuw nsw i64 %265, %240
%267 = getelementptr inbounds double, double* %0, i64 %266
%268 = load double, double* %267
%269 = getelementptr inbounds double, double* %17, i64 %265
%270 = load double, double* %269
%271 = tail call double @llvm.fmuladd.f64(double %268, double %270, double %264)
%272 = add nuw nsw i64 %242, 4
%273 = add i64 %244, 4
%274 = icmp eq i64 %273, %83
br i1 %274, label %275, label %241
275: ; preds = %241, %237
%276 = phi double [ undef, %237 ], [ %271, %241 ]
%277 = phi i64 [ 0, %237 ], [ %272, %241 ]
%278 = phi double [ 0.000000e+00, %237 ], [ %271, %241 ]
br i1 %84, label %292, label %279
279: ; preds = %275, %279
%280 = phi i64 [ %289, %279 ], [ %277, %275 ]
%281 = phi double [ %288, %279 ], [ %278, %275 ]
%282 = phi i64 [ %290, %279 ], [ 0, %275 ]
%283 = add nuw nsw i64 %280, %240
%284 = getelementptr inbounds double, double* %0, i64 %283
%285 = load double, double* %284
%286 = getelementptr inbounds double, double* %17, i64 %280
%287 = load double, double* %286
%288 = tail call double @llvm.fmuladd.f64(double %285, double %287, double %281)
%289 = add nuw nsw i64 %280, 1
%290 = add i64 %282, 1
%291 = icmp eq i64 %290, %81
br i1 %291, label %292, label %279
292: ; preds = %279, %275
%293 = phi double [ %276, %275 ], [ %288, %279 ]
%294 = getelementptr inbounds double, double* %23, i64 %238
store double %293, double* %294
%295 = tail call double @llvm.fmuladd.f64(double %293, double %293, double %239)
%296 = add nuw nsw i64 %238, 1
%297 = icmp eq i64 %296, %47
br i1 %297, label %298, label %237
298: ; preds = %292
%299 = fdiv double %234, %295
%300 = select i1 %85, i1 true, i1 %88
br i1 %300, label %365, label %301
301: ; preds = %298
%302 = insertelement <2 x double> poison, double %299, i64 0
%303 = shufflevector <2 x double> %302, <2 x double> poison, <2 x i32> zeroinitializer
%304 = insertelement <2 x double> poison, double %299, i64 0
%305 = shufflevector <2 x double> %304, <2 x double> poison, <2 x i32> zeroinitializer
br i1 %91, label %345, label %306
306: ; preds = %301, %306
%307 = phi i64 [ %342, %306 ], [ 0, %301 ]
%308 = phi i64 [ %343, %306 ], [ 0, %301 ]
%309 = getelementptr inbounds double, double* %17, i64 %307
%310 = bitcast double* %309 to <2 x double>*
%311 = load <2 x double>, <2 x double>* %310
%312 = getelementptr inbounds double, double* %309, i64 2
%313 = bitcast double* %312 to <2 x double>*
%314 = load <2 x double>, <2 x double>* %313
%315 = getelementptr inbounds double, double* %2, i64 %307
%316 = bitcast double* %315 to <2 x double>*
%317 = load <2 x double>, <2 x double>* %316
%318 = getelementptr inbounds double, double* %315, i64 2
%319 = bitcast double* %318 to <2 x double>*
%320 = load <2 x double>, <2 x double>* %319
%321 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %303, <2 x double> %311, <2 x double> %317)
%322 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %305, <2 x double> %314, <2 x double> %320)
%323 = bitcast double* %315 to <2 x double>*
store <2 x double> %321, <2 x double>* %323
%324 = bitcast double* %318 to <2 x double>*
store <2 x double> %322, <2 x double>* %324
%325 = or i64 %307, 4
%326 = getelementptr inbounds double, double* %17, i64 %325
%327 = bitcast double* %326 to <2 x double>*
%328 = load <2 x double>, <2 x double>* %327
%329 = getelementptr inbounds double, double* %326, i64 2
%330 = bitcast double* %329 to <2 x double>*
%331 = load <2 x double>, <2 x double>* %330
%332 = getelementptr inbounds double, double* %2, i64 %325
%333 = bitcast double* %332 to <2 x double>*
%334 = load <2 x double>, <2 x double>* %333
%335 = getelementptr inbounds double, double* %332, i64 2
%336 = bitcast double* %335 to <2 x double>*
%337 = load <2 x double>, <2 x double>* %336
%338 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %303, <2 x double> %328, <2 x double> %334)
%339 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %305, <2 x double> %331, <2 x double> %337)
%340 = bitcast double* %332 to <2 x double>*
store <2 x double> %338, <2 x double>* %340
%341 = bitcast double* %335 to <2 x double>*
store <2 x double> %339, <2 x double>* %341
%342 = add nuw i64 %307, 8
%343 = add i64 %308, 2
%344 = icmp eq i64 %343, %92
br i1 %344, label %345, label %306
345: ; preds = %306, %301
%346 = phi i64 [ 0, %301 ], [ %342, %306 ]
br i1 %93, label %364, label %347
347: ; preds = %345
%348 = getelementptr inbounds double, double* %17, i64 %346
%349 = bitcast double* %348 to <2 x double>*
%350 = load <2 x double>, <2 x double>* %349
%351 = getelementptr inbounds double, double* %348, i64 2
%352 = bitcast double* %351 to <2 x double>*
%353 = load <2 x double>, <2 x double>* %352
%354 = getelementptr inbounds double, double* %2, i64 %346
%355 = bitcast double* %354 to <2 x double>*
%356 = load <2 x double>, <2 x double>* %355
%357 = getelementptr inbounds double, double* %354, i64 2
%358 = bitcast double* %357 to <2 x double>*
%359 = load <2 x double>, <2 x double>* %358
%360 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %303, <2 x double> %350, <2 x double> %356)
%361 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %305, <2 x double> %353, <2 x double> %359)
%362 = bitcast double* %354 to <2 x double>*
store <2 x double> %360, <2 x double>* %362
%363 = bitcast double* %357 to <2 x double>*
store <2 x double> %361, <2 x double>* %363
br label %364
364: ; preds = %345, %347
br i1 %94, label %393, label %365
365: ; preds = %298, %364
%366 = phi i64 [ 0, %298 ], [ %89, %364 ]
%367 = xor i64 %366, -1
br i1 %96, label %375, label %368
368: ; preds = %365
%369 = getelementptr inbounds double, double* %17, i64 %366
%370 = load double, double* %369
%371 = getelementptr inbounds double, double* %2, i64 %366
%372 = load double, double* %371
%373 = tail call double @llvm.fmuladd.f64(double %299, double %370, double %372)
store double %373, double* %371
%374 = or i64 %366, 1
br label %375
375: ; preds = %368, %365
%376 = phi i64 [ %366, %365 ], [ %374, %368 ]
%377 = icmp eq i64 %367, %97
br i1 %377, label %393, label %378
378: ; preds = %375, %378
%379 = phi i64 [ %391, %378 ], [ %376, %375 ]
%380 = getelementptr inbounds double, double* %17, i64 %379
%381 = load double, double* %380
%382 = getelementptr inbounds double, double* %2, i64 %379
%383 = load double, double* %382
%384 = tail call double @llvm.fmuladd.f64(double %299, double %381, double %383)
store double %384, double* %382
%385 = add nuw nsw i64 %379, 1
%386 = getelementptr inbounds double, double* %17, i64 %385
%387 = load double, double* %386
%388 = getelementptr inbounds double, double* %2, i64 %385
%389 = load double, double* %388
%390 = tail call double @llvm.fmuladd.f64(double %299, double %387, double %389)
store double %390, double* %388
%391 = add nuw nsw i64 %379, 2
%392 = icmp eq i64 %391, %48
br i1 %392, label %393, label %378
393: ; preds = %375, %378, %364
%394 = icmp eq i32 %194, %3
br i1 %394, label %638, label %395
395: ; preds = %393
%396 = fneg double %299
%397 = select i1 %98, i1 true, i1 %105
br i1 %397, label %468, label %398
398: ; preds = %395
%399 = insertelement <2 x double> poison, double %396, i64 0
%400 = shufflevector <2 x double> %399, <2 x double> poison, <2 x i32> zeroinitializer
%401 = insertelement <2 x double> poison, double %396, i64 0
%402 = shufflevector <2 x double> %401, <2 x double> poison, <2 x i32> zeroinitializer
br i1 %108, label %446, label %403
403: ; preds = %398, %403
%404 = phi i64 [ %443, %403 ], [ 0, %398 ]
%405 = phi i64 [ %444, %403 ], [ 0, %398 ]
%406 = getelementptr inbounds double, double* %11, i64 %404
%407 = bitcast double* %406 to <2 x double>*
%408 = load <2 x double>, <2 x double>* %407
%409 = getelementptr inbounds double, double* %406, i64 2
%410 = bitcast double* %409 to <2 x double>*
%411 = load <2 x double>, <2 x double>* %410
%412 = getelementptr inbounds double, double* %23, i64 %404
%413 = bitcast double* %412 to <2 x double>*
%414 = load <2 x double>, <2 x double>* %413
%415 = getelementptr inbounds double, double* %412, i64 2
%416 = bitcast double* %415 to <2 x double>*
%417 = load <2 x double>, <2 x double>* %416
%418 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %400, <2 x double> %414, <2 x double> %408)
%419 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %402, <2 x double> %417, <2 x double> %411)
%420 = getelementptr inbounds double, double* %14, i64 %404
%421 = bitcast double* %420 to <2 x double>*
store <2 x double> %418, <2 x double>* %421
%422 = getelementptr inbounds double, double* %420, i64 2
%423 = bitcast double* %422 to <2 x double>*
store <2 x double> %419, <2 x double>* %423
%424 = or i64 %404, 4
%425 = getelementptr inbounds double, double* %11, i64 %424
%426 = bitcast double* %425 to <2 x double>*
%427 = load <2 x double>, <2 x double>* %426
%428 = getelementptr inbounds double, double* %425, i64 2
%429 = bitcast double* %428 to <2 x double>*
%430 = load <2 x double>, <2 x double>* %429
%431 = getelementptr inbounds double, double* %23, i64 %424
%432 = bitcast double* %431 to <2 x double>*
%433 = load <2 x double>, <2 x double>* %432
%434 = getelementptr inbounds double, double* %431, i64 2
%435 = bitcast double* %434 to <2 x double>*
%436 = load <2 x double>, <2 x double>* %435
%437 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %400, <2 x double> %433, <2 x double> %427)
%438 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %402, <2 x double> %436, <2 x double> %430)
%439 = getelementptr inbounds double, double* %14, i64 %424
%440 = bitcast double* %439 to <2 x double>*
store <2 x double> %437, <2 x double>* %440
%441 = getelementptr inbounds double, double* %439, i64 2
%442 = bitcast double* %441 to <2 x double>*
store <2 x double> %438, <2 x double>* %442
%443 = add nuw i64 %404, 8
%444 = add i64 %405, 2
%445 = icmp eq i64 %444, %109
br i1 %445, label %446, label %403
446: ; preds = %403, %398
%447 = phi i64 [ 0, %398 ], [ %443, %403 ]
br i1 %110, label %467, label %448
448: ; preds = %446
%449 = getelementptr inbounds double, double* %11, i64 %447
%450 = bitcast double* %449 to <2 x double>*
%451 = load <2 x double>, <2 x double>* %450
%452 = getelementptr inbounds double, double* %449, i64 2
%453 = bitcast double* %452 to <2 x double>*
%454 = load <2 x double>, <2 x double>* %453
%455 = getelementptr inbounds double, double* %23, i64 %447
%456 = bitcast double* %455 to <2 x double>*
%457 = load <2 x double>, <2 x double>* %456
%458 = getelementptr inbounds double, double* %455, i64 2
%459 = bitcast double* %458 to <2 x double>*
%460 = load <2 x double>, <2 x double>* %459
%461 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %400, <2 x double> %457, <2 x double> %451)
%462 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %402, <2 x double> %460, <2 x double> %454)
%463 = getelementptr inbounds double, double* %14, i64 %447
%464 = bitcast double* %463 to <2 x double>*
store <2 x double> %461, <2 x double>* %464
%465 = getelementptr inbounds double, double* %463, i64 2
%466 = bitcast double* %465 to <2 x double>*
store <2 x double> %462, <2 x double>* %466
br label %467
467: ; preds = %446, %448
br i1 %111, label %499, label %468
468: ; preds = %395, %467
%469 = phi i64 [ 0, %395 ], [ %106, %467 ]
%470 = xor i64 %469, -1
br i1 %113, label %479, label %471
471: ; preds = %468
%472 = getelementptr inbounds double, double* %11, i64 %469
%473 = load double, double* %472
%474 = getelementptr inbounds double, double* %23, i64 %469
%475 = load double, double* %474
%476 = tail call double @llvm.fmuladd.f64(double %396, double %475, double %473)
%477 = getelementptr inbounds double, double* %14, i64 %469
store double %476, double* %477
%478 = or i64 %469, 1
br label %479
479: ; preds = %471, %468
%480 = phi i64 [ %469, %468 ], [ %478, %471 ]
%481 = icmp eq i64 %470, %114
br i1 %481, label %499, label %482
482: ; preds = %479, %482
%483 = phi i64 [ %497, %482 ], [ %480, %479 ]
%484 = getelementptr inbounds double, double* %11, i64 %483
%485 = load double, double* %484
%486 = getelementptr inbounds double, double* %23, i64 %483
%487 = load double, double* %486
%488 = tail call double @llvm.fmuladd.f64(double %396, double %487, double %485)
%489 = getelementptr inbounds double, double* %14, i64 %483
store double %488, double* %489
%490 = add nuw nsw i64 %483, 1
%491 = getelementptr inbounds double, double* %11, i64 %490
%492 = load double, double* %491
%493 = getelementptr inbounds double, double* %23, i64 %490
%494 = load double, double* %493
%495 = tail call double @llvm.fmuladd.f64(double %396, double %494, double %492)
%496 = getelementptr inbounds double, double* %14, i64 %490
store double %495, double* %496
%497 = add nuw nsw i64 %483, 2
%498 = icmp eq i64 %497, %49
br i1 %498, label %499, label %482
499: ; preds = %479, %482, %467
br label %500
500: ; preds = %499, %537
%501 = phi i64 [ %541, %537 ], [ 0, %499 ]
%502 = phi double [ %540, %537 ], [ 0.000000e+00, %499 ]
br i1 %116, label %525, label %503
503: ; preds = %500, %503
%504 = phi i64 [ %522, %503 ], [ 0, %500 ]
%505 = phi double [ %521, %503 ], [ 0.000000e+00, %500 ]
%506 = phi i64 [ %523, %503 ], [ 0, %500 ]
%507 = mul nsw i64 %504, %35
%508 = add nuw nsw i64 %507, %501
%509 = getelementptr inbounds double, double* %0, i64 %508
%510 = load double, double* %509
%511 = getelementptr inbounds double, double* %14, i64 %504
%512 = load double, double* %511
%513 = tail call double @llvm.fmuladd.f64(double %510, double %512, double %505)
%514 = or i64 %504, 1
%515 = mul nsw i64 %514, %35
%516 = add nuw nsw i64 %515, %501
%517 = getelementptr inbounds double, double* %0, i64 %516
%518 = load double, double* %517
%519 = getelementptr inbounds double, double* %14, i64 %514
%520 = load double, double* %519
%521 = tail call double @llvm.fmuladd.f64(double %518, double %520, double %513)
%522 = add nuw nsw i64 %504, 2
%523 = add i64 %506, 2
%524 = icmp eq i64 %523, %117
br i1 %524, label %525, label %503
525: ; preds = %503, %500
%526 = phi double [ undef, %500 ], [ %521, %503 ]
%527 = phi i64 [ 0, %500 ], [ %522, %503 ]
%528 = phi double [ 0.000000e+00, %500 ], [ %521, %503 ]
br i1 %118, label %537, label %529
529: ; preds = %525
%530 = mul nsw i64 %527, %35
%531 = add nuw nsw i64 %530, %501
%532 = getelementptr inbounds double, double* %0, i64 %531
%533 = load double, double* %532
%534 = getelementptr inbounds double, double* %14, i64 %527
%535 = load double, double* %534
%536 = tail call double @llvm.fmuladd.f64(double %533, double %535, double %528)
br label %537
537: ; preds = %525, %529
%538 = phi double [ %526, %525 ], [ %536, %529 ]
%539 = getelementptr inbounds double, double* %20, i64 %501
store double %538, double* %539
%540 = tail call double @llvm.fmuladd.f64(double %538, double %538, double %502)
%541 = add nuw nsw i64 %501, 1
%542 = icmp eq i64 %541, %50
br i1 %542, label %543, label %500
543: ; preds = %537
%544 = fdiv double %540, %234
%545 = select i1 %119, i1 true, i1 %138
br i1 %545, label %599, label %546
546: ; preds = %543
%547 = insertelement <2 x double> poison, double %544, i64 0
%548 = shufflevector <2 x double> %547, <2 x double> poison, <2 x i32> zeroinitializer
br i1 %141, label %582, label %549
549: ; preds = %546, %549
%550 = phi i64 [ %579, %549 ], [ 0, %546 ]
%551 = phi i64 [ %580, %549 ], [ 0, %546 ]
%552 = getelementptr inbounds double, double* %20, i64 %550
%553 = bitcast double* %552 to <2 x double>*
%554 = load <2 x double>, <2 x double>* %553
%555 = getelementptr inbounds double, double* %17, i64 %550
%556 = bitcast double* %555 to <2 x double>*
%557 = load <2 x double>, <2 x double>* %556
%558 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %548, <2 x double> %557, <2 x double> %554)
%559 = bitcast double* %555 to <2 x double>*
store <2 x double> %558, <2 x double>* %559
%560 = getelementptr inbounds double, double* %14, i64 %550
%561 = bitcast double* %560 to <2 x double>*
%562 = load <2 x double>, <2 x double>* %561
%563 = getelementptr inbounds double, double* %11, i64 %550
%564 = bitcast double* %563 to <2 x double>*
store <2 x double> %562, <2 x double>* %564
%565 = or i64 %550, 2
%566 = getelementptr inbounds double, double* %20, i64 %565
%567 = bitcast double* %566 to <2 x double>*
%568 = load <2 x double>, <2 x double>* %567
%569 = getelementptr inbounds double, double* %17, i64 %565
%570 = bitcast double* %569 to <2 x double>*
%571 = load <2 x double>, <2 x double>* %570
%572 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %548, <2 x double> %571, <2 x double> %568)
%573 = bitcast double* %569 to <2 x double>*
store <2 x double> %572, <2 x double>* %573
%574 = getelementptr inbounds double, double* %14, i64 %565
%575 = bitcast double* %574 to <2 x double>*
%576 = load <2 x double>, <2 x double>* %575
%577 = getelementptr inbounds double, double* %11, i64 %565
%578 = bitcast double* %577 to <2 x double>*
store <2 x double> %576, <2 x double>* %578
%579 = add nuw i64 %550, 4
%580 = add nuw i64 %551, 2
%581 = icmp eq i64 %580, %142
br i1 %581, label %582, label %549
582: ; preds = %549, %546
%583 = phi i64 [ 0, %546 ], [ %579, %549 ]
br i1 %143, label %598, label %584
584: ; preds = %582
%585 = getelementptr inbounds double, double* %20, i64 %583
%586 = bitcast double* %585 to <2 x double>*
%587 = load <2 x double>, <2 x double>* %586
%588 = getelementptr inbounds double, double* %17, i64 %583
%589 = bitcast double* %588 to <2 x double>*
%590 = load <2 x double>, <2 x double>* %589
%591 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %548, <2 x double> %590, <2 x double> %587)
%592 = bitcast double* %588 to <2 x double>*
store <2 x double> %591, <2 x double>* %592
%593 = getelementptr inbounds double, double* %14, i64 %583
%594 = bitcast double* %593 to <2 x double>*
%595 = load <2 x double>, <2 x double>* %594
%596 = getelementptr inbounds double, double* %11, i64 %583
%597 = bitcast double* %596 to <2 x double>*
store <2 x double> %595, <2 x double>* %597
br label %598
598: ; preds = %582, %584
br i1 %144, label %636, label %599
599: ; preds = %543, %598
%600 = phi i64 [ 0, %543 ], [ %139, %598 ]
%601 = xor i64 %600, -1
br i1 %146, label %612, label %602
602: ; preds = %599
%603 = getelementptr inbounds double, double* %20, i64 %600
%604 = load double, double* %603
%605 = getelementptr inbounds double, double* %17, i64 %600
%606 = load double, double* %605
%607 = tail call double @llvm.fmuladd.f64(double %544, double %606, double %604)
store double %607, double* %605
%608 = getelementptr inbounds double, double* %14, i64 %600
%609 = load double, double* %608
%610 = getelementptr inbounds double, double* %11, i64 %600
store double %609, double* %610
%611 = or i64 %600, 1
br label %612
612: ; preds = %602, %599
%613 = phi i64 [ %600, %599 ], [ %611, %602 ]
%614 = icmp eq i64 %601, %147
br i1 %614, label %636, label %615
615: ; preds = %612, %615
%616 = phi i64 [ %634, %615 ], [ %613, %612 ]
%617 = getelementptr inbounds double, double* %20, i64 %616
%618 = load double, double* %617
%619 = getelementptr inbounds double, double* %17, i64 %616
%620 = load double, double* %619
%621 = tail call double @llvm.fmuladd.f64(double %544, double %620, double %618)
store double %621, double* %619
%622 = getelementptr inbounds double, double* %14, i64 %616
%623 = load double, double* %622
%624 = getelementptr inbounds double, double* %11, i64 %616
store double %623, double* %624
%625 = add nuw nsw i64 %616, 1
%626 = getelementptr inbounds double, double* %20, i64 %625
%627 = load double, double* %626
%628 = getelementptr inbounds double, double* %17, i64 %625
%629 = load double, double* %628
%630 = tail call double @llvm.fmuladd.f64(double %544, double %629, double %627)
store double %630, double* %628
%631 = getelementptr inbounds double, double* %14, i64 %625
%632 = load double, double* %631
%633 = getelementptr inbounds double, double* %11, i64 %625
store double %632, double* %633
%634 = add nuw nsw i64 %616, 2
%635 = icmp eq i64 %634, %51
br i1 %635, label %636, label %615
636: ; preds = %612, %615, %598
%637 = add nuw nsw i32 %194, 1
br label %193
638: ; preds = %393
%639 = inttoptr i64 %10 to i8*
%640 = tail call i32 @free(i8* %639)
%641 = inttoptr i64 %13 to i8*
%642 = tail call i32 @free(i8* %641)
%643 = inttoptr i64 %16 to i8*
%644 = tail call i32 @free(i8* %643)
%645 = inttoptr i64 %19 to i8*
%646 = tail call i32 @free(i8* %645)
%647 = inttoptr i64 %22 to i8*
%648 = tail call i32 @free(i8* %647)
br label %649
649: ; preds = %638, %42, %6
%650 = phi i32 [ -1, %6 ], [ 999, %42 ], [ 0, %638 ]
ret i32 %650
}