#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 atan2(double, double);
double cos(double);
int /*<<< orphan*/ error(char *);
double pow(double, double);
double sin(double);
void ellipse2param(double *p, double *param) {
  double a, b, c, d, e, f;
  double thetarad, cost, sint, cos_squared, sin_squared, cos_sin;
  double Ao, Au, Av, Auu, Avv;
  double tuCentre, tvCentre, wCentre, uCentre, vCentre, Ru, Rv;
  if (p == NULL)
    error("ellipse2param: null input ellipse matrix.");
  if (param == NULL)
    error("ellipse2param: output 'param' should be non-null");
  a = p[0];
  b = 2 * p[1];
  c = p[4];
  d = 2 * p[2];
  e = 2 * p[5];
  f = p[8];
  thetarad = 0.5 * atan2(b, a - c);
  cost = cos(thetarad);
  sint = sin(thetarad);
  sin_squared = sint * sint;
  cos_squared = cost * cost;
  cos_sin = sint * cost;
  Ao = f;
  Au = d * cost + e * sint;
  Av = -d * sint + e * cost;
  Auu = a * cos_squared + c * sin_squared + b * cos_sin;
  Avv = a * sin_squared + c * cos_squared - b * cos_sin;
  if ((Auu == 0) || (Avv == 0)) {
    param[0] = 0;
    param[1] = 0;
    param[2] = 0;
    param[3] = 0;
    param[4] = 0;
  } else {
    tuCentre = -Au / (2. * Auu);
    tvCentre = -Av / (2. * Avv);
    wCentre = Ao - Auu * tuCentre * tuCentre - Avv * tvCentre * tvCentre;
    uCentre = tuCentre * cost - tvCentre * sint;
    vCentre = tuCentre * sint + tvCentre * cost;
    Ru = -wCentre / Auu;
    Rv = -wCentre / Avv;
    if (Ru > 0)
      Ru = pow(Ru, 0.5);
    else
      Ru = -pow(-Ru, 0.5);
    if (Rv > 0)
      Rv = pow(Rv, 0.5);
    else
      Rv = -pow(-Rv, 0.5);
    param[0] = uCentre;
    param[1] = vCentre;
    param[2] = Ru;
    param[3] = Rv;
    param[4] = thetarad;
  }
}


x86 assembly (clang, -O0):
<ellipse2param>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    117a <ellipse2param+0x2a>
lea    0xe9b(%rip),%rdi
call   1050 <error@plt>
cmpq   $0x0,-0x10(%rbp)
jne    1191 <ellipse2param+0x41>
lea    0xeae(%rip),%rdi
call   1050 <error@plt>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xe5e(%rip),%xmm0
mulsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xe3a(%rip),%xmm0
mulsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xe24(%rip),%xmm0
mulsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
subsd  -0x28(%rbp),%xmm1
call   1030 <atan2@plt>
movaps %xmm0,%xmm1
movsd  0xde5(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1060 <cos@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x18(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x18(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1378 <ellipse2param+0x228>
jp     1378 <ellipse2param+0x228>
jmp    1393 <ellipse2param+0x243>
movsd  -0x98(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    13d3 <ellipse2param+0x283>
jp     13d3 <ellipse2param+0x283>
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x20(%rax)
jmp    16df <ellipse2param+0x58f>
movsd  -0x80(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xc11(%rip),%xmm1
mulsd  -0x90(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xbd6(%rip),%xmm1
mulsd  -0x98(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
movsd  -0x90(%rbp),%xmm1
ff
mulsd  -0xa0(%rbp),%xmm1
ff
movsd  -0xa0(%rbp),%xmm2
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm0
ff
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  -0xa8(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x50(%rbp),%xmm2
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  -0x58(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x58(%rbp),%xmm2
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    15c1 <ellipse2param+0x471>
movsd  -0xc8(%rbp),%xmm0
ff
movsd  0xa51(%rip),%xmm1
call   1070 <pow@plt>
movsd  %xmm0,-0xc8(%rbp)
ff
jmp    160c <ellipse2param+0x4bc>
movsd  -0xc8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xa18(%rip),%xmm1
call   1070 <pow@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1643 <ellipse2param+0x4f3>
movsd  -0xd0(%rbp),%xmm0
ff
movsd  0x9cf(%rip),%xmm1
call   1070 <pow@plt>
movsd  %xmm0,-0xd0(%rbp)
ff
jmp    168e <ellipse2param+0x53e>
movsd  -0xd0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0x996(%rip),%xmm1
call   1070 <pow@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xc0(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0xc8(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0xd0(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ellipse2param>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
test   %rdi,%rdi
je     1371 <ellipse2param+0x221>
test   %r14,%r14
jne    117a <ellipse2param+0x2a>
lea    0xed5(%rip),%rdi
call   1050 <error@plt>
movsd  (%rbx),%xmm1
movapd %xmm1,0x20(%rsp)
movsd  0x8(%rbx),%xmm2
addsd  %xmm2,%xmm2
movapd %xmm2,0x30(%rsp)
movsd  0x20(%rbx),%xmm3
movapd %xmm3,0x70(%rsp)
movsd  0x10(%rbx),%xmm0
movaps %xmm0,0x60(%rsp)
movsd  0x28(%rbx),%xmm0
movsd  %xmm0,0x58(%rsp)
movsd  0x40(%rbx),%xmm0
movaps %xmm0,0x40(%rsp)
subsd  %xmm3,%xmm1
movapd %xmm2,%xmm0
call   1030 <atan2@plt>
mulsd  0xe2e(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
call   1060 <cos@plt>
movapd %xmm0,(%rsp)
movsd  0x18(%rsp),%xmm0
call   1040 <sin@plt>
movapd (%rsp),%xmm5
movapd %xmm0,%xmm8
unpcklpd %xmm5,%xmm8
movapd %xmm8,%xmm2
mulpd  %xmm8,%xmm2
movapd %xmm5,%xmm1
mulsd  %xmm0,%xmm1
movapd 0x70(%rsp),%xmm4
unpcklpd %xmm4,%xmm4
movapd 0x20(%rsp),%xmm3
unpcklpd %xmm3,%xmm3
mulpd  %xmm2,%xmm3
shufpd $0x1,%xmm2,%xmm2
mulpd  %xmm4,%xmm2
addpd  %xmm2,%xmm3
movapd 0xdd5(%rip),%xmm2
movapd 0x30(%rsp),%xmm4
xorpd  %xmm4,%xmm2
unpcklpd %xmm4,%xmm2
unpcklpd %xmm1,%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm3,%xmm1
xorpd  %xmm2,%xmm2
movapd %xmm1,%xmm3
cmpeqpd %xmm2,%xmm3
movmskpd %xmm3,%eax
test   %eax,%eax
je     1282 <ellipse2param+0x132>
movupd %xmm2,0x10(%r14)
movupd %xmm2,(%r14)
movq   $0x0,0x20(%r14)
jmp    1421 <ellipse2param+0x2d1>
movapd 0x60(%rsp),%xmm6
addsd  %xmm6,%xmm6
movsd  0x58(%rsp),%xmm4
addsd  %xmm4,%xmm4
movapd %xmm4,%xmm2
mulsd  %xmm5,%xmm2
movapd %xmm6,%xmm3
mulsd  %xmm0,%xmm3
subsd  %xmm3,%xmm2
mulsd  %xmm0,%xmm4
mulsd  %xmm5,%xmm6
addsd  %xmm4,%xmm6
movapd 0xd51(%rip),%xmm9
xorpd  %xmm9,%xmm6
movapd %xmm1,%xmm3
unpckhpd %xmm1,%xmm3
movapd %xmm3,%xmm4
addsd  %xmm3,%xmm4
divsd  %xmm4,%xmm6
xorpd  %xmm9,%xmm2
movapd %xmm1,%xmm4
addsd  %xmm1,%xmm4
divsd  %xmm4,%xmm2
movapd %xmm6,%xmm4
mulsd  %xmm3,%xmm4
mulsd  %xmm6,%xmm4
movapd 0x40(%rsp),%xmm7
subsd  %xmm4,%xmm7
movapd %xmm2,%xmm4
mulsd  %xmm1,%xmm4
mulsd  %xmm2,%xmm4
subsd  %xmm4,%xmm7
movapd %xmm2,%xmm4
xorpd  %xmm9,%xmm4
unpcklpd %xmm2,%xmm4
mulpd  %xmm4,%xmm8
movapd %xmm8,0x30(%rsp)
unpcklpd %xmm6,%xmm6
unpcklpd %xmm0,%xmm5
mulpd  %xmm6,%xmm5
movapd %xmm5,(%rsp)
xorpd  %xmm9,%xmm7
movapd %xmm7,%xmm0
divsd  %xmm3,%xmm0
divsd  %xmm1,%xmm7
movapd %xmm7,0x40(%rsp)
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    138b <ellipse2param+0x23b>
movsd  0xc9e(%rip),%xmm1
call   1070 <pow@plt>
movapd 0xca1(%rip),%xmm2
jmp    13a9 <ellipse2param+0x259>
lea    0xca8(%rip),%rdi
call   1050 <error@plt>
test   %r14,%r14
jne    117a <ellipse2param+0x2a>
jmp    116e <ellipse2param+0x1e>
xorpd  %xmm9,%xmm0
movsd  0xc68(%rip),%xmm1
call   1070 <pow@plt>
movapd 0xc6b(%rip),%xmm2
xorpd  %xmm2,%xmm0
movapd %xmm0,0x20(%rsp)
movapd (%rsp),%xmm0
addpd  0x30(%rsp),%xmm0
movapd %xmm0,(%rsp)
xorpd  %xmm0,%xmm0
movapd 0x40(%rsp),%xmm1
ucomisd %xmm0,%xmm1
movapd %xmm1,%xmm0
jbe    13e2 <ellipse2param+0x292>
movsd  0xc25(%rip),%xmm1
call   1070 <pow@plt>
jmp    13fb <ellipse2param+0x2ab>
xorpd  %xmm2,%xmm0
movsd  0xc12(%rip),%xmm1
call   1070 <pow@plt>
xorpd  0xc15(%rip),%xmm0
movaps (%rsp),%xmm1
movups %xmm1,(%r14)
movapd 0x20(%rsp),%xmm1
movsd  %xmm1,0x10(%r14)
movsd  %xmm0,0x18(%r14)
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x20(%r14)
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [42 x i8] c"ellipse2param: null input ellipse matrix.\00"
@.str.1 = [49 x i8] c"ellipse2param: output 'param' should be non-null\00"
define void @ellipse2param(double* %0, double* writeonly %1) {
%3 = icmp eq double* %0, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @error(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %2
%7 = icmp eq double* %1, null
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = tail call i32 @error(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
%11 = load double, double* %0
%12 = getelementptr inbounds double, double* %0, i64 1
%13 = load double, double* %12
%14 = fmul double %13, 2.000000e+00
%15 = getelementptr inbounds double, double* %0, i64 4
%16 = load double, double* %15
%17 = getelementptr inbounds double, double* %0, i64 2
%18 = load double, double* %17
%19 = fmul double %18, 2.000000e+00
%20 = getelementptr inbounds double, double* %0, i64 5
%21 = load double, double* %20
%22 = fmul double %21, 2.000000e+00
%23 = getelementptr inbounds double, double* %0, i64 8
%24 = load double, double* %23
%25 = fsub double %11, %16
%26 = tail call double @atan2(double %14, double %25)
%27 = fmul double %26, 5.000000e-01
%28 = tail call double @cos(double %27)
%29 = tail call double @sin(double %27)
%30 = insertelement <2 x double> poison, double %29, i64 0
%31 = insertelement <2 x double> %30, double %28, i64 1
%32 = fmul <2 x double> %31, %31
%33 = fmul double %28, %29
%34 = insertelement <2 x double> poison, double %16, i64 0
%35 = shufflevector <2 x double> %34, <2 x double> poison, <2 x i32> zeroinitializer
%36 = shufflevector <2 x double> %32, <2 x double> undef, <2 x i32> <i32 1, i32 0>
%37 = fmul <2 x double> %35, %36
%38 = insertelement <2 x double> poison, double %11, i64 0
%39 = shufflevector <2 x double> %38, <2 x double> poison, <2 x i32> zeroinitializer
%40 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %39, <2 x double> %32, <2 x double> %37)
%41 = fneg double %14
%42 = insertelement <2 x double> poison, double %41, i64 0
%43 = insertelement <2 x double> %42, double %14, i64 1
%44 = insertelement <2 x double> poison, double %33, i64 0
%45 = shufflevector <2 x double> %44, <2 x double> poison, <2 x i32> zeroinitializer
%46 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %43, <2 x double> %45, <2 x double> %40)
%47 = fcmp oeq <2 x double> %46, zeroinitializer
%48 = extractelement <2 x i1> %47, i64 0
%49 = extractelement <2 x i1> %47, i64 1
%50 = select i1 %49, i1 true, i1 %48
br i1 %50, label %51, label %53
51: ; preds = %10
%52 = bitcast double* %1 to i8*
br label %107
53: ; preds = %10
%54 = fneg double %19
%55 = fmul double %22, %28
%56 = tail call double @llvm.fmuladd.f64(double %54, double %29, double %55)
%57 = fmul double %22, %29
%58 = tail call double @llvm.fmuladd.f64(double %19, double %28, double %57)
%59 = fneg double %58
%60 = extractelement <2 x double> %46, i64 1
%61 = fmul double %60, 2.000000e+00
%62 = fdiv double %59, %61
%63 = fneg double %56
%64 = extractelement <2 x double> %46, i64 0
%65 = fmul double %64, 2.000000e+00
%66 = fdiv double %63, %65
%67 = fneg double %60
%68 = fmul double %62, %67
%69 = tail call double @llvm.fmuladd.f64(double %68, double %62, double %24)
%70 = fneg double %64
%71 = fmul double %66, %70
%72 = tail call double @llvm.fmuladd.f64(double %71, double %66, double %69)
%73 = fneg double %66
%74 = insertelement <2 x double> poison, double %73, i64 0
%75 = insertelement <2 x double> %74, double %66, i64 1
%76 = fmul <2 x double> %31, %75
%77 = insertelement <2 x double> poison, double %62, i64 0
%78 = shufflevector <2 x double> %77, <2 x double> poison, <2 x i32> zeroinitializer
%79 = insertelement <2 x double> poison, double %28, i64 0
%80 = insertelement <2 x double> %79, double %29, i64 1
%81 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %78, <2 x double> %80, <2 x double> %76)
%82 = fneg double %72
%83 = fdiv double %82, %60
%84 = fdiv double %82, %64
%85 = fcmp ogt double %83, 0.000000e+00
br i1 %85, label %86, label %88
86: ; preds = %53
%87 = tail call double @pow(double %83, double 5.000000e-01)
br label %92
88: ; preds = %53
%89 = fneg double %83
%90 = tail call double @pow(double %89, double 5.000000e-01)
%91 = fneg double %90
br label %92
92: ; preds = %88, %86
%93 = phi double [ %87, %86 ], [ %91, %88 ]
%94 = fcmp ogt double %84, 0.000000e+00
br i1 %94, label %95, label %97
95: ; preds = %92
%96 = tail call double @pow(double %84, double 5.000000e-01)
br label %101
97: ; preds = %92
%98 = fneg double %84
%99 = tail call double @pow(double %98, double 5.000000e-01)
%100 = fneg double %99
br label %101
101: ; preds = %97, %95
%102 = phi double [ %96, %95 ], [ %100, %97 ]
%103 = bitcast double* %1 to <2 x double>*
store <2 x double> %81, <2 x double>* %103
%104 = getelementptr inbounds double, double* %1, i64 2
store double %93, double* %104
%105 = getelementptr inbounds double, double* %1, i64 3
store double %102, double* %105
%106 = getelementptr inbounds double, double* %1, i64 4
store double %27, double* %106
br label %107
107: ; preds = %101, %51
ret void
}