#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 */
scalar_t__ fabs(double);
double sqrt(double);
void PolygonD_QuadForPlane(double *outpoints, double planenormalx,
                           double planenormaly, double planenormalz,
                           double planedist, double quadsize) {
  double d, quadright[3], quadup[3];
  if (fabs(planenormalz) > fabs(planenormalx) &&
      fabs(planenormalz) > fabs(planenormaly)) {
    quadup[0] = 1;
    quadup[1] = 0;
    quadup[2] = 0;
  } else {
    quadup[0] = 0;
    quadup[1] = 0;
    quadup[2] = 1;
  }
  d = -(quadup[0] * planenormalx + quadup[1] * planenormaly +
        quadup[2] * planenormalz);
  quadup[0] += d * planenormalx;
  quadup[1] += d * planenormaly;
  quadup[2] += d * planenormalz;
  d = 1.0 / sqrt(quadup[0] * quadup[0] + quadup[1] * quadup[1] +
                 quadup[2] * quadup[2]);
  quadup[0] *= d;
  quadup[1] *= d;
  quadup[2] *= d;
  quadright[0] = quadup[1] * planenormalz - quadup[2] * planenormaly;
  quadright[1] = quadup[2] * planenormalx - quadup[0] * planenormalz;
  quadright[2] = quadup[0] * planenormaly - quadup[1] * planenormalx;
  outpoints[0] =
      planedist * planenormalx - quadsize * quadright[0] + quadsize * quadup[0];
  outpoints[1] =
      planedist * planenormaly - quadsize * quadright[1] + quadsize * quadup[1];
  outpoints[2] =
      planedist * planenormalz - quadsize * quadright[2] + quadsize * quadup[2];
  outpoints[3] =
      planedist * planenormalx + quadsize * quadright[0] + quadsize * quadup[0];
  outpoints[4] =
      planedist * planenormaly + quadsize * quadright[1] + quadsize * quadup[1];
  outpoints[5] =
      planedist * planenormalz + quadsize * quadright[2] + quadsize * quadup[2];
  outpoints[6] =
      planedist * planenormalx + quadsize * quadright[0] - quadsize * quadup[0];
  outpoints[7] =
      planedist * planenormaly + quadsize * quadright[1] - quadsize * quadup[1];
  outpoints[8] =
      planedist * planenormalz + quadsize * quadright[2] - quadsize * quadup[2];
  outpoints[9] =
      planedist * planenormalx - quadsize * quadright[0] - quadsize * quadup[0];
  outpoints[10] =
      planedist * planenormaly - quadsize * quadright[1] - quadsize * quadup[1];
  outpoints[11] =
      planedist * planenormalz - quadsize * quadright[2] - quadsize * quadup[2];
}


x86 assembly (clang, -O0):
<PolygonD_QuadForPlane>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <fabs@plt>
mov    %rax,-0x78(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <fabs@plt>
mov    %rax,%rcx
mov    -0x78(%rbp),%rax
cmp    %rcx,%rax
jle    11ba <PolygonD_QuadForPlane+0x9a>
movsd  -0x20(%rbp),%xmm0
call   1030 <fabs@plt>
mov    %rax,-0x80(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <fabs@plt>
mov    %rax,%rcx
mov    -0x80(%rbp),%rax
cmp    %rcx,%rax
jle    11ba <PolygonD_QuadForPlane+0x9a>
movsd  0xe60(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    11d7 <PolygonD_QuadForPlane+0xb7>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xe2e(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x70(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x70(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xd4d(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x38(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x38(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x28(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x28(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x28(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x28(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x28(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x28(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0x28(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x38(%rax)
movsd  -0x28(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  -0x28(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x48(%rax)
movsd  -0x28(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x50(%rax)
movsd  -0x28(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x58(%rax)
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PolygonD_QuadForPlane>:
push   %r14
push   %rbx
sub    $0x88,%rsp
movaps %xmm4,0x50(%rsp)
movaps %xmm3,0x40(%rsp)
movapd %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    %rdi,%r14
movaps %xmm2,0x20(%rsp)
movaps %xmm2,%xmm0
call   1030 <fabs@plt>
mov    %rax,%rbx
movdqa (%rsp),%xmm0
call   1030 <fabs@plt>
cmp    %rax,%rbx
jle    118b <PolygonD_QuadForPlane+0x6b>
movaps 0x20(%rsp),%xmm0
call   1030 <fabs@plt>
mov    %rax,%rbx
movdqa 0x10(%rsp),%xmm0
call   1030 <fabs@plt>
cmp    %rax,%rbx
jle    118b <PolygonD_QuadForPlane+0x6b>
movq   0xe7b(%rip),%xmm0
xorpd  %xmm5,%xmm5
jmp    1197 <PolygonD_QuadForPlane+0x77>
pxor   %xmm0,%xmm0
movsd  0xe69(%rip),%xmm5
xorpd  %xmm1,%xmm1
movapd 0x10(%rsp),%xmm4
movapd %xmm4,%xmm2
mulsd  %xmm1,%xmm2
movq   %xmm0,%xmm6
movapd (%rsp),%xmm12
mulsd  %xmm12,%xmm0
addsd  %xmm2,%xmm0
movapd %xmm5,%xmm2
movapd 0x20(%rsp),%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
unpcklpd %xmm2,%xmm0
movapd %xmm12,%xmm11
unpcklpd %xmm4,%xmm11
mulpd  %xmm11,%xmm0
subpd  %xmm0,%xmm6
mulsd  %xmm3,%xmm2
subsd  %xmm2,%xmm5
movapd %xmm6,%xmm0
mulpd  %xmm6,%xmm0
unpckhpd %xmm0,%xmm0
movapd %xmm6,%xmm2
mulsd  %xmm6,%xmm2
addsd  %xmm0,%xmm2
movapd %xmm5,%xmm0
mulsd  %xmm5,%xmm0
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     1221 <PolygonD_QuadForPlane+0x101>
sqrtsd %xmm0,%xmm0
jmp    1252 <PolygonD_QuadForPlane+0x132>
movapd %xmm11,0x70(%rsp)
movsd  %xmm5,0x38(%rsp)
movapd %xmm6,0x60(%rsp)
call   1040 <sqrt@plt>
movapd 0x60(%rsp),%xmm6
movsd  0x38(%rsp),%xmm5
movapd (%rsp),%xmm12
movapd 0x70(%rsp),%xmm11
movapd 0x50(%rsp),%xmm9
movapd 0x40(%rsp),%xmm7
movsd  0xd99(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
unpcklpd %xmm1,%xmm0
mulpd  %xmm6,%xmm0
mulsd  %xmm5,%xmm1
movapd %xmm0,%xmm8
shufpd $0x1,%xmm1,%xmm8
unpcklpd %xmm0,%xmm1
movapd %xmm0,%xmm3
movapd 0x10(%rsp),%xmm10
mulsd  %xmm10,%xmm3
movapd 0x20(%rsp),%xmm2
unpcklpd %xmm2,%xmm10
movapd %xmm10,%xmm5
mulpd  %xmm1,%xmm5
movapd %xmm0,%xmm6
unpckhpd %xmm0,%xmm6
unpcklpd %xmm12,%xmm2
movapd %xmm8,%xmm4
mulpd  %xmm2,%xmm4
subpd  %xmm5,%xmm4
mulsd  %xmm12,%xmm6
subsd  %xmm6,%xmm3
mulsd  %xmm9,%xmm3
unpcklpd %xmm9,%xmm9
mulpd  %xmm9,%xmm4
unpcklpd %xmm7,%xmm7
mulpd  %xmm7,%xmm11
subpd  %xmm4,%xmm11
mulpd  %xmm9,%xmm0
movapd 0xd15(%rip),%xmm5
xorpd  %xmm3,%xmm5
unpcklpd %xmm4,%xmm5
mulpd  %xmm7,%xmm2
addpd  %xmm5,%xmm2
shufpd $0x1,%xmm3,%xmm4
mulpd  %xmm10,%xmm7
addpd  %xmm4,%xmm7
movapd %xmm2,%xmm3
shufpd $0x1,%xmm7,%xmm3
subpd  %xmm0,%xmm3
addpd  %xmm11,%xmm0
movupd %xmm0,(%r14)
mulpd  %xmm9,%xmm1
mulpd  %xmm8,%xmm9
movapd %xmm9,%xmm0
addpd  %xmm7,%xmm0
shufpd $0x1,%xmm11,%xmm7
subpd  %xmm1,%xmm7
addpd  %xmm2,%xmm1
movupd %xmm1,0x10(%r14)
movupd %xmm0,0x20(%r14)
movupd %xmm3,0x30(%r14)
movupd %xmm7,0x40(%r14)
shufpd $0x1,%xmm2,%xmm11
subpd  %xmm9,%xmm11
movupd %xmm11,0x50(%r14)
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @PolygonD_QuadForPlane(double* %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double*
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca [3 x double]
%15 = alloca [3 x double]
store double* %0, double** %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%16 = load double, double* %10
%17 = call i64 @fabs(double %16)
%18 = load double, double* %8
%19 = call i64 @fabs(double %18)
%20 = icmp sgt i64 %17, %19
br i1 %20, label %21, label %31
21: ; preds = %6
%22 = load double, double* %10
%23 = call i64 @fabs(double %22)
%24 = load double, double* %9
%25 = call i64 @fabs(double %24)
%26 = icmp sgt i64 %23, %25
br i1 %26, label %27, label %31
27: ; preds = %21
%28 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
store double 1.000000e+00, double* %28
%29 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 1
store double 0.000000e+00, double* %29
%30 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 2
store double 0.000000e+00, double* %30
br label %35
31: ; preds = %21, %6
%32 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
store double 0.000000e+00, double* %32
%33 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 1
store double 0.000000e+00, double* %33
%34 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 2
store double 1.000000e+00, double* %34
br label %35
35: ; preds = %31, %27
%36 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
%37 = load double, double* %36
%38 = load double, double* %8
%39 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 1
%40 = load double, double* %39
%41 = load double, double* %9
%42 = fmul double %40, %41
%43 = call double @llvm.fmuladd.f64(double %37, double %38, double %42)
%44 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 2
%45 = load double, double* %44
%46 = load double, double* %10
%47 = call double @llvm.fmuladd.f64(double %45, double %46, double %43)
%48 = fneg double %47
store double %48, double* %13
%49 = load double, double* %13
%50 = load double, double* %8
%51 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
%52 = load double, double* %51
%53 = call double @llvm.fmuladd.f64(double %49, double %50, double %52)
store double %53, double* %51
%54 = load double, double* %13
%55 = load double, double* %9
%56 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 1
%57 = load double, double* %56
%58 = call double @llvm.fmuladd.f64(double %54, double %55, double %57)
store double %58, double* %56
%59 = load double, double* %13
%60 = load double, double* %10
%61 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 2
%62 = load double, double* %61
%63 = call double @llvm.fmuladd.f64(double %59, double %60, double %62)
store double %63, double* %61
%64 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
%65 = load double, double* %64
%66 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
%67 = load double, double* %66
%68 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 1
%69 = load double, double* %68
%70 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 1
%71 = load double, double* %70
%72 = fmul double %69, %71
%73 = call double @llvm.fmuladd.f64(double %65, double %67, double %72)
%74 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 2
%75 = load double, double* %74
%76 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 2
%77 = load double, double* %76
%78 = call double @llvm.fmuladd.f64(double %75, double %77, double %73)
%79 = call double @sqrt(double %78)
%80 = fdiv double 1.000000e+00, %79
store double %80, double* %13
%81 = load double, double* %13
%82 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
%83 = load double, double* %82
%84 = fmul double %83, %81
store double %84, double* %82
%85 = load double, double* %13
%86 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 1
%87 = load double, double* %86
%88 = fmul double %87, %85
store double %88, double* %86
%89 = load double, double* %13
%90 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 2
%91 = load double, double* %90
%92 = fmul double %91, %89
store double %92, double* %90
%93 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 1
%94 = load double, double* %93
%95 = load double, double* %10
%96 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 2
%97 = load double, double* %96
%98 = load double, double* %9
%99 = fmul double %97, %98
%100 = fneg double %99
%101 = call double @llvm.fmuladd.f64(double %94, double %95, double %100)
%102 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 0
store double %101, double* %102
%103 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 2
%104 = load double, double* %103
%105 = load double, double* %8
%106 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
%107 = load double, double* %106
%108 = load double, double* %10
%109 = fmul double %107, %108
%110 = fneg double %109
%111 = call double @llvm.fmuladd.f64(double %104, double %105, double %110)
%112 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 1
store double %111, double* %112
%113 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
%114 = load double, double* %113
%115 = load double, double* %9
%116 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 1
%117 = load double, double* %116
%118 = load double, double* %8
%119 = fmul double %117, %118
%120 = fneg double %119
%121 = call double @llvm.fmuladd.f64(double %114, double %115, double %120)
%122 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 2
store double %121, double* %122
%123 = load double, double* %11
%124 = load double, double* %8
%125 = load double, double* %12
%126 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 0
%127 = load double, double* %126
%128 = fmul double %125, %127
%129 = fneg double %128
%130 = call double @llvm.fmuladd.f64(double %123, double %124, double %129)
%131 = load double, double* %12
%132 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
%133 = load double, double* %132
%134 = call double @llvm.fmuladd.f64(double %131, double %133, double %130)
%135 = load double*, double** %7
%136 = getelementptr inbounds double, double* %135, i64 0
store double %134, double* %136
%137 = load double, double* %11
%138 = load double, double* %9
%139 = load double, double* %12
%140 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 1
%141 = load double, double* %140
%142 = fmul double %139, %141
%143 = fneg double %142
%144 = call double @llvm.fmuladd.f64(double %137, double %138, double %143)
%145 = load double, double* %12
%146 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 1
%147 = load double, double* %146
%148 = call double @llvm.fmuladd.f64(double %145, double %147, double %144)
%149 = load double*, double** %7
%150 = getelementptr inbounds double, double* %149, i64 1
store double %148, double* %150
%151 = load double, double* %11
%152 = load double, double* %10
%153 = load double, double* %12
%154 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 2
%155 = load double, double* %154
%156 = fmul double %153, %155
%157 = fneg double %156
%158 = call double @llvm.fmuladd.f64(double %151, double %152, double %157)
%159 = load double, double* %12
%160 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 2
%161 = load double, double* %160
%162 = call double @llvm.fmuladd.f64(double %159, double %161, double %158)
%163 = load double*, double** %7
%164 = getelementptr inbounds double, double* %163, i64 2
store double %162, double* %164
%165 = load double, double* %11
%166 = load double, double* %8
%167 = load double, double* %12
%168 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 0
%169 = load double, double* %168
%170 = fmul double %167, %169
%171 = call double @llvm.fmuladd.f64(double %165, double %166, double %170)
%172 = load double, double* %12
%173 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
%174 = load double, double* %173
%175 = call double @llvm.fmuladd.f64(double %172, double %174, double %171)
%176 = load double*, double** %7
%177 = getelementptr inbounds double, double* %176, i64 3
store double %175, double* %177
%178 = load double, double* %11
%179 = load double, double* %9
%180 = load double, double* %12
%181 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 1
%182 = load double, double* %181
%183 = fmul double %180, %182
%184 = call double @llvm.fmuladd.f64(double %178, double %179, double %183)
%185 = load double, double* %12
%186 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 1
%187 = load double, double* %186
%188 = call double @llvm.fmuladd.f64(double %185, double %187, double %184)
%189 = load double*, double** %7
%190 = getelementptr inbounds double, double* %189, i64 4
store double %188, double* %190
%191 = load double, double* %11
%192 = load double, double* %10
%193 = load double, double* %12
%194 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 2
%195 = load double, double* %194
%196 = fmul double %193, %195
%197 = call double @llvm.fmuladd.f64(double %191, double %192, double %196)
%198 = load double, double* %12
%199 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 2
%200 = load double, double* %199
%201 = call double @llvm.fmuladd.f64(double %198, double %200, double %197)
%202 = load double*, double** %7
%203 = getelementptr inbounds double, double* %202, i64 5
store double %201, double* %203
%204 = load double, double* %11
%205 = load double, double* %8
%206 = load double, double* %12
%207 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 0
%208 = load double, double* %207
%209 = fmul double %206, %208
%210 = call double @llvm.fmuladd.f64(double %204, double %205, double %209)
%211 = load double, double* %12
%212 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
%213 = load double, double* %212
%214 = fneg double %211
%215 = call double @llvm.fmuladd.f64(double %214, double %213, double %210)
%216 = load double*, double** %7
%217 = getelementptr inbounds double, double* %216, i64 6
store double %215, double* %217
%218 = load double, double* %11
%219 = load double, double* %9
%220 = load double, double* %12
%221 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 1
%222 = load double, double* %221
%223 = fmul double %220, %222
%224 = call double @llvm.fmuladd.f64(double %218, double %219, double %223)
%225 = load double, double* %12
%226 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 1
%227 = load double, double* %226
%228 = fneg double %225
%229 = call double @llvm.fmuladd.f64(double %228, double %227, double %224)
%230 = load double*, double** %7
%231 = getelementptr inbounds double, double* %230, i64 7
store double %229, double* %231
%232 = load double, double* %11
%233 = load double, double* %10
%234 = load double, double* %12
%235 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 2
%236 = load double, double* %235
%237 = fmul double %234, %236
%238 = call double @llvm.fmuladd.f64(double %232, double %233, double %237)
%239 = load double, double* %12
%240 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 2
%241 = load double, double* %240
%242 = fneg double %239
%243 = call double @llvm.fmuladd.f64(double %242, double %241, double %238)
%244 = load double*, double** %7
%245 = getelementptr inbounds double, double* %244, i64 8
store double %243, double* %245
%246 = load double, double* %11
%247 = load double, double* %8
%248 = load double, double* %12
%249 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 0
%250 = load double, double* %249
%251 = fmul double %248, %250
%252 = fneg double %251
%253 = call double @llvm.fmuladd.f64(double %246, double %247, double %252)
%254 = load double, double* %12
%255 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
%256 = load double, double* %255
%257 = fneg double %254
%258 = call double @llvm.fmuladd.f64(double %257, double %256, double %253)
%259 = load double*, double** %7
%260 = getelementptr inbounds double, double* %259, i64 9
store double %258, double* %260
%261 = load double, double* %11
%262 = load double, double* %9
%263 = load double, double* %12
%264 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 1
%265 = load double, double* %264
%266 = fmul double %263, %265
%267 = fneg double %266
%268 = call double @llvm.fmuladd.f64(double %261, double %262, double %267)
%269 = load double, double* %12
%270 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 1
%271 = load double, double* %270
%272 = fneg double %269
%273 = call double @llvm.fmuladd.f64(double %272, double %271, double %268)
%274 = load double*, double** %7
%275 = getelementptr inbounds double, double* %274, i64 10
store double %273, double* %275
%276 = load double, double* %11
%277 = load double, double* %10
%278 = load double, double* %12
%279 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 2
%280 = load double, double* %279
%281 = fmul double %278, %280
%282 = fneg double %281
%283 = call double @llvm.fmuladd.f64(double %276, double %277, double %282)
%284 = load double, double* %12
%285 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 2
%286 = load double, double* %285
%287 = fneg double %284
%288 = call double @llvm.fmuladd.f64(double %287, double %286, double %283)
%289 = load double*, double** %7
%290 = getelementptr inbounds double, double* %289, i64 11
store double %288, double* %290
ret void
}

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