// File: /workspace/github_c_makefile_star2_O3/nimble-code[P]Modex/Src/xtract.c
// Function: vis_flush
void
vis_flush(treenode *n)
{	char *w1, *w2, *p, *rd, *z;
	int realprint;

//fprintf(fp, " <<<VIS_FLUSH %d %d '%s'>>> ", visu, ByPass, OutBuf);

	if (!visu
	||  strlen(OutBuf) == 0)
	{	goto done;
	}
	if (ByPass)
	{	fprintf(fp, "%s", OutBuf);
		goto done;
	}

	act_prec();

	p  = vis_lookup(n);	/* does mapping through lut */
	rd = rm_decor(OutBuf);

	realprint = 0;
	if (strcmp(p, "warn") == 0)
	{	if (Warnings)
		fprintf(stderr, "%s: line %3d, warning, must abstract <%s>\n",
			progname, n->hdr.line, rd);
		p = "print";
	}

	if (strcmp(p, "print") == 0)
	{	realprint = 1;
anyway:		w1 = &rd[0];
		while ((w2 = strstr(w1, EnCode)) != NULL)
			*w2 = ':';
		w1 = &rd[0];
		while ((w2 = strchr(w1, '\"')) != NULL)
			*w2 = '\'';

		if (linenr)
			sprintf(tbuf, "printf(\"line %3d: %s\\n\"); ", n->hdr.line, rd);
		else
			sprintf(tbuf, "printf(\"%s\\n\"); ", rd);
		vis_direct(tbuf);
		if (realprint)
			modex_mark(n, HIDE);
		goto done;
	} else if (add_printfs && strncmp(rd, "D: ", 3) != 0)
	{	if (linenr)
			sprintf(tbuf, "printf(\"line %3d: %s\\n\"); ", n->hdr.line, rd);
		else
			sprintf(tbuf, "printf(\"%s\\n\"); ", rd);
		vis_direct(tbuf);
	}

	if (strncmp(p, "C_expr", strlen("C_expr")) == 0
	&& (strncmp(OutBuf, "A: ", strlen("A: ")) == 0
	||  strncmp(OutBuf, "F: ", strlen("F: ")) == 0))
	{	char *tag = "c_expr { ";
		if (strlen(PreBuf) > 0)	/* precondition [] */
		{	tag = (char *) e_malloc(strlen("c_expr [] { ")+strlen(PreBuf)+1);
			sprintf(tag, "c_expr [%s] { ", PreBuf);
		}
		p = form_c_tag(tag, strlen("A: "), "");
		goto mkstmnt;
	} else if (strncmp(p, "C_code", strlen("C_code")) == 0)
	{	p = do_ccode(n?n->hdr.line:0);
		goto mkstmnt;
	} else if (strncmp(p, "keep", strlen("keep")) == 0)
	{	if (allkeep && in_args)
		{	p = "comment";	/* override */
			goto mkinstead;
		}
		if (strncmp(rd, "case ", strlen("case ")) == 0)
		{	z = &rd[strlen("case ")];
			if (strstr(rd, ND_CHOICE))
			{	z = "true";	/* all cases become true */
			}
		} else if (strncmp(rd, "default:", strlen("default:")) == 0)
		{	z = do_difficult("else ->", 1);
			sawdefault = 1;
		} else if ((z = strchr(rd, ':')) != NULL)	/* A:, C:, etc. */
		{	z++;
		} else
		{	z = rd;
		}
		if (!strchr(z, ';') && !strstr(z, "->"))	/* new 12/18/00 */
		{	p = z;
			goto mkstmnt;
		}
		strcpy(tbuf, z); /* substitute happens in vis_lookup */
		goto mkafter;
	} else	if (strncmp(p, "hide", strlen("hide")) == 0
		||  strncmp(p, "comment", strlen("comment")) == 0)
	{
mkinstead:	modex_mark(n, HIDE);
	} else				/* mapped */
	{
mkstmnt:	sprintf(tbuf, "%s; ", p);
mkafter:	vis_direct(tbuf);
		modex_mark(n, 0);
	}

	if (linenr)
	{	if (extra_comment
		||  strcmp(p, "comment") == 0)
			sprintf(tbuf, "\t/* %d: %s */ ", linenr, rd);
		else
			sprintf(tbuf, "\t/* line %3d */ ", linenr);
	} else if (strcmp(p, "comment") == 0)
	{	sprintf(tbuf, "\t/* %s */ ", rd);
	}


	vis_direct(tbuf);
	if (printall && !in_pars && !in_args)
	{	goto anyway;
	}
done:
	zap_prec();
#if 0
 if (n)
 { sprintf(tbuf, "	/**** <%d> ****/\n", n->hdr.line);
   vis_direct(tbuf);
 }
#endif
	fflush(fp);
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x26a99(%rip), %rax     # 0x389d8
cmpl $0x0, (%rax)
je 0x1238e
cmpb $0x0, 0x27431(%rip)     # 0x39380
je 0x1238e
cmpb $0x1, 0x30db4(%rip)     # 0x42d10
jne 0x11f76
movq 0x2740b(%rip), %rsi     # 0x39370
leaq 0x27414(%rip), %rdi     # 0x39380
callq 0x4170
jmp 0x1238e
movq %rdi, %rbx
callq 0x11e60
movq %rbx, %rdi
callq 0x119ed
movq %rax, %r15
leaq 0x273f0(%rip), %rdi     # 0x39380
callq 0xc117
movq %rax, %r14
leaq 0x12d04(%rip), %rsi     # 0x24ca3
movq %r15, %rdi
callq 0x41c0
testl %eax, %eax
jne 0x11fc2
leaq 0x1203c(%rip), %r15     # 0x23fee
leaq 0x26ac7(%rip), %rax     # 0x38a80
cmpl $0x0, (%rax)
jne 0x123ba
leaq 0x12025(%rip), %rsi     # 0x23fee
movq %r15, %rdi
callq 0x41c0
movl %eax, %ebp
testl %eax, %eax
je 0x122ee
leaq 0x26a7e(%rip), %rax     # 0x38a60
cmpl $0x0, (%rax)
je 0x12045
cmpb $0x44, (%r14)
jne 0x11ffb
cmpb $0x3a, 0x1(%r14)
jne 0x11ffb
cmpb $0x20, 0x2(%r14)
je 0x12045
cmpl $0x0, 0x30d12(%rip)     # 0x42d14
je 0x12021
movl 0x10(%rbx), %edx
leaq 0x2b5f2(%rip), %rdi     # 0x3d600
leaq 0x12cbe(%rip), %rsi     # 0x24cd3
movq %r14, %rcx
xorl %eax, %eax
callq 0x42a0
jmp 0x12039
leaq 0x2b5d8(%rip), %rdi     # 0x3d600
leaq 0x12cbf(%rip), %rsi     # 0x24cee
movq %r14, %rdx
xorl %eax, %eax
callq 0x42a0
leaq 0x2b5c0(%rip), %rdi     # 0x3d600
callq 0xeab6
leaq 0x12cb3(%rip), %rsi     # 0x24cff
movl $0x6, %edx
movq %r15, %rdi
callq 0x40a0
testl %eax, %eax
je 0x120d8
leaq 0x12cb1(%rip), %rsi     # 0x24d15
movl $0x6, %edx
movq %r15, %rdi
callq 0x40a0
testl %eax, %eax
je 0x1214f
leaq 0x11f46(%rip), %rsi     # 0x23fc6
movl $0x4, %edx
movq %r15, %rdi
callq 0x40a0
testl %eax, %eax
je 0x12159
leaq 0x11f41(%rip), %rsi     # 0x23fdd
movl $0x4, %edx
movq %r15, %rdi
callq 0x40a0
movl $0x200, %r12d           # imm = 0x200
testl %eax, %eax
je 0x12223
leaq 0x17520(%rip), %rsi     # 0x295de
movl $0x7, %edx
movq %r15, %rdi
callq 0x40a0
testl %eax, %eax
jne 0x121fc
jmp 0x12223
movl $0x3a41, %eax           # imm = 0x3A41
xorl 0x2729d(%rip), %eax     # 0x39380
movzbl 0x27298(%rip), %ecx     # 0x39382
xorl $0x20, %ecx
orw %ax, %cx
je 0x12110
movl $0x3a46, %eax           # imm = 0x3A46
xorl 0x27283(%rip), %eax     # 0x39380
movzbl 0x2727e(%rip), %ecx     # 0x39382
xorl $0x20, %ecx
orw %ax, %cx
jne 0x1205d
leaq 0x2c9c9(%rip), %rdi     # 0x3eae0
callq 0x4110
testq %rax, %rax
je 0x121de
addl $0xd, %eax
movl %eax, %edi
callq 0x6321
movq %rax, %r15
leaq 0x12bcd(%rip), %rsi     # 0x24d06
leaq 0x2c9a0(%rip), %rdx     # 0x3eae0
movq %rax, %rdi
xorl %eax, %eax
callq 0x42a0
jmp 0x121e5
testq %rbx, %rbx
je 0x12180
movl 0x10(%rbx), %edi
jmp 0x12182
leaq 0x26b48(%rip), %rax     # 0x38ca8
cmpl $0x0, (%rax)
je 0x12189
cmpl $0x0, 0x29250(%rip)     # 0x3b3bc
je 0x12189
leaq 0x17469(%rip), %r15     # 0x295de
movl $0x200, %r12d           # imm = 0x200
jmp 0x12223
xorl %edi, %edi
callq 0x11680
jmp 0x121f9
leaq 0x11e30(%rip), %rsi     # 0x23fc0
movl $0x5, %edx
movq %r14, %rdi
callq 0x40a0
testl %eax, %eax
je 0x123e7
leaq 0x11e1f(%rip), %rsi     # 0x23fcb
movl $0x8, %edx
movq %r14, %rdi
callq 0x40a0
testl %eax, %eax
je 0x1240d
movq %r14, %rdi
movl $0x3a, %esi
callq 0x4130
leaq 0x1(%rax), %r12
testq %rax, %rax
cmoveq %r14, %r12
jmp 0x12448
leaq 0x129a3(%rip), %r15     # 0x24b88
leaq 0x13ea5(%rip), %rdx     # 0x26091
movq %r15, %rdi
movl $0x3, %esi
callq 0x11515
movq %rax, %r15
leaq 0x2b3fd(%rip), %rdi     # 0x3d600
leaq 0x12b1a(%rip), %rsi     # 0x24d24
movq %r15, %rdx
xorl %eax, %eax
callq 0x42a0
leaq 0x2b3e5(%rip), %rdi     # 0x3d600
callq 0xeab6
xorl %r12d, %r12d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x11476
movl 0x30adf(%rip), %r12d    # 0x42d14
testl %r12d, %r12d
je 0x1228d
cmpb $0x0, 0x2c88f(%rip)     # 0x3ead0
jne 0x12270
leaq 0x17394(%rip), %rsi     # 0x295de
movq %r15, %rdi
callq 0x41c0
testl %eax, %eax
je 0x12270
leaq 0x2b3a3(%rip), %rdi     # 0x3d600
leaq 0x12ad4(%rip), %rsi     # 0x24d38
movl %r12d, %edx
xorl %eax, %eax
callq 0x42a0
jmp 0x122b8
leaq 0x2b389(%rip), %rdi     # 0x3d600
leaq 0x12aab(%rip), %rsi     # 0x24d29
movl %r12d, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x42a0
jmp 0x122b8
leaq 0x1734a(%rip), %rsi     # 0x295de
movq %r15, %rdi
callq 0x41c0
testl %eax, %eax
jne 0x122b8
leaq 0x2b359(%rip), %rdi     # 0x3d600
leaq 0x12a9b(%rip), %rsi     # 0x24d49
movq %r14, %rdx
xorl %eax, %eax
callq 0x42a0
leaq 0x2b341(%rip), %rdi     # 0x3d600
callq 0xeab6
leaq 0x269d5(%rip), %rax     # 0x38ca0
cmpl $0x0, (%rax)
je 0x1238e
cmpl $0x0, 0x2c7f1(%rip)     # 0x3eacc
jne 0x1238e
cmpl $0x0, 0x290d4(%rip)     # 0x3b3bc
jne 0x1238e
leaq 0x11d24(%rip), %rsi     # 0x24019
movq %r14, %rdi
callq 0x42d0
testq %rax, %rax
je 0x12321
leaq 0x11d10(%rip), %r15     # 0x24019
movb $0x3a, (%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x42d0
testq %rax, %rax
jne 0x12309
jmp 0x12321
movb $0x27, (%rax)
movq %r14, %rdi
movl $0x22, %esi
callq 0x4130
testq %rax, %rax
jne 0x1231e
cmpl $0x0, 0x309da(%rip)     # 0x42d14
je 0x12359
movl 0x10(%rbx), %edx
leaq 0x2b2ba(%rip), %rdi     # 0x3d600
leaq 0x12986(%rip), %rsi     # 0x24cd3
movq %r14, %rcx
xorl %eax, %eax
callq 0x42a0
jmp 0x12371
leaq 0x2b2a0(%rip), %rdi     # 0x3d600
leaq 0x12987(%rip), %rsi     # 0x24cee
movq %r14, %rdx
xorl %eax, %eax
callq 0x42a0
leaq 0x2b288(%rip), %rdi     # 0x3d600
callq 0xeab6
testl %ebp, %ebp
jne 0x1238e
movq %rbx, %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x11476
movq $0x0, 0x2f96f(%rip) # 0x41d08
movb $0x0, 0x2a240(%rip)     # 0x3c5e0
movq 0x26fc9(%rip), %rdi     # 0x39370
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4230
movq 0x23c37(%rip), %rax     # 0x35ff8
movq (%rax), %rdi
leaq 0x23dd5(%rip), %rax     # 0x361a0
movq (%rax), %rdx
movl 0x10(%rbx), %ecx
leaq 0x128d0(%rip), %rsi     # 0x24ca8
movq %r14, %r8
xorl %eax, %eax
callq 0x41d0
jmp 0x11fc2
movq %r14, %r13
addq $0x5, %r13
leaq 0x13645(%rip), %rsi     # 0x25a3a
movq %r14, %rdi
callq 0x42d0
testq %rax, %rax
leaq 0x11bd1(%rip), %r12     # 0x23fd8
cmoveq %r13, %r12
jmp 0x12448
movslq 0x2f8ec(%rip), %rax     # 0x41d00
leaq 0x2f6e5(%rip), %rcx     # 0x41b00
movq -0x8(%rcx,%rax,8), %rdi
leaq 0x13613(%rip), %rsi     # 0x25a3a
callq 0x42d0
testq %rax, %rax
leaq 0x128e6(%rip), %rax     # 0x24d1c
leaq 0x1285e(%rip), %r12     # 0x24c9b
cmoveq %rax, %r12
movb $0x1, 0x308d0(%rip)     # 0x42d18
movq %r12, %rdi
movl $0x3b, %esi
callq 0x4130
testq %rax, %rax
jne 0x1246e
leaq 0x128c0(%rip), %rsi     # 0x24d21
movq %r12, %rdi
callq 0x42d0
testq %rax, %rax
je 0x12482
leaq 0x2b18b(%rip), %rdi     # 0x3d600
movq %r12, %rsi
callq 0x40b0
jmp 0x12214
movq %r12, %r15
jmp 0x121fc