#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 */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
main() {
  float x0, x1, x2;
  int i = 1, n;
retry:
  printf("enter the interval of root:\n");
  printf("a:");
  scanf("%f", &x0);
  printf("b:");
  scanf("%f", &x1);
  if ((((x0 * x0 * x0) - (4 * x0) - 9) < 0 &&
       ((x1 * x1 * x1) - (4 * x1) - 9) < 0) ||
      (((x0 * x0 * x0) - (4 * x0) - 9) > 0 && ((x1 * x1 * x1) - (4 * x1) - 9)) >
          0) {
    printf("\nsign of f(x) for points (a,b) is same please retry");
    printf("\n");
    goto retry;
  }
  x2 = (x1 + x0) / 2.00;
  while (((x2 * x2 * x2) - (4 * x2) - 9) > 0.00001 ||
         ((x2 * x2 * x2) - (4 * x2) - 9) < -0.00001) {
    x2 = (x1 + x0) / 2.00;
    if (((x0 * x0 * x0) - (4 * x0) - 9) < 0.00 &&
        ((x2 * x2 * x2) - (4 * x2) - 9) > 0.00)
      x1 = x2;
    if (((x2 * x2 * x2) - (4 * x2) - 9) < 0.0 &&
        ((x1 * x1 * x1) - (4 * x1) - 9) > 0.00)
      x0 = x2;
    printf("%d approximation of the root:%f", i, x2);
    printf("\tf(x)=%f", ((x2 * x2 * x2) - (4 * x2) - 9));
    printf("\n");
    i++;
  }
  printf("\n");
  printf("real root of the equation is:%f", x2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x14(%rbp)
lea    0xee3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf64(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf46(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
movss  -0x8(%rbp),%xmm2
movss  0xe6d(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  0xe47(%rip),%xmm0
subss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
jbe    1212 <main+0xf2>
movss  -0xc(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  0xe24(%rip),%xmm0
mulss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  0xdfe(%rip),%xmm0
subss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
ja     12bf <main+0x19f>
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
movss  0xddb(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xdb5(%rip),%xmm1
subss  %xmm1,%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
mov    %al,-0x19(%rbp)
jbe    12ae <main+0x18e>
movss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm2
movss  0xd8d(%rip),%xmm1
mulss  -0xc(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xd67(%rip),%xmm1
subss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
jle    12e0 <main+0x1c0>
lea    0xd7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1136 <main+0x16>
movss  -0xc(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd12(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
movss  0xcea(%rip),%xmm1
mulss  -0x10(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xcc4(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
movsd  0xcc2(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x1a(%rbp)
ja     13ae <main+0x28e>
movss  -0x10(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
movss  0xc92(%rip),%xmm1
mulss  -0x10(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xc6c(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc74(%rip),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x1a(%rbp)
mov    -0x1a(%rbp),%al
test   $0x1,%al
jne    13be <main+0x29e>
jmp    15b2 <main+0x492>
movss  -0xc(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc34(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
movss  0xc0c(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xbe6(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1487 <main+0x367>
movss  -0x10(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
movss  0xbbe(%rip),%xmm1
mulss  -0x10(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xb98(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1487 <main+0x367>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x10(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
movss  0xb66(%rip),%xmm1
mulss  -0x10(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xb40(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    152d <main+0x40d>
movss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm2
movss  0xb18(%rip),%xmm1
mulss  -0xc(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xaf2(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    152d <main+0x40d>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x14(%rbp),%esi
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xb37(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
movss  0xaa6(%rip),%xmm1
mulss  -0x10(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xa80(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xb08(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xa9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1303 <main+0x1e3>
lea    0xa82(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xad0(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xecb(%rip),%r15
lea    0xf44(%rip),%rbx
lea    0x4(%rsp),%r12
lea    0xebb(%rip),%r13
mov    %rsp,%rbp
lea    0xeb4(%rip),%r14
jmp    1194 <main+0x54>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf08(%rip),%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1060 <scanf@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1060 <scanf@plt>
movss  0x4(%rsp),%xmm1
movaps %xmm1,%xmm0
mulss  %xmm1,%xmm0
movaps %xmm1,%xmm2
mulss  0xe1e(%rip),%xmm2
mulss  %xmm1,%xmm0
addss  %xmm2,%xmm0
addss  0xe12(%rip),%xmm0
xorps  %xmm4,%xmm4
ucomiss %xmm0,%xmm4
jbe    1227 <main+0xe7>
movss  (%rsp),%xmm2
movaps %xmm2,%xmm3
mulss  %xmm2,%xmm3
mulss  %xmm2,%xmm3
mulss  0xdee(%rip),%xmm2
addss  %xmm3,%xmm2
addss  0xde6(%rip),%xmm2
ucomiss %xmm2,%xmm4
ja     1180 <main+0x40>
ucomiss %xmm4,%xmm0
movss  (%rsp),%xmm0
jbe    1262 <main+0x122>
movaps %xmm0,%xmm2
mulss  %xmm0,%xmm2
movaps %xmm0,%xmm3
mulss  0xdbd(%rip),%xmm3
mulss  %xmm0,%xmm2
addss  %xmm3,%xmm2
addss  0xdb1(%rip),%xmm2
ucomiss %xmm4,%xmm2
jne    1180 <main+0x40>
jp     1180 <main+0x40>
movaps %xmm1,%xmm2
addss  %xmm0,%xmm2
mulss  0xd97(%rip),%xmm2
movaps %xmm2,%xmm3
mulss  %xmm2,%xmm3
movss  0xd80(%rip),%xmm4
mulss  %xmm2,%xmm4
mulss  %xmm2,%xmm3
addss  %xmm4,%xmm3
addss  0xd70(%rip),%xmm3
cvtss2sd %xmm3,%xmm3
ucomisd 0xd70(%rip),%xmm3
ja     12c2 <main+0x182>
movsd  0xd6e(%rip),%xmm4
ucomisd %xmm3,%xmm4
ja     12c2 <main+0x182>
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
movsd  %xmm0,0x8(%rsp)
jmp    13e8 <main+0x2a8>
mov    $0x1,%ebx
xorps  %xmm6,%xmm6
lea    0xd89(%rip),%r14
lea    0xda2(%rip),%r15
jmp    12f1 <main+0x1b1>
nopw   0x0(%rax,%rax,1)
add    $0x1,%ebx
movss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
xorps  %xmm6,%xmm6
movaps %xmm0,%xmm2
addss  %xmm1,%xmm2
mulss  0xd08(%rip),%xmm2
movaps %xmm1,%xmm3
mulss  %xmm1,%xmm3
mulss  %xmm1,%xmm3
movss  0xced(%rip),%xmm4
mulss  %xmm4,%xmm1
addss  %xmm3,%xmm1
movss  0xce1(%rip),%xmm5
addss  %xmm5,%xmm1
ucomiss %xmm1,%xmm6
movaps %xmm2,%xmm1
mulss  %xmm2,%xmm1
movaps %xmm2,%xmm3
mulss  %xmm4,%xmm3
mulss  %xmm2,%xmm1
addss  %xmm3,%xmm1
addss  %xmm5,%xmm1
jbe    1353 <main+0x213>
ucomiss %xmm6,%xmm1
jbe    1353 <main+0x213>
movss  %xmm2,(%rsp)
movaps %xmm2,%xmm0
ucomiss %xmm1,%xmm6
jbe    1382 <main+0x242>
movaps %xmm0,%xmm3
mulss  %xmm0,%xmm3
mulss  %xmm0,%xmm3
mulss  0xc95(%rip),%xmm0
addss  %xmm3,%xmm0
addss  0xc8d(%rip),%xmm0
ucomiss %xmm6,%xmm0
jbe    1382 <main+0x242>
movss  %xmm2,0x4(%rsp)
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
mov    %r14,%rdi
mov    %ebx,%esi
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%al
call   1050 <printf@plt>
mov    %r15,%rdi
movsd  0x10(%rsp),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsd  0x10(%rsp),%xmm1
ucomisd 0xc40(%rip),%xmm1
ja     12e0 <main+0x1a0>
movsd  0xc3a(%rip),%xmm0
ucomisd %xmm1,%xmm0
ja     12e0 <main+0x1a0>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xc8a(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [29 x i8] c"enter the interval of root:\0A\00"
@.str.1 = [3 x i8] c"a:\00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [3 x i8] c"b:\00"
@.str.4 = [52 x i8] c"\0Asign of f(x) for points (a,b) is same please retry\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [32 x i8] c"%d approximation of the root:%f\00"
@.str.7 = [9 x i8] c"\09f(x)=%f\00"
@.str.8 = [32 x i8] c"real root of the equation is:%f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %5
br label %7
7: ; preds = %60, %0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %3)
%13 = load float, float* %2
%14 = load float, float* %2
%15 = fmul float %13, %14
%16 = load float, float* %2
%17 = load float, float* %2
%18 = fmul float 4.000000e+00, %17
%19 = fneg float %18
%20 = call float @llvm.fmuladd.f32(float %15, float %16, float %19)
%21 = fsub float %20, 9.000000e+00
%22 = fcmp olt float %21, 0.000000e+00
br i1 %22, label %23, label %34
23: ; preds = %7
%24 = load float, float* %3
%25 = load float, float* %3
%26 = fmul float %24, %25
%27 = load float, float* %3
%28 = load float, float* %3
%29 = fmul float 4.000000e+00, %28
%30 = fneg float %29
%31 = call float @llvm.fmuladd.f32(float %26, float %27, float %30)
%32 = fsub float %31, 9.000000e+00
%33 = fcmp olt float %32, 0.000000e+00
br i1 %33, label %60, label %34
34: ; preds = %23, %7
%35 = load float, float* %2
%36 = load float, float* %2
%37 = fmul float %35, %36
%38 = load float, float* %2
%39 = load float, float* %2
%40 = fmul float 4.000000e+00, %39
%41 = fneg float %40
%42 = call float @llvm.fmuladd.f32(float %37, float %38, float %41)
%43 = fsub float %42, 9.000000e+00
%44 = fcmp ogt float %43, 0.000000e+00
br i1 %44, label %45, label %56
45: ; preds = %34
%46 = load float, float* %3
%47 = load float, float* %3
%48 = fmul float %46, %47
%49 = load float, float* %3
%50 = load float, float* %3
%51 = fmul float 4.000000e+00, %50
%52 = fneg float %51
%53 = call float @llvm.fmuladd.f32(float %48, float %49, float %52)
%54 = fsub float %53, 9.000000e+00
%55 = fcmp une float %54, 0.000000e+00
br label %56
56: ; preds = %45, %34
%57 = phi i1 [ false, %34 ], [ %55, %45 ]
%58 = zext i1 %57 to i32
%59 = icmp sgt i32 %58, 0
br i1 %59, label %60, label %63
60: ; preds = %56, %23
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.4, i64 0, i64 0))
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %7
63: ; preds = %56
%64 = load float, float* %3
%65 = load float, float* %2
%66 = fadd float %64, %65
%67 = fpext float %66 to double
%68 = fdiv double %67, 2.000000e+00
%69 = fptrunc double %68 to float
store float %69, float* %4
br label %70
70: ; preds = %154, %63
%71 = load float, float* %4
%72 = load float, float* %4
%73 = fmul float %71, %72
%74 = load float, float* %4
%75 = load float, float* %4
%76 = fmul float 4.000000e+00, %75
%77 = fneg float %76
%78 = call float @llvm.fmuladd.f32(float %73, float %74, float %77)
%79 = fsub float %78, 9.000000e+00
%80 = fpext float %79 to double
%81 = fcmp ogt double %80, 1.000000e-05
br i1 %81, label %94, label %82
82: ; preds = %70
%83 = load float, float* %4
%84 = load float, float* %4
%85 = fmul float %83, %84
%86 = load float, float* %4
%87 = load float, float* %4
%88 = fmul float 4.000000e+00, %87
%89 = fneg float %88
%90 = call float @llvm.fmuladd.f32(float %85, float %86, float %89)
%91 = fsub float %90, 9.000000e+00
%92 = fpext float %91 to double
%93 = fcmp olt double %92, -1.000000e-05
br label %94
94: ; preds = %82, %70
%95 = phi i1 [ true, %70 ], [ %93, %82 ]
br i1 %95, label %96, label %173
96: ; preds = %94
%97 = load float, float* %3
%98 = load float, float* %2
%99 = fadd float %97, %98
%100 = fpext float %99 to double
%101 = fdiv double %100, 2.000000e+00
%102 = fptrunc double %101 to float
store float %102, float* %4
%103 = load float, float* %2
%104 = load float, float* %2
%105 = fmul float %103, %104
%106 = load float, float* %2
%107 = load float, float* %2
%108 = fmul float 4.000000e+00, %107
%109 = fneg float %108
%110 = call float @llvm.fmuladd.f32(float %105, float %106, float %109)
%111 = fsub float %110, 9.000000e+00
%112 = fpext float %111 to double
%113 = fcmp olt double %112, 0.000000e+00
br i1 %113, label %114, label %128
114: ; preds = %96
%115 = load float, float* %4
%116 = load float, float* %4
%117 = fmul float %115, %116
%118 = load float, float* %4
%119 = load float, float* %4
%120 = fmul float 4.000000e+00, %119
%121 = fneg float %120
%122 = call float @llvm.fmuladd.f32(float %117, float %118, float %121)
%123 = fsub float %122, 9.000000e+00
%124 = fpext float %123 to double
%125 = fcmp ogt double %124, 0.000000e+00
br i1 %125, label %126, label %128
126: ; preds = %114
%127 = load float, float* %4
store float %127, float* %3
br label %128
128: ; preds = %126, %114, %96
%129 = load float, float* %4
%130 = load float, float* %4
%131 = fmul float %129, %130
%132 = load float, float* %4
%133 = load float, float* %4
%134 = fmul float 4.000000e+00, %133
%135 = fneg float %134
%136 = call float @llvm.fmuladd.f32(float %131, float %132, float %135)
%137 = fsub float %136, 9.000000e+00
%138 = fpext float %137 to double
%139 = fcmp olt double %138, 0.000000e+00
br i1 %139, label %140, label %154
140: ; preds = %128
%141 = load float, float* %3
%142 = load float, float* %3
%143 = fmul float %141, %142
%144 = load float, float* %3
%145 = load float, float* %3
%146 = fmul float 4.000000e+00, %145
%147 = fneg float %146
%148 = call float @llvm.fmuladd.f32(float %143, float %144, float %147)
%149 = fsub float %148, 9.000000e+00
%150 = fpext float %149 to double
%151 = fcmp ogt double %150, 0.000000e+00
br i1 %151, label %152, label %154
152: ; preds = %140
%153 = load float, float* %4
store float %153, float* %2
br label %154
154: ; preds = %152, %140, %128
%155 = load i32, i32* %5
%156 = load float, float* %4
%157 = fpext float %156 to double
%158 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0), i32 %155, double %157)
%159 = load float, float* %4
%160 = load float, float* %4
%161 = fmul float %159, %160
%162 = load float, float* %4
%163 = load float, float* %4
%164 = fmul float 4.000000e+00, %163
%165 = fneg float %164
%166 = call float @llvm.fmuladd.f32(float %161, float %162, float %165)
%167 = fsub float %166, 9.000000e+00
%168 = fpext float %167 to double
%169 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), double %168)
%170 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%171 = load i32, i32* %5
%172 = add nsw i32 %171, 1
store i32 %172, i32* %5
br label %70
173: ; preds = %94
%174 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%175 = load float, float* %4
%176 = fpext float %175 to double
%177 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0), double %176)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"a:\00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [3 x i8] c"b:\00"
@.str.4 = [52 x i8] c"\0Asign of f(x) for points (a,b) is same please retry\00"
@.str.6 = [32 x i8] c"%d approximation of the root:%f\00"
@.str.7 = [9 x i8] c"\09f(x)=%f\00"
@.str.8 = [32 x i8] c"real root of the equation is:%f\00"
@str = [28 x i8] c"enter the interval of root:\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
br label %5
5: ; preds = %33, %0
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %1)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
%11 = load float, float* %1
%12 = fmul float %11, %11
%13 = fmul float %11, -4.000000e+00
%14 = call float @llvm.fmuladd.f32(float %12, float %11, float %13)
%15 = fadd float %14, -9.000000e+00
%16 = fcmp olt float %15, 0.000000e+00
br i1 %16, label %17, label %24
17: ; preds = %5
%18 = load float, float* %2
%19 = fmul float %18, %18
%20 = fmul float %18, -4.000000e+00
%21 = call float @llvm.fmuladd.f32(float %19, float %18, float %20)
%22 = fadd float %21, -9.000000e+00
%23 = fcmp olt float %22, 0.000000e+00
br i1 %23, label %33, label %24
24: ; preds = %17, %5
%25 = fcmp ogt float %15, 0.000000e+00
%26 = load float, float* %2
br i1 %25, label %27, label %36
27: ; preds = %24
%28 = fmul float %26, %26
%29 = fmul float %26, -4.000000e+00
%30 = call float @llvm.fmuladd.f32(float %28, float %26, float %29)
%31 = fadd float %30, -9.000000e+00
%32 = fcmp une float %31, 0.000000e+00
br i1 %32, label %33, label %36
33: ; preds = %27, %17
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.4, i64 0, i64 0))
%35 = call i32 @putchar(i32 10)
br label %5
36: ; preds = %27, %24
%37 = fadd float %11, %26
%38 = fmul float %37, 5.000000e-01
%39 = fmul float %38, %38
%40 = fmul float %38, -4.000000e+00
%41 = call float @llvm.fmuladd.f32(float %39, float %38, float %40)
%42 = fadd float %41, -9.000000e+00
%43 = fpext float %42 to double
%44 = fcmp ogt double %43, 1.000000e-05
%45 = fcmp olt double %43, -1.000000e-05
%46 = or i1 %44, %45
br i1 %46, label %49, label %47
47: ; preds = %36
%48 = fpext float %38 to double
br label %90
49: ; preds = %36, %86
%50 = phi float [ %89, %86 ], [ %11, %36 ]
%51 = phi float [ %88, %86 ], [ %26, %36 ]
%52 = phi i32 [ %87, %86 ], [ 1, %36 ]
%53 = fadd float %51, %50
%54 = fmul float %53, 5.000000e-01
%55 = fmul float %50, %50
%56 = fmul float %50, -4.000000e+00
%57 = call float @llvm.fmuladd.f32(float %55, float %50, float %56)
%58 = fadd float %57, -9.000000e+00
%59 = fcmp olt float %58, 0.000000e+00
%60 = fmul float %54, %54
%61 = fmul float %54, -4.000000e+00
%62 = call float @llvm.fmuladd.f32(float %60, float %54, float %61)
%63 = fadd float %62, -9.000000e+00
%64 = fcmp ogt float %63, 0.000000e+00
%65 = select i1 %59, i1 %64, i1 false
br i1 %65, label %66, label %67
66: ; preds = %49
store float %54, float* %2
br label %67
67: ; preds = %49, %66
%68 = phi float [ %54, %66 ], [ %51, %49 ]
%69 = fpext float %63 to double
%70 = fcmp olt float %63, 0.000000e+00
br i1 %70, label %71, label %78
71: ; preds = %67
%72 = fmul float %68, %68
%73 = fmul float %68, -4.000000e+00
%74 = call float @llvm.fmuladd.f32(float %72, float %68, float %73)
%75 = fadd float %74, -9.000000e+00
%76 = fcmp ogt float %75, 0.000000e+00
br i1 %76, label %77, label %78
77: ; preds = %71
store float %54, float* %1
br label %78
78: ; preds = %77, %71, %67
%79 = fpext float %54 to double
%80 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0), i32 %52, double %79)
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), double %69)
%82 = call i32 @putchar(i32 10)
%83 = fcmp ogt double %69, 1.000000e-05
%84 = fcmp olt double %69, -1.000000e-05
%85 = or i1 %83, %84
br i1 %85, label %86, label %90
86: ; preds = %78
%87 = add nuw nsw i32 %52, 1
%88 = load float, float* %2
%89 = load float, float* %1
br label %49
90: ; preds = %78, %47
%91 = phi double [ %48, %47 ], [ %79, %78 ]
%92 = call i32 @putchar(i32 10)
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0), double %91)
ret i32 0
}