#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 strlen(char const *);
int Lexeme_estNum(char const *t) {
  int taille = strlen(t);
  for (int i = 0; i < taille; i++)
    if (!('0' <= t[i] && t[i] <= '9') && t[i] != '.')
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<Lexeme_estNum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    119d <Lexeme_estNum+0x8d>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x30,%eax
cmp    %ecx,%eax
jg     1169 <Lexeme_estNum+0x59>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x39,%eax
jle    118a <Lexeme_estNum+0x7a>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2e,%eax
je     118a <Lexeme_estNum+0x7a>
movl   $0x0,-0x4(%rbp)
jmp    11a4 <Lexeme_estNum+0x94>
jmp    118f <Lexeme_estNum+0x7f>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112f <Lexeme_estNum+0x1f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lexeme_estNum>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
test   %eax,%eax
jle    1168 <Lexeme_estNum+0x58>
mov    (%r14),%dl
cmp    $0x2e,%dl
je     1132 <Lexeme_estNum+0x22>
add    $0xd0,%dl
xor    %ecx,%ecx
cmp    $0x9,%dl
ja     116d <Lexeme_estNum+0x5d>
mov    %eax,%eax
mov    $0x1,%ecx
nopl   0x0(%rax)
mov    %rcx,%rdx
cmp    %rcx,%rax
je     115e <Lexeme_estNum+0x4e>
movzbl (%r14,%rdx,1),%ebx
lea    0x1(%rdx),%rcx
cmp    $0x2e,%bl
je     1140 <Lexeme_estNum+0x30>
add    $0xd0,%bl
cmp    $0xa,%bl
jb     1140 <Lexeme_estNum+0x30>
xor    %ecx,%ecx
cmp    %rax,%rdx
setae  %cl
jmp    116d <Lexeme_estNum+0x5d>
mov    $0x1,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @Lexeme_estNum(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %4
store i32 0, i32* %5
br label %8
8: ; preds = %38, %1
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %41
12: ; preds = %8
%13 = load i8*, i8** %3
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp sle i32 48, %18
br i1 %19, label %20, label %28
20: ; preds = %12
%21 = load i8*, i8** %3
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp sle i32 %26, 57
br i1 %27, label %37, label %28
28: ; preds = %20, %12
%29 = load i8*, i8** %3
%30 = load i32, i32* %5
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %29, i64 %31
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = icmp ne i32 %34, 46
br i1 %35, label %36, label %37
36: ; preds = %28
store i32 0, i32* %2
br label %42
37: ; preds = %28, %20
br label %38
38: ; preds = %37
%39 = load i32, i32* %5
%40 = add nsw i32 %39, 1
store i32 %40, i32* %5
br label %8
41: ; preds = %8
store i32 1, i32* %2
br label %42
42: ; preds = %41, %36
%43 = load i32, i32* %2
ret i32 %43
}

LLVM IR (-O2):
define i32 @Lexeme_estNum(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %26
4: ; preds = %1
%5 = zext i32 %2 to i64
%6 = zext i32 %2 to i64
%7 = load i8, i8* %0
%8 = add i8 %7, -48
%9 = icmp ult i8 %8, 10
%10 = icmp eq i8 %7, 46
%11 = or i1 %10, %9
br i1 %11, label %12, label %26
12: ; preds = %4, %15
%13 = phi i64 [ %22, %15 ], [ 1, %4 ]
%14 = icmp eq i64 %13, %6
br i1 %14, label %23, label %15
15: ; preds = %12
%16 = getelementptr inbounds i8, i8* %0, i64 %13
%17 = load i8, i8* %16
%18 = add i8 %17, -48
%19 = icmp ult i8 %18, 10
%20 = icmp eq i8 %17, 46
%21 = or i1 %20, %19
%22 = add nuw nsw i64 %13, 1
br i1 %21, label %12, label %23
23: ; preds = %12, %15
%24 = icmp uge i64 %13, %5
%25 = zext i1 %24 to i32
br label %26
26: ; preds = %23, %4, %1
%27 = phi i32 [ 1, %1 ], [ 0, %4 ], [ %25, %23 ]
ret i32 %27
}