void jacobi(double m[6], double e[3], double ev[3][3], double threshold) {
  double err = 1.0;
  e[0] = m[0];
  e[1] = m[3];
  e[2] = m[5];
  mleye(3, ev);
  while (err > 0) {
    err = 0.0;
    for (int od = 0; od < 3; od++) {
      int i = 1 << od, row = od >> 1, col = 1 + (od >> (od >> 1));
      double ami = fabs(m[i]), eps = ami / threshold;
      if (fabs(e[row]) + eps == fabs(e[row]) &&
          fabs(e[col]) + eps == fabs(e[col])) {
        m[i] = 0.0;
      } else if (ami > 0.0) {
        err = fmax(ami, err);
        double d = e[col] - e[row],
               t = copysign(2, d) * m[i] /
                   (fabs(d) + sqrt(((d) * (d)) + 4 * ((m[i]) * (m[i])))),
               c = 1 / sqrt(1 + ((t) * (t))), s = c * t;
        e[row] -= t * m[i];
        e[col] += t * m[i];
        m[i] = 0.0;
        for (int k = 0; k < 3; k++) {
          double evr = ev[k][row], evc = ev[k][col];
          ev[k][row] = c * evr - s * evc;
          ev[k][col] = s * evr + c * evc;
        }
        int ix = col ^ 3, iy = 4 >> row;
        double mix = m[ix], miy = m[iy];
        m[ix] = c * mix - s * miy;
        m[iy] = s * mix + c * miy;
      }
    }
  }
}


x86 assembly (clang, -O0):
<jacobi>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  0xebc(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x18(%rbp),%rsi
mov    $0x3,%edi
mov    $0x0,%al
call   1030 <mleye@plt>
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    162a <jacobi+0x50a>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x3,-0x2c(%rbp)
jge    1625 <jacobi+0x505>
mov    -0x2c(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x30(%rbp)
mov    -0x2c(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x2c(%rbp),%ecx
sar    $0x1,%ecx
sar    %cl,%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xe1d(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xdf1(%rip),%xmm1
pand   %xmm1,%xmm0
addsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0xdd4(%rip),%xmm2
pand   %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jne    12aa <jacobi+0x18a>
jp     12aa <jacobi+0x18a>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xdac(%rip),%xmm1
pand   %xmm1,%xmm0
addsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0xd8f(%rip),%xmm2
pand   %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jne    12aa <jacobi+0x18a>
jp     12aa <jacobi+0x18a>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1612 <jacobi+0x4f2>
movsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    160d <jacobi+0x4ed>
movsd  -0x40(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm2
movaps %xmm2,%xmm4
movaps %xmm3,%xmm0
cmpunordsd %xmm0,%xmm0
movaps %xmm0,%xmm1
pand   %xmm4,%xmm1
maxsd  %xmm3,%xmm2
pandn  %xmm2,%xmm0
por    %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movaps 0xd0c(%rip),%xmm1
pand   %xmm1,%xmm0
movaps 0xd11(%rip),%xmm1
por    %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movaps 0xccc(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm3
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm3
movsd  0xc8c(%rip),%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  -0xa8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xa0(%rbp),%xmm0
ff
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc3d(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xc29(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x58(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x6c(%rbp)
cmpl   $0x3,-0x6c(%rbp)
jge    1546 <jacobi+0x426>
mov    -0x18(%rbp),%rax
movslq -0x6c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x6c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  -0x80(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x6c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x68(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x6c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1475 <jacobi+0x355>
mov    -0x38(%rbp),%eax
xor    $0x3,%eax
mov    %eax,-0x84(%rbp)
mov    -0x34(%rbp),%ecx
mov    $0x4,%eax
sar    %cl,%eax
mov    %eax,-0x88(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x84(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x8(%rbp),%rax
movslq -0x88(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  -0x90(%rbp),%xmm2
ff
movsd  -0x68(%rbp),%xmm1
mulsd  -0x98(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x84(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x68(%rbp),%xmm0
movsd  -0x90(%rbp),%xmm2
ff
movsd  -0x60(%rbp),%xmm1
mulsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x88(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1612 <jacobi+0x4f2>
jmp    1617 <jacobi+0x4f7>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11ae <jacobi+0x8e>
jmp    118d <jacobi+0x6d>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jacobi>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
movsd  %xmm0,0x18(%rsp)
mov    %rdx,%r12
mov    %rsi,%rbx
mov    %rdi,%rbp
movsd  (%rdi),%xmm0
movsd  %xmm0,(%rsi)
movsd  0x18(%rdi),%xmm0
movsd  %xmm0,0x8(%rsi)
movsd  0x28(%rdi),%xmm0
movsd  %xmm0,0x10(%rsi)
xor    %r13d,%r13d
mov    $0x3,%edi
mov    %rdx,%rsi
xor    %eax,%eax
call   1030 <mleye@plt>
mov    %rbp,%rsi
mov    %rbx,%rdx
movsd  0x18(%rsp),%xmm11
xorpd  %xmm10,%xmm10
movapd 0xe7b(%rip),%xmm5
movapd 0xe72(%rip),%xmm9
movsd  0xea1(%rip),%xmm8
xorpd  %xmm7,%xmm7
mov    %rbx,0x10(%rsp)
mov    %rsi,0x8(%rsp)
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x1,%r15d
mov    %r13d,%ecx
shl    %cl,%r15d
mov    %r13d,%ebx
shr    %ebx
mov    %r13d,%ebp
mov    %ebx,%ecx
shr    %cl,%ebp
add    $0x1,%ebp
movsd  (%rsi,%r15,8),%xmm6
movapd %xmm6,%xmm4
andpd  %xmm5,%xmm4
movapd %xmm4,%xmm1
divsd  %xmm11,%xmm1
movsd  (%rdx,%rbx,8),%xmm0
movapd %xmm0,%xmm2
andpd  %xmm5,%xmm2
movapd %xmm2,%xmm3
addsd  %xmm1,%xmm3
ucomisd %xmm2,%xmm3
mov    %ebp,%r14d
jne    1230 <jacobi+0x110>
jp     1230 <jacobi+0x110>
movsd  (%rdx,%r14,8),%xmm2
andpd  %xmm9,%xmm2
addsd  %xmm2,%xmm1
ucomisd %xmm2,%xmm1
jne    1230 <jacobi+0x110>
jp     1230 <jacobi+0x110>
movq   $0x0,(%rsi,%r15,8)
jmp    1491 <jacobi+0x371>
cs nopw 0x0(%rax,%rax,1)
ucomisd %xmm10,%xmm6
je     1491 <jacobi+0x371>
movsd  (%rdx,%r14,8),%xmm2
subsd  %xmm0,%xmm2
movapd %xmm6,%xmm1
mulsd  %xmm6,%xmm1
mulsd  0xddb(%rip),%xmm1
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm10,%xmm0
movapd %xmm7,0x40(%rsp)
movapd %xmm4,0x30(%rsp)
jb     127a <jacobi+0x15a>
sqrtsd %xmm0,%xmm0
jmp    12ae <jacobi+0x18e>
movapd %xmm6,0x20(%rsp)
movapd %xmm2,0x50(%rsp)
call   1040 <sqrt@plt>
movapd 0x50(%rsp),%xmm2
movapd 0x20(%rsp),%xmm6
movsd  0xd98(%rip),%xmm8
movapd 0xd57(%rip),%xmm9
xorpd  %xmm10,%xmm10
movapd %xmm2,%xmm1
andpd  0xd56(%rip),%xmm1
orpd   0xd5e(%rip),%xmm1
mulsd  %xmm1,%xmm6
andpd  %xmm9,%xmm2
addsd  %xmm0,%xmm2
divsd  %xmm2,%xmm6
movapd %xmm6,%xmm0
mulsd  %xmm6,%xmm0
addsd  %xmm8,%xmm0
ucomisd %xmm10,%xmm0
jb     12ed <jacobi+0x1cd>
sqrtsd %xmm0,%xmm0
jmp    1315 <jacobi+0x1f5>
movapd %xmm6,0x20(%rsp)
call   1040 <sqrt@plt>
movapd 0x20(%rsp),%xmm6
movsd  0xd31(%rip),%xmm8
movapd 0xcf0(%rip),%xmm9
xorpd  %xmm10,%xmm10
mov    0x10(%rsp),%rdx
mov    0x8(%rsp),%rsi
movapd 0x40(%rsp),%xmm7
movapd 0x30(%rsp),%xmm11
movapd %xmm8,%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
mulsd  %xmm6,%xmm0
movsd  (%rdx,%rbx,8),%xmm2
movsd  (%rsi,%r15,8),%xmm3
mulsd  %xmm6,%xmm3
subsd  %xmm3,%xmm2
movsd  %xmm2,(%rdx,%rbx,8)
mulsd  (%rsi,%r15,8),%xmm6
addsd  (%rdx,%r14,8),%xmm6
movsd  %xmm6,(%rdx,%r14,8)
movq   $0x0,(%rsi,%r15,8)
movsd  (%r12,%rbx,8),%xmm2
movsd  (%r12,%r14,8),%xmm3
movapd %xmm3,%xmm4
mulsd  %xmm0,%xmm4
movapd %xmm1,%xmm5
mulsd  %xmm2,%xmm5
subsd  %xmm4,%xmm5
movsd  %xmm5,(%r12,%rbx,8)
mulsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm2
addsd  %xmm3,%xmm2
movsd  %xmm2,(%r12,%r14,8)
movsd  0x18(%r12,%rbx,8),%xmm2
movsd  0x18(%r12,%r14,8),%xmm3
movapd %xmm3,%xmm4
mulsd  %xmm0,%xmm4
movapd %xmm1,%xmm5
mulsd  %xmm2,%xmm5
subsd  %xmm4,%xmm5
movsd  %xmm5,0x18(%r12,%rbx,8)
mulsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm2
addsd  %xmm3,%xmm2
movsd  %xmm2,0x18(%r12,%r14,8)
movsd  0x30(%r12,%rbx,8),%xmm2
movsd  0x30(%r12,%r14,8),%xmm3
movapd %xmm3,%xmm4
mulsd  %xmm0,%xmm4
movapd %xmm1,%xmm5
mulsd  %xmm2,%xmm5
subsd  %xmm4,%xmm5
movsd  %xmm5,0x30(%r12,%rbx,8)
mulsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm2
addsd  %xmm3,%xmm2
movsd  %xmm2,0x30(%r12,%r14,8)
movapd %xmm11,%xmm2
cmpunordsd %xmm11,%xmm2
movapd %xmm2,%xmm3
andpd  %xmm7,%xmm3
maxsd  %xmm11,%xmm7
andnpd %xmm7,%xmm2
orpd   %xmm3,%xmm2
mov    $0x4,%eax
mov    %ebx,%ecx
shr    %cl,%eax
xor    $0x3,%ebp
movslq %ebp,%rcx
movsd  (%rsi,%rcx,8),%xmm3
movsd  (%rsi,%rax,8),%xmm4
movapd %xmm1,%xmm5
mulsd  %xmm4,%xmm1
mulsd  %xmm0,%xmm4
mulsd  %xmm3,%xmm5
subsd  %xmm4,%xmm5
movsd  %xmm5,(%rsi,%rcx,8)
mulsd  %xmm3,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rsi,%rax,8)
movapd %xmm2,%xmm7
movsd  0x18(%rsp),%xmm11
movapd 0xb6f(%rip),%xmm5
add    $0x1,%r13d
cmp    $0x3,%r13d
jne    11b0 <jacobi+0x90>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm7
xorpd  %xmm7,%xmm7
mov    $0x0,%r13d
ja     11b0 <jacobi+0x90>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @jacobi(double* nocapture %0, double* nocapture %1, [3 x double]* %2, double %3) {
%5 = load double, double* %0
store double %5, double* %1
%6 = getelementptr inbounds double, double* %0, i64 3
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %1, i64 1
store double %7, double* %8
%9 = getelementptr inbounds double, double* %0, i64 5
%10 = load double, double* %9
%11 = getelementptr inbounds double, double* %1, i64 2
store double %10, double* %11
%12 = tail call i32 (i32, [3 x double]*, ...) bitcast (i32 (...)* @mleye to i32 (i32, [3 x double]*, ...)*)(i32 3, [3 x double]* %2)
br label %15
13: ; preds = %106
%14 = fcmp ogt double %107, 0.000000e+00
br i1 %14, label %110, label %113
15: ; preds = %110, %4
%16 = phi double [ 0.000000e+00, %4 ], [ %111, %110 ]
%17 = phi i32 [ 0, %4 ], [ %112, %110 ]
%18 = shl nuw nsw i32 1, %17
%19 = lshr i32 %17, 1
%20 = lshr i32 %17, %19
%21 = add nuw nsw i32 %20, 1
%22 = zext i32 %18 to i64
%23 = getelementptr inbounds double, double* %0, i64 %22
%24 = load double, double* %23
%25 = tail call double @llvm.fabs.f64(double %24)
%26 = fdiv double %25, %3
%27 = zext i32 %19 to i64
%28 = getelementptr inbounds double, double* %1, i64 %27
%29 = load double, double* %28
%30 = tail call double @llvm.fabs.f64(double %29)
%31 = fadd double %30, %26
%32 = fcmp oeq double %31, %30
br i1 %32, label %33, label %41
33: ; preds = %15
%34 = zext i32 %21 to i64
%35 = getelementptr inbounds double, double* %1, i64 %34
%36 = load double, double* %35
%37 = tail call double @llvm.fabs.f64(double %36)
%38 = fadd double %26, %37
%39 = fcmp oeq double %38, %37
br i1 %39, label %40, label %41
40: ; preds = %33
store double 0.000000e+00, double* %23
br label %106
41: ; preds = %33, %15
%42 = fcmp ueq double %24, 0.000000e+00
br i1 %42, label %106, label %43
43: ; preds = %41
%44 = zext i32 %21 to i64
%45 = getelementptr inbounds double, double* %1, i64 %44
%46 = load double, double* %45
%47 = fsub double %46, %29
%48 = tail call double @llvm.copysign.f64(double 2.000000e+00, double %47)
%49 = fmul double %24, %48
%50 = tail call double @llvm.fabs.f64(double %47)
%51 = fmul double %24, %24
%52 = fmul double %51, 4.000000e+00
%53 = tail call double @llvm.fmuladd.f64(double %47, double %47, double %52)
%54 = tail call double @sqrt(double %53)
%55 = fadd double %54, %50
%56 = fdiv double %49, %55
%57 = tail call double @llvm.fmuladd.f64(double %56, double %56, double 1.000000e+00)
%58 = tail call double @sqrt(double %57)
%59 = fdiv double 1.000000e+00, %58
%60 = fmul double %59, %56
%61 = load double, double* %23
%62 = load double, double* %28
%63 = fneg double %56
%64 = tail call double @llvm.fmuladd.f64(double %63, double %61, double %62)
store double %64, double* %28
%65 = load double, double* %23
%66 = load double, double* %45
%67 = tail call double @llvm.fmuladd.f64(double %56, double %65, double %66)
store double %67, double* %45
store double 0.000000e+00, double* %23
%68 = fneg double %60
%69 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 %27
%70 = load double, double* %69
%71 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 %44
%72 = load double, double* %71
%73 = fmul double %72, %68
%74 = tail call double @llvm.fmuladd.f64(double %59, double %70, double %73)
store double %74, double* %69
%75 = fmul double %59, %72
%76 = tail call double @llvm.fmuladd.f64(double %60, double %70, double %75)
store double %76, double* %71
%77 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 1, i64 %27
%78 = load double, double* %77
%79 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 1, i64 %44
%80 = load double, double* %79
%81 = fmul double %80, %68
%82 = tail call double @llvm.fmuladd.f64(double %59, double %78, double %81)
store double %82, double* %77
%83 = fmul double %59, %80
%84 = tail call double @llvm.fmuladd.f64(double %60, double %78, double %83)
store double %84, double* %79
%85 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 2, i64 %27
%86 = load double, double* %85
%87 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 2, i64 %44
%88 = load double, double* %87
%89 = fmul double %88, %68
%90 = tail call double @llvm.fmuladd.f64(double %59, double %86, double %89)
store double %90, double* %85
%91 = fmul double %59, %88
%92 = tail call double @llvm.fmuladd.f64(double %60, double %86, double %91)
store double %92, double* %87
%93 = tail call double @llvm.maxnum.f64(double %25, double %16)
%94 = xor i32 %21, 3
%95 = lshr i32 4, %19
%96 = sext i32 %94 to i64
%97 = getelementptr inbounds double, double* %0, i64 %96
%98 = load double, double* %97
%99 = zext i32 %95 to i64
%100 = getelementptr inbounds double, double* %0, i64 %99
%101 = load double, double* %100
%102 = fmul double %101, %68
%103 = tail call double @llvm.fmuladd.f64(double %59, double %98, double %102)
store double %103, double* %97
%104 = fmul double %59, %101
%105 = tail call double @llvm.fmuladd.f64(double %60, double %98, double %104)
store double %105, double* %100
br label %106
106: ; preds = %41, %43, %40
%107 = phi double [ %16, %40 ], [ %93, %43 ], [ %16, %41 ]
%108 = add nuw nsw i32 %17, 1
%109 = icmp eq i32 %108, 3
br i1 %109, label %13, label %110
110: ; preds = %106, %13
%111 = phi double [ %107, %106 ], [ 0.000000e+00, %13 ]
%112 = phi i32 [ %108, %106 ], [ 0, %13 ]
br label %15
113: ; preds = %13
ret void
}