#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 /*<<< orphan*/ assert(int);
int isInterleave(char *, char *, char *);
int main() {
  char *s1 = "aabcc";
  char *s2 = "dbbca";
  char *s3 = "aadbbcbcac";
  char *s4 = "aadbbbaccc";
  char *sa1 = "abbbbbbcabbacaacccababaabcccabcacbcaabbbacccaaaaaababbbacbb";
  char *sa2 = "ccaacabbacaccacababbbbabbcacccacccccaabaababacbbacabbbbabc";
  char *sa3 = "cacbabbacbbbabcbaacbbaccacaacaacccabababbbababcccbabcabbaccabccc"
              "acccaabbcbcaccccaaaaabaaaaababbbbacbbabacbbacabbbbabc";
  assert(isInterleave("aa", "", "aa") == 1);
  assert(isInterleave("", "ab", "ab") == 1);
  assert(isInterleave("aa", "ab", "abaa") == 1);
  assert(isInterleave("aabcc", "dbbca", "aadbbcbcac") == 1);
  assert(isInterleave("aabcc", "dbbca", "aadbbbaccc") == 0);
  assert(isInterleave(sa1, sa2, sa3) == 1);
  char *sb1 = "bbbbbabbbbabaababaaaabbababbaaabbabbaaabaaaaababbbababbbbbabbbba"
              "babbabaabababbbaabababababbbaaababaa";
  char *sb2 = "babaaaabbababbbabbbbaabaabbaabbbbaabaaabaababaaaabaaabbaaabaaaab"
              "aabaabbbbbbbbbbbabaaabbababbabbabaab";
  char *sb3 =
      "babbbabbbaaabbababbbbababaabbabaabaaabbbbabbbaaabbbaaaaabbbbaabbaaababab"
      "baaaaaabababbababaababbababbbababbbbaaaabaabbabbaaaaabbabbaaaabbbaabaaab"
      "aababaababbaaabbbbbabbbbaabbabaabbbbabaaabbababbabbabbab";
  assert(isInterleave(sb1, sb2, sb3) == 0);
  char *sc1 = "cbcccbabbccbbcccbbbcabbbabcababbbbbbaccaccbabbaacbaabbbc";
  char *sc2 = "abcbbcaababccacbaaaccbabaabbaaabcbababbcccbbabbbcbbb";
  char *sc3 = "abcbcccbacbbbbccbcbcacacbbbbacabbbabbcacbcaabcbaaacbcbbbabbbaaca"
              "cbbaaaabccbcbaabbbaaabbcccbcbabababbbcbbbcbb";
  assert(isInterleave(sc1, sc2, sc3) == 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xecc(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xec7(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xec7(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xef8(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xf28(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xff5(%rip),%rdx
lea    0xff0(%rip),%rsi
mov    %rdx,%rdi
call   1030 <isInterleave@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xfd1(%rip),%rdi
lea    0x102d(%rip),%rdx
mov    %rdx,%rsi
call   1030 <isInterleave@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xfa9(%rip),%rdi
lea    0x1007(%rip),%rsi
lea    0xf99(%rip),%rdx
call   1030 <isInterleave@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xe0e(%rip),%rdi
lea    0xe0d(%rip),%rsi
lea    0xe0c(%rip),%rdx
call   1030 <isInterleave@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xde4(%rip),%rdi
lea    0xde3(%rip),%rsi
lea    0xded(%rip),%rdx
call   1030 <isInterleave@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%rdx
call   1030 <isInterleave@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xea8(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    0xf02(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xf5c(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x50(%rbp),%rdx
call   1030 <isInterleave@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xff9(%rip),%rax
mov    %rax,-0x58(%rbp)
lea    0x1027(%rip),%rax
mov    %rax,-0x60(%rbp)
lea    0x1051(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    -0x58(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x68(%rbp),%rdx
call   1030 <isInterleave@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0x1047(%rip),%r15
lea    0x103e(%rip),%r14
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <isInterleave@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
lea    0x1080(%rip),%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
call   1030 <isInterleave@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
lea    0xff6(%rip),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <isInterleave@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
lea    0xe67(%rip),%rbx
lea    0xe66(%rip),%r14
lea    0xe65(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <isInterleave@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
lea    0xe50(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <isInterleave@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
lea    0xe3c(%rip),%rdi
lea    0xe71(%rip),%rsi
lea    0xea5(%rip),%rdx
call   1030 <isInterleave@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
lea    0xf01(%rip),%rdi
lea    0xf5f(%rip),%rsi
lea    0xfbd(%rip),%rdx
call   1030 <isInterleave@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
lea    0x106d(%rip),%rdi
lea    0x109f(%rip),%rsi
lea    0x10cd(%rip),%rdx
call   1030 <isInterleave@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"aabcc\00"
@.str.1 = [6 x i8] c"dbbca\00"
@.str.2 = [11 x i8] c"aadbbcbcac\00"
@.str.3 = [11 x i8] c"aadbbbaccc\00"
@.str.4 = [60 x i8] c"abbbbbbcabbacaacccababaabcccabcacbcaabbbacccaaaaaababbbacbb\00"
@.str.5 = [59 x i8] c"ccaacabbacaccacababbbbabbcacccacccccaabaababacbbacabbbbabc\00"
@.str.6 = [118 x i8] c"cacbabbacbbbabcbaacbbaccacaacaacccabababbbababcccbabcabbaccabcccacccaabbcbcaccccaaaaabaaaaababbbbacbbabacbbacabbbbabc\00"
@.str.7 = [3 x i8] c"aa\00"
@.str.8 = [1 x i8] zeroinitializer
@.str.9 = [3 x i8] c"ab\00"
@.str.10 = [5 x i8] c"abaa\00"
@.str.11 = [101 x i8] c"bbbbbabbbbabaababaaaabbababbaaabbabbaaabaaaaababbbababbbbbabbbbababbabaabababbbaabababababbbaaababaa\00"
@.str.12 = [101 x i8] c"babaaaabbababbbabbbbaabaabbaabbbbaabaaabaababaaaabaaabbaaabaaaabaabaabbbbbbbbbbbabaaabbababbabbabaab\00"
@.str.13 = [201 x i8] c"babbbabbbaaabbababbbbababaabbabaabaaabbbbabbbaaabbbaaaaabbbbaabbaaabababbaaaaaabababbababaababbababbbababbbbaaaabaabbabbaaaaabbabbaaaabbbaabaaabaababaababbaaabbbbbabbbbaabbabaabbbbabaaabbababbabbabbab\00"
@.str.14 = [57 x i8] c"cbcccbabbccbbcccbbbcabbbabcababbbbbbaccaccbabbaacbaabbbc\00"
@.str.15 = [53 x i8] c"abcbbcaababccacbaaaccbabaabbaaabcbababbcccbbabbbcbbb\00"
@.str.16 = [109 x i8] c"abcbcccbacbbbbccbcbcacacbbbbacabbbabbcacbcaabcbaaacbcbbbabbbaacacbbaaaabccbcbaabbbaaabbcccbcbabababbbcbbbcbb\00"
define i32 @main() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8** %3
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8** %4
store i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.4, i64 0, i64 0), i8** %5
store i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.5, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([118 x i8], [118 x i8]* @.str.6, i64 0, i64 0), i8** %7
%14 = call i32 @isInterleave(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%15 = icmp eq i32 %14, 1
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = call i32 @isInterleave(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%19 = icmp eq i32 %18, 1
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
%22 = call i32 @isInterleave(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%23 = icmp eq i32 %22, 1
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
%26 = call i32 @isInterleave(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%27 = icmp eq i32 %26, 1
%28 = zext i1 %27 to i32
%29 = call i32 @assert(i32 %28)
%30 = call i32 @isInterleave(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%31 = icmp eq i32 %30, 0
%32 = zext i1 %31 to i32
%33 = call i32 @assert(i32 %32)
%34 = load i8*, i8** %5
%35 = load i8*, i8** %6
%36 = load i8*, i8** %7
%37 = call i32 @isInterleave(i8* %34, i8* %35, i8* %36)
%38 = icmp eq i32 %37, 1
%39 = zext i1 %38 to i32
%40 = call i32 @assert(i32 %39)
store i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str.11, i64 0, i64 0), i8** %8
store i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str.12, i64 0, i64 0), i8** %9
store i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str.13, i64 0, i64 0), i8** %10
%41 = load i8*, i8** %8
%42 = load i8*, i8** %9
%43 = load i8*, i8** %10
%44 = call i32 @isInterleave(i8* %41, i8* %42, i8* %43)
%45 = icmp eq i32 %44, 0
%46 = zext i1 %45 to i32
%47 = call i32 @assert(i32 %46)
store i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.14, i64 0, i64 0), i8** %11
store i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.15, i64 0, i64 0), i8** %12
store i8* getelementptr inbounds ([109 x i8], [109 x i8]* @.str.16, i64 0, i64 0), i8** %13
%48 = load i8*, i8** %11
%49 = load i8*, i8** %12
%50 = load i8*, i8** %13
%51 = call i32 @isInterleave(i8* %48, i8* %49, i8* %50)
%52 = icmp eq i32 %51, 1
%53 = zext i1 %52 to i32
%54 = call i32 @assert(i32 %53)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"aabcc\00"
@.str.1 = [6 x i8] c"dbbca\00"
@.str.2 = [11 x i8] c"aadbbcbcac\00"
@.str.3 = [11 x i8] c"aadbbbaccc\00"
@.str.4 = [60 x i8] c"abbbbbbcabbacaacccababaabcccabcacbcaabbbacccaaaaaababbbacbb\00"
@.str.5 = [59 x i8] c"ccaacabbacaccacababbbbabbcacccacccccaabaababacbbacabbbbabc\00"
@.str.6 = [118 x i8] c"cacbabbacbbbabcbaacbbaccacaacaacccabababbbababcccbabcabbaccabcccacccaabbcbcaccccaaaaabaaaaababbbbacbbabacbbacabbbbabc\00"
@.str.7 = [3 x i8] c"aa\00"
@.str.8 = [1 x i8] zeroinitializer
@.str.9 = [3 x i8] c"ab\00"
@.str.10 = [5 x i8] c"abaa\00"
@.str.11 = [101 x i8] c"bbbbbabbbbabaababaaaabbababbaaabbabbaaabaaaaababbbababbbbbabbbbababbabaabababbbaabababababbbaaababaa\00"
@.str.12 = [101 x i8] c"babaaaabbababbbabbbbaabaabbaabbbbaabaaabaababaaaabaaabbaaabaaaabaabaabbbbbbbbbbbabaaabbababbabbabaab\00"
@.str.13 = [201 x i8] c"babbbabbbaaabbababbbbababaabbabaabaaabbbbabbbaaabbbaaaaabbbbaabbaaabababbaaaaaabababbababaababbababbbababbbbaaaabaabbabbaaaaabbabbaaaabbbaabaaabaababaababbaaabbbbbabbbbaabbabaabbbbabaaabbababbabbabbab\00"
@.str.14 = [57 x i8] c"cbcccbabbccbbcccbbbcabbbabcababbbbbbaccaccbabbaacbaabbbc\00"
@.str.15 = [53 x i8] c"abcbbcaababccacbaaaccbabaabbaaabcbababbcccbbabbbcbbb\00"
@.str.16 = [109 x i8] c"abcbcccbacbbbbccbcbcacacbbbbacabbbabbcacbcaabcbaaacbcbbbabbbaacacbbaaaabccbcbaabbbaaabbcccbcbabababbbcbbbcbb\00"
define i32 @main() {
%1 = tail call i32 @isInterleave(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @isInterleave(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @isInterleave(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%10 = icmp eq i32 %9, 1
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 @isInterleave(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%14 = icmp eq i32 %13, 1
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
%17 = tail call i32 @isInterleave(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
%19 = zext i1 %18 to i32
%20 = tail call i32 @assert(i32 %19)
%21 = tail call i32 @isInterleave(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([118 x i8], [118 x i8]* @.str.6, i64 0, i64 0))
%22 = icmp eq i32 %21, 1
%23 = zext i1 %22 to i32
%24 = tail call i32 @assert(i32 %23)
%25 = tail call i32 @isInterleave(i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str.13, i64 0, i64 0))
%26 = icmp eq i32 %25, 0
%27 = zext i1 %26 to i32
%28 = tail call i32 @assert(i32 %27)
%29 = tail call i32 @isInterleave(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([109 x i8], [109 x i8]* @.str.16, i64 0, i64 0))
%30 = icmp eq i32 %29, 1
%31 = zext i1 %30 to i32
%32 = tail call i32 @assert(i32 %31)
ret i32 0
}