#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 sqrt(double);
void computegradient(double *img, int w, int h, double *gx, double *gy) {
  int i, j, k, p, q;
  double glength, phi, phiscaled, ascaled, errsign, pfrac, qfrac, err0, err1,
      err;
  for (i = 1; i < h - 1; i++) {
    for (j = 1; j < w - 1; j++) {
      k = i * w + j;
      if ((img[k] > 0.0) && (img[k] < 1.0)) {
        gx[k] = -img[k - w - 1] - 1.4142136 * img[k - 1] - img[k + w - 1] +
                img[k - w + 1] + 1.4142136 * img[k + 1] + img[k + w + 1];
        gy[k] = -img[k - w - 1] - 1.4142136 * img[k - w] - img[k + w - 1] +
                img[k - w + 1] + 1.4142136 * img[k + w] + img[k + w + 1];
        glength = gx[k] * gx[k] + gy[k] * gy[k];
        if (glength > 0.0) {
          glength = sqrt(glength);
          gx[k] = gx[k] / glength;
          gy[k] = gy[k] / glength;
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<computegradient>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    13e2 <computegradient+0x2d2>
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    13cf <computegradient+0x2bf>
mov    -0x24(%rbp),%eax
imul   -0xc(%rbp),%eax
add    -0x28(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    13bc <computegradient+0x2ac>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  0xe6c(%rip),%xmm0
ucomisd (%rax,%rcx,8),%xmm0
jbe    13bc <computegradient+0x2ac>
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
sub    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xe2b(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
sub    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xdd7(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
sub    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
sub    -0xc(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xd6f(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
sub    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    -0xc(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xd1b(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    13b7 <computegradient+0x2a7>
movsd  -0x40(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x40(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    13bc <computegradient+0x2ac>
jmp    13c1 <computegradient+0x2b1>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    114c <computegradient+0x3c>
jmp    13d4 <computegradient+0x2c4>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1134 <computegradient+0x24>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<computegradient>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,0x8(%rsp)
mov    %rdx,(%rsp)
cmp    $0x3,%edx
jl     12f0 <computegradient+0x1e0>
mov    %rdi,%rbx
mov    (%rsp),%rax
add    $0xffffffff,%eax
mov    %rax,(%rsp)
mov    0x8(%rsp),%rdx
lea    -0x1(%rdx),%eax
movslq %edx,%rdx
lea    0x10(%rdi,%rdx,8),%r12
lea    0x0(,%rdx,8),%rsi
mov    %rsi,0x10(%rsp)
lea    (%rcx,%rdx,8),%rbp
add    $0x8,%rbp
lea    (%r8,%rdx,8),%r14
add    $0x8,%r14
shl    $0x4,%rdx
lea    (%rdx,%rdi,1),%r15
add    $0x10,%r15
add    $0x10,%rbx
lea    -0x8(,%rax,8),%rcx
ff
mov    $0x1,%edx
xorpd  %xmm2,%xmm2
movsd  0xe6c(%rip),%xmm3
movsd  0xe6c(%rip),%xmm4
movsd  0xe6c(%rip),%xmm5
mov    %rcx,0x20(%rsp)
jmp    11d7 <computegradient+0xc7>
nopl   0x0(%rax,%rax,1)
mov    0x18(%rsp),%rdx
add    $0x1,%rdx
mov    0x10(%rsp),%rax
add    %rax,%r12
add    %rax,%rbp
add    %rax,%r14
add    %rax,%rbx
add    %rax,%r15
cmp    (%rsp),%rdx
je     12f0 <computegradient+0x1e0>
mov    %rdx,0x18(%rsp)
cmpl   $0x3,0x8(%rsp)
jl     11b0 <computegradient+0xa0>
xor    %r13d,%r13d
jmp    123d <computegradient+0x12d>
call   1030 <sqrt@plt>
movsd  0xe1b(%rip),%xmm5
movsd  0xe0b(%rip),%xmm4
movsd  0xdfb(%rip),%xmm3
xorpd  %xmm2,%xmm2
mov    0x20(%rsp),%rcx
movsd  0x0(%rbp,%r13,1),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%rbp,%r13,1)
movsd  (%r14,%r13,1),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%r14,%r13,1)
add    $0x8,%r13
cmp    %r13,%rcx
je     11b0 <computegradient+0xa0>
movsd  -0x8(%r12,%r13,1),%xmm0
ucomisd %xmm2,%xmm0
jbe    1230 <computegradient+0x120>
ucomisd %xmm0,%xmm3
jbe    1230 <computegradient+0x120>
movsd  -0x10(%r12,%r13,1),%xmm0
mulsd  %xmm4,%xmm0
subsd  -0x10(%rbx,%r13,1),%xmm0
subsd  -0x10(%r15,%r13,1),%xmm0
addsd  (%rbx,%r13,1),%xmm0
movsd  (%r12,%r13,1),%xmm1
mulsd  %xmm5,%xmm1
addsd  %xmm0,%xmm1
addsd  (%r15,%r13,1),%xmm1
movsd  %xmm1,0x0(%rbp,%r13,1)
movsd  -0x8(%rbx,%r13,1),%xmm0
mulsd  %xmm4,%xmm0
subsd  -0x10(%rbx,%r13,1),%xmm0
subsd  -0x10(%r15,%r13,1),%xmm0
addsd  (%rbx,%r13,1),%xmm0
movsd  -0x8(%r15,%r13,1),%xmm1
mulsd  %xmm5,%xmm1
addsd  %xmm0,%xmm1
addsd  (%r15,%r13,1),%xmm1
movsd  %xmm1,(%r14,%r13,1)
movsd  0x0(%rbp,%r13,1),%xmm0
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jbe    1230 <computegradient+0x120>
jb     11e8 <computegradient+0xd8>
sqrtsd %xmm0,%xmm0
jmp    120e <computegradient+0xfe>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @computegradient(double* nocapture %0, i32 %1, i32 %2, double* nocapture %3, double* nocapture %4) {
%6 = icmp sgt i32 %2, 2
br i1 %6, label %7, label %85
7: ; preds = %5
%8 = add nsw i32 %2, -1
%9 = add i32 %1, -1
%10 = icmp sgt i32 %1, 2
%11 = sext i32 %1 to i64
%12 = zext i32 %8 to i64
%13 = zext i32 %9 to i64
br label %14
14: ; preds = %7, %82
%15 = phi i64 [ 1, %7 ], [ %83, %82 ]
br i1 %10, label %16, label %82
16: ; preds = %14
%17 = mul nsw i64 %15, %11
br label %18
18: ; preds = %16, %79
%19 = phi i64 [ 1, %16 ], [ %80, %79 ]
%20 = add nsw i64 %19, %17
%21 = getelementptr inbounds double, double* %0, i64 %20
%22 = load double, double* %21
%23 = fcmp ogt double %22, 0.000000e+00
%24 = fcmp olt double %22, 1.000000e+00
%25 = and i1 %23, %24
br i1 %25, label %26, label %79
26: ; preds = %18
%27 = sub nsw i64 %20, %11
%28 = add nsw i64 %27, -1
%29 = getelementptr inbounds double, double* %0, i64 %28
%30 = load double, double* %29
%31 = fneg double %30
%32 = add nsw i64 %20, -1
%33 = getelementptr inbounds double, double* %0, i64 %32
%34 = load double, double* %33
%35 = tail call double @llvm.fmuladd.f64(double %34, double 0xBFF6A09E7098EF50, double %31)
%36 = add nsw i64 %20, %11
%37 = add nsw i64 %36, -1
%38 = getelementptr inbounds double, double* %0, i64 %37
%39 = load double, double* %38
%40 = fsub double %35, %39
%41 = add nsw i64 %27, 1
%42 = getelementptr inbounds double, double* %0, i64 %41
%43 = load double, double* %42
%44 = fadd double %40, %43
%45 = add nsw i64 %20, 1
%46 = getelementptr inbounds double, double* %0, i64 %45
%47 = load double, double* %46
%48 = tail call double @llvm.fmuladd.f64(double %47, double 0x3FF6A09E7098EF50, double %44)
%49 = add nsw i64 %36, 1
%50 = getelementptr inbounds double, double* %0, i64 %49
%51 = load double, double* %50
%52 = fadd double %48, %51
%53 = getelementptr inbounds double, double* %3, i64 %20
store double %52, double* %53
%54 = load double, double* %29
%55 = fneg double %54
%56 = getelementptr inbounds double, double* %0, i64 %27
%57 = load double, double* %56
%58 = tail call double @llvm.fmuladd.f64(double %57, double 0xBFF6A09E7098EF50, double %55)
%59 = load double, double* %38
%60 = fsub double %58, %59
%61 = load double, double* %42
%62 = fadd double %60, %61
%63 = getelementptr inbounds double, double* %0, i64 %36
%64 = load double, double* %63
%65 = tail call double @llvm.fmuladd.f64(double %64, double 0x3FF6A09E7098EF50, double %62)
%66 = load double, double* %50
%67 = fadd double %65, %66
%68 = getelementptr inbounds double, double* %4, i64 %20
store double %67, double* %68
%69 = load double, double* %53
%70 = fmul double %67, %67
%71 = tail call double @llvm.fmuladd.f64(double %69, double %69, double %70)
%72 = fcmp ogt double %71, 0.000000e+00
br i1 %72, label %73, label %79
73: ; preds = %26
%74 = tail call double @sqrt(double %71)
%75 = load double, double* %53
%76 = fdiv double %75, %74
store double %76, double* %53
%77 = load double, double* %68
%78 = fdiv double %77, %74
store double %78, double* %68
br label %79
79: ; preds = %18, %73, %26
%80 = add nuw nsw i64 %19, 1
%81 = icmp eq i64 %80, %13
br i1 %81, label %82, label %18
82: ; preds = %79, %14
%83 = add nuw nsw i64 %15, 1
%84 = icmp eq i64 %83, %12
br i1 %84, label %85, label %14
85: ; preds = %82, %5
ret void
}