#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 */
int sqrt(double);
double JacobiOmpLoopV4err(double **up, double **wp, int m, int n, double eps,
                          int maxit, int iterations_print, int *iterations) {
  int i;
  int j;
  double error = 10.0 * eps;
  while (error >= eps && *iterations < maxit) {
#pragma omp parallel private(j)
    {
#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) reduction(+ : error) nowait
      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;
          error += (up[i][j] - wp[i][j]) * (up[i][j] - wp[i][j]);
        }
      }
    }
    *iterations += 2;
    error = sqrt(error) / (m * n);
  }
  return error;
}


x86 assembly (clang, -O0):
<JacobiOmpLoopV4err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
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  0xec1(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x20(%rbp),%xmm0
mov    %al,-0x39(%rbp)
jb     116d <JacobiOmpLoopV4err+0x5d>
mov    0x10(%rbp),%rax
mov    (%rax),%eax
cmp    -0x24(%rbp),%eax
setl   %al
mov    %al,-0x39(%rbp)
mov    -0x39(%rbp),%al
test   $0x1,%al
jne    117d <JacobiOmpLoopV4err+0x6d>
jmp    13c4 <JacobiOmpLoopV4err+0x2b4>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1257 <JacobiOmpLoopV4err+0x147>
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1244 <JacobiOmpLoopV4err+0x134>
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  0xdeb(%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    119c <JacobiOmpLoopV4err+0x8c>
jmp    1249 <JacobiOmpLoopV4err+0x139>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1184 <JacobiOmpLoopV4err+0x74>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1397 <JacobiOmpLoopV4err+0x287>
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1384 <JacobiOmpLoopV4err+0x274>
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  0xd11(%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)
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
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1276 <JacobiOmpLoopV4err+0x166>
jmp    1389 <JacobiOmpLoopV4err+0x279>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    125e <JacobiOmpLoopV4err+0x14e>
mov    0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x2,%ecx
mov    %ecx,(%rax)
movsd  -0x38(%rbp),%xmm0
call   1030 <sqrt@plt>
mov    -0x14(%rbp),%ecx
imul   -0x18(%rbp),%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1149 <JacobiOmpLoopV4err+0x39>
movsd  -0x38(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<JacobiOmpLoopV4err>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
movapd %xmm0,%xmm1
movsd  0xed6(%rip),%xmm0
mulsd  %xmm1,%xmm0
ucomisd %xmm1,%xmm0
jae    1143 <JacobiOmpLoopV4err+0x33>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %ecx,%r15d
mov    %rsi,%r12
mov    %rdi,%r13
mov    0xa0(%rsp),%r9
lea    -0x1(%rdx),%r10d
lea    -0x1(%r15),%r14d
mov    %ecx,%eax
imul   %edx,%eax
mov    %eax,0x2c(%rsp)
lea    0x1(%r14),%rax
mov    %rax,0x58(%rsp)
lea    -0x1(%r14),%r11
mov    %r11,%rax
and    $0xfffffffffffffffc,%rax
mov    %rax,0x50(%rsp)
add    $0x1,%rax
mov    %rax,0x48(%rsp)
mov    %r14,%rax
neg    %rax
mov    %rax,0x60(%rsp)
movsd  0xe6e(%rip),%xmm5
movapd 0xe6e(%rip),%xmm6
movsd  %xmm1,0x40(%rsp)
mov    %rdx,0x38(%rsp)
mov    %r10,0x8(%rsp)
mov    %r11,(%rsp)
mov    %r8d,0x30(%rsp)
mov    %r15,0x20(%rsp)
mov    %rsi,0x18(%rsp)
mov    %rdi,0x10(%rsp)
jmp    122a <JacobiOmpLoopV4err+0x11a>
nopl   0x0(%rax)
mov    0xa0(%rsp),%r9
mov    0x34(%rsp),%eax
add    $0x2,%eax
mov    %eax,(%r9)
call   1030 <sqrt@plt>
movsd  0xe19(%rip),%xmm5
mov    0x8(%rsp),%r10
mov    0xa0(%rsp),%r9
cltd
idivl  0x2c(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ucomisd 0x40(%rsp),%xmm0
mov    0x30(%rsp),%r8d
mov    0x38(%rsp),%rdx
mov    (%rsp),%r11
movapd 0xdec(%rip),%xmm6
jb     1134 <JacobiOmpLoopV4err+0x24>
mov    (%r9),%eax
cmp    %r8d,%eax
jge    1134 <JacobiOmpLoopV4err+0x24>
mov    %eax,0x34(%rsp)
cmp    $0x3,%edx
jl     11d8 <JacobiOmpLoopV4err+0xc8>
mov    $0x1,%eax
jmp    1263 <JacobiOmpLoopV4err+0x153>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rax
mov    %rax,%r9
mov    %r9,%rax
cmp    %r10,%r9
je     1450 <JacobiOmpLoopV4err+0x340>
cmp    $0x2,%r15d
jle    1250 <JacobiOmpLoopV4err+0x140>
lea    0x1(%rax),%r9
mov    -0x8(%r13,%rax,8),%rdx
mov    0x0(%r13,%rax,8),%rsi
mov    0x8(%r13,%rax,8),%rdi
mov    (%r12,%rax,8),%rax
mov    $0x1,%ebp
cmp    $0x4,%r11
jae    1330 <JacobiOmpLoopV4err+0x220>
mov    %rbp,%rbx
test   $0x1,%r14b
jne    12bb <JacobiOmpLoopV4err+0x1ab>
movsd  (%rdx,%rbp,8),%xmm1
addsd  (%rdi,%rbp,8),%xmm1
addsd  -0x8(%rsi,%rbp,8),%xmm1
lea    0x1(%rbp),%rbx
addsd  0x8(%rsi,%rbp,8),%xmm1
mulsd  %xmm5,%xmm1
movsd  %xmm1,(%rax,%rbp,8)
not    %rbp
cmp    0x60(%rsp),%rbp
je     1257 <JacobiOmpLoopV4err+0x147>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rdx,%rbx,8),%xmm1
addsd  (%rdi,%rbx,8),%xmm1
addsd  -0x8(%rsi,%rbx,8),%xmm1
addsd  0x8(%rsi,%rbx,8),%xmm1
mulsd  %xmm5,%xmm1
movsd  %xmm1,(%rax,%rbx,8)
movsd  0x8(%rdx,%rbx,8),%xmm1
addsd  0x8(%rdi,%rbx,8),%xmm1
addsd  (%rsi,%rbx,8),%xmm1
addsd  0x10(%rsi,%rbx,8),%xmm1
mulsd  %xmm5,%xmm1
movsd  %xmm1,0x8(%rax,%rbx,8)
lea    0x2(%rbx),%rcx
mov    %rcx,%rbx
cmp    %rcx,%r14
jne    12d0 <JacobiOmpLoopV4err+0x1c0>
jmp    1257 <JacobiOmpLoopV4err+0x147>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0x8(%rax),%rcx
lea    (%rax,%r14,8),%r15
lea    0x8(%rdx),%r8
lea    (%rdx,%r14,8),%r10
lea    0x8(%rdi),%r11
lea    (%rdi,%r14,8),%r13
mov    0x58(%rsp),%rbx
lea    (%rsi,%rbx,8),%r12
cmp    %r10,%rcx
setb   %bl
cmp    %r15,%r8
setb   %r10b
cmp    %r13,%rcx
setb   %r8b
cmp    %r15,%r11
setb   %r13b
cmp    %r12,%rcx
setb   %cl
cmp    %r15,%rsi
setb   %r11b
test   %r10b,%bl
jne    1431 <JacobiOmpLoopV4err+0x321>
and    %r13b,%r8b
jne    1431 <JacobiOmpLoopV4err+0x321>
and    %r11b,%cl
mov    0x20(%rsp),%r15
mov    0x18(%rsp),%r12
mov    0x10(%rsp),%r13
mov    0x8(%rsp),%r10
mov    (%rsp),%r11
mov    0x50(%rsp),%rcx
jne    128f <JacobiOmpLoopV4err+0x17f>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movupd 0x8(%rdx,%rbp,8),%xmm1
movupd 0x18(%rdx,%rbp,8),%xmm2
movupd 0x8(%rdi,%rbp,8),%xmm3
addpd  %xmm1,%xmm3
movupd 0x18(%rdi,%rbp,8),%xmm1
addpd  %xmm2,%xmm1
movupd (%rsi,%rbp,8),%xmm2
addpd  %xmm3,%xmm2
movupd 0x10(%rsi,%rbp,8),%xmm3
movupd 0x20(%rsi,%rbp,8),%xmm4
addpd  %xmm3,%xmm1
addpd  %xmm4,%xmm1
addpd  %xmm3,%xmm2
mulpd  %xmm6,%xmm2
mulpd  %xmm6,%xmm1
movupd %xmm2,0x8(%rax,%rbp,8)
movupd %xmm1,0x18(%rax,%rbp,8)
add    $0x4,%rbp
cmp    %rbp,%rcx
jne    13c0 <JacobiOmpLoopV4err+0x2b0>
mov    0x48(%rsp),%rbp
cmp    %rcx,%r11
je     1257 <JacobiOmpLoopV4err+0x147>
jmp    128f <JacobiOmpLoopV4err+0x17f>
mov    0x20(%rsp),%r15
mov    0x18(%rsp),%r12
mov    0x10(%rsp),%r13
mov    0x8(%rsp),%r10
mov    (%rsp),%r11
jmp    128f <JacobiOmpLoopV4err+0x17f>
xchg   %ax,%ax
cmpl   $0x3,0x38(%rsp)
jl     11d0 <JacobiOmpLoopV4err+0xc0>
mov    $0x1,%edi
mov    0xa0(%rsp),%r9
jmp    1480 <JacobiOmpLoopV4err+0x370>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rdi
mov    %rdi,%rax
cmp    %r10,%rax
je     11d8 <JacobiOmpLoopV4err+0xc8>
cmp    $0x2,%r15d
jle    1470 <JacobiOmpLoopV4err+0x360>
mov    -0x8(%r12,%rdi,8),%rcx
mov    (%r12,%rdi,8),%rdx
lea    0x1(%rdi),%rax
mov    0x8(%r12,%rdi,8),%rsi
mov    0x0(%r13,%rdi,8),%rdi
movsd  (%rdx),%xmm1
mov    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
movsd  (%rcx,%rbp,8),%xmm2
addsd  (%rsi,%rbp,8),%xmm2
addsd  %xmm1,%xmm2
addsd  0x8(%rdx,%rbp,8),%xmm2
mulsd  %xmm5,%xmm2
movsd  %xmm2,(%rdi,%rbp,8)
movsd  (%rdx,%rbp,8),%xmm1
lea    0x1(%rbp),%rbx
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm2
addsd  %xmm2,%xmm0
mov    %rbx,%rbp
cmp    %rbx,%r14
jne    14b0 <JacobiOmpLoopV4err+0x3a0>
mov    %rax,%rdi
cmp    %r10,%rax
jne    1480 <JacobiOmpLoopV4err+0x370>
jmp    11d8 <JacobiOmpLoopV4err+0xc8>

LLVM IR (-O0):
define double @JacobiOmpLoopV4err(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
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
%20 = load double, double* %13
%21 = fmul double 1.000000e+01, %20
store double %21, double* %19
br label %22
22: ; preds = %217, %8
%23 = load double, double* %19
%24 = load double, double* %13
%25 = fcmp oge 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 %228
33: ; preds = %31
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 = %214, %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 %217
111: ; preds = %106
store i32 1, i32* %18
br label %112
112: ; preds = %210, %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 %213
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*** %9
%171 = load i32, i32* %17
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds double*, double** %170, i64 %172
%174 = load double*, double** %173
%175 = load i32, i32* %18
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds double, double* %174, i64 %176
%178 = load double, double* %177
%179 = load double**, double*** %10
%180 = load i32, i32* %17
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds double*, double** %179, i64 %181
%183 = load double*, double** %182
%184 = load i32, i32* %18
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds double, double* %183, i64 %185
%187 = load double, double* %186
%188 = fsub double %178, %187
%189 = load double**, double*** %9
%190 = load i32, i32* %17
%191 = sext i32 %190 to i64
%192 = getelementptr inbounds double*, double** %189, i64 %191
%193 = load double*, double** %192
%194 = load i32, i32* %18
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds double, double* %193, i64 %195
%197 = load double, double* %196
%198 = load double**, double*** %10
%199 = load i32, i32* %17
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds double*, double** %198, i64 %200
%202 = load double*, double** %201
%203 = load i32, i32* %18
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds double, double* %202, i64 %204
%206 = load double, double* %205
%207 = fsub double %197, %206
%208 = load double, double* %19
%209 = call double @llvm.fmuladd.f64(double %188, double %207, double %208)
store double %209, double* %19
br label %210
210: ; preds = %117
%211 = load i32, i32* %18
%212 = add nsw i32 %211, 1
store i32 %212, i32* %18
br label %112
213: ; preds = %112
br label %214
214: ; preds = %213
%215 = load i32, i32* %17
%216 = add nsw i32 %215, 1
store i32 %216, i32* %17
br label %106
217: ; preds = %106
%218 = load i32*, i32** %16
%219 = load i32, i32* %218
%220 = add nsw i32 %219, 2
store i32 %220, i32* %218
%221 = load double, double* %19
%222 = call i32 @sqrt(double %221)
%223 = load i32, i32* %11
%224 = load i32, i32* %12
%225 = mul nsw i32 %223, %224
%226 = sdiv i32 %222, %225
%227 = sitofp i32 %226 to double
store double %227, double* %19
br label %22
228: ; preds = %31
%229 = load double, double* %19
ret double %229
}

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