// File: /workspace/github_c_makefile_star2_O0/System-Glitch[P]ESGILinter-C/src/test.c
// Function: test_rule_no_prototype
static void test_rule_no_prototype() {

	printf("------------------------------%s\n", FORMAT_RESET);

	printf("%sTESTING RULE: no-prototype%s\n", COLOR_GREEN_BOLD, FORMAT_RESET);

	arraylist_t *file = arraylist_init(ARRAYLIST_DEFAULT_CAPACITY);
	arraylist_add(file, strduplicate("static int glob = 89;"));
	arraylist_add(file, strduplicate("void test(int param);"));

	arraylist_add(file, strduplicate("char test(int param) {"));
	arraylist_add(file, strduplicate("\tchar c = 'c';"));
	arraylist_add(file, strduplicate("\tprintf(\"%c %d\", c, i);"));
	arraylist_add(file, strduplicate("}"));

	arraylist_add(file, strduplicate("int main() {"));
	arraylist_add(file, strduplicate("\tint i = 42;"));
	arraylist_add(file, strduplicate("}"));

	arraylist_add(file, strduplicate("char* test2(char v) {"));
	arraylist_add(file, strduplicate("\tint i = 42;"));
	arraylist_add(file, strduplicate("}"));

	scope_t *scope = parse_root_scope(file);
	if(scope != NULL) {
		printf("Return: %d\n", check_no_prototype(scope, file, file));
		scope_free(scope);
	} else {
		printf("%sScope %sNULL\n%s", COLOR_YELLOW, COLOR_RED, FORMAT_RESET);
	}
	arraylist_free(file, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
leaq 0xeee2(%rip), %rdi      # 0x13031
leaq 0xeecf(%rip), %rsi      # 0x13025
movb $0x0, %al
callq 0x20b0
leaq 0xf7d0(%rip), %rdi      # 0x13934
leaq 0xef10(%rip), %rsi      # 0x1307b
leaq 0xeeb3(%rip), %rdx      # 0x13025
movb $0x0, %al
callq 0x20b0
movl $0xa, %edi
callq 0x8580
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq 0xf4f4(%rip), %rdi      # 0x1368a
callq 0xa550
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq 0xf79e(%rip), %rdi      # 0x13954
callq 0xa550
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq 0xf794(%rip), %rdi      # 0x1396a
callq 0xa550
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq 0xf4c1(%rip), %rdi      # 0x136b7
callq 0xa550
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq 0xf4b0(%rip), %rdi      # 0x136c6
callq 0xa550
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq 0x10273(%rip), %rdi     # 0x144a9
callq 0xa550
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq 0xf488(%rip), %rdi      # 0x136de
callq 0xa550
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq 0xf475(%rip), %rdi      # 0x136eb
callq 0xa550
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x10213(%rip), %rdi     # 0x144a9
callq 0xa550
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0xf6cb(%rip), %rdi      # 0x13981
callq 0xa550
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0xf415(%rip), %rdi      # 0x136eb
callq 0xa550
movq -0x20(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x101b3(%rip), %rdi     # 0x144a9
callq 0xa550
movq -0x18(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rdi
callq 0x77a0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4347
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x8(%rbp), %rdx
callq 0xd5b0
movl %eax, %esi
leaq 0xf662(%rip), %rdi      # 0x13997
movb $0x0, %al
callq 0x20b0
movq -0x10(%rbp), %rdi
callq 0x7fa0
jmp 0x436a
leaq 0xf655(%rip), %rdi      # 0x139a3
leaq 0xecca(%rip), %rsi      # 0x1301f
leaq 0xecbd(%rip), %rdx      # 0x13019
leaq 0xecc2(%rip), %rcx      # 0x13025
movb $0x0, %al
callq 0x20b0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x8a00
addq $0x70, %rsp
popq %rbp
retq
nop