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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ fabs(double);
void sor(double **a, double **b, double **c, double **d, double **e, double **f,
         double **u, int jmax, double rjac) {
  void nrerror(char error_text[]);
  int ipass, j, jsw, l, lsw, n;
  double anorm, anormf = 0.0, omega = 1.0, resid;
  for (j = 2; j < jmax; j++)
    for (l = 2; l < jmax; l++)
      anormf += fabs(f[j][l]);
  for (n = 1; n <= 1000; n++) {
    anorm = 0.0;
    jsw = 1;
    for (ipass = 1; ipass <= 2; ipass++) {
      lsw = jsw;
      for (j = 2; j < jmax; j++) {
        for (l = lsw + 1; l < jmax; l += 2) {
          resid = a[j][l] * u[j + 1][l] + b[j][l] * u[j - 1][l] +
                  c[j][l] * u[j][l + 1] + d[j][l] * u[j][l - 1] +
                  e[j][l] * u[j][l] - f[j][l];
          anorm += fabs(resid);
          u[j][l] -= omega * resid / e[j][l];
        }
        lsw = 3 - lsw;
      }
      jsw = 3 - jsw;
      omega = (n == 1 && ipass == 1 ? 1.0 / (1.0 - 0.5 * rjac * rjac)
                                    : 1.0 / (1.0 - 0.25 * rjac * rjac * omega));
    }
    if (anorm < 1.0e-5 * anormf)
      return;
  }
  nrerror("MAXITS exceeded");
}


x86 assembly (clang, -O0):
<sor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xea1(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x2,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    11d4 <sor+0xb4>
movl   $0x2,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    11c1 <sor+0xa1>
mov    -0x30(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1040 <fabs@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    117e <sor+0x5e>
jmp    11c6 <sor+0xa6>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    116b <sor+0x4b>
movl   $0x1,-0x50(%rbp)
cmpl   $0x3e8,-0x50(%rbp)
jg     14dc <sor+0x3bc>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x1,-0x44(%rbp)
movl   $0x1,-0x3c(%rbp)
cmpl   $0x2,-0x3c(%rbp)
jg     14a8 <sor+0x388>
mov    -0x44(%rbp),%eax
mov    %eax,-0x4c(%rbp)
movl   $0x2,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    13d3 <sor+0x2b3>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    13ba <sor+0x29a>
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    0x10(%rbp),%rax
mov    -0x40(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
mov    -0x40(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x48(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x48(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x28(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
call   1040 <fabs@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x68(%rbp),%xmm1
mulsd  -0x70(%rbp),%xmm1
mov    -0x28(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm1
mov    0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x48(%rbp)
jmp    122a <sor+0x10a>
mov    $0x3,%eax
sub    -0x4c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1215 <sor+0xf5>
mov    $0x3,%eax
sub    -0x44(%rbp),%eax
mov    %eax,-0x44(%rbp)
cmpl   $0x1,-0x50(%rbp)
jne    1441 <sor+0x321>
cmpl   $0x1,-0x3c(%rbp)
jne    1441 <sor+0x321>
movsd  0xc1e(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xbd9(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xbcd(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
jmp    1490 <sor+0x370>
movsd  0xbc7(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xb85(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xb79(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11fe <sor+0xde>
movsd  -0x58(%rbp),%xmm1
movsd  0xb53(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    14c9 <sor+0x3a9>
jmp    14e8 <sor+0x3c8>
jmp    14ce <sor+0x3ae>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    11db <sor+0xbb>
lea    0xb3d(%rip),%rdi
call   1030 <nrerror@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sor>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
movsd  %xmm0,0x38(%rsp)
mov    %r8,0x50(%rsp)
mov    0xd8(%rsp),%r11d
mov    0xd0(%rsp),%r15
xorpd  %xmm1,%xmm1
mov    %r11d,%eax
mov    %rax,0x30(%rsp)
cmp    $0x3,%r11d
mov    %r9,0x18(%rsp)
mov    %rcx,0x68(%rsp)
mov    %rdx,0x60(%rsp)
mov    %rsi,0x58(%rsp)
mov    %r11d,0x2c(%rsp)
mov    %rdi,0x90(%rsp)
jl     1318 <sor+0x1f8>
mov    0x30(%rsp),%rax
lea    -0x2(%rax),%rbx
add    $0xfffffffffffffffd,%rax
mov    %rax,0x40(%rsp)
mov    %ebx,%ebp
and    $0x3,%ebp
and    $0xfffffffffffffffc,%rbx
neg    %rbx
xorpd  %xmm1,%xmm1
mov    $0x2,%r12d
jmp    11ce <sor+0xae>
nopl   (%rax)
add    $0x1,%r12
cmp    0x30(%rsp),%r12
mov    0x68(%rsp),%rcx
mov    0x60(%rsp),%rdx
mov    0x58(%rsp),%rsi
je     130b <sor+0x1eb>
cmpq   $0x3,0x40(%rsp)
jae    11f0 <sor+0xd0>
mov    $0x2,%r14d
jmp    12b9 <sor+0x199>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x2,%r14d
cs nopw 0x0(%rax,%rax,1)
movsd  %xmm1,0x20(%rsp)
mov    (%r9,%r12,8),%rax
movsd  (%rax,%r14,8),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    0x18(%rsp),%rax
mov    (%rax,%r12,8),%rax
movsd  0x8(%rax,%r14,8),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    0x18(%rsp),%rax
mov    (%rax,%r12,8),%rax
movsd  0x10(%rax,%r14,8),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    0x18(%rsp),%rax
mov    (%rax,%r12,8),%rax
movsd  0x18(%rax,%r14,8),%xmm0
call   1040 <fabs@plt>
mov    0x18(%rsp),%r9
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
addsd  0x8(%rsp),%xmm1
lea    (%rbx,%r14,1),%rax
add    $0x4,%rax
add    $0x4,%r14
cmp    $0x2,%rax
jne    1200 <sor+0xe0>
test   %rbp,%rbp
je     11b0 <sor+0x90>
mov    %rbp,%r13
cs nopw 0x0(%rax,%rax,1)
nop
movsd  %xmm1,0x20(%rsp)
mov    (%r9,%r12,8),%rax
movsd  (%rax,%r14,8),%xmm0
call   1040 <fabs@plt>
movsd  0x20(%rsp),%xmm1
mov    0x18(%rsp),%r9
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  %xmm0,%xmm1
add    $0x1,%r14
add    $0xffffffffffffffff,%r13
jne    12d0 <sor+0x1b0>
jmp    11b0 <sor+0x90>
mulsd  0xced(%rip),%xmm1
mov    0x2c(%rsp),%r11d
movsd  0xce8(%rip),%xmm0
movsd  0x38(%rsp),%xmm2
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x70(%rsp)
movsd  0xcd4(%rip),%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movsd  0xccc(%rip),%xmm2
addsd  %xmm2,%xmm0
movsd  %xmm0,0x78(%rsp)
movslq %r11d,%r12
movl   $0x1,0x10(%rsp)
mov    0x50(%rsp),%rbp
movsd  %xmm1,0x20(%rsp)
nopl   0x0(%rax)
xorpd  %xmm3,%xmm3
mov    $0x1,%eax
movl   $0x1,0x14(%rsp)
jmp    13b5 <sor+0x295>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x3,%edi
sub    0x14(%rsp),%edi
movsd  0xc77(%rip),%xmm2
divsd  %xmm0,%xmm2
add    $0x1,%eax
mov    %edi,0x14(%rsp)
cmp    $0x3,%eax
je     1590 <sor+0x470>
mov    %eax,0x4c(%rsp)
cmp    $0x3,%r11d
jl     1550 <sor+0x430>
mov    $0x2,%r14d
mov    0x14(%rsp),%eax
mov    %eax,%edi
movsd  %xmm2,0x38(%rsp)
jmp    13fb <sor+0x2db>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r14
mov    %r14,%rbx
mov    $0x3,%eax
sub    %edi,%eax
mov    %eax,%edi
cmp    0x30(%rsp),%rbx
je     1550 <sor+0x430>
lea    0x1(%rdi),%eax
cmp    %r11d,%eax
jge    13e0 <sor+0x2c0>
mov    %rdi,0x88(%rsp)
lea    0x1(%r14),%rdi
mov    %rdi,0x80(%rsp)
mov    %eax,%r13d
mov    (%r15,%r14,8),%rbx
mov    0x0(%rbp,%r14,8),%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  %xmm3,0x8(%rsp)
mov    0x90(%rsp),%rdi
mov    (%rdi,%r14,8),%rdi
movsd  (%rdi,%r13,8),%xmm0
mov    -0x8(%r15,%r14,8),%rbp
mov    0x8(%r15,%r14,8),%r8
mov    (%rsi,%r14,8),%rdi
movsd  (%rdi,%r13,8),%xmm1
mulsd  0x0(%rbp,%r13,8),%xmm1
mulsd  (%r8,%r13,8),%xmm0
addsd  %xmm1,%xmm0
mov    (%rdx,%r14,8),%rdx
movsd  (%rdx,%r13,8),%xmm1
mulsd  0x8(%rbx,%r13,8),%xmm1
addsd  %xmm0,%xmm1
mov    (%rcx,%r14,8),%rdx
movsd  (%rdx,%r13,8),%xmm2
mulsd  -0x8(%rbx,%r13,8),%xmm2
addsd  %xmm1,%xmm2
movsd  (%rax,%r13,8),%xmm0
mulsd  (%rbx,%r13,8),%xmm0
addsd  %xmm2,%xmm0
mov    (%r9,%r14,8),%rax
subsd  (%rax,%r13,8),%xmm0
movsd  %xmm0,0x40(%rsp)
call   1040 <fabs@plt>
movsd  0x8(%rsp),%xmm3
movsd  0x38(%rsp),%xmm2
mov    0x58(%rsp),%rsi
mov    0x60(%rsp),%rdx
mov    0x50(%rsp),%rbp
mov    0x68(%rsp),%rcx
mov    0x18(%rsp),%r9
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  %xmm0,%xmm3
movsd  0x40(%rsp),%xmm0
mulsd  %xmm2,%xmm0
mov    0x0(%rbp,%r14,8),%rax
divsd  (%rax,%r13,8),%xmm0
movapd %xmm0,%xmm1
mov    (%r15,%r14,8),%rbx
movsd  (%rbx,%r13,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rbx,%r13,8)
add    $0x2,%r13
cmp    %r12,%r13
jl     1430 <sor+0x310>
mov    0x80(%rsp),%rbx
mov    %rbx,%r14
mov    0x2c(%rsp),%r11d
movsd  0x20(%rsp),%xmm1
mov    0x88(%rsp),%rdi
jmp    13e7 <sor+0x2c7>
nopw   0x0(%rax,%rax,1)
mov    0x10(%rsp),%r10d
xor    $0x1,%r10d
mov    0x4c(%rsp),%eax
mov    %eax,%edi
xor    $0x1,%edi
or     %r10d,%edi
movsd  0x78(%rsp),%xmm0
je     1390 <sor+0x270>
mulsd  0x70(%rsp),%xmm2
addsd  0xa99(%rip),%xmm2
movapd %xmm2,%xmm0
jmp    1390 <sor+0x270>
nopl   0x0(%rax,%rax,1)
ucomisd %xmm3,%xmm1
ja     15c9 <sor+0x4a9>
mov    0x10(%rsp),%eax
add    $0x1,%eax
mov    %eax,0x10(%rsp)
cmp    $0x3e9,%eax
jne    1370 <sor+0x250>
lea    0xa6d(%rip),%rdi
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <nrerror@plt>
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"MAXITS exceeded\00"
define void @sor(double** nocapture %0, double** nocapture %1, double** nocapture %2, double** nocapture %3, double** nocapture %4, double** nocapture %5, double** nocapture %6, i32 %7, double %8) {
%10 = icmp sgt i32 %7, 2
br i1 %10, label %11, label %25
11: ; preds = %9
%12 = zext i32 %7 to i64
%13 = add nsw i64 %12, -2
%14 = add nsw i64 %12, -3
%15 = and i64 %13, 3
%16 = icmp ult i64 %14, 3
%17 = and i64 %13, -4
%18 = icmp eq i64 %15, 0
br label %19
19: ; preds = %84, %11
%20 = phi i64 [ 2, %11 ], [ %86, %84 ]
%21 = phi double [ 0.000000e+00, %11 ], [ %85, %84 ]
%22 = getelementptr inbounds double*, double** %5, i64 %20
br i1 %16, label %67, label %33
23: ; preds = %84
%24 = fmul double %85, 1.000000e-05
br label %25
25: ; preds = %23, %9
%26 = phi double [ 0.000000e+00, %9 ], [ %24, %23 ]
%27 = fmul double %8, -2.500000e-01
%28 = fmul double %27, %8
%29 = fmul double %8, -5.000000e-01
%30 = tail call double @llvm.fmuladd.f64(double %29, double %8, double 1.000000e+00)
%31 = sext i32 %7 to i64
%32 = zext i32 %7 to i64
br label %91
33: ; preds = %19, %33
%34 = phi i64 [ %64, %33 ], [ 2, %19 ]
%35 = phi double [ %63, %33 ], [ %21, %19 ]
%36 = phi i64 [ %65, %33 ], [ 0, %19 ]
%37 = load double*, double** %22
%38 = getelementptr inbounds double, double* %37, i64 %34
%39 = load double, double* %38
%40 = tail call i64 @fabs(double %39)
%41 = sitofp i64 %40 to double
%42 = fadd double %35, %41
%43 = or i64 %34, 1
%44 = load double*, double** %22
%45 = getelementptr inbounds double, double* %44, i64 %43
%46 = load double, double* %45
%47 = tail call i64 @fabs(double %46)
%48 = sitofp i64 %47 to double
%49 = fadd double %42, %48
%50 = add nuw nsw i64 %34, 2
%51 = load double*, double** %22
%52 = getelementptr inbounds double, double* %51, i64 %50
%53 = load double, double* %52
%54 = tail call i64 @fabs(double %53)
%55 = sitofp i64 %54 to double
%56 = fadd double %49, %55
%57 = add nuw nsw i64 %34, 3
%58 = load double*, double** %22
%59 = getelementptr inbounds double, double* %58, i64 %57
%60 = load double, double* %59
%61 = tail call i64 @fabs(double %60)
%62 = sitofp i64 %61 to double
%63 = fadd double %56, %62
%64 = add nuw nsw i64 %34, 4
%65 = add i64 %36, 4
%66 = icmp eq i64 %65, %17
br i1 %66, label %67, label %33
67: ; preds = %33, %19
%68 = phi double [ undef, %19 ], [ %63, %33 ]
%69 = phi i64 [ 2, %19 ], [ %64, %33 ]
%70 = phi double [ %21, %19 ], [ %63, %33 ]
br i1 %18, label %84, label %71
71: ; preds = %67, %71
%72 = phi i64 [ %81, %71 ], [ %69, %67 ]
%73 = phi double [ %80, %71 ], [ %70, %67 ]
%74 = phi i64 [ %82, %71 ], [ 0, %67 ]
%75 = load double*, double** %22
%76 = getelementptr inbounds double, double* %75, i64 %72
%77 = load double, double* %76
%78 = tail call i64 @fabs(double %77)
%79 = sitofp i64 %78 to double
%80 = fadd double %73, %79
%81 = add nuw nsw i64 %72, 1
%82 = add i64 %74, 1
%83 = icmp eq i64 %82, %15
br i1 %83, label %84, label %71
84: ; preds = %71, %67
%85 = phi double [ %68, %67 ], [ %80, %71 ]
%86 = add nuw nsw i64 %20, 1
%87 = icmp eq i64 %86, %12
br i1 %87, label %23, label %19
88: ; preds = %194
%89 = add nuw nsw i32 %93, 1
%90 = icmp eq i32 %89, 1001
br i1 %90, label %196, label %91
91: ; preds = %25, %88
%92 = phi double [ 1.000000e+00, %25 ], [ %191, %88 ]
%93 = phi i32 [ 1, %25 ], [ %89, %88 ]
%94 = icmp eq i32 %93, 1
br label %95
95: ; preds = %91, %184
%96 = phi i32 [ 1, %91 ], [ %192, %184 ]
%97 = phi double [ %92, %91 ], [ %191, %184 ]
%98 = phi double [ 0.000000e+00, %91 ], [ %185, %184 ]
%99 = phi i32 [ 1, %91 ], [ %186, %184 ]
br i1 %10, label %100, label %184
100: ; preds = %95, %179
%101 = phi i64 [ %180, %179 ], [ 2, %95 ]
%102 = phi double [ %181, %179 ], [ %98, %95 ]
%103 = phi i32 [ %182, %179 ], [ %99, %95 ]
%104 = add i32 %103, 1
%105 = icmp slt i32 %104, %7
br i1 %105, label %108, label %106
106: ; preds = %100
%107 = add nuw nsw i64 %101, 1
br label %179
108: ; preds = %100
%109 = getelementptr inbounds double*, double** %0, i64 %101
%110 = add nuw nsw i64 %101, 1
%111 = getelementptr inbounds double*, double** %6, i64 %110
%112 = getelementptr inbounds double*, double** %1, i64 %101
%113 = add nsw i64 %101, -1
%114 = getelementptr inbounds double*, double** %6, i64 %113
%115 = getelementptr inbounds double*, double** %2, i64 %101
%116 = getelementptr inbounds double*, double** %6, i64 %101
%117 = getelementptr inbounds double*, double** %3, i64 %101
%118 = getelementptr inbounds double*, double** %4, i64 %101
%119 = getelementptr inbounds double*, double** %5, i64 %101
%120 = zext i32 %104 to i64
%121 = load double*, double** %116
%122 = load double*, double** %118
br label %123
123: ; preds = %108, %123
%124 = phi double* [ %122, %108 ], [ %169, %123 ]
%125 = phi double* [ %121, %108 ], [ %173, %123 ]
%126 = phi i64 [ %120, %108 ], [ %177, %123 ]
%127 = phi double [ %102, %108 ], [ %167, %123 ]
%128 = load double*, double** %109
%129 = getelementptr inbounds double, double* %128, i64 %126
%130 = load double, double* %129
%131 = load double*, double** %111
%132 = getelementptr inbounds double, double* %131, i64 %126
%133 = load double, double* %132
%134 = load double*, double** %112
%135 = getelementptr inbounds double, double* %134, i64 %126
%136 = load double, double* %135
%137 = load double*, double** %114
%138 = getelementptr inbounds double, double* %137, i64 %126
%139 = load double, double* %138
%140 = fmul double %136, %139
%141 = tail call double @llvm.fmuladd.f64(double %130, double %133, double %140)
%142 = load double*, double** %115
%143 = getelementptr inbounds double, double* %142, i64 %126
%144 = load double, double* %143
%145 = add nsw i64 %126, 1
%146 = getelementptr inbounds double, double* %125, i64 %145
%147 = load double, double* %146
%148 = tail call double @llvm.fmuladd.f64(double %144, double %147, double %141)
%149 = load double*, double** %117
%150 = getelementptr inbounds double, double* %149, i64 %126
%151 = load double, double* %150
%152 = add nsw i64 %126, -1
%153 = getelementptr inbounds double, double* %125, i64 %152
%154 = load double, double* %153
%155 = tail call double @llvm.fmuladd.f64(double %151, double %154, double %148)
%156 = getelementptr inbounds double, double* %124, i64 %126
%157 = load double, double* %156
%158 = getelementptr inbounds double, double* %125, i64 %126
%159 = load double, double* %158
%160 = tail call double @llvm.fmuladd.f64(double %157, double %159, double %155)
%161 = load double*, double** %119
%162 = getelementptr inbounds double, double* %161, i64 %126
%163 = load double, double* %162
%164 = fsub double %160, %163
%165 = tail call i64 @fabs(double %164)
%166 = sitofp i64 %165 to double
%167 = fadd double %127, %166
%168 = fmul double %97, %164
%169 = load double*, double** %118
%170 = getelementptr inbounds double, double* %169, i64 %126
%171 = load double, double* %170
%172 = fdiv double %168, %171
%173 = load double*, double** %116
%174 = getelementptr inbounds double, double* %173, i64 %126
%175 = load double, double* %174
%176 = fsub double %175, %172
store double %176, double* %174
%177 = add i64 %126, 2
%178 = icmp slt i64 %177, %31
br i1 %178, label %123, label %179
179: ; preds = %123, %106
%180 = phi i64 [ %107, %106 ], [ %110, %123 ]
%181 = phi double [ %102, %106 ], [ %167, %123 ]
%182 = sub nsw i32 3, %103
%183 = icmp eq i64 %180, %32
br i1 %183, label %184, label %100
184: ; preds = %179, %95
%185 = phi double [ %98, %95 ], [ %181, %179 ]
%186 = sub nsw i32 3, %99
%187 = icmp eq i32 %96, 1
%188 = select i1 %94, i1 %187, i1 false
%189 = tail call double @llvm.fmuladd.f64(double %28, double %97, double 1.000000e+00)
%190 = select i1 %188, double %30, double %189
%191 = fdiv double 1.000000e+00, %190
%192 = add nuw nsw i32 %96, 1
%193 = icmp eq i32 %192, 3
br i1 %193, label %194, label %95
194: ; preds = %184
%195 = fcmp olt double %185, %26
br i1 %195, label %197, label %88
196: ; preds = %88
tail call void @nrerror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %197
197: ; preds = %194, %196
ret void
}