#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 smoothedHeaviside(double, double);
void darcySharpInterfaceFlowEvaluate(
    int nPoints, int nSpace, double Km, double rhoM, double Kp, double rhoP,
    double eps, double *gravity_u, double *u, double *gradu, double *u_levelSet,
    double *phi_pot, double *a, double *f, double *r, double *m,
    double *dphi_pot, double *da, double *df, double *dr, double *dm) {
  int k, I, J, nSpace2;
  double He;
  nSpace2 = nSpace * nSpace;
  for (k = 0; k < nPoints; k++) {
    m[k] = 0.0;
    dm[k] = 1.0;
    r[k] = 0.0;
    dr[k] = 0.0;
    phi_pot[k] = u[k];
    dphi_pot[k] = 1.0;
    He = smoothedHeaviside(eps, u_levelSet[k]);
    for (I = 0; I < nSpace; I++) {
      for (J = 0; J < nSpace; J++) {
        if (I == J)
          a[k * nSpace2 + I * nSpace + J] = Km + He * (Kp - Km);
        else
          a[k * nSpace2 + I * nSpace + J] = 0.0;
        da[k * nSpace2 + I * nSpace + J] = 0.0;
      }
      f[k * nSpace + I] =
          (Km * rhoM + He * (Kp * rhoP - Km * rhoM)) * gravity_u[I];
      df[k * nSpace + I] = 0.0;
    }
  }
}


x86 assembly (clang, -O0):
<darcySharpInterfaceFlowEvaluate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
mov    %r8,-0x48(%rbp)
mov    %r9,-0x50(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x60(%rbp)
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    138b <darcySharpInterfaceFlowEvaluate+0x27b>
mov    0x30(%rbp),%rax
movslq -0x54(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x58(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  0xe54(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x28(%rbp),%rax
movslq -0x54(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x50(%rbp),%rax
movslq -0x54(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x38(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  0xe05(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x30(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
call   1030 <smoothedHeaviside@plt>
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1378 <darcySharpInterfaceFlowEvaluate+0x268>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12e0 <darcySharpInterfaceFlowEvaluate+0x1d0>
mov    -0x58(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jne    128e <darcySharpInterfaceFlowEvaluate+0x17e>
movsd  -0x10(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
subsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x18(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0x60(%rbp),%ecx
mov    -0x58(%rbp),%edx
imul   -0x8(%rbp),%edx
add    %edx,%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    12b0 <darcySharpInterfaceFlowEvaluate+0x1a0>
mov    0x18(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0x60(%rbp),%ecx
mov    -0x58(%rbp),%edx
imul   -0x8(%rbp),%edx
add    %edx,%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x40(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0x60(%rbp),%ecx
mov    -0x58(%rbp),%edx
imul   -0x8(%rbp),%edx
add    %edx,%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1236 <darcySharpInterfaceFlowEvaluate+0x126>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm5
movsd  -0x10(%rbp),%xmm4
mulsd  -0x18(%rbp),%xmm4
movq   %xmm4,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x58(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x48(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1223 <darcySharpInterfaceFlowEvaluate+0x113>
jmp    137d <darcySharpInterfaceFlowEvaluate+0x26d>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1180 <darcySharpInterfaceFlowEvaluate+0x70>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<darcySharpInterfaceFlowEvaluate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r9,0x68(%rsp)
mov    %rcx,0x60(%rsp)
mov    %rdx,0x70(%rsp)
movsd  %xmm4,0x58(%rsp)
movsd  %xmm0,0x10(%rsp)
test   %edi,%edi
jle    13ec <darcySharpInterfaceFlowEvaluate+0x2dc>
mov    %esi,%r12d
mov    0xe0(%rsp),%r13
mov    0xb8(%rsp),%r15
mov    %esi,%eax
imul   %eax,%eax
mov    %rax,0x18(%rsp)
movapd %xmm2,%xmm4
movsd  0x10(%rsp),%xmm0
subsd  %xmm0,%xmm4
movsd  %xmm4,0x38(%rsp)
mulsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm3
movsd  %xmm1,0x40(%rsp)
subsd  %xmm1,%xmm3
movsd  %xmm3,0x48(%rsp)
movslq %esi,%r8
mov    %edi,%eax
mov    %rax,0x50(%rsp)
mov    %r8d,%edx
mov    %edx,%r14d
and    $0xfffffffe,%r14d
mov    $0x1,%eax
mov    %rax,0x8(%rsp)
xor    %ecx,%ecx
mov    %r8,0x30(%rsp)
mov    %rdx,0x28(%rsp)
jmp    11e3 <darcySharpInterfaceFlowEvaluate+0xd3>
cs nopw 0x0(%rax,%rax,1)
mov    0x20(%rsp),%rcx
add    $0x1,%rcx
mov    0x8(%rsp),%rax
add    0x18(%rsp),%rax
mov    %rax,0x8(%rsp)
cmp    0x50(%rsp),%rcx
je     13ec <darcySharpInterfaceFlowEvaluate+0x2dc>
mov    0xd0(%rsp),%rax
movq   $0x0,(%rax,%rcx,8)
mov    0xf8(%rsp),%rax
movabs $0x3ff0000000000000,%rdx
mov    %rdx,(%rax,%rcx,8)
mov    0xc8(%rsp),%rax
movq   $0x0,(%rax,%rcx,8)
mov    0xf0(%rsp),%rax
movq   $0x0,(%rax,%rcx,8)
mov    0x60(%rsp),%rax
movsd  (%rax,%rcx,8),%xmm0
mov    0xb0(%rsp),%rax
movsd  %xmm0,(%rax,%rcx,8)
mov    0xd8(%rsp),%rax
mov    %rdx,(%rax,%rcx,8)
mov    0x68(%rsp),%rax
mov    %rcx,0x20(%rsp)
movsd  (%rax,%rcx,8),%xmm1
movsd  0x58(%rsp),%xmm0
call   1030 <smoothedHeaviside@plt>
mov    0x28(%rsp),%rdx
mov    0x30(%rsp),%r8
test   %r12d,%r12d
jle    11c0 <darcySharpInterfaceFlowEvaluate+0xb0>
mov    0x20(%rsp),%r9
mov    %r9,%rbp
imul   0x18(%rsp),%rbp
movsd  0x48(%rsp),%xmm1
mulsd  %xmm0,%xmm1
mulsd  0x38(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
addsd  0x40(%rsp),%xmm1
imul   %r8,%r9
mov    0x8(%rsp),%r10
xor    %esi,%esi
jmp    1301 <darcySharpInterfaceFlowEvaluate+0x1f1>
movsd  %xmm0,(%r15,%r11,8)
add    %rbx,%rdi
movq   $0x0,0x0(%r13,%rdi,8)
mov    0x70(%rsp),%rax
movsd  (%rax,%rsi,8),%xmm2
mulsd  %xmm1,%xmm2
lea    (%rsi,%r9,1),%rax
mov    0xc0(%rsp),%rcx
movsd  %xmm2,(%rcx,%rax,8)
mov    0xe8(%rsp),%rcx
movq   $0x0,(%rcx,%rax,8)
add    $0x1,%rsi
add    %r8,%r10
cmp    %rdx,%rsi
je     11c0 <darcySharpInterfaceFlowEvaluate+0xb0>
mov    %rsi,%rdi
imul   %r8,%rdi
add    %rbp,%rdi
lea    (%rdi,%rsi,1),%r11
cmp    $0x1,%r12d
jne    1330 <darcySharpInterfaceFlowEvaluate+0x220>
xor    %ebx,%ebx
test   $0x1,%dl
je     12c2 <darcySharpInterfaceFlowEvaluate+0x1b2>
jmp    13d3 <darcySharpInterfaceFlowEvaluate+0x2c3>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r12d,%r8d
mov    %r9,%r12
mov    %rbp,%r9
mov    %r10,%rbp
xor    %eax,%eax
jmp    1366 <darcySharpInterfaceFlowEvaluate+0x256>
mov    %rbx,%rcx
or     $0x1,%rcx
movsd  %xmm0,(%r15,%r11,8)
add    %rdi,%rcx
movq   $0x0,0x0(%r13,%rcx,8)
add    $0x2,%rbp
add    $0x1,%rax
cmp    %r14,%rax
je     13b0 <darcySharpInterfaceFlowEvaluate+0x2a0>
mov    %rax,%rbx
cmp    %rax,%rsi
jne    1380 <darcySharpInterfaceFlowEvaluate+0x270>
movsd  %xmm0,(%r15,%r11,8)
lea    -0x1(%rbp),%rax
jmp    138d <darcySharpInterfaceFlowEvaluate+0x27d>
nopw   0x0(%rax,%rax,1)
lea    (%rdi,%rbx,1),%rax
movq   $0x0,-0x8(%r15,%rbp,8)
movq   $0x0,0x0(%r13,%rax,8)
lea    0x1(%rbx),%rax
cmp    %rax,%rsi
je     1340 <darcySharpInterfaceFlowEvaluate+0x230>
movq   $0x0,(%r15,%rbp,8)
mov    %rbp,%rcx
jmp    1350 <darcySharpInterfaceFlowEvaluate+0x240>
nopl   0x0(%rax)
add    $0x2,%rbx
mov    %r8d,%eax
mov    0x30(%rsp),%r8
mov    %r9,%rbp
mov    0x28(%rsp),%rdx
mov    %r12,%r9
mov    %eax,%r12d
test   $0x1,%dl
je     12c2 <darcySharpInterfaceFlowEvaluate+0x1b2>
cmp    %rbx,%rsi
je     12b0 <darcySharpInterfaceFlowEvaluate+0x1a0>
add    %rbx,%rdi
movq   $0x0,(%r15,%rdi,8)
jmp    12b9 <darcySharpInterfaceFlowEvaluate+0x1a9>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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