#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double atan(double);
double cos(double);
double fabs(double);
double pow(double, double);
double sin(double);
double sqrt(double);
void CUBICROOTS(double p[], double r[][5]) {
  double s, t, b, c, d;
  int k;
  if (p[0] != 1.0) {
    for (k = 1; k < 4; k++)
      p[k] = p[k] / p[0];
    p[0] = 1.0;
  }
  s = p[1] / 3.0;
  t = s * p[1];
  b = 0.5 * (s * (t / 1.5 - p[2]) + p[3]);
  t = (t - p[2]) / 3.0;
  c = t * t * t;
  d = b * b - c;
  if (d >= 0.0) {
    d = pow((sqrt(d) + fabs(b)), 1.0 / 3.0);
    if (d != 0.0) {
      if (b > 0.0)
        b = -d;
      else
        b = d;
      c = t / b;
    }
    d = r[2][2] = sqrt(0.75) * (b - c);
    b = b + c;
    c = r[1][2] = -0.5 * b - s;
    if ((b > 0.0 && s <= 0.0) || (b < 0.0 && s > 0.0)) {
      r[1][1] = c;
      r[2][1] = -d;
      r[1][3] = b - s;
      r[2][3] = 0.0;
    } else {
      r[1][1] = b - s;
      r[2][1] = 0.0;
      r[1][3] = c;
      r[2][3] = -d;
    }
  } else {
    if (b == 0.0)
      d = atan(1.0) / 1.5;
    else
      d = atan(sqrt(-d) / fabs(b)) / 3.0;
    if (b < 0.0)
      b = 2.0 * sqrt(t);
    else
      b = -2.0 * sqrt(t);
    c = cos(d) * b;
    t = -sqrt(0.75) * sin(d) * b - 0.5 * c;
    d = -t - c - s;
    c = c - s;
    t = t - s;
    if (fabs(c) > fabs(t)) {
      r[1][3] = c;
    } else {
      r[1][3] = t;
      t = c;
    }
    if (fabs(d) > fabs(t)) {
      r[1][2] = d;
    } else {
      r[1][2] = t;
      t = d;
    }
    r[1][1] = t;
    for (k = 1; k < 4; k++)
      r[2][k] = 0.0;
  }
  return;
}


x86 assembly (clang, -O0):
<CUBICROOTS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xe90(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1185 <CUBICROOTS+0x35>
jp     1185 <CUBICROOTS+0x35>
jmp    11d6 <CUBICROOTS+0x86>
movl   $0x1,-0x3c(%rbp)
cmpl   $0x4,-0x3c(%rbp)
jge    11c6 <CUBICROOTS+0x76>
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
divsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    118c <CUBICROOTS+0x3c>
mov    -0x8(%rbp),%rax
movsd  0xe2e(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  0xe21(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  0xe03(%rip),%xmm0
divsd  %xmm0,%xmm2
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xdd5(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm0
movsd  0xdae(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     14bf <CUBICROOTS+0x36f>
movsd  -0x38(%rbp),%xmm0
call   1070 <sqrt@plt>
movsd  -0x28(%rbp),%xmm1
movaps 0xd7e(%rip),%xmm2
pand   %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  0xd56(%rip),%xmm1
call   1060 <pow@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1309 <CUBICROOTS+0x1b9>
jp     1309 <CUBICROOTS+0x1b9>
jmp    135a <CUBICROOTS+0x20a>
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1341 <CUBICROOTS+0x1f1>
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    134b <CUBICROOTS+0x1fb>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xcce(%rip),%xmm0
call   1070 <sqrt@plt>
movsd  -0x28(%rbp),%xmm1
subsd  -0x30(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x60(%rax)
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xc85(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x38(%rax)
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    13f1 <CUBICROOTS+0x2a1>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jae    1411 <CUBICROOTS+0x2c1>
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1468 <CUBICROOTS+0x318>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1468 <CUBICROOTS+0x318>
movsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x58(%rax)
movsd  -0x28(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x40(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x68(%rax)
jmp    14ba <CUBICROOTS+0x36a>
movsd  -0x28(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x30(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x58(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x68(%rax)
jmp    1753 <CUBICROOTS+0x603>
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    14fa <CUBICROOTS+0x3aa>
jp     14fa <CUBICROOTS+0x3aa>
movsd  0xb21(%rip),%xmm0
call   1040 <atan@plt>
movsd  0xb2c(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1545 <CUBICROOTS+0x3f5>
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1070 <sqrt@plt>
movsd  -0x28(%rbp),%xmm1
movaps 0xb29(%rip),%xmm2
pand   %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1040 <atan@plt>
movsd  0xacc(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1576 <CUBICROOTS+0x426>
movsd  -0x20(%rbp),%xmm0
call   1070 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xac0(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1594 <CUBICROOTS+0x444>
movsd  -0x20(%rbp),%xmm0
call   1070 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xa95(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1050 <cos@plt>
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xa80(%rip),%xmm0
call   1070 <sqrt@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  0xa1c(%rip),%xmm1
mulsd  -0x30(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
subsd  -0x30(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x30(%rbp),%xmm0
movaps 0x9de(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
movaps 0x9ce(%rip),%xmm2
pand   %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    16a3 <CUBICROOTS+0x553>
movsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x40(%rax)
jmp    16bb <CUBICROOTS+0x56b>
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x38(%rbp),%xmm0
movaps 0x989(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
movaps 0x979(%rip),%xmm2
pand   %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    16f8 <CUBICROOTS+0x5a8>
movsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x38(%rax)
jmp    1710 <CUBICROOTS+0x5c0>
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x38(%rax)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movl   $0x1,-0x3c(%rbp)
cmpl   $0x4,-0x3c(%rbp)
jge    174e <CUBICROOTS+0x5fe>
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,0x50(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1725 <CUBICROOTS+0x5d5>
jmp    1753 <CUBICROOTS+0x603>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CUBICROOTS>:
push   %rbx
sub    $0x40,%rsp
mov    %rsi,%rbx
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm2
ucomisd 0xe97(%rip),%xmm1
jne    116d <CUBICROOTS+0x1d>
jnp    1197 <CUBICROOTS+0x47>
divsd  %xmm1,%xmm2
movsd  %xmm2,0x8(%rdi)
movupd 0x10(%rdi),%xmm0
unpcklpd %xmm1,%xmm1
divpd  %xmm1,%xmm0
movupd %xmm0,0x10(%rdi)
movabs $0x3ff0000000000000,%rax
mov    %rax,(%rdi)
jmp    119c <CUBICROOTS+0x4c>
movupd 0x10(%rdi),%xmm0
movsd  0xe64(%rip),%xmm1
movapd %xmm2,%xmm3
divsd  %xmm1,%xmm3
mulsd  %xmm3,%xmm2
movapd %xmm2,%xmm4
divsd  0xe54(%rip),%xmm4
subsd  %xmm0,%xmm4
subsd  %xmm0,%xmm2
unpckhpd %xmm0,%xmm0
mulsd  %xmm3,%xmm4
addsd  %xmm0,%xmm4
mulsd  0xe40(%rip),%xmm4
divsd  %xmm1,%xmm2
movapd %xmm2,%xmm5
mulsd  %xmm2,%xmm5
mulsd  %xmm2,%xmm5
movapd %xmm4,%xmm0
mulsd  %xmm4,%xmm0
subsd  %xmm5,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
movsd  %xmm3,0x28(%rsp)
movapd %xmm4,0x10(%rsp)
movsd  %xmm2,0x30(%rsp)
jae    1246 <CUBICROOTS+0xf6>
ucomisd %xmm1,%xmm4
jne    12c9 <CUBICROOTS+0x179>
jp     12c9 <CUBICROOTS+0x179>
movsd  0xdd8(%rip),%xmm0
call   1040 <atan@plt>
movsd  0x30(%rsp),%xmm0
movsd  0xe05(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
jmp    13d3 <CUBICROOTS+0x283>
movsd  %xmm5,0x8(%rsp)
jb     1254 <CUBICROOTS+0x104>
sqrtsd %xmm0,%xmm0
jmp    125f <CUBICROOTS+0x10f>
call   1070 <sqrt@plt>
movapd 0x10(%rsp),%xmm4
movapd 0xde9(%rip),%xmm2
andpd  %xmm4,%xmm2
addsd  %xmm0,%xmm2
movsd  0xda9(%rip),%xmm1
movapd %xmm2,%xmm0
call   1060 <pow@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    128c <CUBICROOTS+0x13c>
jnp    12f3 <CUBICROOTS+0x1a3>
movapd 0xdcc(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
cmpltsd 0x10(%rsp),%xmm3
andpd  %xmm3,%xmm2
andnpd %xmm0,%xmm3
orpd   %xmm2,%xmm3
movsd  0x30(%rsp),%xmm0
divsd  %xmm3,%xmm0
movapd %xmm3,%xmm4
movapd %xmm0,%xmm2
movsd  0x28(%rsp),%xmm3
jmp    1305 <CUBICROOTS+0x1b5>
movapd 0xd8f(%rip),%xmm1
xorpd  %xmm0,%xmm1
movsd  0xd5b(%rip),%xmm2
ucomisd %xmm0,%xmm2
jb     139b <CUBICROOTS+0x24b>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    13aa <CUBICROOTS+0x25a>
movsd  0x28(%rsp),%xmm3
movapd 0x10(%rsp),%xmm4
movsd  0x8(%rsp),%xmm2
movapd %xmm4,%xmm0
subsd  %xmm2,%xmm0
mulsd  0xd13(%rip),%xmm0
movsd  %xmm0,0x60(%rbx)
addsd  %xmm2,%xmm4
movsd  0xd0a(%rip),%xmm2
mulsd  %xmm4,%xmm2
subsd  %xmm3,%xmm2
movsd  %xmm2,0x38(%rbx)
ucomisd %xmm1,%xmm4
jbe    1343 <CUBICROOTS+0x1f3>
xorpd  %xmm1,%xmm1
ucomisd %xmm3,%xmm1
jae    1353 <CUBICROOTS+0x203>
xorpd  %xmm1,%xmm1
ucomisd %xmm4,%xmm1
jbe    1373 <CUBICROOTS+0x223>
ucomisd %xmm1,%xmm3
jbe    1373 <CUBICROOTS+0x223>
movsd  %xmm2,0x30(%rbx)
xorpd  0xd00(%rip),%xmm0
movlpd %xmm0,0x58(%rbx)
subsd  %xmm3,%xmm4
movsd  %xmm4,0x40(%rbx)
jmp    14ef <CUBICROOTS+0x39f>
subsd  %xmm3,%xmm4
movsd  %xmm4,0x30(%rbx)
movq   $0x0,0x58(%rbx)
movsd  %xmm2,0x40(%rbx)
xorpd  0xccf(%rip),%xmm0
movlpd %xmm0,0x68(%rbx)
jmp    14f7 <CUBICROOTS+0x3a7>
movapd %xmm1,%xmm0
call   1070 <sqrt@plt>
movapd 0x10(%rsp),%xmm4
movapd 0xc9e(%rip),%xmm1
andpd  %xmm4,%xmm1
divsd  %xmm1,%xmm0
call   1040 <atan@plt>
divsd  0xc41(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x30(%rsp),%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jb     13e3 <CUBICROOTS+0x293>
sqrtsd %xmm0,%xmm0
jmp    13ec <CUBICROOTS+0x29c>
call   1070 <sqrt@plt>
xorpd  %xmm2,%xmm2
movapd 0x10(%rsp),%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm2
seta   %al
lea    0xc6e(%rip),%rcx
mulsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1050 <cos@plt>
mulsd  0x10(%rsp),%xmm0
movapd %xmm0,0x30(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <sin@plt>
movapd 0x30(%rsp),%xmm6
mulsd  0xc0b(%rip),%xmm0
movsd  0xbeb(%rip),%xmm1
mulsd  %xmm6,%xmm1
mulsd  0x10(%rsp),%xmm0
addsd  %xmm1,%xmm0
movapd 0xc05(%rip),%xmm1
xorpd  %xmm0,%xmm1
subsd  %xmm6,%xmm1
movsd  0x28(%rsp),%xmm2
subsd  %xmm2,%xmm1
subsd  %xmm2,%xmm6
subsd  %xmm2,%xmm0
movapd 0xbd3(%rip),%xmm3
movapd %xmm6,%xmm5
andpd  %xmm3,%xmm5
movapd %xmm0,%xmm4
andpd  %xmm3,%xmm4
ucomisd %xmm4,%xmm5
movapd %xmm4,%xmm2
minsd  %xmm5,%xmm2
cmpltsd %xmm5,%xmm4
movapd %xmm4,%xmm5
andnpd %xmm0,%xmm5
andpd  %xmm6,%xmm4
orpd   %xmm5,%xmm4
ja     14b4 <CUBICROOTS+0x364>
movapd %xmm6,%xmm0
movlpd %xmm4,0x40(%rbx)
andpd  %xmm1,%xmm3
ucomisd %xmm2,%xmm3
cmpltsd %xmm3,%xmm2
movapd %xmm2,%xmm3
andnpd %xmm0,%xmm3
andpd  %xmm1,%xmm2
orpd   %xmm3,%xmm2
ja     14dc <CUBICROOTS+0x38c>
movapd %xmm1,%xmm0
movlpd %xmm2,0x38(%rbx)
movsd  %xmm0,0x30(%rbx)
xorpd  %xmm0,%xmm0
movupd %xmm0,0x58(%rbx)
movq   $0x0,0x68(%rbx)
add    $0x40,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @CUBICROOTS(double* nocapture %0, [5 x double]* nocapture writeonly %1) {
%3 = load double, double* %0
%4 = fcmp une double %3, 1.000000e+00
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
br i1 %4, label %11, label %7
7: ; preds = %2
%8 = getelementptr inbounds double, double* %0, i64 2
%9 = bitcast double* %8 to <2 x double>*
%10 = load <2 x double>, <2 x double>* %9
br label %20
11: ; preds = %2
%12 = fdiv double %6, %3
store double %12, double* %5
%13 = getelementptr inbounds double, double* %0, i64 2
%14 = bitcast double* %13 to <2 x double>*
%15 = load <2 x double>, <2 x double>* %14
%16 = insertelement <2 x double> poison, double %3, i64 0
%17 = shufflevector <2 x double> %16, <2 x double> poison, <2 x i32> zeroinitializer
%18 = fdiv <2 x double> %15, %17
%19 = bitcast double* %13 to <2 x double>*
store <2 x double> %18, <2 x double>* %19
store double 1.000000e+00, double* %0
br label %20
20: ; preds = %7, %11
%21 = phi double [ %6, %7 ], [ %12, %11 ]
%22 = phi <2 x double> [ %10, %7 ], [ %18, %11 ]
%23 = fdiv double %21, 3.000000e+00
%24 = fmul double %21, %23
%25 = fdiv double %24, 1.500000e+00
%26 = extractelement <2 x double> %22, i64 0
%27 = fsub double %25, %26
%28 = extractelement <2 x double> %22, i64 1
%29 = tail call double @llvm.fmuladd.f64(double %23, double %27, double %28)
%30 = fmul double %29, 5.000000e-01
%31 = fsub double %24, %26
%32 = fdiv double %31, 3.000000e+00
%33 = fmul double %32, %32
%34 = fmul double %32, %33
%35 = fneg double %34
%36 = tail call double @llvm.fmuladd.f64(double %30, double %30, double %35)
%37 = fcmp ult double %36, 0.000000e+00
br i1 %37, label %80, label %38
38: ; preds = %20
%39 = tail call double @sqrt(double %36)
%40 = tail call double @llvm.fabs.f64(double %30)
%41 = fadd double %40, %39
%42 = tail call double @pow(double %41, double 0x3FD5555555555555)
%43 = fcmp une double %42, 0.000000e+00
br i1 %43, label %44, label %49
44: ; preds = %38
%45 = fcmp ogt double %30, 0.000000e+00
%46 = fneg double %42
%47 = select i1 %45, double %46, double %42
%48 = fdiv double %32, %47
br label %49
49: ; preds = %44, %38
%50 = phi double [ %47, %44 ], [ %30, %38 ]
%51 = phi double [ %48, %44 ], [ %34, %38 ]
%52 = fsub double %50, %51
%53 = fmul double %52, 0x3FEBB67AE8584CAA
%54 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 2, i64 2
store double %53, double* %54
%55 = fadd double %50, %51
%56 = fneg double %23
%57 = tail call double @llvm.fmuladd.f64(double %55, double -5.000000e-01, double %56)
%58 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 1, i64 2
store double %57, double* %58
%59 = fcmp ogt double %55, 0.000000e+00
%60 = fcmp ole double %23, 0.000000e+00
%61 = select i1 %59, i1 %60, i1 false
br i1 %61, label %66, label %62
62: ; preds = %49
%63 = fcmp olt double %55, 0.000000e+00
%64 = fcmp ogt double %23, 0.000000e+00
%65 = select i1 %63, i1 %64, i1 false
br i1 %65, label %66, label %73
66: ; preds = %62, %49
%67 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 1, i64 1
store double %57, double* %67
%68 = fneg double %53
%69 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 2, i64 1
store double %68, double* %69
%70 = fsub double %55, %23
%71 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 1, i64 3
store double %70, double* %71
%72 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 2, i64 3
store double 0.000000e+00, double* %72
br label %123
73: ; preds = %62
%74 = fsub double %55, %23
%75 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 1, i64 1
store double %74, double* %75
%76 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 2, i64 1
store double 0.000000e+00, double* %76
%77 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 1, i64 3
store double %57, double* %77
%78 = fneg double %53
%79 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 2, i64 3
store double %78, double* %79
br label %123
80: ; preds = %20
%81 = fcmp oeq double %30, 0.000000e+00
br i1 %81, label %82, label %84
82: ; preds = %80
%83 = tail call double @atan(double 1.000000e+00)
br label %91
84: ; preds = %80
%85 = fneg double %36
%86 = tail call double @sqrt(double %85)
%87 = tail call double @llvm.fabs.f64(double %30)
%88 = fdiv double %86, %87
%89 = tail call double @atan(double %88)
%90 = fdiv double %89, 3.000000e+00
br label %91
91: ; preds = %84, %82
%92 = phi double [ 0x3FE0C152382D7365, %82 ], [ %90, %84 ]
%93 = fcmp olt double %30, 0.000000e+00
%94 = tail call double @sqrt(double %32)
%95 = select i1 %93, double 2.000000e+00, double -2.000000e+00
%96 = fmul double %94, %95
%97 = tail call double @cos(double %92)
%98 = fmul double %96, %97
%99 = tail call double @sin(double %92)
%100 = fmul double %99, 0xBFEBB67AE8584CAA
%101 = fmul double %98, -5.000000e-01
%102 = tail call double @llvm.fmuladd.f64(double %100, double %96, double %101)
%103 = fneg double %102
%104 = fsub double %103, %98
%105 = fsub double %104, %23
%106 = fsub double %98, %23
%107 = fsub double %102, %23
%108 = tail call double @llvm.fabs.f64(double %106)
%109 = tail call double @llvm.fabs.f64(double %107)
%110 = fcmp ogt double %108, %109
%111 = select i1 %110, double %109, double %108
%112 = select i1 %110, double %106, double %107
%113 = select i1 %110, double %107, double %106
%114 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 1, i64 3
store double %112, double* %114
%115 = tail call double @llvm.fabs.f64(double %105)
%116 = fcmp ogt double %115, %111
%117 = select i1 %116, double %105, double %113
%118 = select i1 %116, double %113, double %105
%119 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 1, i64 2
store double %117, double* %119
%120 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 1, i64 1
store double %118, double* %120
%121 = getelementptr [5 x double], [5 x double]* %1, i64 2, i64 1
%122 = bitcast double* %121 to i8*
br label %123
123: ; preds = %91, %66, %73
ret void
}