#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 */
scalar_t__ f(double);
double fabs(scalar_t__);
scalar_t__ pol_taylor(double);
double intervalo_inferior() {
  double x_i;
  for (x_i = 1; fabs(f(x_i) - pol_taylor(x_i)) <= 0.00001;
       x_i -= (0.00001 / 10)) {
  }
  return x_i;
}


x86 assembly (clang, -O0):
<intervalo_inferior>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xec0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <f@plt>
mov    %rax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <pol_taylor@plt>
mov    -0x10(%rbp),%rdi
sub    %rax,%rdi
call   1050 <fabs@plt>
movaps %xmm0,%xmm1
movsd  0xe94(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     119e <intervalo_inferior+0x6e>
jmp    1183 <intervalo_inferior+0x53>
movsd  -0x8(%rbp),%xmm0
movsd  0xe80(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1145 <intervalo_inferior+0x15>
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intervalo_inferior>:
push   %rbx
sub    $0x10,%rsp
movsd  0xec3(%rip),%xmm0
call   1030 <f@plt>
mov    %rax,%rbx
movsd  0xeb3(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xea5(%rip),%xmm0
call   1040 <pol_taylor@plt>
sub    %rax,%rbx
mov    %rbx,%rdi
call   1050 <fabs@plt>
movsd  0xe95(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     11d0 <intervalo_inferior+0xa0>
movsd  0xe7f(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
nopw   0x0(%rax,%rax,1)
movsd  0x8(%rsp),%xmm0
addsd  0xe72(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
call   1030 <f@plt>
mov    %rax,%rbx
movsd  0x8(%rsp),%xmm0
call   1040 <pol_taylor@plt>
sub    %rax,%rbx
mov    %rbx,%rdi
call   1050 <fabs@plt>
movsd  0xe3e(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1190 <intervalo_inferior+0x60>
movsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @intervalo_inferior() {
%1 = alloca double
store double 1.000000e+00, double* %1
br label %2
2: ; preds = %11, %0
%3 = load double, double* %1
%4 = call i64 @f(double %3)
%5 = load double, double* %1
%6 = call i64 @pol_taylor(double %5)
%7 = sub nsw i64 %4, %6
%8 = call double @fabs(i64 %7)
%9 = fcmp ole double %8, 1.000000e-05
br i1 %9, label %10, label %14
10: ; preds = %2
br label %11
11: ; preds = %10
%12 = load double, double* %1
%13 = fsub double %12, 0x3EB0C6F7A0B5ED8E
store double %13, double* %1
br label %2
14: ; preds = %2
%15 = load double, double* %1
ret double %15
}

LLVM IR (-O2):
define double @intervalo_inferior() {
%1 = tail call i64 @f(double 1.000000e+00)
%2 = tail call i64 @pol_taylor(double 1.000000e+00)
%3 = sub nsw i64 %1, %2
%4 = tail call double @fabs(i64 %3)
%5 = fcmp ugt double %4, 1.000000e-05
br i1 %5, label %14, label %6
6: ; preds = %0, %6
%7 = phi double [ %8, %6 ], [ 1.000000e+00, %0 ]
%8 = fadd double %7, 0xBEB0C6F7A0B5ED8E
%9 = tail call i64 @f(double %8)
%10 = tail call i64 @pol_taylor(double %8)
%11 = sub nsw i64 %9, %10
%12 = tail call double @fabs(i64 %11)
%13 = fcmp ugt double %12, 1.000000e-05
br i1 %13, label %14, label %6
14: ; preds = %6, %0
%15 = phi double [ 1.000000e+00, %0 ], [ %8, %6 ]
ret double %15
}