// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/regex_src/regexMain.c
// Function: run_tests
void run_tests(struct test_case* test, int verbose, int silent)
{
	int error;
	const regex_char_t *ptr;
	struct regex_machine* machine = NULL;
	struct regex_match* match;
	int begin, end, id, finished;
	int success = 0, fail = 0;

	if (!verbose && !silent)
		printf("Pass -v to enable verbose, -s to disable this hint.\n\n");

	for ( ; test->string ; test++) {
		if (verbose)
			printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
		fail++;

		if (test->pattern) {
			if (machine)
				regex_free_machine(machine);

			ptr = test->pattern;
			while (*ptr)
				ptr++;

			machine = regex_compile(test->pattern, ptr - test->pattern, test->flags, &error);

			if (error) {
				if (!verbose)
					printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
				printf("ABORT: Error %d\n", error);
				return;
			}
			if (!machine) {
				if (!verbose)
					printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
				printf("ABORT: machine must be exists. Report this bug, please\n");
				return;
			}
		}
		else if (test->flags != 0) {
			if (!verbose)
				printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
			printf("ABORT: flag must be 0 if no pattern\n");
			return;
		}

		ptr = test->string;
		while (*ptr)
			ptr++;

		match = regex_begin_match(machine);
#ifdef REGEX_MATCH_VERBOSE
		if (!match) {
			if (!verbose)
				printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
			printf("ABORT: Not enough memory for matching\n");
			regex_free_machine(machine);
			return;
		}
		regex_continue_match_debug(match, test->string, ptr - test->string);
		begin = regex_get_result(match, &end, &id);
		finished = regex_is_match_finished(match);

		if (begin != test->begin || end != test->end || id != test->id) {
			if (!verbose)
				printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
			printf("FAIL A: begin: %d != %d || end: %d != %d || id: %d != %d\n", test->begin, begin, test->end, end, test->id, id);
			continue;
		}
		if (test->finished != -1 && test->finished != !!finished) {
			if (!verbose)
				printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
			printf("FAIL A: finish check\n");
			continue;
		}
#endif

		regex_reset_match(match);
		regex_continue_match(match, test->string, ptr - test->string);
		begin = regex_get_result(match, &end, &id);
		finished = regex_is_match_finished(match);
		regex_free_match(match);

		if (begin != test->begin || end != test->end || id != test->id) {
			if (!verbose)
				printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
			printf("FAIL B: begin: %d != %d || end: %d != %d || id: %d != %d\n", test->begin, begin, test->end, end, test->id, id);
			continue;
		}
		if (test->finished != -1 && test->finished != !!finished) {
			if (!verbose)
				printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
			printf("FAIL B: finish check\n");
			continue;
		}

		if (verbose)
			printf("SUCCESS\n");
		fail--;
		success++;
	}
	if (machine)
		regex_free_machine(machine);

	printf("REGEX tests: ");
	if (fail == 0)
		printf("all tests are " COLOR_GREEN "PASSED" COLOR_DEFAULT " ");
	else
		printf(COLOR_RED "%d" COLOR_DEFAULT " (" COLOR_RED "%d%%" COLOR_DEFAULT ") tests are failed ", fail, fail * 100 / (success + fail));
	printf("on " COLOR_ARCH "%s" COLOR_DEFAULT "\n", regex_get_platform_name());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x23a5
cmpl $0x0, -0x10(%rbp)
jne 0x23a5
leaq 0x1cd19(%rip), %rdi     # 0x1f0b7
movb $0x0, %al
callq 0x2060
jmp 0x23a7
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x2954
cmpl $0x0, -0xc(%rbp)
je 0x23fc
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x23d5
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x23e2
leaq 0x1cd23(%rip), %rax     # 0x1f0ff
movq %rax, -0x50(%rbp)
jmp 0x23e2
movq -0x50(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdx
leaq 0x1ccf8(%rip), %rdi     # 0x1f0ed
movb $0x0, %al
callq 0x2060
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x2538
cmpq $0x0, -0x28(%rbp)
je 0x2424
movq -0x28(%rbp), %rdi
callq 0x7e00
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x2447
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2430
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
subq %rcx, %rax
movl %eax, %esi
movq -0x8(%rbp), %rax
movl 0x10(%rax), %edx
leaq -0x14(%rbp), %rcx
callq 0x2a90
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x24d6
cmpl $0x0, -0xc(%rbp)
jne 0x24c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x2499
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x24a6
leaq 0x1cc5f(%rip), %rax     # 0x1f0ff
movq %rax, -0x58(%rbp)
jmp 0x24a6
movq -0x58(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdx
leaq 0x1cc34(%rip), %rdi     # 0x1f0ed
movb $0x0, %al
callq 0x2060
movl -0x14(%rbp), %esi
leaq 0x1cc3f(%rip), %rdi     # 0x1f109
movb $0x0, %al
callq 0x2060
jmp 0x29be
cmpq $0x0, -0x28(%rbp)
jne 0x2536
cmpl $0x0, -0xc(%rbp)
jne 0x2523
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x24fc
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x2509
leaq 0x1cbfc(%rip), %rax     # 0x1f0ff
movq %rax, -0x60(%rbp)
jmp 0x2509
movq -0x60(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdx
leaq 0x1cbd1(%rip), %rdi     # 0x1f0ed
movb $0x0, %al
callq 0x2060
leaq 0x1cbf0(%rip), %rdi     # 0x1f11a
movb $0x0, %al
callq 0x2060
jmp 0x29be
jmp 0x259d
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x259b
cmpl $0x0, -0xc(%rbp)
jne 0x2588
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x2561
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x256e
leaq 0x1cb97(%rip), %rax     # 0x1f0ff
movq %rax, -0x68(%rbp)
jmp 0x256e
movq -0x68(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdx
leaq 0x1cb6c(%rip), %rdi     # 0x1f0ed
movb $0x0, %al
callq 0x2060
leaq 0x1cbc3(%rip), %rdi     # 0x1f152
movb $0x0, %al
callq 0x2060
jmp 0x29be
jmp 0x259d
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x25c0
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x25a9
movq -0x28(%rbp), %rdi
callq 0x7e40
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x2636
cmpl $0x0, -0xc(%rbp)
jne 0x261a
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x25f3
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x70(%rbp)
jmp 0x2600
leaq 0x1cb05(%rip), %rax     # 0x1f0ff
movq %rax, -0x70(%rbp)
jmp 0x2600
movq -0x70(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdx
leaq 0x1cada(%rip), %rdi     # 0x1f0ed
movb $0x0, %al
callq 0x2060
leaq 0x1cb56(%rip), %rdi     # 0x1f177
movb $0x0, %al
callq 0x2060
movq -0x28(%rbp), %rdi
callq 0x7e00
jmp 0x29be
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x20(%rcx), %rcx
subq %rcx, %rax
movl %eax, %edx
callq 0x8570
movq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x3c(%rbp), %rdx
callq 0x82a0
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rdi
callq 0x8550
movl %eax, -0x40(%rbp)
movl -0x34(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x269b
movl -0x38(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x269b
movl -0x3c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
je 0x2716
cmpl $0x0, -0xc(%rbp)
jne 0x26e1
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x26ba
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x78(%rbp)
jmp 0x26c7
leaq 0x1ca3e(%rip), %rax     # 0x1f0ff
movq %rax, -0x78(%rbp)
jmp 0x26c7
movq -0x78(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdx
leaq 0x1ca13(%rip), %rdi     # 0x1f0ed
movb $0x0, %al
callq 0x2060
movq -0x8(%rbp), %rax
movl (%rax), %esi
movl -0x34(%rbp), %edx
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
movl -0x38(%rbp), %r8d
movq -0x8(%rbp), %rax
movl 0x8(%rax), %r9d
movl -0x3c(%rbp), %eax
leaq 0x1ca97(%rip), %rdi     # 0x1f19e
movl %eax, (%rsp)
movb $0x0, %al
callq 0x2060
jmp 0x2943
movq -0x8(%rbp), %rax
cmpl $-0x1, 0xc(%rax)
je 0x2797
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
cmpl $0x0, -0x40(%rbp)
setne %cl
xorb $-0x1, %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x2797
cmpl $0x0, -0xc(%rbp)
jne 0x2784
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x275d
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x80(%rbp)
jmp 0x276a
leaq 0x1c99b(%rip), %rax     # 0x1f0ff
movq %rax, -0x80(%rbp)
jmp 0x276a
movq -0x80(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdx
leaq 0x1c970(%rip), %rdi     # 0x1f0ed
movb $0x0, %al
callq 0x2060
leaq 0x1ca4d(%rip), %rdi     # 0x1f1d8
movb $0x0, %al
callq 0x2060
jmp 0x2943
movq -0x30(%rbp), %rdi
callq 0x8190
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x20(%rcx), %rcx
subq %rcx, %rax
movl %eax, %edx
callq 0x8270
movq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x3c(%rbp), %rdx
callq 0x82a0
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rdi
callq 0x8550
movl %eax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
callq 0x8250
movl -0x34(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x2812
movl -0x38(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x2812
movl -0x3c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
je 0x2896
cmpl $0x0, -0xc(%rbp)
jne 0x2861
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x2834
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x88(%rbp)
jmp 0x2844
leaq 0x1c8c4(%rip), %rax     # 0x1f0ff
movq %rax, -0x88(%rbp)
jmp 0x2844
movq -0x88(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdx
leaq 0x1c893(%rip), %rdi     # 0x1f0ed
movb $0x0, %al
callq 0x2060
movq -0x8(%rbp), %rax
movl (%rax), %esi
movl -0x34(%rbp), %edx
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
movl -0x38(%rbp), %r8d
movq -0x8(%rbp), %rax
movl 0x8(%rax), %r9d
movl -0x3c(%rbp), %eax
leaq 0x1c967(%rip), %rdi     # 0x1f1ee
movl %eax, (%rsp)
movb $0x0, %al
callq 0x2060
jmp 0x2943
movq -0x8(%rbp), %rax
cmpl $-0x1, 0xc(%rax)
je 0x291d
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
cmpl $0x0, -0x40(%rbp)
setne %cl
xorb $-0x1, %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x291d
cmpl $0x0, -0xc(%rbp)
jne 0x290d
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x28e0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x90(%rbp)
jmp 0x28f0
leaq 0x1c818(%rip), %rax     # 0x1f0ff
movq %rax, -0x90(%rbp)
jmp 0x28f0
movq -0x90(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdx
leaq 0x1c7e7(%rip), %rdi     # 0x1f0ed
movb $0x0, %al
callq 0x2060
leaq 0x1c914(%rip), %rdi     # 0x1f228
movb $0x0, %al
callq 0x2060
jmp 0x2943
cmpl $0x0, -0xc(%rbp)
je 0x2931
leaq 0x1c914(%rip), %rdi     # 0x1f23e
movb $0x0, %al
callq 0x2060
movl -0x48(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x48(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x8(%rbp)
jmp 0x23a7
cmpq $0x0, -0x28(%rbp)
je 0x2964
movq -0x28(%rbp), %rdi
callq 0x7e00
leaq 0x1c8dc(%rip), %rdi     # 0x1f247
movb $0x0, %al
callq 0x2060
cmpl $0x0, -0x48(%rbp)
jne 0x2988
leaq 0x1c8d6(%rip), %rdi     # 0x1f255
movb $0x0, %al
callq 0x2060
jmp 0x29a8
movl -0x48(%rbp), %esi
imull $0x64, -0x48(%rbp), %eax
movl -0x44(%rbp), %ecx
addl -0x48(%rbp), %ecx
cltd
idivl %ecx
movl %eax, %edx
leaq 0x1c8d3(%rip), %rdi     # 0x1f274
movb $0x0, %al
callq 0x2060
callq 0x7e30
movq %rax, %rsi
leaq 0x1c8eb(%rip), %rdi     # 0x1f2a2
movb $0x0, %al
callq 0x2060
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)