#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*/ checkResults(char *, char *, char *, int);
void testBracketsWithStrings() {
  checkResults("a test statement;",
               "1:0:BEGIN~EOF~\n"
               "1:1:BEGIN~;~\n"
               "1:1:STRING=a test statement\n"
               "1:17:END~;~\n"
               "1:17:END~EOF~\n",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/jasonxhill/okavangoc/refs/"
               "heads/master/test/BracketStreamTest.c",
               292);
  checkResults("test statement A; test statement B;",
               "1:0:BEGIN~EOF~\n"
               "1:1:BEGIN~;~\n"
               "1:1:STRING=test statement A\n"
               "1:17:END~;~\n"
               "1:18:BEGIN~;~\n"
               "1:18:STRING= test statement B\n"
               "1:35:END~;~\n"
               "1:35:END~EOF~\n",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/jasonxhill/okavangoc/refs/"
               "heads/master/test/BracketStreamTest.c",
               299);
  checkResults("{a test statement;};",
               "1:0:BEGIN~EOF~\n"
               "1:1:BEGIN~;~\n"
               "1:1:BEGIN~{~\n"
               "1:2:BEGIN~;~\n"
               "1:2:STRING=a test statement\n"
               "1:18:END~;~\n"
               "1:19:END~{~\n"
               "1:20:END~;~\n"
               "1:20:END~EOF~\n",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/jasonxhill/okavangoc/refs/"
               "heads/master/test/BracketStreamTest.c",
               309);
  checkResults("{a test statement};",
               "1:0:BEGIN~EOF~\n"
               "1:1:BEGIN~;~\n"
               "1:1:BEGIN~{~\n"
               "1:2:BEGIN~;~\n"
               "1:2:STRING=a test statement\n"
               "1:18:END_MISSING~;~\n"
               "1:18:END~{~\n"
               "1:19:END~;~\n"
               "1:19:END~EOF~\n",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/jasonxhill/okavangoc/refs/"
               "heads/master/test/BracketStreamTest.c",
               320);
  checkResults("{test statement A; test statement B;};",
               "1:0:BEGIN~EOF~\n"
               "1:1:BEGIN~;~\n"
               "1:1:BEGIN~{~\n"
               "1:2:BEGIN~;~\n"
               "1:2:STRING=test statement A\n"
               "1:18:END~;~\n"
               "1:19:BEGIN~;~\n"
               "1:19:STRING= test statement B\n"
               "1:36:END~;~\n"
               "1:37:END~{~\n"
               "1:38:END~;~\n"
               "1:38:END~EOF~\n",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/jasonxhill/okavangoc/refs/"
               "heads/master/test/BracketStreamTest.c",
               331);
  checkResults("{ };{ };",
               "1:0:BEGIN~EOF~\n"
               "1:1:BEGIN~;~\n"
               "1:1:BEGIN~{~\n"
               "1:2:BEGIN~;~\n"
               "1:2:STRING= \n"
               "1:3:END_MISSING~;~\n"
               "1:3:END~{~\n"
               "1:4:END~;~\n"
               "1:5:BEGIN~;~\n"
               "1:5:BEGIN~{~\n"
               "1:6:BEGIN~;~\n"
               "1:6:STRING= \n"
               "1:7:END_MISSING~;~\n"
               "1:7:END~{~\n"
               "1:8:END~;~\n"
               "1:8:END~EOF~\n",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/jasonxhill/okavangoc/refs/"
               "heads/master/test/BracketStreamTest.c",
               345);
  checkResults("a test {} statement;",
               "1:0:BEGIN~EOF~\n"
               "1:1:BEGIN~;~\n"
               "1:1:STRING=a test \n"
               "1:8:BEGIN~{~\n"
               "1:9:END~{~\n"
               "1:10:STRING= statement\n"
               "1:20:END~;~\n"
               "1:20:END~EOF~\n",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/jasonxhill/okavangoc/refs/"
               "heads/master/test/BracketStreamTest.c",
               363);
}


x86 assembly (clang, -O0):
<testBracketsWithStrings>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef0(%rip),%rsi
lea    0xf3c(%rip),%rdx
mov    $0x124,%ecx
call   1030 <checkResults@plt>
lea    0xfc5(%rip),%rdi
lea    0xfe2(%rip),%rsi
lea    0xf1d(%rip),%rdx
mov    $0x12b,%ecx
call   1030 <checkResults@plt>
lea    0x1055(%rip),%rdi
lea    0x1063(%rip),%rsi
lea    0xefe(%rip),%rdx
mov    $0x135,%ecx
call   1030 <checkResults@plt>
lea    0x10d0(%rip),%rdi
lea    0x10dd(%rip),%rsi
lea    0xedf(%rip),%rdx
mov    $0x140,%ecx
call   1030 <checkResults@plt>
lea    0x1152(%rip),%rdi
lea    0x1172(%rip),%rsi
lea    0xec0(%rip),%rdx
mov    $0x14b,%ecx
call   1030 <checkResults@plt>
lea    0x1217(%rip),%rdi
lea    0x1219(%rip),%rsi
lea    0xea1(%rip),%rdx
mov    $0x159,%ecx
call   1030 <checkResults@plt>
lea    0x12d8(%rip),%rdi
lea    0x12e6(%rip),%rsi
lea    0xe82(%rip),%rdx
mov    $0x16b,%ecx
call   1030 <checkResults@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testBracketsWithStrings>:
push   %rbx
lea    0xee8(%rip),%rdi
lea    0xef3(%rip),%rsi
lea    0xf3f(%rip),%rbx
mov    %rbx,%rdx
mov    $0x124,%ecx
call   1030 <checkResults@plt>
lea    0xfc5(%rip),%rdi
lea    0xfe2(%rip),%rsi
mov    %rbx,%rdx
mov    $0x12b,%ecx
call   1030 <checkResults@plt>
lea    0x1059(%rip),%rdi
lea    0x1067(%rip),%rsi
mov    %rbx,%rdx
mov    $0x135,%ecx
call   1030 <checkResults@plt>
lea    0x10d8(%rip),%rdi
lea    0x10e5(%rip),%rsi
mov    %rbx,%rdx
mov    $0x140,%ecx
call   1030 <checkResults@plt>
lea    0x115e(%rip),%rdi
lea    0x117e(%rip),%rsi
mov    %rbx,%rdx
mov    $0x14b,%ecx
call   1030 <checkResults@plt>
lea    0x1227(%rip),%rdi
lea    0x1229(%rip),%rsi
mov    %rbx,%rdx
mov    $0x159,%ecx
call   1030 <checkResults@plt>
lea    0x12ec(%rip),%rdi
lea    0x12fa(%rip),%rsi
mov    %rbx,%rdx
mov    $0x16b,%ecx
pop    %rbx
jmp    1030 <checkResults@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"a test statement;\00"
@.str.1 = [83 x i8] c"1:0:BEGIN~EOF~\0A1:1:BEGIN~;~\0A1:1:STRING=a test statement\0A1:17:END~;~\0A1:17:END~EOF~\0A\00"
@.str.2 = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jasonxhill/okavangoc/refs/heads/master/test/BracketStreamTest.c\00"
@.str.3 = [36 x i8] c"test statement A; test statement B;\00"
@.str.4 = [139 x i8] c"1:0:BEGIN~EOF~\0A1:1:BEGIN~;~\0A1:1:STRING=test statement A\0A1:17:END~;~\0A1:18:BEGIN~;~\0A1:18:STRING= test statement B\0A1:35:END~;~\0A1:35:END~EOF~\0A\00"
@.str.5 = [21 x i8] c"{a test statement;};\00"
@.str.6 = [133 x i8] c"1:0:BEGIN~EOF~\0A1:1:BEGIN~;~\0A1:1:BEGIN~{~\0A1:2:BEGIN~;~\0A1:2:STRING=a test statement\0A1:18:END~;~\0A1:19:END~{~\0A1:20:END~;~\0A1:20:END~EOF~\0A\00"
@.str.7 = [20 x i8] c"{a test statement};\00"
@.str.8 = [141 x i8] c"1:0:BEGIN~EOF~\0A1:1:BEGIN~;~\0A1:1:BEGIN~{~\0A1:2:BEGIN~;~\0A1:2:STRING=a test statement\0A1:18:END_MISSING~;~\0A1:18:END~{~\0A1:19:END~;~\0A1:19:END~EOF~\0A\00"
@.str.9 = [39 x i8] c"{test statement A; test statement B;};\00"
@.str.10 = [189 x i8] c"1:0:BEGIN~EOF~\0A1:1:BEGIN~;~\0A1:1:BEGIN~{~\0A1:2:BEGIN~;~\0A1:2:STRING=test statement A\0A1:18:END~;~\0A1:19:BEGIN~;~\0A1:19:STRING= test statement B\0A1:36:END~;~\0A1:37:END~{~\0A1:38:END~;~\0A1:38:END~EOF~\0A\00"
@.str.11 = [9 x i8] c"{ };{ };\00"
@.str.12 = [215 x i8] c"1:0:BEGIN~EOF~\0A1:1:BEGIN~;~\0A1:1:BEGIN~{~\0A1:2:BEGIN~;~\0A1:2:STRING= \0A1:3:END_MISSING~;~\0A1:3:END~{~\0A1:4:END~;~\0A1:5:BEGIN~;~\0A1:5:BEGIN~{~\0A1:6:BEGIN~;~\0A1:6:STRING= \0A1:7:END_MISSING~;~\0A1:7:END~{~\0A1:8:END~;~\0A1:8:END~EOF~\0A\00"
@.str.13 = [21 x i8] c"a test {} statement;\00"
@.str.14 = [121 x i8] c"1:0:BEGIN~EOF~\0A1:1:BEGIN~;~\0A1:1:STRING=a test \0A1:8:BEGIN~{~\0A1:9:END~{~\0A1:10:STRING= statement\0A1:20:END~;~\0A1:20:END~EOF~\0A\00"
define void @testBracketsWithStrings() {
%1 = call i32 @checkResults(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.2, i64 0, i64 0), i32 292)
%2 = call i32 @checkResults(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.2, i64 0, i64 0), i32 299)
%3 = call i32 @checkResults(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.2, i64 0, i64 0), i32 309)
%4 = call i32 @checkResults(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.2, i64 0, i64 0), i32 320)
%5 = call i32 @checkResults(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.2, i64 0, i64 0), i32 331)
%6 = call i32 @checkResults(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([215 x i8], [215 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.2, i64 0, i64 0), i32 345)
%7 = call i32 @checkResults(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([121 x i8], [121 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.2, i64 0, i64 0), i32 363)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"a test statement;\00"
@.str.1 = [83 x i8] c"1:0:BEGIN~EOF~\0A1:1:BEGIN~;~\0A1:1:STRING=a test statement\0A1:17:END~;~\0A1:17:END~EOF~\0A\00"
@.str.2 = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jasonxhill/okavangoc/refs/heads/master/test/BracketStreamTest.c\00"
@.str.3 = [36 x i8] c"test statement A; test statement B;\00"
@.str.4 = [139 x i8] c"1:0:BEGIN~EOF~\0A1:1:BEGIN~;~\0A1:1:STRING=test statement A\0A1:17:END~;~\0A1:18:BEGIN~;~\0A1:18:STRING= test statement B\0A1:35:END~;~\0A1:35:END~EOF~\0A\00"
@.str.5 = [21 x i8] c"{a test statement;};\00"
@.str.6 = [133 x i8] c"1:0:BEGIN~EOF~\0A1:1:BEGIN~;~\0A1:1:BEGIN~{~\0A1:2:BEGIN~;~\0A1:2:STRING=a test statement\0A1:18:END~;~\0A1:19:END~{~\0A1:20:END~;~\0A1:20:END~EOF~\0A\00"
@.str.7 = [20 x i8] c"{a test statement};\00"
@.str.8 = [141 x i8] c"1:0:BEGIN~EOF~\0A1:1:BEGIN~;~\0A1:1:BEGIN~{~\0A1:2:BEGIN~;~\0A1:2:STRING=a test statement\0A1:18:END_MISSING~;~\0A1:18:END~{~\0A1:19:END~;~\0A1:19:END~EOF~\0A\00"
@.str.9 = [39 x i8] c"{test statement A; test statement B;};\00"
@.str.10 = [189 x i8] c"1:0:BEGIN~EOF~\0A1:1:BEGIN~;~\0A1:1:BEGIN~{~\0A1:2:BEGIN~;~\0A1:2:STRING=test statement A\0A1:18:END~;~\0A1:19:BEGIN~;~\0A1:19:STRING= test statement B\0A1:36:END~;~\0A1:37:END~{~\0A1:38:END~;~\0A1:38:END~EOF~\0A\00"
@.str.11 = [9 x i8] c"{ };{ };\00"
@.str.12 = [215 x i8] c"1:0:BEGIN~EOF~\0A1:1:BEGIN~;~\0A1:1:BEGIN~{~\0A1:2:BEGIN~;~\0A1:2:STRING= \0A1:3:END_MISSING~;~\0A1:3:END~{~\0A1:4:END~;~\0A1:5:BEGIN~;~\0A1:5:BEGIN~{~\0A1:6:BEGIN~;~\0A1:6:STRING= \0A1:7:END_MISSING~;~\0A1:7:END~{~\0A1:8:END~;~\0A1:8:END~EOF~\0A\00"
@.str.13 = [21 x i8] c"a test {} statement;\00"
@.str.14 = [121 x i8] c"1:0:BEGIN~EOF~\0A1:1:BEGIN~;~\0A1:1:STRING=a test \0A1:8:BEGIN~{~\0A1:9:END~{~\0A1:10:STRING= statement\0A1:20:END~;~\0A1:20:END~EOF~\0A\00"
define void @testBracketsWithStrings() {
%1 = tail call i32 @checkResults(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.2, i64 0, i64 0), i32 292)
%2 = tail call i32 @checkResults(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.2, i64 0, i64 0), i32 299)
%3 = tail call i32 @checkResults(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.2, i64 0, i64 0), i32 309)
%4 = tail call i32 @checkResults(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.2, i64 0, i64 0), i32 320)
%5 = tail call i32 @checkResults(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.2, i64 0, i64 0), i32 331)
%6 = tail call i32 @checkResults(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([215 x i8], [215 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.2, i64 0, i64 0), i32 345)
%7 = tail call i32 @checkResults(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([121 x i8], [121 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.2, i64 0, i64 0), i32 363)
ret void
}