void conserve_interp(int nx_src, int ny_src, int nx_dst, int ny_dst,
                     const double *x_src, const double *y_src,
                     const double *x_dst, const double *y_dst,
                     const double *mask_src, const double *data_src,
                     double *data_dst) {
  int n, nxgrid;
  int *xgrid_i1, *xgrid_j1, *xgrid_i2, *xgrid_j2;
  double *xgrid_area, *dst_area, *area_frac;
  xgrid_i1 = (int *)malloc(1e7 * sizeof(int));
  xgrid_j1 = (int *)malloc(1e7 * sizeof(int));
  xgrid_i2 = (int *)malloc(1e7 * sizeof(int));
  xgrid_j2 = (int *)malloc(1e7 * sizeof(int));
  xgrid_area = (double *)malloc(1e7 * sizeof(double));
  dst_area = (double *)malloc(nx_dst * ny_dst * sizeof(double));
  nxgrid = create_xgrid_2dx2d_order1(&nx_src, &ny_src, &nx_dst, &ny_dst, x_src,
                                     y_src, x_dst, y_dst, mask_src, xgrid_i1,
                                     xgrid_j1, xgrid_i2, xgrid_j2, xgrid_area);
  get_grid_area(&nx_dst, &ny_dst, x_dst, y_dst, dst_area);
  area_frac = (double *)malloc(nxgrid * sizeof(double));
  for (n = 0; n < nxgrid; n++)
    area_frac[n] = xgrid_area[n] / dst_area[xgrid_j2[n] * nx_dst + xgrid_i2[n]];
  for (n = 0; n < nx_dst * ny_dst; n++) {
    data_dst[n] = 0;
  }
  for (n = 0; n < nxgrid; n++) {
    data_dst[xgrid_j2[n] * nx_dst + xgrid_i2[n]] +=
        data_src[xgrid_j1[n] * nx_src + xgrid_i1[n]] * area_frac[n];
  }
  free(xgrid_i1);
  free(xgrid_j1);
  free(xgrid_i2);
  free(xgrid_j2);
  free(xgrid_area);
  free(dst_area);
  free(area_frac);
}


x86 assembly (clang, -O0):
<conserve_interp>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x2c(%rbp)
mov    %esi,-0x30(%rbp)
mov    %edx,-0x34(%rbp)
mov    %ecx,-0x38(%rbp)
mov    %r8,-0x40(%rbp)
mov    %r9,-0x48(%rbp)
mov    $0x2625a00,%edi
call   1040 <malloc@plt>
mov    %rax,-0x58(%rbp)
mov    $0x2625a00,%edi
call   1040 <malloc@plt>
mov    %rax,-0x60(%rbp)
mov    $0x2625a00,%edi
call   1040 <malloc@plt>
mov    %rax,-0x68(%rbp)
mov    $0x2625a00,%edi
call   1040 <malloc@plt>
mov    %rax,-0x70(%rbp)
mov    $0x4c4b400,%edi
call   1040 <malloc@plt>
mov    %rax,-0x78(%rbp)
mov    -0x34(%rbp),%eax
imul   -0x38(%rbp),%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x80(%rbp)
mov    -0x40(%rbp),%r8
mov    -0x48(%rbp),%r9
mov    0x10(%rbp),%r13
mov    0x18(%rbp),%r12
mov    0x20(%rbp),%r15
mov    -0x58(%rbp),%r14
mov    -0x60(%rbp),%rbx
mov    -0x68(%rbp),%r11
mov    -0x70(%rbp),%r10
mov    -0x78(%rbp),%rax
lea    -0x2c(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x34(%rbp),%rdx
lea    -0x38(%rbp),%rcx
mov    %r13,(%rsp)
mov    %r12,0x8(%rsp)
mov    %r15,0x10(%rsp)
mov    %r14,0x18(%rsp)
mov    %rbx,0x20(%rsp)
mov    %r11,0x28(%rsp)
mov    %r10,0x30(%rsp)
mov    %rax,0x38(%rsp)
mov    $0x0,%al
call   1050 <create_xgrid_2dx2d_order1@plt>
mov    %eax,-0x50(%rbp)
mov    0x10(%rbp),%rdx
mov    0x18(%rbp),%rcx
mov    -0x80(%rbp),%r8
lea    -0x34(%rbp),%rdi
lea    -0x38(%rbp),%rsi
mov    $0x0,%al
call   1060 <get_grid_area@plt>
movslq -0x50(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x88(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x50(%rbp),%eax
jge    12d5 <conserve_interp+0x195>
mov    -0x78(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x80(%rbp),%rax
mov    -0x70(%rbp),%rcx
movslq -0x4c(%rbp),%rdx
mov    (%rcx,%rdx,4),%ecx
imul   -0x34(%rbp),%ecx
mov    -0x68(%rbp),%rdx
movslq -0x4c(%rbp),%rsi
add    (%rdx,%rsi,4),%ecx
movslq %ecx,%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x88(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1278 <conserve_interp+0x138>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    -0x34(%rbp),%ecx
imul   -0x38(%rbp),%ecx
cmp    %ecx,%eax
jge    130c <conserve_interp+0x1cc>
mov    0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    12dc <conserve_interp+0x19c>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x50(%rbp),%eax
jge    1396 <conserve_interp+0x256>
mov    0x28(%rbp),%rax
mov    -0x60(%rbp),%rcx
movslq -0x4c(%rbp),%rdx
mov    (%rcx,%rdx,4),%ecx
imul   -0x2c(%rbp),%ecx
mov    -0x58(%rbp),%rdx
movslq -0x4c(%rbp),%rsi
add    (%rdx,%rsi,4),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x88(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x30(%rbp),%rax
mov    -0x70(%rbp),%rcx
movslq -0x4c(%rbp),%rdx
mov    (%rcx,%rdx,4),%ecx
imul   -0x34(%rbp),%ecx
mov    -0x68(%rbp),%rdx
movslq -0x4c(%rbp),%rsi
add    (%rdx,%rsi,4),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1313 <conserve_interp+0x1d3>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
mov    -0x80(%rbp),%rdi
call   1030 <free@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<conserve_interp>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9,0x18(%rsp)
mov    %r8,0x10(%rsp)
mov    %ecx,%ebp
mov    %edx,%r15d
mov    %edi,0xc(%rsp)
mov    %esi,0x24(%rsp)
mov    %edx,0x8(%rsp)
mov    %ecx,0x4(%rsp)
mov    $0x2625a00,%edi
call   1050 <malloc@plt>
mov    %rax,0x38(%rsp)
mov    $0x2625a00,%edi
call   1050 <malloc@plt>
mov    %rax,0x30(%rsp)
mov    $0x2625a00,%edi
call   1050 <malloc@plt>
mov    %rax,%r14
mov    %rax,0x40(%rsp)
mov    $0x2625a00,%edi
call   1050 <malloc@plt>
mov    %rax,%r12
mov    $0x4c4b400,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,0x28(%rsp)
imul   %r15d,%ebp
movslq %ebp,%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,%r13
lea    0xc(%rsp),%rdi
lea    0x24(%rsp),%rsi
lea    0x8(%rsp),%r15
lea    0x4(%rsp),%rcx
mov    %r15,%rdx
mov    0x10(%rsp),%r8
mov    0x18(%rsp),%r9
mov    $0x0,%eax
push   %rbx
push   %r12
push   %r14
push   0x48(%rsp)
push   0x58(%rsp)
push   0xb8(%rsp)
mov    0xb8(%rsp),%r14
push   %r14
mov    0xb8(%rsp),%rbx
push   %rbx
call   1060 <create_xgrid_2dx2d_order1@plt>
add    $0x40,%rsp
mov    %eax,%ebp
mov    %r15,%rdi
lea    0x4(%rsp),%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
mov    %r13,%r8
xor    %eax,%eax
call   1070 <get_grid_area@plt>
mov    %ebp,0x10(%rsp)
movslq %ebp,%r15
lea    0x0(,%r15,8),%rdi
call   1050 <malloc@plt>
mov    %r13,%rdi
mov    0x28(%rsp),%rsi
mov    0x40(%rsp),%rbx
mov    %rax,%r14
movslq 0x8(%rsp),%r13
mov    %r15d,%ebp
test   %r15d,%r15d
jle    12b8 <conserve_interp+0x168>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rsi,%rax,8),%xmm0
movslq (%r12,%rax,4),%rcx
imul   %r13,%rcx
movslq (%rbx,%rax,4),%rdx
add    %rcx,%rdx
divsd  (%rdi,%rdx,8),%xmm0
movsd  %xmm0,(%r14,%rax,8)
add    $0x1,%rax
cmp    %rax,%rbp
jne    1290 <conserve_interp+0x140>
mov    %rdi,0x18(%rsp)
mov    0xa0(%rsp),%r15
mov    0x4(%rsp),%eax
imul   %r13d,%eax
test   %eax,%eax
jle    12e1 <conserve_interp+0x191>
mov    %eax,%edx
shl    $0x3,%rdx
mov    %r15,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
cmpl   $0x0,0x10(%rsp)
mov    0x38(%rsp),%rdi
mov    0x30(%rsp),%r9
jle    134f <conserve_interp+0x1ff>
mov    0x98(%rsp),%r8
movslq 0xc(%rsp),%rcx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movslq (%r9,%rdx,4),%rsi
imul   %rcx,%rsi
movslq (%rdi,%rdx,4),%rax
add    %rsi,%rax
movsd  (%r8,%rax,8),%xmm0
movslq (%r12,%rdx,4),%rsi
imul   %r13,%rsi
movslq (%rbx,%rdx,4),%rax
add    %rsi,%rax
mulsd  (%r14,%rdx,8),%xmm0
addsd  (%r15,%rax,8),%xmm0
movsd  %xmm0,(%r15,%rax,8)
add    $0x1,%rdx
cmp    %rdx,%rbp
jne    1310 <conserve_interp+0x1c0>
mov    %r9,%rbp
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    0x28(%rsp),%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @conserve_interp(i32 %0, i32 %1, i32 %2, i32 %3, double* %4, double* %5, double* %6, double* %7, double* %8, double* %9, double* %10) {
%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 i32
%24 = alloca i32
%25 = alloca i32*
%26 = alloca i32*
%27 = alloca i32*
%28 = alloca i32*
%29 = alloca double*
%30 = alloca double*
%31 = alloca double*
store i32 %0, i32* %12
store i32 %1, i32* %13
store i32 %2, i32* %14
store i32 %3, i32* %15
store double* %4, double** %16
store double* %5, double** %17
store double* %6, double** %18
store double* %7, double** %19
store double* %8, double** %20
store double* %9, double** %21
store double* %10, double** %22
%32 = call i8* @malloc(i64 40000000)
%33 = bitcast i8* %32 to i32*
store i32* %33, i32** %25
%34 = call i8* @malloc(i64 40000000)
%35 = bitcast i8* %34 to i32*
store i32* %35, i32** %26
%36 = call i8* @malloc(i64 40000000)
%37 = bitcast i8* %36 to i32*
store i32* %37, i32** %27
%38 = call i8* @malloc(i64 40000000)
%39 = bitcast i8* %38 to i32*
store i32* %39, i32** %28
%40 = call i8* @malloc(i64 80000000)
%41 = bitcast i8* %40 to double*
store double* %41, double** %29
%42 = load i32, i32* %14
%43 = load i32, i32* %15
%44 = mul nsw i32 %42, %43
%45 = sext i32 %44 to i64
%46 = mul i64 %45, 8
%47 = call i8* @malloc(i64 %46)
%48 = bitcast i8* %47 to double*
store double* %48, double** %30
%49 = load double*, double** %16
%50 = load double*, double** %17
%51 = load double*, double** %18
%52 = load double*, double** %19
%53 = load double*, double** %20
%54 = load i32*, i32** %25
%55 = load i32*, i32** %26
%56 = load i32*, i32** %27
%57 = load i32*, i32** %28
%58 = load double*, double** %29
%59 = call i32 (i32*, i32*, i32*, i32*, double*, double*, double*, double*, double*, i32*, i32*, i32*, i32*, double*, ...) bitcast (i32 (...)* @create_xgrid_2dx2d_order1 to i32 (i32*, i32*, i32*, i32*, double*, double*, double*, double*, double*, i32*, i32*, i32*, i32*, double*, ...)*)(i32* %12, i32* %13, i32* %14, i32* %15, double* %49, double* %50, double* %51, double* %52, double* %53, i32* %54, i32* %55, i32* %56, i32* %57, double* %58)
store i32 %59, i32* %24
%60 = load double*, double** %18
%61 = load double*, double** %19
%62 = load double*, double** %30
%63 = call i32 (i32*, i32*, double*, double*, double*, ...) bitcast (i32 (...)* @get_grid_area to i32 (i32*, i32*, double*, double*, double*, ...)*)(i32* %14, i32* %15, double* %60, double* %61, double* %62)
%64 = load i32, i32* %24
%65 = sext i32 %64 to i64
%66 = mul i64 %65, 8
%67 = call i8* @malloc(i64 %66)
%68 = bitcast i8* %67 to double*
store double* %68, double** %31
store i32 0, i32* %23
br label %69
69: ; preds = %101, %11
%70 = load i32, i32* %23
%71 = load i32, i32* %24
%72 = icmp slt i32 %70, %71
br i1 %72, label %73, label %104
73: ; preds = %69
%74 = load double*, double** %29
%75 = load i32, i32* %23
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds double, double* %74, i64 %76
%78 = load double, double* %77
%79 = load double*, double** %30
%80 = load i32*, i32** %28
%81 = load i32, i32* %23
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds i32, i32* %80, i64 %82
%84 = load i32, i32* %83
%85 = load i32, i32* %14
%86 = mul nsw i32 %84, %85
%87 = load i32*, i32** %27
%88 = load i32, i32* %23
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds i32, i32* %87, i64 %89
%91 = load i32, i32* %90
%92 = add nsw i32 %86, %91
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds double, double* %79, i64 %93
%95 = load double, double* %94
%96 = fdiv double %78, %95
%97 = load double*, double** %31
%98 = load i32, i32* %23
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds double, double* %97, i64 %99
store double %96, double* %100
br label %101
101: ; preds = %73
%102 = load i32, i32* %23
%103 = add nsw i32 %102, 1
store i32 %103, i32* %23
br label %69
104: ; preds = %69
store i32 0, i32* %23
br label %105
105: ; preds = %116, %104
%106 = load i32, i32* %23
%107 = load i32, i32* %14
%108 = load i32, i32* %15
%109 = mul nsw i32 %107, %108
%110 = icmp slt i32 %106, %109
br i1 %110, label %111, label %119
111: ; preds = %105
%112 = load double*, double** %22
%113 = load i32, i32* %23
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds double, double* %112, i64 %114
store double 0.000000e+00, double* %115
br label %116
116: ; preds = %111
%117 = load i32, i32* %23
%118 = add nsw i32 %117, 1
store i32 %118, i32* %23
br label %105
119: ; preds = %105
store i32 0, i32* %23
br label %120
120: ; preds = %165, %119
%121 = load i32, i32* %23
%122 = load i32, i32* %24
%123 = icmp slt i32 %121, %122
br i1 %123, label %124, label %168
124: ; preds = %120
%125 = load double*, double** %21
%126 = load i32*, i32** %26
%127 = load i32, i32* %23
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds i32, i32* %126, i64 %128
%130 = load i32, i32* %129
%131 = load i32, i32* %12
%132 = mul nsw i32 %130, %131
%133 = load i32*, i32** %25
%134 = load i32, i32* %23
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds i32, i32* %133, i64 %135
%137 = load i32, i32* %136
%138 = add nsw i32 %132, %137
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds double, double* %125, i64 %139
%141 = load double, double* %140
%142 = load double*, double** %31
%143 = load i32, i32* %23
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds double, double* %142, i64 %144
%146 = load double, double* %145
%147 = load double*, double** %22
%148 = load i32*, i32** %28
%149 = load i32, i32* %23
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds i32, i32* %148, i64 %150
%152 = load i32, i32* %151
%153 = load i32, i32* %14
%154 = mul nsw i32 %152, %153
%155 = load i32*, i32** %27
%156 = load i32, i32* %23
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds i32, i32* %155, i64 %157
%159 = load i32, i32* %158
%160 = add nsw i32 %154, %159
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds double, double* %147, i64 %161
%163 = load double, double* %162
%164 = call double @llvm.fmuladd.f64(double %141, double %146, double %163)
store double %164, double* %162
br label %165
165: ; preds = %124
%166 = load i32, i32* %23
%167 = add nsw i32 %166, 1
store i32 %167, i32* %23
br label %120
168: ; preds = %120
%169 = load i32*, i32** %25
%170 = bitcast i32* %169 to i8*
%171 = load i32*, i32** %26
%172 = bitcast i32* %171 to i8*
%173 = load i32*, i32** %27
%174 = bitcast i32* %173 to i8*
%175 = load i32*, i32** %28
%176 = bitcast i32* %175 to i8*
%177 = load double*, double** %29
%178 = bitcast double* %177 to i8*
%179 = load double*, double** %30
%180 = bitcast double* %179 to i8*
%181 = load double*, double** %31
%182 = bitcast double* %181 to i8*
ret void
}

LLVM IR (-O2):
define void @conserve_interp(i32 %0, i32 %1, i32 %2, i32 %3, double* %4, double* %5, double* %6, double* %7, double* %8, double* nocapture %9, double* nocapture %10) {
%12 = bitcast double* %10 to i8*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32 %0, i32* %13
store i32 %1, i32* %14
store i32 %2, i32* %15
store i32 %3, i32* %16
%17 = tail call dereferenceable_or_null(40000000) i8* @malloc(i64 40000000)
%18 = bitcast i8* %17 to i32*
%19 = tail call dereferenceable_or_null(40000000) i8* @malloc(i64 40000000)
%20 = bitcast i8* %19 to i32*
%21 = tail call dereferenceable_or_null(40000000) i8* @malloc(i64 40000000)
%22 = bitcast i8* %21 to i32*
%23 = tail call dereferenceable_or_null(40000000) i8* @malloc(i64 40000000)
%24 = bitcast i8* %23 to i32*
%25 = tail call dereferenceable_or_null(80000000) i8* @malloc(i64 80000000)
%26 = bitcast i8* %25 to double*
%27 = mul nsw i32 %3, %2
%28 = sext i32 %27 to i64
%29 = shl nsw i64 %28, 3
%30 = tail call i8* @malloc(i64 %29)
%31 = bitcast i8* %30 to double*
%32 = call i32 (i32*, i32*, i32*, i32*, double*, double*, double*, double*, double*, i32*, i32*, i32*, i32*, double*, ...) bitcast (i32 (...)* @create_xgrid_2dx2d_order1 to i32 (i32*, i32*, i32*, i32*, double*, double*, double*, double*, double*, i32*, i32*, i32*, i32*, double*, ...)*)(i32* %13, i32* %14, i32* %15, i32* %16, double* %4, double* %5, double* %6, double* %7, double* %8, i32* %18, i32* %20, i32* %22, i32* %24, double* %26)
%33 = call i32 (i32*, i32*, double*, double*, double*, ...) bitcast (i32 (...)* @get_grid_area to i32 (i32*, i32*, double*, double*, double*, ...)*)(i32* %15, i32* %16, double* %6, double* %7, double* %31)
%34 = sext i32 %32 to i64
%35 = shl nsw i64 %34, 3
%36 = call i8* @malloc(i64 %35)
%37 = bitcast i8* %36 to double*
%38 = icmp sgt i32 %32, 0
%39 = load i32, i32* %15
br i1 %38, label %40, label %42
40: ; preds = %11
%41 = zext i32 %32 to i64
br label %49
42: ; preds = %49, %11
%43 = load i32, i32* %16
%44 = mul i32 %43, %39
%45 = icmp sgt i32 %44, 0
br i1 %45, label %46, label %66
46: ; preds = %42
%47 = zext i32 %44 to i64
%48 = shl nuw nsw i64 %47, 3
br label %66
49: ; preds = %40, %49
%50 = phi i64 [ 0, %40 ], [ %64, %49 ]
%51 = getelementptr inbounds double, double* %26, i64 %50
%52 = load double, double* %51
%53 = getelementptr inbounds i32, i32* %24, i64 %50
%54 = load i32, i32* %53
%55 = mul nsw i32 %39, %54
%56 = getelementptr inbounds i32, i32* %22, i64 %50
%57 = load i32, i32* %56
%58 = add nsw i32 %55, %57
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds double, double* %31, i64 %59
%61 = load double, double* %60
%62 = fdiv double %52, %61
%63 = getelementptr inbounds double, double* %37, i64 %50
store double %62, double* %63
%64 = add nuw nsw i64 %50, 1
%65 = icmp eq i64 %64, %41
br i1 %65, label %42, label %49
66: ; preds = %46, %42
br i1 %38, label %67, label %95
67: ; preds = %66
%68 = load i32, i32* %13
%69 = zext i32 %32 to i64
br label %70
70: ; preds = %67, %70
%71 = phi i64 [ 0, %67 ], [ %93, %70 ]
%72 = getelementptr inbounds i32, i32* %20, i64 %71
%73 = load i32, i32* %72
%74 = mul nsw i32 %68, %73
%75 = getelementptr inbounds i32, i32* %18, i64 %71
%76 = load i32, i32* %75
%77 = add nsw i32 %74, %76
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds double, double* %9, i64 %78
%80 = load double, double* %79
%81 = getelementptr inbounds double, double* %37, i64 %71
%82 = load double, double* %81
%83 = getelementptr inbounds i32, i32* %24, i64 %71
%84 = load i32, i32* %83
%85 = mul nsw i32 %84, %39
%86 = getelementptr inbounds i32, i32* %22, i64 %71
%87 = load i32, i32* %86
%88 = add nsw i32 %85, %87
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds double, double* %10, i64 %89
%91 = load double, double* %90
%92 = call double @llvm.fmuladd.f64(double %80, double %82, double %91)
store double %92, double* %90
%93 = add nuw nsw i64 %71, 1
%94 = icmp eq i64 %93, %69
br i1 %94, label %95, label %70
95: ; preds = %70, %66
ret void
}