// File: /workspace/github_c_makefile_star2_O2/nimble-code[P]Modex/Src/xtract.c
// Function: vis_lookup
char *
vis_lookup(treenode *n)
{	char *p = "", *tag = "print";
	int i;

	extra_comment = 0;

	if (!visu
	||  strlen(OutBuf) == 0)
		return p;

	if (allkeep)
	{	if (strncmp(OutBuf, "R: ", 3) == 0)
			p = "goto Return";
		else
			p = "keep";
		goto sc;
	}
	if (strncmp(OutBuf, "default:", strlen("default:")) == 0)
	{	p = "keep";	/* mapped to 'else ->' later */
	} else if (du_mode)	/* def/use mode */
	{	p = do_dumode(n);
		goto sc;
	} else if (use_c_code)	/* all c_code mode, similar to allkeep mode */
	{	p = do_ccode(n?n->hdr.line:0);
		goto sc;
	} else
	{	for (i = 0; deflts[i].pat; i++)
			if (strncmp(OutBuf, deflts[i].pat, strlen(deflts[i].pat)) == 0)
			{	p = tag = deflts[i].val;
				break;
			}
		if (!strstr(OutBuf, "default:"))
		{
sc:			tag = p;
			if (PosElse)
				tag = "else";
			p = look_lut(OutBuf, tag, 1);	/* the one and only lookup in lut */
			via_substitute(AltBuf, p);
			p = AltBuf;
	}	}

	if (n && n->hdr.defuse)
	{	if (n->hdr.defuse->special)	/* touches data defined in .dat file */
		{	if (Verbose&2)
				printf("%d: <%s> .dat overrides .lut <%s> -> ",
				n->hdr.line, OutBuf, p);

			if (n->hdr.defuse->special == 8)	/* 8=keep (pure) */
				p = "keep";
			else if (n->hdr.defuse->special & 4)	/* 4=print   */
				p = "print";	/* highest priority */
			else if (n->hdr.defuse->special & 2)	/* 2=comment */
				p = "comment";	/* next highest */
			else if (n->hdr.defuse->special & 1)	/* 1=hide    */
				p = "hide";	/* lowest */

			if (Verbose&2)
				printf("<%s>\n", p);

			replace_lut(OutBuf, p);

			if (strstr(OutBuf, "C: "))
			{	static char OutBuf2[BigEnough];
				strcpy(OutBuf2, "C: !");	/* .dat override */
				strcat(OutBuf2, &OutBuf[3]);
				replace_lut(OutBuf2, p);
			}
		}
#if 0
		  else printf("%d: <%s> .dat preserve .lut <%s> -> special==0\n",
			n->hdr.line, OutBuf, p);
#endif
	}
#if 0
	  else printf("%d: <%s> .dat -> .lut <%s> nodefuse %d\n",
		n?n->hdr.line:0, OutBuf, p, (n && n->hdr.defuse)?n->hdr.defuse->special:0);
#endif
	ishidden = (strcmp(p, "print") == 0	/* no match for printf, only for print */
		||  strncmp(p, "comment", strlen("comment")) == 0
		||  strncmp(p, "hide",  strlen("hide"))  == 0);

	wasfalse = (strncmp(p, "false", strlen("false")) == 0);

// disabled, because it is not correctly processed in all cases:
//	wastrue  = (strncmp(p, "true",  strlen("true"))  == 0);
	waselse  = (strncmp(p, "else",  strlen("else"))  == 0);

	return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movb $0x0, 0x2ce52(%rip)     # 0x3cad0
leaq 0x26d53(%rip), %rax     # 0x369d8
cmpl $0x0, (%rax)
leaq 0x14302(%rip), %rbx     # 0x23f91
je 0xfef0
cmpb $0x0, 0x276e4(%rip)     # 0x37380
je 0xfef0
movq %rdi, %r14
leaq 0x26ffc(%rip), %rax     # 0x36ca8
cmpl $0x0, (%rax)
je 0xfd72
leaq 0x276c4(%rip), %rdi     # 0x37380
leaq 0x12d22(%rip), %rsi     # 0x229e5
pushq $0x3
popq %rdx
callq 0x4250
testl %eax, %eax
leaq 0x12dbe(%rip), %rax     # 0x22a92
leaq 0x121eb(%rip), %rbx     # 0x21ec6
cmoveq %rax, %rbx
leaq 0x12e85(%rip), %rsi     # 0x22b6b
cmpb $0x0, 0x2ddf3(%rip)     # 0x3dae0
cmoveq %rbx, %rsi
leaq 0x27688(%rip), %rdi     # 0x37380
pushq $0x1
popq %rdx
callq 0xee00
leaq 0x2dde9(%rip), %rbx     # 0x3daf0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xe214
testq %r14, %r14
je 0xfe66
movq 0x20(%r14), %rax
testq %rax, %rax
je 0xfe66
movl (%rax), %eax
testl %eax, %eax
je 0xfe66
leaq 0x26d43(%rip), %r15     # 0x36a7c
testb $0x2, (%r15)
je 0xfd61
movl 0x10(%r14), %esi
leaq 0x12e26(%rip), %rdi     # 0x22b70
leaq 0x2762f(%rip), %rdx     # 0x37380
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4140
movq 0x20(%r14), %rax
movl (%rax), %eax
cmpl $0x8, %eax
jne 0xfdae
leaq 0x12159(%rip), %rbx     # 0x21ec6
jmp 0xfdf7
movabsq $0x3a746c7561666564, %rax # imm = 0x3A746C7561666564
cmpq %rax, 0x275fd(%rip)     # 0x37380
jne 0xfd8e
leaq 0x1213a(%rip), %rbx     # 0x21ec6
jmp 0xfd12
leaq 0x26cc3(%rip), %rax     # 0x36a58
cmpl $0x0, (%rax)
je 0xfdc5
movq %r14, %rdi
callq 0xf828
leaq 0x17745(%rip), %rbx     # 0x274ee
jmp 0xfcdf
testb $0x4, %al
jne 0xfde7
testb $0x2, %al
jne 0xfdf0
testb $0x1, %al
leaq 0x1211e(%rip), %rax     # 0x21edd
cmovneq %rax, %rbx
jmp 0xfdf7
leaq 0x24428(%rip), %rax     # 0x341f4
cmpl $0x0, (%rax)
je 0xff02
testq %r14, %r14
je 0xff63
movl 0x10(%r14), %edi
jmp 0xff65
leaq 0x12100(%rip), %rbx     # 0x21eee
jmp 0xfdf7
leaq 0x176f7(%rip), %rbx     # 0x274ee
testb $0x2, (%r15)
je 0xfe0e
leaq 0x1154e(%rip), %rdi     # 0x21352
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4140
leaq 0x2756b(%rip), %r14     # 0x37380
movq %r14, %rdi
movq %rbx, %rsi
callq 0xff72
leaq 0x120ad(%rip), %rsi     # 0x21ed4
movq %r14, %rdi
callq 0x42d0
testq %rax, %rax
je 0xfe66
movb $0x0, 0x2ecb9(%rip)     # 0x3eaf4
movl $0x21203a43, 0x2ecab(%rip) # imm = 0x21203A43
leaq 0x2eca4(%rip), %r14     # 0x3eaf0
leaq 0x27530(%rip), %rsi     # 0x37383
movq %r14, %rdi
callq 0x4290
movq %r14, %rdi
movq %rbx, %rsi
callq 0xff72
pushq $0x1
popq %rbp
leaq 0x1207e(%rip), %rsi     # 0x21eee
movq %rbx, %rdi
callq 0x41b0
testl %eax, %eax
je 0xfeac
leaq 0x1766b(%rip), %rsi     # 0x274ee
pushq $0x7
popq %rdx
movq %rbx, %rdi
callq 0x40a0
testl %eax, %eax
je 0xfeac
leaq 0x12044(%rip), %rsi     # 0x21edd
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x40a0
xorl %ebp, %ebp
testl %eax, %eax
sete %bpl
movl %ebp, 0x2fc3e(%rip)     # 0x3faf0
leaq 0x1216f(%rip), %rsi     # 0x22028
pushq $0x5
popq %rdx
movq %rbx, %rdi
callq 0x40a0
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, 0x2fc23(%rip)     # 0x3faf4
leaq 0x12c93(%rip), %rsi     # 0x22b6b
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x40a0
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, 0x2fc08(%rip)     # 0x3faf8
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x243f7(%rip), %r13     # 0x34300
leaq 0x14081(%rip), %rbx     # 0x23f91
leaq 0x27469(%rip), %r15     # 0x37380
movq (%r13), %r12
testq %r12, %r12
je 0xff42
movq %r12, %rdi
callq 0x4110
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x40a0
addq $0x10, %r13
testl %eax, %eax
jne 0xff17
movq -0x8(%r13), %rbx
leaq 0x27437(%rip), %rdi     # 0x37380
leaq 0x11f7b(%rip), %rsi     # 0x21ecb
callq 0x42d0
testq %rax, %rax
jne 0xfd12
jmp 0xfcdf
xorl %edi, %edi
callq 0xf8c7
movq %rax, %rbx
jmp 0xfcdf