#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 FLT_MAX;
scalar_t__ isDoubleCL(char *, int);
double strtod(char *, char **);
int isFloatCL(char *input, int isVerbose) {
  if (isDoubleCL(input, isVerbose)) {
    char *end;
    double number = strtod(input, &end);
    return -FLT_MAX <= number && number <= FLT_MAX;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<isFloatCL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <isDoubleCL@plt>
cmp    $0x0,%rax
je     11b7 <isFloatCL+0x97>
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <strtod@plt>
movsd  %xmm0,-0x28(%rbp)
mov    0x2e8a(%rip),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
ucomisd %xmm1,%xmm0
mov    %al,-0x29(%rbp)
jb     11a7 <isFloatCL+0x87>
movsd  -0x28(%rbp),%xmm1
mov    0x2e4f(%rip),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    11be <isFloatCL+0x9e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isFloatCL>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1040 <isDoubleCL@plt>
test   %rax,%rax
je     116b <isFloatCL+0x4b>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <strtod@plt>
mov    0x2ea2(%rip),%rax
movsd  (%rax),%xmm1
movapd 0xeae(%rip),%xmm2
xorpd  %xmm1,%xmm2
ucomisd %xmm2,%xmm0
setae  %al
ucomisd %xmm0,%xmm1
setae  %cl
and    %al,%cl
movzbl %cl,%eax
jmp    116d <isFloatCL+0x4d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@FLT_MAX = global double 0.000000e+00
define i32 @isFloatCL(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca double
store i8* %0, i8** %4
store i32 %1, i32* %5
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = call i64 @isDoubleCL(i8* %8, i32 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %26
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = call double @strtod(i8* %13, i8** %6)
store double %14, double* %7
%15 = load double, double* @FLT_MAX
%16 = fneg double %15
%17 = load double, double* %7
%18 = fcmp ole double %16, %17
br i1 %18, label %19, label %23
19: ; preds = %12
%20 = load double, double* %7
%21 = load double, double* @FLT_MAX
%22 = fcmp ole double %20, %21
br label %23
23: ; preds = %19, %12
%24 = phi i1 [ false, %12 ], [ %22, %19 ]
%25 = zext i1 %24 to i32
store i32 %25, i32* %3
br label %27
26: ; preds = %2
store i32 0, i32* %3
br label %27
27: ; preds = %26, %23
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
@FLT_MAX = global double 0.000000e+00
define i32 @isFloatCL(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = tail call i64 @isDoubleCL(i8* %0, i32 %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %2
%7 = bitcast i8** %3 to i8*
%8 = call double @strtod(i8* %0, i8** %3)
%9 = load double, double* @FLT_MAX
%10 = fneg double %9
%11 = fcmp oge double %8, %10
%12 = fcmp ole double %8, %9
%13 = and i1 %11, %12
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %2, %6
%16 = phi i32 [ %14, %6 ], [ 0, %2 ]
ret i32 %16
}