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;
  int j;
  for (i = 1; i < imax; i++) {
    for (j = 1; j < jmax; j++) {
      U[i][j] = F[i][j] - dt / dx * (P[i + 1][j] - P[i][j]);
      V[i][j] = G[i][j] - dt / dy * (P[i][j + 1] - P[i][j]);
    }
    j = jmax;
    U[i][j] = F[i][j] - dt / dx * (P[i + 1][j] - P[i][j]);
  }
  i = imax;
  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    12fb <calculate_uv+0x1fb>
movl   $0x1,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1265 <calculate_uv+0x165>
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    -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    1147 <calculate_uv+0x47>
mov    -0x20(%rbp),%eax
mov    %eax,-0x48(%rbp)
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    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1134 <calculate_uv+0x34>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x44(%rbp)
movl   $0x1,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    13a4 <calculate_uv+0x2a4>
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    1308 <calculate_uv+0x208>
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_uv>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %r9,-0x10(%rsp)
mov    %rcx,-0x8(%rsp)
mov    0x38(%rsp),%r9
mov    %esi,%eax
mov    %rax,-0x18(%rsp)
mov    %edi,-0x1c(%rsp)
cmp    $0x2,%edi
jl     1218 <calculate_uv+0x118>
movapd 0xecb(%rip),%xmm3
xorpd  %xmm0,%xmm3
movapd %xmm3,%xmm4
divsd  %xmm1,%xmm4
divsd  %xmm2,%xmm3
movslq %esi,%r12
mov    -0x1c(%rsp),%r14d
mov    -0x18(%rsp),%rax
lea    -0x8(,%rax,8),%r13
ff
mov    $0x1,%ecx
jmp    1199 <calculate_uv+0x99>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%r10,%r12,8),%xmm1
subsd  0x0(%rbp,%r12,8),%xmm1
mulsd  %xmm4,%xmm1
addsd  (%rax,%r12,8),%xmm1
movsd  %xmm1,(%rbx,%r12,8)
mov    %r15,%rcx
cmp    %r14,%r15
je     1218 <calculate_uv+0x118>
lea    0x1(%rcx),%r15
mov    (%r8,%rcx,8),%rax
mov    (%r9,%rcx,8),%rbp
mov    0x8(%r9,%rcx,8),%r10
mov    (%rdx,%rcx,8),%rbx
cmp    $0x2,%esi
jl     1170 <calculate_uv+0x70>
mov    -0x10(%rsp),%rdi
mov    (%rdi,%rcx,8),%r11
mov    -0x8(%rsp),%rdi
mov    (%rdi,%rcx,8),%rdi
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
movsd  0x8(%r10,%rcx,1),%xmm1
subsd  0x8(%rbp,%rcx,1),%xmm1
mulsd  %xmm4,%xmm1
addsd  0x8(%rax,%rcx,1),%xmm1
movsd  %xmm1,0x8(%rbx,%rcx,1)
movsd  0x10(%rbp,%rcx,1),%xmm1
subsd  0x8(%rbp,%rcx,1),%xmm1
mulsd  %xmm3,%xmm1
addsd  0x8(%r11,%rcx,1),%xmm1
movsd  %xmm1,0x8(%rdi,%rcx,1)
add    $0x8,%rcx
cmp    %rcx,%r13
jne    11d0 <calculate_uv+0xd0>
jmp    1170 <calculate_uv+0x70>
cmp    $0x2,%esi
mov    -0x18(%rsp),%rbp
jl     1391 <calculate_uv+0x291>
movslq -0x1c(%rsp),%rax
mov    -0x10(%rsp),%rcx
mov    (%rcx,%rax,8),%rdx
mov    (%r9,%rax,8),%rsi
xorpd  0xdc0(%rip),%xmm0
divsd  %xmm2,%xmm0
mov    -0x8(%rsp),%rcx
mov    (%rcx,%rax,8),%rcx
lea    -0x1(%rbp),%r8
mov    $0x1,%edi
cmp    $0x4,%r8
jb     1316 <calculate_uv+0x216>
lea    0x8(%rcx),%rax
lea    (%rcx,%rbp,8),%rbx
lea    0x8(%rdx),%r9
lea    (%rdx,%rbp,8),%r14
lea    0x8(%rsi),%r10
lea    (%rsi,%rbp,8),%r11
add    $0x8,%r11
cmp    %r14,%rax
setb   %r14b
cmp    %rbx,%r9
setb   %r9b
cmp    %r11,%rax
setb   %al
cmp    %rbx,%r10
setb   %bl
test   %r9b,%r14b
jne    1316 <calculate_uv+0x216>
and    %bl,%al
jne    1316 <calculate_uv+0x216>
mov    %r8,%rax
and    $0xfffffffffffffffc,%rax
lea    0x1(%rax),%rdi
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movupd 0x8(%rdx,%rbx,8),%xmm2
movupd 0x18(%rdx,%rbx,8),%xmm3
movupd 0x8(%rsi,%rbx,8),%xmm4
movupd 0x10(%rsi,%rbx,8),%xmm5
subpd  %xmm4,%xmm5
movupd 0x18(%rsi,%rbx,8),%xmm4
movupd 0x20(%rsi,%rbx,8),%xmm6
subpd  %xmm4,%xmm6
mulpd  %xmm1,%xmm5
addpd  %xmm2,%xmm5
mulpd  %xmm1,%xmm6
addpd  %xmm3,%xmm6
movupd %xmm5,0x8(%rcx,%rbx,8)
movupd %xmm6,0x18(%rcx,%rbx,8)
add    $0x4,%rbx
cmp    %rbx,%rax
jne    12c0 <calculate_uv+0x1c0>
cmp    %rax,%r8
je     1391 <calculate_uv+0x291>
mov    %rdi,%rax
not    %rax
test   $0x1,%bpl
jne    133f <calculate_uv+0x23f>
movsd  0x8(%rsi,%rdi,8),%xmm1
subsd  (%rsi,%rdi,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%rdx,%rdi,8),%xmm1
movsd  %xmm1,(%rcx,%rdi,8)
add    $0x1,%rdi
add    %rbp,%rax
je     1391 <calculate_uv+0x291>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0x8(%rsi,%rdi,8),%xmm1
subsd  (%rsi,%rdi,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%rdx,%rdi,8),%xmm1
movsd  %xmm1,(%rcx,%rdi,8)
movsd  0x10(%rsi,%rdi,8),%xmm1
subsd  0x8(%rsi,%rdi,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x8(%rdx,%rdi,8),%xmm1
movsd  %xmm1,0x8(%rcx,%rdi,8)
lea    0x2(%rdi),%rax
mov    %rax,%rdi
cmp    %rax,%rbp
jne    1350 <calculate_uv+0x250>
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 = %164, %10
%24 = load i32, i32* %21
%25 = load i32, i32* %14
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %167
27: ; preds = %23
store i32 1, i32* %22
br label %28
28: ; preds = %117, %27
%29 = load i32, i32* %22
%30 = load i32, i32* %15
%31 = icmp slt i32 %29, %30
br i1 %31, label %32, label %120
32: ; preds = %28
%33 = load double**, double*** %18
%34 = load i32, i32* %21
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds double*, double** %33, i64 %35
%37 = load double*, double** %36
%38 = load i32, i32* %22
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds double, double* %37, i64 %39
%41 = load double, double* %40
%42 = load double, double* %11
%43 = load double, double* %12
%44 = fdiv double %42, %43
%45 = load double**, double*** %20
%46 = load i32, i32* %21
%47 = add nsw i32 %46, 1
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds double*, double** %45, i64 %48
%50 = load double*, double** %49
%51 = load i32, i32* %22
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds double, double* %50, i64 %52
%54 = load double, double* %53
%55 = load double**, double*** %20
%56 = load i32, i32* %21
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds double*, double** %55, i64 %57
%59 = load double*, double** %58
%60 = load i32, i32* %22
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds double, double* %59, i64 %61
%63 = load double, double* %62
%64 = fsub double %54, %63
%65 = fneg double %44
%66 = call double @llvm.fmuladd.f64(double %65, double %64, double %41)
%67 = load double**, double*** %16
%68 = load i32, i32* %21
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds double*, double** %67, i64 %69
%71 = load double*, double** %70
%72 = load i32, i32* %22
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds double, double* %71, i64 %73
store double %66, double* %74
%75 = load double**, double*** %19
%76 = load i32, i32* %21
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds double*, double** %75, i64 %77
%79 = load double*, double** %78
%80 = load i32, i32* %22
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds double, double* %79, i64 %81
%83 = load double, double* %82
%84 = load double, double* %11
%85 = load double, double* %13
%86 = fdiv double %84, %85
%87 = load double**, double*** %20
%88 = load i32, i32* %21
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds double*, double** %87, i64 %89
%91 = load double*, double** %90
%92 = load i32, i32* %22
%93 = add nsw i32 %92, 1
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds double, double* %91, i64 %94
%96 = load double, double* %95
%97 = load double**, double*** %20
%98 = load i32, i32* %21
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds double*, double** %97, i64 %99
%101 = load double*, double** %100
%102 = load i32, i32* %22
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds double, double* %101, i64 %103
%105 = load double, double* %104
%106 = fsub double %96, %105
%107 = fneg double %86
%108 = call double @llvm.fmuladd.f64(double %107, double %106, double %83)
%109 = load double**, double*** %17
%110 = load i32, i32* %21
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds double*, double** %109, i64 %111
%113 = load double*, double** %112
%114 = load i32, i32* %22
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double, double* %113, i64 %115
store double %108, double* %116
br label %117
117: ; preds = %32
%118 = load i32, i32* %22
%119 = add nsw i32 %118, 1
store i32 %119, i32* %22
br label %28
120: ; preds = %28
%121 = load i32, i32* %15
store i32 %121, i32* %22
%122 = load double**, double*** %18
%123 = load i32, i32* %21
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds double*, double** %122, i64 %124
%126 = load double*, double** %125
%127 = load i32, i32* %22
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds double, double* %126, i64 %128
%130 = load double, double* %129
%131 = load double, double* %11
%132 = load double, double* %12
%133 = fdiv double %131, %132
%134 = load double**, double*** %20
%135 = load i32, i32* %21
%136 = add nsw i32 %135, 1
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds double*, double** %134, i64 %137
%139 = load double*, double** %138
%140 = load i32, i32* %22
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds double, double* %139, i64 %141
%143 = load double, double* %142
%144 = load double**, double*** %20
%145 = load i32, i32* %21
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds double*, double** %144, i64 %146
%148 = load double*, double** %147
%149 = load i32, i32* %22
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds double, double* %148, i64 %150
%152 = load double, double* %151
%153 = fsub double %143, %152
%154 = fneg double %133
%155 = call double @llvm.fmuladd.f64(double %154, double %153, double %130)
%156 = load double**, double*** %16
%157 = load i32, i32* %21
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds double*, double** %156, i64 %158
%160 = load double*, double** %159
%161 = load i32, i32* %22
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds double, double* %160, i64 %162
store double %155, double* %163
br label %164
164: ; preds = %120
%165 = load i32, i32* %21
%166 = add nsw i32 %165, 1
store i32 %166, i32* %21
br label %23
167: ; preds = %23
%168 = load i32, i32* %14
store i32 %168, i32* %21
store i32 1, i32* %22
br label %169
169: ; preds = %216, %167
%170 = load i32, i32* %22
%171 = load i32, i32* %15
%172 = icmp slt i32 %170, %171
br i1 %172, label %173, label %219
173: ; preds = %169
%174 = load double**, double*** %19
%175 = load i32, i32* %21
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds double*, double** %174, i64 %176
%178 = load double*, double** %177
%179 = load i32, i32* %22
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds double, double* %178, i64 %180
%182 = load double, double* %181
%183 = load double, double* %11
%184 = load double, double* %13
%185 = fdiv double %183, %184
%186 = load double**, double*** %20
%187 = load i32, i32* %21
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds double*, double** %186, i64 %188
%190 = load double*, double** %189
%191 = load i32, i32* %22
%192 = add nsw i32 %191, 1
%193 = sext i32 %192 to i64
%194 = getelementptr inbounds double, double* %190, i64 %193
%195 = load double, double* %194
%196 = load double**, double*** %20
%197 = load i32, i32* %21
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds double*, double** %196, i64 %198
%200 = load double*, double** %199
%201 = load i32, i32* %22
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds double, double* %200, i64 %202
%204 = load double, double* %203
%205 = fsub double %195, %204
%206 = fneg double %185
%207 = call double @llvm.fmuladd.f64(double %206, double %205, double %182)
%208 = load double**, double*** %17
%209 = load i32, i32* %21
%210 = sext i32 %209 to i64
%211 = getelementptr inbounds double*, double** %208, i64 %210
%212 = load double*, double** %211
%213 = load i32, i32* %22
%214 = sext i32 %213 to i64
%215 = getelementptr inbounds double, double* %212, i64 %214
store double %207, double* %215
br label %216
216: ; preds = %173
%217 = load i32, i32* %22
%218 = add nsw i32 %217, 1
store i32 %218, i32* %22
br label %169
219: ; preds = %169
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 %36
12: ; preds = %10
%13 = icmp sgt i32 %4, 1
%14 = fneg double %0
%15 = fdiv double %14, %1
%16 = fdiv double %14, %2
%17 = sext i32 %4 to i64
%18 = zext i32 %3 to i64
%19 = zext i32 %4 to i64
br label %20
20: ; preds = %12, %148
%21 = phi i64 [ 1, %12 ], [ %24, %148 ]
%22 = getelementptr inbounds double*, double** %7, i64 %21
%23 = load double*, double** %22
%24 = add nuw nsw i64 %21, 1
%25 = getelementptr inbounds double*, double** %9, i64 %24
%26 = load double*, double** %25
%27 = getelementptr inbounds double*, double** %9, i64 %21
%28 = load double*, double** %27
%29 = getelementptr inbounds double*, double** %5, i64 %21
%30 = load double*, double** %29
br i1 %13, label %31, label %148
31: ; preds = %20
%32 = getelementptr inbounds double*, double** %8, i64 %21
%33 = load double*, double** %32
%34 = getelementptr inbounds double*, double** %6, i64 %21
%35 = load double*, double** %34
br label %127
36: ; preds = %148, %10
%37 = icmp sgt i32 %4, 1
br i1 %37, label %38, label %182
38: ; preds = %36
%39 = sext i32 %3 to i64
%40 = getelementptr inbounds double*, double** %8, i64 %39
%41 = load double*, double** %40
%42 = getelementptr inbounds double*, double** %9, i64 %39
%43 = load double*, double** %42
%44 = fneg double %0
%45 = fdiv double %44, %2
%46 = getelementptr inbounds double*, double** %6, i64 %39
%47 = load double*, double** %46
%48 = zext i32 %4 to i64
%49 = add nsw i64 %48, -1
%50 = icmp ult i64 %49, 4
br i1 %50, label %107, label %51
51: ; preds = %38
%52 = getelementptr double, double* %47, i64 1
%53 = getelementptr double, double* %47, i64 %48
%54 = getelementptr double, double* %41, i64 1
%55 = getelementptr double, double* %41, i64 %48
%56 = getelementptr double, double* %43, i64 1
%57 = add nuw nsw i64 %48, 1
%58 = getelementptr double, double* %43, i64 %57
%59 = icmp ult double* %52, %55
%60 = icmp ult double* %54, %53
%61 = and i1 %59, %60
%62 = icmp ult double* %52, %58
%63 = icmp ult double* %56, %53
%64 = and i1 %62, %63
%65 = or i1 %61, %64
br i1 %65, label %107, label %66
66: ; preds = %51
%67 = and i64 %49, -4
%68 = or i64 %67, 1
%69 = insertelement <2 x double> poison, double %45, i64 0
%70 = shufflevector <2 x double> %69, <2 x double> poison, <2 x i32> zeroinitializer
%71 = insertelement <2 x double> poison, double %45, i64 0
%72 = shufflevector <2 x double> %71, <2 x double> poison, <2 x i32> zeroinitializer
br label %73
73: ; preds = %73, %66
%74 = phi i64 [ 0, %66 ], [ %103, %73 ]
%75 = or i64 %74, 1
%76 = getelementptr inbounds double, double* %41, i64 %75
%77 = bitcast double* %76 to <2 x double>*
%78 = load <2 x double>, <2 x double>* %77
%79 = getelementptr inbounds double, double* %76, i64 2
%80 = bitcast double* %79 to <2 x double>*
%81 = load <2 x double>, <2 x double>* %80
%82 = or i64 %74, 2
%83 = getelementptr inbounds double, double* %43, i64 %82
%84 = bitcast double* %83 to <2 x double>*
%85 = load <2 x double>, <2 x double>* %84
%86 = getelementptr inbounds double, double* %83, i64 2
%87 = bitcast double* %86 to <2 x double>*
%88 = load <2 x double>, <2 x double>* %87
%89 = getelementptr inbounds double, double* %43, i64 %75
%90 = bitcast double* %89 to <2 x double>*
%91 = load <2 x double>, <2 x double>* %90
%92 = getelementptr inbounds double, double* %89, i64 2
%93 = bitcast double* %92 to <2 x double>*
%94 = load <2 x double>, <2 x double>* %93
%95 = fsub <2 x double> %85, %91
%96 = fsub <2 x double> %88, %94
%97 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %70, <2 x double> %95, <2 x double> %78)
%98 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %72, <2 x double> %96, <2 x double> %81)
%99 = getelementptr inbounds double, double* %47, i64 %75
%100 = bitcast double* %99 to <2 x double>*
store <2 x double> %97, <2 x double>* %100
%101 = getelementptr inbounds double, double* %99, i64 2
%102 = bitcast double* %101 to <2 x double>*
store <2 x double> %98, <2 x double>* %102
%103 = add nuw i64 %74, 4
%104 = icmp eq i64 %103, %67
br i1 %104, label %105, label %73
105: ; preds = %73
%106 = icmp eq i64 %49, %67
br i1 %106, label %182, label %107
107: ; preds = %51, %38, %105
%108 = phi i64 [ 1, %51 ], [ 1, %38 ], [ %68, %105 ]
%109 = xor i64 %108, -1
%110 = and i64 %48, 1
%111 = icmp eq i64 %110, 0
br i1 %111, label %112, label %123
112: ; preds = %107
%113 = getelementptr inbounds double, double* %41, i64 %108
%114 = load double, double* %113
%115 = add nuw nsw i64 %108, 1
%116 = getelementptr inbounds double, double* %43, i64 %115
%117 = load double, double* %116
%118 = getelementptr inbounds double, double* %43, i64 %108
%119 = load double, double* %118
%120 = fsub double %117, %119
%121 = tail call double @llvm.fmuladd.f64(double %45, double %120, double %114)
%122 = getelementptr inbounds double, double* %47, i64 %108
store double %121, double* %122
br label %123
123: ; preds = %112, %107
%124 = phi i64 [ %108, %107 ], [ %115, %112 ]
%125 = sub nsw i64 0, %48
%126 = icmp eq i64 %109, %125
br i1 %126, label %182, label %159
127: ; preds = %31, %127
%128 = phi i64 [ 1, %31 ], [ %140, %127 ]
%129 = getelementptr inbounds double, double* %23, i64 %128
%130 = load double, double* %129
%131 = getelementptr inbounds double, double* %26, i64 %128
%132 = load double, double* %131
%133 = getelementptr inbounds double, double* %28, i64 %128
%134 = load double, double* %133
%135 = fsub double %132, %134
%136 = tail call double @llvm.fmuladd.f64(double %15, double %135, double %130)
%137 = getelementptr inbounds double, double* %30, i64 %128
store double %136, double* %137
%138 = getelementptr inbounds double, double* %33, i64 %128
%139 = load double, double* %138
%140 = add nuw nsw i64 %128, 1
%141 = getelementptr inbounds double, double* %28, i64 %140
%142 = load double, double* %141
%143 = load double, double* %133
%144 = fsub double %142, %143
%145 = tail call double @llvm.fmuladd.f64(double %16, double %144, double %139)
%146 = getelementptr inbounds double, double* %35, i64 %128
store double %145, double* %146
%147 = icmp eq i64 %140, %19
br i1 %147, label %148, label %127
148: ; preds = %127, %20
%149 = getelementptr inbounds double, double* %23, i64 %17
%150 = load double, double* %149
%151 = getelementptr inbounds double, double* %26, i64 %17
%152 = load double, double* %151
%153 = getelementptr inbounds double, double* %28, i64 %17
%154 = load double, double* %153
%155 = fsub double %152, %154
%156 = tail call double @llvm.fmuladd.f64(double %15, double %155, double %150)
%157 = getelementptr inbounds double, double* %30, i64 %17
store double %156, double* %157
%158 = icmp eq i64 %24, %18
br i1 %158, label %36, label %20
159: ; preds = %123, %159
%160 = phi i64 [ %173, %159 ], [ %124, %123 ]
%161 = getelementptr inbounds double, double* %41, i64 %160
%162 = load double, double* %161
%163 = add nuw nsw i64 %160, 1
%164 = getelementptr inbounds double, double* %43, i64 %163
%165 = load double, double* %164
%166 = getelementptr inbounds double, double* %43, i64 %160
%167 = load double, double* %166
%168 = fsub double %165, %167
%169 = tail call double @llvm.fmuladd.f64(double %45, double %168, double %162)
%170 = getelementptr inbounds double, double* %47, i64 %160
store double %169, double* %170
%171 = getelementptr inbounds double, double* %41, i64 %163
%172 = load double, double* %171
%173 = add nuw nsw i64 %160, 2
%174 = getelementptr inbounds double, double* %43, i64 %173
%175 = load double, double* %174
%176 = getelementptr inbounds double, double* %43, i64 %163
%177 = load double, double* %176
%178 = fsub double %175, %177
%179 = tail call double @llvm.fmuladd.f64(double %45, double %178, double %172)
%180 = getelementptr inbounds double, double* %47, i64 %163
store double %179, double* %180
%181 = icmp eq i64 %173, %48
br i1 %181, label %182, label %159
182: ; preds = %123, %159, %105, %36
ret void
}