// File: /workspace/github_c_makefile_star2_O1/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, 0x2e188(%rip)     # 0x3fac0
leaq 0x28089(%rip), %rax     # 0x399c8
cmpl $0x0, (%rax)
leaq 0x1574b(%rip), %rbx     # 0x27094
je 0x11ad3
cmpb $0x0, 0x28a1a(%rip)     # 0x3a370
je 0x11ad3
movq %rdi, %r14
leaq 0x28332(%rip), %rax     # 0x39c98
cmpl $0x0, (%rax)
leaq 0x13656(%rip), %rbx     # 0x24fc6
je 0x11ae5
movl $0x3a52, %eax           # imm = 0x3A52
xorl 0x289ef(%rip), %eax     # 0x3a370
movzbl 0x289ea(%rip), %ecx     # 0x3a372
xorl $0x20, %ecx
orw %ax, %cx
leaq 0x141fd(%rip), %r15     # 0x25b92
cmovneq %rbx, %r15
leaq 0x142cb(%rip), %rsi     # 0x25c6b
cmpb $0x0, 0x2f129(%rip)     # 0x40ad0
cmoveq %r15, %rsi
leaq 0x289be(%rip), %rdi     # 0x3a370
movl $0x1, %edx
callq 0x10be8
leaq 0x2f11d(%rip), %r15     # 0x40ae0
movq %r15, %rdi
movq %rax, %rsi
callq 0xfcee
testq %r14, %r14
je 0x11a3c
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x11a3c
cmpl $0x0, (%rax)
je 0x11a3c
leaq 0x28084(%rip), %r12     # 0x39a6c
testb $0x2, (%r12)
je 0x11a0b
movl 0x10(%r14), %esi
leaq 0x14276(%rip), %rdi     # 0x25c70
leaq 0x2896f(%rip), %rdx     # 0x3a370
movq %r15, %rcx
xorl %eax, %eax
callq 0x4140
movq 0x20(%r14), %rax
movl (%rax), %eax
cmpl $0x8, %eax
je 0x11b56
testb $0x4, %al
jne 0x11b46
testb $0x2, %al
jne 0x11b4f
testb $0x1, %al
leaq 0x135aa(%rip), %rbx     # 0x24fdd
cmoveq %r15, %rbx
jmp 0x11b56
movq %r15, %rbx
leaq 0x135a8(%rip), %rsi     # 0x24fee
movq %rbx, %rdi
callq 0x41b0
movl $0x1, %ebp
testl %eax, %eax
je 0x11a8b
leaq 0x18b80(%rip), %rsi     # 0x2a5de
movl $0x7, %edx
movq %rbx, %rdi
callq 0x40a0
testl %eax, %eax
je 0x11a8b
leaq 0x13567(%rip), %rsi     # 0x24fdd
movl $0x4, %edx
movq %rbx, %rdi
callq 0x40a0
xorl %ebp, %ebp
testl %eax, %eax
sete %bpl
movl %ebp, 0x3104f(%rip)     # 0x42ae0
leaq 0x13690(%rip), %rsi     # 0x25128
movl $0x5, %edx
movq %rbx, %rdi
callq 0x40a0
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, 0x31032(%rip)     # 0x42ae4
leaq 0x141b2(%rip), %rsi     # 0x25c6b
movl $0x4, %edx
movq %rbx, %rdi
callq 0x40a0
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, 0x31015(%rip)     # 0x42ae8
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, 0x2887a(%rip)     # 0x3a370
jne 0x11b04
leaq 0x134c7(%rip), %r15     # 0x24fc6
jmp 0x119ce
leaq 0x27f3d(%rip), %rax     # 0x39a48
cmpl $0x0, (%rax)
je 0x11b24
movq %r14, %rdi
callq 0x11511
leaq 0x18abf(%rip), %r15     # 0x2a5de
jmp 0x11999
leaq 0x256b9(%rip), %rax     # 0x371e4
cmpl $0x0, (%rax)
je 0x11bcf
testq %r14, %r14
je 0x11c5a
movl 0x10(%r14), %edi
jmp 0x11c5c
leaq 0x134a1(%rip), %rbx     # 0x24fee
jmp 0x11b56
leaq 0x18a88(%rip), %rbx     # 0x2a5de
testb $0x2, (%r12)
je 0x11b6e
leaq 0x127ee(%rip), %rdi     # 0x24352
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4140
leaq 0x287fb(%rip), %r14     # 0x3a370
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11c69
leaq 0x1344d(%rip), %rsi     # 0x24fd4
movq %r14, %rdi
callq 0x42c0
testq %rax, %rax
je 0x11a3f
movb $0x0, 0x2ff45(%rip)     # 0x41ae4
movl $0x21203a43, 0x2ff37(%rip) # imm = 0x21203A43
leaq 0x2ff30(%rip), %r14     # 0x41ae0
leaq 0x287bc(%rip), %rsi     # 0x3a373
movq %r14, %rdi
callq 0x4280
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11c69
jmp 0x11a3f
movq 0x2571a(%rip), %r12     # 0x372f0
leaq 0x154b7(%rip), %r15     # 0x27094
testq %r12, %r12
je 0x11c39
movq %r12, %rdi
callq 0x4110
leaq 0x2877f(%rip), %rdi     # 0x3a370
movq %r12, %rsi
movq %rax, %rdx
callq 0x40a0
leaq 0x256ed(%rip), %rbp     # 0x372f0
testl %eax, %eax
je 0x11c35
leaq 0x28762(%rip), %r12     # 0x3a370
movq 0x10(%rbp), %r13
testq %r13, %r13
je 0x11c39
movq %r13, %rdi
callq 0x4110
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x40a0
addq $0x10, %rbp
testl %eax, %eax
jne 0x11c0e
movq 0x8(%rbp), %r15
leaq 0x28730(%rip), %rdi     # 0x3a370
leaq 0x13384(%rip), %rsi     # 0x24fcb
callq 0x42c0
testq %rax, %rax
jne 0x119ce
jmp 0x11999
xorl %edi, %edi
callq 0x115ae
movq %rax, %r15
jmp 0x11999