void eig_dec(X, P, d) double *X, *P;
int d;
{
  int i, j, k, iter, ms;
  double c, s, r, u, v;
  for (i = 0; i < d; i++)
    for (j = 0; j < d; j++)
      P[i * d + j] = (i == j);
  for (iter = 0; iter < 20; iter++) {
    ms = 0;
    for (i = 0; i < d; i++)
      for (j = i + 1; j < d; j++)
        if (((X[i * d + j]) * (X[i * d + j])) >
            1.0e-15 * fabs(X[i * d + i] * X[j * d + j])) {
          c = (X[j * d + j] - X[i * d + i]) / 2;
          s = -X[i * d + j];
          r = sqrt(c * c + s * s);
          c /= r;
          s = sqrt((1 - c) / 2) * (2 * (s > 0) - 1);
          c = sqrt((1 + c) / 2);
          for (k = 0; k < d; k++) {
            u = X[i * d + k];
            v = X[j * d + k];
            X[i * d + k] = u * c + v * s;
            X[j * d + k] = v * c - u * s;
          }
          for (k = 0; k < d; k++) {
            u = X[k * d + i];
            v = X[k * d + j];
            X[k * d + i] = u * c + v * s;
            X[k * d + j] = v * c - u * s;
          }
          X[i * d + j] = X[j * d + i] = 0.0;
          for (k = 0; k < d; k++) {
            u = P[k * d + i];
            v = P[k * d + j];
            P[k * d + i] = u * c + v * s;
            P[k * d + j] = v * c - u * s;
          }
          ms = 1;
        }
    if (ms == 0)
      return;
  }
  printf("eig_dec not converged\n");
}


x86 assembly (clang, -O0):
<eig_dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11a2 <eig_dec+0x82>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    118f <eig_dec+0x6f>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    114d <eig_dec+0x2d>
jmp    1194 <eig_dec+0x74>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113a <eig_dec+0x1a>
movl   $0x0,-0x24(%rbp)
cmpl   $0x14,-0x24(%rbp)
jge    1662 <eig_dec+0x542>
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1640 <eig_dec+0x520>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    162d <eig_dec+0x50d>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x18(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm2
movaps 0xddf(%rip),%xmm1
pand   %xmm1,%xmm2
movsd  0xdb3(%rip),%xmm1
mulsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    161a <eig_dec+0x4fa>
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x18(%rbp),%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  0xd79(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xd05(%rip),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  0xcf0(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  -0x38(%rbp),%xmm1
xorps  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
seta   %al
and    $0x1,%al
movzbl %al,%eax
shl    $0x1,%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xcc0(%rip),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  0xcab(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    143d <eig_dec+0x31d>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x20(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x20(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x20(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x50(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x20(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1372 <eig_dec+0x252>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    150f <eig_dec+0x3ef>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x18(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x18(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x50(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1444 <eig_dec+0x324>
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x18(%rbp),%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1613 <eig_dec+0x4f3>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x18(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x18(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x50(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1548 <eig_dec+0x428>
movl   $0x1,-0x28(%rbp)
jmp    161f <eig_dec+0x4ff>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11d6 <eig_dec+0xb6>
jmp    1632 <eig_dec+0x512>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11c1 <eig_dec+0xa1>
cmpl   $0x0,-0x28(%rbp)
jne    164f <eig_dec+0x52f>
jmp    1670 <eig_dec+0x550>
jmp    1654 <eig_dec+0x534>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11a9 <eig_dec+0x89>
lea    0x9c7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eig_dec>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x178,%rsp
mov    %edx,%r11d
test   %edx,%edx
mov    %rsi,0x20(%rsp)
mov    %rdi,0x40(%rsp)
mov    %r11,0x28(%rsp)
jle    1246 <eig_dec+0x126>
lea    -0x1(%r11),%r8
mov    %rsi,%r10
mov    %r11d,%ecx
and    $0x3,%ecx
mov    %r11,%rax
and    $0xfffffffc,%r11d
add    $0x18,%rsi
lea    0x0(,%rax,8),%r9
xor    %ebp,%ebp
movsd  0xe8b(%rip),%xmm0
jmp    1195 <eig_dec+0x75>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbp
add    %r9,%rsi
add    %r9,%r10
cmp    0x28(%rsp),%rbp
je     1232 <eig_dec+0x112>
xor    %eax,%eax
cmp    $0x3,%r8
jae    11de <eig_dec+0xbe>
test   %rcx,%rcx
je     1180 <eig_dec+0x60>
lea    (%r10,%rax,8),%rdi
mov    %rbp,%rbx
sub    %rax,%rbx
xor    %eax,%eax
jmp    11be <eig_dec+0x9e>
movsd  %xmm1,(%rdi,%rax,8)
add    $0x1,%rax
cmp    %rax,%rcx
je     1180 <eig_dec+0x60>
movapd %xmm0,%xmm1
cmp    %rax,%rbx
je     11b0 <eig_dec+0x90>
xorpd  %xmm1,%xmm1
jmp    11b0 <eig_dec+0x90>
nopl   (%rax)
movsd  %xmm1,(%rsi,%rax,8)
add    $0x4,%rax
cmp    %r11,%rax
je     119d <eig_dec+0x7d>
movapd %xmm0,%xmm1
cmp    %rax,%rbp
je     11eb <eig_dec+0xcb>
xorpd  %xmm1,%xmm1
movsd  %xmm1,-0x18(%rsi,%rax,8)
lea    0x1(%rax),%rdi
movapd %xmm0,%xmm1
cmp    %rdi,%rbp
je     1202 <eig_dec+0xe2>
xorpd  %xmm1,%xmm1
movsd  %xmm1,-0x10(%rsi,%rax,8)
lea    0x2(%rax),%rdi
movapd %xmm0,%xmm1
cmp    %rdi,%rbp
je     1219 <eig_dec+0xf9>
xorpd  %xmm1,%xmm1
movsd  %xmm1,-0x8(%rsi,%rax,8)
lea    0x3(%rax),%rdi
movapd %xmm0,%xmm1
cmp    %rdi,%rbp
je     11d0 <eig_dec+0xb0>
xorpd  %xmm1,%xmm1
jmp    11d0 <eig_dec+0xb0>
mov    0x28(%rsp),%r11
mov    %r11,%r10
mov    0x20(%rsp),%rsi
mov    0x40(%rsp),%rdi
jmp    1249 <eig_dec+0x129>
movslq %edx,%r10
lea    0x1(%r11),%rax
mov    %rax,0xc0(%rsp)
lea    (%r10,%r11,1),%rax
mov    %rax,0xb8(%rsp)
mov    %r11d,%eax
and    $0xfffffffe,%eax
mov    %rax,0x10(%rsp)
cmp    $0x2,%edx
setae  %al
cmp    $0x1,%r10
sete   %cl
and    %al,%cl
mov    %cl,0x7(%rsp)
lea    0x0(,%r10,8),%rbx
lea    (%rdi,%r10,8),%rax
mov    %rax,0xa8(%rsp)
lea    0x0(,%r11,8),%rax
and    $0xfffffffffffffff0,%rax
mov    %rax,0xf0(%rsp)
mov    %r10,%rax
shl    $0x4,%rax
mov    %rax,0x50(%rsp)
lea    0x8(%rdi),%rax
mov    %rax,0xa0(%rsp)
lea    0x8(%rsi),%rax
mov    %rax,0x98(%rsp)
xor    %eax,%eax
movapd 0xd4a(%rip),%xmm8
movsd  0xd29(%rip),%xmm11
movsd  0xd28(%rip),%xmm9
xorpd  %xmm10,%xmm10
mov    %edx,0x1c(%rsp)
mov    %r10,0x48(%rsp)
mov    %rbx,0x8(%rsp)
nopl   0x0(%rax,%rax,1)
mov    %rax,0xb0(%rsp)
test   %edx,%edx
jle    1a4b <eig_dec+0x92b>
xor    %eax,%eax
mov    %rax,0x38(%rsp)
mov    $0x1,%eax
mov    %rax,0x88(%rsp)
mov    $0x8,%eax
mov    0x98(%rsp),%r13
mov    %rdi,0x58(%rsp)
mov    0xa0(%rsp),%r15
mov    0xa8(%rsp),%r12
mov    %rdi,%r14
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    13b4 <eig_dec+0x294>
addq   $0x1,0x88(%rsp)
add    %rbx,%r14
mov    0xd0(%rsp),%r12
add    %rbx,%r12
mov    0xe8(%rsp),%rax
add    $0x8,%rax
addq   $0x8,0x38(%rsp)
mov    0xd8(%rsp),%r15
add    $0x8,%r15
addq   $0x8,0x58(%rsp)
mov    0xe0(%rsp),%r13
add    $0x8,%r13
mov    0x90(%rsp),%rsi
add    $0x8,%rsi
mov    0xc8(%rsp),%rcx
cmp    %r11,%rcx
je     1a10 <eig_dec+0x8f0>
mov    %rsi,0x90(%rsp)
mov    %rcx,%r9
add    $0x1,%rcx
mov    %rcx,0xc8(%rsp)
cmp    %r10,%rcx
mov    %rax,0xe8(%rsp)
mov    %r13,0xe0(%rsp)
mov    %r15,0xd8(%rsp)
mov    %r12,0xd0(%rsp)
jge    1350 <eig_dec+0x230>
mov    %r10,%rsi
imul   %r9,%rsi
lea    (%rdi,%rsi,8),%rcx
mov    %rcx,0x130(%rsp)
lea    (%rsi,%r11,1),%rcx
lea    (%rdi,%rcx,8),%rcx
mov    %rcx,0x110(%rsp)
lea    (%r10,%rsi,1),%rcx
mov    %rcx,0x108(%rsp)
mov    0xb8(%rsp),%rcx
mov    %rsi,0x150(%rsp)
add    %rsi,%rcx
mov    %rcx,0x128(%rsp)
lea    (%rdi,%r9,8),%rcx
mov    %rcx,0x120(%rsp)
lea    (%r9,%r11,1),%rcx
lea    (%rdi,%rcx,8),%rsi
mov    %rsi,0x100(%rsp)
mov    0xc0(%rsp),%rsi
add    %r9,%rsi
mov    %rsi,0x138(%rsp)
mov    0x20(%rsp),%rsi
lea    (%rsi,%r9,8),%r10
mov    %r10,0x118(%rsp)
mov    0x48(%rsp),%r10
lea    (%rsi,%rcx,8),%rcx
mov    %rcx,0xf8(%rsp)
mov    %r9d,%ecx
imul   %edx,%ecx
movslq %ecx,%rcx
mov    %r9,0x140(%rsp)
add    %r9,%rcx
mov    %rcx,0x148(%rsp)
mov    %rax,%rbp
xor    %r9d,%r9d
mov    0x88(%rsp),%rsi
jmp    14e5 <eig_dec+0x3c5>
nopl   0x0(%rax,%rax,1)
mov    0x68(%rsp),%rsi
add    $0x1,%rsi
add    $0x1,%r9
add    %rbx,%r12
add    $0x8,%rbp
add    $0x8,%r15
add    $0x8,%r13
cmp    %r11,%rsi
je     1350 <eig_dec+0x230>
mov    0x150(%rsp),%rax
add    %rsi,%rax
mov    %rax,0x158(%rsp)
movsd  (%rdi,%rax,8),%xmm3
movapd %xmm3,%xmm1
mulsd  %xmm3,%xmm1
mov    0x148(%rsp),%rax
movsd  (%rdi,%rax,8),%xmm0
mov    %esi,%ecx
imul   %edx,%ecx
movslq %ecx,%rcx
mov    %rsi,%rax
mov    %rsi,0x68(%rsp)
add    %rsi,%rcx
movsd  (%rdi,%rcx,8),%xmm4
movapd %xmm0,%xmm2
mulsd  %xmm4,%xmm2
andpd  %xmm8,%xmm2
mulsd  %xmm11,%xmm2
ucomisd %xmm2,%xmm1
jbe    14c0 <eig_dec+0x3a0>
subsd  %xmm0,%xmm4
mulsd  %xmm9,%xmm4
movapd %xmm4,%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm10,%xmm0
mov    %r9,0x30(%rsp)
mov    %rbp,0x60(%rsp)
movapd %xmm3,0x160(%rsp)
jb     1580 <eig_dec+0x460>
sqrtsd %xmm0,%xmm0
jmp    159f <eig_dec+0x47f>
nopl   0x0(%rax,%rax,1)
movsd  %xmm4,0x70(%rsp)
call   1040 <sqrt@plt>
movsd  0x70(%rsp),%xmm4
xorpd  %xmm10,%xmm10
movsd  0xa71(%rip),%xmm9
mov    0x50(%rsp),%rbx
divsd  %xmm0,%xmm4
movsd  0xa50(%rip),%xmm0
subsd  %xmm4,%xmm0
mulsd  %xmm9,%xmm0
ucomisd %xmm10,%xmm0
mov    0x58(%rsp),%rbp
jb     15d0 <eig_dec+0x4b0>
xorps  %xmm2,%xmm2
sqrtsd %xmm0,%xmm2
jmp    15f3 <eig_dec+0x4d3>
xchg   %ax,%ax
movsd  %xmm4,0x70(%rsp)
call   1040 <sqrt@plt>
movsd  0x70(%rsp),%xmm4
xorpd  %xmm10,%xmm10
movsd  0xa21(%rip),%xmm9
movapd %xmm0,%xmm2
addsd  0xa05(%rip),%xmm4
mulsd  %xmm9,%xmm4
ucomisd %xmm10,%xmm4
jb     1610 <eig_dec+0x4f0>
xorps  %xmm0,%xmm0
sqrtsd %xmm4,%xmm0
jmp    1633 <eig_dec+0x513>
movapd %xmm4,%xmm0
movapd %xmm2,0x70(%rsp)
call   1040 <sqrt@plt>
movapd 0x70(%rsp),%xmm2
xorpd  %xmm10,%xmm10
movsd  0x9dd(%rip),%xmm9
mov    0x1c(%rsp),%edx
mov    0x40(%rsp),%rdi
mov    0x28(%rsp),%r11
mov    0x48(%rsp),%r10
movapd 0x9d1(%rip),%xmm8
movsd  0x9b0(%rip),%xmm11
mov    0x30(%rsp),%rsi
movapd 0x160(%rsp),%xmm7
cmpltsd %xmm10,%xmm7
movapd %xmm7,%xmm1
andpd  %xmm2,%xmm1
xorpd  0x9b4(%rip),%xmm2
andnpd %xmm2,%xmm7
orpd   %xmm1,%xmm7
cmp    $0x2,%edx
jae    1690 <eig_dec+0x570>
xor    %eax,%eax
jmp    1740 <eig_dec+0x620>
mov    %r10,%rax
imul   %rsi,%rax
mov    0x128(%rsp),%rcx
add    %rax,%rcx
lea    (%rdi,%rcx,8),%rcx
cmp    %rcx,0x130(%rsp)
jae    16ca <eig_dec+0x5aa>
add    0x108(%rsp),%rax
lea    (%rdi,%rax,8),%rax
cmp    0x110(%rsp),%rax
jae    16ca <eig_dec+0x5aa>
xor    %eax,%eax
jmp    1740 <eig_dec+0x620>
movapd %xmm7,%xmm1
unpcklpd %xmm7,%xmm1
movapd %xmm0,%xmm2
unpcklpd %xmm0,%xmm2
xor    %eax,%eax
mov    0xf0(%rsp),%rcx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movupd (%r14,%rax,1),%xmm3
movupd (%r12,%rax,1),%xmm4
movapd %xmm1,%xmm5
mulpd  %xmm4,%xmm5
movapd %xmm1,%xmm6
mulpd  %xmm3,%xmm6
mulpd  %xmm2,%xmm3
addpd  %xmm5,%xmm3
movupd %xmm3,(%r14,%rax,1)
mulpd  %xmm2,%xmm4
subpd  %xmm6,%xmm4
movupd %xmm4,(%r12,%rax,1)
add    $0x10,%rax
cmp    %rax,%rcx
jne    16f0 <eig_dec+0x5d0>
mov    0x10(%rsp),%rcx
mov    %rcx,%rax
cmp    %r11,%rcx
je     1781 <eig_dec+0x661>
xchg   %ax,%ax
movsd  (%r14,%rax,8),%xmm1
movsd  (%r12,%rax,8),%xmm2
movapd %xmm7,%xmm3
mulsd  %xmm2,%xmm3
movapd %xmm7,%xmm4
mulsd  %xmm1,%xmm4
mulsd  %xmm0,%xmm1
addsd  %xmm3,%xmm1
movsd  %xmm1,(%r14,%rax,8)
mulsd  %xmm0,%xmm2
subsd  %xmm4,%xmm2
movsd  %xmm2,(%r12,%rax,8)
add    $0x1,%rax
cmp    %rax,%r11
jne    1740 <eig_dec+0x620>
mov    0x138(%rsp),%rax
lea    (%rax,%rsi,1),%r8
mov    0x68(%rsp),%rcx
mov    %rcx,%r9
imul   %r10,%r9
cmpb   $0x0,0x7(%rsp)
je     17c4 <eig_dec+0x6a4>
lea    (%rdi,%r8,8),%rax
cmp    %rax,0x120(%rsp)
jae    190c <eig_dec+0x7ec>
lea    (%rdi,%rcx,8),%rax
cmp    0x100(%rsp),%rax
jae    190c <eig_dec+0x7ec>
xor    %ecx,%ecx
mov    0x8(%rsp),%rbx
mov    %rbx,%rax
imul   %rcx,%rax
mov    %r11,%rsi
sub    %rcx,%rsi
nopl   0x0(%rax,%rax,1)
movsd  0x0(%rbp,%rax,1),%xmm1
movsd  (%r15,%rax,1),%xmm2
movapd %xmm7,%xmm3
mulsd  %xmm2,%xmm3
movapd %xmm7,%xmm4
mulsd  %xmm1,%xmm4
mulsd  %xmm0,%xmm1
addsd  %xmm3,%xmm1
movsd  %xmm1,0x0(%rbp,%rax,1)
mulsd  %xmm0,%xmm2
subsd  %xmm4,%xmm2
movsd  %xmm2,(%r15,%rax,1)
add    %rbx,%rax
add    $0xffffffffffffffff,%rsi
jne    17e0 <eig_dec+0x6c0>
add    0x140(%rsp),%r9
movq   $0x0,(%rdi,%r9,8)
mov    0x158(%rsp),%rax
movq   $0x0,(%rdi,%rax,8)
cmpb   $0x0,0x7(%rsp)
je     1890 <eig_dec+0x770>
mov    0x20(%rsp),%rcx
lea    (%rcx,%r8,8),%rax
cmp    %rax,0x118(%rsp)
mov    0x60(%rsp),%rbp
mov    0x30(%rsp),%r9
jae    198d <eig_dec+0x86d>
mov    0x68(%rsp),%rax
lea    (%rcx,%rax,8),%rax
cmp    0xf8(%rsp),%rax
jae    198d <eig_dec+0x86d>
xor    %esi,%esi
mov    0x8(%rsp),%rbx
jmp    18a1 <eig_dec+0x781>
nopl   0x0(%rax)
xor    %esi,%esi
mov    0x8(%rsp),%rbx
mov    0x60(%rsp),%rbp
mov    0x30(%rsp),%r9
mov    %rbx,%rax
imul   %rsi,%rax
mov    %r11,%rcx
sub    %rsi,%rcx
mov    0x90(%rsp),%rsi
cs nopw 0x0(%rax,%rax,1)
movsd  (%rsi,%rax,1),%xmm1
movsd  0x0(%r13,%rax,1),%xmm2
movapd %xmm7,%xmm3
mulsd  %xmm2,%xmm3
movapd %xmm7,%xmm4
mulsd  %xmm1,%xmm4
mulsd  %xmm0,%xmm1
addsd  %xmm3,%xmm1
movsd  %xmm1,(%rsi,%rax,1)
mulsd  %xmm0,%xmm2
subsd  %xmm4,%xmm2
movsd  %xmm2,0x0(%r13,%rax,1)
add    %rbx,%rax
add    $0xffffffffffffffff,%rcx
jne    18c0 <eig_dec+0x7a0>
mov    $0x1,%r8d
jmp    14c0 <eig_dec+0x3a0>
movapd %xmm7,%xmm1
unpcklpd %xmm7,%xmm1
movapd %xmm0,%xmm2
unpcklpd %xmm0,%xmm2
mov    0x10(%rsp),%rax
mov    %rdi,%rsi
mov    0x38(%rsp),%rcx
mov    0x60(%rsp),%rbp
xchg   %ax,%ax
movupd (%rsi,%rcx,1),%xmm3
movupd (%rsi,%rbp,1),%xmm4
movapd %xmm1,%xmm5
mulpd  %xmm4,%xmm5
movapd %xmm1,%xmm6
mulpd  %xmm3,%xmm6
mulpd  %xmm2,%xmm3
addpd  %xmm5,%xmm3
movupd %xmm3,(%rsi,%rcx,1)
mulpd  %xmm2,%xmm4
subpd  %xmm6,%xmm4
movupd %xmm4,(%rsi,%rbp,1)
add    %rbx,%rsi
add    $0xfffffffffffffffe,%rax
jne    1930 <eig_dec+0x810>
mov    0x10(%rsp),%rax
mov    %rax,%rcx
cmp    %r11,%rax
mov    0x8(%rsp),%rbx
mov    0x58(%rsp),%rbp
jne    17cb <eig_dec+0x6ab>
jmp    1821 <eig_dec+0x701>
movapd %xmm7,%xmm1
unpcklpd %xmm7,%xmm1
movapd %xmm0,%xmm2
unpcklpd %xmm0,%xmm2
mov    0x10(%rsp),%rax
mov    0x50(%rsp),%rsi
mov    0x38(%rsp),%rbx
nopl   0x0(%rax)
movupd (%rcx,%rbx,1),%xmm3
movupd (%rcx,%rbp,1),%xmm4
movapd %xmm1,%xmm5
mulpd  %xmm4,%xmm5
movapd %xmm1,%xmm6
mulpd  %xmm3,%xmm6
mulpd  %xmm2,%xmm3
addpd  %xmm5,%xmm3
movupd %xmm3,(%rcx,%rbx,1)
mulpd  %xmm2,%xmm4
subpd  %xmm6,%xmm4
movupd %xmm4,(%rcx,%rbp,1)
add    %rsi,%rcx
add    $0xfffffffffffffffe,%rax
jne    19b0 <eig_dec+0x890>
mov    $0x1,%r8d
mov    0x10(%rsp),%rcx
mov    %rcx,%rsi
cmp    %r11,%rcx
mov    0x8(%rsp),%rbx
je     14c0 <eig_dec+0x3a0>
jmp    18a1 <eig_dec+0x781>
xchg   %ax,%ax
test   %r8d,%r8d
mov    0x20(%rsp),%rsi
je     1a4b <eig_dec+0x92b>
mov    0xb0(%rsp),%rax
add    $0x1,%eax
cmp    $0x14,%eax
jne    1300 <eig_dec+0x1e0>
lea    0x60b(%rip),%rdi
add    $0x178,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <puts@plt>
add    $0x178,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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