#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 convert(int);
int log(double);
double flott_get_t_information(double t_complexity) {
  double lb, ub, tmp1, tmp2, g1;
  lb = 1.0 + 5.0e-16;
  if (t_complexity < convert(log(lb))) {
    return 0;
  }
  ub = 2.0;
  while (convert(log(ub)) < t_complexity) {
    lb = ub;
    ub *= 2;
  }
  tmp1 = convert(log(lb));
  tmp2 = convert(log(ub));
  g1 = 1 / log(lb);
  while (tmp2 - tmp1 > 5.0e-16) {
    ub = (t_complexity - tmp1) * (ub - lb) / (tmp2 - tmp1) + lb;
    tmp2 = convert(log(ub));
    lb += (t_complexity - tmp1) / g1;
    tmp1 = convert(log(lb));
    g1 = 1 / log(lb);
  }
  return (ub);
}


x86 assembly (clang, -O0):
<flott_get_t_information>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xecb(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <log@plt>
mov    %eax,%edi
call   1030 <convert@plt>
movsd  -0x40(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jbe    1171 <flott_get_t_information+0x51>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    12c8 <flott_get_t_information+0x1a8>
movsd  0xe8f(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1040 <log@plt>
mov    %eax,%edi
call   1030 <convert@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    11c2 <flott_get_t_information+0xa2>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe55(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    117e <flott_get_t_information+0x5e>
movsd  -0x18(%rbp),%xmm0
call   1040 <log@plt>
mov    %eax,%edi
call   1030 <convert@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1040 <log@plt>
mov    %eax,%edi
call   1030 <convert@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <log@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  0xdf3(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12be <flott_get_t_information+0x19e>
movsd  -0x10(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm1
subsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1040 <log@plt>
mov    %eax,%edi
call   1030 <convert@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <log@plt>
mov    %eax,%edi
call   1030 <convert@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <log@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    120b <flott_get_t_information+0xeb>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flott_get_t_information>:
push   %rbx
sub    $0x40,%rsp
movsd  %xmm0,0x10(%rsp)
movsd  0xecd(%rip),%xmm0
call   1040 <log@plt>
mov    %eax,%edi
call   1030 <convert@plt>
xorps  %xmm1,%xmm1
ucomisd 0x10(%rsp),%xmm0
ja     1301 <flott_get_t_information+0x1e1>
movsd  0xeb2(%rip),%xmm0
call   1040 <log@plt>
mov    %eax,%edi
call   1030 <convert@plt>
movsd  0x10(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jbe    11b9 <flott_get_t_information+0x99>
movsd  0xe92(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
movapd %xmm0,0x20(%rsp)
addsd  %xmm0,%xmm0
movapd %xmm0,(%rsp)
movapd (%rsp),%xmm0
call   1040 <log@plt>
mov    %eax,%edi
call   1030 <convert@plt>
movsd  0x10(%rsp),%xmm1
ucomisd %xmm0,%xmm1
movapd (%rsp),%xmm0
ja     1180 <flott_get_t_information+0x60>
unpcklpd 0x20(%rsp),%xmm0
jmp    11c1 <flott_get_t_information+0xa1>
movapd 0xe5f(%rip),%xmm0
movapd %xmm0,(%rsp)
unpckhpd %xmm0,%xmm0
movapd %xmm0,0x30(%rsp)
call   1040 <log@plt>
mov    %eax,%edi
call   1030 <convert@plt>
movsd  %xmm0,0x18(%rsp)
movaps (%rsp),%xmm0
call   1040 <log@plt>
mov    %eax,%edi
call   1030 <convert@plt>
movaps %xmm0,0x20(%rsp)
movapd 0x30(%rsp),%xmm0
call   1040 <log@plt>
movsd  0x18(%rsp),%xmm2
movapd 0x20(%rsp),%xmm3
movaps (%rsp),%xmm1
subsd  %xmm2,%xmm3
ucomisd 0xdf2(%rip),%xmm3
jbe    1301 <flott_get_t_information+0x1e1>
lea    0x1(%rax),%ecx
xor    %ebx,%ebx
cmp    $0x3,%ecx
cmovae %ebx,%eax
nop
movaps %xmm1,(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
unpcklpd %xmm0,%xmm3
movsd  0x10(%rsp),%xmm0
subsd  %xmm2,%xmm0
movapd (%rsp),%xmm1
unpckhpd %xmm1,%xmm1
movapd (%rsp),%xmm2
subsd  %xmm1,%xmm2
movapd %xmm2,(%rsp)
movapd (%rsp),%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm2,(%rsp)
movapd (%rsp),%xmm2
unpcklpd %xmm0,%xmm2
movapd %xmm2,(%rsp)
movapd (%rsp),%xmm0
divpd  %xmm3,%xmm0
movapd %xmm0,(%rsp)
movapd (%rsp),%xmm0
addpd  %xmm1,%xmm0
movapd %xmm0,(%rsp)
movaps (%rsp),%xmm0
call   1040 <log@plt>
mov    %eax,%edi
call   1030 <convert@plt>
movaps %xmm0,0x20(%rsp)
movaps (%rsp),%xmm0
movhlps %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
call   1040 <log@plt>
mov    %eax,%edi
call   1030 <convert@plt>
movsd  %xmm0,0x18(%rsp)
movapd 0x30(%rsp),%xmm0
call   1040 <log@plt>
movsd  0x18(%rsp),%xmm2
movapd 0x20(%rsp),%xmm3
movaps (%rsp),%xmm1
lea    0x1(%rax),%ecx
cmp    $0x3,%ecx
cmovae %ebx,%eax
subsd  %xmm2,%xmm3
ucomisd 0xd15(%rip),%xmm3
ja     1230 <flott_get_t_information+0x110>
movaps %xmm1,%xmm0
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @flott_get_t_information(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %3
store double 0x3FF0000000000002, double* %4
%9 = load double, double* %3
%10 = load double, double* %4
%11 = call i32 @log(double %10)
%12 = call double @convert(i32 %11)
%13 = fcmp olt double %9, %12
br i1 %13, label %14, label %15
14: ; preds = %1
store double 0.000000e+00, double* %2
br label %75
15: ; preds = %1
store double 2.000000e+00, double* %5
br label %16
16: ; preds = %22, %15
%17 = load double, double* %5
%18 = call i32 @log(double %17)
%19 = call double @convert(i32 %18)
%20 = load double, double* %3
%21 = fcmp olt double %19, %20
br i1 %21, label %22, label %26
22: ; preds = %16
%23 = load double, double* %5
store double %23, double* %4
%24 = load double, double* %5
%25 = fmul double %24, 2.000000e+00
store double %25, double* %5
br label %16
26: ; preds = %16
%27 = load double, double* %4
%28 = call i32 @log(double %27)
%29 = call double @convert(i32 %28)
store double %29, double* %6
%30 = load double, double* %5
%31 = call i32 @log(double %30)
%32 = call double @convert(i32 %31)
store double %32, double* %7
%33 = load double, double* %4
%34 = call i32 @log(double %33)
%35 = sdiv i32 1, %34
%36 = sitofp i32 %35 to double
store double %36, double* %8
br label %37
37: ; preds = %42, %26
%38 = load double, double* %7
%39 = load double, double* %6
%40 = fsub double %38, %39
%41 = fcmp ogt double %40, 5.000000e-16
br i1 %41, label %42, label %73
42: ; preds = %37
%43 = load double, double* %3
%44 = load double, double* %6
%45 = fsub double %43, %44
%46 = load double, double* %5
%47 = load double, double* %4
%48 = fsub double %46, %47
%49 = fmul double %45, %48
%50 = load double, double* %7
%51 = load double, double* %6
%52 = fsub double %50, %51
%53 = fdiv double %49, %52
%54 = load double, double* %4
%55 = fadd double %53, %54
store double %55, double* %5
%56 = load double, double* %5
%57 = call i32 @log(double %56)
%58 = call double @convert(i32 %57)
store double %58, double* %7
%59 = load double, double* %3
%60 = load double, double* %6
%61 = fsub double %59, %60
%62 = load double, double* %8
%63 = fdiv double %61, %62
%64 = load double, double* %4
%65 = fadd double %64, %63
store double %65, double* %4
%66 = load double, double* %4
%67 = call i32 @log(double %66)
%68 = call double @convert(i32 %67)
store double %68, double* %6
%69 = load double, double* %4
%70 = call i32 @log(double %69)
%71 = sdiv i32 1, %70
%72 = sitofp i32 %71 to double
store double %72, double* %8
br label %37
73: ; preds = %37
%74 = load double, double* %5
store double %74, double* %2
br label %75
75: ; preds = %73, %14
%76 = load double, double* %2
ret double %76
}

LLVM IR (-O2):
define double @flott_get_t_information(double %0) {
%2 = tail call i32 @log(double 0x3FF0000000000002)
%3 = tail call double @convert(i32 %2)
%4 = fcmp ogt double %3, %0
br i1 %4, label %65, label %5
5: ; preds = %1
%6 = tail call i32 @log(double 2.000000e+00)
%7 = tail call double @convert(i32 %6)
%8 = fcmp olt double %7, %0
br i1 %8, label %9, label %18
9: ; preds = %5, %9
%10 = phi double [ %11, %9 ], [ 2.000000e+00, %5 ]
%11 = fmul double %10, 2.000000e+00
%12 = tail call i32 @log(double %11)
%13 = tail call double @convert(i32 %12)
%14 = fcmp olt double %13, %0
br i1 %14, label %9, label %15
15: ; preds = %9
%16 = insertelement <2 x double> poison, double %11, i64 0
%17 = insertelement <2 x double> %16, double %10, i64 1
br label %18
18: ; preds = %15, %5
%19 = phi <2 x double> [ <double 2.000000e+00, double 0x3FF0000000000002>, %5 ], [ %17, %15 ]
%20 = extractelement <2 x double> %19, i64 1
%21 = tail call i32 @log(double %20)
%22 = tail call double @convert(i32 %21)
%23 = extractelement <2 x double> %19, i64 0
%24 = tail call i32 @log(double %23)
%25 = tail call double @convert(i32 %24)
%26 = tail call i32 @log(double %20)
%27 = fsub double %25, %22
%28 = fcmp ogt double %27, 5.000000e-16
br i1 %28, label %29, label %65
29: ; preds = %18
%30 = add i32 %26, 1
%31 = icmp ult i32 %30, 3
%32 = select i1 %31, i32 %26, i32 0
br label %33
33: ; preds = %29, %33
%34 = phi double [ %61, %33 ], [ %27, %29 ]
%35 = phi i32 [ %60, %33 ], [ %32, %29 ]
%36 = phi double [ %56, %33 ], [ %22, %29 ]
%37 = phi <2 x double> [ %50, %33 ], [ %19, %29 ]
%38 = sitofp i32 %35 to double
%39 = fsub double %0, %36
%40 = extractelement <2 x double> %37, i64 0
%41 = extractelement <2 x double> %37, i64 1
%42 = fsub double %40, %41
%43 = fmul double %42, %39
%44 = insertelement <2 x double> poison, double %43, i64 0
%45 = insertelement <2 x double> %44, double %39, i64 1
%46 = insertelement <2 x double> poison, double %34, i64 0
%47 = insertelement <2 x double> %46, double %38, i64 1
%48 = fdiv <2 x double> %45, %47
%49 = shufflevector <2 x double> %37, <2 x double> undef, <2 x i32> <i32 1, i32 1>
%50 = fadd <2 x double> %49, %48
%51 = extractelement <2 x double> %50, i64 0
%52 = tail call i32 @log(double %51)
%53 = tail call double @convert(i32 %52)
%54 = extractelement <2 x double> %50, i64 1
%55 = tail call i32 @log(double %54)
%56 = tail call double @convert(i32 %55)
%57 = tail call i32 @log(double %54)
%58 = add i32 %57, 1
%59 = icmp ult i32 %58, 3
%60 = select i1 %59, i32 %57, i32 0
%61 = fsub double %53, %56
%62 = fcmp ogt double %61, 5.000000e-16
br i1 %62, label %33, label %63
63: ; preds = %33
%64 = extractelement <2 x double> %50, i64 0
br label %65
65: ; preds = %63, %18, %1
%66 = phi double [ 0.000000e+00, %1 ], [ %23, %18 ], [ %64, %63 ]
ret double %66
}