// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
cmpl $0x200, %esi            # imm = 0x200
jae 0x183c1
movl %edx, %ebx
movq %rdi, %r14
movl %esi, %r12d
leaq 0x66916(%rip), %r13     # 0x7e990
movq (%r13,%r12,8), %r15
testq %r15, %r15
jne 0x18096
movl $0xfa00, %edi           # imm = 0xFA00
callq 0x4da5
movq %rax, %r15
movq %rax, (%r13,%r12,8)
movq %r15, 0x1f10b(%rip)     # 0x371a8
cmpl $0x0, 0x30(%r14)
jne 0x183b7
movq %r14, %rdi
callq 0x17e71
testl %eax, %eax
jne 0x183b7
cmpl $0x1b, 0x1c(%r14)
jne 0x181ad
movq 0x50(%r14), %rax
testq %rax, %rax
je 0x18178
movq 0x48(%rax), %rdi
callq 0x17ef0
testl %eax, %eax
je 0x1811c
movl 0x678ad(%rip), %eax     # 0x7f990
testl %ebx, %ebx
je 0x180f5
incl %eax
movl %eax, 0x678a1(%rip)     # 0x7f990
movb $0x0, (%r15)
jmp 0x1811c
decl %eax
movl %eax, 0x67893(%rip)     # 0x7f990
jne 0x1811c
movq %r14, %rdi
callq 0x17f10
movq 0x1f09a(%rip), %rsi     # 0x371a8
leaq 0x1664e(%rip), %rdi     # 0x2e763
xorl %eax, %eax
callq 0x3100
movq 0x48(%r14), %rax
movq 0x48(%rax), %rax
testq %rax, %rax
je 0x18136
movl 0x1c(%rax), %eax
cmpl $0x4, %eax
je 0x1814a
cmpl $0x1b, %eax
je 0x1814a
movq %r14, %rdi
callq 0x17f10
leaq 0x16724(%rip), %rdi     # 0x2e869
callq 0x30a0
movq 0x50(%r14), %rax
movq 0x48(%rax), %rax
testq %rax, %rax
je 0x18164
movl 0x1c(%rax), %eax
cmpl $0x4, %eax
je 0x18178
cmpl $0x1b, %eax
je 0x18178
movq %r14, %rdi
callq 0x17f10
leaq 0x166cf(%rip), %rdi     # 0x2e842
callq 0x30a0
cmpl $0x1b, 0x1c(%r14)
jne 0x181ad
movq 0x48(%r14), %rax
movq 0x48(%rax), %rax
testq %rax, %rax
je 0x18199
movl 0x1c(%rax), %eax
cmpl $0x4, %eax
je 0x181ad
cmpl $0x1b, %eax
je 0x181ad
movq %r14, %rdi
callq 0x17f10
leaq 0x166c1(%rip), %rdi     # 0x2e869
callq 0x30a0
testl %ebx, %ebx
je 0x1830c
movl 0x1c(%r14), %eax
cmpl $0x1e, %eax
jne 0x181e9
movq 0x58(%r14), %rax
movq 0x48(%rax), %rax
testq %rax, %rax
je 0x181d1
cmpl $0x4, 0x1c(%rax)
je 0x1824b
movq %r14, %rdi
callq 0x17f10
leaq 0x166b8(%rip), %rdi     # 0x2e898
callq 0x30a0
movl 0x1c(%r14), %eax
leal -0x1f(%rax), %ecx
cmpl $0x1, %ecx
ja 0x18217
movq 0x48(%r14), %rax
movq 0x48(%rax), %rax
cmpl $0x4, 0x1c(%rax)
je 0x1824b
movq %r14, %rdi
callq 0x17f10
leaq 0x166b6(%rip), %rdi     # 0x2e8c4
callq 0x30a0
movl 0x1c(%r14), %eax
cmpl $0x21, %eax
jne 0x1824b
movq 0x48(%r14), %rax
movq 0x48(%rax), %rax
cmpl $0x4, 0x1c(%rax)
jne 0x1824b
movq 0x40(%rax), %rdi
callq 0x17f45
testl %eax, %eax
jne 0x1824b
movq %r14, %rdi
callq 0x17f10
leaq 0x166a6(%rip), %rdi     # 0x2e8ec
callq 0x30a0
cmpl $0x4, (%r14)
jne 0x1830c
movl 0x1c(%r14), %eax
cmpl $0xc, %eax
jne 0x18291
movq %r14, %rdi
callq 0x183ea
testq %rax, %rax
je 0x18287
movq %rax, %r15
movq %r14, %rdi
callq 0x17f10
leaq 0x1651b(%rip), %rdi     # 0x2e798
movq %r15, %rsi
xorl %eax, %eax
callq 0x3100
cmpl $0x4, (%r14)
jne 0x1830c
movl 0x1c(%r14), %eax
cmpl $0x2, %eax
jne 0x1830c
movq 0x40(%r14), %rax
testq %rax, %rax
je 0x1830c
cmpl $0x2d, 0x1c(%rax)
jne 0x1830c
movq 0x40(%rax), %rax
movq 0x8(%rax), %rdi
callq 0xe72a
testl %eax, %eax
je 0x182d8
movq %r14, %rdi
callq 0x17f10
movq 0x40(%r14), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
leaq 0x164f1(%rip), %rdi     # 0x2e7c2
xorl %eax, %eax
callq 0x3100
movq 0x40(%r14), %rax
movq 0x38(%rax), %rax
movq 0x18(%rax), %rax
cmpl $0x4, 0x4(%rax)
jl 0x1830c
movq %r14, %rdi
callq 0x17f10
movq 0x40(%r14), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
leaq 0x164e5(%rip), %rdi     # 0x2e7ea
xorl %eax, %eax
callq 0x3100
cmpl $0x5, 0x1c(%r14)
jne 0x183b7
movq 0x8(%r14), %rdi
testq %rdi, %rdi
jne 0x18327
movq 0x56c49(%rip), %rdi     # 0x6ef70
leaq 0x160ac(%rip), %rsi     # 0x2e3da
callq 0x3290
testq %rax, %rax
je 0x183b7
movq 0x40(%r14), %rdi
testq %rdi, %rdi
je 0x183b7
cmpq $0x0, 0x48(%r14)
je 0x183b7
cmpl $0x14, 0x1c(%rdi)
jne 0x183b7
callq 0x1800c
testl %eax, %eax
je 0x183b7
movq 0x40(%r14), %rdi
callq 0x17fa3
testl %eax, %eax
je 0x18372
movl 0x6762a(%rip), %eax     # 0x7f994
testl %ebx, %ebx
je 0x183af
incl %eax
jmp 0x183b1
cmpq $0x0, 0x48(%r14)
je 0x183b7
cmpl $0x0, 0x67614(%rip)     # 0x7f994
jne 0x183b7
testl %ebx, %ebx
jne 0x183a3
movq %r14, %rdi
callq 0x17f10
movq 0x1ee13(%rip), %rsi     # 0x371a8
leaq 0x16482(%rip), %rdi     # 0x2e81e
xorl %eax, %eax
callq 0x3100
movq 0x1edfe(%rip), %rax     # 0x371a8
movb $0x0, (%rax)
jmp 0x183b7
decl %eax
movl %eax, 0x675dd(%rip)     # 0x7f994
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x1ec30(%rip), %rax     # 0x36ff8
movq (%rax), %rcx
leaq 0x1636c(%rip), %rdi     # 0x2e73e
pushq $0x24
popq %rsi
pushq $0x1
popq %rdx
callq 0x3280
callq 0x3d88
pushq $0x1
popq %rdi
callq 0x3270