#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 __BUILTIN_DAED_DBETWEEN(double, double);
void main() {
  double xi, xsi, A, temp;
  signed int *PtrA, *Ptrxi;
  int cond, exp, i;
  A = __BUILTIN_DAED_DBETWEEN(20.0, 30.0);
  PtrA = (signed int *)(&A);
  Ptrxi = (signed int *)(&xi);
  exp = (signed int)((PtrA[0] & 0x7FF00000) >> 20) - 1023;
  xi = 1;
  Ptrxi[0] = ((1023 - exp) << 20);
  cond = 1;
  i = 0;
  while (cond) {
    xsi = 2 * xi - A * xi * xi;
    temp = xsi - xi;
    cond = ((temp > 0.0000000001) || (temp < -0.0000000001));
    xi = xsi;
    i++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  0xee8(%rip),%xmm0
movsd  0xee8(%rip),%xmm1
call   1030 <__BUILTIN_DAED_DBETWEEN@plt>
movsd  %xmm0,-0x18(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
and    $0x7ff00000,%eax
sar    $0x14,%eax
sub    $0x3ff,%eax
mov    %eax,-0x38(%rbp)
movsd  0xea0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x3ff,%ecx
sub    -0x38(%rbp),%ecx
shl    $0x14,%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x34(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x0,-0x34(%rbp)
je     1227 <main+0x117>
movsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    $0x1,%al
movsd  0xe34(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x3d(%rbp)
ja     1204 <main+0xf4>
movsd  0xe27(%rip),%xmm0
ucomisd -0x20(%rbp),%xmm0
seta   %al
mov    %al,-0x3d(%rbp)
mov    -0x3d(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x34(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1184 <main+0x74>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movsd  0xee8(%rip),%xmm0
movsd  0xee8(%rip),%xmm1
jmp    1030 <__BUILTIN_DAED_DBETWEEN@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = call double @__BUILTIN_DAED_DBETWEEN(double 2.000000e+01, double 3.000000e+01)
store double %10, double* %3
%11 = bitcast double* %3 to i32*
store i32* %11, i32** %5
%12 = bitcast double* %1 to i32*
store i32* %12, i32** %6
%13 = load i32*, i32** %5
%14 = getelementptr inbounds i32, i32* %13, i64 0
%15 = load i32, i32* %14
%16 = and i32 %15, 2146435072
%17 = ashr i32 %16, 20
%18 = sub nsw i32 %17, 1023
store i32 %18, i32* %8
store double 1.000000e+00, double* %1
%19 = load i32, i32* %8
%20 = sub nsw i32 1023, %19
%21 = shl i32 %20, 20
%22 = load i32*, i32** %6
%23 = getelementptr inbounds i32, i32* %22, i64 0
store i32 %21, i32* %23
store i32 1, i32* %7
store i32 0, i32* %9
br label %24
24: ; preds = %44, %0
%25 = load i32, i32* %7
%26 = icmp ne i32 %25, 0
br i1 %26, label %27, label %50
27: ; preds = %24
%28 = load double, double* %1
%29 = load double, double* %3
%30 = load double, double* %1
%31 = fmul double %29, %30
%32 = load double, double* %1
%33 = fmul double %31, %32
%34 = fneg double %33
%35 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %28, double %34)
store double %35, double* %2
%36 = load double, double* %2
%37 = load double, double* %1
%38 = fsub double %36, %37
store double %38, double* %4
%39 = load double, double* %4
%40 = fcmp ogt double %39, 1.000000e-10
br i1 %40, label %44, label %41
41: ; preds = %27
%42 = load double, double* %4
%43 = fcmp olt double %42, -1.000000e-10
br label %44
44: ; preds = %41, %27
%45 = phi i1 [ true, %27 ], [ %43, %41 ]
%46 = zext i1 %45 to i32
store i32 %46, i32* %7
%47 = load double, double* %2
store double %47, double* %1
%48 = load i32, i32* %9
%49 = add nsw i32 %48, 1
store i32 %49, i32* %9
br label %24
50: ; preds = %24
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call double @__BUILTIN_DAED_DBETWEEN(double 2.000000e+01, double 3.000000e+01)
ret void
}