#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 fmax(double, int /*<<< orphan*/);
int /*<<< orphan*/ fmin(double, double const);
void TwophaseStokes_VOF_SO_2D_Evaluate(
    const int nPoints, const double eps, const double rho_0, const double nu_0,
    const double rho_1, const double nu_1, const double *g, const double *vof,
    const double *p, const double *grad_p, const double *u, const double *v,
    double *mom_u_acc, double *dmom_u_acc_u, double *mom_v_acc,
    double *dmom_v_acc_v, double *mass_adv, double *dmass_adv_u,
    double *dmass_adv_v, double *mom_u_diff_ten, double *mom_v_diff_ten,
    double *mom_u_source, double *mom_v_source, double *mom_u_ham,
    double *dmom_u_ham_grad_p, double *mom_v_ham, double *dmom_v_ham_grad_p) {
  int k;
  double rho, nu, H;
  for (k = 0; k < nPoints; k++) {
    H = fmax(0.0, fmin(1.0, vof[k]));
    rho = rho_0 * (1.0 - H) + rho_1 * H;
    nu = nu_0 * (1.0 - H) + nu_1 * H;
    mom_u_acc[k] = u[k];
    dmom_u_acc_u[k] = 1.0;
    mom_v_acc[k] = v[k];
    dmom_v_acc_v[k] = 1.0;
    mass_adv[k * 2 + 0] = u[k];
    mass_adv[k * 2 + 1] = v[k];
    dmass_adv_u[k * 2 + 0] = 1.0;
    dmass_adv_v[k * 2 + 1] = 1.0;
    mom_u_diff_ten[k * 4 + 0] = nu;
    mom_u_diff_ten[k * 4 + 3] = nu;
    mom_v_diff_ten[k * 4 + 0] = nu;
    mom_v_diff_ten[k * 4 + 3] = nu;
    mom_u_source[k] = -g[0];
    mom_v_source[k] = -g[1];
    mom_u_ham[k] = grad_p[k * 2 + 0] / rho;
    dmom_u_ham_grad_p[k * 2 + 0] = 1.0 / rho;
    mom_v_ham[k] = grad_p[k * 2 + 1] / rho;
    dmom_v_ham_grad_p[k * 2 + 1] = 1.0 / rho;
  }
}


x86 assembly (clang, -O0):
<TwophaseStokes_VOF_SO_2D_Evaluate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x88(%rbp),%rax
mov    0x80(%rbp),%rax
mov    0x78(%rbp),%rax
mov    0x70(%rbp),%rax
mov    0x68(%rbp),%rax
mov    0x60(%rbp),%rax
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)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x48(%rbp)
mov    %r8,-0x50(%rbp)
mov    %r9,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1472 <TwophaseStokes_VOF_SO_2D_Evaluate+0x352>
mov    -0x40(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xe37(%rip),%xmm0
call   1030 <fmin@plt>
mov    %eax,%edi
xorps  %xmm0,%xmm0
call   1040 <fmax@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe16(%rip),%xmm2
subsd  -0x78(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xded(%rip),%xmm2
subsd  -0x78(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x20(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  0xda7(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x30(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  0xd78(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x38(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x38(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x40(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  0xd17(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x48(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xcfa(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    0x50(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    0x50(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    0x58(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    0x58(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    0x60(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    0x68(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x68(%rbp),%xmm0
mov    0x70(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xc05(%rip),%xmm0
divsd  -0x68(%rbp),%xmm0
mov    0x78(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x68(%rbp),%xmm0
mov    0x80(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xbb9(%rip),%xmm0
divsd  -0x68(%rbp),%xmm0
mov    0x88(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    11a8 <TwophaseStokes_VOF_SO_2D_Evaluate+0x88>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TwophaseStokes_VOF_SO_2D_Evaluate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
test   %edi,%edi
jle    131f <TwophaseStokes_VOF_SO_2D_Evaluate+0x1ff>
mov    %r9,%r14
mov    %r8,%r12
mov    %rdx,%rbp
mov    %rsi,%rbx
mov    %edi,%eax
shl    $0x2,%rax
mov    %rax,(%rsp)
xor    %r15d,%r15d
movabs $0x3ff0000000000000,%r13
movsd  %xmm4,0x20(%rsp)
movsd  %xmm3,0x18(%rsp)
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x0(%rbp,%r15,2),%xmm1
movsd  0xe71(%rip),%xmm0
call   1030 <fmin@plt>
xorpd  %xmm0,%xmm0
mov    %eax,%edi
call   1040 <fmax@plt>
movsd  0x8(%rsp),%xmm7
movsd  0x10(%rsp),%xmm2
movsd  0x18(%rsp),%xmm3
movsd  0x20(%rsp),%xmm4
movsd  0xe40(%rip),%xmm8
movapd %xmm8,%xmm6
subsd  %xmm0,%xmm6
movapd %xmm0,%xmm5
mulsd  %xmm6,%xmm7
mulsd  %xmm4,%xmm0
mulsd  %xmm2,%xmm6
addsd  %xmm0,%xmm6
movsd  (%r14,%r15,2),%xmm0
mov    0x68(%rsp),%rax
movsd  %xmm0,(%rax,%r15,2)
mov    0x70(%rsp),%rax
mov    %r13,(%rax,%r15,2)
mov    0x60(%rsp),%rcx
movsd  (%rcx,%r15,2),%xmm0
mov    0x78(%rsp),%rax
movsd  %xmm0,(%rax,%r15,2)
mov    0x80(%rsp),%rax
mov    %r13,(%rax,%r15,2)
movsd  (%r14,%r15,2),%xmm0
mov    0x88(%rsp),%rax
movsd  %xmm0,(%rax,%r15,4)
movsd  (%rcx,%r15,2),%xmm0
movsd  %xmm0,0x8(%rax,%r15,4)
mov    0x90(%rsp),%rax
mov    %r13,(%rax,%r15,4)
mov    0x98(%rsp),%rax
mov    %r13,0x8(%rax,%r15,4)
mov    %r15d,%eax
shl    $0x3,%rax
mov    0xa0(%rsp),%rsi
movsd  %xmm6,(%rsi,%rax,1)
lea    0x3(%r15),%ecx
movsd  %xmm6,(%rsi,%rcx,8)
mov    0xa8(%rsp),%rsi
movsd  %xmm6,(%rsi,%rax,1)
movsd  %xmm6,(%rsi,%rcx,8)
mulsd  %xmm3,%xmm5
addsd  %xmm5,%xmm7
movsd  (%rbx),%xmm0
movaps 0xd7b(%rip),%xmm5
xorps  %xmm5,%xmm0
mov    0xb0(%rsp),%rax
movlps %xmm0,(%rax,%r15,2)
movsd  0x8(%rbx),%xmm0
xorps  %xmm5,%xmm0
mov    0xb8(%rsp),%rax
movlps %xmm0,(%rax,%r15,2)
movsd  (%r12,%r15,4),%xmm0
divsd  %xmm7,%xmm0
mov    0xc0(%rsp),%rax
movsd  %xmm0,(%rax,%r15,2)
movapd %xmm8,%xmm0
divsd  %xmm7,%xmm0
mov    0xc8(%rsp),%rax
movsd  %xmm0,(%rax,%r15,4)
movsd  0x8(%r12,%r15,4),%xmm5
divsd  %xmm7,%xmm5
mov    0xd0(%rsp),%rax
movsd  %xmm5,(%rax,%r15,2)
mov    0xd8(%rsp),%rax
movsd  %xmm0,0x8(%rax,%r15,4)
add    $0x4,%r15
cmp    %r15,(%rsp)
jne    1180 <TwophaseStokes_VOF_SO_2D_Evaluate+0x60>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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