#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 isMatch(char *, char *);
int /*<<< orphan*/ printf(char *, int);
void isMatchMain(void) {
  printf("%d\n", isMatch("aa", "a"));
  printf("%d\n", isMatch("aa", "aa"));
  printf("%d\n", isMatch("aaa", "aa"));
  printf("%d\n", isMatch("aa", "a*"));
  printf("%d\n", isMatch("aa", ".*"));
  printf("%d\n", isMatch("ab", ".*"));
  printf("%d\n", isMatch("aab", "c*a*b"));
  printf("%d\n", isMatch("ab", ".*c"));
  printf("%d\n", isMatch("aaa", "ab*a*"));
  printf("%d\n", isMatch("aaa", "ab*a*c*a"));
  printf("%d\n", isMatch("aasdfasdfasdfasdfas", "aasdf.*asdf.*asdf.*asdf.*s"));
  printf("%d\n", isMatch("baccbbcbcacacbbc", "c*.*b*c*ba*b*b*.a*"));
}


x86 assembly (clang, -O0):
<isMatchMain>:
push   %rbp
mov    %rsp,%rbp
lea    0xeda(%rip),%rdi
lea    0xef4(%rip),%rsi
call   1030 <isMatch@plt>
mov    %eax,%esi
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb9(%rip),%rsi
mov    %rsi,%rdi
call   1030 <isMatch@plt>
mov    %eax,%esi
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
lea    0xe9b(%rip),%rdi
lea    0xe95(%rip),%rsi
call   1030 <isMatch@plt>
mov    %eax,%esi
lea    0xe82(%rip),%rdi
call   1040 <printf@plt>
lea    0xe7b(%rip),%rdi
lea    0xe8b(%rip),%rsi
call   1030 <isMatch@plt>
mov    %eax,%esi
lea    0xe61(%rip),%rdi
call   1040 <printf@plt>
lea    0xe5a(%rip),%rdi
lea    0xe56(%rip),%rsi
call   1030 <isMatch@plt>
mov    %eax,%esi
lea    0xe40(%rip),%rdi
call   1040 <printf@plt>
lea    0xe40(%rip),%rdi
lea    0xe35(%rip),%rsi
call   1030 <isMatch@plt>
mov    %eax,%esi
lea    0xe1f(%rip),%rdi
call   1040 <printf@plt>
lea    0xe1e(%rip),%rdi
lea    0xe1b(%rip),%rsi
call   1030 <isMatch@plt>
mov    %eax,%esi
lea    0xdfe(%rip),%rdi
call   1040 <printf@plt>
lea    0xdfe(%rip),%rdi
lea    0xe00(%rip),%rsi
call   1030 <isMatch@plt>
mov    %eax,%esi
lea    0xddd(%rip),%rdi
call   1040 <printf@plt>
lea    0xdd5(%rip),%rdi
lea    0xde3(%rip),%rsi
call   1030 <isMatch@plt>
mov    %eax,%esi
lea    0xdbc(%rip),%rdi
call   1040 <printf@plt>
lea    0xdb4(%rip),%rdi
lea    0xdc8(%rip),%rsi
call   1030 <isMatch@plt>
mov    %eax,%esi
lea    0xd9b(%rip),%rdi
call   1040 <printf@plt>
lea    0xdb7(%rip),%rdi
lea    0xdc4(%rip),%rsi
call   1030 <isMatch@plt>
mov    %eax,%esi
lea    0xd7a(%rip),%rdi
call   1040 <printf@plt>
lea    0xdc5(%rip),%rdi
lea    0xdcf(%rip),%rsi
call   1030 <isMatch@plt>
mov    %eax,%esi
lea    0xd59(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<isMatchMain>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xed6(%rip),%rbx
lea    0xef0(%rip),%rsi
mov    %rbx,%rdi
call   1030 <isMatch@plt>
lea    0xebb(%rip),%r15
mov    %r15,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1030 <isMatch@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
lea    0xe99(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <isMatch@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
lea    0xe95(%rip),%rsi
mov    %rbx,%rdi
call   1030 <isMatch@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
lea    0xe68(%rip),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <isMatch@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
lea    0xe50(%rip),%rbx
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <isMatch@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
lea    0xe33(%rip),%rdi
lea    0xe30(%rip),%rsi
call   1030 <isMatch@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
lea    0xe20(%rip),%rsi
mov    %rbx,%rdi
call   1030 <isMatch@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
lea    0xe0b(%rip),%rsi
mov    %r14,%rdi
call   1030 <isMatch@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
lea    0xdf8(%rip),%rsi
mov    %r14,%rdi
call   1030 <isMatch@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
lea    0xde8(%rip),%rdi
lea    0xdf5(%rip),%rsi
call   1030 <isMatch@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
lea    0xdfa(%rip),%rdi
lea    0xe04(%rip),%rsi
call   1030 <isMatch@plt>
mov    %r15,%rdi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [3 x i8] c"aa\00"
@.str.2 = [2 x i8] c"a\00"
@.str.3 = [4 x i8] c"aaa\00"
@.str.4 = [3 x i8] c"a*\00"
@.str.5 = [3 x i8] c".*\00"
@.str.6 = [3 x i8] c"ab\00"
@.str.7 = [4 x i8] c"aab\00"
@.str.8 = [6 x i8] c"c*a*b\00"
@.str.9 = [4 x i8] c".*c\00"
@.str.10 = [6 x i8] c"ab*a*\00"
@.str.11 = [9 x i8] c"ab*a*c*a\00"
@.str.12 = [20 x i8] c"aasdfasdfasdfasdfas\00"
@.str.13 = [27 x i8] c"aasdf.*asdf.*asdf.*asdf.*s\00"
@.str.14 = [17 x i8] c"baccbbcbcacacbbc\00"
@.str.15 = [19 x i8] c"c*.*b*c*ba*b*b*.a*\00"
define void @isMatchMain() {
%1 = call i32 @isMatch(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @isMatch(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @isMatch(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 @isMatch(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = call i32 @isMatch(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = call i32 @isMatch(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = call i32 @isMatch(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = call i32 @isMatch(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = call i32 @isMatch(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = call i32 @isMatch(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %19)
%21 = call i32 @isMatch(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.13, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %21)
%23 = call i32 @isMatch(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.15, i64 0, i64 0))
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %23)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [3 x i8] c"aa\00"
@.str.2 = [2 x i8] c"a\00"
@.str.3 = [4 x i8] c"aaa\00"
@.str.4 = [3 x i8] c"a*\00"
@.str.5 = [3 x i8] c".*\00"
@.str.6 = [3 x i8] c"ab\00"
@.str.7 = [4 x i8] c"aab\00"
@.str.8 = [6 x i8] c"c*a*b\00"
@.str.9 = [4 x i8] c".*c\00"
@.str.10 = [6 x i8] c"ab*a*\00"
@.str.11 = [9 x i8] c"ab*a*c*a\00"
@.str.12 = [20 x i8] c"aasdfasdfasdfasdfas\00"
@.str.13 = [27 x i8] c"aasdf.*asdf.*asdf.*asdf.*s\00"
@.str.14 = [17 x i8] c"baccbbcbcacacbbc\00"
@.str.15 = [19 x i8] c"c*.*b*c*ba*b*b*.a*\00"
define void @isMatchMain() {
%1 = tail call i32 @isMatch(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @isMatch(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @isMatch(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 @isMatch(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = tail call i32 @isMatch(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = tail call i32 @isMatch(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = tail call i32 @isMatch(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%14 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = tail call i32 @isMatch(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%16 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = tail call i32 @isMatch(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%18 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = tail call i32 @isMatch(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
%20 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %19)
%21 = tail call i32 @isMatch(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.13, i64 0, i64 0))
%22 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %21)
%23 = tail call i32 @isMatch(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.15, i64 0, i64 0))
%24 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %23)
ret void
}