int data_Ok(Data)
char *Data;
{
  char *p;
  char data[9];
  int ret = 0;
  eliminabr(Data);
  if (strlen(Data) != 6) {
    printf("\07");
    printf("DDMMAA ?");
    goto fim;
  } else {
    p = Data;
    while (isdigit(*p))
      ++p;
    if (*p) {
      printf("\07");
      printf("Somente digitos ... ");
      goto fim;
    }
  }
  sprintf(data, "%.2s/%.2s/%.2s", Data, Data + 2, Data + 4);
  if (!valid_data(atoi(data + 6), atoi(data + 3), atoi(data))) {
    ret = 1;
    goto fim;
  }
  if (data_long(data) <= sysdata_long()) {
    printf("\07");
    printf("Data anterior a \"hoje\"!");
  }
fim:
  return ret;
}


x86 assembly (clang, -O0):
<data_Ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1080 <eliminabr@plt>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x6,%rax
je     11e2 <data_Ok+0x52>
lea    0xe38(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe2c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    12ff <data_Ok+0x16f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
je     1210 <data_Ok+0x80>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    11ea <data_Ok+0x5a>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     123e <data_Ok+0xae>
lea    0xddc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xdd9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    12ff <data_Ok+0x16f>
jmp    1243 <data_Ok+0xb3>
lea    -0x19(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
add    $0x2,%rcx
mov    -0x8(%rbp),%r8
add    $0x4,%r8
lea    0xdbe(%rip),%rsi
mov    $0x0,%al
call   10a0 <sprintf@plt>
lea    -0x19(%rbp),%rdi
add    $0x6,%rdi
mov    $0x0,%al
call   1090 <atoi@plt>
mov    %eax,-0x28(%rbp)
lea    -0x19(%rbp),%rdi
add    $0x3,%rdi
mov    $0x0,%al
call   1090 <atoi@plt>
mov    %eax,-0x24(%rbp)
lea    -0x19(%rbp),%rdi
mov    $0x0,%al
call   1090 <atoi@plt>
mov    -0x28(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    %eax,%edx
mov    $0x0,%al
call   10b0 <valid_data@plt>
cmp    $0x0,%eax
jne    12bc <data_Ok+0x12c>
movl   $0x1,-0x20(%rbp)
jmp    12ff <data_Ok+0x16f>
lea    -0x19(%rbp),%rdi
mov    $0x0,%al
call   1060 <data_long@plt>
mov    %eax,-0x2c(%rbp)
mov    $0x0,%al
call   1070 <sysdata_long@plt>
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
cmp    %ecx,%eax
jg     12fa <data_Ok+0x16a>
lea    0xd1b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd3c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    12ff <data_Ok+0x16f>
mov    -0x20(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<data_Ok>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%rbx
xor    %ebp,%ebp
xor    %eax,%eax
call   1080 <eliminabr@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0x6,%rax
jne    11e8 <data_Ok+0x58>
mov    %rbx,%rax
nopw   0x0(%rax,%rax,1)
movsbl (%rax),%ecx
lea    -0x30(%rcx),%edx
add    $0x1,%rax
cmp    $0xa,%edx
jb     11c0 <data_Ok+0x30>
test   %cl,%cl
je     120d <data_Ok+0x7d>
mov    $0x7,%edi
call   1030 <putchar@plt>
lea    0xe25(%rip),%rdi
xor    %ebp,%ebp
jmp    11f9 <data_Ok+0x69>
mov    $0x7,%edi
call   1030 <putchar@plt>
lea    0xe07(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebp,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x2(%rbx),%rcx
lea    0x4(%rbx),%r8
lea    0xe02(%rip),%rsi
xor    %ebp,%ebp
lea    0xf(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10a0 <sprintf@plt>
lea    0x15(%rsp),%rdi
xor    %eax,%eax
call   1090 <atoi@plt>
mov    %eax,%r15d
lea    0x12(%rsp),%rdi
xor    %eax,%eax
call   1090 <atoi@plt>
mov    %eax,%ebx
mov    %r14,%rdi
xor    %eax,%eax
call   1090 <atoi@plt>
mov    %r15d,%edi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   10b0 <valid_data@plt>
test   %eax,%eax
je     129c <data_Ok+0x10c>
lea    0xf(%rsp),%rdi
xor    %eax,%eax
call   1060 <data_long@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <sysdata_long@plt>
cmp    %eax,%ebx
jg     1200 <data_Ok+0x70>
mov    $0x7,%edi
call   1030 <putchar@plt>
lea    0xd96(%rip),%rdi
jmp    11e4 <data_Ok+0x54>
mov    $0x1,%ebp
jmp    1200 <data_Ok+0x70>

LLVM IR (-O0):
@.str = [2 x i8] c"\07\00"
@.str.1 = [9 x i8] c"DDMMAA ?\00"
@.str.2 = [21 x i8] c"Somente digitos ... \00"
@.str.3 = [15 x i8] c"%.2s/%.2s/%.2s\00"
@.str.4 = [24 x i8] c"Data anterior a \22hoje\22!\00"
define i32 @data_Ok(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca [9 x i8]
%5 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %5
%6 = load i8*, i8** %2
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @eliminabr to i32 (i8*, ...)*)(i8* %6)
%8 = load i8*, i8** %2
%9 = call i64 @strlen(i8* %8)
%10 = icmp ne i64 %9, 6
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %61
14: ; preds = %1
%15 = load i8*, i8** %2
store i8* %15, i8** %3
br label %16
16: ; preds = %22, %14
%17 = load i8*, i8** %3
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = call i32 @isdigit(i32 %19)
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %16
%23 = load i8*, i8** %3
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %3
br label %16
25: ; preds = %16
%26 = load i8*, i8** %3
%27 = load i8, i8* %26
%28 = icmp ne i8 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %25
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %61
32: ; preds = %25
br label %33
33: ; preds = %32
%34 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 0
%35 = load i8*, i8** %2
%36 = load i8*, i8** %2
%37 = getelementptr inbounds i8, i8* %36, i64 2
%38 = load i8*, i8** %2
%39 = getelementptr inbounds i8, i8* %38, i64 4
%40 = call i32 (i8*, i8*, ...) @sprintf(i8* %34, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8* %35, i8* %37, i8* %39)
%41 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 0
%42 = getelementptr inbounds i8, i8* %41, i64 6
%43 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %42)
%44 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 0
%45 = getelementptr inbounds i8, i8* %44, i64 3
%46 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %45)
%47 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 0
%48 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %47)
%49 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @valid_data to i32 (i32, i32, i32, ...)*)(i32 %43, i32 %46, i32 %48)
%50 = icmp ne i32 %49, 0
br i1 %50, label %52, label %51
51: ; preds = %33
store i32 1, i32* %5
br label %61
52: ; preds = %33
%53 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 0
%54 = call i32 (i8*, ...) bitcast (i32 (...)* @data_long to i32 (i8*, ...)*)(i8* %53)
%55 = call i32 (...) @sysdata_long()
%56 = icmp sle i32 %54, %55
br i1 %56, label %57, label %60
57: ; preds = %52
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
br label %60
60: ; preds = %57, %52
br label %61
61: ; preds = %60, %51, %29, %11
%62 = load i32, i32* %5
ret i32 %62
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"DDMMAA ?\00"
@.str.2 = [21 x i8] c"Somente digitos ... \00"
@.str.3 = [15 x i8] c"%.2s/%.2s/%.2s\00"
@.str.4 = [24 x i8] c"Data anterior a \22hoje\22!\00"
define i32 @data_Ok(i8* %0) {
%2 = alloca [9 x i8]
%3 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @eliminabr to i32 (i8*, ...)*)(i8* %0)
%5 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%6 = icmp eq i64 %5, 6
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = tail call i32 @putchar(i32 7)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %40
10: ; preds = %1, %10
%11 = phi i8* [ %16, %10 ], [ %0, %1 ]
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = add nsw i32 %13, -48
%15 = icmp ult i32 %14, 10
%16 = getelementptr inbounds i8, i8* %11, i64 1
br i1 %15, label %10, label %17
17: ; preds = %10
%18 = icmp eq i8 %12, 0
br i1 %18, label %22, label %19
19: ; preds = %17
%20 = tail call i32 @putchar(i32 7)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %40
22: ; preds = %17
%23 = getelementptr inbounds i8, i8* %0, i64 2
%24 = getelementptr inbounds i8, i8* %0, i64 4
%25 = call i32 (i8*, i8*, ...) @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8* %0, i8* %23, i8* %24)
%26 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 6
%27 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %26)
%28 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 3
%29 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %28)
%30 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %3)
%31 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @valid_data to i32 (i32, i32, i32, ...)*)(i32 %27, i32 %29, i32 %30)
%32 = icmp eq i32 %31, 0
br i1 %32, label %40, label %33
33: ; preds = %22
%34 = call i32 (i8*, ...) bitcast (i32 (...)* @data_long to i32 (i8*, ...)*)(i8* %3)
%35 = call i32 (...) @sysdata_long()
%36 = icmp sgt i32 %34, %35
br i1 %36, label %40, label %37
37: ; preds = %33
%38 = call i32 @putchar(i32 7)
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
br label %40
40: ; preds = %22, %33, %37, %19, %7
%41 = phi i32 [ 0, %7 ], [ 0, %19 ], [ 0, %37 ], [ 0, %33 ], [ 1, %22 ]
ret i32 %41
}