double get_height(double px, double py, double trans[3][4],
                  double boundary[3][2]) {
  double x, x0, x1, x2;
  double y, y0, y1, y2;
  double d, m00, m01, m10, m11;
  double rx, ry;
  x = boundary[0][0];
  y = boundary[1][0];
  x0 = trans[0][0] * x + trans[0][1] * y + trans[0][3];
  y0 = trans[1][0] * x + trans[1][1] * y + trans[1][3];
  x = boundary[0][1];
  y = boundary[1][0];
  x1 = trans[0][0] * x + trans[0][1] * y + trans[0][3];
  y1 = trans[1][0] * x + trans[1][1] * y + trans[1][3];
  x = boundary[0][0];
  y = boundary[1][1];
  x2 = trans[0][0] * x + trans[0][1] * y + trans[0][3];
  y2 = trans[1][0] * x + trans[1][1] * y + trans[1][3];
  x1 -= x0;
  y1 -= y0;
  x2 -= x0;
  y2 -= y0;
  x0 = px - x0;
  y0 = py - y0;
  d = x1 * y2 - x2 * y1;
  if (d == 0.0)
    return 0.0;
  m00 = y2 / d;
  m01 = -x2 / d;
  m10 = -y1 / d;
  m11 = x1 / d;
  rx = m00 * x0 + m01 * y0;
  ry = m10 * x0 + m11 * y0;
  if (rx >= 0.0 && rx <= 1.0 && ry >= 0.0 && ry <= 1.0) {
    return trans[2][3] + boundary[2][1];
  }
  return 0.0;
}


x86 assembly (clang, -O0):
<get_height>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x30(%rbp),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  -0x30(%rbp),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x28(%rax),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  0x38(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x30(%rbp),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  -0x30(%rbp),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x28(%rax),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  0x38(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x30(%rbp),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  -0x30(%rbp),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x28(%rax),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  0x38(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    135c <get_height+0x25c>
jp     135c <get_height+0x25c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1494 <get_height+0x394>
movsd  -0x68(%rbp),%xmm0
divsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x60(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
divsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x38(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     148c <get_height+0x38c>
movsd  0xbc9(%rip),%xmm0
ucomisd -0x98(%rbp),%xmm0
ff
jb     148c <get_height+0x38c>
movsd  -0xa0(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     148c <get_height+0x38c>
movsd  0xb9e(%rip),%xmm0
ucomisd -0xa0(%rbp),%xmm0
ff
jb     148c <get_height+0x38c>
mov    -0x20(%rbp),%rax
movsd  0x58(%rax),%xmm0
mov    -0x28(%rbp),%rax
addsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1494 <get_height+0x394>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_height>:
movsd  (%rdi),%xmm11
movsd  0x8(%rdi),%xmm8
movupd (%rsi),%xmm10
movupd 0x10(%rsi),%xmm6
movapd %xmm6,%xmm5
mulsd  %xmm8,%xmm5
movsd  0x18(%rdi),%xmm7
movsd  0x20(%rdi),%xmm2
movsd  0x38(%rdi),%xmm9
movapd %xmm11,%xmm3
unpcklpd %xmm11,%xmm3
unpcklpd %xmm5,%xmm5
mulpd  %xmm10,%xmm3
addpd  %xmm5,%xmm3
movsd  0x28(%rdi),%xmm4
unpcklpd %xmm4,%xmm4
mulpd  %xmm6,%xmm4
unpckhpd %xmm6,%xmm6
mulsd  %xmm8,%xmm6
mulsd  %xmm10,%xmm11
addsd  %xmm6,%xmm11
addsd  %xmm7,%xmm11
unpcklpd %xmm7,%xmm7
addpd  %xmm3,%xmm7
movapd %xmm10,%xmm5
unpckhpd %xmm10,%xmm5
mulsd  %xmm2,%xmm5
addsd  %xmm4,%xmm5
addsd  %xmm9,%xmm5
mulsd  %xmm10,%xmm2
unpcklpd %xmm2,%xmm2
addpd  %xmm4,%xmm2
unpcklpd %xmm9,%xmm9
addpd  %xmm2,%xmm9
movapd %xmm7,%xmm6
unpckhpd %xmm7,%xmm6
subpd  %xmm7,%xmm6
subsd  %xmm9,%xmm5
subsd  %xmm7,%xmm11
movapd %xmm9,%xmm2
unpckhpd %xmm9,%xmm2
subpd  %xmm9,%xmm2
movapd %xmm5,%xmm4
mulsd  %xmm11,%xmm4
movapd %xmm6,%xmm3
mulsd  %xmm2,%xmm3
subsd  %xmm4,%xmm3
xorpd  %xmm8,%xmm8
ucomisd %xmm8,%xmm3
jne    11ee <get_height+0xee>
jp     11ee <get_height+0xee>
movapd %xmm8,%xmm0
ret
xorpd  0xe09(%rip),%xmm11
subsd  %xmm7,%xmm0
subsd  %xmm9,%xmm1
xorpd  0xdf8(%rip),%xmm5
unpcklpd %xmm2,%xmm5
unpcklpd %xmm3,%xmm3
divpd  %xmm3,%xmm5
unpcklpd %xmm11,%xmm6
divpd  %xmm3,%xmm6
unpcklpd %xmm1,%xmm1
mulpd  %xmm6,%xmm1
unpcklpd %xmm0,%xmm0
mulpd  %xmm5,%xmm0
addpd  %xmm1,%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
xorpd  %xmm8,%xmm8
ucomisd %xmm8,%xmm1
jb     11e8 <get_height+0xe8>
movapd %xmm0,%xmm1
cmplepd 0xdbe(%rip),%xmm1
movmskpd %xmm1,%eax
mov    %eax,%ecx
shr    %cl
je     11e8 <get_height+0xe8>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11e8 <get_height+0xe8>
test   $0x1,%al
je     11e8 <get_height+0xe8>
movsd  0x58(%rdi),%xmm8
addsd  0x28(%rsi),%xmm8
movapd %xmm8,%xmm0
ret

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

LLVM IR (-O2):
define double @get_height(double %0, double %1, [4 x double]* nocapture %2, [2 x double]* nocapture %3) {
%5 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 1, i64 0
%6 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%7 = load double, double* %6
%8 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 1
%9 = load double, double* %8
%10 = bitcast double* %5 to <2 x double>*
%11 = load <2 x double>, <2 x double>* %10
%12 = extractelement <2 x double> %11, i64 0
%13 = fmul double %12, %9
%14 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 3
%15 = load double, double* %14
%16 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 1, i64 0
%17 = load double, double* %16
%18 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 1, i64 1
%19 = load double, double* %18
%20 = bitcast [2 x double]* %3 to <2 x double>*
%21 = load <2 x double>, <2 x double>* %20
%22 = extractelement <2 x double> %21, i64 0
%23 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 1, i64 3
%24 = load double, double* %23
%25 = insertelement <2 x double> poison, double %7, i64 0
%26 = shufflevector <2 x double> %25, <2 x double> poison, <2 x i32> zeroinitializer
%27 = insertelement <2 x double> poison, double %13, i64 0
%28 = shufflevector <2 x double> %27, <2 x double> poison, <2 x i32> zeroinitializer
%29 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %26, <2 x double> %21, <2 x double> %28)
%30 = insertelement <2 x double> poison, double %15, i64 0
%31 = shufflevector <2 x double> %30, <2 x double> poison, <2 x i32> zeroinitializer
%32 = fadd <2 x double> %31, %29
%33 = extractelement <2 x double> %21, i64 1
%34 = insertelement <2 x double> poison, double %19, i64 0
%35 = shufflevector <2 x double> %34, <2 x double> poison, <2 x i32> zeroinitializer
%36 = fmul <2 x double> %11, %35
%37 = extractelement <2 x double> %36, i64 0
%38 = tail call double @llvm.fmuladd.f64(double %17, double %33, double %37)
%39 = fadd double %24, %38
%40 = extractelement <2 x double> %11, i64 1
%41 = fmul double %9, %40
%42 = tail call double @llvm.fmuladd.f64(double %7, double %22, double %41)
%43 = fadd double %15, %42
%44 = insertelement <2 x double> poison, double %17, i64 0
%45 = shufflevector <2 x double> %44, <2 x double> poison, <2 x i32> zeroinitializer
%46 = shufflevector <2 x double> %21, <2 x double> undef, <2 x i32> zeroinitializer
%47 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %45, <2 x double> %46, <2 x double> %36)
%48 = insertelement <2 x double> poison, double %24, i64 0
%49 = shufflevector <2 x double> %48, <2 x double> poison, <2 x i32> zeroinitializer
%50 = fadd <2 x double> %49, %47
%51 = extractelement <2 x double> %32, i64 0
%52 = shufflevector <2 x double> %32, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%53 = fsub <2 x double> %52, %32
%54 = extractelement <2 x double> %53, i64 0
%55 = extractelement <2 x double> %50, i64 0
%56 = fsub double %39, %55
%57 = fsub double %43, %51
%58 = shufflevector <2 x double> %50, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%59 = fsub <2 x double> %58, %50
%60 = extractelement <2 x double> %59, i64 0
%61 = fneg double %57
%62 = fmul double %56, %61
%63 = tail call double @llvm.fmuladd.f64(double %54, double %60, double %62)
%64 = fcmp oeq double %63, 0.000000e+00
br i1 %64, label %98, label %65
65: ; preds = %4
%66 = fsub double %0, %51
%67 = fsub double %1, %55
%68 = fneg double %56
%69 = insertelement <2 x double> poison, double %68, i64 0
%70 = shufflevector <2 x double> %69, <2 x double> %59, <2 x i32> <i32 0, i32 2>
%71 = insertelement <2 x double> poison, double %63, i64 0
%72 = shufflevector <2 x double> %71, <2 x double> poison, <2 x i32> zeroinitializer
%73 = fdiv <2 x double> %70, %72
%74 = insertelement <2 x double> %53, double %61, i64 1
%75 = fdiv <2 x double> %74, %72
%76 = insertelement <2 x double> poison, double %67, i64 0
%77 = shufflevector <2 x double> %76, <2 x double> poison, <2 x i32> zeroinitializer
%78 = fmul <2 x double> %77, %75
%79 = insertelement <2 x double> poison, double %66, i64 0
%80 = shufflevector <2 x double> %79, <2 x double> poison, <2 x i32> zeroinitializer
%81 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %73, <2 x double> %80, <2 x double> %78)
%82 = extractelement <2 x double> %81, i64 1
%83 = fcmp oge double %82, 0.000000e+00
%84 = fcmp ole <2 x double> %81, <double 1.000000e+00, double 1.000000e+00>
%85 = extractelement <2 x i1> %84, i64 1
%86 = and i1 %83, %85
%87 = extractelement <2 x double> %81, i64 0
%88 = fcmp oge double %87, 0.000000e+00
%89 = select i1 %86, i1 %88, i1 false
%90 = extractelement <2 x i1> %84, i64 0
%91 = select i1 %89, i1 %90, i1 false
br i1 %91, label %92, label %98
92: ; preds = %65
%93 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 2, i64 3
%94 = load double, double* %93
%95 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 2, i64 1
%96 = load double, double* %95
%97 = fadd double %94, %96
br label %98
98: ; preds = %65, %4, %92
%99 = phi double [ %97, %92 ], [ 0.000000e+00, %4 ], [ 0.000000e+00, %65 ]
ret double %99
}