double FalsePosition() {
  double root = 0;
  double a = 1, b = 2;
  double c = 0;
  int loopCounter = 0;
  if ((((a) * (a) * (a)) - (a)-2) * (((b) * (b) * (b)) - (b)-2) < 0) {
    while (1) {
      loopCounter++;
      c = (a * (((b) * (b) * (b)) - (b)-2) - b * (((a) * (a) * (a)) - (a)-2)) /
          ((((b) * (b) * (b)) - (b)-2) - (((a) * (a) * (a)) - (a)-2));
      if ((((c) * (c) * (c)) - (c)-2) < 0.00001 &&
          (((c) * (c) * (c)) - (c)-2) > -0.00001) {
        root = c;
        break;
      }
      if (((((a) * (a) * (a)) - (a)-2)) * ((((c) * (c) * (c)) - (c)-2)) < 0) {
        b = c;
      } else {
        a = c;
      }
    }
  }
  printf("It took %d loops.\n", loopCounter);
  return root;
}


x86 assembly (clang, -O0):
<FalsePosition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xee0(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xecb(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe7c(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm3
movsd  -0x18(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
movsd  0xe3d(%rip),%xmm2
subsd  %xmm2,%xmm0
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    147f <FalsePosition+0x36f>
jmp    11dd <FalsePosition+0xcd>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  -0x18(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm3
movsd  -0x18(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  0xdda(%rip),%xmm1
subsd  %xmm1,%xmm2
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm3
mulsd  -0x10(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm5
movsd  -0x10(%rbp),%xmm4
movq   %xmm4,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
movsd  0xd96(%rip),%xmm4
subsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm3
movsd  -0x18(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  0xd34(%rip),%xmm2
subsd  %xmm2,%xmm1
movsd  -0x10(%rbp),%xmm2
mulsd  -0x10(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm4
movsd  -0x10(%rbp),%xmm3
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
movsd  0xcf5(%rip),%xmm3
subsd  %xmm3,%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xca9(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xcad(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    13cd <FalsePosition+0x2bd>
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xc58(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xc64(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    13cd <FalsePosition+0x2bd>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    147a <FalsePosition+0x36a>
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xbf8(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm3
movsd  -0x20(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
movsd  0xbb9(%rip),%xmm2
subsd  %xmm2,%xmm0
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    146b <FalsePosition+0x35b>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1475 <FalsePosition+0x365>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11dd <FalsePosition+0xcd>
jmp    147f <FalsePosition+0x36f>
mov    -0x24(%rbp),%esi
lea    0xb97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FalsePosition>:
sub    $0x18,%rsp
movapd 0xee4(%rip),%xmm1
mov    $0x1,%esi
movapd 0xee6(%rip),%xmm9
movapd 0xeed(%rip),%xmm10
movsd  0xef5(%rip),%xmm2
movsd  0xef5(%rip),%xmm3
movsd  0xef4(%rip),%xmm8
xorpd  %xmm6,%xmm6
jmp    11a4 <FalsePosition+0x94>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mulsd  %xmm4,%xmm7
xor    %eax,%eax
ucomisd %xmm7,%xmm6
seta   %al
movd   %eax,%xmm4
pshufd $0x44,%xmm4,%xmm4
psllq  $0x3f,%xmm4
psrad  $0x1f,%xmm4
pshufd $0xf5,%xmm4,%xmm4
movapd %xmm1,%xmm5
movsd  %xmm0,%xmm5
unpcklpd %xmm0,%xmm1
andpd  %xmm4,%xmm5
andnpd %xmm1,%xmm4
orpd   %xmm5,%xmm4
add    $0x1,%esi
movapd %xmm4,%xmm1
movapd %xmm1,%xmm4
mulpd  %xmm1,%xmm4
movapd %xmm1,%xmm5
xorpd  %xmm9,%xmm5
mulpd  %xmm1,%xmm4
subpd  %xmm1,%xmm4
addpd  %xmm10,%xmm4
movapd %xmm4,%xmm7
unpckhpd %xmm4,%xmm7
mulsd  %xmm7,%xmm5
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm5,%xmm0
subsd  %xmm7,%xmm4
divsd  %xmm4,%xmm0
movapd %xmm0,%xmm4
mulsd  %xmm0,%xmm4
mulsd  %xmm0,%xmm4
subsd  %xmm0,%xmm4
addsd  %xmm2,%xmm4
ucomisd %xmm4,%xmm3
jbe    1160 <FalsePosition+0x50>
ucomisd %xmm8,%xmm4
jbe    1160 <FalsePosition+0x50>
lea    0xe32(%rip),%rdi
xor    %eax,%eax
movapd %xmm0,(%rsp)
call   1030 <printf@plt>
movaps (%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"It took %d loops.\0A\00"
define double @FalsePosition() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca i32
store double 0.000000e+00, double* %1
store double 1.000000e+00, double* %2
store double 2.000000e+00, double* %3
store double 0.000000e+00, double* %4
store i32 0, i32* %5
%6 = load double, double* %2
%7 = load double, double* %2
%8 = fmul double %6, %7
%9 = load double, double* %2
%10 = load double, double* %2
%11 = fneg double %10
%12 = call double @llvm.fmuladd.f64(double %8, double %9, double %11)
%13 = fsub double %12, 2.000000e+00
%14 = load double, double* %3
%15 = load double, double* %3
%16 = fmul double %14, %15
%17 = load double, double* %3
%18 = load double, double* %3
%19 = fneg double %18
%20 = call double @llvm.fmuladd.f64(double %16, double %17, double %19)
%21 = fsub double %20, 2.000000e+00
%22 = fmul double %13, %21
%23 = fcmp olt double %22, 0.000000e+00
br i1 %23, label %24, label %113
24: ; preds = %0
br label %25
25: ; preds = %24, %111
%26 = load i32, i32* %5
%27 = add nsw i32 %26, 1
store i32 %27, i32* %5
%28 = load double, double* %2
%29 = load double, double* %3
%30 = load double, double* %3
%31 = fmul double %29, %30
%32 = load double, double* %3
%33 = load double, double* %3
%34 = fneg double %33
%35 = call double @llvm.fmuladd.f64(double %31, double %32, double %34)
%36 = fsub double %35, 2.000000e+00
%37 = load double, double* %3
%38 = load double, double* %2
%39 = load double, double* %2
%40 = fmul double %38, %39
%41 = load double, double* %2
%42 = load double, double* %2
%43 = fneg double %42
%44 = call double @llvm.fmuladd.f64(double %40, double %41, double %43)
%45 = fsub double %44, 2.000000e+00
%46 = fmul double %37, %45
%47 = fneg double %46
%48 = call double @llvm.fmuladd.f64(double %28, double %36, double %47)
%49 = load double, double* %3
%50 = load double, double* %3
%51 = fmul double %49, %50
%52 = load double, double* %3
%53 = load double, double* %3
%54 = fneg double %53
%55 = call double @llvm.fmuladd.f64(double %51, double %52, double %54)
%56 = fsub double %55, 2.000000e+00
%57 = load double, double* %2
%58 = load double, double* %2
%59 = fmul double %57, %58
%60 = load double, double* %2
%61 = load double, double* %2
%62 = fneg double %61
%63 = call double @llvm.fmuladd.f64(double %59, double %60, double %62)
%64 = fsub double %63, 2.000000e+00
%65 = fsub double %56, %64
%66 = fdiv double %48, %65
store double %66, double* %4
%67 = load double, double* %4
%68 = load double, double* %4
%69 = fmul double %67, %68
%70 = load double, double* %4
%71 = load double, double* %4
%72 = fneg double %71
%73 = call double @llvm.fmuladd.f64(double %69, double %70, double %72)
%74 = fsub double %73, 2.000000e+00
%75 = fcmp olt double %74, 1.000000e-05
br i1 %75, label %76, label %88
76: ; preds = %25
%77 = load double, double* %4
%78 = load double, double* %4
%79 = fmul double %77, %78
%80 = load double, double* %4
%81 = load double, double* %4
%82 = fneg double %81
%83 = call double @llvm.fmuladd.f64(double %79, double %80, double %82)
%84 = fsub double %83, 2.000000e+00
%85 = fcmp ogt double %84, -1.000000e-05
br i1 %85, label %86, label %88
86: ; preds = %76
%87 = load double, double* %4
store double %87, double* %1
br label %112
88: ; preds = %76, %25
%89 = load double, double* %2
%90 = load double, double* %2
%91 = fmul double %89, %90
%92 = load double, double* %2
%93 = load double, double* %2
%94 = fneg double %93
%95 = call double @llvm.fmuladd.f64(double %91, double %92, double %94)
%96 = fsub double %95, 2.000000e+00
%97 = load double, double* %4
%98 = load double, double* %4
%99 = fmul double %97, %98
%100 = load double, double* %4
%101 = load double, double* %4
%102 = fneg double %101
%103 = call double @llvm.fmuladd.f64(double %99, double %100, double %102)
%104 = fsub double %103, 2.000000e+00
%105 = fmul double %96, %104
%106 = fcmp olt double %105, 0.000000e+00
br i1 %106, label %107, label %109
107: ; preds = %88
%108 = load double, double* %4
store double %108, double* %3
br label %111
109: ; preds = %88
%110 = load double, double* %4
store double %110, double* %2
br label %111
111: ; preds = %109, %107
br label %25
112: ; preds = %86
br label %113
113: ; preds = %112, %0
%114 = load i32, i32* %5
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %114)
%116 = load double, double* %1
ret double %116
}

LLVM IR (-O2):
@.str = [19 x i8] c"It took %d loops.\0A\00"
define double @FalsePosition() {
br label %1
1: ; preds = %0, %24
%2 = phi i32 [ 0, %0 ], [ %4, %24 ]
%3 = phi <2 x double> [ <double 2.000000e+00, double 1.000000e+00>, %0 ], [ %31, %24 ]
%4 = add nuw nsw i32 %2, 1
%5 = fmul <2 x double> %3, %3
%6 = fneg <2 x double> %3
%7 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %5, <2 x double> %3, <2 x double> %6)
%8 = fadd <2 x double> %7, <double -2.000000e+00, double -2.000000e+00>
%9 = extractelement <2 x double> %8, i64 1
%10 = extractelement <2 x double> %6, i64 0
%11 = fmul double %9, %10
%12 = extractelement <2 x double> %8, i64 0
%13 = extractelement <2 x double> %3, i64 1
%14 = tail call double @llvm.fmuladd.f64(double %13, double %12, double %11)
%15 = fsub double %12, %9
%16 = fdiv double %14, %15
%17 = fmul double %16, %16
%18 = fneg double %16
%19 = tail call double @llvm.fmuladd.f64(double %17, double %16, double %18)
%20 = fadd double %19, -2.000000e+00
%21 = fcmp olt double %20, 1.000000e-05
%22 = fcmp ogt double %20, -1.000000e-05
%23 = and i1 %21, %22
br i1 %23, label %32, label %24
24: ; preds = %1
%25 = fmul double %9, %20
%26 = fcmp olt double %25, 0.000000e+00
%27 = insertelement <2 x i1> poison, i1 %26, i64 0
%28 = shufflevector <2 x i1> %27, <2 x i1> poison, <2 x i32> zeroinitializer
%29 = insertelement <2 x double> %3, double %16, i64 0
%30 = insertelement <2 x double> %3, double %16, i64 1
%31 = select <2 x i1> %28, <2 x double> %29, <2 x double> %30
br label %1
32: ; preds = %1
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %4)
ret double %16
}