#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*/ _check_substr_match();
int _match(char *, char *);
int _matchstr(char *, char *, char *);
int _matchstr_all(char *, char *);
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ err_init(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ memcpy(char *, char *, int);
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ xfree(char *);
char *xmalloc(int);
int main(int argc, char *argv[]) {
  char *s;
  err_init("tregex");
  assert(_match("foo", "foo"));
  assert(_match("foo", "fooxxx"));
  assert(_match("foo", "xxxfoo"));
  assert(!_match("foo", "bar"));
  _check_substr_match();
  assert(!_match("foo\\r\\n", "foo\\r\\n"));
  assert(_match("foo\\r\\n", "foo\r\n"));
  s = xmalloc((64 * 1024 * 1024));
  memset(s, 'a', (64 * 1024 * 1024) - 1);
  memcpy(s + 42, "MAGIC", 5);
  memcpy(s + 32 * 1024 * 1024, "WONDERFUL", 9);
  memcpy(s + 63 * 1024 * 1024, "COOKIE", 6);
  s[(64 * 1024 * 1024) - 1] = '\0';
  assert(_match("MAGIC", s));
  assert(_match("WONDERFUL", s));
  assert(_match("COOKIE", s));
  assert(!_match("CHOCOLATE", s));
  xfree(s);
  assert(!_match("foo$", "foo"));
  assert(!_match("foo$", "foo\n"));
  assert(!_match("foo\n", "foo"));
  assert(!_match("foo\n", "bar\nfoo"));
  assert(_match("foo\n", "barfoo\n"));
  assert(_matchstr("foo", "abfoocdfoo", "abfoo"));
  assert(_matchstr_all(".*foo", "abfoocdfoo"));
  assert(_matchstr_all("bar[0-9[:space:]]*foo", "bar  42  foo"));
  assert(_matchstr_all("([0-9])*[^\r\n]*(ON|OFF)\r\n",
                       "     2- Outlet 2                 ON\r\n"));
  assert(_matchstr_all("([0-9])*[^\r\n]*(ON|OFF)\r\n",
                       "     9-                          ON\r\n"));
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe33(%rip),%rdi
call   1070 <err_init@plt>
lea    0xe78(%rip),%rsi
mov    %rsi,%rdi
call   10d0 <_match@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xe62(%rip),%rdi
lea    0xe11(%rip),%rsi
call   10d0 <_match@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xe48(%rip),%rdi
lea    0xdfe(%rip),%rsi
call   10d0 <_match@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xe2e(%rip),%rdi
lea    0xdeb(%rip),%rsi
call   10d0 <_match@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
mov    $0x0,%al
call   10c0 <_check_substr_match@plt>
lea    0xdca(%rip),%rsi
mov    %rsi,%rdi
call   10d0 <_match@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    0xda9(%rip),%rdi
lea    0xdaa(%rip),%rsi
call   10d0 <_match@plt>
mov    %eax,%edi
call   1090 <assert@plt>
mov    $0x4000000,%edi
call   1080 <xmalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x61,%esi
mov    $0x3ffffff,%edx
call   1060 <memset@plt>
mov    -0x18(%rbp),%rdi
add    $0x2a,%rdi
lea    0xd74(%rip),%rsi
mov    $0x5,%edx
call   10a0 <memcpy@plt>
mov    -0x18(%rbp),%rdi
add    $0x2000000,%rdi
lea    0xd5e(%rip),%rsi
mov    $0x9,%edx
call   10a0 <memcpy@plt>
mov    -0x18(%rbp),%rdi
add    $0x3f00000,%rdi
lea    0xd4c(%rip),%rsi
mov    $0x6,%edx
call   10a0 <memcpy@plt>
mov    -0x18(%rbp),%rax
movb   $0x0,0x3ffffff(%rax)
mov    -0x18(%rbp),%rsi
lea    0xd1c(%rip),%rdi
call   10d0 <_match@plt>
mov    %eax,%edi
call   1090 <assert@plt>
mov    -0x18(%rbp),%rsi
lea    0xd0b(%rip),%rdi
call   10d0 <_match@plt>
mov    %eax,%edi
call   1090 <assert@plt>
mov    -0x18(%rbp),%rsi
lea    0xcfe(%rip),%rdi
call   10d0 <_match@plt>
mov    %eax,%edi
call   1090 <assert@plt>
mov    -0x18(%rbp),%rsi
lea    0xcee(%rip),%rdi
call   10d0 <_match@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
mov    -0x18(%rbp),%rdi
call   1040 <xfree@plt>
lea    0xcd1(%rip),%rdi
lea    0xcd3(%rip),%rsi
call   10d0 <_match@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    0xcac(%rip),%rdi
lea    0xcb5(%rip),%rsi
call   10d0 <_match@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    0xc97(%rip),%rdi
lea    0xc89(%rip),%rsi
call   10d0 <_match@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    0xc72(%rip),%rdi
lea    0xc60(%rip),%rsi
call   10d0 <_match@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    0xc4d(%rip),%rdi
lea    0xc43(%rip),%rsi
call   10d0 <_match@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xc2c(%rip),%rdi
lea    0xc31(%rip),%rsi
lea    0xc35(%rip),%rdx
call   1030 <_matchstr@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xc28(%rip),%rdi
lea    0xc10(%rip),%rsi
call   1050 <_matchstr_all@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xc14(%rip),%rdi
lea    0xc23(%rip),%rsi
call   1050 <_matchstr_all@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xc1d(%rip),%rdi
lea    0xc2f(%rip),%rsi
call   1050 <_matchstr_all@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xc03(%rip),%rdi
lea    0xc3b(%rip),%rsi
call   1050 <_matchstr_all@plt>
mov    %eax,%edi
call   1090 <assert@plt>
xor    %edi,%edi
call   10b0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
lea    0xe40(%rip),%rdi
call   1070 <err_init@plt>
lea    0xe85(%rip),%r14
mov    %r14,%rdi
mov    %r14,%rsi
call   10d0 <_match@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xe22(%rip),%rsi
mov    %r14,%rdi
call   10d0 <_match@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xe13(%rip),%rsi
mov    %r14,%rdi
call   10d0 <_match@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xe04(%rip),%rsi
mov    %r14,%rdi
call   10d0 <_match@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1090 <assert@plt>
xor    %eax,%eax
call   10c0 <_check_substr_match@plt>
lea    0xde5(%rip),%rbx
mov    %rbx,%rdi
mov    %rbx,%rsi
call   10d0 <_match@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1090 <assert@plt>
lea    0xdce(%rip),%rsi
mov    %rbx,%rdi
call   10d0 <_match@plt>
mov    %eax,%edi
call   1090 <assert@plt>
mov    $0x4000000,%edi
call   1080 <xmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x61,%esi
mov    $0x3ffffff,%edx
call   1060 <memset@plt>
lea    0x2a(%rbx),%rdi
lea    0xd9b(%rip),%r15
mov    %r15,%rsi
mov    $0x5,%edx
call   10a0 <memcpy@plt>
lea    0x2000000(%rbx),%rdi
lea    0xd86(%rip),%r12
mov    %r12,%rsi
mov    $0x9,%edx
call   10a0 <memcpy@plt>
lea    0x3f00000(%rbx),%rdi
lea    0xd75(%rip),%r13
mov    %r13,%rsi
mov    $0x6,%edx
call   10a0 <memcpy@plt>
movb   $0x0,0x3ffffff(%rbx)
mov    %r15,%rdi
mov    %rbx,%rsi
call   10d0 <_match@plt>
mov    %eax,%edi
call   1090 <assert@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   10d0 <_match@plt>
mov    %eax,%edi
call   1090 <assert@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
call   10d0 <_match@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xd2b(%rip),%rdi
mov    %rbx,%rsi
call   10d0 <_match@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1090 <assert@plt>
mov    %rbx,%rdi
call   1040 <xfree@plt>
lea    0xd11(%rip),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   10d0 <_match@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1090 <assert@plt>
lea    0xd02(%rip),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   10d0 <_match@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1090 <assert@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   10d0 <_match@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1090 <assert@plt>
lea    0xcc0(%rip),%rsi
mov    %r15,%rdi
call   10d0 <_match@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1090 <assert@plt>
lea    0xcac(%rip),%rsi
mov    %r15,%rdi
call   10d0 <_match@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xc9e(%rip),%rbx
lea    0xca2(%rip),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <_matchstr@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xc8f(%rip),%rdi
mov    %rbx,%rsi
call   1050 <_matchstr_all@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xc7f(%rip),%rdi
lea    0xc8e(%rip),%rsi
call   1050 <_matchstr_all@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xc88(%rip),%rbx
lea    0xc9a(%rip),%rsi
mov    %rbx,%rdi
call   1050 <_matchstr_all@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xcaa(%rip),%rsi
mov    %rbx,%rdi
call   1050 <_matchstr_all@plt>
mov    %eax,%edi
call   1090 <assert@plt>
xor    %edi,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"tregex\00"
@.str.1 = [4 x i8] c"foo\00"
@.str.2 = [7 x i8] c"fooxxx\00"
@.str.3 = [7 x i8] c"xxxfoo\00"
@.str.4 = [4 x i8] c"bar\00"
@.str.5 = [8 x i8] c"foo\\r\\n\00"
@.str.6 = [6 x i8] c"foo\0D\0A\00"
@.str.7 = [6 x i8] c"MAGIC\00"
@.str.8 = [10 x i8] c"WONDERFUL\00"
@.str.9 = [7 x i8] c"COOKIE\00"
@.str.10 = [10 x i8] c"CHOCOLATE\00"
@.str.11 = [5 x i8] c"foo$\00"
@.str.12 = [5 x i8] c"foo\0A\00"
@.str.13 = [8 x i8] c"bar\0Afoo\00"
@.str.14 = [8 x i8] c"barfoo\0A\00"
@.str.15 = [11 x i8] c"abfoocdfoo\00"
@.str.16 = [6 x i8] c"abfoo\00"
@.str.17 = [6 x i8] c".*foo\00"
@.str.18 = [22 x i8] c"bar[0-9[:space:]]*foo\00"
@.str.19 = [13 x i8] c"bar 42 foo\00"
@.str.20 = [25 x i8] c"([0-9])*[^\0D\0A]*(ON|OFF)\0D\0A\00"
@.str.21 = [38 x i8] c" 2- Outlet 2 ON\0D\0A\00"
@.str.22 = [38 x i8] c" 9- ON\0D\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @err_init(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @_match(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @assert(i32 %8)
%10 = call i32 @_match(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @assert(i32 %10)
%12 = call i32 @_match(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 @assert(i32 %12)
%14 = call i32 @_match(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%15 = icmp ne i32 %14, 0
%16 = xor i1 %15, true
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = call i32 (...) @_check_substr_match()
%20 = call i32 @_match(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%21 = icmp ne i32 %20, 0
%22 = xor i1 %21, true
%23 = zext i1 %22 to i32
%24 = call i32 @assert(i32 %23)
%25 = call i32 @_match(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%26 = call i32 @assert(i32 %25)
%27 = call i8* @xmalloc(i32 67108864)
store i8* %27, i8** %6
%28 = load i8*, i8** %6
%29 = call i32 @memset(i8* %28, i8 signext 97, i32 67108863)
%30 = load i8*, i8** %6
%31 = getelementptr inbounds i8, i8* %30, i64 42
%32 = call i32 @memcpy(i8* %31, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 5)
%33 = load i8*, i8** %6
%34 = getelementptr inbounds i8, i8* %33, i64 33554432
%35 = call i32 @memcpy(i8* %34, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i32 9)
%36 = load i8*, i8** %6
%37 = getelementptr inbounds i8, i8* %36, i64 66060288
%38 = call i32 @memcpy(i8* %37, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i32 6)
%39 = load i8*, i8** %6
%40 = getelementptr inbounds i8, i8* %39, i64 67108863
store i8 0, i8* %40
%41 = load i8*, i8** %6
%42 = call i32 @_match(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* %41)
%43 = call i32 @assert(i32 %42)
%44 = load i8*, i8** %6
%45 = call i32 @_match(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i8* %44)
%46 = call i32 @assert(i32 %45)
%47 = load i8*, i8** %6
%48 = call i32 @_match(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* %47)
%49 = call i32 @assert(i32 %48)
%50 = load i8*, i8** %6
%51 = call i32 @_match(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i8* %50)
%52 = icmp ne i32 %51, 0
%53 = xor i1 %52, true
%54 = zext i1 %53 to i32
%55 = call i32 @assert(i32 %54)
%56 = load i8*, i8** %6
%57 = call i32 @xfree(i8* %56)
%58 = call i32 @_match(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%59 = icmp ne i32 %58, 0
%60 = xor i1 %59, true
%61 = zext i1 %60 to i32
%62 = call i32 @assert(i32 %61)
%63 = call i32 @_match(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0))
%64 = icmp ne i32 %63, 0
%65 = xor i1 %64, true
%66 = zext i1 %65 to i32
%67 = call i32 @assert(i32 %66)
%68 = call i32 @_match(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%69 = icmp ne i32 %68, 0
%70 = xor i1 %69, true
%71 = zext i1 %70 to i32
%72 = call i32 @assert(i32 %71)
%73 = call i32 @_match(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
%74 = icmp ne i32 %73, 0
%75 = xor i1 %74, true
%76 = zext i1 %75 to i32
%77 = call i32 @assert(i32 %76)
%78 = call i32 @_match(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
%79 = call i32 @assert(i32 %78)
%80 = call i32 @_matchstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0))
%81 = call i32 @assert(i32 %80)
%82 = call i32 @_matchstr_all(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
%83 = call i32 @assert(i32 %82)
%84 = call i32 @_matchstr_all(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0))
%85 = call i32 @assert(i32 %84)
%86 = call i32 @_matchstr_all(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.21, i64 0, i64 0))
%87 = call i32 @assert(i32 %86)
%88 = call i32 @_matchstr_all(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.22, i64 0, i64 0))
%89 = call i32 @assert(i32 %88)
%90 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [7 x i8] c"tregex\00"
@.str.1 = [4 x i8] c"foo\00"
@.str.2 = [7 x i8] c"fooxxx\00"
@.str.3 = [7 x i8] c"xxxfoo\00"
@.str.4 = [4 x i8] c"bar\00"
@.str.5 = [8 x i8] c"foo\\r\\n\00"
@.str.6 = [6 x i8] c"foo\0D\0A\00"
@.str.7 = [6 x i8] c"MAGIC\00"
@.str.8 = [10 x i8] c"WONDERFUL\00"
@.str.9 = [7 x i8] c"COOKIE\00"
@.str.10 = [10 x i8] c"CHOCOLATE\00"
@.str.11 = [5 x i8] c"foo$\00"
@.str.12 = [5 x i8] c"foo\0A\00"
@.str.13 = [8 x i8] c"bar\0Afoo\00"
@.str.14 = [8 x i8] c"barfoo\0A\00"
@.str.15 = [11 x i8] c"abfoocdfoo\00"
@.str.16 = [6 x i8] c"abfoo\00"
@.str.17 = [6 x i8] c".*foo\00"
@.str.18 = [22 x i8] c"bar[0-9[:space:]]*foo\00"
@.str.19 = [13 x i8] c"bar 42 foo\00"
@.str.20 = [25 x i8] c"([0-9])*[^\0D\0A]*(ON|OFF)\0D\0A\00"
@.str.21 = [38 x i8] c" 2- Outlet 2 ON\0D\0A\00"
@.str.22 = [38 x i8] c" 9- ON\0D\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @err_init(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @_match(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 @_match(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 @assert(i32 %6)
%8 = tail call i32 @_match(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%9 = tail call i32 @assert(i32 %8)
%10 = tail call i32 @_match(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
%14 = tail call i32 (...) @_check_substr_match()
%15 = tail call i32 @_match(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%16 = icmp eq i32 %15, 0
%17 = zext i1 %16 to i32
%18 = tail call i32 @assert(i32 %17)
%19 = tail call i32 @_match(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%20 = tail call i32 @assert(i32 %19)
%21 = tail call i8* @xmalloc(i32 67108864)
%22 = tail call i32 @memset(i8* %21, i8 signext 97, i32 67108863)
%23 = getelementptr inbounds i8, i8* %21, i64 42
%24 = tail call i32 @memcpy(i8* %23, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 5)
%25 = getelementptr inbounds i8, i8* %21, i64 33554432
%26 = tail call i32 @memcpy(i8* %25, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i32 9)
%27 = getelementptr inbounds i8, i8* %21, i64 66060288
%28 = tail call i32 @memcpy(i8* %27, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i32 6)
%29 = getelementptr inbounds i8, i8* %21, i64 67108863
store i8 0, i8* %29
%30 = tail call i32 @_match(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* %21)
%31 = tail call i32 @assert(i32 %30)
%32 = tail call i32 @_match(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i8* %21)
%33 = tail call i32 @assert(i32 %32)
%34 = tail call i32 @_match(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* %21)
%35 = tail call i32 @assert(i32 %34)
%36 = tail call i32 @_match(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i8* %21)
%37 = icmp eq i32 %36, 0
%38 = zext i1 %37 to i32
%39 = tail call i32 @assert(i32 %38)
%40 = tail call i32 @xfree(i8* %21)
%41 = tail call i32 @_match(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%42 = icmp eq i32 %41, 0
%43 = zext i1 %42 to i32
%44 = tail call i32 @assert(i32 %43)
%45 = tail call i32 @_match(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0))
%46 = icmp eq i32 %45, 0
%47 = zext i1 %46 to i32
%48 = tail call i32 @assert(i32 %47)
%49 = tail call i32 @_match(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%50 = icmp eq i32 %49, 0
%51 = zext i1 %50 to i32
%52 = tail call i32 @assert(i32 %51)
%53 = tail call i32 @_match(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
%54 = icmp eq i32 %53, 0
%55 = zext i1 %54 to i32
%56 = tail call i32 @assert(i32 %55)
%57 = tail call i32 @_match(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
%58 = tail call i32 @assert(i32 %57)
%59 = tail call i32 @_matchstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0))
%60 = tail call i32 @assert(i32 %59)
%61 = tail call i32 @_matchstr_all(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
%62 = tail call i32 @assert(i32 %61)
%63 = tail call i32 @_matchstr_all(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0))
%64 = tail call i32 @assert(i32 %63)
%65 = tail call i32 @_matchstr_all(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.21, i64 0, i64 0))
%66 = tail call i32 @assert(i32 %65)
%67 = tail call i32 @_matchstr_all(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.22, i64 0, i64 0))
%68 = tail call i32 @assert(i32 %67)
%69 = tail call i32 @exit(i32 0)
unreachable
}