// File: /workspace/github_c_makefile_star2_O3/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, 0x2d0d1(%rip)     # 0x3ead0
leaq 0x26fd2(%rip), %rax     # 0x389d8
cmpl $0x0, (%rax)
leaq 0x14681(%rip), %rbx     # 0x26091
je 0x11b9b
cmpb $0x0, 0x27963(%rip)     # 0x39380
je 0x11b9b
movq %rdi, %r14
leaq 0x2727b(%rip), %rax     # 0x38ca8
cmpl $0x0, (%rax)
leaq 0x1258f(%rip), %rbx     # 0x23fc6
je 0x11bad
movl $0x3a52, %eax           # imm = 0x3A52
xorl 0x27938(%rip), %eax     # 0x39380
movzbl 0x27933(%rip), %ecx     # 0x39382
xorl $0x20, %ecx
orw %ax, %cx
leaq 0x13136(%rip), %r15     # 0x24b92
cmovneq %rbx, %r15
leaq 0x13204(%rip), %rsi     # 0x24c6b
cmpb $0x0, 0x2e072(%rip)     # 0x3fae0
cmoveq %r15, %rsi
leaq 0x27907(%rip), %rdi     # 0x39380
movl $0x1, %edx
callq 0x10c96
leaq 0x2e066(%rip), %r15     # 0x3faf0
movq %r15, %rdi
movq %rax, %rsi
callq 0xfbf1
testq %r14, %r14
je 0x11b04
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x11b04
movl (%rax), %eax
testl %eax, %eax
je 0x11b04
leaq 0x26fcc(%rip), %r12     # 0x38a7c
testb $0x2, (%r12)
je 0x11ad9
movl 0x10(%r14), %esi
leaq 0x131ae(%rip), %rdi     # 0x24c70
leaq 0x278b7(%rip), %rdx     # 0x39380
movq %r15, %rcx
xorl %eax, %eax
callq 0x4140
movq 0x20(%r14), %rax
movl (%rax), %eax
cmpl $0x8, %eax
je 0x11c1e
testb $0x4, %al
jne 0x11c0e
testb $0x2, %al
jne 0x11c17
testb $0x1, %al
leaq 0x124e2(%rip), %rbx     # 0x23fdd
cmoveq %r15, %rbx
jmp 0x11c1e
movq %r15, %rbx
leaq 0x124e0(%rip), %rsi     # 0x23fee
movq %rbx, %rdi
callq 0x41c0
movl $0x1, %ebp
testl %eax, %eax
je 0x11b53
leaq 0x17ab8(%rip), %rsi     # 0x295de
movl $0x7, %edx
movq %rbx, %rdi
callq 0x40a0
testl %eax, %eax
je 0x11b53
leaq 0x1249f(%rip), %rsi     # 0x23fdd
movl $0x4, %edx
movq %rbx, %rdi
callq 0x40a0
xorl %ebp, %ebp
testl %eax, %eax
sete %bpl
movl %ebp, 0x2ff97(%rip)     # 0x41af0
leaq 0x125c8(%rip), %rsi     # 0x24128
movl $0x5, %edx
movq %rbx, %rdi
callq 0x40a0
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, 0x2ff7a(%rip)     # 0x41af4
leaq 0x130ea(%rip), %rsi     # 0x24c6b
movl $0x4, %edx
movq %rbx, %rdi
callq 0x40a0
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, 0x2ff5d(%rip)     # 0x41af8
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movabsq $0x3a746c7561666564, %rax # imm = 0x3A746C7561666564
cmpq %rax, 0x277c2(%rip)     # 0x39380
jne 0x11bcc
leaq 0x123ff(%rip), %r15     # 0x23fc6
jmp 0x11a95
leaq 0x26e85(%rip), %rax     # 0x38a58
cmpl $0x0, (%rax)
je 0x11bec
movq %r14, %rdi
callq 0x115dd
leaq 0x179f7(%rip), %r15     # 0x295de
jmp 0x11a60
leaq 0x24601(%rip), %rax     # 0x361f4
cmpl $0x0, (%rax)
je 0x11c97
testq %r14, %r14
je 0x11d22
movl 0x10(%r14), %edi
jmp 0x11d24
leaq 0x123d9(%rip), %rbx     # 0x23fee
jmp 0x11c1e
leaq 0x179c0(%rip), %rbx     # 0x295de
testb $0x2, (%r12)
je 0x11c36
leaq 0x11726(%rip), %rdi     # 0x23352
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4140
leaq 0x27743(%rip), %r14     # 0x39380
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11d31
leaq 0x12385(%rip), %rsi     # 0x23fd4
movq %r14, %rdi
callq 0x42d0
testq %rax, %rax
je 0x11b07
movb $0x0, 0x2ee8d(%rip)     # 0x40af4
movl $0x21203a43, 0x2ee7f(%rip) # imm = 0x21203A43
leaq 0x2ee78(%rip), %r14     # 0x40af0
leaq 0x27704(%rip), %rsi     # 0x39383
movq %r14, %rdi
callq 0x4290
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11d31
jmp 0x11b07
movq 0x24662(%rip), %r12     # 0x36300
leaq 0x143ec(%rip), %r15     # 0x26091
testq %r12, %r12
je 0x11d01
movq %r12, %rdi
callq 0x4110
leaq 0x276c7(%rip), %rdi     # 0x39380
movq %r12, %rsi
movq %rax, %rdx
callq 0x40a0
leaq 0x24635(%rip), %rbp     # 0x36300
testl %eax, %eax
je 0x11cfd
leaq 0x276aa(%rip), %r12     # 0x39380
movq 0x10(%rbp), %r13
testq %r13, %r13
je 0x11d01
movq %r13, %rdi
callq 0x4110
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x40a0
addq $0x10, %rbp
testl %eax, %eax
jne 0x11cd6
movq 0x8(%rbp), %r15
leaq 0x27678(%rip), %rdi     # 0x39380
leaq 0x122bc(%rip), %rsi     # 0x23fcb
callq 0x42d0
testq %rax, %rax
jne 0x11a95
jmp 0x11a60
xorl %edi, %edi
callq 0x11680
movq %rax, %r15
jmp 0x11a60