#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 fabs(double);
int fsqr(double);
double sqrt(double);
float NORMALIZEELLIPSE(double ELLIPSE_REZIRADIUSX, double ELLIPSE_RADIUSY,
                       double SHEAR) {
  double RA;
  double RB;
  ELLIPSE_RADIUSY *= ELLIPSE_RADIUSY;
  SHEAR *= SHEAR;
  double A = 1 - 2 * ELLIPSE_RADIUSY * ELLIPSE_REZIRADIUSX +
             fsqr(ELLIPSE_RADIUSY) * fsqr(ELLIPSE_REZIRADIUSX) +
             2 * ELLIPSE_RADIUSY * ELLIPSE_REZIRADIUSX * SHEAR -
             2 * fsqr(ELLIPSE_RADIUSY) * fsqr(ELLIPSE_REZIRADIUSX) * SHEAR +
             4 * fsqr(ELLIPSE_RADIUSY) * fsqr(ELLIPSE_REZIRADIUSX) * SHEAR +
             fsqr(ELLIPSE_RADIUSY) * fsqr(ELLIPSE_REZIRADIUSX) * fsqr(SHEAR);
  double B =
      -2 + 2 * ELLIPSE_RADIUSY * ELLIPSE_REZIRADIUSX + 2 * ELLIPSE_RADIUSY -
      2 * ELLIPSE_RADIUSY * ELLIPSE_REZIRADIUSX * SHEAR -
      2 * fsqr(ELLIPSE_RADIUSY) * ELLIPSE_REZIRADIUSX +
      2 * fsqr(ELLIPSE_RADIUSY) * fsqr(ELLIPSE_REZIRADIUSX) * SHEAR -
      4 * fsqr(ELLIPSE_RADIUSY) * fsqr(ELLIPSE_REZIRADIUSX) * SHEAR +
      2 * fsqr(ELLIPSE_RADIUSY) * ELLIPSE_REZIRADIUSX * SHEAR -
      2 * fsqr(ELLIPSE_RADIUSY) * fsqr(ELLIPSE_REZIRADIUSX) * fsqr(SHEAR) -
      2 * ELLIPSE_RADIUSY * ELLIPSE_REZIRADIUSX * SHEAR;
  double C = +1 - 2 * ELLIPSE_RADIUSY +
             2 * ELLIPSE_RADIUSY * ELLIPSE_REZIRADIUSX * SHEAR +
             fsqr(ELLIPSE_RADIUSY) -
             2 * fsqr(ELLIPSE_RADIUSY) * ELLIPSE_REZIRADIUSX * SHEAR +
             fsqr(ELLIPSE_RADIUSY) * fsqr(ELLIPSE_REZIRADIUSX) * fsqr(SHEAR);
  RA = (-B + sqrt((B * B) - (4 * A * C))) / (2 * A);
  RB = (-B - sqrt((B * B) - (4 * A * C))) / (2 * A);
  RA = sqrt(fabs(RA));
  RB = sqrt(fabs(RB));
  if (RA > RB)
    return RB;
  else
    return RA;
}


x86 assembly (clang, -O0):
<NORMALIZEELLIPSE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xeb0(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe93(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1040 <fsqr@plt>
mov    %eax,-0xfc(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <fsqr@plt>
movsd  -0x108(%rbp),%xmm1
ff
mov    %eax,%ecx
mov    -0xfc(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
addsd  %xmm0,%xmm1
movsd  0xe3a(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1040 <fsqr@plt>
shl    $0x1,%eax
mov    %eax,-0xec(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <fsqr@plt>
movsd  -0xf8(%rbp),%xmm1
ff
mov    %eax,%ecx
mov    -0xec(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x20(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1040 <fsqr@plt>
shl    $0x2,%eax
mov    %eax,-0xe0(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <fsqr@plt>
movsd  -0xe8(%rbp),%xmm1
ff
mov    %eax,%ecx
mov    -0xe0(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1040 <fsqr@plt>
mov    %eax,-0xdc(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <fsqr@plt>
mov    %eax,%ecx
mov    -0xdc(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0xcc(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1040 <fsqr@plt>
movsd  -0xd8(%rbp),%xmm0
ff
mov    %eax,%ecx
mov    -0xcc(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xd15(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd17(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
addsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0xce6(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1040 <fsqr@plt>
movsd  -0xc8(%rbp),%xmm1
ff
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x10(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1040 <fsqr@plt>
shl    $0x1,%eax
mov    %eax,-0xb4(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <fsqr@plt>
movsd  -0xc0(%rbp),%xmm1
ff
mov    %eax,%ecx
mov    -0xb4(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1040 <fsqr@plt>
shl    $0x2,%eax
mov    %eax,-0xa4(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <fsqr@plt>
movsd  -0xb0(%rbp),%xmm1
ff
mov    %eax,%ecx
mov    -0xa4(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x20(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1040 <fsqr@plt>
movsd  -0xa0(%rbp),%xmm1
ff
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1040 <fsqr@plt>
shl    $0x1,%eax
mov    %eax,-0x94(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <fsqr@plt>
mov    %eax,%ecx
mov    -0x94(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x84(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1040 <fsqr@plt>
movsd  -0x90(%rbp),%xmm1
ff
mov    %eax,%ecx
mov    -0x84(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
subsd  %xmm0,%xmm1
movsd  0xb34(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xb00(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0xae4(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <fsqr@plt>
movsd  -0x80(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <fsqr@plt>
movsd  -0x78(%rbp),%xmm1
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <fsqr@plt>
mov    %eax,-0x6c(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <fsqr@plt>
mov    %eax,%ecx
mov    -0x6c(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x5c(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1040 <fsqr@plt>
movsd  -0x68(%rbp),%xmm0
mov    %eax,%ecx
mov    -0x5c(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  0x9f7(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  0x9ad(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  0x974(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  0x92a(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movaps 0x900(%rip),%xmm1
pand   %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
movaps 0x8e6(%rip),%xmm1
pand   %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    174b <NORMALIZEELLIPSE+0x62b>
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1759 <NORMALIZEELLIPSE+0x639>
movsd  -0x28(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NORMALIZEELLIPSE>:
push   %rbp
push   %rbx
sub    $0x78,%rsp
movsd  %xmm0,(%rsp)
mulsd  %xmm1,%xmm1
movsd  %xmm1,0x8(%rsp)
mulsd  %xmm2,%xmm2
movsd  %xmm2,0x10(%rsp)
movapd %xmm1,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x58(%rsp)
mulsd  %xmm0,%xmm2
movapd %xmm2,0x40(%rsp)
movsd  0xea1(%rip),%xmm0
subsd  %xmm2,%xmm0
movsd  %xmm0,0x20(%rsp)
movapd %xmm1,%xmm0
call   1040 <fsqr@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
call   1040 <fsqr@plt>
imul   %ebx,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
addsd  0x20(%rsp),%xmm1
movapd 0x40(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
movapd %xmm0,0x60(%rsp)
addsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <fsqr@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
call   1040 <fsqr@plt>
imul   %ebx,%eax
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <fsqr@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
call   1040 <fsqr@plt>
imul   %ebx,%eax
shl    $0x2,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
addsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <fsqr@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
call   1040 <fsqr@plt>
mov    %eax,%ebp
imul   %ebx,%ebp
movsd  0x10(%rsp),%xmm0
call   1040 <fsqr@plt>
imul   %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x50(%rsp)
movsd  0xdaa(%rip),%xmm2
movapd 0x40(%rsp),%xmm0
addsd  %xmm0,%xmm2
addsd  0x58(%rsp),%xmm2
movapd 0xdaa(%rip),%xmm1
movapd %xmm1,0x20(%rsp)
xorpd  %xmm1,%xmm0
mulsd  0x10(%rsp),%xmm0
movapd %xmm0,0x40(%rsp)
addsd  %xmm0,%xmm2
movsd  %xmm2,0x30(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <fsqr@plt>
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  (%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x30(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <fsqr@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
call   1040 <fsqr@plt>
imul   %ebx,%eax
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
addsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <fsqr@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
call   1040 <fsqr@plt>
imul   %ebx,%eax
shl    $0x2,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x30(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <fsqr@plt>
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  (%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
addsd  0x30(%rsp),%xmm0
movapd %xmm0,0x30(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <fsqr@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
call   1040 <fsqr@plt>
mov    %eax,%ebp
imul   %ebx,%ebp
movsd  0x10(%rsp),%xmm0
call   1040 <fsqr@plt>
imul   %ebp,%eax
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movapd 0x30(%rsp),%xmm1
subsd  %xmm0,%xmm1
addsd  0x40(%rsp),%xmm1
movapd %xmm1,0x30(%rsp)
movsd  0xc56(%rip),%xmm0
subsd  0x58(%rsp),%xmm0
addsd  0x60(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <fsqr@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <fsqr@plt>
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  (%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  0x40(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x40(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <fsqr@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
call   1040 <fsqr@plt>
mov    %eax,%ebp
imul   %ebx,%ebp
movsd  0x10(%rsp),%xmm0
call   1040 <fsqr@plt>
imul   %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x40(%rsp),%xmm0
movapd 0x20(%rsp),%xmm1
movapd 0x30(%rsp),%xmm2
xorpd  %xmm2,%xmm1
movapd %xmm1,0x20(%rsp)
movsd  0xbb2(%rip),%xmm1
mulsd  0x50(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
sqrtsd %xmm0,%xmm3
xorpd  %xmm4,%xmm4
ucomisd %xmm4,%xmm0
movapd %xmm3,%xmm2
jae    14af <NORMALIZEELLIPSE+0x38f>
movapd %xmm0,0x10(%rsp)
movapd 0x10(%rsp),%xmm0
movsd  %xmm3,(%rsp)
call   1030 <sqrt@plt>
xorpd  %xmm4,%xmm4
movsd  (%rsp),%xmm3
movapd %xmm0,%xmm2
movapd 0x10(%rsp),%xmm0
subsd  0x30(%rsp),%xmm2
movsd  0x50(%rsp),%xmm1
addsd  %xmm1,%xmm1
divsd  %xmm1,%xmm2
ucomisd %xmm4,%xmm0
jae    14ea <NORMALIZEELLIPSE+0x3ca>
movsd  %xmm1,0x50(%rsp)
movapd %xmm2,0x10(%rsp)
call   1030 <sqrt@plt>
movapd 0x10(%rsp),%xmm2
movsd  0x50(%rsp),%xmm1
movapd %xmm0,%xmm3
movapd 0x20(%rsp),%xmm0
subsd  %xmm3,%xmm0
andpd  0xb34(%rip),%xmm2
divsd  %xmm1,%xmm0
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm2
jb     1513 <NORMALIZEELLIPSE+0x3f3>
xorps  %xmm1,%xmm1
sqrtsd %xmm2,%xmm1
jmp    1530 <NORMALIZEELLIPSE+0x410>
movapd %xmm0,0x20(%rsp)
movapd %xmm2,%xmm0
call   1030 <sqrt@plt>
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
movapd 0x20(%rsp),%xmm0
andpd  0xaf8(%rip),%xmm0
ucomisd %xmm3,%xmm0
jb     1544 <NORMALIZEELLIPSE+0x424>
sqrtsd %xmm0,%xmm0
jmp    1555 <NORMALIZEELLIPSE+0x435>
movsd  %xmm1,0x10(%rsp)
call   1030 <sqrt@plt>
movsd  0x10(%rsp),%xmm1
minsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x78,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define float @NORMALIZEELLIPSE(double %0, double %1, double %2) {
%4 = fmul double %1, %1
%5 = fmul double %2, %2
%6 = fmul double %4, 2.000000e+00
%7 = fneg double %6
%8 = tail call double @llvm.fmuladd.f64(double %7, double %0, double 1.000000e+00)
%9 = tail call i32 @fsqr(double %4)
%10 = tail call i32 @fsqr(double %0)
%11 = mul nsw i32 %10, %9
%12 = sitofp i32 %11 to double
%13 = fadd double %8, %12
%14 = fmul double %6, %0
%15 = tail call double @llvm.fmuladd.f64(double %14, double %5, double %13)
%16 = tail call i32 @fsqr(double %4)
%17 = shl nsw i32 %16, 1
%18 = tail call i32 @fsqr(double %0)
%19 = mul nsw i32 %17, %18
%20 = sitofp i32 %19 to double
%21 = fneg double %20
%22 = tail call double @llvm.fmuladd.f64(double %21, double %5, double %15)
%23 = tail call i32 @fsqr(double %4)
%24 = shl nsw i32 %23, 2
%25 = tail call i32 @fsqr(double %0)
%26 = mul nsw i32 %24, %25
%27 = sitofp i32 %26 to double
%28 = tail call double @llvm.fmuladd.f64(double %27, double %5, double %22)
%29 = tail call i32 @fsqr(double %4)
%30 = tail call i32 @fsqr(double %0)
%31 = mul nsw i32 %30, %29
%32 = tail call i32 @fsqr(double %5)
%33 = mul nsw i32 %31, %32
%34 = sitofp i32 %33 to double
%35 = fadd double %28, %34
%36 = tail call double @llvm.fmuladd.f64(double %6, double %0, double -2.000000e+00)
%37 = tail call double @llvm.fmuladd.f64(double %4, double 2.000000e+00, double %36)
%38 = fneg double %14
%39 = tail call double @llvm.fmuladd.f64(double %38, double %5, double %37)
%40 = tail call i32 @fsqr(double %4)
%41 = shl nsw i32 %40, 1
%42 = sitofp i32 %41 to double
%43 = fneg double %42
%44 = tail call double @llvm.fmuladd.f64(double %43, double %0, double %39)
%45 = tail call i32 @fsqr(double %4)
%46 = shl nsw i32 %45, 1
%47 = tail call i32 @fsqr(double %0)
%48 = mul nsw i32 %46, %47
%49 = sitofp i32 %48 to double
%50 = tail call double @llvm.fmuladd.f64(double %49, double %5, double %44)
%51 = tail call i32 @fsqr(double %4)
%52 = shl nsw i32 %51, 2
%53 = tail call i32 @fsqr(double %0)
%54 = mul nsw i32 %52, %53
%55 = sitofp i32 %54 to double
%56 = fneg double %55
%57 = tail call double @llvm.fmuladd.f64(double %56, double %5, double %50)
%58 = tail call i32 @fsqr(double %4)
%59 = shl nsw i32 %58, 1
%60 = sitofp i32 %59 to double
%61 = fmul double %60, %0
%62 = tail call double @llvm.fmuladd.f64(double %61, double %5, double %57)
%63 = tail call i32 @fsqr(double %4)
%64 = shl nsw i32 %63, 1
%65 = tail call i32 @fsqr(double %0)
%66 = mul nsw i32 %64, %65
%67 = tail call i32 @fsqr(double %5)
%68 = mul nsw i32 %66, %67
%69 = sitofp i32 %68 to double
%70 = fsub double %62, %69
%71 = tail call double @llvm.fmuladd.f64(double %38, double %5, double %70)
%72 = tail call double @llvm.fmuladd.f64(double %4, double -2.000000e+00, double 1.000000e+00)
%73 = tail call double @llvm.fmuladd.f64(double %14, double %5, double %72)
%74 = tail call i32 @fsqr(double %4)
%75 = sitofp i32 %74 to double
%76 = fadd double %73, %75
%77 = tail call i32 @fsqr(double %4)
%78 = shl nsw i32 %77, 1
%79 = sitofp i32 %78 to double
%80 = fneg double %79
%81 = fmul double %80, %0
%82 = tail call double @llvm.fmuladd.f64(double %81, double %5, double %76)
%83 = tail call i32 @fsqr(double %4)
%84 = tail call i32 @fsqr(double %0)
%85 = mul nsw i32 %84, %83
%86 = tail call i32 @fsqr(double %5)
%87 = mul nsw i32 %85, %86
%88 = sitofp i32 %87 to double
%89 = fadd double %82, %88
%90 = fneg double %71
%91 = fmul double %35, -4.000000e+00
%92 = fmul double %91, %89
%93 = tail call double @llvm.fmuladd.f64(double %71, double %71, double %92)
%94 = tail call double @sqrt(double %93)
%95 = fsub double %94, %71
%96 = fmul double %35, 2.000000e+00
%97 = fdiv double %95, %96
%98 = tail call double @sqrt(double %93)
%99 = fsub double %90, %98
%100 = fdiv double %99, %96
%101 = tail call double @llvm.fabs.f64(double %97)
%102 = tail call double @sqrt(double %101)
%103 = tail call double @llvm.fabs.f64(double %100)
%104 = tail call double @sqrt(double %103)
%105 = fcmp ogt double %102, %104
%106 = select i1 %105, double %104, double %102
%107 = fptrunc double %106 to float
ret float %107
}