// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Uno/Src/explore.c
// Function: walker
void
walker(treenode *n, int level, int pre)
{
	if (level >= sizeof(XBuf_Levels)/sizeof(char *))
	{	fprintf(stderr, "error: exceeded builtin depth limit\n");
		clean_tmps();
		exit(1);
	}
	if (!XBuf_Levels[level])
	{	XBuf_Levels[level] = emalloc(BufLimit * sizeof(char));
	}
	Xbuf = XBuf_Levels[level];

	if (n->hdr.warned || exclude_location(n))
	{	return;
	}

	/**** rule 4.1.14  all if/then/else/if chains must end with an else */
	/**** rule 4.1.13  all if stmnts must be compound statements */

	if (IF_THEN_ELSE(n))
	{	if (follow_chain(IF_ELSE(n)->rnode))
		{	if (pre)
			{	found_4_1_14++;
				Xbuf[0] = '\0';
			} else
			{	if (--found_4_1_14 == 0)
				{	location(n);
					printf("if-then-else-if chain does not end with 'else' (%s)\n",
					Xbuf);
		}	}	}

		if (IF_BODY(n)->rnode == NULL
		|| (W_TYPE(IF_BODY(n)->rnode) != TN_BLOCK && W_TYPE(IF_BODY(n)->rnode) != TN_IF ))
		{	location(n);
			printf("body of if-statement is not enclosed in braces\n");
		}
		if (ELSE_BODY(n)->rnode == NULL
		|| (W_TYPE(ELSE_BODY(n)->rnode) != TN_BLOCK && W_TYPE(ELSE_BODY(n)->rnode) != TN_IF ))
		{	location(n);
			printf("body of else is not enclosed in braces\n");
	}	}

	/**** rule 4.1.13  all if stmnts must be compound statements */
	if (IF_THEN(n))
	{	if (IF_BODY(n)->rnode == NULL
		|| (W_TYPE(IF_BODY(n)->rnode) != TN_BLOCK && W_TYPE(IF_BODY(n)->rnode) != TN_IF ))
		{	location(n);
			printf("body of if-statement is not enclosed in braces\n");
	}	}


	/**** rule 4.1.12 all loops must be compound statements */

	if (pre && FOR_LOOP(n)
	&& (FOR_BODY(n)->rnode == NULL || W_TYPE(FOR_BODY(n)->rnode) != TN_BLOCK))
	{	location(n);
		printf("body of for-stmnt is not enclosed in braces\n");
		/* name_of_node(W_TYPE(FOR_BODY(n))) */
	}

	if (pre && (WHILE_LOOP(n) || UNTIL_LOOP(n))
	&& W_TYPE(WHILE_BODY(n->rnode)) != TN_BLOCK)
	{	location(n);
		printf("body of while is not enclosed in braces\n");
		/* name_of_node(W_TYPE(WHILE_BODY(n->rnode))) */
	}

	/**** rule 4.1.15 every switch statement must have a default */

	if (pre && SWITCH(n) && W_TYPE(SWITCH_BODY(n)->rnode) == TN_BLOCK)
	{	if (!has_default(SWITCH_BODY(n)->rnode->lnode))
		{	location(n);
			printf("switch has no default case\n");
		}
	}

	/**** rule 4.9.5 enum and macro names must be in upper case */
	if (pre && B_TYPE(n) == NODE_T && W_TYPE(n) == TN_ENUM_LIST)
	{	char *p = has_lower_case(n);
		if (p)
		{	location(n);
			printf("enum name '%s' has lower-case characters\n", p);
	}	}

	/**** rule 4.9.4 variable and function names, and tags, have no uppercase */
	/**** rule 4.1.5 function prototypes must be declared at file scope */
	if (pre && B_TYPE(n) == NODE_T && W_TYPE(n) == TN_FUNC_DECL)
	{
		if (n->lnode
		&&  W_TYPE(n->lnode) == TN_IDENT)
		{	if (has_upper(((leafnode *)n->lnode)->data.sval->str))
			{	location(n);
				printf("function name '%s' has uppercase chars\n",
					((leafnode *)n->lnode)->data.sval->str);
			}
			if (n->lnode->syment->nes->level > 3)
			{	location(n);
				printf("function prototype '%s' not declared at file-scope\n",
					((leafnode *)n->lnode)->data.sval->str);
	}	}	}

	/**** rule 4.1.4 no objects or functions may be defined in header files */

	if (W_TYPE(n) == TN_DECL
	&&  strstr(W_FILE, ".h")
	&&  n->lnode
	&&  n->rnode
	&&  W_TYPE(n->lnode) == TN_TYPE_LIST
	&&  has_non_obj(n->lnode))
	{	if (has_extern(n->lnode))
		{	if (pre)
			{	found_4_1_4++;
			} else
			{	found_4_1_4--;
			}
		} else if (n->rnode)
		{	if (found_4_1_4 == 0)
			{	if (pre)
				{	Xbuf[0] = '\0';
				} else
				{	location(n);
					printf("object '%s' defined in header file\n", Xbuf);
					Xbuf[0] = '\0';
	}	}	}	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x200, %esi            # imm = 0x200
jae 0x1af50
movl %edx, %ebx
movq %rdi, %r14
movl %esi, %r15d
leaq 0x64d6a(%rip), %r12     # 0x7f980
cmpq $0x0, (%r12,%r15,8)
jne 0x1ac2b
movl $0xfa00, %edi           # imm = 0xFA00
callq 0x61a1
movq %rax, (%r12,%r15,8)
movq (%r12,%r15,8), %r15
movq %r15, 0x1d562(%rip)     # 0x38198
cmpl $0x0, 0x30(%r14)
jne 0x1af44
movq %r14, %rdi
callq 0x1a9fd
testl %eax, %eax
jne 0x1af44
cmpl $0x1b, 0x1c(%r14)
jne 0x1ad11
movq 0x50(%r14), %rax
testq %rax, %rax
je 0x1ad11
movq 0x48(%rax), %rdi
callq 0x1aa8d
testl %eax, %eax
je 0x1acb5
movl 0x65d04(%rip), %eax     # 0x80980
testl %ebx, %ebx
je 0x1ac8e
incl %eax
movl %eax, 0x65cf8(%rip)     # 0x80980
movb $0x0, (%r15)
jmp 0x1acb5
decl %eax
movl %eax, 0x65cea(%rip)     # 0x80980
jne 0x1acb5
movq %r14, %rdi
callq 0x1aaad
movq 0x1d4f1(%rip), %rsi     # 0x38198
leaq 0x15aa9(%rip), %rdi     # 0x30757
xorl %eax, %eax
callq 0x3100
movq 0x48(%r14), %rax
movq 0x48(%rax), %rax
testq %rax, %rax
je 0x1accf
movl 0x1c(%rax), %eax
cmpl $0x4, %eax
je 0x1ace3
cmpl $0x1b, %eax
je 0x1ace3
movq %r14, %rdi
callq 0x1aaad
leaq 0x15b7f(%rip), %rdi     # 0x3085d
callq 0x30a0
movq 0x50(%r14), %rax
movq 0x48(%rax), %rax
testq %rax, %rax
je 0x1acfd
movl 0x1c(%rax), %eax
cmpl $0x4, %eax
je 0x1ad11
cmpl $0x1b, %eax
je 0x1ad11
movq %r14, %rdi
callq 0x1aaad
leaq 0x15b2a(%rip), %rdi     # 0x30836
callq 0x30a0
cmpl $0x1b, 0x1c(%r14)
jne 0x1ad46
movq 0x48(%r14), %rax
movq 0x48(%rax), %rax
testq %rax, %rax
je 0x1ad32
movl 0x1c(%rax), %eax
cmpl $0x4, %eax
je 0x1ad46
cmpl $0x1b, %eax
je 0x1ad46
movq %r14, %rdi
callq 0x1aaad
leaq 0x15b1c(%rip), %rdi     # 0x3085d
callq 0x30a0
testl %ebx, %ebx
je 0x1ae99
cmpl $0x1e, 0x1c(%r14)
jne 0x1ad7c
movq 0x58(%r14), %rax
movq 0x48(%rax), %rax
testq %rax, %rax
je 0x1ad68
cmpl $0x4, 0x1c(%rax)
je 0x1ad7c
movq %r14, %rdi
callq 0x1aaad
leaq 0x15b15(%rip), %rdi     # 0x3088c
callq 0x30a0
movl 0x1c(%r14), %eax
addl $-0x1f, %eax
cmpl $0x1, %eax
ja 0x1adaa
movq 0x48(%r14), %rax
movq 0x48(%rax), %rax
cmpl $0x4, 0x1c(%rax)
je 0x1adaa
movq %r14, %rdi
callq 0x1aaad
leaq 0x15b13(%rip), %rdi     # 0x308b8
callq 0x30a0
cmpl $0x21, 0x1c(%r14)
jne 0x1ade0
movq 0x48(%r14), %rax
movq 0x48(%rax), %rax
cmpl $0x4, 0x1c(%rax)
jne 0x1ade0
movq 0x40(%rax), %rdi
callq 0x1aae2
testl %eax, %eax
jne 0x1ade0
movq %r14, %rdi
callq 0x1aaad
leaq 0x15b05(%rip), %rdi     # 0x308e0
callq 0x30a0
cmpl $0x4, (%r14)
jne 0x1ae16
cmpl $0xc, 0x1c(%r14)
jne 0x1ae16
movq %r14, %rdi
callq 0x1af55
testq %rax, %rax
je 0x1ae16
movq %rax, %r15
movq %r14, %rdi
callq 0x1aaad
leaq 0x15980(%rip), %rdi     # 0x3078c
movq %r15, %rsi
xorl %eax, %eax
callq 0x3100
cmpl $0x4, (%r14)
jne 0x1ae99
cmpl $0x2, 0x1c(%r14)
jne 0x1ae99
movq 0x40(%r14), %rax
testq %rax, %rax
je 0x1ae99
cmpl $0x2d, 0x1c(%rax)
jne 0x1ae99
movq 0x40(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x10016
testl %eax, %eax
je 0x1ae65
movq %r14, %rdi
callq 0x1aaad
movq 0x40(%r14), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
leaq 0x15958(%rip), %rdi     # 0x307b6
xorl %eax, %eax
callq 0x3100
movq 0x40(%r14), %rax
movq 0x38(%rax), %rax
movq 0x18(%rax), %rax
cmpl $0x4, 0x4(%rax)
jl 0x1ae99
movq %r14, %rdi
callq 0x1aaad
movq 0x40(%r14), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
leaq 0x1594c(%rip), %rdi     # 0x307de
xorl %eax, %eax
callq 0x3100
cmpl $0x5, 0x1c(%r14)
jne 0x1af44
movq 0x8(%r14), %rdi
testq %rdi, %rdi
jne 0x1aeb4
movq 0x550ac(%rip), %rdi     # 0x6ff60
leaq 0x15511(%rip), %rsi     # 0x303cc
callq 0x3270
testq %rax, %rax
je 0x1af44
movq 0x40(%r14), %rdi
testq %rdi, %rdi
je 0x1af44
cmpq $0x0, 0x48(%r14)
je 0x1af44
cmpl $0x14, 0x1c(%rdi)
jne 0x1af44
callq 0x1aba2
testl %eax, %eax
je 0x1af44
movq 0x40(%r14), %rdi
callq 0x1ab39
testl %eax, %eax
je 0x1aeff
movl 0x65a8d(%rip), %eax     # 0x80984
testl %ebx, %ebx
je 0x1af3c
incl %eax
jmp 0x1af3e
cmpq $0x0, 0x48(%r14)
je 0x1af44
cmpl $0x0, 0x65a77(%rip)     # 0x80984
jne 0x1af44
testl %ebx, %ebx
jne 0x1af30
movq %r14, %rdi
callq 0x1aaad
movq 0x1d276(%rip), %rsi     # 0x38198
leaq 0x158e9(%rip), %rdi     # 0x30812
xorl %eax, %eax
callq 0x3100
movq 0x1d261(%rip), %rax     # 0x38198
movb $0x0, (%rax)
jmp 0x1af44
decl %eax
movl %eax, 0x65a40(%rip)     # 0x80984
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x42b4