#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 */
float acosf(float);
scalar_t__ approxf(float, int /*<<< orphan*/);
float cosf(float);
float const fabsf(float);
float ncbrtf(float const);
int roots2rf(float, float, float, float *);
int sqrtf(float);
int roots3rf(float pa, float pb, float pc, float pd, float z[3]) {
  static const float eps = 1e-8;
  if (approxf(pa, 0))
    return roots2rf(pb, pc, pd, z);
  float a = pb / pa;
  float b = pc / pa;
  float c = pd / pa;
  float a2 = a * a;
  float q = (a2 - 3 * b) / 9;
  float r = (a * (2 * a2 - 9 * b) + 27 * c) / 54;
  float r2 = r * r;
  float q3 = q * q * q;
  if (r2 <= (q3 + eps)) {
    float t = r / sqrtf(q3);
    if (t < -1)
      t = -1;
    if (t > 1)
      t = 1;
    t = acosf(t);
    a /= 3;
    q = -2 * sqrtf(q);
    z[0] = q * cosf(t / 3) - a;
    z[1] = q * cosf((t + (2 * 3.14159265358979323846)) / 3) - a;
    z[2] = q * cosf((t - (2 * 3.14159265358979323846)) / 3) - a;
    return 3;
  }
  float A = -ncbrtf(fabsf(r) + sqrtf(r2 - q3));
  if (r < 0)
    A = -A;
  float B = 0;
  if (A != 0)
    B = q / A;
  a /= 3;
  z[0] = (A + B) - a;
  z[1] = -0.5 * (A + B) - a;
  z[2] = 0.5 * 1.73205080756887729352 * (A - B);
  if (fabsf(z[2]) < eps) {
    z[2] = z[1];
    return 2;
  }
  return 1;
}


x86 assembly (clang, -O0):
<roots3rf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  %xmm3,-0x14(%rbp)
mov    %rdi,-0x20(%rbp)
movss  -0x8(%rbp),%xmm0
xor    %edi,%edi
call   1040 <approxf@plt>
cmp    $0x0,%rax
je     11c6 <roots3rf+0x56>
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
mov    -0x20(%rbp),%rdi
call   1090 <roots2rf@plt>
mov    %eax,-0x4(%rbp)
jmp    15f6 <roots3rf+0x486>
movss  -0xc(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x10(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x14(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x24(%rbp),%xmm0
mulss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x30(%rbp),%xmm1
movss  -0x28(%rbp),%xmm0
movss  0xdfc(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xde8(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x24(%rbp),%xmm0
movss  -0x30(%rbp),%xmm2
movss  0xdcd(%rip),%xmm1
mulss  -0x28(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
addss  %xmm2,%xmm2
addss  %xmm1,%xmm2
movss  0xda7(%rip),%xmm1
mulss  -0x2c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xd8e(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x38(%rbp),%xmm0
mulss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x34(%rbp),%xmm0
mulss  -0x34(%rbp),%xmm0
mulss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x40(%rbp)
movss  -0x3c(%rbp),%xmm1
movss  0xd51(%rip),%xmm0
addss  -0x40(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     1477 <roots3rf+0x307>
movss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x40(%rbp),%xmm0
call   1080 <sqrtf@plt>
movss  -0x50(%rbp),%xmm0
cvtsi2ss %eax,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x44(%rbp)
movss  0xd2d(%rip),%xmm0
ucomiss -0x44(%rbp),%xmm0
jbe    1302 <roots3rf+0x192>
movss  0xd1b(%rip),%xmm0
movss  %xmm0,-0x44(%rbp)
movss  -0x44(%rbp),%xmm0
movss  0xd0d(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1325 <roots3rf+0x1b5>
movss  0xcfc(%rip),%xmm0
movss  %xmm0,-0x44(%rbp)
movss  -0x44(%rbp),%xmm0
call   1060 <acosf@plt>
movss  %xmm0,-0x44(%rbp)
movss  -0x24(%rbp),%xmm0
movss  0xcd3(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x34(%rbp),%xmm0
call   1080 <sqrtf@plt>
imul   $0xfffffffe,%eax,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x44(%rbp),%xmm0
movss  0xc9a(%rip),%xmm1
divss  %xmm1,%xmm0
call   1050 <cosf@plt>
movaps %xmm0,%xmm2
movss  -0x5c(%rbp),%xmm0
movss  -0x24(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x58(%rbp)
movss  -0x44(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc70(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xc5c(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1050 <cosf@plt>
movaps %xmm0,%xmm2
movss  -0x58(%rbp),%xmm0
movss  -0x24(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x44(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc11(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xbfd(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1050 <cosf@plt>
movaps %xmm0,%xmm2
movss  -0x54(%rbp),%xmm0
movss  -0x24(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x8(%rax)
movl   $0x3,-0x4(%rbp)
jmp    15f6 <roots3rf+0x486>
movss  -0x38(%rbp),%xmm0
call   1030 <fabsf@plt>
movss  %xmm0,-0x60(%rbp)
movss  -0x3c(%rbp),%xmm0
subss  -0x40(%rbp),%xmm0
call   1080 <sqrtf@plt>
movss  -0x60(%rbp),%xmm0
cvtsi2ss %eax,%xmm1
addss  %xmm1,%xmm0
call   1070 <ncbrtf@plt>
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x38(%rbp),%xmm0
jbe    14dd <roots3rf+0x36d>
movss  -0x48(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x48(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1501 <roots3rf+0x391>
jp     1501 <roots3rf+0x391>
jmp    1510 <roots3rf+0x3a0>
movss  -0x34(%rbp),%xmm0
divss  -0x48(%rbp),%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x24(%rbp),%xmm0
movss  0xaf7(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x48(%rbp),%xmm0
addss  -0x4c(%rbp),%xmm0
subss  -0x24(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x48(%rbp),%xmm0
addss  -0x4c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x24(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xab5(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x48(%rbp),%xmm0
subss  -0x4c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xa82(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x20(%rbp),%rax
movss  0x8(%rax),%xmm0
call   1030 <fabsf@plt>
movaps %xmm0,%xmm1
movss  0xa38(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    15ef <roots3rf+0x47f>
mov    -0x20(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x8(%rax)
movl   $0x2,-0x4(%rbp)
jmp    15f6 <roots3rf+0x486>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roots3rf>:
push   %rbx
sub    $0x40,%rsp
mov    %rdi,%rbx
movaps %xmm3,(%rsp)
movaps %xmm2,0x20(%rsp)
movaps %xmm1,0x10(%rsp)
movaps %xmm0,0x30(%rsp)
xor    %edi,%edi
call   1030 <approxf@plt>
test   %rax,%rax
je     11a2 <roots3rf+0x42>
movaps 0x10(%rsp),%xmm0
movaps 0x20(%rsp),%xmm1
movaps (%rsp),%xmm2
mov    %rbx,%rdi
add    $0x40,%rsp
pop    %rbx
jmp    1080 <roots2rf@plt>
movaps 0x10(%rsp),%xmm5
unpcklps 0x20(%rsp),%xmm5
movaps (%rsp),%xmm2
movaps 0x30(%rsp),%xmm0
divss  %xmm0,%xmm2
shufps $0x0,%xmm0,%xmm0
divps  %xmm0,%xmm5
movaps %xmm5,%xmm0
shufps $0x55,%xmm5,%xmm0
mulss  0xe31(%rip),%xmm0
unpcklps %xmm5,%xmm2
movss  0xe2a(%rip),%xmm1
unpcklps %xmm5,%xmm1
mulps  %xmm2,%xmm1
movaps %xmm1,%xmm2
shufps $0x55,%xmm1,%xmm2
addss  %xmm2,%xmm2
addss  %xmm0,%xmm2
movaps 0xe2a(%rip),%xmm3
movss  %xmm2,%xmm3
mulps  %xmm5,%xmm3
addps  %xmm1,%xmm3
divps  0xe29(%rip),%xmm3
movaps %xmm3,%xmm4
shufps $0x55,%xmm3,%xmm4
movaps %xmm4,%xmm0
mulss  %xmm4,%xmm0
movlhps %xmm3,%xmm0
shufps $0xe2,%xmm3,%xmm0
mulps  %xmm3,%xmm0
movaps %xmm0,%xmm1
shufps $0x55,%xmm0,%xmm1
movaps %xmm1,%xmm2
addss  0xdd7(%rip),%xmm2
ucomiss %xmm0,%xmm2
movaps %xmm5,%xmm2
movaps %xmm5,0x10(%rsp)
movaps %xmm3,(%rsp)
movaps %xmm4,0x20(%rsp)
jae    1332 <roots3rf+0x1d2>
movaps 0xdee(%rip),%xmm2
andps  %xmm3,%xmm2
movaps %xmm2,0x30(%rsp)
subss  %xmm1,%xmm0
call   1070 <sqrtf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
addss  0x30(%rsp),%xmm0
call   1060 <ncbrtf@plt>
movaps (%rsp),%xmm4
movaps 0xdd0(%rip),%xmm2
xorps  %xmm0,%xmm2
xorps  %xmm1,%xmm1
cmpltss %xmm1,%xmm4
andps  %xmm4,%xmm0
andnps %xmm2,%xmm4
orps   %xmm0,%xmm4
ucomiss %xmm1,%xmm4
jne    129b <roots3rf+0x13b>
jnp    12a4 <roots3rf+0x144>
movaps 0x20(%rsp),%xmm1
divss  %xmm4,%xmm1
movss  0xd68(%rip),%xmm0
movaps 0x10(%rsp),%xmm3
divss  %xmm0,%xmm3
movaps %xmm4,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
subss  %xmm3,%xmm0
movss  %xmm0,(%rbx)
xorps  %xmm0,%xmm0
cvtss2sd %xmm3,%xmm0
mulsd  0xd9e(%rip),%xmm2
subsd  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
subss  %xmm1,%xmm4
xorps  %xmm1,%xmm1
cvtss2sd %xmm4,%xmm1
mulsd  0xd88(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm0,0x4(%rbx)
movss  %xmm1,0x8(%rbx)
andps  0xd33(%rip),%xmm1
mov    $0x1,%eax
movss  0xcee(%rip),%xmm2
ucomiss %xmm1,%xmm2
jbe    1433 <roots3rf+0x2d3>
movss  %xmm0,0x8(%rbx)
mov    $0x2,%eax
jmp    1433 <roots3rf+0x2d3>
movaps %xmm1,%xmm0
call   1070 <sqrtf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movaps (%rsp),%xmm2
divss  %xmm0,%xmm2
movss  0xcbb(%rip),%xmm1
maxss  %xmm2,%xmm1
movss  0xcb3(%rip),%xmm0
minss  %xmm1,%xmm0
call   1050 <acosf@plt>
movss  %xmm0,0x30(%rsp)
movaps 0x20(%rsp),%xmm0
call   1070 <sqrtf@plt>
add    %eax,%eax
neg    %eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,(%rsp)
movss  0x30(%rsp),%xmm0
divss  0xc80(%rip),%xmm0
call   1040 <cosf@plt>
movss  0xc77(%rip),%xmm1
movaps 0x10(%rsp),%xmm2
divss  %xmm1,%xmm2
movaps %xmm2,0x10(%rsp)
mulss  (%rsp),%xmm0
addss  %xmm2,%xmm0
movss  %xmm0,(%rbx)
movss  0x30(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0xc89(%rip),%xmm0
addsd  %xmm1,%xmm0
divsd  0xc85(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <cosf@plt>
mulss  (%rsp),%xmm0
addss  0x10(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
addsd  0xc6b(%rip),%xmm1
movss  %xmm0,0x4(%rbx)
divsd  0xc56(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
call   1040 <cosf@plt>
mulss  (%rsp),%xmm0
addss  0x10(%rsp),%xmm0
movss  %xmm0,0x8(%rbx)
mov    $0x3,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@roots3rf.eps = internal constant float 0x3E45798EE0000000
define i32 @roots3rf(float %0, float %1, float %2, float %3, float* %4) {
%6 = alloca i32
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float*
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca float
%18 = alloca float
%19 = alloca float
%20 = alloca float
%21 = alloca float
%22 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float* %4, float** %11
%23 = load float, float* %7
%24 = call i64 @approxf(float %23, i32 0)
%25 = icmp ne i64 %24, 0
br i1 %25, label %26, label %32
26: ; preds = %5
%27 = load float, float* %8
%28 = load float, float* %9
%29 = load float, float* %10
%30 = load float*, float** %11
%31 = call i32 @roots2rf(float %27, float %28, float %29, float* %30)
store i32 %31, i32* %6
br label %190
32: ; preds = %5
%33 = load float, float* %8
%34 = load float, float* %7
%35 = fdiv float %33, %34
store float %35, float* %12
%36 = load float, float* %9
%37 = load float, float* %7
%38 = fdiv float %36, %37
store float %38, float* %13
%39 = load float, float* %10
%40 = load float, float* %7
%41 = fdiv float %39, %40
store float %41, float* %14
%42 = load float, float* %12
%43 = load float, float* %12
%44 = fmul float %42, %43
store float %44, float* %15
%45 = load float, float* %15
%46 = load float, float* %13
%47 = call float @llvm.fmuladd.f32(float -3.000000e+00, float %46, float %45)
%48 = fdiv float %47, 9.000000e+00
store float %48, float* %16
%49 = load float, float* %12
%50 = load float, float* %15
%51 = load float, float* %13
%52 = fmul float 9.000000e+00, %51
%53 = fneg float %52
%54 = call float @llvm.fmuladd.f32(float 2.000000e+00, float %50, float %53)
%55 = load float, float* %14
%56 = fmul float 2.700000e+01, %55
%57 = call float @llvm.fmuladd.f32(float %49, float %54, float %56)
%58 = fdiv float %57, 5.400000e+01
store float %58, float* %17
%59 = load float, float* %17
%60 = load float, float* %17
%61 = fmul float %59, %60
store float %61, float* %18
%62 = load float, float* %16
%63 = load float, float* %16
%64 = fmul float %62, %63
%65 = load float, float* %16
%66 = fmul float %64, %65
store float %66, float* %19
%67 = load float, float* %18
%68 = load float, float* %19
%69 = fadd float %68, 0x3E45798EE0000000
%70 = fcmp ole float %67, %69
br i1 %70, label %71, label %126
71: ; preds = %32
%72 = load float, float* %17
%73 = load float, float* %19
%74 = call i32 @sqrtf(float %73)
%75 = sitofp i32 %74 to float
%76 = fdiv float %72, %75
store float %76, float* %20
%77 = load float, float* %20
%78 = fcmp olt float %77, -1.000000e+00
br i1 %78, label %79, label %80
79: ; preds = %71
store float -1.000000e+00, float* %20
br label %80
80: ; preds = %79, %71
%81 = load float, float* %20
%82 = fcmp ogt float %81, 1.000000e+00
br i1 %82, label %83, label %84
83: ; preds = %80
store float 1.000000e+00, float* %20
br label %84
84: ; preds = %83, %80
%85 = load float, float* %20
%86 = call float @acosf(float %85)
store float %86, float* %20
%87 = load float, float* %12
%88 = fdiv float %87, 3.000000e+00
store float %88, float* %12
%89 = load float, float* %16
%90 = call i32 @sqrtf(float %89)
%91 = mul nsw i32 -2, %90
%92 = sitofp i32 %91 to float
store float %92, float* %16
%93 = load float, float* %16
%94 = load float, float* %20
%95 = fdiv float %94, 3.000000e+00
%96 = call float @cosf(float %95)
%97 = load float, float* %12
%98 = fneg float %97
%99 = call float @llvm.fmuladd.f32(float %93, float %96, float %98)
%100 = load float*, float** %11
%101 = getelementptr inbounds float, float* %100, i64 0
store float %99, float* %101
%102 = load float, float* %16
%103 = load float, float* %20
%104 = fpext float %103 to double
%105 = fadd double %104, 0x401921FB54442D18
%106 = fdiv double %105, 3.000000e+00
%107 = fptrunc double %106 to float
%108 = call float @cosf(float %107)
%109 = load float, float* %12
%110 = fneg float %109
%111 = call float @llvm.fmuladd.f32(float %102, float %108, float %110)
%112 = load float*, float** %11
%113 = getelementptr inbounds float, float* %112, i64 1
store float %111, float* %113
%114 = load float, float* %16
%115 = load float, float* %20
%116 = fpext float %115 to double
%117 = fsub double %116, 0x401921FB54442D18
%118 = fdiv double %117, 3.000000e+00
%119 = fptrunc double %118 to float
%120 = call float @cosf(float %119)
%121 = load float, float* %12
%122 = fneg float %121
%123 = call float @llvm.fmuladd.f32(float %114, float %120, float %122)
%124 = load float*, float** %11
%125 = getelementptr inbounds float, float* %124, i64 2
store float %123, float* %125
store i32 3, i32* %6
br label %190
126: ; preds = %32
%127 = load float, float* %17
%128 = call float @fabsf(float %127)
%129 = load float, float* %18
%130 = load float, float* %19
%131 = fsub float %129, %130
%132 = call i32 @sqrtf(float %131)
%133 = sitofp i32 %132 to float
%134 = fadd float %128, %133
%135 = call float @ncbrtf(float %134)
%136 = fneg float %135
store float %136, float* %21
%137 = load float, float* %17
%138 = fcmp olt float %137, 0.000000e+00
br i1 %138, label %139, label %142
139: ; preds = %126
%140 = load float, float* %21
%141 = fneg float %140
store float %141, float* %21
br label %142
142: ; preds = %139, %126
store float 0.000000e+00, float* %22
%143 = load float, float* %21
%144 = fcmp une float %143, 0.000000e+00
br i1 %144, label %145, label %149
145: ; preds = %142
%146 = load float, float* %16
%147 = load float, float* %21
%148 = fdiv float %146, %147
store float %148, float* %22
br label %149
149: ; preds = %145, %142
%150 = load float, float* %12
%151 = fdiv float %150, 3.000000e+00
store float %151, float* %12
%152 = load float, float* %21
%153 = load float, float* %22
%154 = fadd float %152, %153
%155 = load float, float* %12
%156 = fsub float %154, %155
%157 = load float*, float** %11
%158 = getelementptr inbounds float, float* %157, i64 0
store float %156, float* %158
%159 = load float, float* %21
%160 = load float, float* %22
%161 = fadd float %159, %160
%162 = fpext float %161 to double
%163 = load float, float* %12
%164 = fpext float %163 to double
%165 = fneg double %164
%166 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %162, double %165)
%167 = fptrunc double %166 to float
%168 = load float*, float** %11
%169 = getelementptr inbounds float, float* %168, i64 1
store float %167, float* %169
%170 = load float, float* %21
%171 = load float, float* %22
%172 = fsub float %170, %171
%173 = fpext float %172 to double
%174 = fmul double 0x3FEBB67AE8584CAA, %173
%175 = fptrunc double %174 to float
%176 = load float*, float** %11
%177 = getelementptr inbounds float, float* %176, i64 2
store float %175, float* %177
%178 = load float*, float** %11
%179 = getelementptr inbounds float, float* %178, i64 2
%180 = load float, float* %179
%181 = call float @fabsf(float %180)
%182 = fcmp olt float %181, 0x3E45798EE0000000
br i1 %182, label %183, label %189
183: ; preds = %149
%184 = load float*, float** %11
%185 = getelementptr inbounds float, float* %184, i64 1
%186 = load float, float* %185
%187 = load float*, float** %11
%188 = getelementptr inbounds float, float* %187, i64 2
store float %186, float* %188
store i32 2, i32* %6
br label %190
189: ; preds = %149
store i32 1, i32* %6
br label %190
190: ; preds = %189, %183, %84, %26
%191 = load i32, i32* %6
ret i32 %191
}

LLVM IR (-O2):
define i32 @roots3rf(float %0, float %1, float %2, float %3, float* %4) {
%6 = tail call i64 @approxf(float %0, i32 0)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @roots2rf(float %1, float %2, float %3, float* %4)
br label %97
10: ; preds = %5
%11 = insertelement <2 x float> poison, float %1, i64 0
%12 = insertelement <2 x float> %11, float %2, i64 1
%13 = insertelement <2 x float> poison, float %0, i64 0
%14 = shufflevector <2 x float> %13, <2 x float> poison, <2 x i32> zeroinitializer
%15 = fdiv <2 x float> %12, %14
%16 = fdiv float %3, %0
%17 = extractelement <2 x float> %15, i64 1
%18 = fmul float %17, -9.000000e+00
%19 = insertelement <2 x float> poison, float %16, i64 0
%20 = extractelement <2 x float> %15, i64 0
%21 = shufflevector <2 x float> %19, <2 x float> %15, <2 x i32> <i32 0, i32 2>
%22 = shufflevector <2 x float> <float 2.700000e+01, float poison>, <2 x float> %15, <2 x i32> <i32 0, i32 2>
%23 = fmul <2 x float> %21, %22
%24 = extractelement <2 x float> %23, i64 1
%25 = tail call float @llvm.fmuladd.f32(float %24, float 2.000000e+00, float %18)
%26 = insertelement <2 x float> <float poison, float -3.000000e+00>, float %25, i64 0
%27 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %15, <2 x float> %26, <2 x float> %23)
%28 = fdiv <2 x float> %27, <float 5.400000e+01, float 9.000000e+00>
%29 = extractelement <2 x float> %28, i64 1
%30 = fmul float %29, %29
%31 = extractelement <2 x float> %28, i64 0
%32 = insertelement <2 x float> %28, float %30, i64 1
%33 = fmul <2 x float> %28, %32
%34 = extractelement <2 x float> %33, i64 1
%35 = fadd float %34, 0x3E45798EE0000000
%36 = extractelement <2 x float> %33, i64 0
%37 = fcmp ugt float %36, %35
br i1 %37, label %67, label %38
38: ; preds = %10
%39 = tail call i32 @sqrtf(float %34)
%40 = sitofp i32 %39 to float
%41 = fdiv float %31, %40
%42 = fcmp olt float %41, -1.000000e+00
%43 = select i1 %42, float -1.000000e+00, float %41
%44 = fcmp ogt float %43, 1.000000e+00
%45 = select i1 %44, float 1.000000e+00, float %43
%46 = tail call float @acosf(float %45)
%47 = tail call i32 @sqrtf(float %29)
%48 = mul nsw i32 %47, -2
%49 = sitofp i32 %48 to float
%50 = fdiv float %46, 3.000000e+00
%51 = tail call float @cosf(float %50)
%52 = fdiv float %20, -3.000000e+00
%53 = tail call float @llvm.fmuladd.f32(float %49, float %51, float %52)
store float %53, float* %4
%54 = fpext float %46 to double
%55 = fadd double %54, 0x401921FB54442D18
%56 = fdiv double %55, 3.000000e+00
%57 = fptrunc double %56 to float
%58 = tail call float @cosf(float %57)
%59 = tail call float @llvm.fmuladd.f32(float %49, float %58, float %52)
%60 = getelementptr inbounds float, float* %4, i64 1
store float %59, float* %60
%61 = fadd double %54, 0xC01921FB54442D18
%62 = fdiv double %61, 3.000000e+00
%63 = fptrunc double %62 to float
%64 = tail call float @cosf(float %63)
%65 = tail call float @llvm.fmuladd.f32(float %49, float %64, float %52)
%66 = getelementptr inbounds float, float* %4, i64 2
store float %65, float* %66
br label %97
67: ; preds = %10
%68 = tail call float @llvm.fabs.f32(float %31)
%69 = fsub float %36, %34
%70 = tail call i32 @sqrtf(float %69)
%71 = sitofp i32 %70 to float
%72 = fadd float %68, %71
%73 = tail call float @ncbrtf(float %72)
%74 = fneg float %73
%75 = fcmp olt float %31, 0.000000e+00
%76 = select i1 %75, float %73, float %74
%77 = fcmp une float %76, 0.000000e+00
%78 = fdiv float %29, %76
%79 = select i1 %77, float %78, float 0.000000e+00
%80 = fdiv float %20, 3.000000e+00
%81 = fadd float %76, %79
%82 = fsub float %81, %80
store float %82, float* %4
%83 = fpext float %81 to double
%84 = fpext float %80 to double
%85 = fneg double %84
%86 = tail call double @llvm.fmuladd.f64(double %83, double -5.000000e-01, double %85)
%87 = fptrunc double %86 to float
%88 = getelementptr inbounds float, float* %4, i64 1
store float %87, float* %88
%89 = fsub float %76, %79
%90 = fpext float %89 to double
%91 = fmul double %90, 0x3FEBB67AE8584CAA
%92 = fptrunc double %91 to float
%93 = getelementptr inbounds float, float* %4, i64 2
store float %92, float* %93
%94 = tail call float @llvm.fabs.f32(float %92)
%95 = fcmp olt float %94, 0x3E45798EE0000000
br i1 %95, label %96, label %97
96: ; preds = %67
store float %87, float* %93
br label %97
97: ; preds = %38, %67, %96, %8
%98 = phi i32 [ %9, %8 ], [ 3, %38 ], [ 2, %96 ], [ 1, %67 ]
ret i32 %98
}