#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*/ my_putstr2(char *);
int error_only_number(char **av) {
  int d;
  int v;
  int i;
  d = 1;
  v = 0;
  while (av[d] != 0) {
    while (av[d][v] != 0) {
      i = av[d][v] - 48;
      if (i < 0 || i > 9) {
        my_putstr2("\nError : Your argument contains alphabetic ");
        my_putstr2("caracter\nThe only available caracter ");
        my_putstr2("are number\n\n");
        return (-1);
      }
      v++;
    }
    v = 0;
    d++;
  }
  return (1);
}


x86 assembly (clang, -O0):
<error_only_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     11e0 <error_only_number+0xd0>
jmp    1142 <error_only_number+0x32>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     11cb <error_only_number+0xbb>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
sub    $0x30,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jl     118d <error_only_number+0x7d>
cmpl   $0x9,-0x1c(%rbp)
jle    11bd <error_only_number+0xad>
lea    0xe6c(%rip),%rdi
call   1030 <my_putstr2@plt>
lea    0xe8c(%rip),%rdi
call   1030 <my_putstr2@plt>
lea    0xea6(%rip),%rdi
call   1030 <my_putstr2@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11e7 <error_only_number+0xd7>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1142 <error_only_number+0x32>
movl   $0x0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112a <error_only_number+0x1a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error_only_number>:
push   %rax
mov    0x8(%rdi),%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     118e <error_only_number+0x7e>
mov    $0x1,%esi
jmp    113e <error_only_number+0x2e>
cs nopw 0x0(%rax,%rax,1)
mov    0x8(%rdi,%rsi,8),%rcx
add    $0x1,%rsi
test   %rcx,%rcx
je     118e <error_only_number+0x7e>
mov    (%rcx),%dl
test   %dl,%dl
je     1130 <error_only_number+0x20>
add    $0x1,%rcx
nopl   0x0(%rax,%rax,1)
add    $0xc6,%dl
cmp    $0xf5,%dl
jbe    1165 <error_only_number+0x55>
movzbl (%rcx),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1150 <error_only_number+0x40>
jmp    1130 <error_only_number+0x20>
lea    0xe94(%rip),%rdi
call   1030 <my_putstr2@plt>
lea    0xeb4(%rip),%rdi
call   1030 <my_putstr2@plt>
lea    0xece(%rip),%rdi
call   1030 <my_putstr2@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [44 x i8] c"\0AError : Your argument contains alphabetic \00"
@.str.1 = [38 x i8] c"caracter\0AThe only available caracter \00"
@.str.2 = [13 x i8] c"are number\0A\0A\00"
define i32 @error_only_number(i8** %0) {
%2 = alloca i32
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8** %0, i8*** %3
store i32 1, i32* %4
store i32 0, i32* %5
br label %7
7: ; preds = %51, %1
%8 = load i8**, i8*** %3
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8*, i8** %8, i64 %10
%12 = load i8*, i8** %11
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %54
14: ; preds = %7
br label %15
15: ; preds = %48, %14
%16 = load i8**, i8*** %3
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8*, i8** %16, i64 %18
%20 = load i8*, i8** %19
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp ne i32 %25, 0
br i1 %26, label %27, label %51
27: ; preds = %15
%28 = load i8**, i8*** %3
%29 = load i32, i32* %4
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8*, i8** %28, i64 %30
%32 = load i8*, i8** %31
%33 = load i32, i32* %5
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8, i8* %32, i64 %34
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = sub nsw i32 %37, 48
store i32 %38, i32* %6
%39 = load i32, i32* %6
%40 = icmp slt i32 %39, 0
br i1 %40, label %44, label %41
41: ; preds = %27
%42 = load i32, i32* %6
%43 = icmp sgt i32 %42, 9
br i1 %43, label %44, label %48
44: ; preds = %41, %27
%45 = call i32 @my_putstr2(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%46 = call i32 @my_putstr2(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%47 = call i32 @my_putstr2(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %2
br label %55
48: ; preds = %41
%49 = load i32, i32* %5
%50 = add nsw i32 %49, 1
store i32 %50, i32* %5
br label %15
51: ; preds = %15
store i32 0, i32* %5
%52 = load i32, i32* %4
%53 = add nsw i32 %52, 1
store i32 %53, i32* %4
br label %7
54: ; preds = %7
store i32 1, i32* %2
br label %55
55: ; preds = %54, %44
%56 = load i32, i32* %2
ret i32 %56
}

LLVM IR (-O2):
@.str = [44 x i8] c"\0AError : Your argument contains alphabetic \00"
@.str.1 = [38 x i8] c"caracter\0AThe only available caracter \00"
@.str.2 = [13 x i8] c"are number\0A\0A\00"
define i32 @error_only_number(i8** nocapture %0) {
%2 = getelementptr inbounds i8*, i8** %0, i64 1
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %29, label %5
5: ; preds = %1, %24
%6 = phi i64 [ %25, %24 ], [ 1, %1 ]
%7 = phi i8* [ %27, %24 ], [ %3, %1 ]
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %24, label %14
10: ; preds = %14
%11 = getelementptr inbounds i8, i8* %7, i64 %19
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %24, label %14
14: ; preds = %5, %10
%15 = phi i64 [ %19, %10 ], [ 0, %5 ]
%16 = phi i8 [ %12, %10 ], [ %8, %5 ]
%17 = add i8 %16, -58
%18 = icmp ult i8 %17, -10
%19 = add nuw i64 %15, 1
br i1 %18, label %20, label %10
20: ; preds = %14
%21 = tail call i32 @my_putstr2(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%22 = tail call i32 @my_putstr2(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%23 = tail call i32 @my_putstr2(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
br label %29
24: ; preds = %10, %5
%25 = add nuw i64 %6, 1
%26 = getelementptr inbounds i8*, i8** %0, i64 %25
%27 = load i8*, i8** %26
%28 = icmp eq i8* %27, null
br i1 %28, label %29, label %5
29: ; preds = %24, %1, %20
%30 = phi i32 [ -1, %20 ], [ 1, %1 ], [ 1, %24 ]
ret i32 %30
}