#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 M_PI;
double acos(double);
double cos(double);
scalar_t__ fabs(double);
double pow(scalar_t__, double);
int sqrt(double);
int gsl_poly_solve_cubic(double a, double b, double c, double *x0, double *x1,
                         double *x2) {
  double q = (a * a - 3 * b);
  double r = (2 * a * a * a - 9 * a * b + 27 * c);
  double Q = q / 9;
  double R = r / 54;
  double Q3 = Q * Q * Q;
  double R2 = R * R;
  double CR2 = 729 * r * r;
  double CQ3 = 2916 * q * q * q;
  if (R == 0 && Q == 0) {
    *x0 = -a / 3;
    *x1 = -a / 3;
    *x2 = -a / 3;
    return 3;
  } else if (CR2 == CQ3) {
    double sqrtQ = sqrt(Q);
    if (R > 0) {
      *x0 = -2 * sqrtQ - a / 3;
      *x1 = sqrtQ - a / 3;
      *x2 = sqrtQ - a / 3;
    } else {
      *x0 = -sqrtQ - a / 3;
      *x1 = -sqrtQ - a / 3;
      *x2 = 2 * sqrtQ - a / 3;
    }
    return 3;
  } else if (R2 < Q3) {
    double sgnR = (R >= 0 ? 1 : -1);
    double ratio = sgnR * sqrt(R2 / Q3);
    double theta = acos(ratio);
    double norm = -2 * sqrt(Q);
    *x0 = norm * cos(theta / 3) - a / 3;
    *x1 = norm * cos((theta + 2.0 * M_PI) / 3) - a / 3;
    *x2 = norm * cos((theta - 2.0 * M_PI) / 3) - a / 3;
    if (*x0 > *x1)
      do {
        double tmp = *x1;
        *x1 = *x0;
        *x0 = tmp;
      } while (0);
    if (*x1 > *x2) {
      do {
        double tmp = *x2;
        *x2 = *x1;
        *x1 = tmp;
      } while (0);
      if (*x0 > *x1)
        do {
          double tmp = *x1;
          *x1 = *x0;
          *x0 = tmp;
        } while (0);
    }
    return 3;
  } else {
    double sgnR = (R >= 0 ? 1 : -1);
    double A = -sgnR * pow(fabs(R) + sqrt(R2 - Q3), 1.0 / 3.0);
    double B = Q / A;
    *x0 = A + B - a / 3;
    return 1;
  }
}


x86 assembly (clang, -O0):
<gsl_poly_solve_cubic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    %rdi,-0x28(%rbp)
mov    %rsi,-0x30(%rbp)
mov    %rdx,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  0xea8(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe6f(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  0xe48(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  0xe1a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  0xdf8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  0xdda(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xd9e(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xd7f(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1361 <gsl_poly_solve_cubic+0x211>
jp     1361 <gsl_poly_solve_cubic+0x211>
movsd  -0x50(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1361 <gsl_poly_solve_cubic+0x211>
jp     1361 <gsl_poly_solve_cubic+0x211>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xd47(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xd17(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xce7(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x3,-0x4(%rbp)
jmp    18c9 <gsl_poly_solve_cubic+0x779>
movsd  -0x70(%rbp),%xmm0
ucomisd -0x78(%rbp),%xmm0
jne    14dd <gsl_poly_solve_cubic+0x38d>
jp     14dd <gsl_poly_solve_cubic+0x38d>
movsd  -0x50(%rbp),%xmm0
call   1070 <sqrt@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x58(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1422 <gsl_poly_solve_cubic+0x2d2>
movsd  -0x80(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  0xc82(%rip),%xmm2
divsd  %xmm2,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x80(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xc45(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x80(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xc23(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    14d1 <gsl_poly_solve_cubic+0x381>
movsd  -0x80(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xbe5(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x80(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xbac(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x80(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xb8a(%rip),%xmm2
divsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x3,-0x4(%rbp)
jmp    18c9 <gsl_poly_solve_cubic+0x779>
movsd  -0x68(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    17e4 <gsl_poly_solve_cubic+0x694>
movsd  -0x58(%rbp),%xmm0
xorps  %xmm1,%xmm1
mov    $0xffffffff,%eax
mov    $0x1,%ecx
ucomisd %xmm1,%xmm0
cmovae %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
divsd  -0x60(%rbp),%xmm0
call   1070 <sqrt@plt>
movsd  -0xf0(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
call   1030 <acos@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
call   1070 <sqrt@plt>
imul   $0xfffffffe,%eax,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  0xa92(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <cos@plt>
movaps %xmm0,%xmm2
movsd  -0xe8(%rbp),%xmm0
ff
movsd  -0x10(%rbp),%xmm1
movsd  0xa71(%rip),%xmm3
divsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x98(%rbp),%xmm1
ff
mov    0x29df(%rip),%rax
movsd  (%rax),%xmm0
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xa13(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <cos@plt>
movaps %xmm0,%xmm2
movsd  -0xe0(%rbp),%xmm0
ff
movsd  -0x10(%rbp),%xmm1
movsd  0x9f2(%rip),%xmm3
divsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
mov    0x2960(%rip),%rax
movsd  (%rax),%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  0x994(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <cos@plt>
movaps %xmm0,%xmm2
movsd  -0xd8(%rbp),%xmm0
ff
movsd  -0x10(%rbp),%xmm1
movsd  0x973(%rip),%xmm3
divsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    1738 <gsl_poly_solve_cubic+0x5e8>
jmp    1703 <gsl_poly_solve_cubic+0x5b3>
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xa8(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1738 <gsl_poly_solve_cubic+0x5e8>
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    17d8 <gsl_poly_solve_cubic+0x688>
jmp    1753 <gsl_poly_solve_cubic+0x603>
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xb0(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    17d3 <gsl_poly_solve_cubic+0x683>
jmp    179e <gsl_poly_solve_cubic+0x64e>
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xb8(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    17d3 <gsl_poly_solve_cubic+0x683>
jmp    17d8 <gsl_poly_solve_cubic+0x688>
movl   $0x3,-0x4(%rbp)
jmp    18c9 <gsl_poly_solve_cubic+0x779>
movsd  -0x58(%rbp),%xmm0
xorps  %xmm1,%xmm1
mov    $0xffffffff,%eax
mov    $0x1,%ecx
ucomisd %xmm1,%xmm0
cmovae %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
call   1040 <fabs@plt>
mov    %rax,-0x100(%rbp)
movsd  -0x68(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
call   1070 <sqrt@plt>
mov    -0x100(%rbp),%rdi
cltq
add    %rax,%rdi
movsd  0x7d4(%rip),%xmm0
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xf8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
divsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
addsd  -0xd0(%rbp),%xmm0
ff
movsd  -0x10(%rbp),%xmm1
movsd  0x77e(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gsl_poly_solve_cubic>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %rdi,%r14
movapd %xmm0,%xmm5
movsd  0xe90(%rip),%xmm0
mulsd  %xmm1,%xmm0
movapd %xmm5,%xmm3
addsd  %xmm5,%xmm3
mulsd  %xmm5,%xmm3
movsd  0xe80(%rip),%xmm4
mulsd  %xmm5,%xmm4
mulsd  %xmm1,%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
unpcklpd %xmm0,%xmm3
unpcklpd %xmm5,%xmm2
movapd 0xe88(%rip),%xmm0
unpcklpd %xmm5,%xmm0
mulpd  %xmm2,%xmm0
addpd  %xmm3,%xmm0
movapd %xmm0,%xmm4
divpd  0xe80(%rip),%xmm4
xorpd  %xmm1,%xmm1
cmpeqpd %xmm4,%xmm1
movmskpd %xmm1,%eax
cmp    $0x3,%al
jne    11f1 <gsl_poly_solve_cubic+0xa1>
divsd  0xe27(%rip),%xmm5
movsd  %xmm5,(%r14)
movsd  %xmm5,(%rbx)
movsd  %xmm5,(%r15)
mov    $0x3,%eax
jmp    14cf <gsl_poly_solve_cubic+0x37f>
movapd %xmm4,%xmm3
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
mulsd  0xe0b(%rip),%xmm1
unpckhpd %xmm4,%xmm3
movapd 0xe3f(%rip),%xmm2
unpcklpd %xmm1,%xmm2
mulpd  %xmm0,%xmm2
mulpd  %xmm0,%xmm2
movapd %xmm2,%xmm0
unpckhpd %xmm2,%xmm0
ucomisd %xmm0,%xmm2
movapd %xmm5,0x10(%rsp)
jne    128b <gsl_poly_solve_cubic+0x13b>
jp     128b <gsl_poly_solve_cubic+0x13b>
movapd %xmm3,%xmm0
movapd %xmm4,(%rsp)
call   1070 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
xorpd  %xmm1,%xmm1
movapd (%rsp),%xmm2
ucomisd %xmm1,%xmm2
jbe    1402 <gsl_poly_solve_cubic+0x2b2>
movapd 0x10(%rsp),%xmm2
divsd  0xdb7(%rip),%xmm2
movsd  0xdb7(%rip),%xmm1
mulsd  %xmm0,%xmm1
subsd  %xmm2,%xmm1
movsd  %xmm1,(%r14)
subsd  %xmm2,%xmm0
movsd  %xmm0,(%rbx)
jmp    1431 <gsl_poly_solve_cubic+0x2e1>
movapd %xmm3,%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm0
movapd %xmm4,%xmm1
mulsd  %xmm4,%xmm1
ucomisd %xmm1,%xmm0
movapd %xmm3,0x20(%rsp)
jbe    1440 <gsl_poly_solve_cubic+0x2f0>
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
movapd %xmm4,(%rsp)
call   1070 <sqrt@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movapd 0xda0(%rip),%xmm2
xorpd  %xmm1,%xmm2
xorpd  %xmm0,%xmm0
cmplesd (%rsp),%xmm0
andpd  %xmm0,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
call   1030 <acos@plt>
movsd  %xmm0,(%rsp)
movaps 0x20(%rsp),%xmm0
call   1070 <sqrt@plt>
add    %eax,%eax
neg    %eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  (%rsp),%xmm0
divsd  0xd04(%rip),%xmm0
call   1050 <cos@plt>
movapd 0x10(%rsp),%xmm1
divsd  0xcd1(%rip),%xmm1
movapd %xmm1,0x10(%rsp)
mulsd  0x20(%rsp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%r14)
mov    0x2c9d(%rip),%r12
movsd  (%r12),%xmm0
addsd  %xmm0,%xmm0
addsd  (%rsp),%xmm0
divsd  0xcbe(%rip),%xmm0
call   1050 <cos@plt>
mulsd  0x20(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,(%rbx)
movsd  (%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
divsd  0xc8e(%rip),%xmm1
movapd %xmm1,%xmm0
call   1050 <cos@plt>
mulsd  0x20(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,(%r15)
movsd  (%r14),%xmm2
movsd  (%rbx),%xmm1
ucomisd %xmm1,%xmm2
jbe    13cd <gsl_poly_solve_cubic+0x27d>
movsd  %xmm2,(%rbx)
movsd  %xmm1,(%r14)
movsd  (%rbx),%xmm1
movsd  (%r15),%xmm0
mov    $0x3,%eax
ucomisd %xmm0,%xmm1
jbe    14cf <gsl_poly_solve_cubic+0x37f>
movsd  %xmm1,(%r15)
movsd  %xmm0,(%rbx)
movsd  (%r14),%xmm1
ucomisd %xmm0,%xmm1
jbe    14cf <gsl_poly_solve_cubic+0x37f>
movsd  %xmm1,(%rbx)
movsd  %xmm0,(%r14)
jmp    14cf <gsl_poly_solve_cubic+0x37f>
movapd 0xc66(%rip),%xmm1
xorpd  %xmm0,%xmm1
movapd 0x10(%rsp),%xmm2
divsd  0xc04(%rip),%xmm2
subsd  %xmm2,%xmm1
movsd  %xmm1,(%r14)
movsd  %xmm1,(%rbx)
addsd  %xmm0,%xmm0
subsd  %xmm2,%xmm0
movsd  %xmm0,(%r15)
mov    $0x3,%eax
jmp    14cf <gsl_poly_solve_cubic+0x37f>
movapd %xmm0,0x40(%rsp)
xorpd  %xmm0,%xmm0
xor    %eax,%eax
ucomisd %xmm0,%xmm4
setae  %al
lea    0xc06(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
xorps  0xc0a(%rip),%xmm0
movaps %xmm0,(%rsp)
movapd %xmm4,%xmm0
movapd %xmm1,0x30(%rsp)
call   1040 <fabs@plt>
mov    %rax,%rbx
movapd 0x30(%rsp),%xmm0
subsd  0x40(%rsp),%xmm0
call   1070 <sqrt@plt>
movslq %eax,%rdi
add    %rbx,%rdi
movsd  0xb7d(%rip),%xmm0
call   1060 <pow@plt>
mulsd  (%rsp),%xmm0
movapd 0x20(%rsp),%xmm2
divsd  %xmm0,%xmm2
movapd 0x10(%rsp),%xmm1
divsd  0xb43(%rip),%xmm1
addsd  %xmm0,%xmm2
addsd  %xmm2,%xmm1
movsd  %xmm1,(%r14)
mov    $0x1,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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