short pede_data(data)
char *data;
{
  char Data[128];
  short ret;
  ret = 0;
  while (1) {
    printf("\nData de Validade (DDMMAA) se Demonstracao:\n");
    gets(Data);
    eliminabr(Data);
    if (!strlen(Data))
      return (-1);
    if (data_Ok(Data)) {
      sprintf(data, "%.2s/%.2s/%.2s", Data, Data + 2, Data + 4);
      ret = 1;
      break;
    }
  }
  return ret;
}


x86 assembly (clang, -O0):
<pede_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x10(%rbp)
movw   $0x0,-0x92(%rbp)
lea    0xe81(%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   1070 <eliminabr@plt>
lea    -0x90(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
jne    11c3 <pede_data+0x63>
movw   $0xffff,-0x2(%rbp)
jmp    1227 <pede_data+0xc7>
lea    -0x90(%rbp),%rdi
mov    $0x0,%al
call   1060 <data_Ok@plt>
cmp    $0x0,%eax
je     1217 <pede_data+0xb7>
mov    -0x10(%rbp),%rdi
lea    -0x90(%rbp),%rdx
lea    -0x90(%rbp),%rcx
add    $0x2,%rcx
lea    -0x90(%rbp),%r8
add    $0x4,%r8
lea    0xe2b(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
movw   $0x1,-0x92(%rbp)
jmp    121c <pede_data+0xbc>
jmp    1178 <pede_data+0x18>
mov    -0x92(%rbp),%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pede_data>:
push   %r15
push   %r14
push   %rbx
sub    $0x80,%rsp
mov    %rdi,%r14
lea    0xea9(%rip),%r15
mov    %rsp,%rbx
nopl   0x0(%rax)
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <gets@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <eliminabr@plt>
cmpb   $0x0,(%rsp)
je     11c4 <pede_data+0x74>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <data_Ok@plt>
test   %eax,%eax
je     1170 <pede_data+0x20>
lea    0x2(%rsp),%rcx
lea    0x4(%rsp),%r8
lea    0xe4f(%rip),%rsi
mov    %rsp,%rdx
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <sprintf@plt>
mov    $0x1,%ax
jmp    11c8 <pede_data+0x78>
mov    $0xffff,%ax
add    $0x80,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [45 x i8] c"\0AData de Validade (DDMMAA) se Demonstracao:\0A\00"
@.str.1 = [15 x i8] c"%.2s/%.2s/%.2s\00"
define signext i16 @pede_data(i8* %0) {
%2 = alloca i16
%3 = alloca i8*
%4 = alloca [128 x i8]
%5 = alloca i16
store i8* %0, i8** %3
store i16 0, i16* %5
br label %6
6: ; preds = %1, %28
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 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 i64 @strlen(i8* %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %16, label %15
15: ; preds = %6
store i16 -1, i16* %2
br label %31
16: ; preds = %6
%17 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%18 = call i32 (i8*, ...) bitcast (i32 (...)* @data_Ok to i32 (i8*, ...)*)(i8* %17)
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %28
20: ; preds = %16
%21 = load i8*, i8** %3
%22 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%23 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%24 = getelementptr inbounds i8, i8* %23, i64 2
%25 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%26 = getelementptr inbounds i8, i8* %25, i64 4
%27 = call i32 (i8*, i8*, ...) @sprintf(i8* %21, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %22, i8* %24, i8* %26)
store i16 1, i16* %5
br label %29
28: ; preds = %16
br label %6
29: ; preds = %20
%30 = load i16, i16* %5
store i16 %30, i16* %2
br label %31
31: ; preds = %29, %15
%32 = load i16, i16* %2
ret i16 %32
}

LLVM IR (-O2):
@.str.1 = [15 x i8] c"%.2s/%.2s/%.2s\00"
@str = [44 x i8] c"\0AData de Validade (DDMMAA) se Demonstracao:\00"
define signext i16 @pede_data(i8* nocapture writeonly %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 = %10, %1
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 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 = load i8, i8* %3
%9 = icmp eq i8 %8, 0
br i1 %9, label %17, label %10
10: ; preds = %4
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @data_Ok to i32 (i8*, ...)*)(i8* %3)
%12 = icmp eq i32 %11, 0
br i1 %12, label %4, label %13
13: ; preds = %10
%14 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 2
%15 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 4
%16 = call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %3, i8* %14, i8* %15)
br label %17
17: ; preds = %4, %13
%18 = phi i16 [ 1, %13 ], [ -1, %4 ]
ret i16 %18
}