#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 volTriangle2D(double *, double *, double *);
void volumeRange2D(double *range, const double *yc, const double *m,
                   const int n) {
  double yA[2], yB[2], yC[2], yD[2], yM[2];
  double vol, mini = 10000.0, maxi = 0.0;
  int i1, i2, r, id, idn, comp;
  const int m1 = m[0], m2 = m[1];
  const int nn = (m1 + 1) * (m2 + 1);
  const int inc_x = 1;
  const int inc_y = m1 + 1;
  const double *ptr;
  for (i1 = 0; i1 < m1; i1++) {
    for (i2 = 0; i2 < m2; i2++) {
      idn = i1 + i2 * inc_y;
      comp = 0;
      for (r = 0; r < 2; r++) {
        ptr = yc + idn + comp;
        yA[r] = *ptr;
        ptr = ptr + inc_x;
        yB[r] = *ptr;
        ptr = ptr + inc_y;
        yD[r] = *ptr;
        ptr = ptr - inc_x;
        yC[r] = *ptr;
        yM[r] = 0.25 * (yA[r] + yB[r] + yC[r] + yD[r]);
        comp += nn;
      }
      vol = volTriangle2D(yA, yB, yM);
      if (mini > vol) {
        mini = vol;
      }
      if (maxi < vol) {
        maxi = vol;
      }
      vol = volTriangle2D(yB, yD, yM);
      if (mini > vol) {
        mini = vol;
      }
      if (maxi < vol) {
        maxi = vol;
      }
      vol = volTriangle2D(yD, yC, yM);
      if (mini > vol) {
        mini = vol;
      }
      if (maxi < vol) {
        maxi = vol;
      }
      vol = volTriangle2D(yC, yA, yM);
      if (mini > vol) {
        mini = vol;
      }
      if (maxi < vol) {
        maxi = vol;
      }
    }
  }
  *range = mini;
  range++;
  *range = maxi;
  return;
}


x86 assembly (clang, -O0):
<volumeRange2D>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movsd  0xece(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x18(%rbp),%rax
cvttsd2si (%rax),%eax
mov    %eax,-0xa4(%rbp)
mov    -0x18(%rbp),%rax
cvttsd2si 0x8(%rax),%eax
mov    %eax,-0xa8(%rbp)
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    -0xa8(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    %eax,-0xac(%rbp)
movl   $0x1,-0xb0(%rbp)
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
movl   $0x0,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
cmp    -0xa4(%rbp),%eax
jge    14c3 <volumeRange2D+0x3b3>
movl   $0x0,-0x90(%rbp)
mov    -0x90(%rbp),%eax
cmp    -0xa8(%rbp),%eax
jge    14aa <volumeRange2D+0x39a>
mov    -0x8c(%rbp),%eax
mov    -0x90(%rbp),%ecx
imul   -0xb4(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x9c(%rbp)
movl   $0x0,-0xa0(%rbp)
movl   $0x0,-0x94(%rbp)
cmpl   $0x2,-0x94(%rbp)
jge    1341 <volumeRange2D+0x231>
mov    -0x10(%rbp),%rax
movslq -0x9c(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0xa0(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xc0(%rbp)
mov    -0xc0(%rbp),%rax
movsd  (%rax),%xmm0
movslq -0x94(%rbp),%rax
movsd  %xmm0,-0x30(%rbp,%rax,8)
mov    -0xc0(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0xc0(%rbp)
mov    -0xc0(%rbp),%rax
movsd  (%rax),%xmm0
movslq -0x94(%rbp),%rax
movsd  %xmm0,-0x40(%rbp,%rax,8)
mov    -0xc0(%rbp),%rax
movslq -0xb4(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xc0(%rbp)
mov    -0xc0(%rbp),%rax
movsd  (%rax),%xmm0
movslq -0x94(%rbp),%rax
movsd  %xmm0,-0x60(%rbp,%rax,8)
mov    -0xc0(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0xc0(%rbp)
mov    -0xc0(%rbp),%rax
movsd  (%rax),%xmm0
movslq -0x94(%rbp),%rax
movsd  %xmm0,-0x50(%rbp,%rax,8)
movslq -0x94(%rbp),%rax
movsd  -0x30(%rbp,%rax,8),%xmm1
movslq -0x94(%rbp),%rax
addsd  -0x40(%rbp,%rax,8),%xmm1
movslq -0x94(%rbp),%rax
addsd  -0x50(%rbp,%rax,8),%xmm1
movslq -0x94(%rbp),%rax
addsd  -0x60(%rbp,%rax,8),%xmm1
movsd  0xcfe(%rip),%xmm0
mulsd  %xmm1,%xmm0
movslq -0x94(%rbp),%rax
movsd  %xmm0,-0x70(%rbp,%rax,8)
mov    -0xac(%rbp),%eax
add    -0xa0(%rbp),%eax
mov    %eax,-0xa0(%rbp)
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    11fa <volumeRange2D+0xea>
lea    -0x30(%rbp),%rdi
lea    -0x40(%rbp),%rsi
lea    -0x70(%rbp),%rdx
call   1030 <volTriangle2D@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x80(%rbp),%xmm0
ucomisd -0x78(%rbp),%xmm0
jbe    1371 <volumeRange2D+0x261>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x78(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1395 <volumeRange2D+0x285>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
lea    -0x40(%rbp),%rdi
lea    -0x60(%rbp),%rsi
lea    -0x70(%rbp),%rdx
call   1030 <volTriangle2D@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x80(%rbp),%xmm0
ucomisd -0x78(%rbp),%xmm0
jbe    13c5 <volumeRange2D+0x2b5>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x78(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    13e9 <volumeRange2D+0x2d9>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
lea    -0x60(%rbp),%rdi
lea    -0x50(%rbp),%rsi
lea    -0x70(%rbp),%rdx
call   1030 <volTriangle2D@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x80(%rbp),%xmm0
ucomisd -0x78(%rbp),%xmm0
jbe    1419 <volumeRange2D+0x309>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x78(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    143d <volumeRange2D+0x32d>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
lea    -0x50(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x70(%rbp),%rdx
call   1030 <volTriangle2D@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x80(%rbp),%xmm0
ucomisd -0x78(%rbp),%xmm0
jbe    146d <volumeRange2D+0x35d>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x78(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1491 <volumeRange2D+0x381>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    1496 <volumeRange2D+0x386>
mov    -0x90(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
jmp    11b9 <volumeRange2D+0xa9>
jmp    14af <volumeRange2D+0x39f>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    119d <volumeRange2D+0x8d>
movsd  -0x80(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<volumeRange2D>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %rdi,0x18(%rsp)
cvttsd2si (%rdx),%eax
test   %eax,%eax
jle    1333 <volumeRange2D+0x223>
mov    %rsi,%r12
cvttsd2si 0x8(%rdx),%esi
lea    0x1(%rax),%ecx
lea    0x1(%rsi),%edx
imul   %ecx,%edx
mov    %ecx,%edi
movslq %edx,%r15
mov    %eax,%eax
mov    %rax,0x20(%rsp)
mov    %rsi,0x28(%rsp)
mov    %esi,%ebp
xorpd  %xmm0,%xmm0
movsd  0xe9e(%rip),%xmm1
xor    %ecx,%ecx
movapd 0xea3(%rip),%xmm8
mov    %rbp,0x38(%rsp)
mov    %rdi,0x30(%rsp)
jmp    118f <volumeRange2D+0x7f>
nopl   0x0(%rax)
add    $0x1,%rcx
cmp    0x20(%rsp),%rcx
je     133f <volumeRange2D+0x22f>
cmpl   $0x0,0x28(%rsp)
jle    1180 <volumeRange2D+0x70>
xor    %r14d,%r14d
mov    %rcx,0x40(%rsp)
xchg   %ax,%ax
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
mov    %r14,%rax
imul   %rdi,%rax
add    %rcx,%rax
lea    (%r12,%rax,8),%rcx
movsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,0x80(%rsp)
movsd  0x8(%r12,%rax,8),%xmm1
movsd  %xmm1,0x70(%rsp)
movsd  0x8(%rcx,%rdi,8),%xmm2
movsd  %xmm2,0x50(%rsp)
movsd  (%rcx,%rdi,8),%xmm3
movsd  %xmm3,0x60(%rsp)
lea    (%rcx,%r15,8),%rax
movsd  (%rcx,%r15,8),%xmm4
movsd  %xmm4,0x88(%rsp)
movsd  0x8(%rcx,%r15,8),%xmm5
movsd  %xmm5,0x78(%rsp)
movsd  0x8(%rax,%rdi,8),%xmm6
movsd  %xmm6,0x58(%rsp)
movsd  (%rax,%rdi,8),%xmm7
movsd  %xmm7,0x68(%rsp)
unpcklpd %xmm4,%xmm0
unpcklpd %xmm5,%xmm1
addpd  %xmm0,%xmm1
unpcklpd %xmm7,%xmm3
addpd  %xmm1,%xmm3
unpcklpd %xmm6,%xmm2
addpd  %xmm3,%xmm2
mulpd  %xmm8,%xmm2
movapd %xmm2,0x90(%rsp)
lea    0x80(%rsp),%rbx
mov    %rbx,%rdi
lea    0x70(%rsp),%rbp
mov    %rbp,%rsi
lea    0x90(%rsp),%r13
mov    %r13,%rdx
call   1030 <volTriangle2D@plt>
movapd %xmm0,%xmm1
minsd  0x8(%rsp),%xmm1
movsd  %xmm1,0x8(%rsp)
maxsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    %rbp,%rdi
lea    0x50(%rsp),%rbp
mov    %rbp,%rsi
mov    %r13,%rdx
call   1030 <volTriangle2D@plt>
movapd %xmm0,%xmm1
minsd  0x8(%rsp),%xmm1
movsd  %xmm1,0x48(%rsp)
maxsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %rbp,%rdi
lea    0x60(%rsp),%rbp
mov    %rbp,%rsi
mov    %r13,%rdx
call   1030 <volTriangle2D@plt>
movapd %xmm0,%xmm1
minsd  0x48(%rsp),%xmm1
movsd  %xmm1,0x10(%rsp)
maxsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
call   1030 <volTriangle2D@plt>
mov    0x30(%rsp),%rdi
movapd 0xd09(%rip),%xmm8
mov    0x40(%rsp),%rcx
mov    0x38(%rsp),%rbp
movapd %xmm0,%xmm1
minsd  0x10(%rsp),%xmm1
maxsd  0x8(%rsp),%xmm0
add    $0x1,%r14
cmp    %rbp,%r14
jne    11a0 <volumeRange2D+0x90>
jmp    1180 <volumeRange2D+0x70>
movsd  0xcc5(%rip),%xmm1
xorpd  %xmm0,%xmm0
mov    0x18(%rsp),%rax
movsd  %xmm1,(%rax)
movsd  %xmm0,0x8(%rax)
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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