#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 */
double pow(double, int);
int /*<<< orphan*/ rotate(double **, int, double, double, int, int);
double sqrt(double);
void jacobi(double **K, double **M, double *E, double **V, int n) {
  int iter, d, i, j, k;
  double Kii, Kjj, Kij, Mii, Mjj, Mij, Vki, Vkj, alpha, beta, gamma, s,
      tol = 0.0;
  Kii = Kjj = Kij = Mii = Mjj = Mij = Vki = Vkj = 0.0;
  for (i = 1; i <= n; i++)
    for (j = i + 1; j <= n; j++)
      V[i][j] = V[j][i] = 0.0;
  for (d = 1; d <= n; d++)
    V[d][d] = 1.0;
  for (iter = 1; iter <= 2 * n; iter++) {
    tol = pow(0.01, (2 * iter));
    tol = 0.0;
    for (d = 1; d <= (n - 1); d++) {
      for (i = 1; i <= (n - d); i++) {
        j = i + d;
        Kij = K[i][j];
        Mij = M[i][j];
        if (Kij * Kij / (K[i][i] * K[j][j]) > tol ||
            Mij * Mij / (M[i][i] * M[j][j]) > tol) {
          Kii = K[i][i] * Mij - Kij * M[i][i];
          Kjj = K[j][j] * Mij - Kij * M[j][j];
          s = K[i][i] * M[j][j] - K[j][j] * M[i][i];
          if (s >= 0.0)
            gamma = 0.5 * s + sqrt(0.25 * s * s + Kii * Kjj);
          else
            gamma = 0.5 * s - sqrt(0.25 * s * s + Kii * Kjj);
          alpha = Kjj / gamma;
          beta = -Kii / gamma;
          rotate(K, n, alpha, beta, i, j);
          rotate(M, n, alpha, beta, i, j);
          for (k = 1; k <= n; k++) {
            Vki = V[k][i];
            Vkj = V[k][j];
            V[k][i] = Vki + beta * Vkj;
            V[k][j] = Vkj + alpha * Vki;
          }
        }
      }
    }
  }
  for (j = 1; j <= n; j++) {
    Mjj = sqrt(M[j][j]);
    for (i = 1; i <= n; i++)
      V[i][j] /= Mjj;
  }
  for (j = 1; j <= n; j++)
    E[j] = K[j][j] / M[j][j];
  return;
}


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)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     1213 <jacobi+0xe3>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     1200 <jacobi+0xd0>
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11b6 <jacobi+0x86>
jmp    1205 <jacobi+0xd5>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11a1 <jacobi+0x71>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     1251 <jacobi+0x121>
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movsd  0xdda(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    121a <jacobi+0xea>
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x24(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jg     1712 <jacobi+0x5e2>
mov    -0x28(%rbp),%edi
shl    $0x1,%edi
movsd  0xd89(%rip),%xmm0
call   1040 <pow@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     16ff <jacobi+0x5cf>
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    -0x2c(%rbp),%ecx
cmp    %ecx,%eax
jg     16ec <jacobi+0x5bc>
mov    -0x30(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
ucomisd -0xa0(%rbp),%xmm0
ff
ja     1388 <jacobi+0x258>
movsd  -0x68(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
ucomisd -0xa0(%rbp),%xmm0
ff
jbe    16d9 <jacobi+0x5a9>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     152f <jacobi+0x3ff>
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0xb30(%rip),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0x40(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
movsd  0xaee(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    15a8 <jacobi+0x478>
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xac9(%rip),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0x40(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xb0(%rbp),%xmm0
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xa70(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
divsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x8(%rbp),%rdi
mov    -0x24(%rbp),%esi
movsd  -0x80(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
mov    -0x30(%rbp),%edx
mov    -0x34(%rbp),%ecx
call   1030 <rotate@plt>
mov    -0x10(%rbp),%rdi
mov    -0x24(%rbp),%esi
movsd  -0x80(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
mov    -0x30(%rbp),%edx
mov    -0x34(%rbp),%ecx
call   1030 <rotate@plt>
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     16d4 <jacobi+0x5a4>
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x70(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x78(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x78(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    162b <jacobi+0x4fb>
jmp    16d9 <jacobi+0x5a9>
jmp    16de <jacobi+0x5ae>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    12ae <jacobi+0x17e>
jmp    16f1 <jacobi+0x5c1>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1296 <jacobi+0x166>
jmp    1704 <jacobi+0x5d4>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1258 <jacobi+0x128>
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     179b <jacobi+0x66b>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x60(%rbp)
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     1788 <jacobi+0x658>
movsd  -0x60(%rbp),%xmm1
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    174b <jacobi+0x61b>
jmp    178d <jacobi+0x65d>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1719 <jacobi+0x5e9>
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     17f3 <jacobi+0x6c3>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    17a2 <jacobi+0x672>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jacobi>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rdx,0x68(%rsp)
mov    %rsi,0x8(%rsp)
mov    %rdi,0x18(%rsp)
test   %r8d,%r8d
jle    1830 <jacobi+0x700>
mov    %rcx,%rbx
lea    0x1(%r8),%edx
mov    %r8d,%eax
mov    %rax,0x58(%rsp)
lea    -0x2(%r8),%eax
mov    %eax,(%rsp)
lea    0x10(%rcx),%r12
mov    %r8,0x28(%rsp)
lea    0x3(%r8),%r13d
mov    $0x2,%r11d
mov    $0x1,%r9d
xor    %r15d,%r15d
mov    $0xfffffffffffffffe,%r10
jmp    11bd <jacobi+0x8d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r11
add    $0x1,%r15d
add    $0xffffffffffffffff,%r10
add    $0x8,%r12
add    $0x3,%r13b
cmp    %rdx,%r9
je     1294 <jacobi+0x164>
mov    %r9,%rax
movzbl %r13b,%r13d
and    $0x3,%r13d
add    $0x1,%r9
cmp    0x58(%rsp),%rax
jae    11a0 <jacobi+0x70>
mov    (%rsp),%r14d
sub    %r15d,%r14d
mov    %r15d,%edi
not    %edi
add    0x28(%rsp),%edi
mov    (%rbx,%rax,8),%rbp
mov    %r11,%rsi
test   $0x3,%dil
je     1220 <jacobi+0xf0>
lea    0x0(,%r11,8),%rdi
add    %rbp,%rdi
xor    %esi,%esi
nopl   (%rax)
mov    (%r12,%rsi,8),%rcx
movq   $0x0,(%rcx,%rax,8)
movq   $0x0,(%rdi,%rsi,8)
add    $0x1,%rsi
cmp    %esi,%r13d
jne    1200 <jacobi+0xd0>
sub    %r10,%rsi
cmp    $0x3,%r14d
jb     11a0 <jacobi+0x70>
nopw   0x0(%rax,%rax,1)
mov    (%rbx,%rsi,8),%rcx
movq   $0x0,(%rcx,%rax,8)
movq   $0x0,0x0(%rbp,%rsi,8)
mov    0x8(%rbx,%rsi,8),%rcx
movq   $0x0,(%rcx,%rax,8)
movq   $0x0,0x8(%rbp,%rsi,8)
mov    0x10(%rbx,%rsi,8),%rcx
movq   $0x0,(%rcx,%rax,8)
movq   $0x0,0x10(%rbp,%rsi,8)
mov    0x18(%rbx,%rsi,8),%rcx
movq   $0x0,(%rcx,%rax,8)
movq   $0x0,0x18(%rbp,%rsi,8)
add    $0x4,%rsi
cmp    %esi,%edx
jne    1230 <jacobi+0x100>
jmp    11a0 <jacobi+0x70>
mov    0x28(%rsp),%r15
test   %r15d,%r15d
jle    1830 <jacobi+0x700>
lea    -0x1(%rdx),%rax
lea    -0x2(%rdx),%rsi
mov    %rax,%rcx
mov    %rax,0x10(%rsp)
and    $0x3,%eax
mov    $0x1,%ebp
movabs $0x3ff0000000000000,%rcx
mov    %rsi,0x30(%rsp)
cmp    $0x3,%rsi
jb     1315 <jacobi+0x1e5>
mov    0x10(%rsp),%rsi
and    $0xfffffffffffffffc,%rsi
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    0x8(%rbx,%rbp,8),%rdi
mov    %rcx,0x8(%rdi,%rbp,8)
mov    0x10(%rbx,%rbp,8),%rdi
mov    %rcx,0x10(%rdi,%rbp,8)
mov    0x18(%rbx,%rbp,8),%rdi
mov    %rcx,0x18(%rdi,%rbp,8)
mov    0x20(%rbx,%rbp,8),%rdi
mov    %rcx,0x20(%rdi,%rbp,8)
add    $0x4,%rbp
cmp    %rbp,%rsi
jne    12e0 <jacobi+0x1b0>
add    $0x1,%rbp
test   %rax,%rax
je     1332 <jacobi+0x202>
nopw   0x0(%rax,%rax,1)
mov    (%rbx,%rbp,8),%rsi
mov    %rcx,(%rsi,%rbp,8)
add    $0x1,%rbp
add    $0xffffffffffffffff,%rax
jne    1320 <jacobi+0x1f0>
test   %r15d,%r15d
jle    1830 <jacobi+0x700>
mov    %rdx,0x50(%rsp)
lea    (%r15,%r15,1),%eax
cmp    $0x2,%eax
mov    $0x1,%ecx
cmovl  %ecx,%eax
mov    %eax,0x3c(%rsp)
mov    0x10(%rsp),%r12
and    $0xfffffffffffffffe,%r12
neg    %r12
mov    0x8(%rsp),%r14
jmp    1384 <jacobi+0x254>
cs nopw 0x0(%rax,%rax,1)
mov    0x70(%rsp),%rcx
lea    0x1(%rcx),%eax
cmp    0x3c(%rsp),%ecx
mov    %eax,%ecx
je     16ae <jacobi+0x57e>
mov    %rcx,0x70(%rsp)
lea    (%rcx,%rcx,1),%edi
movsd  0xc6c(%rip),%xmm0
call   1040 <pow@plt>
xorpd  %xmm8,%xmm8
cmp    $0x1,%r15d
mov    0x18(%rsp),%rdi
je     1370 <jacobi+0x240>
mov    $0x1,%edx
mov    %r15d,%eax
mov    %r15d,0x24(%rsp)
jmp    13d5 <jacobi+0x2a5>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rdx
addl   $0xffffffff,0x24(%rsp)
cmp    0x58(%rsp),%rdx
mov    0x28(%rsp),%r15
je     1370 <jacobi+0x240>
cmp    %r15d,%edx
jge    13c0 <jacobi+0x290>
mov    0x24(%rsp),%eax
mov    %rax,0x80(%rsp)
mov    $0x1,%ebp
mov    %rdx,0x60(%rsp)
jmp    140e <jacobi+0x2de>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rbp
cmp    0x80(%rsp),%rbp
je     13c0 <jacobi+0x290>
lea    (%rdx,%rbp,1),%r13
mov    (%rdi,%rbp,8),%rcx
movsd  (%rcx,%r13,8),%xmm0
mov    (%r14,%rbp,8),%rax
movsd  (%rax,%r13,8),%xmm7
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
movsd  (%rcx,%rbp,8),%xmm6
mov    (%rdi,%r13,8),%rcx
movsd  (%rcx,%r13,8),%xmm9
movapd %xmm6,%xmm3
mulsd  %xmm9,%xmm3
divsd  %xmm3,%xmm2
ucomisd %xmm8,%xmm2
jbe    1470 <jacobi+0x340>
movsd  (%rax,%rbp,8),%xmm2
mov    (%r14,%r13,8),%rax
movsd  (%rax,%r13,8),%xmm3
jmp    149e <jacobi+0x36e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movapd %xmm7,%xmm4
mulsd  %xmm7,%xmm4
movsd  (%rax,%rbp,8),%xmm2
mov    (%r14,%r13,8),%rax
movsd  (%rax,%r13,8),%xmm3
movapd %xmm2,%xmm5
mulsd  %xmm3,%xmm5
divsd  %xmm5,%xmm4
ucomisd %xmm8,%xmm4
jbe    1400 <jacobi+0x2d0>
lea    (%rdx,%rbp,1),%r14d
movapd %xmm2,%xmm4
mulsd  %xmm0,%xmm4
movapd %xmm6,%xmm1
mulsd  %xmm7,%xmm1
subsd  %xmm4,%xmm1
mulsd  %xmm3,%xmm0
mulsd  %xmm9,%xmm7
subsd  %xmm0,%xmm7
mulsd  %xmm9,%xmm2
mulsd  %xmm3,%xmm6
subsd  %xmm2,%xmm6
movapd %xmm6,%xmm0
mulsd  0xb2c(%rip),%xmm0
movapd %xmm1,%xmm2
mulsd  %xmm7,%xmm2
mulsd  %xmm6,%xmm0
addsd  %xmm2,%xmm0
ucomisd %xmm8,%xmm0
jb     1500 <jacobi+0x3d0>
sqrtsd %xmm0,%xmm0
jmp    152c <jacobi+0x3fc>
nopl   0x0(%rax)
movsd  %xmm7,(%rsp)
movapd %xmm1,0x40(%rsp)
movsd  %xmm6,0x78(%rsp)
call   1050 <sqrt@plt>
movsd  0x78(%rsp),%xmm6
movapd 0x40(%rsp),%xmm1
movsd  (%rsp),%xmm7
mov    0x18(%rsp),%rdi
movapd %xmm0,%xmm4
movapd 0xae8(%rip),%xmm3
xorpd  %xmm3,%xmm4
xorpd  %xmm2,%xmm2
cmpnlesd %xmm6,%xmm2
andpd  %xmm2,%xmm4
andnpd %xmm0,%xmm2
orpd   %xmm4,%xmm2
mulsd  0xab7(%rip),%xmm6
addsd  %xmm2,%xmm6
divsd  %xmm6,%xmm7
movsd  %xmm7,(%rsp)
xorpd  %xmm3,%xmm1
divsd  %xmm6,%xmm1
movapd %xmm1,0x40(%rsp)
mov    0x28(%rsp),%r15
mov    %r15d,%esi
movapd %xmm7,%xmm0
mov    %ebp,%edx
mov    %r14d,%ecx
call   1030 <rotate@plt>
mov    0x8(%rsp),%rdi
mov    %r15d,%esi
movsd  (%rsp),%xmm0
movapd 0x40(%rsp),%xmm1
mov    %ebp,%edx
mov    %r14d,%ecx
call   1030 <rotate@plt>
cmpq   $0x0,0x30(%rsp)
je     1650 <jacobi+0x520>
mov    $0x1,%eax
xorpd  %xmm8,%xmm8
mov    0x60(%rsp),%rdx
movsd  (%rsp),%xmm3
movapd 0x40(%rsp),%xmm4
nopl   (%rax)
mov    (%rbx,%rax,8),%rcx
movsd  (%rcx,%rbp,8),%xmm0
movsd  (%rcx,%r13,8),%xmm1
movapd %xmm4,%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,(%rcx,%rbp,8)
mulsd  %xmm3,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rcx,%r13,8)
mov    0x8(%rbx,%rax,8),%rcx
movsd  (%rcx,%rbp,8),%xmm0
movsd  (%rcx,%r13,8),%xmm1
movapd %xmm4,%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,(%rcx,%rbp,8)
mulsd  %xmm3,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rcx,%r13,8)
lea    (%r12,%rax,1),%rcx
add    $0x2,%rcx
add    $0x2,%rax
cmp    $0x1,%rcx
jne    15d0 <jacobi+0x4a0>
jmp    166a <jacobi+0x53a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%eax
xorpd  %xmm8,%xmm8
mov    0x60(%rsp),%rdx
movsd  (%rsp),%xmm3
movapd 0x40(%rsp),%xmm4
testb  $0x1,0x10(%rsp)
mov    0x8(%rsp),%r14
mov    0x18(%rsp),%rdi
je     1400 <jacobi+0x2d0>
mov    (%rbx,%rax,8),%rax
movsd  (%rax,%rbp,8),%xmm0
movsd  (%rax,%r13,8),%xmm1
mulsd  %xmm1,%xmm4
addsd  %xmm0,%xmm4
movsd  %xmm4,(%rax,%rbp,8)
mulsd  %xmm0,%xmm3
addsd  %xmm1,%xmm3
movsd  %xmm3,(%rax,%r13,8)
jmp    1400 <jacobi+0x2d0>
test   %r15d,%r15d
mov    0x68(%rsp),%r14
mov    0x50(%rsp),%rdx
jle    1830 <jacobi+0x700>
mov    $0x1,%ebp
xorpd  %xmm2,%xmm2
jmp    16dd <jacobi+0x5ad>
nopl   0x0(%rax)
add    $0x1,%rbp
cmp    %rdx,%rbp
je     178d <jacobi+0x65d>
mov    0x8(%rsp),%rax
mov    (%rax,%rbp,8),%rax
movsd  (%rax,%rbp,8),%xmm0
ucomisd %xmm2,%xmm0
jb     1750 <jacobi+0x620>
sqrtsd %xmm0,%xmm0
cmpq   $0x0,0x30(%rsp)
je     1766 <jacobi+0x636>
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%rbx,%rax,8),%rcx
movsd  (%rcx,%rbp,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rcx,%rbp,8)
mov    0x8(%rbx,%rax,8),%rcx
movsd  (%rcx,%rbp,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rcx,%rbp,8)
lea    (%r12,%rax,1),%rcx
add    $0x2,%rcx
add    $0x2,%rax
cmp    $0x1,%rcx
jne    1710 <jacobi+0x5e0>
testb  $0x1,0x10(%rsp)
je     16d0 <jacobi+0x5a0>
jmp    1776 <jacobi+0x646>
call   1050 <sqrt@plt>
xorpd  %xmm2,%xmm2
mov    0x50(%rsp),%rdx
cmpq   $0x0,0x30(%rsp)
jne    16fd <jacobi+0x5cd>
mov    $0x1,%eax
testb  $0x1,0x10(%rsp)
je     16d0 <jacobi+0x5a0>
mov    (%rbx,%rax,8),%rax
movsd  (%rax,%rbp,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rax,%rbp,8)
jmp    16d0 <jacobi+0x5a0>
test   %r15d,%r15d
jle    1830 <jacobi+0x700>
cmpq   $0x0,0x30(%rsp)
je     1842 <jacobi+0x712>
mov    $0x1,%eax
mov    0x8(%rsp),%rdx
mov    0x18(%rsp),%rsi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%rsi,%rax,8),%rcx
movsd  (%rcx,%rax,8),%xmm0
mov    (%rdx,%rax,8),%rcx
divsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,(%r14,%rax,8)
mov    0x8(%rsi,%rax,8),%rcx
movsd  0x8(%rcx,%rax,8),%xmm0
mov    0x8(%rdx,%rax,8),%rcx
divsd  0x8(%rcx,%rax,8),%xmm0
movsd  %xmm0,0x8(%r14,%rax,8)
lea    (%r12,%rax,1),%rcx
add    $0x2,%rcx
add    $0x2,%rax
cmp    $0x1,%rcx
jne    17c0 <jacobi+0x690>
testb  $0x1,0x10(%rsp)
je     1830 <jacobi+0x700>
mov    0x18(%rsp),%rcx
mov    (%rcx,%rax,8),%rcx
movsd  (%rcx,%rax,8),%xmm0
mov    0x8(%rsp),%rcx
mov    (%rcx,%rax,8),%rcx
divsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,(%r14,%rax,8)
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%eax
testb  $0x1,0x10(%rsp)
jne    180e <jacobi+0x6de>
jmp    1830 <jacobi+0x700>

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

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