#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*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_rebol_comments() {
  test_parser_verify_parse(
      test_parser_sourcefile("rebol", "REBOL []\n;comment"), "rebol",
      "REBOL []\n", ";comment", 0);
  test_parser_verify_parse(test_parser_sourcefile("rebol", "{}"), "rebol", "{}",
                           "", 0);
  test_parser_verify_parse(test_parser_sourcefile("rebol", "{{}}"), "rebol",
                           "{{}}", "", 0);
  test_parser_verify_parse(test_parser_sourcefile("rebol", "{{\n}}"), "rebol",
                           "{{\n}}", "", 0);
  test_parser_verify_parse(
      test_parser_sourcefile("rebol", "{\n;inside string\n}"), "rebol",
      "{\n;inside string\n}", "", 0);
  test_parser_verify_parse(test_parser_sourcefile("rebol", "{}\n;comment"),
                           "rebol", "{}\n", ";comment", 0);
}


x86 assembly (clang, -O0):
<test_rebol_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xed1(%rip),%rdx
lea    0xec1(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
lea    0xea3(%rip),%rdi
lea    0xebe(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xe8e(%rip),%rsi
lea    0xea9(%rip),%rdx
lea    0xea1(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
lea    0xe71(%rip),%rdi
lea    0xe8f(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xe5c(%rip),%rsi
lea    0xe7a(%rip),%rdx
lea    0xe6f(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
lea    0xe3f(%rip),%rdi
lea    0xe62(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xe2a(%rip),%rsi
lea    0xe4d(%rip),%rdx
lea    0xe3d(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
lea    0xe0d(%rip),%rdi
lea    0xe36(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xdf8(%rip),%rsi
lea    0xe21(%rip),%rdx
lea    0xe0b(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
lea    0xddb(%rip),%rdi
lea    0xe17(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xdc6(%rip),%rsi
lea    0xe0e(%rip),%rdx
lea    0xdc7(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_rebol_comments>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xed1(%rip),%rbx
lea    0xed0(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xed3(%rip),%rdx
lea    0xec3(%rip),%r14
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
lea    0xebf(%rip),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <test_parser_sourcefile@plt>
lea    0xeac(%rip),%r15
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
lea    0xe96(%rip),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
lea    0xe76(%rip),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
lea    0xe57(%rip),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
lea    0xe45(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xe42(%rip),%rdx
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rcx
xor    %r8d,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"rebol\00"
@.str.1 = [18 x i8] c"REBOL []\0A;comment\00"
@.str.2 = [10 x i8] c"REBOL []\0A\00"
@.str.3 = [9 x i8] c";comment\00"
@.str.4 = [3 x i8] c"{}\00"
@.str.5 = [1 x i8] zeroinitializer
@.str.6 = [5 x i8] c"{{}}\00"
@.str.7 = [6 x i8] c"{{\0A}}\00"
@.str.8 = [19 x i8] c"{\0A;inside string\0A}\00"
@.str.9 = [12 x i8] c"{}\0A;comment\00"
@.str.10 = [4 x i8] c"{}\0A\00"
define void @test_rebol_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 0)
%3 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%4 = call i32 @test_parser_verify_parse(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), i32 0)
%5 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%6 = call i32 @test_parser_verify_parse(i32 %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), i32 0)
%7 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%8 = call i32 @test_parser_verify_parse(i32 %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), i32 0)
%9 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @test_parser_verify_parse(i32 %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), i32 0)
%11 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0))
%12 = call i32 @test_parser_verify_parse(i32 %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"rebol\00"
@.str.1 = [18 x i8] c"REBOL []\0A;comment\00"
@.str.2 = [10 x i8] c"REBOL []\0A\00"
@.str.3 = [9 x i8] c";comment\00"
@.str.4 = [3 x i8] c"{}\00"
@.str.5 = [1 x i8] zeroinitializer
@.str.6 = [5 x i8] c"{{}}\00"
@.str.7 = [6 x i8] c"{{\0A}}\00"
@.str.8 = [19 x i8] c"{\0A;inside string\0A}\00"
@.str.9 = [12 x i8] c"{}\0A;comment\00"
@.str.10 = [4 x i8] c"{}\0A\00"
define void @test_rebol_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 0)
%3 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%4 = tail call i32 @test_parser_verify_parse(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), i32 0)
%5 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%6 = tail call i32 @test_parser_verify_parse(i32 %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), i32 0)
%7 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%8 = tail call i32 @test_parser_verify_parse(i32 %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), i32 0)
%9 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
%10 = tail call i32 @test_parser_verify_parse(i32 %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), i32 0)
%11 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0))
%12 = tail call i32 @test_parser_verify_parse(i32 %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}