#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 fabs(double);
double JacobiOmpLoopV4(double **up, double **wp, int m, int n, double eps,
                       int maxit, int iterations_print, int *iterations) {
  int i;
  int j;
  double my_diff;
  double diff = eps;
  while (eps <= diff && *iterations < maxit) {
    diff = 0.0;
#pragma omp parallel private(j, my_diff)
    {
      my_diff = 0.0;
#pragma omp for schedule(OMP_SCHED)
      for (i = 1; i < m - 1; i++) {
        for (j = 1; j < n - 1; j++) {
          wp[i][j] =
              (up[i - 1][j] + up[i + 1][j] + up[i][j - 1] + up[i][j + 1]) / 4.0;
        }
      }
#pragma omp for schedule(OMP_SCHED)
      for (i = 1; i < m - 1; i++) {
        for (j = 1; j < n - 1; j++) {
          up[i][j] =
              (wp[i - 1][j] + wp[i + 1][j] + wp[i][j - 1] + wp[i][j + 1]) / 4.0;
          if (my_diff < fabs(up[i][j] - wp[i][j]))
            my_diff = fabs(up[i][j] - wp[i][j]);
        }
      }
      if (diff < my_diff)
#pragma omp atomic write
        diff = my_diff;
    }
    *iterations += 2;
  }
  return diff;
}


x86 assembly (clang, -O0):
<JacobiOmpLoopV4>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
xor    %eax,%eax
ucomisd %xmm1,%xmm0
mov    %al,-0x41(%rbp)
jb     1155 <JacobiOmpLoopV4+0x55>
mov    0x10(%rbp),%rax
mov    (%rax),%eax
cmp    -0x24(%rbp),%eax
setl   %al
mov    %al,-0x41(%rbp)
mov    -0x41(%rbp),%al
test   $0x1,%al
jne    1165 <JacobiOmpLoopV4+0x65>
jmp    13da <JacobiOmpLoopV4+0x2da>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    124f <JacobiOmpLoopV4+0x14f>
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    123c <JacobiOmpLoopV4+0x13c>
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x30(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  0xdfb(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1194 <JacobiOmpLoopV4+0x94>
jmp    1241 <JacobiOmpLoopV4+0x141>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    117c <JacobiOmpLoopV4+0x7c>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    13ac <JacobiOmpLoopV4+0x2ac>
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1399 <JacobiOmpLoopV4+0x299>
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x30(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  0xd21(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x38(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movaps 0xcc2(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    1386 <JacobiOmpLoopV4+0x286>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movaps 0xc83(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    138b <JacobiOmpLoopV4+0x28b>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    126e <JacobiOmpLoopV4+0x16e>
jmp    139e <JacobiOmpLoopV4+0x29e>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1256 <JacobiOmpLoopV4+0x156>
movsd  -0x40(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    13ca <JacobiOmpLoopV4+0x2ca>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x2,%ecx
mov    %ecx,(%rax)
jmp    112d <JacobiOmpLoopV4+0x2d>
movsd  -0x40(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<JacobiOmpLoopV4>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rdx,-0x58(%rsp)
ucomisd %xmm0,%xmm0
jp     14a7 <JacobiOmpLoopV4+0x3a7>
mov    0x38(%rsp),%rax
mov    (%rax),%eax
cmp    %r8d,%eax
jge    14a7 <JacobiOmpLoopV4+0x3a7>
mov    %r8d,-0x28(%rsp)
mov    %eax,%edx
mov    -0x58(%rsp),%rax
lea    -0x1(%rax),%r11d
mov    %edx,%eax
lea    -0x1(%rcx),%r13d
lea    0x1(%r13),%rdx
mov    %rdx,-0x10(%rsp)
lea    -0x1(%r13),%r15
mov    %r15,%rdx
and    $0xfffffffffffffffc,%rdx
mov    %rdx,-0x18(%rsp)
add    $0x1,%rdx
mov    %rdx,-0x20(%rsp)
mov    %r13,%rdx
neg    %rdx
mov    %rdx,-0x8(%rsp)
movsd  0xeac(%rip),%xmm2
movapd 0xe84(%rip),%xmm3
movapd 0xe8c(%rip),%xmm4
xorpd  %xmm8,%xmm8
mov    %rcx,-0x30(%rsp)
mov    %rdi,-0x38(%rsp)
mov    %r11,-0x40(%rsp)
mov    %rsi,-0x48(%rsp)
mov    %r15,-0x50(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,-0x24(%rsp)
xorpd  %xmm1,%xmm1
cmpl   $0x3,-0x58(%rsp)
jl     1480 <JacobiOmpLoopV4+0x380>
mov    $0x1,%eax
jmp    11e3 <JacobiOmpLoopV4+0xe3>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rax
mov    %rax,%rbp
mov    %rbp,%rax
cmp    %r11,%rbp
je     13e0 <JacobiOmpLoopV4+0x2e0>
cmp    $0x2,%ecx
jle    11d0 <JacobiOmpLoopV4+0xd0>
lea    0x1(%rax),%rbp
mov    -0x8(%rdi,%rax,8),%r9
mov    (%rdi,%rax,8),%r12
mov    0x8(%rdi,%rax,8),%r8
mov    (%rsi,%rax,8),%rdx
mov    $0x1,%r10d
cmp    $0x4,%r15
jae    12b0 <JacobiOmpLoopV4+0x1b0>
mov    %r10,%r14
test   $0x1,%r13b
jne    123f <JacobiOmpLoopV4+0x13f>
movsd  (%r9,%r10,8),%xmm1
addsd  (%r8,%r10,8),%xmm1
addsd  -0x8(%r12,%r10,8),%xmm1
lea    0x1(%r10),%r14
addsd  0x8(%r12,%r10,8),%xmm1
mulsd  %xmm2,%xmm1
movsd  %xmm1,(%rdx,%r10,8)
not    %r10
cmp    -0x8(%rsp),%r10
je     11d7 <JacobiOmpLoopV4+0xd7>
nopl   0x0(%rax)
movsd  (%r9,%r14,8),%xmm1
addsd  (%r8,%r14,8),%xmm1
addsd  -0x8(%r12,%r14,8),%xmm1
addsd  0x8(%r12,%r14,8),%xmm1
mulsd  %xmm2,%xmm1
movsd  %xmm1,(%rdx,%r14,8)
movsd  0x8(%r9,%r14,8),%xmm1
addsd  0x8(%r8,%r14,8),%xmm1
addsd  (%r12,%r14,8),%xmm1
addsd  0x10(%r12,%r14,8),%xmm1
mulsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%rdx,%r14,8)
lea    0x2(%r14),%rax
mov    %rax,%r14
cmp    %rax,%r13
jne    1250 <JacobiOmpLoopV4+0x150>
jmp    11d7 <JacobiOmpLoopV4+0xd7>
nopl   0x0(%rax,%rax,1)
lea    0x8(%rdx),%rbx
lea    (%rdx,%r13,8),%rsi
lea    0x8(%r9),%r14
lea    (%r9,%r13,8),%rcx
lea    0x8(%r8),%r11
lea    (%r8,%r13,8),%rax
mov    -0x10(%rsp),%rdi
lea    (%r12,%rdi,8),%r15
cmp    %rcx,%rbx
setb   %cl
cmp    %rsi,%r14
setb   %r14b
cmp    %rax,%rbx
setb   %al
cmp    %rsi,%r11
setb   %r11b
cmp    %r15,%rbx
setb   %bl
cmp    %rsi,%r12
setb   %sil
test   %r14b,%cl
jne    13b8 <JacobiOmpLoopV4+0x2b8>
and    %r11b,%al
jne    13b8 <JacobiOmpLoopV4+0x2b8>
and    %sil,%bl
mov    -0x30(%rsp),%rcx
mov    -0x48(%rsp),%rsi
mov    -0x38(%rsp),%rdi
mov    -0x40(%rsp),%r11
mov    -0x50(%rsp),%r15
mov    -0x18(%rsp),%rax
jne    120e <JacobiOmpLoopV4+0x10e>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movupd 0x8(%r9,%rbx,8),%xmm1
movupd 0x18(%r9,%rbx,8),%xmm6
movupd 0x8(%r8,%rbx,8),%xmm7
addpd  %xmm1,%xmm7
movupd 0x18(%r8,%rbx,8),%xmm1
addpd  %xmm6,%xmm1
movupd (%r12,%rbx,8),%xmm6
addpd  %xmm7,%xmm6
movupd 0x10(%r12,%rbx,8),%xmm7
movupd 0x20(%r12,%rbx,8),%xmm5
addpd  %xmm7,%xmm1
addpd  %xmm5,%xmm1
addpd  %xmm7,%xmm6
mulpd  %xmm3,%xmm6
mulpd  %xmm3,%xmm1
movupd %xmm6,0x8(%rdx,%rbx,8)
movupd %xmm1,0x18(%rdx,%rbx,8)
add    $0x4,%rbx
cmp    %rbx,%rax
jne    1340 <JacobiOmpLoopV4+0x240>
mov    -0x20(%rsp),%r10
cmp    %rax,%r15
je     11d7 <JacobiOmpLoopV4+0xd7>
jmp    120e <JacobiOmpLoopV4+0x10e>
mov    -0x30(%rsp),%rcx
mov    -0x48(%rsp),%rsi
mov    -0x38(%rsp),%rdi
mov    -0x40(%rsp),%r11
mov    -0x50(%rsp),%r15
jmp    120e <JacobiOmpLoopV4+0x10e>
cs nopw 0x0(%rax,%rax,1)
xorpd  %xmm1,%xmm1
cmpl   $0x3,-0x58(%rsp)
jl     1480 <JacobiOmpLoopV4+0x380>
xorpd  %xmm1,%xmm1
mov    $0x1,%eax
jmp    140c <JacobiOmpLoopV4+0x30c>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rax
mov    %rax,%r8
cmp    %r11,%r8
je     1480 <JacobiOmpLoopV4+0x380>
cmp    $0x2,%ecx
jle    1400 <JacobiOmpLoopV4+0x300>
mov    -0x8(%rsi,%rax,8),%r9
mov    (%rsi,%rax,8),%rbx
lea    0x1(%rax),%r8
mov    0x8(%rsi,%rax,8),%r10
mov    (%rdi,%rax,8),%rax
movsd  (%rbx),%xmm6
mov    $0x1,%ebp
movapd %xmm1,%xmm5
movsd  (%r9,%rbp,8),%xmm1
addsd  (%r10,%rbp,8),%xmm1
addsd  %xmm6,%xmm1
addsd  0x8(%rbx,%rbp,8),%xmm1
mulsd  %xmm2,%xmm1
movsd  %xmm1,(%rax,%rbp,8)
movsd  (%rbx,%rbp,8),%xmm6
lea    0x1(%rbp),%rdx
subsd  %xmm6,%xmm1
andpd  %xmm4,%xmm1
maxsd  %xmm5,%xmm1
mov    %rdx,%rbp
cmp    %rdx,%r13
jne    1430 <JacobiOmpLoopV4+0x330>
mov    %r8,%rax
cmp    %r11,%r8
jne    140c <JacobiOmpLoopV4+0x30c>
nopl   0x0(%rax,%rax,1)
maxsd  %xmm8,%xmm1
mov    -0x24(%rsp),%eax
add    $0x2,%eax
ucomisd %xmm0,%xmm1
jb     149c <JacobiOmpLoopV4+0x39c>
cmp    -0x28(%rsp),%eax
jl     11b0 <JacobiOmpLoopV4+0xb0>
mov    %eax,%ecx
mov    0x38(%rsp),%rax
mov    %ecx,(%rax)
jmp    14ab <JacobiOmpLoopV4+0x3ab>
movapd %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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