#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 *divideBy(double *, size_t, double);
double getXFactorising(double *, size_t);
double getXNewtonRaphson(double *, size_t);
double getXRangeHalving(double *, size_t);
int printSol(double *, size_t, double);
int /*<<< orphan*/ printf(char *, ...);
int sqrt(double);
void solvePrintEq(double *equation, size_t degree) {
  if (degree < 1)
    printf("No solutions, invalid equation.\n");
  else if (degree < 2)
    printf("% .8g\n", (-equation[0] / equation[1]));
  else if (degree < 3) {
    double a = equation[2], b = equation[1], c = equation[0],
           D = b * b - 4 * a * c;
    if (D >= 0) {
      printf("% .8g\n", (-b + sqrt(D)) / (2 * a));
      printf("% .8g\n", (-b - sqrt(D)) / (2 * a));
    } else {
      double real = (-b) / (2 * a), imag = sqrt(-D) / (2 * a);
      printf("% .8g + %.8gi\n", real, imag);
      printf("% .8g - %.8gi\n", real, imag);
    }
  } else {
    int foundSol = 0;
    double tmpSol = equation[0];
    if (tmpSol == 0)
      foundSol = (printf("% d\n", 0) > 0 ? 1 : 0);
    if (!foundSol)
      foundSol = printSol(equation, degree,
                          (tmpSol = getXFactorising(equation, degree)));
    if (!foundSol)
      foundSol = printSol(equation, degree,
                          (tmpSol = getXNewtonRaphson(equation, degree)));
    if (!foundSol)
      foundSol = printSol(equation, degree,
                          (tmpSol = getXRangeHalving(equation, degree)));
    if (foundSol)
      solvePrintEq(divideBy(equation, degree, tmpSol), degree - 1);
    else
      printf("No real solutions found (other complex solutions possible).\n");
  }
}


x86 assembly (clang, -O0):
<solvePrintEq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x1,-0x10(%rbp)
jae    11b1 <solvePrintEq+0x31>
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    152e <solvePrintEq+0x3ae>
cmpq   $0x2,-0x10(%rbp)
jae    11f7 <solvePrintEq+0x77>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
divsd  0x8(%rax),%xmm0
lea    0xe46(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
jmp    1529 <solvePrintEq+0x3a9>
cmpq   $0x3,-0x10(%rbp)
jae    13d2 <solvePrintEq+0x252>
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  0xdc3(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1330 <solvePrintEq+0x1b0>
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x30(%rbp),%xmm0
call   10a0 <sqrt@plt>
movsd  -0x60(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  0xd4b(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
lea    0xd64(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x30(%rbp),%xmm0
call   10a0 <sqrt@plt>
movsd  -0x58(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
subsd  %xmm1,%xmm0
movsd  0xcf4(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
lea    0xd0d(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
jmp    13cd <solvePrintEq+0x24d>
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xcb4(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   10a0 <sqrt@plt>
cvtsi2sd %eax,%xmm0
movsd  0xc79(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
lea    0xc8a(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
lea    0xc81(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
jmp    1524 <solvePrintEq+0x3a4>
movl   $0x0,-0x44(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1420 <solvePrintEq+0x2a0>
jp     1420 <solvePrintEq+0x2a0>
lea    0xc51(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1060 <printf@plt>
mov    %eax,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovg  %ecx,%eax
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
jne    145c <solvePrintEq+0x2dc>
mov    -0x8(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <getXFactorising@plt>
mov    -0x70(%rbp),%rdi
mov    -0x68(%rbp),%rsi
movsd  %xmm0,-0x50(%rbp)
call   1050 <printSol@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
jne    1498 <solvePrintEq+0x318>
mov    -0x8(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1070 <getXNewtonRaphson@plt>
mov    -0x80(%rbp),%rdi
mov    -0x78(%rbp),%rsi
movsd  %xmm0,-0x50(%rbp)
call   1050 <printSol@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
jne    14e0 <solvePrintEq+0x360>
mov    -0x8(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <getXRangeHalving@plt>
mov    -0x90(%rbp),%rdi
mov    -0x88(%rbp),%rsi
movsd  %xmm0,-0x50(%rbp)
call   1050 <printSol@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
je     1511 <solvePrintEq+0x391>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movsd  -0x50(%rbp),%xmm0
call   1090 <divideBy@plt>
mov    %rax,%rdi
mov    -0x10(%rbp),%rsi
sub    $0x1,%rsi
call   1080 <solvePrintEq@plt>
jmp    151f <solvePrintEq+0x39f>
lea    0xb43(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1524 <solvePrintEq+0x3a4>
jmp    1529 <solvePrintEq+0x3a9>
jmp    152e <solvePrintEq+0x3ae>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solvePrintEq>:
push   %r15
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xeaf(%rip),%r15
jmp    11d8 <solvePrintEq+0x58>
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <getXFactorising@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
movsd  %xmm0,0x8(%rsp)
call   1060 <printSol@plt>
test   %eax,%eax
je     1220 <solvePrintEq+0xa0>
mov    %r14,%rdi
mov    %rbx,%rsi
movsd  0x8(%rsp),%xmm0
call   1090 <divideBy@plt>
mov    %rax,%r14
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
je     126d <solvePrintEq+0xed>
test   %rbx,%rbx
je     128c <solvePrintEq+0x10c>
cmp    $0x2,%rbx
jbe    12a1 <solvePrintEq+0x121>
movsd  (%r14),%xmm0
movsd  %xmm0,0x8(%rsp)
ucomisd 0xe10(%rip),%xmm0
jne    11a0 <solvePrintEq+0x20>
jp     11a0 <solvePrintEq+0x20>
mov    %r15,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1070 <printf@plt>
test   %eax,%eax
jg     11c0 <solvePrintEq+0x40>
jmp    11a0 <solvePrintEq+0x20>
xchg   %ax,%ax
mov    %r14,%rdi
mov    %rbx,%rsi
call   1080 <getXNewtonRaphson@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
movsd  %xmm0,0x8(%rsp)
call   1060 <printSol@plt>
test   %eax,%eax
jne    11c0 <solvePrintEq+0x40>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <getXRangeHalving@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
movsd  %xmm0,0x8(%rsp)
call   1060 <printSol@plt>
test   %eax,%eax
jne    11c0 <solvePrintEq+0x40>
lea    0xddf(%rip),%rdi
jmp    1293 <solvePrintEq+0x113>
movsd  (%r14),%xmm0
xorpd  0xd86(%rip),%xmm0
divsd  0x8(%r14),%xmm0
lea    0xd99(%rip),%rdi
jmp    13c0 <solvePrintEq+0x240>
lea    0xdf3(%rip),%rdi
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <puts@plt>
movsd  0x10(%r14),%xmm1
movsd  0xd61(%rip),%xmm2
mulsd  %xmm1,%xmm2
mulsd  (%r14),%xmm2
movsd  0x8(%r14),%xmm3
movapd %xmm3,%xmm0
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
movapd 0xd26(%rip),%xmm2
xorpd  %xmm3,%xmm2
jae    1349 <solvePrintEq+0x1c9>
addsd  %xmm1,%xmm1
movsd  %xmm1,0x8(%rsp)
divsd  %xmm1,%xmm2
movapd %xmm2,0x10(%rsp)
xorpd  0xd04(%rip),%xmm0
call   10a0 <sqrt@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
divsd  0x8(%rsp),%xmm1
movsd  %xmm1,0x8(%rsp)
lea    0xd0c(%rip),%rdi
movaps 0x10(%rsp),%xmm0
mov    $0x2,%al
call   1070 <printf@plt>
lea    0xd08(%rip),%rdi
movaps 0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mov    $0x2,%al
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
jmp    1070 <printf@plt>
movapd %xmm2,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
movapd %xmm0,0x30(%rsp)
movapd %xmm3,0x20(%rsp)
call   10a0 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
subsd  0x20(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm1,%xmm1
movsd  %xmm1,0x8(%rsp)
divsd  %xmm1,%xmm0
lea    0xc92(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movaps 0x30(%rsp),%xmm0
call   10a0 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movapd 0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
divsd  0x8(%rsp),%xmm1
movapd %xmm1,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
jmp    1070 <printf@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"No solutions, invalid equation.\0A\00"
@.str.1 = [7 x i8] c"% .8g\0A\00"
@.str.2 = [15 x i8] c"% .8g + %.8gi\0A\00"
@.str.3 = [15 x i8] c"% .8g - %.8gi\0A\00"
@.str.4 = [5 x i8] c"% d\0A\00"
@.str.5 = [61 x i8] c"No real solutions found (other complex solutions possible).\0A\00"
define void @solvePrintEq(double* %0, i64 %1) {
%3 = alloca double*
%4 = alloca i64
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca i32
%12 = alloca double
store double* %0, double** %3
store i64 %1, i64* %4
%13 = load i64, i64* %4
%14 = icmp ult i64 %13, 1
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %150
17: ; preds = %2
%18 = load i64, i64* %4
%19 = icmp ult i64 %18, 2
br i1 %19, label %20, label %30
20: ; preds = %17
%21 = load double*, double** %3
%22 = getelementptr inbounds double, double* %21, i64 0
%23 = load double, double* %22
%24 = fneg double %23
%25 = load double*, double** %3
%26 = getelementptr inbounds double, double* %25, i64 1
%27 = load double, double* %26
%28 = fdiv double %24, %27
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %28)
br label %149
30: ; preds = %17
%31 = load i64, i64* %4
%32 = icmp ult i64 %31, 3
br i1 %32, label %33, label %94
33: ; preds = %30
%34 = load double*, double** %3
%35 = getelementptr inbounds double, double* %34, i64 2
%36 = load double, double* %35
store double %36, double* %5
%37 = load double*, double** %3
%38 = getelementptr inbounds double, double* %37, i64 1
%39 = load double, double* %38
store double %39, double* %6
%40 = load double*, double** %3
%41 = getelementptr inbounds double, double* %40, i64 0
%42 = load double, double* %41
store double %42, double* %7
%43 = load double, double* %6
%44 = load double, double* %6
%45 = load double, double* %5
%46 = fmul double 4.000000e+00, %45
%47 = load double, double* %7
%48 = fmul double %46, %47
%49 = fneg double %48
%50 = call double @llvm.fmuladd.f64(double %43, double %44, double %49)
store double %50, double* %8
%51 = load double, double* %8
%52 = fcmp oge double %51, 0.000000e+00
br i1 %52, label %53, label %74
53: ; preds = %33
%54 = load double, double* %6
%55 = fneg double %54
%56 = load double, double* %8
%57 = call i32 @sqrt(double %56)
%58 = sitofp i32 %57 to double
%59 = fadd double %55, %58
%60 = load double, double* %5
%61 = fmul double 2.000000e+00, %60
%62 = fdiv double %59, %61
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %62)
%64 = load double, double* %6
%65 = fneg double %64
%66 = load double, double* %8
%67 = call i32 @sqrt(double %66)
%68 = sitofp i32 %67 to double
%69 = fsub double %65, %68
%70 = load double, double* %5
%71 = fmul double 2.000000e+00, %70
%72 = fdiv double %69, %71
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %72)
br label %93
74: ; preds = %33
%75 = load double, double* %6
%76 = fneg double %75
%77 = load double, double* %5
%78 = fmul double 2.000000e+00, %77
%79 = fdiv double %76, %78
store double %79, double* %9
%80 = load double, double* %8
%81 = fneg double %80
%82 = call i32 @sqrt(double %81)
%83 = sitofp i32 %82 to double
%84 = load double, double* %5
%85 = fmul double 2.000000e+00, %84
%86 = fdiv double %83, %85
store double %86, double* %10
%87 = load double, double* %9
%88 = load double, double* %10
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double %87, double %88)
%90 = load double, double* %9
%91 = load double, double* %10
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %90, double %91)
br label %93
93: ; preds = %74, %53
br label %148
94: ; preds = %30
store i32 0, i32* %11
%95 = load double*, double** %3
%96 = getelementptr inbounds double, double* %95, i64 0
%97 = load double, double* %96
store double %97, double* %12
%98 = load double, double* %12
%99 = fcmp oeq double %98, 0.000000e+00
br i1 %99, label %100, label %105
100: ; preds = %94
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 0)
%102 = icmp sgt i32 %101, 0
%103 = zext i1 %102 to i64
%104 = select i1 %102, i32 1, i32 0
store i32 %104, i32* %11
br label %105
105: ; preds = %100, %94
%106 = load i32, i32* %11
%107 = icmp ne i32 %106, 0
br i1 %107, label %115, label %108
108: ; preds = %105
%109 = load double*, double** %3
%110 = load i64, i64* %4
%111 = load double*, double** %3
%112 = load i64, i64* %4
%113 = call double @getXFactorising(double* %111, i64 %112)
store double %113, double* %12
%114 = call i32 @printSol(double* %109, i64 %110, double %113)
store i32 %114, i32* %11
br label %115
115: ; preds = %108, %105
%116 = load i32, i32* %11
%117 = icmp ne i32 %116, 0
br i1 %117, label %125, label %118
118: ; preds = %115
%119 = load double*, double** %3
%120 = load i64, i64* %4
%121 = load double*, double** %3
%122 = load i64, i64* %4
%123 = call double @getXNewtonRaphson(double* %121, i64 %122)
store double %123, double* %12
%124 = call i32 @printSol(double* %119, i64 %120, double %123)
store i32 %124, i32* %11
br label %125
125: ; preds = %118, %115
%126 = load i32, i32* %11
%127 = icmp ne i32 %126, 0
br i1 %127, label %135, label %128
128: ; preds = %125
%129 = load double*, double** %3
%130 = load i64, i64* %4
%131 = load double*, double** %3
%132 = load i64, i64* %4
%133 = call double @getXRangeHalving(double* %131, i64 %132)
store double %133, double* %12
%134 = call i32 @printSol(double* %129, i64 %130, double %133)
store i32 %134, i32* %11
br label %135
135: ; preds = %128, %125
%136 = load i32, i32* %11
%137 = icmp ne i32 %136, 0
br i1 %137, label %138, label %145
138: ; preds = %135
%139 = load double*, double** %3
%140 = load i64, i64* %4
%141 = load double, double* %12
%142 = call double* @divideBy(double* %139, i64 %140, double %141)
%143 = load i64, i64* %4
%144 = sub i64 %143, 1
br label %147
145: ; preds = %135
%146 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.5, i64 0, i64 0))
br label %147
147: ; preds = %145, %138
br label %148
148: ; preds = %147, %93
br label %149
149: ; preds = %148, %20
br label %150
150: ; preds = %149, %15
ret void
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"% .8g\0A\00"
@.str.2 = [15 x i8] c"% .8g + %.8gi\0A\00"
@.str.3 = [15 x i8] c"% .8g - %.8gi\0A\00"
@.str.4 = [5 x i8] c"% d\0A\00"
@str = [60 x i8] c"No real solutions found (other complex solutions possible).\00"
@str.6 = [32 x i8] c"No solutions, invalid equation.\00"
define void @solvePrintEq(double* %0, i64 %1) {
br label %3
3: ; preds = %67, %2
%4 = phi double* [ %0, %2 ], [ %69, %67 ]
%5 = phi i64 [ %1, %2 ], [ %70, %67 ]
switch i64 %5, label %15 [
i64 0, label %6
i64 1, label %8
]
6: ; preds = %3
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.6, i64 0, i64 0))
br label %73
8: ; preds = %3
%9 = load double, double* %4
%10 = fneg double %9
%11 = getelementptr inbounds double, double* %4, i64 1
%12 = load double, double* %11
%13 = fdiv double %10, %12
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %13)
br label %73
15: ; preds = %3
%16 = icmp ult i64 %5, 3
br i1 %16, label %17, label %49
17: ; preds = %15
%18 = getelementptr inbounds double, double* %4, i64 2
%19 = load double, double* %18
%20 = getelementptr inbounds double, double* %4, i64 1
%21 = load double, double* %20
%22 = load double, double* %4
%23 = fmul double %19, -4.000000e+00
%24 = fmul double %23, %22
%25 = tail call double @llvm.fmuladd.f64(double %21, double %21, double %24)
%26 = fcmp ult double %25, 0.000000e+00
%27 = fneg double %21
br i1 %26, label %40, label %28
28: ; preds = %17
%29 = tail call i32 @sqrt(double %25)
%30 = sitofp i32 %29 to double
%31 = fsub double %30, %21
%32 = fmul double %19, 2.000000e+00
%33 = fdiv double %31, %32
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %33)
%35 = tail call i32 @sqrt(double %25)
%36 = sitofp i32 %35 to double
%37 = fsub double %27, %36
%38 = fdiv double %37, %32
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %38)
br label %73
40: ; preds = %17
%41 = fmul double %19, 2.000000e+00
%42 = fdiv double %27, %41
%43 = fneg double %25
%44 = tail call i32 @sqrt(double %43)
%45 = sitofp i32 %44 to double
%46 = fdiv double %45, %41
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double %42, double %46)
%48 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %42, double %46)
br label %73
49: ; preds = %15
%50 = load double, double* %4
%51 = fcmp oeq double %50, 0.000000e+00
br i1 %51, label %52, label %55
52: ; preds = %49
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 0)
%54 = icmp slt i32 %53, 1
br i1 %54, label %55, label %67
55: ; preds = %52, %49
%56 = tail call double @getXFactorising(double* %4, i64 %5)
%57 = tail call i32 @printSol(double* %4, i64 %5, double %56)
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %67
59: ; preds = %55
%60 = tail call double @getXNewtonRaphson(double* %4, i64 %5)
%61 = tail call i32 @printSol(double* %4, i64 %5, double %60)
%62 = icmp eq i32 %61, 0
br i1 %62, label %63, label %67
63: ; preds = %59
%64 = tail call double @getXRangeHalving(double* %4, i64 %5)
%65 = tail call i32 @printSol(double* %4, i64 %5, double %64)
%66 = icmp eq i32 %65, 0
br i1 %66, label %71, label %67
67: ; preds = %52, %55, %59, %63
%68 = phi double [ %64, %63 ], [ %60, %59 ], [ %56, %55 ], [ %50, %52 ]
%69 = tail call double* @divideBy(double* %4, i64 %5, double %68)
%70 = add i64 %5, -1
br label %3
71: ; preds = %63
%72 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str, i64 0, i64 0))
br label %73
73: ; preds = %71, %28, %40, %8, %6
ret void
}