#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ free(double *);
double l2norm(double *, int);
int /*<<< orphan*/ madd(double *, double *, double *, int, int);
scalar_t__ malloc(int);
int /*<<< orphan*/ mdisplay(double *, int, int);
int /*<<< orphan*/ mmult(double *, double *, double *, int, int, int);
int /*<<< orphan*/ msub(double *, double *, double *, int, int);
double pow(double, double);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scale(double *, int, int, double);
double sqrt(double);
int cgr(double *xi, int N, double *A, double *b, double *xf) {
  int i, rcode;
  int iter, siter;
  double *temp, *rk, *pk, *dx, *jac, *apk;
  double stol, gtol, bn;
  temp = (double *)malloc(sizeof(double) * 8);
  rk = (double *)malloc(sizeof(double) * N);
  pk = (double *)malloc(sizeof(double) * N);
  apk = (double *)malloc(sizeof(double) * N);
  dx = (double *)malloc(sizeof(double) * N);
  jac = (double *)malloc(sizeof(double) * N);
  iter = 0;
  rcode = 0;
  siter = (int)1000;
  gtol = pow((double)1e-15, 1.0 / 3.0);
  stol = gtol * gtol;
  mmult(A, xi, rk, N, N, 1);
  msub(rk, b, rk, N, 1);
  for (i = 0; i < N; ++i) {
    pk[i] = -rk[i];
    xf[i] = xi[i];
  }
  bn = l2norm(b, N);
  while (rcode == 0 && iter < siter) {
    iter++;
    mmult(rk, rk, temp, 1, N, 1);
    mmult(A, pk, apk, N, N, 1);
    mmult(pk, apk, temp + 1, 1, N, 1);
    temp[2] = temp[0] / temp[1];
    for (i = 0; i < N; ++i) {
      xf[i] = xi[i] + temp[2] * pk[i];
      apk[i] *= temp[2];
    }
    madd(rk, apk, rk, 1, N);
    mmult(rk, rk, temp + 3, 1, N, 1);
    if (sqrt(temp[3]) <= stol * bn) {
      rcode = 1;
    }
    temp[4] = temp[3] / temp[0];
    scale(pk, N, 1, temp[4]);
    mdisplay(xf, 1, N);
    msub(pk, rk, pk, N, 1);
    printf("%d \n", iter);
    for (i = 0; i < N; ++i) {
      xi[i] = xf[i];
    }
  }
  free(temp);
  free(rk);
  free(pk);
  free(dx);
  free(jac);
  free(apk);
  return rcode;
}


x86 assembly (clang, -O0):
<cgr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    $0x40,%edi
call   1090 <malloc@plt>
mov    %rax,-0x40(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x48(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x50(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x68(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x58(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x3e8,-0x38(%rbp)
movsd  0xda8(%rip),%xmm0
movsd  0xda8(%rip),%xmm1
call   10c0 <pow@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    $0x1,%r9d
call   1050 <mmult@plt>
mov    -0x48(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    $0x1,%r8d
call   1060 <msub@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    131d <cgr+0x16d>
mov    -0x48(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x50(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12b8 <cgr+0x108>
mov    -0x20(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <l2norm@plt>
movsd  %xmm0,-0x80(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x30(%rbp)
mov    %al,-0x81(%rbp)
jne    134f <cgr+0x19f>
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
setl   %al
mov    %al,-0x81(%rbp)
mov    -0x81(%rbp),%al
test   $0x1,%al
jne    1362 <cgr+0x1b2>
jmp    156d <cgr+0x3bd>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x48(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0xc(%rbp),%r8d
mov    $0x1,%r9d
mov    %r9d,%ecx
call   1050 <mmult@plt>
mov    -0x18(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    $0x1,%r9d
call   1050 <mmult@plt>
mov    -0x50(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    -0x40(%rbp),%rdx
add    $0x8,%rdx
mov    -0xc(%rbp),%r8d
mov    $0x1,%r9d
mov    %r9d,%ecx
call   1050 <mmult@plt>
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x40(%rbp),%rax
divsd  0x8(%rax),%xmm0
mov    -0x40(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1457 <cgr+0x2a7>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x40(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x68(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    13ea <cgr+0x23a>
mov    -0x48(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0xc(%rbp),%r8d
mov    $0x1,%ecx
call   10b0 <madd@plt>
mov    -0x48(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x40(%rbp),%rdx
add    $0x18,%rdx
mov    -0xc(%rbp),%r8d
mov    $0x1,%r9d
mov    %r9d,%ecx
call   1050 <mmult@plt>
mov    -0x40(%rbp),%rax
movsd  0x18(%rax),%xmm0
call   10d0 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     14bf <cgr+0x30f>
movl   $0x1,-0x30(%rbp)
mov    -0x40(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x40(%rbp),%rax
divsd  (%rax),%xmm0
mov    -0x40(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x50(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x40(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    $0x1,%edx
call   10a0 <scale@plt>
mov    -0x28(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    $0x1,%esi
call   1080 <mdisplay@plt>
mov    -0x50(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x50(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    $0x1,%r8d
call   1060 <msub@plt>
mov    -0x34(%rbp),%esi
lea    0xae8(%rip),%rdi
call   1070 <printf@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1568 <cgr+0x3b8>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1534 <cgr+0x384>
jmp    132e <cgr+0x17e>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgr>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xe8,%rsp
mov    %r8,%rbx
mov    %rcx,0x10(%rsp)
mov    %rdx,0x70(%rsp)
mov    %esi,%ebp
mov    %rbp,0x28(%rsp)
mov    %rdi,%r15
mov    $0x40,%edi
call   1090 <malloc@plt>
mov    %rax,0x38(%rsp)
lea    0x0(,%rbp,8),%r12d
mov    %r12d,%edi
call   1090 <malloc@plt>
mov    %rax,%r13
mov    %r12d,%edi
call   1090 <malloc@plt>
mov    %rax,%r14
mov    %r12d,%edi
call   1090 <malloc@plt>
mov    %rax,%rbp
mov    %r12d,%edi
call   1090 <malloc@plt>
mov    %rax,0x80(%rsp)
mov    %r12d,%edi
call   1090 <malloc@plt>
mov    %rax,0x78(%rsp)
mov    0x70(%rsp),%rdi
mov    %r15,%rsi
mov    %r13,%rdx
mov    0x28(%rsp),%r12
mov    %r12d,%ecx
mov    %r12d,%r8d
mov    $0x1,%r9d
call   1050 <mmult@plt>
mov    %r13,%rdi
mov    0x10(%rsp),%rsi
mov    %r13,%rdx
mov    %r12d,%ecx
mov    $0x1,%r8d
call   1060 <msub@plt>
mov    0x10(%rsp),%rdi
mov    %r12d,%r8d
test   %r12d,%r12d
mov    %r14,0x20(%rsp)
mov    %r8,0x18(%rsp)
jle    14d4 <cgr+0x334>
cmpl   $0x4,0x28(%rsp)
jae    1280 <cgr+0xe0>
xor    %eax,%eax
jmp    144a <cgr+0x2aa>
mov    0x20(%rsp),%rcx
lea    (%rcx,%r8,8),%rax
lea    (%rbx,%r8,8),%rdi
lea    0x0(,%r8,8),%rsi
add    %r13,%rsi
lea    (%r15,%r8,8),%rdx
cmp    %rdi,%rcx
setb   0x30(%rsp)
cmp    %rbx,%rax
seta   %r9b
cmp    %rsi,%rcx
setb   %r14b
cmp    %rax,%r13
setb   %r8b
cmp    %rdx,%rcx
setb   %r11b
cmp    %r15,%rax
seta   %r10b
cmp    %rbx,%rsi
seta   %sil
cmp    %rdi,%r13
setb   %cl
cmp    %rbx,%rdx
seta   %r12b
cmp    %r15,%rdi
seta   %dl
xor    %eax,%eax
test   %r9b,0x30(%rsp)
jne    1440 <cgr+0x2a0>
and    %r8b,%r14b
jne    1440 <cgr+0x2a0>
and    %r10b,%r11b
mov    0x18(%rsp),%r8
jne    1445 <cgr+0x2a5>
and    %cl,%sil
jne    1445 <cgr+0x2a5>
and    %dl,%r12b
mov    0x10(%rsp),%rdi
jne    144a <cgr+0x2aa>
mov    %r8d,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rcx
mov    %rcx,%r9
shr    $0x2,%r9
add    $0x1,%r9
test   %rcx,%rcx
je     1436 <cgr+0x296>
movabs $0x7ffffffffffffffc,%rcx
ff ff 7f
lea    0x2(%rcx),%rsi
and    %r9,%rsi
xor    %ecx,%ecx
movapd 0xcab(%rip),%xmm0
mov    0x20(%rsp),%rdx
nopw   0x0(%rax,%rax,1)
movupd 0x0(%r13,%rcx,8),%xmm1
movupd 0x10(%r13,%rcx,8),%xmm2
xorpd  %xmm0,%xmm1
xorpd  %xmm0,%xmm2
movupd %xmm1,(%rdx,%rcx,8)
movupd %xmm2,0x10(%rdx,%rcx,8)
movups (%r15,%rcx,8),%xmm1
movups 0x10(%r15,%rcx,8),%xmm2
movups %xmm1,(%rbx,%rcx,8)
movups %xmm2,0x10(%rbx,%rcx,8)
movupd 0x20(%r13,%rcx,8),%xmm1
movupd 0x30(%r13,%rcx,8),%xmm2
xorpd  %xmm0,%xmm1
xorpd  %xmm0,%xmm2
movupd %xmm1,0x20(%rdx,%rcx,8)
movupd %xmm2,0x30(%rdx,%rcx,8)
movupd 0x20(%r15,%rcx,8),%xmm1
movupd 0x30(%r15,%rcx,8),%xmm2
movupd %xmm1,0x20(%rbx,%rcx,8)
movupd %xmm2,0x30(%rbx,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    1360 <cgr+0x1c0>
test   $0x1,%r9b
je     1427 <cgr+0x287>
movupd 0x0(%r13,%rcx,8),%xmm0
movupd 0x10(%r13,%rcx,8),%xmm1
movapd 0xc09(%rip),%xmm2
xorpd  %xmm2,%xmm0
xorpd  %xmm2,%xmm1
mov    0x20(%rsp),%rdx
movupd %xmm0,(%rdx,%rcx,8)
movupd %xmm1,0x10(%rdx,%rcx,8)
movupd (%r15,%rcx,8),%xmm0
movupd 0x10(%r15,%rcx,8),%xmm1
movupd %xmm0,(%rbx,%rcx,8)
movupd %xmm1,0x10(%rbx,%rcx,8)
cmp    %r8,%rax
mov    0x20(%rsp),%r14
jne    144a <cgr+0x2aa>
jmp    14d4 <cgr+0x334>
xor    %ecx,%ecx
test   $0x1,%r9b
jne    13e1 <cgr+0x241>
jmp    1427 <cgr+0x287>
mov    0x18(%rsp),%r8
mov    0x10(%rsp),%rdi
mov    %rax,%rcx
not    %rcx
test   $0x1,%r8b
je     147c <cgr+0x2dc>
movsd  0x0(%r13,%rax,8),%xmm0
xorps  0xb9c(%rip),%xmm0
mov    0x20(%rsp),%rdx
movlps %xmm0,(%rdx,%rax,8)
movsd  (%r15,%rax,8),%xmm0
movsd  %xmm0,(%rbx,%rax,8)
or     $0x1,%rax
add    %r8,%rcx
mov    0x20(%rsp),%r14
je     14d4 <cgr+0x334>
movapd 0xb72(%rip),%xmm0
xchg   %ax,%ax
movsd  0x0(%r13,%rax,8),%xmm1
xorpd  %xmm0,%xmm1
movlpd %xmm1,(%r14,%rax,8)
movsd  (%r15,%rax,8),%xmm1
movsd  %xmm1,(%rbx,%rax,8)
movsd  0x8(%r13,%rax,8),%xmm1
xorpd  %xmm0,%xmm1
movlpd %xmm1,0x8(%r14,%rax,8)
movsd  0x8(%r15,%rax,8),%xmm1
movsd  %xmm1,0x8(%rbx,%rax,8)
add    $0x2,%rax
cmp    %rax,%r8
jne    1490 <cgr+0x2f0>
mov    0x28(%rsp),%rsi
call   1040 <l2norm@plt>
mov    0x38(%rsp),%r11
lea    0x10(%r11),%r8
mov    %r8,0x68(%rsp)
add    $0x18,%r11
mov    0x18(%rsp),%rax
lea    (%r15,%rax,8),%r12
mov    0x18(%rsp),%rax
lea    (%rbx,%rax,8),%rdx
lea    0x8(%rbx),%r9
mov    0x18(%rsp),%rax
lea    0x0(,%rax,8),%rcx
add    %rbp,%rcx
mov    %rcx,0x50(%rsp)
mov    %rbp,%r10
add    $0x8,%r10
lea    0x8(%r15),%rax
mov    %rax,0x40(%rsp)
mov    %r14,%rax
add    $0x8,%rax
mov    %rax,0x10(%rsp)
mov    0x18(%rsp),%rax
and    $0xfffffffc,%eax
mov    %rax,0xc8(%rsp)
lea    -0x4(%rax),%rdi
mov    %rdi,0xc0(%rsp)
shr    $0x2,%rdi
add    $0x1,%rdi
cmp    %rcx,%r9
setb   %cl
cmp    %rdx,%r10
setb   %al
and    %cl,%al
cmp    %r11,%r9
setb   %sil
cmp    %rdx,%r8
setb   %cl
and    %sil,%cl
or     %al,%cl
mov    %r12,%r8
mov    %r12,0x48(%rsp)
cmp    %r12,%r9
setb   %al
mov    0x40(%rsp),%r12
cmp    %rdx,%r12
mov    %rdx,%rsi
mov    %rdx,0x30(%rsp)
setb   %dl
and    %al,%dl
mov    0x18(%rsp),%rax
lea    (%r14,%rax,8),%r14
cmp    %r14,%r9
setb   %r9b
cmp    %rsi,0x10(%rsp)
setb   %al
and    %r9b,%al
or     %dl,%al
or     %cl,%al
mov    %r11,0xe0(%rsp)
cmp    %r11,%r10
setb   %r9b
mov    0x50(%rsp),%r11
cmp    %r11,0x68(%rsp)
setb   %dl
and    %r9b,%dl
cmp    %r8,%r10
setb   %sil
cmp    %r11,%r12
mov    0x38(%rsp),%rcx
lea    0x8(%rcx),%rcx
mov    %rcx,0xd8(%rsp)
mulsd  0xa11(%rip),%xmm0
movsd  %xmm0,0x40(%rsp)
setb   %cl
and    %sil,%cl
or     %dl,%cl
mov    0x18(%rsp),%rdx
lea    -0x1(%rdx),%r9
cmp    %r14,%r10
setb   %r8b
cmp    %r11,0x10(%rsp)
mov    0x18(%rsp),%rsi
setb   %dl
and    %r8b,%dl
or     %cl,%dl
or     %al,%dl
mov    %dl,0xe(%rsp)
mov    %r9,%rax
and    $0xfffffffffffffffe,%rax
mov    %rax,0x90(%rsp)
mov    %r9,0x60(%rsp)
or     $0x1,%r9
mov    %r9,0x88(%rsp)
mov    %rsi,%rax
neg    %rax
mov    %rax,0xb0(%rsp)
cmp    %r15,0x30(%rsp)
seta   %al
cmp    %rbx,0x48(%rsp)
seta   %cl
and    %al,%cl
mov    %cl,0xf(%rsp)
mov    %edi,%ecx
and    $0x3,%ecx
movabs $0x7ffffffffffffffc,%rax
ff ff 7f
and    %rax,%rdi
mov    %rdi,0x98(%rsp)
mov    %esi,%r8d
and    $0x3,%r8d
lea    0x10(%r15),%rax
mov    %rax,0xa8(%rsp)
mov    %rcx,0xb8(%rsp)
mov    %rcx,%rdi
shl    $0x5,%rdi
lea    0x10(%rbx),%rax
mov    %rax,0xa0(%rsp)
xor    %eax,%eax
mov    %rax,0x10(%rsp)
mov    %r13,0x58(%rsp)
mov    %r8,0x50(%rsp)
mov    %rdi,0x48(%rsp)
mov    %rbp,0xd0(%rsp)
nop
mov    %r13,%rdi
mov    %r13,%rsi
mov    0x38(%rsp),%r13
mov    %r13,%rdx
mov    $0x1,%ecx
mov    0x28(%rsp),%r14
mov    %r14d,%r8d
mov    $0x1,%r9d
call   1050 <mmult@plt>
mov    0x70(%rsp),%rdi
mov    0x20(%rsp),%r12
mov    %r12,%rsi
mov    %rbp,%rdx
mov    %r14d,%ecx
mov    %r14d,%r8d
mov    $0x1,%r9d
call   1050 <mmult@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
mov    0xd8(%rsp),%rdx
mov    $0x1,%ecx
mov    %r14d,%r8d
mov    $0x1,%r9d
call   1050 <mmult@plt>
mov    0x18(%rsp),%rdx
movsd  0x0(%r13),%xmm0
divsd  0x8(%r13),%xmm0
movsd  %xmm0,0x10(%r13)
test   %r14d,%r14d
mov    0x68(%rsp),%rsi
jle    18b0 <cgr+0x710>
mulsd  (%r12),%xmm0
addsd  (%r15),%xmm0
movsd  %xmm0,(%rbx)
movsd  (%rsi),%xmm0
mulsd  0x0(%rbp),%xmm0
movsd  %xmm0,0x0(%rbp)
cmpl   $0x1,0x28(%rsp)
je     18b0 <cgr+0x710>
cmpq   $0x2,0x60(%rsp)
setb   %al
or     0xe(%rsp),%al
mov    $0x1,%ecx
test   $0x1,%al
jne    1808 <cgr+0x668>
movsd  (%rsi),%xmm0
unpcklpd %xmm0,%xmm0
xor    %eax,%eax
mov    0x90(%rsp),%rdi
nopl   (%rax)
movupd 0x8(%r15,%rax,8),%xmm1
movupd 0x8(%r12,%rax,8),%xmm2
mulpd  %xmm0,%xmm2
addpd  %xmm1,%xmm2
movupd %xmm2,0x8(%rbx,%rax,8)
movupd 0x8(%rbp,%rax,8),%xmm1
mulpd  %xmm0,%xmm1
movupd %xmm1,0x8(%rbp,%rax,8)
add    $0x2,%rax
cmp    %rax,%rdi
jne    17c0 <cgr+0x620>
mov    0x88(%rsp),%rcx
cmp    %rdi,0x60(%rsp)
je     18b0 <cgr+0x710>
mov    %rcx,%rax
test   $0x1,%dl
jne    1839 <cgr+0x699>
movsd  (%rsi),%xmm0
mulsd  (%r12,%rcx,8),%xmm0
addsd  (%r15,%rcx,8),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
movsd  (%rsi),%xmm0
mulsd  0x0(%rbp,%rcx,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rcx,8)
lea    0x1(%rcx),%rax
not    %rcx
cmp    0xb0(%rsp),%rcx
je     18b0 <cgr+0x710>
cs nopw 0x0(%rax,%rax,1)
movsd  (%rsi),%xmm0
mulsd  (%r12,%rax,8),%xmm0
addsd  (%r15,%rax,8),%xmm0
movsd  %xmm0,(%rbx,%rax,8)
movsd  (%rsi),%xmm0
mulsd  0x0(%rbp,%rax,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rax,8)
movsd  (%rsi),%xmm0
mulsd  0x8(%r12,%rax,8),%xmm0
addsd  0x8(%r15,%rax,8),%xmm0
movsd  %xmm0,0x8(%rbx,%rax,8)
movsd  (%rsi),%xmm0
mulsd  0x8(%rbp,%rax,8),%xmm0
movsd  %xmm0,0x8(%rbp,%rax,8)
add    $0x2,%rax
cmp    %rax,%rdx
jne    1850 <cgr+0x6b0>
cs nopw 0x0(%rax,%rax,1)
mov    0x10(%rsp),%rax
lea    0x1(%rax),%r13d
mov    %rbp,%rsi
mov    0x58(%rsp),%rbp
mov    %rbp,%rdi
mov    %rbp,%rdx
mov    $0x1,%ecx
mov    0x28(%rsp),%r14
mov    %r14d,%r8d
call   10b0 <madd@plt>
mov    %rbp,%rdi
mov    %rbp,%rsi
mov    0xe0(%rsp),%r12
mov    %r12,%rdx
mov    $0x1,%ecx
mov    %r14d,%r8d
mov    $0x1,%r9d
call   1050 <mmult@plt>
movsd  (%r12),%xmm0
ucomisd 0x70d(%rip),%xmm0
jb     1920 <cgr+0x780>
sqrtsd %xmm0,%xmm0
jmp    1925 <cgr+0x785>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   10c0 <sqrt@plt>
movsd  %xmm0,0x30(%rsp)
mov    0x38(%rsp),%rax
movsd  0x18(%rax),%xmm0
divsd  (%rax),%xmm0
movsd  %xmm0,0x20(%rax)
mov    0x20(%rsp),%r12
mov    %r12,%rdi
mov    0x28(%rsp),%r14
mov    %r14d,%esi
mov    $0x1,%edx
call   10a0 <scale@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %r14d,%edx
call   1080 <mdisplay@plt>
mov    %r12,%rdi
mov    0x58(%rsp),%rsi
mov    %r12,%rdx
mov    %r14d,%ecx
mov    $0x1,%r8d
call   1060 <msub@plt>
lea    0x698(%rip),%rdi
mov    %r13d,%r12d
mov    %r13d,%esi
call   1070 <printf@plt>
test   %r14d,%r14d
mov    0x18(%rsp),%rsi
mov    0x50(%rsp),%r8
mov    0x48(%rsp),%rdi
mov    0xd0(%rsp),%rbp
movsd  0x30(%rsp),%xmm2
jle    1b1b <cgr+0x97b>
cmpl   $0x4,0x28(%rsp)
setb   %al
or     0xf(%rsp),%al
je     19d0 <cgr+0x830>
xor    %eax,%eax
jmp    1aaf <cgr+0x90f>
xchg   %ax,%ax
cmpq   $0xc,0xc0(%rsp)
jae    19df <cgr+0x83f>
xor    %eax,%eax
jmp    1a54 <cgr+0x8b4>
mov    0x98(%rsp),%rcx
xor    %eax,%eax
nopl   0x0(%rax)
movups (%rbx,%rax,8),%xmm0
movups 0x10(%rbx,%rax,8),%xmm1
movups %xmm0,(%r15,%rax,8)
movups %xmm1,0x10(%r15,%rax,8)
movups 0x20(%rbx,%rax,8),%xmm0
movups 0x30(%rbx,%rax,8),%xmm1
movups %xmm0,0x20(%r15,%rax,8)
movups %xmm1,0x30(%r15,%rax,8)
movups 0x40(%rbx,%rax,8),%xmm0
movups 0x50(%rbx,%rax,8),%xmm1
movups %xmm0,0x40(%r15,%rax,8)
movups %xmm1,0x50(%r15,%rax,8)
movupd 0x60(%rbx,%rax,8),%xmm0
movupd 0x70(%rbx,%rax,8),%xmm1
movupd %xmm0,0x60(%r15,%rax,8)
movupd %xmm1,0x70(%r15,%rax,8)
add    $0x10,%rax
add    $0xfffffffffffffffc,%rcx
jne    19f0 <cgr+0x850>
cmpq   $0x0,0xb8(%rsp)
je     1a9f <cgr+0x8ff>
mov    0xa8(%rsp),%rcx
lea    (%rcx,%rax,8),%rcx
mov    0xa0(%rsp),%rdx
lea    (%rdx,%rax,8),%rax
xor    %edx,%edx
nopl   0x0(%rax)
movupd -0x10(%rax,%rdx,1),%xmm0
movupd (%rax,%rdx,1),%xmm1
movupd %xmm0,-0x10(%rcx,%rdx,1)
movupd %xmm1,(%rcx,%rdx,1)
add    $0x20,%rdx
cmp    %rdx,%rdi
jne    1a80 <cgr+0x8e0>
mov    0xc8(%rsp),%rcx
mov    %rcx,%rax
cmp    %rsi,%rcx
je     1b1b <cgr+0x97b>
mov    %rax,%rcx
not    %rcx
add    %rsi,%rcx
test   %r8,%r8
je     1ad5 <cgr+0x935>
mov    %r8,%rdx
movsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,(%r15,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1ac0 <cgr+0x920>
cmp    $0x3,%rcx
jb     1b1b <cgr+0x97b>
nopl   0x0(%rax,%rax,1)
movsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,(%r15,%rax,8)
movsd  0x8(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x8(%r15,%rax,8)
movsd  0x10(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x10(%r15,%rax,8)
movsd  0x18(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x18(%r15,%rax,8)
add    $0x4,%rax
cmp    %rax,%rsi
jne    1ae0 <cgr+0x940>
movsd  0x40(%rsp),%xmm0
ucomisd %xmm2,%xmm0
mov    0x58(%rsp),%r13
jae    1b42 <cgr+0x9a2>
cmpl   $0x3e6,0x10(%rsp)
mov    %r12d,%eax
mov    %rax,0x10(%rsp)
jbe    16e0 <cgr+0x540>
xor    %ebx,%ebx
movsd  0x40(%rsp),%xmm0
ucomisd %xmm2,%xmm0
setae  %bl
mov    0x38(%rsp),%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    0x80(%rsp),%rdi
call   1030 <free@plt>
mov    0x78(%rsp),%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %ebx,%eax
add    $0xe8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d \0A\00"
define i32 @cgr(double* %0, i32 %1, double* %2, double* %3, double* %4) {
%6 = alloca double*
%7 = alloca i32
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca double*
%21 = alloca double
%22 = alloca double
%23 = alloca double
store double* %0, double** %6
store i32 %1, i32* %7
store double* %2, double** %8
store double* %3, double** %9
store double* %4, double** %10
%24 = call i64 @malloc(i32 64)
%25 = inttoptr i64 %24 to double*
store double* %25, double** %15
%26 = load i32, i32* %7
%27 = sext i32 %26 to i64
%28 = mul i64 8, %27
%29 = trunc i64 %28 to i32
%30 = call i64 @malloc(i32 %29)
%31 = inttoptr i64 %30 to double*
store double* %31, double** %16
%32 = load i32, i32* %7
%33 = sext i32 %32 to i64
%34 = mul i64 8, %33
%35 = trunc i64 %34 to i32
%36 = call i64 @malloc(i32 %35)
%37 = inttoptr i64 %36 to double*
store double* %37, double** %17
%38 = load i32, i32* %7
%39 = sext i32 %38 to i64
%40 = mul i64 8, %39
%41 = trunc i64 %40 to i32
%42 = call i64 @malloc(i32 %41)
%43 = inttoptr i64 %42 to double*
store double* %43, double** %20
%44 = load i32, i32* %7
%45 = sext i32 %44 to i64
%46 = mul i64 8, %45
%47 = trunc i64 %46 to i32
%48 = call i64 @malloc(i32 %47)
%49 = inttoptr i64 %48 to double*
store double* %49, double** %18
%50 = load i32, i32* %7
%51 = sext i32 %50 to i64
%52 = mul i64 8, %51
%53 = trunc i64 %52 to i32
%54 = call i64 @malloc(i32 %53)
%55 = inttoptr i64 %54 to double*
store double* %55, double** %19
store i32 0, i32* %13
store i32 0, i32* %12
store i32 1000, i32* %14
%56 = call double @pow(double 1.000000e-15, double 0x3FD5555555555555)
store double %56, double* %22
%57 = load double, double* %22
%58 = load double, double* %22
%59 = fmul double %57, %58
store double %59, double* %21
%60 = load double*, double** %8
%61 = load double*, double** %6
%62 = load double*, double** %16
%63 = load i32, i32* %7
%64 = load i32, i32* %7
%65 = call i32 @mmult(double* %60, double* %61, double* %62, i32 %63, i32 %64, i32 1)
%66 = load double*, double** %16
%67 = load double*, double** %9
%68 = load double*, double** %16
%69 = load i32, i32* %7
%70 = call i32 @msub(double* %66, double* %67, double* %68, i32 %69, i32 1)
store i32 0, i32* %11
br label %71
71: ; preds = %95, %5
%72 = load i32, i32* %11
%73 = load i32, i32* %7
%74 = icmp slt i32 %72, %73
br i1 %74, label %75, label %98
75: ; preds = %71
%76 = load double*, double** %16
%77 = load i32, i32* %11
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds double, double* %76, i64 %78
%80 = load double, double* %79
%81 = fneg double %80
%82 = load double*, double** %17
%83 = load i32, i32* %11
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds double, double* %82, i64 %84
store double %81, double* %85
%86 = load double*, double** %6
%87 = load i32, i32* %11
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds double, double* %86, i64 %88
%90 = load double, double* %89
%91 = load double*, double** %10
%92 = load i32, i32* %11
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds double, double* %91, i64 %93
store double %90, double* %94
br label %95
95: ; preds = %75
%96 = load i32, i32* %11
%97 = add nsw i32 %96, 1
store i32 %97, i32* %11
br label %71
98: ; preds = %71
%99 = load double*, double** %9
%100 = load i32, i32* %7
%101 = call double @l2norm(double* %99, i32 %100)
store double %101, double* %23
br label %102
102: ; preds = %239, %98
%103 = load i32, i32* %12
%104 = icmp eq i32 %103, 0
br i1 %104, label %105, label %109
105: ; preds = %102
%106 = load i32, i32* %13
%107 = load i32, i32* %14
%108 = icmp slt i32 %106, %107
br label %109
109: ; preds = %105, %102
%110 = phi i1 [ false, %102 ], [ %108, %105 ]
br i1 %110, label %111, label %240
111: ; preds = %109
%112 = load i32, i32* %13
%113 = add nsw i32 %112, 1
store i32 %113, i32* %13
%114 = load double*, double** %16
%115 = load double*, double** %16
%116 = load double*, double** %15
%117 = load i32, i32* %7
%118 = call i32 @mmult(double* %114, double* %115, double* %116, i32 1, i32 %117, i32 1)
%119 = load double*, double** %8
%120 = load double*, double** %17
%121 = load double*, double** %20
%122 = load i32, i32* %7
%123 = load i32, i32* %7
%124 = call i32 @mmult(double* %119, double* %120, double* %121, i32 %122, i32 %123, i32 1)
%125 = load double*, double** %17
%126 = load double*, double** %20
%127 = load double*, double** %15
%128 = getelementptr inbounds double, double* %127, i64 1
%129 = load i32, i32* %7
%130 = call i32 @mmult(double* %125, double* %126, double* %128, i32 1, i32 %129, i32 1)
%131 = load double*, double** %15
%132 = getelementptr inbounds double, double* %131, i64 0
%133 = load double, double* %132
%134 = load double*, double** %15
%135 = getelementptr inbounds double, double* %134, i64 1
%136 = load double, double* %135
%137 = fdiv double %133, %136
%138 = load double*, double** %15
%139 = getelementptr inbounds double, double* %138, i64 2
store double %137, double* %139
store i32 0, i32* %11
br label %140
140: ; preds = %172, %111
%141 = load i32, i32* %11
%142 = load i32, i32* %7
%143 = icmp slt i32 %141, %142
br i1 %143, label %144, label %175
144: ; preds = %140
%145 = load double*, double** %6
%146 = load i32, i32* %11
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds double, double* %145, i64 %147
%149 = load double, double* %148
%150 = load double*, double** %15
%151 = getelementptr inbounds double, double* %150, i64 2
%152 = load double, double* %151
%153 = load double*, double** %17
%154 = load i32, i32* %11
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds double, double* %153, i64 %155
%157 = load double, double* %156
%158 = call double @llvm.fmuladd.f64(double %152, double %157, double %149)
%159 = load double*, double** %10
%160 = load i32, i32* %11
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds double, double* %159, i64 %161
store double %158, double* %162
%163 = load double*, double** %15
%164 = getelementptr inbounds double, double* %163, i64 2
%165 = load double, double* %164
%166 = load double*, double** %20
%167 = load i32, i32* %11
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds double, double* %166, i64 %168
%170 = load double, double* %169
%171 = fmul double %170, %165
store double %171, double* %169
br label %172
172: ; preds = %144
%173 = load i32, i32* %11
%174 = add nsw i32 %173, 1
store i32 %174, i32* %11
br label %140
175: ; preds = %140
%176 = load double*, double** %16
%177 = load double*, double** %20
%178 = load double*, double** %16
%179 = load i32, i32* %7
%180 = call i32 @madd(double* %176, double* %177, double* %178, i32 1, i32 %179)
%181 = load double*, double** %16
%182 = load double*, double** %16
%183 = load double*, double** %15
%184 = getelementptr inbounds double, double* %183, i64 3
%185 = load i32, i32* %7
%186 = call i32 @mmult(double* %181, double* %182, double* %184, i32 1, i32 %185, i32 1)
%187 = load double*, double** %15
%188 = getelementptr inbounds double, double* %187, i64 3
%189 = load double, double* %188
%190 = call double @sqrt(double %189)
%191 = load double, double* %21
%192 = load double, double* %23
%193 = fmul double %191, %192
%194 = fcmp ole double %190, %193
br i1 %194, label %195, label %196
195: ; preds = %175
store i32 1, i32* %12
br label %196
196: ; preds = %195, %175
%197 = load double*, double** %15
%198 = getelementptr inbounds double, double* %197, i64 3
%199 = load double, double* %198
%200 = load double*, double** %15
%201 = getelementptr inbounds double, double* %200, i64 0
%202 = load double, double* %201
%203 = fdiv double %199, %202
%204 = load double*, double** %15
%205 = getelementptr inbounds double, double* %204, i64 4
store double %203, double* %205
%206 = load double*, double** %17
%207 = load i32, i32* %7
%208 = load double*, double** %15
%209 = getelementptr inbounds double, double* %208, i64 4
%210 = load double, double* %209
%211 = call i32 @scale(double* %206, i32 %207, i32 1, double %210)
%212 = load double*, double** %10
%213 = load i32, i32* %7
%214 = call i32 @mdisplay(double* %212, i32 1, i32 %213)
%215 = load double*, double** %17
%216 = load double*, double** %16
%217 = load double*, double** %17
%218 = load i32, i32* %7
%219 = call i32 @msub(double* %215, double* %216, double* %217, i32 %218, i32 1)
%220 = load i32, i32* %13
%221 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %220)
store i32 0, i32* %11
br label %222
222: ; preds = %236, %196
%223 = load i32, i32* %11
%224 = load i32, i32* %7
%225 = icmp slt i32 %223, %224
br i1 %225, label %226, label %239
226: ; preds = %222
%227 = load double*, double** %10
%228 = load i32, i32* %11
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds double, double* %227, i64 %229
%231 = load double, double* %230
%232 = load double*, double** %6
%233 = load i32, i32* %11
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds double, double* %232, i64 %234
store double %231, double* %235
br label %236
236: ; preds = %226
%237 = load i32, i32* %11
%238 = add nsw i32 %237, 1
store i32 %238, i32* %11
br label %222
239: ; preds = %222
br label %102
240: ; preds = %109
%241 = load double*, double** %15
%242 = call i32 @free(double* %241)
%243 = load double*, double** %16
%244 = call i32 @free(double* %243)
%245 = load double*, double** %17
%246 = call i32 @free(double* %245)
%247 = load double*, double** %18
%248 = call i32 @free(double* %247)
%249 = load double*, double** %19
%250 = call i32 @free(double* %249)
%251 = load double*, double** %20
%252 = call i32 @free(double* %251)
%253 = load i32, i32* %12
ret i32 %253
}

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