short pede_serie(serie)
char *serie;
{
  long l;
  char Serie[128];
  short ret;
  ret = 0;
  while (1) {
    printf("\n\nNumero de Serie(6 digitos):\n");
    gets(Serie);
    eliminabr(Serie);
    if (serie_Ok(Serie)) {
      l = ve_serie_grv();
      strcpy(serie, Serie);
      if (atol(serie) == l) {
        ret = 1;
        break;
      } else {
        printf("Numero de serie incompativel\n");
        if (atol(serie) == 270562)
          printf("e : %ld\n", l);
      }
    }
  }
  return ret;
}


x86 assembly (clang, -O0):
<pede_serie>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
movw   $0x0,-0x92(%rbp)
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x90(%rbp),%rdi
mov    $0x0,%al
call   1050 <gets@plt>
lea    -0x90(%rbp),%rdi
mov    $0x0,%al
call   1080 <eliminabr@plt>
lea    -0x90(%rbp),%rdi
mov    $0x0,%al
call   1060 <serie_Ok@plt>
cmp    $0x0,%eax
je     124b <pede_serie+0xdb>
mov    $0x0,%al
call   1090 <ve_serie_grv@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1070 <atol@plt>
cltq
cmp    -0x10(%rbp),%rax
jne    120b <pede_serie+0x9b>
movw   $0x1,-0x92(%rbp)
jmp    1250 <pede_serie+0xe0>
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1070 <atol@plt>
cmp    $0x420e2,%eax
jne    1241 <pede_serie+0xd1>
mov    -0x10(%rbp),%rsi
lea    0xe03(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1246 <pede_serie+0xd6>
jmp    124b <pede_serie+0xdb>
jmp    1188 <pede_serie+0x18>
movswl -0x92(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pede_serie>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rdi,%r15
lea    0xe6e(%rip),%r14
mov    %rsp,%rbx
lea    0xe82(%rip),%r12
lea    0xe54(%rip),%r13
nopl   0x0(%rax)
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <gets@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <eliminabr@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <serie_Ok@plt>
test   %eax,%eax
je     11b0 <pede_serie+0x30>
xor    %eax,%eax
call   10a0 <ve_serie_grv@plt>
mov    %eax,%ebp
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1080 <atol@plt>
cmp    %ebp,%eax
je     1224 <pede_serie+0xa4>
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1080 <atol@plt>
cmp    $0x420e2,%eax
jne    11b0 <pede_serie+0x30>
movslq %ebp,%rsi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    11b0 <pede_serie+0x30>
mov    $0x1,%ax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [31 x i8] c"\0A\0ANumero de Serie(6 digitos):\0A\00"
@.str.1 = [30 x i8] c"Numero de serie incompativel\0A\00"
@.str.2 = [9 x i8] c"e : %ld\0A\00"
define signext i16 @pede_serie(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca [128 x i8]
%5 = alloca i16
store i8* %0, i8** %2
store i16 0, i16* %5
br label %6
6: ; preds = %1, %37
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @gets to i32 (i8*, ...)*)(i8* %8)
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @eliminabr to i32 (i8*, ...)*)(i8* %10)
%12 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @serie_Ok to i32 (i8*, ...)*)(i8* %12)
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %37
15: ; preds = %6
%16 = call i32 (...) @ve_serie_grv()
%17 = sext i32 %16 to i64
store i64 %17, i64* %3
%18 = load i8*, i8** %2
%19 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%20 = call i8* @strcpy(i8* %18, i8* %19)
%21 = load i8*, i8** %2
%22 = call i32 (i8*, ...) bitcast (i32 (...)* @atol to i32 (i8*, ...)*)(i8* %21)
%23 = sext i32 %22 to i64
%24 = load i64, i64* %3
%25 = icmp eq i64 %23, %24
br i1 %25, label %26, label %27
26: ; preds = %15
store i16 1, i16* %5
br label %38
27: ; preds = %15
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%29 = load i8*, i8** %2
%30 = call i32 (i8*, ...) bitcast (i32 (...)* @atol to i32 (i8*, ...)*)(i8* %29)
%31 = icmp eq i32 %30, 270562
br i1 %31, label %32, label %35
32: ; preds = %27
%33 = load i64, i64* %3
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i64 %33)
br label %35
35: ; preds = %32, %27
br label %36
36: ; preds = %35
br label %37
37: ; preds = %36, %6
br label %6
38: ; preds = %26
%39 = load i16, i16* %5
ret i16 %39
}

LLVM IR (-O2):
@.str.2 = [9 x i8] c"e : %ld\0A\00"
@str = [30 x i8] c"\0A\0ANumero de Serie(6 digitos):\00"
@str.3 = [29 x i8] c"Numero de serie incompativel\00"
define signext i16 @pede_serie(i8* %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
br label %4
4: ; preds = %23, %1
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @gets to i32 (i8*, ...)*)(i8* %3)
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @eliminabr to i32 (i8*, ...)*)(i8* %3)
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @serie_Ok to i32 (i8*, ...)*)(i8* %3)
%9 = icmp eq i32 %8, 0
br i1 %9, label %23, label %10
10: ; preds = %4
%11 = call i32 (...) @ve_serie_grv()
%12 = sext i32 %11 to i64
%13 = call i8* @strcpy(i8* dereferenceable(1) %0, i8* %3)
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @atol to i32 (i8*, ...)*)(i8* %0)
%15 = icmp eq i32 %14, %11
br i1 %15, label %16, label %17
16: ; preds = %10
ret i16 1
17: ; preds = %10
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.3, i64 0, i64 0))
%19 = call i32 (i8*, ...) bitcast (i32 (...)* @atol to i32 (i8*, ...)*)(i8* %0)
%20 = icmp eq i32 %19, 270562
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i64 %12)
br label %23
23: ; preds = %21, %17, %4
br label %4
}