// File: /workspace/github_c_makefile_star2_O0/nimble-code[P]Modex/Src/xtract.c
// Function: x_frag
void
x_frag(treenode *root, FILE *fd)
{	FILE *ofp = fp;

	if (!root
	||  root->hdr.type == TN_FUNC_DEF
	||  root->hdr.type == TN_FOR)	/* was FOR_T */
		return;

	fp = fd;
	ByPass = 1;	/* bypass the lookup table */
	decl_cnt = 1;

	vis_start();
	modex_recur(root);

	if (root->hdr.line >= 0
	&&  strlen(OutBuf) > 0
	&&  (strstr(OutBuf, "enum ") || strstr(OutBuf, "struct ")))	/* reason? */
	{	cleanse(OutBuf);
		/* fprintf(stderr, "x_frag OutBuf=<%s> want=<%s>\n", OutBuf, want); */
		if (imported(OutBuf, want, 1))
		{	if (du_mode)	/* -defuse */
			{	char *yy, *y = OutBuf;
				while (*y == '*' || *y == ' ' || *y == '\t')
				{	y++;
				}
				if ((yy = strstr(y, "[]")) != NULL)
				{	*yy = '\0';
				}
				fprintf(fp, "int %s; /* Local to %s from symtab */\n",
					y, want);
			} else
			{	if (!strchr(OutBuf, '='))	// should prevent this
				fprintf(fp, "c_state \"%s\" \"Local %s\"\t/* from symtab */\n",
					OutBuf, want);
	}	}	}

	root->hdr.line = -root->hdr.line - 1;	/* mark visited */
	decl_cnt = 0;
	ByPass = 0;
	fp = ofp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x31879(%rip), %rax     # 0x48540
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x16ce6
movq -0x8(%rbp), %rax
cmpl $0x1, 0x1c(%rax)
je 0x16ce6
movq -0x8(%rbp), %rax
cmpl $0x1e, 0x1c(%rax)
jne 0x16ceb
jmp 0x16ec1
movq -0x10(%rbp), %rax
movq %rax, 0x3184a(%rip)     # 0x48540
movl $0x1, 0x3b1e0(%rip)     # 0x51ee0
movl $0x1, 0x3be26(%rip)     # 0x52b30
callq 0x141b0
movq -0x8(%rbp), %rdi
callq 0xadb0
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jl 0x16e8f
leaq 0x31823(%rip), %rdi     # 0x48550
callq 0x40f0
cmpq $0x0, %rax
jbe 0x16e8f
leaq 0x3180d(%rip), %rdi     # 0x48550
leaq 0x1f438(%rip), %rsi     # 0x36182
callq 0x4280
cmpq $0x0, %rax
jne 0x16d72
leaq 0x317f4(%rip), %rdi     # 0x48550
leaq 0x1f425(%rip), %rsi     # 0x36188
callq 0x4280
cmpq $0x0, %rax
je 0x16e8f
leaq 0x317d7(%rip), %rdi     # 0x48550
callq 0x10010
leaq 0x2e3f3(%rip), %rax     # 0x45178
movq (%rax), %rsi
leaq 0x317c1(%rip), %rdi     # 0x48550
movl $0x1, %edx
callq 0x10430
cmpl $0x0, %eax
je 0x16e8d
leaq 0x30e7f(%rip), %rax     # 0x47c28
cmpl $0x0, (%rax)
je 0x16e4c
leaq 0x31797(%rip), %rax     # 0x48550
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x2a, %ecx
movb %al, -0x29(%rbp)
je 0x16def
movq -0x28(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x20, %ecx
movb %al, -0x29(%rbp)
je 0x16def
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x16df8
jmp 0x16e06
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x16dbd
movq -0x28(%rbp), %rdi
leaq 0x1c31f(%rip), %rsi     # 0x33130
callq 0x4280
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x16e27
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movq 0x31712(%rip), %rdi     # 0x48540
movq -0x28(%rbp), %rdx
leaq 0x2e33f(%rip), %rax     # 0x45178
movq (%rax), %rcx
leaq 0x1f569(%rip), %rsi     # 0x363ac
movb $0x0, %al
callq 0x4190
jmp 0x16e8b
leaq 0x316fd(%rip), %rdi     # 0x48550
movl $0x3d, %esi
callq 0x4110
cmpq $0x0, %rax
jne 0x16e89
movq 0x316d6(%rip), %rdi     # 0x48540
leaq 0x2e307(%rip), %rax     # 0x45178
movq (%rax), %rcx
leaq 0x1f558(%rip), %rsi     # 0x363d3
leaq 0x316ce(%rip), %rdx     # 0x48550
movb $0x0, %al
callq 0x4190
jmp 0x16e8b
jmp 0x16e8d
jmp 0x16e8f
movq -0x8(%rbp), %rax
xorl %ecx, %ecx
subl 0x10(%rax), %ecx
subl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movl $0x0, 0x3bc84(%rip)     # 0x52b30
movl $0x0, 0x3b02a(%rip)     # 0x51ee0
movq -0x18(%rbp), %rax
movq %rax, 0x3167f(%rip)     # 0x48540
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)