#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 compute_error(double **, double **, int const);
int /*<<< orphan*/ memcpy(double *, double *, int const);
int sor(double unew[][700 + 2], double uold[][700 + 2],
        double solution[][700 + 2], const double omega, const double tol,
        const int m) {
  int i, j;
  for (i = 0; i < m + 2; ++i) {
    unew[i][m + 1] = uold[i][m + 1];
    unew[m + 1][i] = uold[m + 1][i];
    unew[i][0] = uold[i][0];
    unew[0][i] = uold[0][i];
  }
  int iters = 0;
  double error = compute_error(solution, uold, m);
  while (error > tol) {
    for (i = 1; i < m + 1; ++i) {
      for (j = 2 + i; j < m + 1 + i; ++j) {
        unew[i][j - i] =
            uold[i][j - i] +
            0.25 * omega *
                (unew[i - 1][j - i] + unew[i][j - 1 - i] + uold[i + 1][j - i] +
                 uold[i][j + 1 - i] - 4.0 * uold[i][j - i]);
      }
    }
    for (i = 1; i < m + 1; ++i) {
      memcpy(&uold[i][1], &unew[i][1], m * sizeof(double));
    }
    ++iters;
    if (iters % 20 == 0) {
      error = compute_error(solution, uold, m);
    }
  }
  return iters;
}


x86 assembly (clang, -O0):
<sor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
mov    %ecx,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x2c(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    122d <sor+0x10d>
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
imul   $0x15f0,%rcx,%rcx
add    %rcx,%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
imul   $0x15f0,%rcx,%rcx
add    %rcx,%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
imul   $0x15f0,%rcx,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
imul   $0x15f0,%rcx,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
imul   $0x15f0,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
imul   $0x15f0,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1148 <sor+0x28>
movl   $0x0,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x2c(%rbp),%edx
call   1040 <compute_error@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    145c <sor+0x33c>
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    13c4 <sor+0x2a4>
mov    -0x30(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
add    -0x30(%rbp),%ecx
cmp    %ecx,%eax
jge    13b1 <sor+0x291>
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
imul   $0x15f0,%rcx,%rcx
add    %rcx,%rax
mov    -0x34(%rbp),%ecx
sub    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xd52(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
imul   $0x15f0,%rcx,%rcx
add    %rcx,%rax
mov    -0x34(%rbp),%ecx
sub    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm3
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
imul   $0x15f0,%rcx,%rcx
add    %rcx,%rax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
sub    -0x30(%rbp),%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm3
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
imul   $0x15f0,%rcx,%rcx
add    %rcx,%rax
mov    -0x34(%rbp),%ecx
sub    -0x30(%rbp),%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm3
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
imul   $0x15f0,%rcx,%rcx
add    %rcx,%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
sub    -0x30(%rbp),%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm3
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
imul   $0x15f0,%rcx,%rcx
add    %rcx,%rax
mov    -0x34(%rbp),%ecx
sub    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  0xc8d(%rip),%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
imul   $0x15f0,%rcx,%rcx
add    %rcx,%rax
mov    -0x34(%rbp),%ecx
sub    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    127a <sor+0x15a>
jmp    13b6 <sor+0x296>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1260 <sor+0x140>
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1425 <sor+0x305>
mov    -0x10(%rbp),%rdi
movslq -0x30(%rbp),%rax
imul   $0x15f0,%rax,%rax
add    %rax,%rdi
add    $0x8,%rdi
mov    -0x8(%rbp),%rsi
movslq -0x30(%rbp),%rax
imul   $0x15f0,%rax,%rax
add    %rax,%rsi
add    $0x8,%rsi
movslq -0x2c(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    13cb <sor+0x2ab>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1457 <sor+0x337>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x2c(%rbp),%edx
call   1040 <compute_error@plt>
movsd  %xmm0,-0x40(%rbp)
jmp    1249 <sor+0x129>
mov    -0x38(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sor>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %ecx,%r14d
movsd  %xmm1,0x20(%rsp)
movsd  %xmm0,(%rsp)
mov    %rdx,0x10(%rsp)
cmp    $0xffffffff,%ecx
jl     11af <sor+0x8f>
lea    0x1(%r14),%eax
lea    0x2(%r14),%r9d
imul   $0x15f0,%rax,%rdx
lea    (%rdi,%rdx,1),%r8
add    %rsi,%rdx
shl    $0x3,%r9
xor    %ecx,%ecx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rsi,%rax,8),%xmm0
movsd  %xmm0,(%rdi,%rax,8)
movsd  (%rdx,%rbp,1),%xmm0
movsd  %xmm0,(%r8,%rbp,1)
movsd  (%rsi,%rcx,1),%xmm0
movsd  %xmm0,(%rdi,%rcx,1)
movsd  (%rsi,%rbp,1),%xmm0
movsd  %xmm0,(%rdi,%rbp,1)
add    $0x8,%rbp
add    $0x2be,%rax
add    $0x15f0,%rcx
cmp    %rbp,%r9
jne    1170 <sor+0x50>
mov    %rdi,0x18(%rsp)
mov    0x10(%rsp),%rdi
mov    %rsi,0x8(%rsp)
mov    %r14d,%edx
call   1040 <compute_error@plt>
xor    %ebx,%ebx
movsd  %xmm0,0x28(%rsp)
ucomisd 0x20(%rsp),%xmm0
jbe    13df <sor+0x2bf>
movsd  (%rsp),%xmm0
mulsd  0xe19(%rip),%xmm0
movsd  %xmm0,(%rsp)
lea    0x0(,%r14,8),%ebp
lea    0x1(%r14),%r13d
lea    -0x1(%r14),%r12d
mov    0x18(%rsp),%rcx
lea    0x15e8(%rcx),%rax
mov    %rax,0x58(%rsp)
mov    0x8(%rsp),%rax
lea    0x2bd8(%rax),%rdx
mov    %rdx,0x50(%rsp)
add    $0x15f8,%rax
mov    %rax,0x48(%rsp)
lea    0x15f8(%rcx),%rax
mov    %rax,0x40(%rsp)
lea    -0x1(%r13),%rax
mov    %rax,0x38(%rsp)
xor    %ebx,%ebx
mov    %r14,0x30(%rsp)
jmp    1262 <sor+0x142>
nopw   0x0(%rax,%rax,1)
movsd  0x28(%rsp),%xmm0
ucomisd 0x20(%rsp),%xmm0
jbe    13df <sor+0x2bf>
mov    %rbx,0x60(%rsp)
test   %r14d,%r14d
jle    13a1 <sor+0x281>
mov    %ebp,%r14d
mov    $0x3,%r9d
mov    $0x1,%edi
mov    0x50(%rsp),%rcx
mov    0x58(%rsp),%rdx
xor    %esi,%esi
mov    0x30(%rsp),%r10
movsd  (%rsp),%xmm3
mov    0x18(%rsp),%r11
movsd  0xd67(%rip),%xmm4
jmp    12d2 <sor+0x1b2>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r9d
add    $0x1,%rsi
add    $0x15e8,%rdx
add    $0x15e8,%rcx
mov    %r8,%rdi
cmp    %r13,%r8
je     1360 <sor+0x240>
lea    0x2(%rdi),%rbp
lea    0x1(%rdi),%r8
lea    (%r8,%r10,1),%ebx
movslq %ebx,%rbx
cmp    %rbx,%rbp
jge    12b0 <sor+0x190>
movslq %r9d,%rbx
lea    (%rdx,%rbx,8),%rbp
lea    (%rcx,%rbx,8),%rbx
lea    0x3(%rsi),%eax
cltq
sub    %rsi,%rax
imul   $0x15f0,%rdi,%rdi
add    %r11,%rdi
movsd  -0x10(%rdi,%rax,8),%xmm0
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
addsd  -0x15f0(%rbp,%rdi,8),%xmm0
ff ff
addsd  (%rbx,%rdi,8),%xmm0
addsd  -0x15e8(%rbx,%rdi,8),%xmm0
ff ff
movsd  -0x15f0(%rbx,%rdi,8),%xmm1
ff ff
movapd %xmm1,%xmm2
mulsd  %xmm4,%xmm2
addsd  %xmm0,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x0(%rbp,%rdi,8)
add    $0x1,%rdi
movapd %xmm2,%xmm0
cmp    %edi,%r12d
jne    1310 <sor+0x1f0>
jmp    12b0 <sor+0x190>
nopl   0x0(%rax)
test   %r10d,%r10d
mov    %r14d,%ebp
jle    13a1 <sor+0x281>
mov    0x38(%rsp),%rbx
mov    0x40(%rsp),%r14
mov    0x48(%rsp),%r15
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <memcpy@plt>
add    $0x15f0,%r15
add    $0x15f0,%r14
add    $0xffffffffffffffff,%rbx
jne    1380 <sor+0x260>
mov    0x60(%rsp),%rbx
add    $0x1,%ebx
imul   $0xcccccccd,%ebx,%eax
ror    $0x2,%eax
cmp    $0xccccccc,%eax
mov    0x30(%rsp),%r14
ja     1250 <sor+0x130>
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
mov    %r14d,%edx
call   1040 <compute_error@plt>
movsd  %xmm0,0x28(%rsp)
jmp    1250 <sor+0x130>
mov    %ebx,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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