void calculate_uv(double dt, double dx, double dy, int imax, int jmax,
                  double **U, double **V, double **F, double **G, double **P) {
  int i, j;
  for (i = 1; i < imax; i++) {
    for (j = 1; j < jmax + 1; j++) {
      U[i][j] = F[i][j] - dt / dx * (P[i + 1][j] - P[i][j]);
    }
  }
  for (i = 1; i < imax + 1; i++) {
    for (j = 1; j < jmax; j++) {
      V[i][j] = G[i][j] - dt / dy * (P[i][j + 1] - P[i][j]);
    }
  }
}


x86 assembly (clang, -O0):
<calculate_uv>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%rax
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    %r9,-0x40(%rbp)
movl   $0x1,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11fb <calculate_uv+0xfb>
movl   $0x1,-0x48(%rbp)
mov    -0x48(%rbp),%eax
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    11e8 <calculate_uv+0xe8>
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
mov    0x10(%rbp),%rax
mov    -0x44(%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 -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1147 <calculate_uv+0x47>
jmp    11ed <calculate_uv+0xed>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1134 <calculate_uv+0x34>
movl   $0x1,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    12c9 <calculate_uv+0x1c9>
movl   $0x1,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    12b6 <calculate_uv+0x1b6>
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x8(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x48(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    121a <calculate_uv+0x11a>
jmp    12bb <calculate_uv+0x1bb>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1202 <calculate_uv+0x102>
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_uv>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %r9,-0x8(%rsp)
mov    %rcx,-0x10(%rsp)
mov    0x38(%rsp),%r11
cmp    $0x2,%edi
mov    %rsi,-0x60(%rsp)
jl     138e <calculate_uv+0x28e>
movapd 0xed1(%rip),%xmm3
xorpd  %xmm0,%xmm3
divsd  %xmm1,%xmm3
lea    0x1(%rsi),%eax
mov    %edi,%r14d
lea    -0x1(%rax),%r13
mov    %r13,%rbx
and    $0xfffffffffffffffc,%rbx
lea    0x1(%rbx),%rcx
mov    %rcx,-0x18(%rsp)
movapd %xmm3,%xmm8
unpcklpd %xmm3,%xmm8
mov    %rax,%rcx
neg    %rcx
mov    %rcx,-0x28(%rsp)
mov    $0x1,%ecx
mov    %rdi,-0x68(%rsp)
mov    %r8,-0x30(%rsp)
mov    %rdx,-0x38(%rsp)
mov    %r14,-0x40(%rsp)
mov    %r13,-0x48(%rsp)
jmp    11a3 <calculate_uv+0xa3>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rcx
mov    %rcx,%rbp
mov    %rbp,%rcx
cmp    %r14,%rbp
je     138e <calculate_uv+0x28e>
test   %esi,%esi
jle    1190 <calculate_uv+0x90>
lea    0x1(%rcx),%rbp
mov    %rbp,-0x58(%rsp)
mov    (%r8,%rcx,8),%rbp
mov    (%r11,%rcx,8),%r15
mov    0x8(%r11,%rcx,8),%r10
mov    (%rdx,%rcx,8),%r9
mov    $0x1,%r12d
cmp    $0x4,%r13
jb     1300 <calculate_uv+0x200>
lea    0x8(%r9),%rdi
lea    (%r9,%rax,8),%rdx
lea    0x8(%rbp),%r8
lea    0x0(,%rax,8),%rcx
add    %rbp,%rcx
lea    0x8(%r10),%r11
lea    (%r10,%rax,8),%r14
lea    0x8(%r15),%rsi
mov    %rsi,-0x20(%rsp)
lea    (%r15,%rax,8),%rsi
cmp    %rcx,%rdi
setb   -0x50(%rsp)
cmp    %rdx,%r8
setb   %r13b
cmp    %r14,%rdi
setb   %cl
cmp    %rdx,%r11
setb   %r11b
cmp    %rsi,%rdi
setb   %r8b
cmp    %rdx,-0x20(%rsp)
setb   %r14b
test   %r13b,-0x50(%rsp)
jne    12d8 <calculate_uv+0x1d8>
and    %r11b,%cl
jne    12d8 <calculate_uv+0x1d8>
and    %r14b,%r8b
mov    -0x60(%rsp),%rsi
mov    -0x68(%rsp),%rdi
mov    0x38(%rsp),%r11
mov    -0x30(%rsp),%r8
mov    -0x38(%rsp),%rdx
mov    -0x40(%rsp),%r14
mov    -0x48(%rsp),%r13
jne    1300 <calculate_uv+0x200>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movupd 0x8(%rbp,%rcx,8),%xmm4
movupd 0x18(%rbp,%rcx,8),%xmm5
movupd 0x8(%r10,%rcx,8),%xmm6
movupd 0x18(%r10,%rcx,8),%xmm7
movupd 0x8(%r15,%rcx,8),%xmm1
subpd  %xmm1,%xmm6
movupd 0x18(%r15,%rcx,8),%xmm1
subpd  %xmm1,%xmm7
mulpd  %xmm8,%xmm6
addpd  %xmm4,%xmm6
mulpd  %xmm8,%xmm7
addpd  %xmm5,%xmm7
movupd %xmm6,0x8(%r9,%rcx,8)
movupd %xmm7,0x18(%r9,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rbx
jne    1270 <calculate_uv+0x170>
mov    -0x18(%rsp),%r12
cmp    %rbx,%r13
jne    1300 <calculate_uv+0x200>
jmp    1384 <calculate_uv+0x284>
mov    -0x60(%rsp),%rsi
mov    -0x68(%rsp),%rdi
mov    0x38(%rsp),%r11
mov    -0x30(%rsp),%r8
mov    -0x38(%rsp),%rdx
mov    -0x40(%rsp),%r14
mov    -0x48(%rsp),%r13
nopl   0x0(%rax,%rax,1)
mov    %r12,%rcx
test   $0x1,%al
jne    1329 <calculate_uv+0x229>
movsd  (%r10,%r12,8),%xmm1
subsd  (%r15,%r12,8),%xmm1
mulsd  %xmm3,%xmm1
addsd  0x0(%rbp,%r12,8),%xmm1
movsd  %xmm1,(%r9,%r12,8)
lea    0x1(%r12),%rcx
not    %r12
cmp    -0x28(%rsp),%r12
je     1384 <calculate_uv+0x284>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%r10,%rcx,8),%xmm1
subsd  (%r15,%rcx,8),%xmm1
mulsd  %xmm3,%xmm1
addsd  0x0(%rbp,%rcx,8),%xmm1
movsd  %xmm1,(%r9,%rcx,8)
movsd  0x8(%r10,%rcx,8),%xmm1
subsd  0x8(%r15,%rcx,8),%xmm1
mulsd  %xmm3,%xmm1
addsd  0x8(%rbp,%rcx,8),%xmm1
movsd  %xmm1,0x8(%r9,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%rax
jne    1340 <calculate_uv+0x240>
mov    -0x58(%rsp),%rbp
jmp    1197 <calculate_uv+0x97>
test   %edi,%edi
jle    1597 <calculate_uv+0x497>
xorpd  0xc62(%rip),%xmm0
divsd  %xmm2,%xmm0
add    $0x1,%edi
mov    %esi,%r12d
lea    0x1(%r12),%rax
mov    %rax,-0x20(%rsp)
lea    -0x1(%r12),%r8
mov    %r8,%r9
and    $0xfffffffffffffffc,%r9
lea    0x1(%r9),%rax
mov    %rax,-0x28(%rsp)
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
mov    %r12,%rax
neg    %rax
mov    %rax,-0x58(%rsp)
mov    $0x1,%r15d
mov    %rdi,-0x68(%rsp)
mov    %r8,-0x50(%rsp)
jmp    13fd <calculate_uv+0x2fd>
nopl   0x0(%rax)
add    $0x1,%r15
cmp    %rdi,%r15
je     1597 <calculate_uv+0x497>
cmp    $0x2,%esi
jl     13f0 <calculate_uv+0x2f0>
mov    -0x8(%rsp),%rax
mov    (%rax,%r15,8),%rbp
mov    (%r11,%r15,8),%rcx
mov    -0x10(%rsp),%rax
mov    (%rax,%r15,8),%rbx
mov    $0x1,%r10d
cmp    $0x4,%r8
jb     1510 <calculate_uv+0x410>
lea    0x8(%rbx),%rax
lea    (%rbx,%r12,8),%rsi
lea    0x8(%rbp),%r13
lea    0x0(,%r12,8),%rdi
add    %rbp,%rdi
lea    0x8(%rcx),%r11
mov    -0x20(%rsp),%rdx
lea    (%rcx,%rdx,8),%r8
cmp    %rdi,%rax
setb   %r14b
cmp    %rsi,%r13
setb   %r13b
cmp    %r8,%rax
setb   %al
cmp    %rsi,%r11
setb   %dil
test   %r13b,%r14b
jne    14f1 <calculate_uv+0x3f1>
and    %dil,%al
mov    -0x60(%rsp),%rsi
mov    -0x68(%rsp),%rdi
mov    0x38(%rsp),%r11
mov    -0x50(%rsp),%r8
jne    1510 <calculate_uv+0x410>
xor    %eax,%eax
nop
movupd 0x8(%rbp,%rax,8),%xmm2
movupd 0x18(%rbp,%rax,8),%xmm3
movupd 0x8(%rcx,%rax,8),%xmm4
movupd 0x10(%rcx,%rax,8),%xmm5
subpd  %xmm4,%xmm5
movupd 0x18(%rcx,%rax,8),%xmm4
movupd 0x20(%rcx,%rax,8),%xmm6
subpd  %xmm4,%xmm6
mulpd  %xmm1,%xmm5
addpd  %xmm2,%xmm5
mulpd  %xmm1,%xmm6
addpd  %xmm3,%xmm6
movupd %xmm5,0x8(%rbx,%rax,8)
movupd %xmm6,0x18(%rbx,%rax,8)
add    $0x4,%rax
cmp    %rax,%r9
jne    1490 <calculate_uv+0x390>
mov    -0x28(%rsp),%r10
cmp    %r9,%r8
je     13f0 <calculate_uv+0x2f0>
jmp    1510 <calculate_uv+0x410>
mov    -0x60(%rsp),%rsi
mov    -0x68(%rsp),%rdi
mov    0x38(%rsp),%r11
mov    -0x50(%rsp),%r8
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r10,%rax
test   $0x1,%r12b
jne    153b <calculate_uv+0x43b>
lea    0x1(%r10),%rax
movsd  0x8(%rcx,%r10,8),%xmm2
subsd  (%rcx,%r10,8),%xmm2
mulsd  %xmm0,%xmm2
addsd  0x0(%rbp,%r10,8),%xmm2
movsd  %xmm2,(%rbx,%r10,8)
not    %r10
cmp    -0x58(%rsp),%r10
je     13f0 <calculate_uv+0x2f0>
nopl   0x0(%rax)
movsd  0x8(%rcx,%rax,8),%xmm2
subsd  (%rcx,%rax,8),%xmm2
mulsd  %xmm0,%xmm2
addsd  0x0(%rbp,%rax,8),%xmm2
movsd  %xmm2,(%rbx,%rax,8)
movsd  0x10(%rcx,%rax,8),%xmm2
subsd  0x8(%rcx,%rax,8),%xmm2
mulsd  %xmm0,%xmm2
addsd  0x8(%rbp,%rax,8),%xmm2
movsd  %xmm2,0x8(%rbx,%rax,8)
lea    0x2(%rax),%rdx
mov    %rdx,%rax
cmp    %rdx,%r12
jne    1550 <calculate_uv+0x450>
jmp    13f0 <calculate_uv+0x2f0>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @calculate_uv(double %0, double %1, double %2, i32 %3, i32 %4, double** %5, double** %6, double** %7, double** %8, double** %9) {
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca i32
%15 = alloca i32
%16 = alloca double**
%17 = alloca double**
%18 = alloca double**
%19 = alloca double**
%20 = alloca double**
%21 = alloca i32
%22 = alloca i32
store double %0, double* %11
store double %1, double* %12
store double %2, double* %13
store i32 %3, i32* %14
store i32 %4, i32* %15
store double** %5, double*** %16
store double** %6, double*** %17
store double** %7, double*** %18
store double** %8, double*** %19
store double** %9, double*** %20
store i32 1, i32* %21
br label %23
23: ; preds = %80, %10
%24 = load i32, i32* %21
%25 = load i32, i32* %14
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %83
27: ; preds = %23
store i32 1, i32* %22
br label %28
28: ; preds = %76, %27
%29 = load i32, i32* %22
%30 = load i32, i32* %15
%31 = add nsw i32 %30, 1
%32 = icmp slt i32 %29, %31
br i1 %32, label %33, label %79
33: ; preds = %28
%34 = load double**, double*** %18
%35 = load i32, i32* %21
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds double*, double** %34, i64 %36
%38 = load double*, double** %37
%39 = load i32, i32* %22
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds double, double* %38, i64 %40
%42 = load double, double* %41
%43 = load double, double* %11
%44 = load double, double* %12
%45 = fdiv double %43, %44
%46 = load double**, double*** %20
%47 = load i32, i32* %21
%48 = add 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* %22
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds double, double* %51, i64 %53
%55 = load double, double* %54
%56 = load double**, double*** %20
%57 = load i32, i32* %21
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds double*, double** %56, i64 %58
%60 = load double*, double** %59
%61 = load i32, i32* %22
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds double, double* %60, i64 %62
%64 = load double, double* %63
%65 = fsub double %55, %64
%66 = fneg double %45
%67 = call double @llvm.fmuladd.f64(double %66, double %65, double %42)
%68 = load double**, double*** %16
%69 = load i32, i32* %21
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds double*, double** %68, i64 %70
%72 = load double*, double** %71
%73 = load i32, i32* %22
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds double, double* %72, i64 %74
store double %67, double* %75
br label %76
76: ; preds = %33
%77 = load i32, i32* %22
%78 = add nsw i32 %77, 1
store i32 %78, i32* %22
br label %28
79: ; preds = %28
br label %80
80: ; preds = %79
%81 = load i32, i32* %21
%82 = add nsw i32 %81, 1
store i32 %82, i32* %21
br label %23
83: ; preds = %23
store i32 1, i32* %21
br label %84
84: ; preds = %141, %83
%85 = load i32, i32* %21
%86 = load i32, i32* %14
%87 = add nsw i32 %86, 1
%88 = icmp slt i32 %85, %87
br i1 %88, label %89, label %144
89: ; preds = %84
store i32 1, i32* %22
br label %90
90: ; preds = %137, %89
%91 = load i32, i32* %22
%92 = load i32, i32* %15
%93 = icmp slt i32 %91, %92
br i1 %93, label %94, label %140
94: ; preds = %90
%95 = load double**, double*** %19
%96 = load i32, i32* %21
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds double*, double** %95, i64 %97
%99 = load double*, double** %98
%100 = load i32, i32* %22
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds double, double* %99, i64 %101
%103 = load double, double* %102
%104 = load double, double* %11
%105 = load double, double* %13
%106 = fdiv double %104, %105
%107 = load double**, double*** %20
%108 = load i32, i32* %21
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds double*, double** %107, i64 %109
%111 = load double*, double** %110
%112 = load i32, i32* %22
%113 = add nsw i32 %112, 1
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds double, double* %111, i64 %114
%116 = load double, double* %115
%117 = load double**, double*** %20
%118 = load i32, i32* %21
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds double*, double** %117, i64 %119
%121 = load double*, double** %120
%122 = load i32, i32* %22
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds double, double* %121, i64 %123
%125 = load double, double* %124
%126 = fsub double %116, %125
%127 = fneg double %106
%128 = call double @llvm.fmuladd.f64(double %127, double %126, double %103)
%129 = load double**, double*** %17
%130 = load i32, i32* %21
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds double*, double** %129, i64 %131
%133 = load double*, double** %132
%134 = load i32, i32* %22
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds double, double* %133, i64 %135
store double %128, double* %136
br label %137
137: ; preds = %94
%138 = load i32, i32* %22
%139 = add nsw i32 %138, 1
store i32 %139, i32* %22
br label %90
140: ; preds = %90
br label %141
141: ; preds = %140
%142 = load i32, i32* %21
%143 = add nsw i32 %142, 1
store i32 %143, i32* %21
br label %84
144: ; preds = %84
ret void
}

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