#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 find_roots(int, double *, double **);
int /*<<< orphan*/ free(double *);
int /*<<< orphan*/ memcpy(double *, double *, int);
double *xmalloc(int);
scalar_t__ xrealloc(double *, int);
int find_optima(int *deg, double **coeff, double skewness, double **optima) {
  int n, nop, s;
  double *op, *res;
  nop = find_roots(deg[0], coeff[0], &res);
  if (!nop)
    res = xmalloc(sizeof(double));
  n = find_roots(deg[1], coeff[1], &op);
  if (n) {
    res = (double *)xrealloc(res, (n + nop) * sizeof(double));
    memcpy(res + nop, op, n * sizeof(double));
    free(op);
    nop += n;
  }
  for (n = 0; n < nop; n++)
    res[n] /= skewness;
  for (s = 0; s < 2; s++) {
    double *deriv, *c, sp;
    int d, i;
    d = deg[s];
    deriv = (double *)xmalloc((d + 1) * sizeof(double));
    c = (double *)xmalloc((d + 1) * sizeof(double));
    sp = 1.;
    for (i = 0; i <= d; i++) {
      c[i] = coeff[s][i] * sp;
      sp *= skewness;
    }
    for (i = 0; i < d; i++)
      deriv[i] = -c[i + 1] * (double)(i + 1);
    deriv[d] = 0.;
    for (i = 0; i < d; i++)
      deriv[i + 1] += c[i] * (double)(d - i);
    while (d)
      if (deriv[d])
        break;
      else
        d--;
    n = find_roots(d, deriv, &op);
    if (n) {
      res = (double *)xrealloc(res, (n + nop) * sizeof(double));
      memcpy(res + nop, op, n * sizeof(double));
      free(op);
      nop += n;
    }
    free(deriv);
    free(c);
  }
  nop += 2;
  res = (double *)xrealloc(res, nop * sizeof(double));
  res[nop - 2] = -1e20;
  res[nop - 1] = 1e20;
  *optima = res;
  return nop;
}


x86 assembly (clang, -O0):
<find_optima>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    -0x40(%rbp),%rdx
call   1040 <find_roots@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jne    119a <find_optima+0x4a>
mov    $0x8,%edi
call   1060 <xmalloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    -0x38(%rbp),%rdx
call   1040 <find_roots@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     120e <find_optima+0xbe>
mov    -0x40(%rbp),%rdi
mov    -0x24(%rbp),%eax
add    -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%esi
call   1050 <xrealloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
movslq -0x28(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x38(%rbp),%rsi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1070 <memcpy@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x24(%rbp),%eax
add    -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    124a <find_optima+0xfa>
movsd  -0x18(%rbp),%xmm1
mov    -0x40(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1215 <find_optima+0xc5>
movl   $0x0,-0x2c(%rbp)
cmpl   $0x2,-0x2c(%rbp)
jge    149a <find_optima+0x34a>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <xmalloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <xmalloc@plt>
mov    %rax,-0x50(%rbp)
movsd  0xd71(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jg     12fb <find_optima+0x1ab>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x58(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    12ab <find_optima+0x15b>
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jge    1360 <find_optima+0x210>
mov    -0x50(%rbp),%rax
mov    -0x60(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x60(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x48(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1302 <find_optima+0x1b2>
mov    -0x48(%rbp),%rax
movslq -0x5c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jge    13c7 <find_optima+0x277>
mov    -0x50(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x5c(%rbp),%eax
sub    -0x60(%rbp),%eax
cvtsi2sd %eax,%xmm2
mov    -0x48(%rbp),%rax
mov    -0x60(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1377 <find_optima+0x227>
jmp    13cc <find_optima+0x27c>
cmpl   $0x0,-0x5c(%rbp)
je     140e <find_optima+0x2be>
mov    -0x48(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    13fb <find_optima+0x2ab>
jp     13fb <find_optima+0x2ab>
jmp    1400 <find_optima+0x2b0>
jmp    140e <find_optima+0x2be>
mov    -0x5c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x5c(%rbp)
jmp    13cc <find_optima+0x27c>
mov    -0x5c(%rbp),%edi
mov    -0x48(%rbp),%rsi
lea    -0x38(%rbp),%rdx
call   1040 <find_roots@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     147a <find_optima+0x32a>
mov    -0x40(%rbp),%rdi
mov    -0x24(%rbp),%eax
add    -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%esi
call   1050 <xrealloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
movslq -0x28(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x38(%rbp),%rsi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1070 <memcpy@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x24(%rbp),%eax
add    -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1251 <find_optima+0x101>
mov    -0x28(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x28(%rbp)
mov    -0x40(%rbp),%rdi
movslq -0x28(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%esi
call   1050 <xrealloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    -0x28(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  0xb39(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
mov    -0x28(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xb17(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_optima>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rdx,%r15
movapd %xmm0,0x20(%rsp)
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%edi
mov    (%rsi),%rsi
mov    %rsp,%rdx
call   1040 <find_roots@plt>
mov    %eax,%r12d
test   %eax,%eax
jne    118f <find_optima+0x3f>
mov    $0x8,%edi
call   1060 <xmalloc@plt>
mov    %rax,(%rsp)
mov    0x4(%rbx),%edi
mov    0x8(%r14),%rsi
lea    0x8(%rsp),%rdx
call   1040 <find_roots@plt>
test   %eax,%eax
mov    %r15,0x38(%rsp)
je     11e7 <find_optima+0x97>
mov    %eax,%ebp
mov    (%rsp),%rdi
lea    (%r12,%rbp,1),%r15d
lea    0x0(,%r15,8),%esi
call   1050 <xrealloc@plt>
mov    %rax,(%rsp)
movslq %r12d,%rcx
lea    (%rax,%rcx,8),%rdi
mov    0x8(%rsp),%rsi
shl    $0x3,%ebp
mov    %ebp,%edx
call   1070 <memcpy@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    %r15d,%r12d
movapd 0x20(%rsp),%xmm3
test   %r12d,%r12d
jle    12a7 <find_optima+0x157>
mov    (%rsp),%rax
mov    %r12d,%ecx
cmp    $0x1,%r12d
jne    120a <find_optima+0xba>
xor    %edx,%edx
jmp    1290 <find_optima+0x140>
mov    %ecx,%edx
and    $0xfffffffe,%edx
movapd %xmm3,%xmm0
unpcklpd %xmm3,%xmm0
lea    -0x2(%rdx),%rsi
mov    %rsi,%rbp
shr    %rbp
add    $0x1,%rbp
test   %rsi,%rsi
je     180f <find_optima+0x6bf>
mov    %rbp,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %edi,%edi
nopw   0x0(%rax,%rax,1)
movupd (%rax,%rdi,8),%xmm1
movupd 0x10(%rax,%rdi,8),%xmm2
divpd  %xmm0,%xmm1
movupd %xmm1,(%rax,%rdi,8)
divpd  %xmm0,%xmm2
movupd %xmm2,0x10(%rax,%rdi,8)
add    $0x4,%rdi
add    $0xfffffffffffffffe,%rsi
jne    1240 <find_optima+0xf0>
test   $0x1,%bpl
je     127c <find_optima+0x12c>
movupd (%rax,%rdi,8),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,(%rax,%rdi,8)
cmp    %rcx,%rdx
je     12a7 <find_optima+0x157>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%rax,%rdx,8),%xmm0
divsd  %xmm3,%xmm0
movsd  %xmm0,(%rax,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1290 <find_optima+0x140>
mov    %r12,0x10(%rsp)
mov    %r14,0x40(%rsp)
mov    $0x1,%r12b
xor    %r15d,%r15d
mov    %rbx,0x18(%rsp)
jmp    12eb <find_optima+0x19b>
xchg   %ax,%ax
mov    0x18(%rsp),%rbx
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0x1,%r15d
test   $0x1,%r12b
mov    $0x0,%r12d
je     17be <find_optima+0x66e>
movslq (%rbx,%r15,4),%r13
lea    0x8(,%r13,8),%ebx
mov    %ebx,%edi
call   1060 <xmalloc@plt>
mov    %rax,%rbp
mov    %ebx,%edi
call   1060 <xmalloc@plt>
mov    %rax,%r14
test   %r13,%r13
js     1370 <find_optima+0x220>
mov    %r13d,%eax
mov    0x40(%rsp),%rcx
mov    (%rcx,%r15,8),%rdx
lea    0x1(%rax),%rsi
mov    %esi,%ecx
and    $0x3,%ecx
cmp    $0x3,%rax
movapd 0x20(%rsp),%xmm2
jae    1390 <find_optima+0x240>
xor    %edi,%edi
movsd  0xcc5(%rip),%xmm0
xorpd  %xmm8,%xmm8
movapd 0xcf8(%rip),%xmm7
movapd 0xcf0(%rip),%xmm6
movdqa 0xcb7(%rip),%xmm9
movdqa 0xcbe(%rip),%xmm10
movdqa 0xcc5(%rip),%xmm11
jmp    142b <find_optima+0x2db>
movq   $0x0,0x0(%rbp,%r13,8)
xorpd  %xmm8,%xmm8
jmp    1740 <find_optima+0x5f0>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
and    $0xfffffffc,%esi
xor    %edi,%edi
movsd  0xc63(%rip),%xmm0
xorpd  %xmm8,%xmm8
movapd 0xc96(%rip),%xmm7
movapd 0xc8e(%rip),%xmm6
movdqa 0xc55(%rip),%xmm9
movdqa 0xc5c(%rip),%xmm10
movdqa 0xc63(%rip),%xmm11
nopl   (%rax)
movsd  (%rdx,%rdi,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%r14,%rdi,8)
mulsd  %xmm2,%xmm0
movsd  0x8(%rdx,%rdi,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%r14,%rdi,8)
mulsd  %xmm2,%xmm0
movsd  0x10(%rdx,%rdi,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%r14,%rdi,8)
mulsd  %xmm2,%xmm0
movsd  0x18(%rdx,%rdi,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%r14,%rdi,8)
mulsd  %xmm2,%xmm0
add    $0x4,%rdi
cmp    %rdi,%rsi
jne    13d0 <find_optima+0x280>
test   %rcx,%rcx
je     145b <find_optima+0x30b>
lea    (%r14,%rdi,8),%rsi
lea    (%rdx,%rdi,8),%rdx
xor    %edi,%edi
nopw   0x0(%rax,%rax,1)
movsd  (%rdx,%rdi,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rsi,%rdi,8)
mulsd  %xmm2,%xmm0
add    $0x1,%rdi
cmp    %rdi,%rcx
jne    1440 <find_optima+0x2f0>
test   %r13d,%r13d
jle    1520 <find_optima+0x3d0>
cmp    $0x4,%eax
jb     1492 <find_optima+0x342>
lea    (%r14,%rax,8),%rcx
add    $0x8,%rcx
cmp    %rcx,%rbp
jae    152e <find_optima+0x3de>
lea    0x0(,%rax,8),%rcx
add    %rbp,%rcx
lea    0x8(%r14),%rdx
cmp    %rcx,%rdx
jae    152e <find_optima+0x3de>
xor    %ecx,%ecx
mov    %rcx,%rdx
test   $0x1,%al
je     14bd <find_optima+0x36d>
mov    %rcx,%rdx
or     $0x1,%rdx
movsd  (%r14,%rdx,8),%xmm0
xorpd  %xmm6,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%rbp,%rcx,8)
not    %rcx
add    %rax,%rcx
je     15c0 <find_optima+0x470>
nopl   0x0(%rax)
movsd  0x8(%r14,%rdx,8),%xmm0
xorpd  %xmm7,%xmm0
lea    0x1(%rdx),%ecx
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%rbp,%rdx,8)
lea    0x2(%rdx),%rcx
movsd  0x10(%r14,%rdx,8),%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
xorpd  %xmm7,%xmm0
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rbp,%rdx,8)
mov    %rcx,%rdx
cmp    %rcx,%rax
jne    14d0 <find_optima+0x380>
jmp    15c0 <find_optima+0x470>
nopl   0x0(%rax)
movq   $0x0,0x0(%rbp,%r13,8)
jmp    1730 <find_optima+0x5e0>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
movq   %rdx,%xmm0
pshufd $0x44,%xmm0,%xmm1
movdqa %xmm1,%xmm2
por    %xmm9,%xmm2
por    %xmm10,%xmm0
paddq  %xmm11,%xmm1
movq   %xmm2,%rsi
movupd (%r14,%rsi,8),%xmm3
movupd 0x10(%r14,%rsi,8),%xmm4
xorpd  %xmm6,%xmm3
xorpd  %xmm6,%xmm4
pshufd $0xfa,%xmm2,%xmm2
movd   %esi,%xmm5
movss  %xmm5,%xmm2
pshufd $0xee,%xmm1,%xmm1
punpckldq %xmm1,%xmm0
cvtdq2pd %xmm2,%xmm1
mulpd  %xmm3,%xmm1
cvtdq2pd %xmm0,%xmm0
mulpd  %xmm4,%xmm0
movupd %xmm1,0x0(%rbp,%rdx,8)
movupd %xmm0,0x10(%rbp,%rdx,8)
add    $0x4,%rdx
cmp    %rdx,%rcx
jne    1540 <find_optima+0x3f0>
cmp    %rax,%rcx
jne    1494 <find_optima+0x344>
nopl   0x0(%rax,%rax,1)
movq   $0x0,0x0(%rbp,%r13,8)
test   %r13d,%r13d
movdqa 0xa8c(%rip),%xmm6
movdqa 0xa94(%rip),%xmm7
jle    1730 <find_optima+0x5e0>
cmp    $0x4,%eax
jb     160c <find_optima+0x4bc>
lea    0x8(%rbp),%rcx
lea    (%r14,%rax,8),%rdx
cmp    %rdx,%rcx
jae    16a2 <find_optima+0x552>
lea    0x8(,%rax,8),%rcx
add    %rbp,%rcx
cmp    %rcx,%r14
jae    16a2 <find_optima+0x552>
xor    %ecx,%ecx
mov    %rcx,%rdx
test   $0x1,%al
je     163a <find_optima+0x4ea>
mov    %r13d,%edx
sub    %ecx,%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
mov    %rcx,%rdx
mulsd  (%r14,%rcx,8),%xmm0
or     $0x1,%rdx
addsd  0x0(%rbp,%rdx,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rdx,8)
not    %rcx
add    %rax,%rcx
je     1730 <find_optima+0x5e0>
mov    %edx,%ecx
neg    %ecx
mov    %edx,%esi
not    %esi
xchg   %ax,%ax
lea    (%rax,%rcx,1),%edi
xorps  %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
mulsd  (%r14,%rdx,8),%xmm0
addsd  0x8(%rbp,%rdx,8),%xmm0
movsd  %xmm0,0x8(%rbp,%rdx,8)
lea    (%rsi,%rax,1),%edi
xorps  %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
mulsd  0x8(%r14,%rdx,8),%xmm0
addsd  0x10(%rbp,%rdx,8),%xmm0
movsd  %xmm0,0x10(%rbp,%rdx,8)
lea    0x2(%rdx),%rdi
add    $0xfffffffffffffffe,%rcx
add    $0xfffffffffffffffe,%rsi
mov    %rdi,%rdx
cmp    %rdi,%rax
jne    1650 <find_optima+0x500>
jmp    1730 <find_optima+0x5e0>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
movd   %r13d,%xmm0
pshufd $0x50,%xmm0,%xmm0
lea    0x0(,%rax,8),%rdx
and    $0xffffffffffffffe0,%rdx
xor    %esi,%esi
movdqa 0x989(%rip),%xmm1
nopw   0x0(%rax,%rax,1)
movupd (%r14,%rsi,1),%xmm2
movupd 0x10(%r14,%rsi,1),%xmm3
movdqa %xmm0,%xmm4
psubd  %xmm1,%xmm4
cvtdq2pd %xmm4,%xmm5
psubd  %xmm6,%xmm4
mulpd  %xmm2,%xmm5
cvtdq2pd %xmm4,%xmm2
mulpd  %xmm3,%xmm2
movupd 0x8(%rbp,%rsi,1),%xmm3
addpd  %xmm5,%xmm3
movupd 0x18(%rbp,%rsi,1),%xmm4
addpd  %xmm2,%xmm4
movupd %xmm3,0x8(%rbp,%rsi,1)
movupd %xmm4,0x18(%rbp,%rsi,1)
paddd  %xmm7,%xmm1
add    $0x20,%rsi
cmp    %rsi,%rdx
jne    16d0 <find_optima+0x580>
cmp    %rax,%rcx
jne    160e <find_optima+0x4be>
nop
test   %rax,%rax
je     1759 <find_optima+0x609>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  0x0(%rbp,%r13,8),%xmm0
ucomisd %xmm8,%xmm0
jne    175c <find_optima+0x60c>
jp     175c <find_optima+0x60c>
add    $0xffffffffffffffff,%r13
test   %r13d,%r13d
jne    1740 <find_optima+0x5f0>
xor    %r13d,%r13d
mov    %r13d,%edi
mov    %rbp,%rsi
lea    0x8(%rsp),%rdx
call   1040 <find_roots@plt>
test   %eax,%eax
je     12c0 <find_optima+0x170>
mov    %eax,%ebx
mov    (%rsp),%rdi
mov    0x10(%rsp),%r13
lea    (%rbx,%r13,1),%r15d
lea    0x0(,%r15,8),%esi
call   1050 <xrealloc@plt>
mov    %rax,(%rsp)
movslq %r13d,%rcx
lea    (%rax,%rcx,8),%rdi
mov    0x8(%rsp),%rsi
shl    $0x3,%ebx
mov    %ebx,%edx
call   1070 <memcpy@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    %r15,0x10(%rsp)
jmp    12c0 <find_optima+0x170>
mov    0x10(%rsp),%rbp
lea    0x2(%rbp),%ebx
mov    (%rsp),%rdi
lea    0x10(,%rbp,8),%esi
call   1050 <xrealloc@plt>
movslq %ebp,%rcx
movabs $0xc415af1d78b58c40,%rdx
af 15 c4
mov    %rdx,(%rax,%rcx,8)
movabs $0x4415af1d78b58c40,%rdx
af 15 44
mov    %rdx,0x8(%rax,%rcx,8)
mov    0x38(%rsp),%rcx
mov    %rax,(%rcx)
mov    %ebx,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edi,%edi
test   $0x1,%bpl
jne    126e <find_optima+0x11e>
jmp    127c <find_optima+0x12c>

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

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