#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 acos(double);
double cbrt(double);
double cos(double);
int sqrt(double);
int SolveCubic(double c[4], double s[3]) {
  int i, num;
  double sub;
  double A, B, C;
  double sq_A, p, q;
  double cb_p, D;
  A = c[2] / c[3];
  B = c[1] / c[3];
  C = c[0] / c[3];
  sq_A = A * A;
  p = 1.0 / 3 * (-1.0 / 3 * sq_A + B);
  q = 1.0 / 2 * (2.0 / 27 * A * sq_A - 1.0 / 3 * A * B + C);
  cb_p = p * p * p;
  D = q * q + cb_p;
  if (((D) > -1e-9 && (D) < 1e-9)) {
    if (((q) > -1e-9 && (q) < 1e-9)) {
      s[0] = 0;
      num = 1;
    } else {
      double u = cbrt(-q);
      s[0] = 2 * u;
      s[1] = -u;
      num = 2;
    }
  } else if (D < 0) {
    double phi = 1.0 / 3 * acos(-q / sqrt(-cb_p));
    double t = 2 * sqrt(-p);
    s[0] = t * cos(phi);
    s[1] = -t * cos(phi + 3.14159265358979323846 / 3);
    s[2] = -t * cos(phi - 3.14159265358979323846 / 3);
    num = 3;
  } else {
    double sqrt_D = sqrt(D);
    double u = cbrt(sqrt_D - q);
    double v = -cbrt(sqrt_D + q);
    s[0] = u + v;
    num = 1;
  }
  sub = 1.0 / 3 * A;
  for (i = 0; i < num; ++i)
    s[i] -= sub;
  return num;
}


x86 assembly (clang, -O0):
<SolveCubic>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
divsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
divsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
divsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  0xe68(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe48(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe3f(%rip),%xmm1
mulsd  -0x28(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
movsd  0xe25(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
addsd  -0x38(%rbp),%xmm1
movsd  0xde7(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  0xd99(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1331 <SolveCubic+0x1f1>
movsd  0xdaf(%rip),%xmm0
ucomisd -0x60(%rbp),%xmm0
jbe    1331 <SolveCubic+0x1f1>
movsd  -0x50(%rbp),%xmm0
movsd  0xd6f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12c5 <SolveCubic+0x185>
movsd  0xd85(%rip),%xmm0
ucomisd -0x50(%rbp),%xmm0
jbe    12c5 <SolveCubic+0x185>
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movl   $0x1,-0x18(%rbp)
jmp    132c <SolveCubic+0x1ec>
movsd  -0x50(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1040 <cbrt@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  0xd45(%rip),%xmm0
mulsd  -0x68(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x68(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movl   $0x2,-0x18(%rbp)
jmp    1530 <SolveCubic+0x3f0>
xorps  %xmm0,%xmm0
ucomisd -0x60(%rbp),%xmm0
jbe    14b4 <SolveCubic+0x374>
movsd  -0x50(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1060 <sqrt@plt>
movsd  -0xb0(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
call   1030 <acos@plt>
movaps %xmm0,%xmm1
movsd  0xc6c(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1060 <sqrt@plt>
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
call   1050 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x78(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0xbfc(%rip),%xmm0
addsd  -0x70(%rbp),%xmm0
call   1050 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x78(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  0xba9(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1050 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movl   $0x3,-0x18(%rbp)
jmp    152b <SolveCubic+0x3eb>
movsd  -0x60(%rbp),%xmm0
call   1060 <sqrt@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
call   1040 <cbrt@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
addsd  -0x50(%rbp),%xmm0
call   1040 <cbrt@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
addsd  -0x90(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0x18(%rbp)
jmp    1530 <SolveCubic+0x3f0>
movsd  0xad8(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    157e <SolveCubic+0x43e>
movsd  -0x20(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1549 <SolveCubic+0x409>
mov    -0x18(%rbp),%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SolveCubic>:
push   %rbx
sub    $0x40,%rsp
mov    %rsi,%rbx
movsd  0x10(%rdi),%xmm4
movsd  0x18(%rdi),%xmm0
divsd  %xmm0,%xmm4
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm2
divsd  %xmm0,%xmm2
divsd  %xmm0,%xmm1
movapd %xmm4,%xmm0
mulsd  %xmm4,%xmm0
movsd  0xe89(%rip),%xmm6
mulsd  %xmm0,%xmm6
addsd  %xmm2,%xmm6
movsd  0xe81(%rip),%xmm3
movsd  0xe81(%rip),%xmm5
mulsd  %xmm4,%xmm5
mulsd  %xmm3,%xmm4
mulsd  %xmm4,%xmm2
mulsd  %xmm0,%xmm5
subsd  %xmm2,%xmm5
addsd  %xmm1,%xmm5
mulsd  0xe69(%rip),%xmm5
mulsd  %xmm3,%xmm6
movapd %xmm6,%xmm0
mulsd  %xmm6,%xmm0
mulsd  %xmm6,%xmm0
movapd %xmm5,%xmm1
mulsd  %xmm5,%xmm1
addsd  %xmm0,%xmm1
ucomisd 0xe4d(%rip),%xmm1
jbe    1210 <SolveCubic+0xd0>
movsd  0xe4b(%rip),%xmm2
ucomisd %xmm1,%xmm2
jbe    1210 <SolveCubic+0xd0>
ucomisd 0xe35(%rip),%xmm5
jbe    12f8 <SolveCubic+0x1b8>
ucomisd %xmm5,%xmm2
jbe    12f8 <SolveCubic+0x1b8>
movq   $0x0,(%rbx)
mov    $0x1,%eax
mov    $0x1,%dl
xor    %ecx,%ecx
jmp    1394 <SolveCubic+0x254>
movsd  %xmm4,0x28(%rsp)
xorpd  %xmm2,%xmm2
ucomisd %xmm1,%xmm2
jbe    1339 <SolveCubic+0x1f9>
movapd 0xe14(%rip),%xmm1
xorpd  %xmm1,%xmm5
movapd %xmm5,0x10(%rsp)
xorpd  %xmm1,%xmm0
movapd %xmm6,0x30(%rsp)
call   1060 <sqrt@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movapd 0x10(%rsp),%xmm0
divsd  %xmm1,%xmm0
call   1030 <acos@plt>
mulsd  0xda5(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movaps 0x30(%rsp),%xmm0
xorps  0xdcb(%rip),%xmm0
call   1060 <sqrt@plt>
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movapd %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1050 <cos@plt>
movapd 0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%rbx)
xorpd  0xd96(%rip),%xmm1
movapd %xmm1,0x10(%rsp)
movsd  0xd78(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
call   1050 <cos@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rbx)
movsd  0x8(%rsp),%xmm0
addsd  0xd5c(%rip),%xmm0
call   1050 <cos@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rbx)
mov    $0x3,%eax
xor    %edx,%edx
jmp    138c <SolveCubic+0x24c>
xorpd  0xd40(%rip),%xmm5
movapd %xmm5,%xmm0
movsd  %xmm4,0x28(%rsp)
call   1040 <cbrt@plt>
movsd  0x28(%rsp),%xmm4
movapd %xmm0,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx)
xorpd  0xd17(%rip),%xmm0
movlpd %xmm0,0x8(%rbx)
mov    $0x2,%eax
mov    $0x1,%cl
xor    %edx,%edx
jmp    1394 <SolveCubic+0x254>
movapd %xmm1,%xmm0
movapd %xmm5,0x10(%rsp)
call   1060 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x30(%rsp)
subsd  0x10(%rsp),%xmm0
call   1040 <cbrt@plt>
movsd  %xmm0,0x8(%rsp)
movapd 0x10(%rsp),%xmm0
addsd  0x30(%rsp),%xmm0
call   1040 <cbrt@plt>
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx)
mov    $0x1,%eax
mov    $0x1,%dl
xor    %ecx,%ecx
movsd  0x28(%rsp),%xmm4
movsd  (%rbx),%xmm0
subsd  %xmm4,%xmm0
movsd  %xmm0,(%rbx)
test   %dl,%dl
jne    13c4 <SolveCubic+0x284>
movsd  0x8(%rbx),%xmm0
subsd  %xmm4,%xmm0
movsd  %xmm0,0x8(%rbx)
test   %cl,%cl
jne    13c4 <SolveCubic+0x284>
movsd  0x10(%rbx),%xmm0
subsd  %xmm4,%xmm0
movsd  %xmm0,0x10(%rbx)
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @SolveCubic(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
%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
store double* %0, double** %3
store double* %1, double** %4
%22 = load double*, double** %3
%23 = getelementptr inbounds double, double* %22, i64 2
%24 = load double, double* %23
%25 = load double*, double** %3
%26 = getelementptr inbounds double, double* %25, i64 3
%27 = load double, double* %26
%28 = fdiv double %24, %27
store double %28, double* %8
%29 = load double*, double** %3
%30 = getelementptr inbounds double, double* %29, i64 1
%31 = load double, double* %30
%32 = load double*, double** %3
%33 = getelementptr inbounds double, double* %32, i64 3
%34 = load double, double* %33
%35 = fdiv double %31, %34
store double %35, double* %9
%36 = load double*, double** %3
%37 = getelementptr inbounds double, double* %36, i64 0
%38 = load double, double* %37
%39 = load double*, double** %3
%40 = getelementptr inbounds double, double* %39, i64 3
%41 = load double, double* %40
%42 = fdiv double %38, %41
store double %42, double* %10
%43 = load double, double* %8
%44 = load double, double* %8
%45 = fmul double %43, %44
store double %45, double* %11
%46 = load double, double* %11
%47 = load double, double* %9
%48 = call double @llvm.fmuladd.f64(double 0xBFD5555555555555, double %46, double %47)
%49 = fmul double 0x3FD5555555555555, %48
store double %49, double* %12
%50 = load double, double* %8
%51 = fmul double 0x3FB2F684BDA12F68, %50
%52 = load double, double* %11
%53 = load double, double* %8
%54 = fmul double 0x3FD5555555555555, %53
%55 = load double, double* %9
%56 = fmul double %54, %55
%57 = fneg double %56
%58 = call double @llvm.fmuladd.f64(double %51, double %52, double %57)
%59 = load double, double* %10
%60 = fadd double %58, %59
%61 = fmul double 5.000000e-01, %60
store double %61, double* %13
%62 = load double, double* %12
%63 = load double, double* %12
%64 = fmul double %62, %63
%65 = load double, double* %12
%66 = fmul double %64, %65
store double %66, double* %14
%67 = load double, double* %13
%68 = load double, double* %13
%69 = load double, double* %14
%70 = call double @llvm.fmuladd.f64(double %67, double %68, double %69)
store double %70, double* %15
%71 = load double, double* %15
%72 = fcmp ogt double %71, -1.000000e-09
br i1 %72, label %73, label %98
73: ; preds = %2
%74 = load double, double* %15
%75 = fcmp olt double %74, 1.000000e-09
br i1 %75, label %76, label %98
76: ; preds = %73
%77 = load double, double* %13
%78 = fcmp ogt double %77, -1.000000e-09
br i1 %78, label %79, label %85
79: ; preds = %76
%80 = load double, double* %13
%81 = fcmp olt double %80, 1.000000e-09
br i1 %81, label %82, label %85
82: ; preds = %79
%83 = load double*, double** %4
%84 = getelementptr inbounds double, double* %83, i64 0
store double 0.000000e+00, double* %84
store i32 1, i32* %6
br label %97
85: ; preds = %79, %76
%86 = load double, double* %13
%87 = fneg double %86
%88 = call double @cbrt(double %87)
store double %88, double* %16
%89 = load double, double* %16
%90 = fmul double 2.000000e+00, %89
%91 = load double*, double** %4
%92 = getelementptr inbounds double, double* %91, i64 0
store double %90, double* %92
%93 = load double, double* %16
%94 = fneg double %93
%95 = load double*, double** %4
%96 = getelementptr inbounds double, double* %95, i64 1
store double %94, double* %96
store i32 2, i32* %6
br label %97
97: ; preds = %85, %82
br label %157
98: ; preds = %73, %2
%99 = load double, double* %15
%100 = fcmp olt double %99, 0.000000e+00
br i1 %100, label %101, label %138
101: ; preds = %98
%102 = load double, double* %13
%103 = fneg double %102
%104 = load double, double* %14
%105 = fneg double %104
%106 = call i32 @sqrt(double %105)
%107 = sitofp i32 %106 to double
%108 = fdiv double %103, %107
%109 = call double @acos(double %108)
%110 = fmul double 0x3FD5555555555555, %109
store double %110, double* %17
%111 = load double, double* %12
%112 = fneg double %111
%113 = call i32 @sqrt(double %112)
%114 = mul nsw i32 2, %113
%115 = sitofp i32 %114 to double
store double %115, double* %18
%116 = load double, double* %18
%117 = load double, double* %17
%118 = call double @cos(double %117)
%119 = fmul double %116, %118
%120 = load double*, double** %4
%121 = getelementptr inbounds double, double* %120, i64 0
store double %119, double* %121
%122 = load double, double* %18
%123 = fneg double %122
%124 = load double, double* %17
%125 = fadd double %124, 0x3FF0C152382D7365
%126 = call double @cos(double %125)
%127 = fmul double %123, %126
%128 = load double*, double** %4
%129 = getelementptr inbounds double, double* %128, i64 1
store double %127, double* %129
%130 = load double, double* %18
%131 = fneg double %130
%132 = load double, double* %17
%133 = fsub double %132, 0x3FF0C152382D7365
%134 = call double @cos(double %133)
%135 = fmul double %131, %134
%136 = load double*, double** %4
%137 = getelementptr inbounds double, double* %136, i64 2
store double %135, double* %137
store i32 3, i32* %6
br label %156
138: ; preds = %98
%139 = load double, double* %15
%140 = call i32 @sqrt(double %139)
%141 = sitofp i32 %140 to double
store double %141, double* %19
%142 = load double, double* %19
%143 = load double, double* %13
%144 = fsub double %142, %143
%145 = call double @cbrt(double %144)
store double %145, double* %20
%146 = load double, double* %19
%147 = load double, double* %13
%148 = fadd double %146, %147
%149 = call double @cbrt(double %148)
%150 = fneg double %149
store double %150, double* %21
%151 = load double, double* %20
%152 = load double, double* %21
%153 = fadd double %151, %152
%154 = load double*, double** %4
%155 = getelementptr inbounds double, double* %154, i64 0
store double %153, double* %155
store i32 1, i32* %6
br label %156
156: ; preds = %138, %101
br label %157
157: ; preds = %156, %97
%158 = load double, double* %8
%159 = fmul double 0x3FD5555555555555, %158
store double %159, double* %7
store i32 0, i32* %5
br label %160
160: ; preds = %172, %157
%161 = load i32, i32* %5
%162 = load i32, i32* %6
%163 = icmp slt i32 %161, %162
br i1 %163, label %164, label %175
164: ; preds = %160
%165 = load double, double* %7
%166 = load double*, double** %4
%167 = load i32, i32* %5
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds double, double* %166, i64 %168
%170 = load double, double* %169
%171 = fsub double %170, %165
store double %171, double* %169
br label %172
172: ; preds = %164
%173 = load i32, i32* %5
%174 = add nsw i32 %173, 1
store i32 %174, i32* %5
br label %160
175: ; preds = %160
%176 = load i32, i32* %6
ret i32 %176
}

LLVM IR (-O2):
define i32 @SolveCubic(double* nocapture %0, double* nocapture %1) {
%3 = getelementptr inbounds double, double* %0, i64 2
%4 = load double, double* %3
%5 = getelementptr inbounds double, double* %0, i64 3
%6 = load double, double* %5
%7 = fdiv double %4, %6
%8 = getelementptr inbounds double, double* %0, i64 1
%9 = load double, double* %8
%10 = fdiv double %9, %6
%11 = load double, double* %0
%12 = fdiv double %11, %6
%13 = fmul double %7, %7
%14 = tail call double @llvm.fmuladd.f64(double %13, double 0xBFD5555555555555, double %10)
%15 = fmul double %14, 0x3FD5555555555555
%16 = fmul double %7, 0x3FB2F684BDA12F68
%17 = fmul double %7, 0x3FD5555555555555
%18 = fneg double %17
%19 = fmul double %10, %18
%20 = tail call double @llvm.fmuladd.f64(double %16, double %13, double %19)
%21 = fadd double %12, %20
%22 = fmul double %21, 5.000000e-01
%23 = fmul double %15, %15
%24 = fmul double %15, %23
%25 = tail call double @llvm.fmuladd.f64(double %22, double %22, double %24)
%26 = fcmp ogt double %25, -1.000000e-09
%27 = fcmp olt double %25, 1.000000e-09
%28 = and i1 %26, %27
br i1 %28, label %29, label %40
29: ; preds = %2
%30 = fcmp ogt double %22, -1.000000e-09
%31 = fcmp olt double %22, 1.000000e-09
%32 = and i1 %30, %31
br i1 %32, label %33, label %34
33: ; preds = %29
store double 0.000000e+00, double* %1
br label %73
34: ; preds = %29
%35 = fneg double %22
%36 = tail call double @cbrt(double %35)
%37 = fmul double %36, 2.000000e+00
store double %37, double* %1
%38 = fneg double %36
%39 = getelementptr inbounds double, double* %1, i64 1
store double %38, double* %39
br label %73
40: ; preds = %2
%41 = fcmp olt double %25, 0.000000e+00
br i1 %41, label %42, label %65
42: ; preds = %40
%43 = fneg double %22
%44 = fneg double %24
%45 = tail call i32 @sqrt(double %44)
%46 = sitofp i32 %45 to double
%47 = fdiv double %43, %46
%48 = tail call double @acos(double %47)
%49 = fmul double %48, 0x3FD5555555555555
%50 = fneg double %15
%51 = tail call i32 @sqrt(double %50)
%52 = shl nsw i32 %51, 1
%53 = sitofp i32 %52 to double
%54 = tail call double @cos(double %49)
%55 = fmul double %54, %53
store double %55, double* %1
%56 = fneg double %53
%57 = fadd double %49, 0x3FF0C152382D7365
%58 = tail call double @cos(double %57)
%59 = fmul double %58, %56
%60 = getelementptr inbounds double, double* %1, i64 1
store double %59, double* %60
%61 = fadd double %49, 0xBFF0C152382D7365
%62 = tail call double @cos(double %61)
%63 = fmul double %62, %56
%64 = getelementptr inbounds double, double* %1, i64 2
store double %63, double* %64
br label %73
65: ; preds = %40
%66 = tail call i32 @sqrt(double %25)
%67 = sitofp i32 %66 to double
%68 = fsub double %67, %22
%69 = tail call double @cbrt(double %68)
%70 = fadd double %22, %67
%71 = tail call double @cbrt(double %70)
%72 = fsub double %69, %71
store double %72, double* %1
br label %73
73: ; preds = %34, %33, %65, %42
%74 = phi i1 [ false, %42 ], [ true, %65 ], [ true, %33 ], [ false, %34 ]
%75 = phi i1 [ false, %42 ], [ false, %65 ], [ false, %33 ], [ true, %34 ]
%76 = phi i32 [ 3, %42 ], [ 1, %65 ], [ 1, %33 ], [ 2, %34 ]
%77 = load double, double* %1
%78 = fsub double %77, %17
store double %78, double* %1
br i1 %74, label %87, label %79
79: ; preds = %73
%80 = getelementptr inbounds double, double* %1, i64 1
%81 = load double, double* %80
%82 = fsub double %81, %17
store double %82, double* %80
br i1 %75, label %87, label %83
83: ; preds = %79
%84 = getelementptr inbounds double, double* %1, i64 2
%85 = load double, double* %84
%86 = fsub double %85, %17
store double %86, double* %84
br label %87
87: ; preds = %83, %79, %73
ret i32 %76
}