#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 len(char *);
int is_fac_year(char *year) {
  return ((year[0] >= '0' && year[0] <= '1') &&
          (year[1] >= '0' && year[1] <= '9') && len(year) == 2);
}


x86 assembly (clang, -O0):
<is_fac_year>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x9(%rbp)
jl     1184 <is_fac_year+0x74>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x31,%ecx
mov    %al,-0x9(%rbp)
jg     1184 <is_fac_year+0x74>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x9(%rbp)
jl     1184 <is_fac_year+0x74>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%ecx
xor    %eax,%eax
cmp    $0x39,%ecx
mov    %al,-0x9(%rbp)
jg     1184 <is_fac_year+0x74>
mov    -0x8(%rbp),%rdi
call   1030 <len@plt>
cmp    $0x2,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_fac_year>:
push   %rax
mov    (%rdi),%cl
and    $0xfe,%cl
xor    %eax,%eax
cmp    $0x30,%cl
jne    1137 <is_fac_year+0x27>
mov    0x1(%rdi),%cl
add    $0xd0,%cl
cmp    $0x9,%cl
ja     1137 <is_fac_year+0x27>
call   1030 <len@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x2,%ecx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_fac_year(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp sge i32 %6, 48
br i1 %7, label %8, label %30
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp sle i32 %12, 49
br i1 %13, label %14, label %30
14: ; preds = %8
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i64 1
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp sge i32 %18, 48
br i1 %19, label %20, label %30
20: ; preds = %14
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i64 1
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 57
br i1 %25, label %26, label %30
26: ; preds = %20
%27 = load i8*, i8** %2
%28 = call i32 @len(i8* %27)
%29 = icmp eq i32 %28, 2
br label %30
30: ; preds = %26, %20, %14, %8, %1
%31 = phi i1 [ false, %20 ], [ false, %14 ], [ false, %8 ], [ false, %1 ], [ %29, %26 ]
%32 = zext i1 %31 to i32
ret i32 %32
}

LLVM IR (-O2):
define i32 @is_fac_year(i8* %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -2
%4 = icmp eq i8 %3, 48
br i1 %4, label %5, label %14
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = load i8, i8* %6
%8 = add i8 %7, -48
%9 = icmp ult i8 %8, 10
br i1 %9, label %10, label %14
10: ; preds = %5
%11 = tail call i32 @len(i8* %0)
%12 = icmp eq i32 %11, 2
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %10, %5, %1
%15 = phi i32 [ 0, %5 ], [ 0, %1 ], [ %13, %10 ]
ret i32 %15
}