#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 */
scalar_t__ strchr(char *, int);
scalar_t__ tolower(int);
int matches(int a, int b) {
  if (a == '#' || b == '#')
    return 0;
  if (a == '.' || b == '.')
    return 1;
  if (strchr("aeiouy", a) && b == '0')
    return 1;
  if (strchr("aeiouy", b) && a == '0')
    return 1;
  if (strchr("bcdfghjklmnpqrstvwxyz", a) && b == '1')
    return 1;
  if (strchr("bcdfghjklmnpqrstvwxyz", b) && a == '1')
    return 1;
  return (tolower(a) == tolower(b)) ? 2 : 0;
}


x86 assembly (clang, -O0):
<matches>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x23,-0x8(%rbp)
je     1142 <matches+0x22>
cmpl   $0x23,-0xc(%rbp)
jne    114e <matches+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    1255 <matches+0x135>
cmpl   $0x2e,-0x8(%rbp)
je     1162 <matches+0x42>
cmpl   $0x2e,-0xc(%rbp)
jne    116e <matches+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1255 <matches+0x135>
mov    -0x8(%rbp),%esi
lea    0xe88(%rip),%rdi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     119d <matches+0x7d>
cmpl   $0x30,-0xc(%rbp)
jne    119d <matches+0x7d>
movl   $0x1,-0x4(%rbp)
jmp    1255 <matches+0x135>
mov    -0xc(%rbp),%esi
lea    0xe59(%rip),%rdi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     11cc <matches+0xac>
cmpl   $0x30,-0x8(%rbp)
jne    11cc <matches+0xac>
movl   $0x1,-0x4(%rbp)
jmp    1255 <matches+0x135>
mov    -0x8(%rbp),%esi
lea    0xe31(%rip),%rdi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     11fb <matches+0xdb>
cmpl   $0x31,-0xc(%rbp)
jne    11fb <matches+0xdb>
movl   $0x1,-0x4(%rbp)
jmp    1255 <matches+0x135>
mov    -0xc(%rbp),%esi
lea    0xe02(%rip),%rdi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     122a <matches+0x10a>
cmpl   $0x31,-0x8(%rbp)
jne    122a <matches+0x10a>
movl   $0x1,-0x4(%rbp)
jmp    1255 <matches+0x135>
mov    -0x8(%rbp),%edi
call   1040 <tolower@plt>
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <tolower@plt>
mov    -0x18(%rbp),%rdx
mov    %rax,%rsi
xor    %eax,%eax
mov    $0x2,%ecx
cmp    %rsi,%rdx
cmove  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matches>:
push   %rbp
push   %r14
push   %rbx
xor    %r14d,%r14d
cmp    $0x23,%edi
je     11cf <matches+0xaf>
mov    %esi,%ebp
cmp    $0x23,%esi
je     11cf <matches+0xaf>
mov    %edi,%ebx
mov    $0x1,%r14d
cmp    $0x2e,%edi
je     11cf <matches+0xaf>
cmp    $0x2e,%ebp
je     11cf <matches+0xaf>
lea    0xea8(%rip),%rdi
mov    %ebx,%esi
call   1030 <strchr@plt>
cmp    $0x30,%ebp
jne    1169 <matches+0x49>
test   %rax,%rax
jne    11cf <matches+0xaf>
lea    0xe90(%rip),%rdi
mov    %ebp,%esi
call   1030 <strchr@plt>
cmp    $0x30,%ebx
jne    1181 <matches+0x61>
test   %rax,%rax
jne    11cf <matches+0xaf>
lea    0xe7f(%rip),%rdi
mov    %ebx,%esi
call   1030 <strchr@plt>
cmp    $0x31,%ebp
jne    1199 <matches+0x79>
test   %rax,%rax
jne    11cf <matches+0xaf>
lea    0xe67(%rip),%rdi
mov    %ebp,%esi
call   1030 <strchr@plt>
cmp    $0x31,%ebx
jne    11b1 <matches+0x91>
test   %rax,%rax
jne    11cf <matches+0xaf>
mov    %ebx,%edi
call   1040 <tolower@plt>
mov    %rax,%rbx
mov    %ebp,%edi
call   1040 <tolower@plt>
xor    %r14d,%r14d
cmp    %rax,%rbx
sete   %r14b
add    %r14d,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"aeiouy\00"
@.str.1 = [22 x i8] c"bcdfghjklmnpqrstvwxyz\00"
define i32 @matches(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 35
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 35
br i1 %10, label %11, label %12
11: ; preds = %8, %2
store i32 0, i32* %3
br label %59
12: ; preds = %8
%13 = load i32, i32* %4
%14 = icmp eq i32 %13, 46
br i1 %14, label %18, label %15
15: ; preds = %12
%16 = load i32, i32* %5
%17 = icmp eq i32 %16, 46
br i1 %17, label %18, label %19
18: ; preds = %15, %12
store i32 1, i32* %3
br label %59
19: ; preds = %15
%20 = load i32, i32* %4
%21 = call i64 @strchr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %27
23: ; preds = %19
%24 = load i32, i32* %5
%25 = icmp eq i32 %24, 48
br i1 %25, label %26, label %27
26: ; preds = %23
store i32 1, i32* %3
br label %59
27: ; preds = %23, %19
%28 = load i32, i32* %5
%29 = call i64 @strchr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %28)
%30 = icmp ne i64 %29, 0
br i1 %30, label %31, label %35
31: ; preds = %27
%32 = load i32, i32* %4
%33 = icmp eq i32 %32, 48
br i1 %33, label %34, label %35
34: ; preds = %31
store i32 1, i32* %3
br label %59
35: ; preds = %31, %27
%36 = load i32, i32* %4
%37 = call i64 @strchr(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %36)
%38 = icmp ne i64 %37, 0
br i1 %38, label %39, label %43
39: ; preds = %35
%40 = load i32, i32* %5
%41 = icmp eq i32 %40, 49
br i1 %41, label %42, label %43
42: ; preds = %39
store i32 1, i32* %3
br label %59
43: ; preds = %39, %35
%44 = load i32, i32* %5
%45 = call i64 @strchr(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %44)
%46 = icmp ne i64 %45, 0
br i1 %46, label %47, label %51
47: ; preds = %43
%48 = load i32, i32* %4
%49 = icmp eq i32 %48, 49
br i1 %49, label %50, label %51
50: ; preds = %47
store i32 1, i32* %3
br label %59
51: ; preds = %47, %43
%52 = load i32, i32* %4
%53 = call i64 @tolower(i32 %52)
%54 = load i32, i32* %5
%55 = call i64 @tolower(i32 %54)
%56 = icmp eq i64 %53, %55
%57 = zext i1 %56 to i64
%58 = select i1 %56, i32 2, i32 0
store i32 %58, i32* %3
br label %59
59: ; preds = %51, %50, %42, %34, %26, %18, %11
%60 = load i32, i32* %3
ret i32 %60
}

LLVM IR (-O2):
@.str = [7 x i8] c"aeiouy\00"
@.str.1 = [22 x i8] c"bcdfghjklmnpqrstvwxyz\00"
define i32 @matches(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 35
%4 = icmp eq i32 %1, 35
%5 = or i1 %3, %4
br i1 %5, label %35, label %6
6: ; preds = %2
%7 = icmp eq i32 %0, 46
%8 = icmp eq i32 %1, 46
%9 = or i1 %7, %8
br i1 %9, label %35, label %10
10: ; preds = %6
%11 = tail call i64 @strchr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0)
%12 = icmp ne i64 %11, 0
%13 = icmp eq i32 %1, 48
%14 = and i1 %13, %12
br i1 %14, label %35, label %15
15: ; preds = %10
%16 = tail call i64 @strchr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1)
%17 = icmp ne i64 %16, 0
%18 = icmp eq i32 %0, 48
%19 = and i1 %18, %17
br i1 %19, label %35, label %20
20: ; preds = %15
%21 = tail call i64 @strchr(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%22 = icmp ne i64 %21, 0
%23 = icmp eq i32 %1, 49
%24 = and i1 %23, %22
br i1 %24, label %35, label %25
25: ; preds = %20
%26 = tail call i64 @strchr(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%27 = icmp ne i64 %26, 0
%28 = icmp eq i32 %0, 49
%29 = and i1 %28, %27
br i1 %29, label %35, label %30
30: ; preds = %25
%31 = tail call i64 @tolower(i32 %0)
%32 = tail call i64 @tolower(i32 %1)
%33 = icmp eq i64 %31, %32
%34 = select i1 %33, i32 2, i32 0
br label %35
35: ; preds = %25, %20, %15, %10, %6, %2, %30
%36 = phi i32 [ %34, %30 ], [ 0, %2 ], [ 1, %6 ], [ 1, %10 ], [ 1, %15 ], [ 1, %20 ], [ 1, %25 ]
ret i32 %36
}