#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 */
int /*<<< orphan*/ ellipse2param(double *, double *);
int /*<<< orphan*/ error(char *);
int /*<<< orphan*/ lap_eig(double *, int);
void fit_ellipse(double *buff, double *vgg, int reg_size, double *param) {
  int i, j, k;
  double A[36];
  if (reg_size <= 0)
    error("fit_ellipse: invalid size.");
  if (buff == NULL)
    error("fit_ellipse: invalid buffer.");
  if (vgg == NULL)
    error("fit_ellipse: invalid normalization matrix.");
  if (param == NULL)
    error("fit_ellipse: param must be non null.");
  for (i = 0; i < 36; i++)
    A[i] = 0.0;
  for (i = 0; i < 6; i++)
    for (j = 0; j < 6; j++)
      for (k = 0; k < 4 * reg_size; k++)
        A[i * 6 + j] += buff[k * 6 + i] * buff[k * 6 + j];
  lap_eig(A, 6);
  double s[9];
  s[0] = A[0];
  s[1] = s[3] = A[1];
  s[2] = s[6] = A[2];
  s[4] = A[3];
  s[5] = s[7] = A[4];
  s[8] = A[5];
  double C[9];
  C[0] = vgg[0] * vgg[0] * s[0] + vgg[0] * vgg[3] * s[3] +
         vgg[0] * vgg[3] * s[1] + vgg[3] * vgg[3] * s[4];
  C[1] = vgg[0] * vgg[1] * s[0] + vgg[1] * vgg[3] * s[3] +
         vgg[0] * vgg[4] * s[1] + vgg[3] * vgg[4] * s[4];
  C[2] = vgg[0] * vgg[2] * s[0] + vgg[2] * vgg[3] * s[3] +
         vgg[0] * vgg[5] * s[1] + vgg[3] * vgg[5] * s[4] + vgg[0] * s[2] +
         vgg[3] * s[5];
  C[3] = vgg[0] * vgg[1] * s[0] + vgg[0] * vgg[4] * s[3] +
         vgg[1] * vgg[3] * s[1] + vgg[3] * vgg[4] * s[4];
  C[4] = vgg[1] * vgg[1] * s[0] + vgg[1] * vgg[4] * s[3] +
         vgg[1] * vgg[4] * s[1] + vgg[4] * vgg[4] * s[4];
  C[5] = vgg[1] * vgg[2] * s[0] + vgg[2] * vgg[4] * s[3] +
         vgg[1] * vgg[5] * s[1] + vgg[4] * vgg[5] * s[4] + vgg[1] * s[2] +
         vgg[4] * s[5];
  C[6] = vgg[0] * vgg[2] * s[0] + vgg[0] * vgg[5] * s[3] + vgg[0] * s[6] +
         vgg[2] * vgg[3] * s[1] + vgg[3] * vgg[5] * s[4] + vgg[3] * s[7];
  C[7] = vgg[1] * vgg[2] * s[0] + vgg[1] * vgg[5] * s[3] + vgg[1] * s[6] +
         vgg[2] * vgg[4] * s[1] + vgg[4] * vgg[5] * s[4] + vgg[4] * s[7];
  C[8] = vgg[2] * vgg[2] * s[0] + vgg[2] * vgg[5] * s[3] + vgg[2] * s[6] +
         vgg[2] * vgg[5] * s[1] + vgg[5] * vgg[5] * s[4] + vgg[5] * s[7] +
         vgg[2] * s[2] + vgg[5] * s[5] + s[8];
  ellipse2param(C, param);
}


x86 assembly (clang, -O0):
<fit_ellipse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     1160 <fit_ellipse+0x30>
lea    0xea5(%rip),%rdi
call   1050 <error@plt>
cmpq   $0x0,-0x8(%rbp)
jne    1177 <fit_ellipse+0x47>
lea    0xea9(%rip),%rdi
call   1050 <error@plt>
cmpq   $0x0,-0x10(%rbp)
jne    118e <fit_ellipse+0x5e>
lea    0xeaf(%rip),%rdi
call   1050 <error@plt>
cmpq   $0x0,-0x20(%rbp)
jne    11a5 <fit_ellipse+0x75>
lea    0xec3(%rip),%rdi
call   1050 <error@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x24,-0x24(%rbp)
jge    11d4 <fit_ellipse+0xa4>
movslq -0x24(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x150(%rbp,%rax,8)
ff ff
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11ac <fit_ellipse+0x7c>
movl   $0x0,-0x24(%rbp)
cmpl   $0x6,-0x24(%rbp)
jge    128b <fit_ellipse+0x15b>
movl   $0x0,-0x28(%rbp)
cmpl   $0x6,-0x28(%rbp)
jge    1278 <fit_ellipse+0x148>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
cmp    %ecx,%eax
jge    1265 <fit_ellipse+0x135>
mov    -0x8(%rbp),%rax
imul   $0x6,-0x2c(%rbp),%ecx
add    -0x24(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
imul   $0x6,-0x2c(%rbp),%ecx
add    -0x28(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
imul   $0x6,-0x24(%rbp),%eax
add    -0x28(%rbp),%eax
cltq
movsd  -0x150(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x150(%rbp,%rax,8)
ff ff
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11fd <fit_ellipse+0xcd>
jmp    126a <fit_ellipse+0x13a>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11ec <fit_ellipse+0xbc>
jmp    127d <fit_ellipse+0x14d>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11db <fit_ellipse+0xab>
lea    -0x150(%rbp),%rdi
mov    $0x6,%esi
call   1040 <lap_eig@plt>
movsd  -0x150(%rbp),%xmm0
ff
movsd  %xmm0,-0x1a0(%rbp)
ff
movsd  -0x148(%rbp),%xmm0
ff
movsd  %xmm0,-0x188(%rbp)
ff
movsd  %xmm0,-0x198(%rbp)
ff
movsd  -0x140(%rbp),%xmm0
ff
movsd  %xmm0,-0x170(%rbp)
ff
movsd  %xmm0,-0x190(%rbp)
ff
movsd  -0x138(%rbp),%xmm0
ff
movsd  %xmm0,-0x180(%rbp)
ff
movsd  -0x130(%rbp),%xmm0
ff
movsd  %xmm0,-0x168(%rbp)
ff
movsd  %xmm0,-0x178(%rbp)
ff
movsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0x160(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  -0x1a0(%rbp),%xmm2
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x18(%rax),%xmm1
mulsd  -0x188(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x18(%rax),%xmm1
movsd  -0x198(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x18(%rax),%xmm0
movsd  -0x180(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1f0(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
movsd  -0x1a0(%rbp),%xmm2
ff
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x18(%rax),%xmm1
mulsd  -0x188(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm1
movsd  -0x198(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm0
movsd  -0x180(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1e8(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm0
movsd  -0x1a0(%rbp),%xmm2
ff
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x18(%rax),%xmm1
mulsd  -0x188(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x28(%rax),%xmm1
movsd  -0x198(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x28(%rax),%xmm0
movsd  -0x180(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x190(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  -0x178(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1e0(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
movsd  -0x1a0(%rbp),%xmm2
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  -0x188(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x18(%rax),%xmm1
movsd  -0x198(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm0
movsd  -0x180(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1d8(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
movsd  -0x1a0(%rbp),%xmm2
ff
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  -0x188(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm1
movsd  -0x198(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm0
movsd  -0x180(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1d0(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm0
movsd  -0x1a0(%rbp),%xmm2
ff
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  -0x188(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x28(%rax),%xmm1
movsd  -0x198(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x28(%rax),%xmm0
movsd  -0x180(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  -0x190(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  -0x178(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1c8(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm0
movsd  -0x1a0(%rbp),%xmm2
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x28(%rax),%xmm1
mulsd  -0x188(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x170(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x18(%rax),%xmm0
movsd  -0x198(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x28(%rax),%xmm1
movsd  -0x180(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  -0x168(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1c0(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm0
movsd  -0x1a0(%rbp),%xmm2
ff
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x28(%rax),%xmm1
mulsd  -0x188(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  -0x170(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm0
movsd  -0x198(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x28(%rax),%xmm1
movsd  -0x180(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  -0x168(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1b8(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm0
movsd  -0x1a0(%rbp),%xmm2
ff
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x28(%rax),%xmm1
mulsd  -0x188(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
movsd  -0x170(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x28(%rax),%xmm0
movsd  -0x198(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x28(%rax),%xmm1
movsd  -0x180(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  -0x168(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
movsd  -0x190(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  -0x178(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x160(%rbp),%xmm0
ff
movsd  %xmm0,-0x1b0(%rbp)
ff
lea    -0x1f0(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <ellipse2param@plt>
add    $0x1f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fit_ellipse>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x258,%rsp
mov    %rcx,%rbx
mov    %edx,%r13d
mov    %rsi,%rbp
mov    %rdi,%r12
test   %edx,%edx
jle    1963 <fit_ellipse+0x823>
test   %r12,%r12
je     1978 <fit_ellipse+0x838>
test   %rbp,%rbp
je     198d <fit_ellipse+0x84d>
mov    %rbp,(%rsp)
mov    %rbx,0x18(%rsp)
test   %rbx,%rbx
jne    1191 <fit_ellipse+0x51>
lea    0xed7(%rip),%rdi
call   1060 <error@plt>
lea    0x130(%rsp),%rdi
xor    %ebx,%ebx
mov    $0x120,%edx
xor    %esi,%esi
call   1040 <memset@plt>
lea    0x0(,%r13,4),%ecx
cmp    $0x2,%ecx
mov    $0x1,%r15d
cmovge %ecx,%r15d
lea    -0x1(%r15),%r11
mov    %r15d,%edx
and    $0x7ffffffc,%edx
lea    0x38(%r12),%r14
lea    0x40(%r12),%r8
lea    0x30(%r12),%r9
xor    %edi,%edi
jmp    1202 <fit_ellipse+0xc2>
movsd  %xmm0,0x158(%rsp,%rcx,8)
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rdi
add    $0x8,%rbx
cmp    $0x6,%rdi
je     1592 <fit_ellipse+0x452>
test   %r13d,%r13d
jle    11f0 <fit_ellipse+0xb0>
lea    (%rdi,%rdi,1),%rcx
lea    (%rcx,%rcx,2),%rcx
movsd  0x130(%rsp,%rcx,8),%xmm0
test   %r11,%r11
je     1510 <fit_ellipse+0x3d0>
mov    %r12,%rbp
xor    %esi,%esi
movapd %xmm0,%xmm1
nopw   0x0(%rax,%rax,1)
movsd  0x0(%rbp,%rbx,1),%xmm2
mulsd  0x0(%rbp),%xmm2
movsd  0x30(%rbp,%rbx,1),%xmm0
addsd  %xmm1,%xmm2
mulsd  0x30(%rbp),%xmm0
addsd  %xmm2,%xmm0
add    $0x2,%rsi
add    $0x60,%rbp
movapd %xmm0,%xmm1
cmp    %rsi,%rdx
jne    1230 <fit_ellipse+0xf0>
test   $0x1,%r15b
je     1280 <fit_ellipse+0x140>
add    %rsi,%rsi
lea    (%rsi,%rsi,2),%rsi
lea    (%rsi,%rdi,1),%rbp
movsd  (%r12,%rbp,8),%xmm1
mulsd  (%r12,%rsi,8),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x130(%rsp,%rcx,8)
test   %r13d,%r13d
jle    11f0 <fit_ellipse+0xb0>
mov    %rcx,%rsi
or     $0x1,%rsi
movsd  0x130(%rsp,%rsi,8),%xmm0
test   %r11,%r11
je     1521 <fit_ellipse+0x3e1>
mov    %r14,%r10
xor    %ebp,%ebp
movapd %xmm0,%xmm1
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  -0x38(%r10,%rbx,1),%xmm2
mulsd  -0x30(%r10),%xmm2
movsd  -0x8(%r10,%rbx,1),%xmm0
addsd  %xmm1,%xmm2
mulsd  (%r10),%xmm0
addsd  %xmm2,%xmm0
add    $0x2,%rbp
add    $0x60,%r10
movapd %xmm0,%xmm1
cmp    %rbp,%rdx
jne    12c0 <fit_ellipse+0x180>
test   $0x1,%r15b
je     1315 <fit_ellipse+0x1d5>
add    %rbp,%rbp
lea    0x0(%rbp,%rbp,2),%rbp
lea    (%rdi,%rbp,1),%rax
movsd  (%r12,%rax,8),%xmm1
mulsd  0x8(%r12,%rbp,8),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x130(%rsp,%rsi,8)
test   %r13d,%r13d
jle    11f0 <fit_ellipse+0xb0>
movsd  0x140(%rsp,%rcx,8),%xmm0
test   %r11,%r11
je     1532 <fit_ellipse+0x3f2>
mov    %r8,%rbp
xor    %esi,%esi
movapd %xmm0,%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  -0x40(%rbp,%rbx,1),%xmm2
mulsd  -0x30(%rbp),%xmm2
movsd  -0x10(%rbp,%rbx,1),%xmm0
addsd  %xmm1,%xmm2
mulsd  0x0(%rbp),%xmm0
addsd  %xmm2,%xmm0
add    $0x2,%rsi
add    $0x60,%rbp
movapd %xmm0,%xmm1
cmp    %rsi,%rdx
jne    1350 <fit_ellipse+0x210>
test   $0x1,%r15b
je     13a1 <fit_ellipse+0x261>
add    %rsi,%rsi
lea    (%rsi,%rsi,2),%rax
lea    (%rax,%rdi,1),%rsi
movsd  (%r12,%rsi,8),%xmm1
mulsd  0x10(%r12,%rax,8),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x140(%rsp,%rcx,8)
test   %r13d,%r13d
jle    11f0 <fit_ellipse+0xb0>
movsd  0x148(%rsp,%rcx,8),%xmm0
test   %r11,%r11
je     1543 <fit_ellipse+0x403>
mov    %r9,%rbp
xor    %esi,%esi
movapd %xmm0,%xmm1
xchg   %ax,%ax
movsd  -0x30(%rbp,%rbx,1),%xmm2
mulsd  -0x18(%rbp),%xmm2
movsd  0x0(%rbp,%rbx,1),%xmm0
addsd  %xmm1,%xmm2
mulsd  0x18(%rbp),%xmm0
addsd  %xmm2,%xmm0
add    $0x2,%rsi
add    $0x60,%rbp
movapd %xmm0,%xmm1
cmp    %rsi,%rdx
jne    13d0 <fit_ellipse+0x290>
test   $0x1,%r15b
je     1421 <fit_ellipse+0x2e1>
add    %rsi,%rsi
lea    (%rsi,%rsi,2),%rax
lea    (%rax,%rdi,1),%rsi
movsd  (%r12,%rsi,8),%xmm1
mulsd  0x18(%r12,%rax,8),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x148(%rsp,%rcx,8)
test   %r13d,%r13d
jle    11f0 <fit_ellipse+0xb0>
movsd  0x150(%rsp,%rcx,8),%xmm0
test   %r11,%r11
je     1554 <fit_ellipse+0x414>
mov    %r9,%rbp
xor    %esi,%esi
movapd %xmm0,%xmm1
xchg   %ax,%ax
movsd  -0x30(%rbp,%rbx,1),%xmm2
mulsd  -0x10(%rbp),%xmm2
movsd  0x0(%rbp,%rbx,1),%xmm0
addsd  %xmm1,%xmm2
mulsd  0x20(%rbp),%xmm0
addsd  %xmm2,%xmm0
add    $0x2,%rsi
add    $0x60,%rbp
movapd %xmm0,%xmm1
cmp    %rsi,%rdx
jne    1450 <fit_ellipse+0x310>
test   $0x1,%r15b
je     14a1 <fit_ellipse+0x361>
add    %rsi,%rsi
lea    (%rsi,%rsi,2),%rax
lea    (%rax,%rdi,1),%rsi
movsd  (%r12,%rsi,8),%xmm1
mulsd  0x20(%r12,%rax,8),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x150(%rsp,%rcx,8)
test   %r13d,%r13d
jle    11f0 <fit_ellipse+0xb0>
movsd  0x158(%rsp,%rcx,8),%xmm0
test   %r11,%r11
je     1565 <fit_ellipse+0x425>
mov    %r9,%rbp
xor    %esi,%esi
movapd %xmm0,%xmm1
xchg   %ax,%ax
movsd  -0x30(%rbp,%rbx,1),%xmm2
mulsd  -0x8(%rbp),%xmm2
movsd  0x0(%rbp,%rbx,1),%xmm0
addsd  %xmm1,%xmm2
mulsd  0x28(%rbp),%xmm0
addsd  %xmm2,%xmm0
add    $0x2,%rsi
add    $0x60,%rbp
movapd %xmm0,%xmm1
cmp    %rsi,%rdx
jne    14d0 <fit_ellipse+0x390>
test   $0x1,%r15b
je     11dc <fit_ellipse+0x9c>
jmp    1571 <fit_ellipse+0x431>
nopl   0x0(%rax,%rax,1)
xor    %esi,%esi
test   $0x1,%r15b
jne    1265 <fit_ellipse+0x125>
jmp    1280 <fit_ellipse+0x140>
xor    %ebp,%ebp
test   $0x1,%r15b
jne    12f8 <fit_ellipse+0x1b8>
jmp    1315 <fit_ellipse+0x1d5>
xor    %esi,%esi
test   $0x1,%r15b
jne    1385 <fit_ellipse+0x245>
jmp    13a1 <fit_ellipse+0x261>
xor    %esi,%esi
test   $0x1,%r15b
jne    1405 <fit_ellipse+0x2c5>
jmp    1421 <fit_ellipse+0x2e1>
xor    %esi,%esi
test   $0x1,%r15b
jne    1485 <fit_ellipse+0x345>
jmp    14a1 <fit_ellipse+0x361>
xor    %esi,%esi
test   $0x1,%r15b
je     11dc <fit_ellipse+0x9c>
add    %rsi,%rsi
lea    (%rsi,%rsi,2),%rax
lea    (%rax,%rdi,1),%rsi
movsd  (%r12,%rsi,8),%xmm1
mulsd  0x28(%r12,%rax,8),%xmm1
addsd  %xmm1,%xmm0
jmp    11dc <fit_ellipse+0x9c>
lea    0x130(%rsp),%rdi
mov    $0x6,%esi
call   1050 <lap_eig@plt>
movsd  0x130(%rsp),%xmm9
movupd 0x138(%rsp),%xmm6
movupd 0x148(%rsp),%xmm8
mov    (%rsp),%rax
movupd (%rax),%xmm0
movupd 0x18(%rax),%xmm14
movapd %xmm0,%xmm5
unpcklpd %xmm0,%xmm5
movapd %xmm5,%xmm4
mulpd  %xmm0,%xmm4
movapd %xmm0,%xmm1
movapd %xmm0,%xmm10
unpckhpd %xmm0,%xmm1
movapd %xmm1,0xc0(%rsp)
movapd %xmm14,%xmm11
mulsd  %xmm1,%xmm11
mulpd  %xmm14,%xmm5
movapd %xmm6,%xmm3
unpcklpd %xmm6,%xmm3
movapd %xmm3,0xb0(%rsp)
movapd %xmm5,%xmm1
unpcklpd %xmm11,%xmm1
mulpd  %xmm3,%xmm1
movapd %xmm9,%xmm7
unpcklpd %xmm9,%xmm7
movapd %xmm7,0xd0(%rsp)
movapd %xmm4,%xmm2
mulpd  %xmm7,%xmm2
addpd  %xmm1,%xmm2
movapd %xmm5,%xmm1
mulpd  %xmm3,%xmm1
addpd  %xmm2,%xmm1
movapd %xmm14,%xmm2
unpcklpd %xmm14,%xmm2
mulpd  %xmm14,%xmm2
movapd %xmm8,%xmm7
unpcklpd %xmm8,%xmm7
movapd %xmm7,0xa0(%rsp)
movapd %xmm2,%xmm3
mulpd  %xmm7,%xmm3
addpd  %xmm1,%xmm3
movapd %xmm3,0xe0(%rsp)
movsd  0x10(%rax),%xmm12
movapd %xmm12,0x30(%rsp)
unpcklpd %xmm12,%xmm12
movapd %xmm14,%xmm7
mulpd  %xmm12,%xmm7
movapd %xmm7,0x90(%rsp)
movapd %xmm6,%xmm1
movapd %xmm6,0x70(%rsp)
movapd %xmm6,%xmm3
mulsd  %xmm7,%xmm3
mulpd  %xmm0,%xmm12
movapd %xmm12,%xmm6
movapd %xmm9,0x20(%rsp)
mulsd  %xmm9,%xmm6
addsd  %xmm3,%xmm6
movsd  0x28(%rax),%xmm13
movapd %xmm13,%xmm7
unpcklpd %xmm13,%xmm7
mulpd  %xmm0,%xmm7
movapd %xmm7,0x80(%rsp)
mulsd  %xmm1,%xmm7
addsd  %xmm6,%xmm7
movapd %xmm1,%xmm3
shufpd $0x1,%xmm1,%xmm3
mulpd  %xmm3,%xmm5
movsd  %xmm7,%xmm5
movapd %xmm14,%xmm1
mulsd  %xmm13,%xmm1
movapd %xmm1,(%rsp)
movsd  %xmm1,%xmm4
movapd %xmm8,%xmm1
unpcklpd %xmm9,%xmm1
movapd %xmm1,0x60(%rsp)
mulpd  %xmm1,%xmm4
addpd  %xmm5,%xmm4
unpcklpd %xmm11,%xmm10
mulpd  %xmm3,%xmm10
movapd %xmm3,%xmm5
addpd  %xmm4,%xmm10
movapd %xmm0,%xmm1
movapd %xmm0,%xmm7
movsd  %xmm13,%xmm1
movapd %xmm1,0x50(%rsp)
movapd 0x30(%rsp),%xmm11
mulsd  %xmm13,%xmm11
movsd  %xmm14,%xmm2
movapd %xmm8,%xmm4
movapd %xmm8,%xmm9
unpckhpd %xmm8,%xmm9
movapd %xmm14,%xmm8
movapd %xmm14,%xmm15
movapd %xmm14,%xmm6
mulpd  %xmm9,%xmm14
movapd %xmm14,0x40(%rsp)
mulsd  %xmm13,%xmm9
mulsd  %xmm13,%xmm13
mulsd  %xmm4,%xmm13
shufpd $0x1,%xmm4,%xmm4
mulpd  %xmm4,%xmm2
addpd  %xmm10,%xmm2
movapd %xmm2,0xf0(%rsp)
unpckhpd %xmm8,%xmm8
movapd 0xc0(%rsp),%xmm0
mulsd  %xmm8,%xmm0
movapd 0x70(%rsp),%xmm10
movapd %xmm10,%xmm3
mulsd  %xmm0,%xmm3
movapd %xmm7,%xmm1
movapd %xmm7,%xmm2
shufpd $0x1,%xmm0,%xmm2
movapd %xmm5,%xmm0
mulpd  %xmm5,%xmm2
movapd 0x90(%rsp),%xmm14
mulpd  %xmm14,%xmm0
unpckhpd %xmm0,%xmm0
movapd %xmm12,%xmm7
unpckhpd %xmm12,%xmm7
mulsd  0x20(%rsp),%xmm7
addsd  %xmm0,%xmm7
movapd 0x80(%rsp),%xmm5
movapd %xmm5,%xmm0
unpckhpd %xmm5,%xmm0
mulsd  %xmm10,%xmm0
addsd  %xmm7,%xmm0
unpcklpd %xmm3,%xmm0
movapd %xmm1,%xmm7
unpckhpd %xmm1,%xmm15
movapd 0x50(%rsp),%xmm1
mulpd  %xmm15,%xmm1
movapd 0x60(%rsp),%xmm3
mulpd  %xmm1,%xmm3
movapd %xmm1,%xmm15
addpd  %xmm0,%xmm3
addpd  %xmm3,%xmm2
mulsd  %xmm8,%xmm8
shufpd $0x1,%xmm8,%xmm6
mulpd  %xmm4,%xmm6
addpd  %xmm2,%xmm6
shufpd $0x1,%xmm6,%xmm6
movapd %xmm6,0x100(%rsp)
mulpd  0xd0(%rsp),%xmm12
movapd 0xb0(%rsp),%xmm1
mulpd  %xmm1,%xmm5
addpd  %xmm5,%xmm12
mulsd  %xmm10,%xmm11
unpckhpd %xmm10,%xmm10
movapd %xmm7,%xmm5
mulpd  %xmm10,%xmm5
addpd  %xmm12,%xmm5
mulpd  %xmm1,%xmm14
addpd  %xmm5,%xmm14
movapd (%rsp),%xmm1
unpcklpd %xmm15,%xmm1
mulpd  0xa0(%rsp),%xmm1
addpd  %xmm14,%xmm1
movapd 0x40(%rsp),%xmm2
addpd  %xmm1,%xmm2
movapd %xmm2,0x110(%rsp)
movapd 0x30(%rsp),%xmm1
mulsd  %xmm1,%xmm10
mulsd  %xmm1,%xmm1
mulsd  0x20(%rsp),%xmm1
addsd  %xmm11,%xmm1
addsd  %xmm10,%xmm1
addsd  %xmm11,%xmm1
addsd  %xmm1,%xmm13
addsd  %xmm9,%xmm13
addsd  %xmm10,%xmm13
addsd  %xmm9,%xmm13
movsd  0x158(%rsp),%xmm0
addsd  %xmm0,%xmm13
movsd  %xmm13,0x120(%rsp)
lea    0xe0(%rsp),%rdi
mov    0x18(%rsp),%rsi
call   1030 <ellipse2param@plt>
add    $0x258,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x696(%rip),%rdi
call   1060 <error@plt>
test   %r12,%r12
jne    116e <fit_ellipse+0x2e>
lea    0x69c(%rip),%rdi
call   1060 <error@plt>
test   %rbp,%rbp
jne    1177 <fit_ellipse+0x37>
lea    0x6a4(%rip),%rdi
call   1060 <error@plt>
jmp    1177 <fit_ellipse+0x37>

LLVM IR (-O0):
@.str = [27 x i8] c"fit_ellipse: invalid size.\00"
@.str.1 = [29 x i8] c"fit_ellipse: invalid buffer.\00"
@.str.2 = [43 x i8] c"fit_ellipse: invalid normalization matrix.\00"
@.str.3 = [37 x i8] c"fit_ellipse: param must be non null.\00"
define void @fit_ellipse(double* %0, double* %1, i32 %2, double* %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca [36 x double]
%13 = alloca [9 x double]
%14 = alloca [9 x double]
store double* %0, double** %5
store double* %1, double** %6
store i32 %2, i32* %7
store double* %3, double** %8
%15 = load i32, i32* %7
%16 = icmp sle i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %4
%18 = call i32 @error(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %17, %4
%20 = load double*, double** %5
%21 = icmp eq double* %20, null
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = call i32 @error(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %22, %19
%25 = load double*, double** %6
%26 = icmp eq double* %25, null
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 @error(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
br label %29
29: ; preds = %27, %24
%30 = load double*, double** %8
%31 = icmp eq double* %30, null
br i1 %31, label %32, label %34
32: ; preds = %29
%33 = call i32 @error(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
br label %34
34: ; preds = %32, %29
store i32 0, i32* %9
br label %35
35: ; preds = %42, %34
%36 = load i32, i32* %9
%37 = icmp slt i32 %36, 36
br i1 %37, label %38, label %45
38: ; preds = %35
%39 = load i32, i32* %9
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [36 x double], [36 x double]* %12, i64 0, i64 %40
store double 0.000000e+00, double* %41
br label %42
42: ; preds = %38
%43 = load i32, i32* %9
%44 = add nsw i32 %43, 1
store i32 %44, i32* %9
br label %35
45: ; preds = %35
store i32 0, i32* %9
br label %46
46: ; preds = %92, %45
%47 = load i32, i32* %9
%48 = icmp slt i32 %47, 6
br i1 %48, label %49, label %95
49: ; preds = %46
store i32 0, i32* %10
br label %50
50: ; preds = %88, %49
%51 = load i32, i32* %10
%52 = icmp slt i32 %51, 6
br i1 %52, label %53, label %91
53: ; preds = %50
store i32 0, i32* %11
br label %54
54: ; preds = %84, %53
%55 = load i32, i32* %11
%56 = load i32, i32* %7
%57 = mul nsw i32 4, %56
%58 = icmp slt i32 %55, %57
br i1 %58, label %59, label %87
59: ; preds = %54
%60 = load double*, double** %5
%61 = load i32, i32* %11
%62 = mul nsw i32 %61, 6
%63 = load i32, i32* %9
%64 = add nsw i32 %62, %63
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds double, double* %60, i64 %65
%67 = load double, double* %66
%68 = load double*, double** %5
%69 = load i32, i32* %11
%70 = mul nsw i32 %69, 6
%71 = load i32, i32* %10
%72 = add nsw i32 %70, %71
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds double, double* %68, i64 %73
%75 = load double, double* %74
%76 = load i32, i32* %9
%77 = mul nsw i32 %76, 6
%78 = load i32, i32* %10
%79 = add nsw i32 %77, %78
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [36 x double], [36 x double]* %12, i64 0, i64 %80
%82 = load double, double* %81
%83 = call double @llvm.fmuladd.f64(double %67, double %75, double %82)
store double %83, double* %81
br label %84
84: ; preds = %59
%85 = load i32, i32* %11
%86 = add nsw i32 %85, 1
store i32 %86, i32* %11
br label %54
87: ; preds = %54
br label %88
88: ; preds = %87
%89 = load i32, i32* %10
%90 = add nsw i32 %89, 1
store i32 %90, i32* %10
br label %50
91: ; preds = %50
br label %92
92: ; preds = %91
%93 = load i32, i32* %9
%94 = add nsw i32 %93, 1
store i32 %94, i32* %9
br label %46
95: ; preds = %46
%96 = getelementptr inbounds [36 x double], [36 x double]* %12, i64 0, i64 0
%97 = call i32 @lap_eig(double* %96, i32 6)
%98 = getelementptr inbounds [36 x double], [36 x double]* %12, i64 0, i64 0
%99 = load double, double* %98
%100 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 0
store double %99, double* %100
%101 = getelementptr inbounds [36 x double], [36 x double]* %12, i64 0, i64 1
%102 = load double, double* %101
%103 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 3
store double %102, double* %103
%104 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 1
store double %102, double* %104
%105 = getelementptr inbounds [36 x double], [36 x double]* %12, i64 0, i64 2
%106 = load double, double* %105
%107 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 6
store double %106, double* %107
%108 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 2
store double %106, double* %108
%109 = getelementptr inbounds [36 x double], [36 x double]* %12, i64 0, i64 3
%110 = load double, double* %109
%111 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 4
store double %110, double* %111
%112 = getelementptr inbounds [36 x double], [36 x double]* %12, i64 0, i64 4
%113 = load double, double* %112
%114 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 7
store double %113, double* %114
%115 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 5
store double %113, double* %115
%116 = getelementptr inbounds [36 x double], [36 x double]* %12, i64 0, i64 5
%117 = load double, double* %116
%118 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 8
store double %117, double* %118
%119 = load double*, double** %6
%120 = getelementptr inbounds double, double* %119, i64 0
%121 = load double, double* %120
%122 = load double*, double** %6
%123 = getelementptr inbounds double, double* %122, i64 0
%124 = load double, double* %123
%125 = fmul double %121, %124
%126 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 0
%127 = load double, double* %126
%128 = load double*, double** %6
%129 = getelementptr inbounds double, double* %128, i64 0
%130 = load double, double* %129
%131 = load double*, double** %6
%132 = getelementptr inbounds double, double* %131, i64 3
%133 = load double, double* %132
%134 = fmul double %130, %133
%135 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 3
%136 = load double, double* %135
%137 = fmul double %134, %136
%138 = call double @llvm.fmuladd.f64(double %125, double %127, double %137)
%139 = load double*, double** %6
%140 = getelementptr inbounds double, double* %139, i64 0
%141 = load double, double* %140
%142 = load double*, double** %6
%143 = getelementptr inbounds double, double* %142, i64 3
%144 = load double, double* %143
%145 = fmul double %141, %144
%146 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 1
%147 = load double, double* %146
%148 = call double @llvm.fmuladd.f64(double %145, double %147, double %138)
%149 = load double*, double** %6
%150 = getelementptr inbounds double, double* %149, i64 3
%151 = load double, double* %150
%152 = load double*, double** %6
%153 = getelementptr inbounds double, double* %152, i64 3
%154 = load double, double* %153
%155 = fmul double %151, %154
%156 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 4
%157 = load double, double* %156
%158 = call double @llvm.fmuladd.f64(double %155, double %157, double %148)
%159 = getelementptr inbounds [9 x double], [9 x double]* %14, i64 0, i64 0
store double %158, double* %159
%160 = load double*, double** %6
%161 = getelementptr inbounds double, double* %160, i64 0
%162 = load double, double* %161
%163 = load double*, double** %6
%164 = getelementptr inbounds double, double* %163, i64 1
%165 = load double, double* %164
%166 = fmul double %162, %165
%167 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 0
%168 = load double, double* %167
%169 = load double*, double** %6
%170 = getelementptr inbounds double, double* %169, i64 1
%171 = load double, double* %170
%172 = load double*, double** %6
%173 = getelementptr inbounds double, double* %172, i64 3
%174 = load double, double* %173
%175 = fmul double %171, %174
%176 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 3
%177 = load double, double* %176
%178 = fmul double %175, %177
%179 = call double @llvm.fmuladd.f64(double %166, double %168, double %178)
%180 = load double*, double** %6
%181 = getelementptr inbounds double, double* %180, i64 0
%182 = load double, double* %181
%183 = load double*, double** %6
%184 = getelementptr inbounds double, double* %183, i64 4
%185 = load double, double* %184
%186 = fmul double %182, %185
%187 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 1
%188 = load double, double* %187
%189 = call double @llvm.fmuladd.f64(double %186, double %188, double %179)
%190 = load double*, double** %6
%191 = getelementptr inbounds double, double* %190, i64 3
%192 = load double, double* %191
%193 = load double*, double** %6
%194 = getelementptr inbounds double, double* %193, i64 4
%195 = load double, double* %194
%196 = fmul double %192, %195
%197 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 4
%198 = load double, double* %197
%199 = call double @llvm.fmuladd.f64(double %196, double %198, double %189)
%200 = getelementptr inbounds [9 x double], [9 x double]* %14, i64 0, i64 1
store double %199, double* %200
%201 = load double*, double** %6
%202 = getelementptr inbounds double, double* %201, i64 0
%203 = load double, double* %202
%204 = load double*, double** %6
%205 = getelementptr inbounds double, double* %204, i64 2
%206 = load double, double* %205
%207 = fmul double %203, %206
%208 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 0
%209 = load double, double* %208
%210 = load double*, double** %6
%211 = getelementptr inbounds double, double* %210, i64 2
%212 = load double, double* %211
%213 = load double*, double** %6
%214 = getelementptr inbounds double, double* %213, i64 3
%215 = load double, double* %214
%216 = fmul double %212, %215
%217 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 3
%218 = load double, double* %217
%219 = fmul double %216, %218
%220 = call double @llvm.fmuladd.f64(double %207, double %209, double %219)
%221 = load double*, double** %6
%222 = getelementptr inbounds double, double* %221, i64 0
%223 = load double, double* %222
%224 = load double*, double** %6
%225 = getelementptr inbounds double, double* %224, i64 5
%226 = load double, double* %225
%227 = fmul double %223, %226
%228 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 1
%229 = load double, double* %228
%230 = call double @llvm.fmuladd.f64(double %227, double %229, double %220)
%231 = load double*, double** %6
%232 = getelementptr inbounds double, double* %231, i64 3
%233 = load double, double* %232
%234 = load double*, double** %6
%235 = getelementptr inbounds double, double* %234, i64 5
%236 = load double, double* %235
%237 = fmul double %233, %236
%238 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 4
%239 = load double, double* %238
%240 = call double @llvm.fmuladd.f64(double %237, double %239, double %230)
%241 = load double*, double** %6
%242 = getelementptr inbounds double, double* %241, i64 0
%243 = load double, double* %242
%244 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 2
%245 = load double, double* %244
%246 = call double @llvm.fmuladd.f64(double %243, double %245, double %240)
%247 = load double*, double** %6
%248 = getelementptr inbounds double, double* %247, i64 3
%249 = load double, double* %248
%250 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 5
%251 = load double, double* %250
%252 = call double @llvm.fmuladd.f64(double %249, double %251, double %246)
%253 = getelementptr inbounds [9 x double], [9 x double]* %14, i64 0, i64 2
store double %252, double* %253
%254 = load double*, double** %6
%255 = getelementptr inbounds double, double* %254, i64 0
%256 = load double, double* %255
%257 = load double*, double** %6
%258 = getelementptr inbounds double, double* %257, i64 1
%259 = load double, double* %258
%260 = fmul double %256, %259
%261 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 0
%262 = load double, double* %261
%263 = load double*, double** %6
%264 = getelementptr inbounds double, double* %263, i64 0
%265 = load double, double* %264
%266 = load double*, double** %6
%267 = getelementptr inbounds double, double* %266, i64 4
%268 = load double, double* %267
%269 = fmul double %265, %268
%270 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 3
%271 = load double, double* %270
%272 = fmul double %269, %271
%273 = call double @llvm.fmuladd.f64(double %260, double %262, double %272)
%274 = load double*, double** %6
%275 = getelementptr inbounds double, double* %274, i64 1
%276 = load double, double* %275
%277 = load double*, double** %6
%278 = getelementptr inbounds double, double* %277, i64 3
%279 = load double, double* %278
%280 = fmul double %276, %279
%281 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 1
%282 = load double, double* %281
%283 = call double @llvm.fmuladd.f64(double %280, double %282, double %273)
%284 = load double*, double** %6
%285 = getelementptr inbounds double, double* %284, i64 3
%286 = load double, double* %285
%287 = load double*, double** %6
%288 = getelementptr inbounds double, double* %287, i64 4
%289 = load double, double* %288
%290 = fmul double %286, %289
%291 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 4
%292 = load double, double* %291
%293 = call double @llvm.fmuladd.f64(double %290, double %292, double %283)
%294 = getelementptr inbounds [9 x double], [9 x double]* %14, i64 0, i64 3
store double %293, double* %294
%295 = load double*, double** %6
%296 = getelementptr inbounds double, double* %295, i64 1
%297 = load double, double* %296
%298 = load double*, double** %6
%299 = getelementptr inbounds double, double* %298, i64 1
%300 = load double, double* %299
%301 = fmul double %297, %300
%302 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 0
%303 = load double, double* %302
%304 = load double*, double** %6
%305 = getelementptr inbounds double, double* %304, i64 1
%306 = load double, double* %305
%307 = load double*, double** %6
%308 = getelementptr inbounds double, double* %307, i64 4
%309 = load double, double* %308
%310 = fmul double %306, %309
%311 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 3
%312 = load double, double* %311
%313 = fmul double %310, %312
%314 = call double @llvm.fmuladd.f64(double %301, double %303, double %313)
%315 = load double*, double** %6
%316 = getelementptr inbounds double, double* %315, i64 1
%317 = load double, double* %316
%318 = load double*, double** %6
%319 = getelementptr inbounds double, double* %318, i64 4
%320 = load double, double* %319
%321 = fmul double %317, %320
%322 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 1
%323 = load double, double* %322
%324 = call double @llvm.fmuladd.f64(double %321, double %323, double %314)
%325 = load double*, double** %6
%326 = getelementptr inbounds double, double* %325, i64 4
%327 = load double, double* %326
%328 = load double*, double** %6
%329 = getelementptr inbounds double, double* %328, i64 4
%330 = load double, double* %329
%331 = fmul double %327, %330
%332 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 4
%333 = load double, double* %332
%334 = call double @llvm.fmuladd.f64(double %331, double %333, double %324)
%335 = getelementptr inbounds [9 x double], [9 x double]* %14, i64 0, i64 4
store double %334, double* %335
%336 = load double*, double** %6
%337 = getelementptr inbounds double, double* %336, i64 1
%338 = load double, double* %337
%339 = load double*, double** %6
%340 = getelementptr inbounds double, double* %339, i64 2
%341 = load double, double* %340
%342 = fmul double %338, %341
%343 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 0
%344 = load double, double* %343
%345 = load double*, double** %6
%346 = getelementptr inbounds double, double* %345, i64 2
%347 = load double, double* %346
%348 = load double*, double** %6
%349 = getelementptr inbounds double, double* %348, i64 4
%350 = load double, double* %349
%351 = fmul double %347, %350
%352 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 3
%353 = load double, double* %352
%354 = fmul double %351, %353
%355 = call double @llvm.fmuladd.f64(double %342, double %344, double %354)
%356 = load double*, double** %6
%357 = getelementptr inbounds double, double* %356, i64 1
%358 = load double, double* %357
%359 = load double*, double** %6
%360 = getelementptr inbounds double, double* %359, i64 5
%361 = load double, double* %360
%362 = fmul double %358, %361
%363 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 1
%364 = load double, double* %363
%365 = call double @llvm.fmuladd.f64(double %362, double %364, double %355)
%366 = load double*, double** %6
%367 = getelementptr inbounds double, double* %366, i64 4
%368 = load double, double* %367
%369 = load double*, double** %6
%370 = getelementptr inbounds double, double* %369, i64 5
%371 = load double, double* %370
%372 = fmul double %368, %371
%373 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 4
%374 = load double, double* %373
%375 = call double @llvm.fmuladd.f64(double %372, double %374, double %365)
%376 = load double*, double** %6
%377 = getelementptr inbounds double, double* %376, i64 1
%378 = load double, double* %377
%379 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 2
%380 = load double, double* %379
%381 = call double @llvm.fmuladd.f64(double %378, double %380, double %375)
%382 = load double*, double** %6
%383 = getelementptr inbounds double, double* %382, i64 4
%384 = load double, double* %383
%385 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 5
%386 = load double, double* %385
%387 = call double @llvm.fmuladd.f64(double %384, double %386, double %381)
%388 = getelementptr inbounds [9 x double], [9 x double]* %14, i64 0, i64 5
store double %387, double* %388
%389 = load double*, double** %6
%390 = getelementptr inbounds double, double* %389, i64 0
%391 = load double, double* %390
%392 = load double*, double** %6
%393 = getelementptr inbounds double, double* %392, i64 2
%394 = load double, double* %393
%395 = fmul double %391, %394
%396 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 0
%397 = load double, double* %396
%398 = load double*, double** %6
%399 = getelementptr inbounds double, double* %398, i64 0
%400 = load double, double* %399
%401 = load double*, double** %6
%402 = getelementptr inbounds double, double* %401, i64 5
%403 = load double, double* %402
%404 = fmul double %400, %403
%405 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 3
%406 = load double, double* %405
%407 = fmul double %404, %406
%408 = call double @llvm.fmuladd.f64(double %395, double %397, double %407)
%409 = load double*, double** %6
%410 = getelementptr inbounds double, double* %409, i64 0
%411 = load double, double* %410
%412 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 6
%413 = load double, double* %412
%414 = call double @llvm.fmuladd.f64(double %411, double %413, double %408)
%415 = load double*, double** %6
%416 = getelementptr inbounds double, double* %415, i64 2
%417 = load double, double* %416
%418 = load double*, double** %6
%419 = getelementptr inbounds double, double* %418, i64 3
%420 = load double, double* %419
%421 = fmul double %417, %420
%422 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 1
%423 = load double, double* %422
%424 = call double @llvm.fmuladd.f64(double %421, double %423, double %414)
%425 = load double*, double** %6
%426 = getelementptr inbounds double, double* %425, i64 3
%427 = load double, double* %426
%428 = load double*, double** %6
%429 = getelementptr inbounds double, double* %428, i64 5
%430 = load double, double* %429
%431 = fmul double %427, %430
%432 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 4
%433 = load double, double* %432
%434 = call double @llvm.fmuladd.f64(double %431, double %433, double %424)
%435 = load double*, double** %6
%436 = getelementptr inbounds double, double* %435, i64 3
%437 = load double, double* %436
%438 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 7
%439 = load double, double* %438
%440 = call double @llvm.fmuladd.f64(double %437, double %439, double %434)
%441 = getelementptr inbounds [9 x double], [9 x double]* %14, i64 0, i64 6
store double %440, double* %441
%442 = load double*, double** %6
%443 = getelementptr inbounds double, double* %442, i64 1
%444 = load double, double* %443
%445 = load double*, double** %6
%446 = getelementptr inbounds double, double* %445, i64 2
%447 = load double, double* %446
%448 = fmul double %444, %447
%449 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 0
%450 = load double, double* %449
%451 = load double*, double** %6
%452 = getelementptr inbounds double, double* %451, i64 1
%453 = load double, double* %452
%454 = load double*, double** %6
%455 = getelementptr inbounds double, double* %454, i64 5
%456 = load double, double* %455
%457 = fmul double %453, %456
%458 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 3
%459 = load double, double* %458
%460 = fmul double %457, %459
%461 = call double @llvm.fmuladd.f64(double %448, double %450, double %460)
%462 = load double*, double** %6
%463 = getelementptr inbounds double, double* %462, i64 1
%464 = load double, double* %463
%465 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 6
%466 = load double, double* %465
%467 = call double @llvm.fmuladd.f64(double %464, double %466, double %461)
%468 = load double*, double** %6
%469 = getelementptr inbounds double, double* %468, i64 2
%470 = load double, double* %469
%471 = load double*, double** %6
%472 = getelementptr inbounds double, double* %471, i64 4
%473 = load double, double* %472
%474 = fmul double %470, %473
%475 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 1
%476 = load double, double* %475
%477 = call double @llvm.fmuladd.f64(double %474, double %476, double %467)
%478 = load double*, double** %6
%479 = getelementptr inbounds double, double* %478, i64 4
%480 = load double, double* %479
%481 = load double*, double** %6
%482 = getelementptr inbounds double, double* %481, i64 5
%483 = load double, double* %482
%484 = fmul double %480, %483
%485 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 4
%486 = load double, double* %485
%487 = call double @llvm.fmuladd.f64(double %484, double %486, double %477)
%488 = load double*, double** %6
%489 = getelementptr inbounds double, double* %488, i64 4
%490 = load double, double* %489
%491 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 7
%492 = load double, double* %491
%493 = call double @llvm.fmuladd.f64(double %490, double %492, double %487)
%494 = getelementptr inbounds [9 x double], [9 x double]* %14, i64 0, i64 7
store double %493, double* %494
%495 = load double*, double** %6
%496 = getelementptr inbounds double, double* %495, i64 2
%497 = load double, double* %496
%498 = load double*, double** %6
%499 = getelementptr inbounds double, double* %498, i64 2
%500 = load double, double* %499
%501 = fmul double %497, %500
%502 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 0
%503 = load double, double* %502
%504 = load double*, double** %6
%505 = getelementptr inbounds double, double* %504, i64 2
%506 = load double, double* %505
%507 = load double*, double** %6
%508 = getelementptr inbounds double, double* %507, i64 5
%509 = load double, double* %508
%510 = fmul double %506, %509
%511 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 3
%512 = load double, double* %511
%513 = fmul double %510, %512
%514 = call double @llvm.fmuladd.f64(double %501, double %503, double %513)
%515 = load double*, double** %6
%516 = getelementptr inbounds double, double* %515, i64 2
%517 = load double, double* %516
%518 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 6
%519 = load double, double* %518
%520 = call double @llvm.fmuladd.f64(double %517, double %519, double %514)
%521 = load double*, double** %6
%522 = getelementptr inbounds double, double* %521, i64 2
%523 = load double, double* %522
%524 = load double*, double** %6
%525 = getelementptr inbounds double, double* %524, i64 5
%526 = load double, double* %525
%527 = fmul double %523, %526
%528 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 1
%529 = load double, double* %528
%530 = call double @llvm.fmuladd.f64(double %527, double %529, double %520)
%531 = load double*, double** %6
%532 = getelementptr inbounds double, double* %531, i64 5
%533 = load double, double* %532
%534 = load double*, double** %6
%535 = getelementptr inbounds double, double* %534, i64 5
%536 = load double, double* %535
%537 = fmul double %533, %536
%538 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 4
%539 = load double, double* %538
%540 = call double @llvm.fmuladd.f64(double %537, double %539, double %530)
%541 = load double*, double** %6
%542 = getelementptr inbounds double, double* %541, i64 5
%543 = load double, double* %542
%544 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 7
%545 = load double, double* %544
%546 = call double @llvm.fmuladd.f64(double %543, double %545, double %540)
%547 = load double*, double** %6
%548 = getelementptr inbounds double, double* %547, i64 2
%549 = load double, double* %548
%550 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 2
%551 = load double, double* %550
%552 = call double @llvm.fmuladd.f64(double %549, double %551, double %546)
%553 = load double*, double** %6
%554 = getelementptr inbounds double, double* %553, i64 5
%555 = load double, double* %554
%556 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 5
%557 = load double, double* %556
%558 = call double @llvm.fmuladd.f64(double %555, double %557, double %552)
%559 = getelementptr inbounds [9 x double], [9 x double]* %13, i64 0, i64 8
%560 = load double, double* %559
%561 = fadd double %558, %560
%562 = getelementptr inbounds [9 x double], [9 x double]* %14, i64 0, i64 8
store double %561, double* %562
%563 = getelementptr inbounds [9 x double], [9 x double]* %14, i64 0, i64 0
%564 = load double*, double** %8
%565 = call i32 @ellipse2param(double* %563, double* %564)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"fit_ellipse: invalid size.\00"
@.str.1 = [29 x i8] c"fit_ellipse: invalid buffer.\00"
@.str.2 = [43 x i8] c"fit_ellipse: invalid normalization matrix.\00"
@.str.3 = [37 x i8] c"fit_ellipse: param must be non null.\00"
define void @fit_ellipse(double* %0, double* %1, i32 %2, double* %3) {
%5 = alloca [36 x double]
%6 = bitcast [36 x double]* %5 to i8*
%7 = alloca [9 x double]
%8 = icmp slt i32 %2, 1
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = tail call i32 @error(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %4
%12 = icmp eq double* %0, null
br i1 %12, label %13, label %15
13: ; preds = %11
%14 = tail call i32 @error(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %11
%16 = icmp eq double* %1, null
br i1 %16, label %17, label %19
17: ; preds = %15
%18 = tail call i32 @error(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
br label %19
19: ; preds = %17, %15
%20 = icmp eq double* %3, null
br i1 %20, label %21, label %23
21: ; preds = %19
%22 = tail call i32 @error(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
br label %23
23: ; preds = %21, %19
%24 = shl i32 %2, 2
%25 = icmp sgt i32 %2, 0
%26 = call i32 @llvm.smax.i32(i32 %24, i32 1)
%27 = zext i32 %26 to i64
%28 = add nsw i64 %27, -1
%29 = and i64 %27, 1
%30 = icmp eq i64 %28, 0
%31 = and i64 %27, 2147483644
%32 = icmp eq i64 %29, 0
%33 = and i64 %27, 1
%34 = icmp eq i64 %28, 0
%35 = and i64 %27, 2147483644
%36 = icmp eq i64 %33, 0
%37 = and i64 %27, 1
%38 = icmp eq i64 %28, 0
%39 = and i64 %27, 2147483644
%40 = icmp eq i64 %37, 0
%41 = and i64 %27, 1
%42 = icmp eq i64 %28, 0
%43 = and i64 %27, 2147483644
%44 = icmp eq i64 %41, 0
%45 = and i64 %27, 1
%46 = icmp eq i64 %28, 0
%47 = and i64 %27, 2147483644
%48 = icmp eq i64 %45, 0
%49 = and i64 %27, 1
%50 = icmp eq i64 %28, 0
%51 = and i64 %27, 2147483644
%52 = icmp eq i64 %49, 0
br label %53
53: ; preds = %23, %310
%54 = phi i64 [ 0, %23 ], [ %311, %310 ]
%55 = mul nuw nsw i64 %54, 6
br i1 %25, label %56, label %310
56: ; preds = %53
%57 = getelementptr inbounds [36 x double], [36 x double]* %5, i64 0, i64 %55
%58 = load double, double* %57
br i1 %30, label %81, label %59
59: ; preds = %56, %59
%60 = phi i64 [ %78, %59 ], [ 0, %56 ]
%61 = phi double [ %77, %59 ], [ %58, %56 ]
%62 = phi i64 [ %79, %59 ], [ 0, %56 ]
%63 = mul nuw nsw i64 %60, 6
%64 = add nuw nsw i64 %63, %54
%65 = getelementptr inbounds double, double* %0, i64 %64
%66 = load double, double* %65
%67 = getelementptr inbounds double, double* %0, i64 %63
%68 = load double, double* %67
%69 = tail call double @llvm.fmuladd.f64(double %66, double %68, double %61)
%70 = or i64 %60, 1
%71 = mul nuw nsw i64 %70, 6
%72 = add nuw nsw i64 %71, %54
%73 = getelementptr inbounds double, double* %0, i64 %72
%74 = load double, double* %73
%75 = getelementptr inbounds double, double* %0, i64 %71
%76 = load double, double* %75
%77 = tail call double @llvm.fmuladd.f64(double %74, double %76, double %69)
%78 = add nuw nsw i64 %60, 2
%79 = add i64 %62, 2
%80 = icmp eq i64 %79, %31
br i1 %80, label %81, label %59
81: ; preds = %59, %56
%82 = phi double [ undef, %56 ], [ %77, %59 ]
%83 = phi i64 [ 0, %56 ], [ %78, %59 ]
%84 = phi double [ %58, %56 ], [ %77, %59 ]
br i1 %32, label %93, label %85
85: ; preds = %81
%86 = mul nuw nsw i64 %83, 6
%87 = add nuw nsw i64 %86, %54
%88 = getelementptr inbounds double, double* %0, i64 %87
%89 = load double, double* %88
%90 = getelementptr inbounds double, double* %0, i64 %86
%91 = load double, double* %90
%92 = tail call double @llvm.fmuladd.f64(double %89, double %91, double %84)
br label %93
93: ; preds = %81, %85
%94 = phi double [ %82, %81 ], [ %92, %85 ]
store double %94, double* %57
br i1 %25, label %95, label %310
95: ; preds = %93
%96 = or i64 %55, 1
%97 = getelementptr inbounds [36 x double], [36 x double]* %5, i64 0, i64 %96
%98 = load double, double* %97
br i1 %34, label %123, label %99
99: ; preds = %95, %99
%100 = phi i64 [ %120, %99 ], [ 0, %95 ]
%101 = phi double [ %119, %99 ], [ %98, %95 ]
%102 = phi i64 [ %121, %99 ], [ 0, %95 ]
%103 = mul nuw nsw i64 %100, 6
%104 = add nuw nsw i64 %103, %54
%105 = getelementptr inbounds double, double* %0, i64 %104
%106 = load double, double* %105
%107 = or i64 %103, 1
%108 = getelementptr inbounds double, double* %0, i64 %107
%109 = load double, double* %108
%110 = tail call double @llvm.fmuladd.f64(double %106, double %109, double %101)
%111 = or i64 %100, 1
%112 = mul nuw nsw i64 %111, 6
%113 = add nuw nsw i64 %112, %54
%114 = getelementptr inbounds double, double* %0, i64 %113
%115 = load double, double* %114
%116 = or i64 %112, 1
%117 = getelementptr inbounds double, double* %0, i64 %116
%118 = load double, double* %117
%119 = tail call double @llvm.fmuladd.f64(double %115, double %118, double %110)
%120 = add nuw nsw i64 %100, 2
%121 = add i64 %102, 2
%122 = icmp eq i64 %121, %35
br i1 %122, label %123, label %99
123: ; preds = %99, %95
%124 = phi double [ undef, %95 ], [ %119, %99 ]
%125 = phi i64 [ 0, %95 ], [ %120, %99 ]
%126 = phi double [ %98, %95 ], [ %119, %99 ]
br i1 %36, label %136, label %127
127: ; preds = %123
%128 = mul nuw nsw i64 %125, 6
%129 = add nuw nsw i64 %128, %54
%130 = getelementptr inbounds double, double* %0, i64 %129
%131 = load double, double* %130
%132 = or i64 %128, 1
%133 = getelementptr inbounds double, double* %0, i64 %132
%134 = load double, double* %133
%135 = tail call double @llvm.fmuladd.f64(double %131, double %134, double %126)
br label %136
136: ; preds = %123, %127
%137 = phi double [ %124, %123 ], [ %135, %127 ]
store double %137, double* %97
br i1 %25, label %138, label %310
138: ; preds = %136
%139 = add nuw nsw i64 %55, 2
%140 = getelementptr inbounds [36 x double], [36 x double]* %5, i64 0, i64 %139
%141 = load double, double* %140
br i1 %38, label %166, label %142
142: ; preds = %138, %142
%143 = phi i64 [ %163, %142 ], [ 0, %138 ]
%144 = phi double [ %162, %142 ], [ %141, %138 ]
%145 = phi i64 [ %164, %142 ], [ 0, %138 ]
%146 = mul nuw nsw i64 %143, 6
%147 = add nuw nsw i64 %146, %54
%148 = getelementptr inbounds double, double* %0, i64 %147
%149 = load double, double* %148
%150 = or i64 %146, 2
%151 = getelementptr inbounds double, double* %0, i64 %150
%152 = load double, double* %151
%153 = tail call double @llvm.fmuladd.f64(double %149, double %152, double %144)
%154 = or i64 %143, 1
%155 = mul nuw nsw i64 %154, 6
%156 = add nuw nsw i64 %155, %54
%157 = getelementptr inbounds double, double* %0, i64 %156
%158 = load double, double* %157
%159 = add nuw nsw i64 %155, 2
%160 = getelementptr inbounds double, double* %0, i64 %159
%161 = load double, double* %160
%162 = tail call double @llvm.fmuladd.f64(double %158, double %161, double %153)
%163 = add nuw nsw i64 %143, 2
%164 = add i64 %145, 2
%165 = icmp eq i64 %164, %39
br i1 %165, label %166, label %142
166: ; preds = %142, %138
%167 = phi double [ undef, %138 ], [ %162, %142 ]
%168 = phi i64 [ 0, %138 ], [ %163, %142 ]
%169 = phi double [ %141, %138 ], [ %162, %142 ]
br i1 %40, label %179, label %170
170: ; preds = %166
%171 = mul nuw nsw i64 %168, 6
%172 = add nuw nsw i64 %171, %54
%173 = getelementptr inbounds double, double* %0, i64 %172
%174 = load double, double* %173
%175 = add nuw nsw i64 %171, 2
%176 = getelementptr inbounds double, double* %0, i64 %175
%177 = load double, double* %176
%178 = tail call double @llvm.fmuladd.f64(double %174, double %177, double %169)
br label %179
179: ; preds = %166, %170
%180 = phi double [ %167, %166 ], [ %178, %170 ]
store double %180, double* %140
br i1 %25, label %181, label %310
181: ; preds = %179
%182 = add nuw nsw i64 %55, 3
%183 = getelementptr inbounds [36 x double], [36 x double]* %5, i64 0, i64 %182
%184 = load double, double* %183
br i1 %42, label %209, label %185
185: ; preds = %181, %185
%186 = phi i64 [ %206, %185 ], [ 0, %181 ]
%187 = phi double [ %205, %185 ], [ %184, %181 ]
%188 = phi i64 [ %207, %185 ], [ 0, %181 ]
%189 = mul nuw nsw i64 %186, 6
%190 = add nuw nsw i64 %189, %54
%191 = getelementptr inbounds double, double* %0, i64 %190
%192 = load double, double* %191
%193 = or i64 %189, 3
%194 = getelementptr inbounds double, double* %0, i64 %193
%195 = load double, double* %194
%196 = tail call double @llvm.fmuladd.f64(double %192, double %195, double %187)
%197 = or i64 %186, 1
%198 = mul nuw nsw i64 %197, 6
%199 = add nuw nsw i64 %198, %54
%200 = getelementptr inbounds double, double* %0, i64 %199
%201 = load double, double* %200
%202 = add nuw nsw i64 %198, 3
%203 = getelementptr inbounds double, double* %0, i64 %202
%204 = load double, double* %203
%205 = tail call double @llvm.fmuladd.f64(double %201, double %204, double %196)
%206 = add nuw nsw i64 %186, 2
%207 = add i64 %188, 2
%208 = icmp eq i64 %207, %43
br i1 %208, label %209, label %185
209: ; preds = %185, %181
%210 = phi double [ undef, %181 ], [ %205, %185 ]
%211 = phi i64 [ 0, %181 ], [ %206, %185 ]
%212 = phi double [ %184, %181 ], [ %205, %185 ]
br i1 %44, label %222, label %213
213: ; preds = %209
%214 = mul nuw nsw i64 %211, 6
%215 = add nuw nsw i64 %214, %54
%216 = getelementptr inbounds double, double* %0, i64 %215
%217 = load double, double* %216
%218 = add nuw nsw i64 %214, 3
%219 = getelementptr inbounds double, double* %0, i64 %218
%220 = load double, double* %219
%221 = tail call double @llvm.fmuladd.f64(double %217, double %220, double %212)
br label %222
222: ; preds = %209, %213
%223 = phi double [ %210, %209 ], [ %221, %213 ]
store double %223, double* %183
br i1 %25, label %224, label %310
224: ; preds = %222
%225 = add nuw nsw i64 %55, 4
%226 = getelementptr inbounds [36 x double], [36 x double]* %5, i64 0, i64 %225
%227 = load double, double* %226
br i1 %46, label %252, label %228
228: ; preds = %224, %228
%229 = phi i64 [ %249, %228 ], [ 0, %224 ]
%230 = phi double [ %248, %228 ], [ %227, %224 ]
%231 = phi i64 [ %250, %228 ], [ 0, %224 ]
%232 = mul nuw nsw i64 %229, 6
%233 = add nuw nsw i64 %232, %54
%234 = getelementptr inbounds double, double* %0, i64 %233
%235 = load double, double* %234
%236 = add nuw nsw i64 %232, 4
%237 = getelementptr inbounds double, double* %0, i64 %236
%238 = load double, double* %237
%239 = tail call double @llvm.fmuladd.f64(double %235, double %238, double %230)
%240 = or i64 %229, 1
%241 = mul nuw nsw i64 %240, 6
%242 = add nuw nsw i64 %241, %54
%243 = getelementptr inbounds double, double* %0, i64 %242
%244 = load double, double* %243
%245 = add nuw nsw i64 %241, 4
%246 = getelementptr inbounds double, double* %0, i64 %245
%247 = load double, double* %246
%248 = tail call double @llvm.fmuladd.f64(double %244, double %247, double %239)
%249 = add nuw nsw i64 %229, 2
%250 = add i64 %231, 2
%251 = icmp eq i64 %250, %47
br i1 %251, label %252, label %228
252: ; preds = %228, %224
%253 = phi double [ undef, %224 ], [ %248, %228 ]
%254 = phi i64 [ 0, %224 ], [ %249, %228 ]
%255 = phi double [ %227, %224 ], [ %248, %228 ]
br i1 %48, label %265, label %256
256: ; preds = %252
%257 = mul nuw nsw i64 %254, 6
%258 = add nuw nsw i64 %257, %54
%259 = getelementptr inbounds double, double* %0, i64 %258
%260 = load double, double* %259
%261 = add nuw nsw i64 %257, 4
%262 = getelementptr inbounds double, double* %0, i64 %261
%263 = load double, double* %262
%264 = tail call double @llvm.fmuladd.f64(double %260, double %263, double %255)
br label %265
265: ; preds = %252, %256
%266 = phi double [ %253, %252 ], [ %264, %256 ]
store double %266, double* %226
br i1 %25, label %267, label %310
267: ; preds = %265
%268 = add nuw nsw i64 %55, 5
%269 = getelementptr inbounds [36 x double], [36 x double]* %5, i64 0, i64 %268
%270 = load double, double* %269
br i1 %50, label %295, label %271
271: ; preds = %267, %271
%272 = phi i64 [ %292, %271 ], [ 0, %267 ]
%273 = phi double [ %291, %271 ], [ %270, %267 ]
%274 = phi i64 [ %293, %271 ], [ 0, %267 ]
%275 = mul nuw nsw i64 %272, 6
%276 = add nuw nsw i64 %275, %54
%277 = getelementptr inbounds double, double* %0, i64 %276
%278 = load double, double* %277
%279 = add nuw nsw i64 %275, 5
%280 = getelementptr inbounds double, double* %0, i64 %279
%281 = load double, double* %280
%282 = tail call double @llvm.fmuladd.f64(double %278, double %281, double %273)
%283 = or i64 %272, 1
%284 = mul nuw nsw i64 %283, 6
%285 = add nuw nsw i64 %284, %54
%286 = getelementptr inbounds double, double* %0, i64 %285
%287 = load double, double* %286
%288 = add nuw nsw i64 %284, 5
%289 = getelementptr inbounds double, double* %0, i64 %288
%290 = load double, double* %289
%291 = tail call double @llvm.fmuladd.f64(double %287, double %290, double %282)
%292 = add nuw nsw i64 %272, 2
%293 = add i64 %274, 2
%294 = icmp eq i64 %293, %51
br i1 %294, label %295, label %271
295: ; preds = %271, %267
%296 = phi double [ undef, %267 ], [ %291, %271 ]
%297 = phi i64 [ 0, %267 ], [ %292, %271 ]
%298 = phi double [ %270, %267 ], [ %291, %271 ]
br i1 %52, label %308, label %299
299: ; preds = %295
%300 = mul nuw nsw i64 %297, 6
%301 = add nuw nsw i64 %300, %54
%302 = getelementptr inbounds double, double* %0, i64 %301
%303 = load double, double* %302
%304 = add nuw nsw i64 %300, 5
%305 = getelementptr inbounds double, double* %0, i64 %304
%306 = load double, double* %305
%307 = tail call double @llvm.fmuladd.f64(double %303, double %306, double %298)
br label %308
308: ; preds = %295, %299
%309 = phi double [ %296, %295 ], [ %307, %299 ]
store double %309, double* %269
br label %310
310: ; preds = %53, %93, %136, %179, %222, %308, %265
%311 = add nuw nsw i64 %54, 1
%312 = icmp eq i64 %311, 6
br i1 %312, label %313, label %53
313: ; preds = %310
%314 = getelementptr inbounds [36 x double], [36 x double]* %5, i64 0, i64 0
%315 = call i32 @lap_eig(double* %314, i32 6)
%316 = load double, double* %314
%317 = getelementptr inbounds [36 x double], [36 x double]* %5, i64 0, i64 1
%318 = bitcast double* %317 to <2 x double>*
%319 = load <2 x double>, <2 x double>* %318
%320 = shufflevector <2 x double> %319, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%321 = getelementptr inbounds [36 x double], [36 x double]* %5, i64 0, i64 3
%322 = bitcast double* %321 to <2 x double>*
%323 = load <2 x double>, <2 x double>* %322
%324 = shufflevector <2 x double> %323, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%325 = getelementptr inbounds [36 x double], [36 x double]* %5, i64 0, i64 5
%326 = load double, double* %325
%327 = bitcast [9 x double]* %7 to i8*
%328 = getelementptr inbounds double, double* %1, i64 3
%329 = getelementptr inbounds [9 x double], [9 x double]* %7, i64 0, i64 0
%330 = bitcast double* %1 to <2 x double>*
%331 = load <2 x double>, <2 x double>* %330
%332 = shufflevector <2 x double> %331, <2 x double> poison, <2 x i32> zeroinitializer
%333 = fmul <2 x double> %332, %331
%334 = bitcast double* %328 to <2 x double>*
%335 = load <2 x double>, <2 x double>* %334
%336 = extractelement <2 x double> %335, i64 0
%337 = extractelement <2 x double> %331, i64 1
%338 = fmul double %336, %337
%339 = fmul <2 x double> %332, %335
%340 = extractelement <2 x double> %319, i64 0
%341 = shufflevector <2 x double> %319, <2 x double> undef, <2 x i32> zeroinitializer
%342 = insertelement <2 x double> %339, double %338, i64 1
%343 = fmul <2 x double> %341, %342
%344 = insertelement <2 x double> poison, double %316, i64 0
%345 = shufflevector <2 x double> %344, <2 x double> poison, <2 x i32> zeroinitializer
%346 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %333, <2 x double> %345, <2 x double> %343)
%347 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %339, <2 x double> %341, <2 x double> %346)
%348 = shufflevector <2 x double> %335, <2 x double> poison, <2 x i32> zeroinitializer
%349 = fmul <2 x double> %348, %335
%350 = extractelement <2 x double> %323, i64 0
%351 = shufflevector <2 x double> %323, <2 x double> poison, <2 x i32> zeroinitializer
%352 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %349, <2 x double> %351, <2 x double> %347)
%353 = bitcast [9 x double]* %7 to <2 x double>*
store <2 x double> %352, <2 x double>* %353
%354 = getelementptr inbounds double, double* %1, i64 2
%355 = load double, double* %354
%356 = insertelement <2 x double> poison, double %355, i64 0
%357 = shufflevector <2 x double> %356, <2 x double> poison, <2 x i32> zeroinitializer
%358 = fmul <2 x double> %335, %357
%359 = extractelement <2 x double> %358, i64 0
%360 = fmul double %340, %359
%361 = fmul <2 x double> %331, %357
%362 = extractelement <2 x double> %361, i64 0
%363 = call double @llvm.fmuladd.f64(double %362, double %316, double %360)
%364 = getelementptr inbounds double, double* %1, i64 5
%365 = load double, double* %364
%366 = insertelement <2 x double> poison, double %365, i64 0
%367 = shufflevector <2 x double> %366, <2 x double> poison, <2 x i32> zeroinitializer
%368 = fmul <2 x double> %331, %367
%369 = extractelement <2 x double> %368, i64 0
%370 = call double @llvm.fmuladd.f64(double %369, double %340, double %363)
%371 = fmul double %336, %365
%372 = getelementptr inbounds [9 x double], [9 x double]* %7, i64 0, i64 2
%373 = fmul <2 x double> %320, %339
%374 = insertelement <2 x double> poison, double %371, i64 0
%375 = insertelement <2 x double> %333, double %371, i64 0
%376 = insertelement <2 x double> %323, double %316, i64 1
%377 = insertelement <2 x double> %373, double %370, i64 0
%378 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %375, <2 x double> %376, <2 x double> %377)
%379 = insertelement <2 x double> %331, double %338, i64 1
%380 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %379, <2 x double> %320, <2 x double> %378)
%381 = shufflevector <2 x double> %335, <2 x double> %349, <2 x i32> <i32 0, i32 3>
%382 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %381, <2 x double> %324, <2 x double> %380)
%383 = bitcast double* %372 to <2 x double>*
store <2 x double> %382, <2 x double>* %383
%384 = extractelement <2 x double> %335, i64 1
%385 = fmul double %337, %384
%386 = fmul double %340, %385
%387 = fmul double %384, %384
%388 = getelementptr inbounds [9 x double], [9 x double]* %7, i64 0, i64 4
%389 = fmul <2 x double> %320, %358
%390 = extractelement <2 x double> %389, i64 1
%391 = extractelement <2 x double> %361, i64 1
%392 = call double @llvm.fmuladd.f64(double %391, double %316, double %390)
%393 = extractelement <2 x double> %368, i64 1
%394 = call double @llvm.fmuladd.f64(double %393, double %340, double %392)
%395 = shufflevector <2 x double> %335, <2 x double> undef, <2 x i32> <i32 1, i32 undef>
%396 = shufflevector <2 x double> %395, <2 x double> %331, <2 x i32> <i32 0, i32 3>
%397 = insertelement <2 x double> %331, double %365, i64 0
%398 = fmul <2 x double> %396, %397
%399 = insertelement <2 x double> poison, double %394, i64 0
%400 = insertelement <2 x double> %399, double %386, i64 1
%401 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %398, <2 x double> %376, <2 x double> %400)
%402 = insertelement <2 x double> poison, double %337, i64 0
%403 = insertelement <2 x double> %402, double %385, i64 1
%404 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %403, <2 x double> %320, <2 x double> %401)
%405 = insertelement <2 x double> %395, double %387, i64 1
%406 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %405, <2 x double> %324, <2 x double> %404)
%407 = shufflevector <2 x double> %406, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%408 = bitcast double* %388 to <2 x double>*
store <2 x double> %407, <2 x double>* %408
%409 = extractelement <2 x double> %319, i64 1
%410 = extractelement <2 x double> %323, i64 1
%411 = getelementptr inbounds [9 x double], [9 x double]* %7, i64 0, i64 6
%412 = fmul <2 x double> %341, %368
%413 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %361, <2 x double> %345, <2 x double> %412)
%414 = shufflevector <2 x double> %319, <2 x double> undef, <2 x i32> <i32 1, i32 1>
%415 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %331, <2 x double> %414, <2 x double> %413)
%416 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %358, <2 x double> %341, <2 x double> %415)
%417 = shufflevector <2 x double> %374, <2 x double> %398, <2 x i32> <i32 0, i32 2>
%418 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %417, <2 x double> %351, <2 x double> %416)
%419 = shufflevector <2 x double> %323, <2 x double> undef, <2 x i32> <i32 1, i32 1>
%420 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %335, <2 x double> %419, <2 x double> %418)
%421 = bitcast double* %411 to <2 x double>*
store <2 x double> %420, <2 x double>* %421
%422 = fmul double %355, %355
%423 = fmul double %355, %365
%424 = fmul double %340, %423
%425 = call double @llvm.fmuladd.f64(double %422, double %316, double %424)
%426 = call double @llvm.fmuladd.f64(double %355, double %409, double %425)
%427 = call double @llvm.fmuladd.f64(double %423, double %340, double %426)
%428 = fmul double %365, %365
%429 = call double @llvm.fmuladd.f64(double %428, double %350, double %427)
%430 = call double @llvm.fmuladd.f64(double %365, double %410, double %429)
%431 = call double @llvm.fmuladd.f64(double %355, double %409, double %430)
%432 = call double @llvm.fmuladd.f64(double %365, double %410, double %431)
%433 = fadd double %326, %432
%434 = getelementptr inbounds [9 x double], [9 x double]* %7, i64 0, i64 8
store double %433, double* %434
%435 = call i32 @ellipse2param(double* %329, double* %3)
ret void
}