void iceform(double *qfusion, double *T, double Tcutoff, double fracprv,
             double *areaadd, int numnod, int dt, double dz, double surfdz,
             double *cp, double *surface, double *new_ice_height,
             double *water_density, double *new_ice_water_eq, double lvolume) {
  double sum, extra;
  int j;
  double xfrac, di;
  *qfusion = 0.0;
  sum = 0.0;
  *new_ice_water_eq = 0.0;
  for (j = 0; j < numnod; j++) {
    if (T[j] < Tcutoff) {
      if (j == 0)
        extra = ((Tcutoff - T[j]) * surfdz * 999.842594 * cp[j] *
                 (1.0 - fracprv) * (surface[j] + surface[j + 1]) / 2.);
      else if (j == numnod - 1)
        extra = ((Tcutoff - T[j]) * dz * 999.842594 * cp[j] * (1.0 - fracprv) *
                 surface[j]);
      else
        extra = ((Tcutoff - T[j]) * dz * 999.842594 * cp[j] * (1.0 - fracprv) *
                 (surface[j] + surface[j + 1]) / 2.);
      T[j] = Tcutoff;
      sum += extra;
    }
  }
  *new_ice_water_eq = sum / (999.842594 * 3.337e5);
  if (lvolume > *new_ice_water_eq) {
    *qfusion = (sum / (dt * 3600 * surface[0] * (1.0 - fracprv)));
    di = sum / (3.337e5 * 917.);
  } else if (lvolume > 0.0) {
    *new_ice_water_eq = lvolume;
    di = *new_ice_water_eq * 999.842594 / 917.;
    *qfusion = (*new_ice_water_eq * 999.842594 / 917.) /
               (dt * 3600 * surface[0] * (1.0 - fracprv));
  } else {
    *new_ice_water_eq = 0.0;
    di = 0.0;
    *qfusion = 0.0;
  }
  *new_ice_height = 0.10;
  *areaadd = di / (0.10);
  if (*areaadd > (1.0 - fracprv) * surface[0]) {
    *new_ice_height = di / ((1. - fracprv) * surface[0]);
    *areaadd = (1. - fracprv) * surface[0];
  }
}


x86 assembly (clang, -O0):
<iceform>:
push   %rbp
mov    %rsp,%rbp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %ecx,-0x2c(%rbp)
mov    %r8d,-0x30(%rbp)
movsd  %xmm2,-0x38(%rbp)
movsd  %xmm3,-0x40(%rbp)
mov    %r9,-0x48(%rbp)
movsd  %xmm4,-0x50(%rbp)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    132c <iceform+0x22c>
mov    -0x10(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1319 <iceform+0x219>
cmpl   $0x0,-0x64(%rbp)
jne    1215 <iceform+0x115>
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x64(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  0xe5e(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x48(%rbp),%rax
movslq -0x64(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  0xe35(%rip),%xmm1
subsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    0x10(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    0x10(%rbp),%rax
mov    -0x64(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe29(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    12f8 <iceform+0x1f8>
mov    -0x64(%rbp),%eax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    127e <iceform+0x17e>
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x64(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  0xdd3(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x48(%rbp),%rax
movslq -0x64(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  0xdaa(%rip),%xmm1
subsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    0x10(%rbp),%rax
movslq -0x64(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    12f3 <iceform+0x1f3>
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x64(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  0xd7b(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x48(%rbp),%rax
movslq -0x64(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  0xd52(%rip),%xmm1
subsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    0x10(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    0x10(%rbp),%rax
mov    -0x64(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd46(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    12f8 <iceform+0x1f8>
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    131e <iceform+0x21e>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1169 <iceform+0x69>
movsd  -0x58(%rbp),%xmm0
movsd  0xcc7(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x50(%rbp),%xmm0
mov    0x28(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    13a8 <iceform+0x2a8>
movsd  -0x58(%rbp),%xmm0
imul   $0xe10,-0x30(%rbp),%eax
cvtsi2sd %eax,%xmm1
mov    0x10(%rbp),%rax
mulsd  (%rax),%xmm1
movsd  0xc90(%rip),%xmm2
subsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x58(%rbp),%xmm0
movsd  0xc86(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
jmp    145c <iceform+0x35c>
movsd  -0x50(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1439 <iceform+0x339>
movsd  -0x50(%rbp),%xmm0
mov    0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x28(%rbp),%rax
movsd  0xc45(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  0xc31(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    0x28(%rbp),%rax
movsd  0xc24(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  0xc10(%rip),%xmm1
divsd  %xmm1,%xmm0
imul   $0xe10,-0x30(%rbp),%eax
cvtsi2sd %eax,%xmm1
mov    0x10(%rbp),%rax
mulsd  (%rax),%xmm1
movsd  0xbe9(%rip),%xmm2
subsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1457 <iceform+0x357>
mov    0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    145c <iceform+0x35c>
mov    0x18(%rbp),%rax
movsd  0xbc0(%rip),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x78(%rbp),%xmm0
movsd  0xbaf(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xb73(%rip),%xmm1
subsd  -0x20(%rbp),%xmm1
mov    0x10(%rbp),%rax
mulsd  (%rax),%xmm1
ucomisd %xmm1,%xmm0
jbe    14ef <iceform+0x3ef>
movsd  -0x78(%rbp),%xmm0
movsd  0xb4f(%rip),%xmm1
subsd  -0x20(%rbp),%xmm1
mov    0x10(%rbp),%rax
mulsd  (%rax),%xmm1
divsd  %xmm1,%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xb2e(%rip),%xmm0
subsd  -0x20(%rbp),%xmm0
mov    0x10(%rbp),%rax
mulsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<iceform>:
push   %rbx
mov    0x28(%rsp),%r10
mov    0x10(%rsp),%r11
movq   $0x0,(%rdi)
movq   $0x0,(%r10)
test   %ecx,%ecx
jle    1219 <iceform+0x119>
movsd  0xed7(%rip),%xmm6
subsd  %xmm1,%xmm6
movsd  (%rsi),%xmm7
xorpd  %xmm5,%xmm5
ucomisd %xmm7,%xmm0
jbe    117b <iceform+0x7b>
movapd %xmm0,%xmm5
subsd  %xmm7,%xmm5
mulsd  %xmm3,%xmm5
mulsd  0xeb9(%rip),%xmm5
mulsd  (%r9),%xmm5
movsd  (%r11),%xmm3
addsd  0x8(%r11),%xmm3
mulsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm3
mulsd  0xea1(%rip),%xmm3
xorpd  %xmm5,%xmm5
addsd  %xmm3,%xmm5
movsd  %xmm0,(%rsi)
cmp    $0x1,%ecx
je     121d <iceform+0x11d>
mov    %ecx,%eax
add    $0xffffffff,%ecx
mov    $0x1,%ebx
movsd  0xe71(%rip),%xmm9
movsd  0xe70(%rip),%xmm8
jmp    11e6 <iceform+0xe6>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mulsd  (%r9,%rbx,8),%xmm7
mulsd  %xmm6,%xmm7
movsd  (%r11,%rbx,8),%xmm3
addsd  0x8(%r11,%rbx,8),%xmm3
mulsd  %xmm7,%xmm3
mulsd  %xmm8,%xmm3
movapd %xmm3,%xmm7
movsd  %xmm0,(%rsi,%rbx,8)
addsd  %xmm7,%xmm5
add    $0x1,%rbx
cmp    %rbx,%rax
je     121d <iceform+0x11d>
movsd  (%rsi,%rbx,8),%xmm3
ucomisd %xmm3,%xmm0
jbe    11dd <iceform+0xdd>
movapd %xmm0,%xmm7
subsd  %xmm3,%xmm7
mulsd  %xmm2,%xmm7
mulsd  %xmm9,%xmm7
cmp    %rbx,%rcx
jne    11b0 <iceform+0xb0>
mulsd  (%r9,%rcx,8),%xmm7
mulsd  %xmm6,%xmm7
mulsd  (%r11,%rcx,8),%xmm7
jmp    11d4 <iceform+0xd4>
xorpd  %xmm5,%xmm5
movapd %xmm5,%xmm0
divsd  0xdef(%rip),%xmm0
mov    0x18(%rsp),%rcx
movsd  %xmm0,(%r10)
ucomisd %xmm0,%xmm4
jbe    1272 <iceform+0x172>
imul   $0xe10,%r8d,%eax
xorps  %xmm2,%xmm2
cvtsi2sd %eax,%xmm2
mulsd  (%r11),%xmm2
movsd  0xdac(%rip),%xmm0
subsd  %xmm1,%xmm0
mulsd  %xmm0,%xmm2
movapd %xmm5,%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,(%rdi)
divsd  0xdb8(%rip),%xmm5
jmp    12e0 <iceform+0x1e0>
xorpd  %xmm5,%xmm5
ucomisd %xmm5,%xmm4
jbe    12c6 <iceform+0x1c6>
movsd  %xmm4,(%r10)
mulsd  0xd7f(%rip),%xmm4
divsd  0xd8f(%rip),%xmm4
imul   $0xe10,%r8d,%eax
xorps  %xmm2,%xmm2
cvtsi2sd %eax,%xmm2
mulsd  (%r11),%xmm2
movsd  0xd54(%rip),%xmm0
subsd  %xmm1,%xmm0
mulsd  %xmm0,%xmm2
movapd %xmm4,%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,(%rdi)
movapd %xmm4,%xmm5
jmp    12e0 <iceform+0x1e0>
movq   $0x0,(%r10)
movq   $0x0,(%rdi)
movsd  0xd24(%rip),%xmm0
subsd  %xmm1,%xmm0
movabs $0x3fb999999999999a,%rax
99 b9 3f
mov    %rax,(%rcx)
movapd %xmm5,%xmm2
divsd  0xd37(%rip),%xmm2
movsd  %xmm2,(%rdx)
movsd  (%r11),%xmm1
mulsd  %xmm0,%xmm1
ucomisd %xmm1,%xmm2
jbe    131d <iceform+0x21d>
divsd  %xmm1,%xmm5
movsd  %xmm5,(%rcx)
mulsd  (%r11),%xmm0
movsd  %xmm0,(%rdx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @iceform(double* nocapture writeonly %0, double* nocapture %1, double %2, double %3, double* nocapture writeonly %4, i32 %5, i32 %6, double %7, double %8, double* nocapture %9, double* nocapture %10, double* nocapture writeonly %11, double* nocapture readnone %12, double* nocapture writeonly %13, double %14) {
store double 0.000000e+00, double* %0
store double 0.000000e+00, double* %13
%16 = icmp sgt i32 %5, 0
br i1 %16, label %17, label %81
17: ; preds = %15
%18 = add nsw i32 %5, -1
%19 = fsub double 1.000000e+00, %3
%20 = zext i32 %18 to i64
%21 = zext i32 %5 to i64
%22 = load double, double* %1
%23 = fcmp olt double %22, %2
br i1 %23, label %24, label %38
24: ; preds = %17
%25 = getelementptr inbounds double, double* %10, i64 1
%26 = fsub double %2, %22
%27 = fmul double %26, %8
%28 = fmul double %27, 0x408F3EBDA1EC4E72
%29 = load double, double* %9
%30 = fmul double %28, %29
%31 = fmul double %19, %30
%32 = load double, double* %10
%33 = load double, double* %25
%34 = fadd double %32, %33
%35 = fmul double %31, %34
%36 = fmul double %35, 5.000000e-01
%37 = fadd double %36, 0.000000e+00
store double %2, double* %1
br label %38
38: ; preds = %24, %17
%39 = phi double [ %37, %24 ], [ 0.000000e+00, %17 ]
%40 = icmp eq i32 %5, 1
br i1 %40, label %81, label %41
41: ; preds = %38
%42 = getelementptr inbounds double, double* %9, i64 %20
%43 = getelementptr inbounds double, double* %10, i64 %20
br label %44
44: ; preds = %41, %77
%45 = phi i64 [ 1, %41 ], [ %79, %77 ]
%46 = phi double [ %39, %41 ], [ %78, %77 ]
%47 = getelementptr inbounds double, double* %1, i64 %45
%48 = load double, double* %47
%49 = fcmp olt double %48, %2
br i1 %49, label %50, label %77
50: ; preds = %44
%51 = icmp eq i64 %45, %20
%52 = fsub double %2, %48
%53 = fmul double %52, %7
%54 = fmul double %53, 0x408F3EBDA1EC4E72
br i1 %51, label %55, label %61
55: ; preds = %50
%56 = load double, double* %42
%57 = fmul double %54, %56
%58 = fmul double %19, %57
%59 = load double, double* %43
%60 = fmul double %59, %58
br label %74
61: ; preds = %50
%62 = getelementptr inbounds double, double* %9, i64 %45
%63 = load double, double* %62
%64 = fmul double %54, %63
%65 = fmul double %19, %64
%66 = getelementptr inbounds double, double* %10, i64 %45
%67 = load double, double* %66
%68 = add nuw nsw i64 %45, 1
%69 = getelementptr inbounds double, double* %10, i64 %68
%70 = load double, double* %69
%71 = fadd double %67, %70
%72 = fmul double %65, %71
%73 = fmul double %72, 5.000000e-01
br label %74
74: ; preds = %55, %61
%75 = phi double [ %60, %55 ], [ %73, %61 ]
store double %2, double* %47
%76 = fadd double %46, %75
br label %77
77: ; preds = %44, %74
%78 = phi double [ %76, %74 ], [ %46, %44 ]
%79 = add nuw nsw i64 %45, 1
%80 = icmp eq i64 %79, %21
br i1 %80, label %81, label %44
81: ; preds = %77, %38, %15
%82 = phi double [ 0.000000e+00, %15 ], [ %39, %38 ], [ %78, %77 ]
%83 = fdiv double %82, 0x41B3E30E719E2824
store double %83, double* %13
%84 = fcmp olt double %83, %14
br i1 %84, label %85, label %94
85: ; preds = %81
%86 = mul nsw i32 %6, 3600
%87 = sitofp i32 %86 to double
%88 = load double, double* %10
%89 = fmul double %88, %87
%90 = fsub double 1.000000e+00, %3
%91 = fmul double %90, %89
%92 = fdiv double %82, %91
store double %92, double* %0
%93 = fdiv double %82, 0x41B23D3BD4000000
br label %108
94: ; preds = %81
%95 = fcmp ogt double %14, 0.000000e+00
br i1 %95, label %96, label %106
96: ; preds = %94
store double %14, double* %13
%97 = fmul double %14, 0x408F3EBDA1EC4E72
%98 = fdiv double %97, 9.170000e+02
%99 = mul nsw i32 %6, 3600
%100 = sitofp i32 %99 to double
%101 = load double, double* %10
%102 = fmul double %101, %100
%103 = fsub double 1.000000e+00, %3
%104 = fmul double %103, %102
%105 = fdiv double %98, %104
store double %105, double* %0
br label %108
106: ; preds = %94
store double 0.000000e+00, double* %13
store double 0.000000e+00, double* %0
%107 = fsub double 1.000000e+00, %3
br label %108
108: ; preds = %96, %106, %85
%109 = phi double [ %103, %96 ], [ %107, %106 ], [ %90, %85 ]
%110 = phi double [ %98, %96 ], [ 0.000000e+00, %106 ], [ %93, %85 ]
store double 1.000000e-01, double* %11
%111 = fdiv double %110, 1.000000e-01
store double %111, double* %4
%112 = load double, double* %10
%113 = fmul double %109, %112
%114 = fcmp ogt double %111, %113
br i1 %114, label %115, label %119
115: ; preds = %108
%116 = fdiv double %110, %113
store double %116, double* %11
%117 = load double, double* %10
%118 = fmul double %109, %117
store double %118, double* %4
br label %119
119: ; preds = %115, %108
ret void
}