#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*/ print_report();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_parser(char *, char *);
int main(void) {
  printf("\n==== TML Tokenizer Test Suite ====\n\n");
  test_parser("a b c", "a b c  ||EOF");
  test_parser("\\[", "[  ||EOF");
  test_parser("\\]", "]  ||EOF");
  test_parser("\\|", "|  ||EOF");
  test_parser("[ [a|] || this is a comment\n b c |\n 1 2 3 ]",
              "[[a |]b c |1 2 3 ] ||EOF");
  test_parser("[|[|[|[|[|!@#]]]]]", "[|[|[|[|[|!@# ]]]]] ||EOF");
  test_parser("[|right\\[ stuff]", "[|right[ stuff ] ||EOF");
  test_parser("[left stuff|]", "[left stuff |] ||EOF");
  test_parser("[a b c|1 2 3]", "[a b c |1 2 3 ] ||EOF");
  test_parser("[[", "[[ ||EOF");
  test_parser("[hello", "[hello  ||EOF");
  test_parser("\\\\", "\\  ||EOF");
  test_parser("\\", "  ||EOF");
  test_parser("[  ]", "[] ||EOF");
  print_report();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    0xed4(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xed4(%rip),%rdi
lea    0xed0(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xecd(%rip),%rdi
lea    0xec9(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xec6(%rip),%rdi
lea    0xec2(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xebf(%rip),%rdi
lea    0xee4(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xef1(%rip),%rdi
lea    0xefd(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xf0b(%rip),%rdi
lea    0xf15(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xf20(%rip),%rdi
lea    0xf27(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xf30(%rip),%rdi
lea    0xf37(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xf41(%rip),%rdi
lea    0xf3d(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xf3a(%rip),%rdi
lea    0xf3a(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xf3c(%rip),%rdi
lea    0xf38(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xf2a(%rip),%rdi
lea    0xe00(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xf22(%rip),%rdi
lea    0xf20(%rip),%rsi
call   1050 <test_parser@plt>
mov    $0x0,%al
call   1030 <print_report@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x101b(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0xebb(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xebc(%rip),%rdi
lea    0xeb8(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xeb5(%rip),%rdi
lea    0xeb1(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xeae(%rip),%rdi
lea    0xeaa(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xea7(%rip),%rdi
lea    0xecc(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xed9(%rip),%rdi
lea    0xee5(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xef3(%rip),%rdi
lea    0xefd(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xf08(%rip),%rdi
lea    0xf0f(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xf18(%rip),%rdi
lea    0xf1f(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xf29(%rip),%rdi
lea    0xf25(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xf22(%rip),%rdi
lea    0xf22(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xf24(%rip),%rdi
lea    0xf20(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xf12(%rip),%rdi
lea    0xde8(%rip),%rsi
call   1050 <test_parser@plt>
lea    0xf0a(%rip),%rdi
lea    0xf08(%rip),%rsi
call   1050 <test_parser@plt>
xor    %eax,%eax
call   1040 <print_report@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"\0A==== TML Tokenizer Test Suite ====\0A\0A\00"
@.str.1 = [6 x i8] c"a b c\00"
@.str.2 = [13 x i8] c"a b c ||EOF\00"
@.str.3 = [3 x i8] c"\\[\00"
@.str.4 = [9 x i8] c"[ ||EOF\00"
@.str.5 = [3 x i8] c"\\]\00"
@.str.6 = [9 x i8] c"] ||EOF\00"
@.str.7 = [3 x i8] c"\\|\00"
@.str.8 = [9 x i8] c"| ||EOF\00"
@.str.9 = [44 x i8] c"[ [a|] || this is a comment\0A b c |\0A 1 2 3 ]\00"
@.str.10 = [25 x i8] c"[[a |]b c |1 2 3 ] ||EOF\00"
@.str.11 = [19 x i8] c"[|[|[|[|[|!@#]]]]]\00"
@.str.12 = [26 x i8] c"[|[|[|[|[|!@# ]]]]] ||EOF\00"
@.str.13 = [17 x i8] c"[|right\\[ stuff]\00"
@.str.14 = [23 x i8] c"[|right[ stuff ] ||EOF\00"
@.str.15 = [14 x i8] c"[left stuff|]\00"
@.str.16 = [21 x i8] c"[left stuff |] ||EOF\00"
@.str.17 = [14 x i8] c"[a b c|1 2 3]\00"
@.str.18 = [22 x i8] c"[a b c |1 2 3 ] ||EOF\00"
@.str.19 = [3 x i8] c"[[\00"
@.str.20 = [9 x i8] c"[[ ||EOF\00"
@.str.21 = [7 x i8] c"[hello\00"
@.str.22 = [14 x i8] c"[hello ||EOF\00"
@.str.23 = [3 x i8] c"\\\\\00"
@.str.24 = [9 x i8] c"\\ ||EOF\00"
@.str.25 = [2 x i8] c"\\\00"
@.str.26 = [8 x i8] c" ||EOF\00"
@.str.27 = [5 x i8] c"[ ]\00"
@.str.28 = [9 x i8] c"[] ||EOF\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @test_parser(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @test_parser(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%5 = call i32 @test_parser(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%6 = call i32 @test_parser(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%7 = call i32 @test_parser(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
%8 = call i32 @test_parser(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0))
%9 = call i32 @test_parser(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0))
%10 = call i32 @test_parser(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i64 0, i64 0))
%11 = call i32 @test_parser(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.18, i64 0, i64 0))
%12 = call i32 @test_parser(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
%13 = call i32 @test_parser(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.22, i64 0, i64 0))
%14 = call i32 @test_parser(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.24, i64 0, i64 0))
%15 = call i32 @test_parser(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.26, i64 0, i64 0))
%16 = call i32 @test_parser(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.27, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.28, i64 0, i64 0))
%17 = call i32 (...) @print_report()
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"a b c\00"
@.str.2 = [13 x i8] c"a b c ||EOF\00"
@.str.3 = [3 x i8] c"\\[\00"
@.str.4 = [9 x i8] c"[ ||EOF\00"
@.str.5 = [3 x i8] c"\\]\00"
@.str.6 = [9 x i8] c"] ||EOF\00"
@.str.7 = [3 x i8] c"\\|\00"
@.str.8 = [9 x i8] c"| ||EOF\00"
@.str.9 = [44 x i8] c"[ [a|] || this is a comment\0A b c |\0A 1 2 3 ]\00"
@.str.10 = [25 x i8] c"[[a |]b c |1 2 3 ] ||EOF\00"
@.str.11 = [19 x i8] c"[|[|[|[|[|!@#]]]]]\00"
@.str.12 = [26 x i8] c"[|[|[|[|[|!@# ]]]]] ||EOF\00"
@.str.13 = [17 x i8] c"[|right\\[ stuff]\00"
@.str.14 = [23 x i8] c"[|right[ stuff ] ||EOF\00"
@.str.15 = [14 x i8] c"[left stuff|]\00"
@.str.16 = [21 x i8] c"[left stuff |] ||EOF\00"
@.str.17 = [14 x i8] c"[a b c|1 2 3]\00"
@.str.18 = [22 x i8] c"[a b c |1 2 3 ] ||EOF\00"
@.str.19 = [3 x i8] c"[[\00"
@.str.20 = [9 x i8] c"[[ ||EOF\00"
@.str.21 = [7 x i8] c"[hello\00"
@.str.22 = [14 x i8] c"[hello ||EOF\00"
@.str.23 = [3 x i8] c"\\\\\00"
@.str.24 = [9 x i8] c"\\ ||EOF\00"
@.str.25 = [2 x i8] c"\\\00"
@.str.26 = [8 x i8] c" ||EOF\00"
@.str.27 = [5 x i8] c"[ ]\00"
@.str.28 = [9 x i8] c"[] ||EOF\00"
@str = [37 x i8] c"\0A==== TML Tokenizer Test Suite ====\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @test_parser(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @test_parser(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%4 = tail call i32 @test_parser(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%5 = tail call i32 @test_parser(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%6 = tail call i32 @test_parser(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
%7 = tail call i32 @test_parser(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0))
%8 = tail call i32 @test_parser(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0))
%9 = tail call i32 @test_parser(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i64 0, i64 0))
%10 = tail call i32 @test_parser(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.18, i64 0, i64 0))
%11 = tail call i32 @test_parser(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
%12 = tail call i32 @test_parser(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.22, i64 0, i64 0))
%13 = tail call i32 @test_parser(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.24, i64 0, i64 0))
%14 = tail call i32 @test_parser(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.26, i64 0, i64 0))
%15 = tail call i32 @test_parser(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.27, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.28, i64 0, i64 0))
%16 = tail call i32 (...) @print_report()
ret i32 0
}