int serie_Ok(Serie)
char *Serie;
{
  char *p;
  int ret;
  tirabr(Serie);
  ret = strlen(Serie);
  if (ret != (6)) {
    printf("\07");
    printf("Seis digitos?");
    ret = 0;
  } else {
    p = Serie;
    while (isdigit(*p))
      ++p;
    if (*p) {
      printf("\07");
      printf("Somente digitos ... ");
      ret = 0;
    } else
      ret = 1;
  }
  return ret;
}


x86 assembly (clang, -O0):
<serie_Ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1060 <tirabr@plt>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x6,-0x14(%rbp)
je     1195 <serie_Ok+0x55>
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x14(%rbp)
jmp    1204 <serie_Ok+0xc4>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
je     11c3 <serie_Ok+0x83>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    119d <serie_Ok+0x5d>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     11f8 <serie_Ok+0xb8>
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe2b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x14(%rbp)
jmp    11ff <serie_Ok+0xbf>
movl   $0x1,-0x14(%rbp)
jmp    1204 <serie_Ok+0xc4>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serie_Ok>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %ebp,%ebp
xor    %eax,%eax
call   1060 <tirabr@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0x6,%eax
jne    117c <serie_Ok+0x3c>
nopl   0x0(%rax)
movsbl (%rbx),%eax
lea    -0x30(%rax),%ecx
add    $0x1,%rbx
cmp    $0xa,%ecx
jb     1160 <serie_Ok+0x20>
test   %al,%al
je     1199 <serie_Ok+0x59>
lea    0xe94(%rip),%rbx
jmp    1183 <serie_Ok+0x43>
lea    0xe7d(%rip),%rbx
mov    $0x7,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    119e <serie_Ok+0x5e>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\07\00"
@.str.1 = [14 x i8] c"Seis digitos?\00"
@.str.2 = [21 x i8] c"Somente digitos ... \00"
define i32 @serie_Ok(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @tirabr to i32 (i8*, ...)*)(i8* %5)
%7 = load i8*, i8** %2
%8 = call i64 @strlen(i8* %7)
%9 = trunc i64 %8 to i32
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = icmp ne i32 %10, 6
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %4
br label %35
15: ; preds = %1
%16 = load i8*, i8** %2
store i8* %16, i8** %3
br label %17
17: ; preds = %23, %15
%18 = load i8*, i8** %3
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = call i32 @isdigit(i32 %20)
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %17
%24 = load i8*, i8** %3
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %3
br label %17
26: ; preds = %17
%27 = load i8*, i8** %3
%28 = load i8, i8* %27
%29 = icmp ne i8 %28, 0
br i1 %29, label %30, label %33
30: ; preds = %26
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %4
br label %34
33: ; preds = %26
store i32 1, i32* %4
br label %34
34: ; preds = %33, %30
br label %35
35: ; preds = %34, %12
%36 = load i32, i32* %4
ret i32 %36
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"Seis digitos?\00"
@.str.2 = [21 x i8] c"Somente digitos ... \00"
define i32 @serie_Ok(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @tirabr to i32 (i8*, ...)*)(i8* %0)
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = trunc i64 %3 to i32
%5 = icmp eq i32 %4, 6
br i1 %5, label %6, label %15
6: ; preds = %1, %6
%7 = phi i8* [ %12, %6 ], [ %0, %1 ]
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = add nsw i32 %9, -48
%11 = icmp ult i32 %10, 10
%12 = getelementptr inbounds i8, i8* %7, i64 1
br i1 %11, label %6, label %13
13: ; preds = %6
%14 = icmp eq i8 %8, 0
br i1 %14, label %19, label %15
15: ; preds = %13, %1
%16 = phi i8* [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), %1 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), %13 ]
%17 = tail call i32 @putchar(i32 7)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %16)
br label %19
19: ; preds = %15, %13
%20 = phi i32 [ 1, %13 ], [ 0, %15 ]
ret i32 %20
}