#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*/ clrscr();
double fabs(float);
int /*<<< orphan*/ getch();
int pow(float, int);
int /*<<< orphan*/ printf(char *, float);
main() {
  float x = 100, xx = 0;
  clrscr();
  while (fabs(xx - x) > 0.000001) {
    xx = x;
    x = xx + (3 + xx - 2 * pow(xx, 2)) / (pow(xx, 4) + 2);
  }
  printf("The answer is %f", x);
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xe99(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <clrscr@plt>
movss  -0xc(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
call   1050 <fabs@plt>
movsd  0xe76(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1218 <main+0xc8>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe4c(%rip),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
mov    $0x2,%edi
call   1070 <pow@plt>
movss  -0x18(%rbp),%xmm0
shl    $0x1,%eax
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
mov    $0x4,%edi
call   1070 <pow@plt>
movss  -0x14(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
add    $0x2,%eax
cvtsi2ss %eax,%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    117b <main+0x2b>
movss  -0x8(%rbp),%xmm0
lea    0xdec(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <getch@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <clrscr@plt>
movss  0xea0(%rip),%xmm0
call   1050 <fabs@plt>
ucomisd 0xea3(%rip),%xmm0
jbe    1218 <main+0xc8>
movss  0xe89(%rip),%xmm1
movaps %xmm1,%xmm0
xchg   %ax,%ax
movss  %xmm1,0x4(%rsp)
addss  0xe7a(%rip),%xmm0
movss  %xmm0,(%rsp)
movaps %xmm1,%xmm0
mov    $0x2,%edi
call   1070 <pow@plt>
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  (%rsp),%xmm1
subss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
movss  0x4(%rsp),%xmm0
mov    $0x4,%edi
call   1070 <pow@plt>
add    $0x2,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  (%rsp),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
movss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,(%rsp)
subss  (%rsp),%xmm1
movaps %xmm1,%xmm0
call   1050 <fabs@plt>
ucomisd 0xe08(%rip),%xmm0
movss  (%rsp),%xmm0
movaps %xmm0,%xmm1
ja     1180 <main+0x30>
jmp    1220 <main+0xd0>
movss  0xde4(%rip),%xmm0
lea    0xdf1(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <getch@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"The answer is %f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 1.000000e+02, float* %2
store float 0.000000e+00, float* %3
%4 = call i32 (...) @clrscr()
br label %5
5: ; preds = %11, %0
%6 = load float, float* %3
%7 = load float, float* %2
%8 = fsub float %6, %7
%9 = call double @fabs(float %8)
%10 = fcmp ogt double %9, 0x3EB0C6F7A0B5ED8D
br i1 %10, label %11, label %27
11: ; preds = %5
%12 = load float, float* %2
store float %12, float* %3
%13 = load float, float* %3
%14 = load float, float* %3
%15 = fadd float 3.000000e+00, %14
%16 = load float, float* %3
%17 = call i32 @pow(float %16, i32 2)
%18 = mul nsw i32 2, %17
%19 = sitofp i32 %18 to float
%20 = fsub float %15, %19
%21 = load float, float* %3
%22 = call i32 @pow(float %21, i32 4)
%23 = add nsw i32 %22, 2
%24 = sitofp i32 %23 to float
%25 = fdiv float %20, %24
%26 = fadd float %13, %25
store float %26, float* %2
br label %5
27: ; preds = %5
%28 = load float, float* %2
%29 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), float %28)
%30 = call i32 (...) @getch()
%31 = load i32, i32* %1
ret i32 %31
}

LLVM IR (-O2):
@.str = [17 x i8] c"The answer is %f\00"
define i32 @main() {
%1 = tail call i32 (...) @clrscr()
%2 = tail call double @fabs(float -1.000000e+02)
%3 = fcmp ogt double %2, 0x3EB0C6F7A0B5ED8D
br i1 %3, label %4, label %19
4: ; preds = %0, %4
%5 = phi float [ %15, %4 ], [ 1.000000e+02, %0 ]
%6 = fadd float %5, 3.000000e+00
%7 = tail call i32 @pow(float %5, i32 2)
%8 = shl nsw i32 %7, 1
%9 = sitofp i32 %8 to float
%10 = fsub float %6, %9
%11 = tail call i32 @pow(float %5, i32 4)
%12 = add nsw i32 %11, 2
%13 = sitofp i32 %12 to float
%14 = fdiv float %10, %13
%15 = fadd float %5, %14
%16 = fsub float %5, %15
%17 = tail call double @fabs(float %16)
%18 = fcmp ogt double %17, 0x3EB0C6F7A0B5ED8D
br i1 %18, label %4, label %19
19: ; preds = %4, %0
%20 = phi float [ 1.000000e+02, %0 ], [ %15, %4 ]
%21 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), float %20)
%22 = tail call i32 (...) @getch()
ret i32 0
}