// File: /workspace/github_c_makefile_star2_O2/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 0x2685e(%rip), %rax     # 0x369d8
cmpl $0x0, (%rax)
je 0x105a7
cmpb $0x0, 0x271f6(%rip)     # 0x37380
je 0x105a7
cmpb $0x1, 0x30b79(%rip)     # 0x40d10
jne 0x101b1
movq 0x271d0(%rip), %rsi     # 0x37370
leaq 0x271d9(%rip), %rdi     # 0x37380
callq 0x4170
jmp 0x105a7
movq %rdi, %rbx
callq 0x1009f
movq %rbx, %rdi
callq 0xfc6c
movq %rax, %r15
leaq 0x271b5(%rip), %rdi     # 0x37380
callq 0xa50a
movq %rax, %r14
leaq 0x129c9(%rip), %rsi     # 0x22ba3
movq %r15, %rdi
callq 0x41b0
testl %eax, %eax
jne 0x101fd
leaq 0x11d01(%rip), %r15     # 0x21eee
leaq 0x2688c(%rip), %rax     # 0x36a80
cmpl $0x0, (%rax)
jne 0x105d0
leaq 0x11cea(%rip), %rsi     # 0x21eee
movq %r15, %rdi
callq 0x41b0
movl %eax, %ebp
testl %eax, %eax
je 0x10517
leaq 0x26843(%rip), %rax     # 0x36a60
cmpl $0x0, (%rax)
je 0x10280
cmpb $0x44, (%r14)
jne 0x10236
cmpb $0x3a, 0x1(%r14)
jne 0x10236
cmpb $0x20, 0x2(%r14)
je 0x10280
cmpl $0x0, 0x30ad7(%rip)     # 0x40d14
je 0x1025c
movl 0x10(%rbx), %edx
leaq 0x2b3b7(%rip), %rdi     # 0x3b600
leaq 0x12983(%rip), %rsi     # 0x22bd3
movq %r14, %rcx
xorl %eax, %eax
callq 0x42a0
jmp 0x10274
leaq 0x2b39d(%rip), %rdi     # 0x3b600
leaq 0x12984(%rip), %rsi     # 0x22bee
movq %r14, %rdx
xorl %eax, %eax
callq 0x42a0
leaq 0x2b385(%rip), %rdi     # 0x3b600
callq 0xd07c
leaq 0x12978(%rip), %rsi     # 0x22bff
pushq $0x6
popq %rdx
movq %r15, %rdi
callq 0x40a0
testl %eax, %eax
je 0x10309
leaq 0x12978(%rip), %rsi     # 0x22c15
pushq $0x6
popq %rdx
movq %r15, %rdi
callq 0x40a0
testl %eax, %eax
je 0x10380
leaq 0x11c0f(%rip), %rsi     # 0x21ec6
pushq $0x4
popq %rdx
movq %r15, %rdi
callq 0x40a0
testl %eax, %eax
je 0x1038a
leaq 0x11c0c(%rip), %rsi     # 0x21edd
pushq $0x4
popq %rdx
movq %r15, %rdi
callq 0x40a0
movl $0x200, %r12d           # imm = 0x200
testl %eax, %eax
je 0x1044c
leaq 0x171fd(%rip), %rsi     # 0x274ee
pushq $0x7
popq %rdx
movq %r15, %rdi
callq 0x40a0
testl %eax, %eax
jne 0x10425
jmp 0x1044c
leaq 0x27070(%rip), %rdi     # 0x37380
leaq 0x11bcb(%rip), %rsi     # 0x21ee2
pushq $0x3
popq %rdx
callq 0x4250
testl %eax, %eax
je 0x10341
leaq 0x27056(%rip), %rdi     # 0x37380
leaq 0x11bb5(%rip), %rsi     # 0x21ee6
pushq $0x3
popq %rdx
callq 0x4250
testl %eax, %eax
jne 0x10296
leaq 0x2c798(%rip), %rdi     # 0x3cae0
callq 0x4110
testq %rax, %rax
je 0x10409
addl $0xd, %eax
movl %eax, %edi
callq 0x4739
movq %rax, %r15
leaq 0x1289c(%rip), %rsi     # 0x22c06
leaq 0x2c76f(%rip), %rdx     # 0x3cae0
movq %rax, %rdi
xorl %eax, %eax
callq 0x42a0
jmp 0x10410
testq %rbx, %rbx
je 0x103b1
movl 0x10(%rbx), %edi
jmp 0x103b3
leaq 0x26917(%rip), %rax     # 0x36ca8
cmpl $0x0, (%rax)
je 0x103ba
cmpl $0x0, 0x2901f(%rip)     # 0x393bc
je 0x103ba
leaq 0x17148(%rip), %r15     # 0x274ee
movl $0x200, %r12d           # imm = 0x200
jmp 0x1044c
xorl %edi, %edi
callq 0xf8c7
jmp 0x10422
leaq 0x11aff(%rip), %rsi     # 0x21ec0
pushq $0x5
popq %rdx
movq %r14, %rdi
callq 0x40a0
testl %eax, %eax
je 0x105fd
leaq 0x11af0(%rip), %rsi     # 0x21ecb
pushq $0x8
popq %rdx
movq %r14, %rdi
callq 0x40a0
testl %eax, %eax
je 0x10623
pushq $0x3a
popq %rsi
movq %r14, %rdi
callq 0x4130
leaq 0x1(%rax), %r12
testq %rax, %rax
cmoveq %r14, %r12
jmp 0x1063c
leaq 0x12678(%rip), %r15     # 0x22a88
leaq 0x13b7a(%rip), %rdx     # 0x23f91
pushq $0x3
popq %rsi
movq %r15, %rdi
callq 0xf760
movq %rax, %r15
leaq 0x2b1d4(%rip), %rdi     # 0x3b600
leaq 0x127f1(%rip), %rsi     # 0x22c24
movq %r15, %rdx
xorl %eax, %eax
callq 0x42a0
leaq 0x2b1bc(%rip), %rdi     # 0x3b600
callq 0xd07c
xorl %r12d, %r12d
movq %rbx, %rdi
movl %r12d, %esi
callq 0xf6c1
movl 0x308b6(%rip), %r12d    # 0x40d14
testl %r12d, %r12d
je 0x104b6
cmpb $0x0, 0x2c666(%rip)     # 0x3cad0
jne 0x10499
leaq 0x1707b(%rip), %rsi     # 0x274ee
movq %r15, %rdi
callq 0x41b0
testl %eax, %eax
je 0x10499
leaq 0x2b17a(%rip), %rdi     # 0x3b600
leaq 0x127ab(%rip), %rsi     # 0x22c38
movl %r12d, %edx
xorl %eax, %eax
callq 0x42a0
jmp 0x104e1
leaq 0x2b160(%rip), %rdi     # 0x3b600
leaq 0x12782(%rip), %rsi     # 0x22c29
movl %r12d, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x42a0
jmp 0x104e1
leaq 0x17031(%rip), %rsi     # 0x274ee
movq %r15, %rdi
callq 0x41b0
testl %eax, %eax
jne 0x104e1
leaq 0x2b130(%rip), %rdi     # 0x3b600
leaq 0x12772(%rip), %rsi     # 0x22c49
movq %r14, %rdx
xorl %eax, %eax
callq 0x42a0
leaq 0x2b118(%rip), %rdi     # 0x3b600
callq 0xd07c
leaq 0x267ac(%rip), %rax     # 0x36ca0
cmpl $0x0, (%rax)
je 0x105a7
cmpl $0x0, 0x2c5c8(%rip)     # 0x3cacc
jne 0x105a7
cmpl $0x0, 0x28eab(%rip)     # 0x393bc
jne 0x105a7
leaq 0x119fb(%rip), %r15     # 0x21f19
movq %r14, %rdi
movq %r15, %rsi
callq 0x42d0
testq %rax, %rax
je 0x10533
movb $0x3a, (%rax)
jmp 0x1051e
pushq $0x22
popq %r15
movq %r14, %rdi
movl %r15d, %esi
callq 0x4130
testq %rax, %rax
je 0x1054c
movb $0x27, (%rax)
jmp 0x10537
cmpl $0x0, 0x307c1(%rip)     # 0x40d14
je 0x10572
movl 0x10(%rbx), %edx
leaq 0x2b0a1(%rip), %rdi     # 0x3b600
leaq 0x1266d(%rip), %rsi     # 0x22bd3
movq %r14, %rcx
xorl %eax, %eax
callq 0x42a0
jmp 0x1058a
leaq 0x2b087(%rip), %rdi     # 0x3b600
leaq 0x1266e(%rip), %rsi     # 0x22bee
movq %r14, %rdx
xorl %eax, %eax
callq 0x42a0
leaq 0x2b06f(%rip), %rdi     # 0x3b600
callq 0xd07c
testl %ebp, %ebp
jne 0x105a7
movq %rbx, %rdi
movl $0x200, %esi            # imm = 0x200
callq 0xf6c1
andq $0x0, 0x2f759(%rip)     # 0x3fd08
movb $0x0, 0x2a02a(%rip)     # 0x3a5e0
movq 0x26db3(%rip), %rdi     # 0x37370
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4220
movq 0x23a21(%rip), %rax     # 0x33ff8
movq (%rax), %rdi
leaq 0x23bbf(%rip), %rax     # 0x341a0
movq (%rax), %rdx
movl 0x10(%rbx), %ecx
leaq 0x125ba(%rip), %rsi     # 0x22ba8
movq %r14, %r8
xorl %eax, %eax
callq 0x41c0
jmp 0x101fd
movq %r14, %r13
addq $0x5, %r13
leaq 0x1332f(%rip), %rsi     # 0x2393a
movq %r14, %rdi
callq 0x42d0
testq %rax, %rax
leaq 0x118bb(%rip), %r12     # 0x21ed8
cmoveq %r13, %r12
jmp 0x1063c
leaq 0x125f2(%rip), %rdi     # 0x22c1c
pushq $0x1
popq %rsi
callq 0x10044
movq %rax, %r12
movb $0x1, 0x306dc(%rip)     # 0x40d18
pushq $0x3b
popq %rsi
movq %r12, %rdi
callq 0x4130
testq %rax, %rax
jne 0x10660
leaq 0x125ce(%rip), %rsi     # 0x22c21
movq %r12, %rdi
callq 0x42d0
testq %rax, %rax
je 0x10674
leaq 0x2af99(%rip), %rdi     # 0x3b600
movq %r12, %rsi
callq 0x40b0
jmp 0x1043d
movq %r12, %r15
jmp 0x10425