// File: /workspace/github_c_makefile_star2_O1/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 0x27b57(%rip), %rax     # 0x399c8
cmpl $0x0, (%rax)
je 0x122c4
cmpb $0x0, 0x284ef(%rip)     # 0x3a370
je 0x122c4
cmpb $0x1, 0x31e72(%rip)     # 0x43d00
jne 0x11ea8
movq 0x284c9(%rip), %rsi     # 0x3a360
leaq 0x284d2(%rip), %rdi     # 0x3a370
callq 0x4170
jmp 0x122c4
movq %rdi, %rbx
callq 0x11d95
movq %rbx, %rdi
callq 0x11926
movq %rax, %r15
leaq 0x284ae(%rip), %rdi     # 0x3a370
callq 0xc296
movq %rax, %r14
leaq 0x13dd2(%rip), %rsi     # 0x25ca3
movq %r15, %rdi
callq 0x41b0
testl %eax, %eax
jne 0x11ef4
leaq 0x1310a(%rip), %r15     # 0x24fee
leaq 0x27b85(%rip), %rax     # 0x39a70
cmpl $0x0, (%rax)
jne 0x122f0
leaq 0x130f3(%rip), %rsi     # 0x24fee
movq %r15, %rdi
callq 0x41b0
movl %eax, %ebp
testl %eax, %eax
je 0x12224
leaq 0x27b3c(%rip), %rax     # 0x39a50
cmpl $0x0, (%rax)
je 0x11f7b
leaq 0x1515c(%rip), %rsi     # 0x2707c
movl $0x3, %edx
movq %r14, %rdi
callq 0x40a0
testl %eax, %eax
je 0x11f7b
cmpl $0x0, 0x31dcc(%rip)     # 0x43d04
je 0x11f57
movl 0x10(%rbx), %edx
leaq 0x2c6ac(%rip), %rdi     # 0x3e5f0
leaq 0x13d88(%rip), %rsi     # 0x25cd3
movq %r14, %rcx
xorl %eax, %eax
callq 0x4290
jmp 0x11f6f
leaq 0x2c692(%rip), %rdi     # 0x3e5f0
leaq 0x13d89(%rip), %rsi     # 0x25cee
movq %r14, %rdx
xorl %eax, %eax
callq 0x4290
leaq 0x2c67a(%rip), %rdi     # 0x3e5f0
callq 0xebec
leaq 0x13d7d(%rip), %rsi     # 0x25cff
movl $0x6, %edx
movq %r15, %rdi
callq 0x40a0
testl %eax, %eax
je 0x1200e
leaq 0x13d7b(%rip), %rsi     # 0x25d15
movl $0x6, %edx
movq %r15, %rdi
callq 0x40a0
testl %eax, %eax
je 0x12085
leaq 0x13010(%rip), %rsi     # 0x24fc6
movl $0x4, %edx
movq %r15, %rdi
callq 0x40a0
testl %eax, %eax
je 0x1208f
leaq 0x1300b(%rip), %rsi     # 0x24fdd
movl $0x4, %edx
movq %r15, %rdi
callq 0x40a0
movl $0x200, %r12d           # imm = 0x200
testl %eax, %eax
je 0x12159
leaq 0x185ea(%rip), %rsi     # 0x2a5de
movl $0x7, %edx
movq %r15, %rdi
callq 0x40a0
testl %eax, %eax
jne 0x12132
jmp 0x12159
movl $0x3a41, %eax           # imm = 0x3A41
xorl 0x28357(%rip), %eax     # 0x3a370
movzbl 0x28352(%rip), %ecx     # 0x3a372
xorl $0x20, %ecx
orw %ax, %cx
je 0x12046
movl $0x3a46, %eax           # imm = 0x3A46
xorl 0x2833d(%rip), %eax     # 0x3a370
movzbl 0x28338(%rip), %ecx     # 0x3a372
xorl $0x20, %ecx
orw %ax, %cx
jne 0x11f93
leaq 0x2da83(%rip), %rdi     # 0x3fad0
callq 0x4110
testq %rax, %rax
je 0x12114
addl $0xd, %eax
movl %eax, %edi
callq 0x6469
movq %rax, %r15
leaq 0x13c97(%rip), %rsi     # 0x25d06
leaq 0x2da5a(%rip), %rdx     # 0x3fad0
movq %rax, %rdi
xorl %eax, %eax
callq 0x4290
jmp 0x1211b
testq %rbx, %rbx
je 0x120b6
movl 0x10(%rbx), %edi
jmp 0x120b8
leaq 0x27c02(%rip), %rax     # 0x39c98
cmpl $0x0, (%rax)
je 0x120bf
cmpl $0x0, 0x2a30a(%rip)     # 0x3c3ac
je 0x120bf
leaq 0x18533(%rip), %r15     # 0x2a5de
movl $0x200, %r12d           # imm = 0x200
jmp 0x12159
xorl %edi, %edi
callq 0x115ae
jmp 0x1212f
leaq 0x12efa(%rip), %rsi     # 0x24fc0
movl $0x5, %edx
movq %r14, %rdi
callq 0x40a0
testl %eax, %eax
je 0x1231d
leaq 0x12ee9(%rip), %rsi     # 0x24fcb
movl $0x8, %edx
movq %r14, %rdi
callq 0x40a0
testl %eax, %eax
je 0x12343
movq %r14, %rdi
movl $0x3a, %esi
callq 0x4130
leaq 0x1(%rax), %r12
testq %rax, %rax
cmoveq %r14, %r12
jmp 0x1237e
leaq 0x13a6d(%rip), %r15     # 0x25b88
leaq 0x14f72(%rip), %rdx     # 0x27094
movq %r15, %rdi
movl $0x3, %esi
callq 0x11449
movq %rax, %r15
leaq 0x2c4b7(%rip), %rdi     # 0x3e5f0
leaq 0x13be4(%rip), %rsi     # 0x25d24
movq %r15, %rdx
xorl %eax, %eax
callq 0x4290
leaq 0x2c49f(%rip), %rdi     # 0x3e5f0
callq 0xebec
xorl %r12d, %r12d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x113ac
movl 0x31b99(%rip), %r12d    # 0x43d04
testl %r12d, %r12d
je 0x121c3
cmpb $0x0, 0x2d949(%rip)     # 0x3fac0
jne 0x121a6
leaq 0x1845e(%rip), %rsi     # 0x2a5de
movq %r15, %rdi
callq 0x41b0
testl %eax, %eax
je 0x121a6
leaq 0x2c45d(%rip), %rdi     # 0x3e5f0
leaq 0x13b9e(%rip), %rsi     # 0x25d38
movl %r12d, %edx
xorl %eax, %eax
callq 0x4290
jmp 0x121ee
leaq 0x2c443(%rip), %rdi     # 0x3e5f0
leaq 0x13b75(%rip), %rsi     # 0x25d29
movl %r12d, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x4290
jmp 0x121ee
leaq 0x18414(%rip), %rsi     # 0x2a5de
movq %r15, %rdi
callq 0x41b0
testl %eax, %eax
jne 0x121ee
leaq 0x2c413(%rip), %rdi     # 0x3e5f0
leaq 0x13b65(%rip), %rsi     # 0x25d49
movq %r14, %rdx
xorl %eax, %eax
callq 0x4290
leaq 0x2c3fb(%rip), %rdi     # 0x3e5f0
callq 0xebec
leaq 0x27a8f(%rip), %rax     # 0x39c90
cmpl $0x0, (%rax)
je 0x122c4
cmpl $0x0, 0x2d8ab(%rip)     # 0x3fabc
jne 0x122c4
cmpl $0x0, 0x2a18e(%rip)     # 0x3c3ac
jne 0x122c4
leaq 0x12dee(%rip), %rsi     # 0x25019
movq %r14, %rdi
callq 0x42c0
testq %rax, %rax
je 0x12257
leaq 0x12dda(%rip), %r15     # 0x25019
movb $0x3a, (%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x42c0
testq %rax, %rax
jne 0x1223f
jmp 0x12257
movb $0x27, (%rax)
movq %r14, %rdi
movl $0x22, %esi
callq 0x4130
testq %rax, %rax
jne 0x12254
cmpl $0x0, 0x31a94(%rip)     # 0x43d04
je 0x1228f
movl 0x10(%rbx), %edx
leaq 0x2c374(%rip), %rdi     # 0x3e5f0
leaq 0x13a50(%rip), %rsi     # 0x25cd3
movq %r14, %rcx
xorl %eax, %eax
callq 0x4290
jmp 0x122a7
leaq 0x2c35a(%rip), %rdi     # 0x3e5f0
leaq 0x13a51(%rip), %rsi     # 0x25cee
movq %r14, %rdx
xorl %eax, %eax
callq 0x4290
leaq 0x2c342(%rip), %rdi     # 0x3e5f0
callq 0xebec
testl %ebp, %ebp
jne 0x122c4
movq %rbx, %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x113ac
movq $0x0, 0x30a29(%rip) # 0x42cf8
movb $0x0, 0x2b2fa(%rip)     # 0x3d5d0
movq 0x28083(%rip), %rdi     # 0x3a360
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4220
movq 0x24d01(%rip), %rax     # 0x36ff8
movq (%rax), %rdi
leaq 0x24e8f(%rip), %rax     # 0x37190
movq (%rax), %rdx
movl 0x10(%rbx), %ecx
leaq 0x1399a(%rip), %rsi     # 0x25ca8
movq %r14, %r8
xorl %eax, %eax
callq 0x41c0
jmp 0x11ef4
movq %r14, %r13
addq $0x5, %r13
leaq 0x1470f(%rip), %rsi     # 0x26a3a
movq %r14, %rdi
callq 0x42c0
testq %rax, %rax
leaq 0x12c9b(%rip), %r12     # 0x24fd8
cmoveq %r13, %r12
jmp 0x1237e
movslq 0x309a6(%rip), %rax     # 0x42cf0
leaq 0x3079f(%rip), %rcx     # 0x42af0
movq -0x8(%rcx,%rax,8), %rdi
leaq 0x146dd(%rip), %rsi     # 0x26a3a
callq 0x42c0
testq %rax, %rax
leaq 0x139b0(%rip), %rax     # 0x25d1c
leaq 0x13928(%rip), %r12     # 0x25c9b
cmoveq %rax, %r12
movb $0x1, 0x3198a(%rip)     # 0x43d08
movq %r12, %rdi
movl $0x3b, %esi
callq 0x4130
testq %rax, %rax
jne 0x123a4
leaq 0x1398a(%rip), %rsi     # 0x25d21
movq %r12, %rdi
callq 0x42c0
testq %rax, %rax
je 0x123b8
leaq 0x2c245(%rip), %rdi     # 0x3e5f0
movq %r12, %rsi
callq 0x40b0
jmp 0x1214a
movq %r12, %r15
jmp 0x12132