#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 /*<<< orphan*/ isdigit(char);
int strlen(char *);
char isNumero(char *numero) {
  register char i;
  for (i = 0; i <= strlen(numero) - 1; i++)
    if (!isdigit(*(numero + i)))
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isNumero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movb   $0x0,-0x11(%rbp)
movsbl -0x11(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1188 <isNumero+0x68>
mov    -0x10(%rbp),%rax
movsbl -0x11(%rbp),%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    1176 <isNumero+0x56>
movb   $0x0,-0x1(%rbp)
jmp    118c <isNumero+0x6c>
jmp    117b <isNumero+0x5b>
mov    -0x11(%rbp),%al
add    $0x1,%al
mov    %al,-0x11(%rbp)
jmp    1130 <isNumero+0x10>
movb   $0x1,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNumero>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1040 <strlen@plt>
test   %eax,%eax
jle    1167 <isNumero+0x47>
mov    $0x1,%bl
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x1(%rbx),%eax
movsbq %al,%rax
movsbl (%r14,%rax,1),%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     116b <isNumero+0x4b>
movsbl %bl,%ebp
mov    %r14,%rdi
call   1040 <strlen@plt>
add    $0x1,%bl
cmp    %ebp,%eax
jg     1140 <isNumero+0x20>
mov    $0x1,%al
jmp    116d <isNumero+0x4d>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define signext i8 @isNumero(i8* %0) {
%2 = alloca i8
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 0, i8* %4
br label %5
5: ; preds = %23, %1
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = load i8*, i8** %3
%9 = call i32 @strlen(i8* %8)
%10 = sub nsw i32 %9, 1
%11 = icmp sle i32 %7, %10
br i1 %11, label %12, label %26
12: ; preds = %5
%13 = load i8*, i8** %3
%14 = load i8, i8* %4
%15 = sext i8 %14 to i32
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %13, i64 %16
%18 = load i8, i8* %17
%19 = call i32 @isdigit(i8 signext %18)
%20 = icmp ne i32 %19, 0
br i1 %20, label %22, label %21
21: ; preds = %12
store i8 0, i8* %2
br label %27
22: ; preds = %12
br label %23
23: ; preds = %22
%24 = load i8, i8* %4
%25 = add i8 %24, 1
store i8 %25, i8* %4
br label %5
26: ; preds = %5
store i8 1, i8* %2
br label %27
27: ; preds = %26, %21
%28 = load i8, i8* %2
ret i8 %28
}

LLVM IR (-O2):
define signext i8 @isNumero(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %8, label %16
4: ; preds = %8
%5 = sext i8 %15 to i32
%6 = tail call i32 @strlen(i8* %0)
%7 = icmp sgt i32 %6, %5
br i1 %7, label %8, label %16
8: ; preds = %1, %4
%9 = phi i8 [ %15, %4 ], [ 0, %1 ]
%10 = sext i8 %9 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = tail call i32 @isdigit(i8 signext %12)
%14 = icmp eq i32 %13, 0
%15 = add i8 %9, 1
br i1 %14, label %16, label %4
16: ; preds = %8, %4, %1
%17 = phi i8 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i8 %17
}