// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: modex_tree
void
modex_tree(treenode *root, char *lut)
{	char t_file[512];

	modex_reset();
	get_lut(o_base, lut);
	get_defaults(lut);

	if (!globals_only
	&&  !show_deps
	&&  !new_lut)
	{	strcpy(t_file, o_base);
		strcat(t_file, ".pml");

		if (strlen(c_file) > 0
		&&  strcmp(c_file, t_file) == 0)	/* e.g. _modex_all.pml */
		{	fprintf(fp, "\n/* extracted from %s */\n\n", cur_in);
		} else
		{	strcpy(c_file, t_file);
			if (fp)
			{
if (debug_io) fprintf(stderr, "close ... %p\n", fp);
				Fclose(fp);
				fp = 0;
			}
	
			if ((fp = fopen(t_file, MFLAGS)) == NULL)
			{	fprintf(stderr, "%s: cannot create '%s'\n", progname, t_file);
				exit(1);
			}
if (debug_io) fprintf(stderr, "open %s -> %p\n", t_file, fp);
			fprintf(fp, "/* %s */\n", VERSION);
			fprintf(fp, "/* extracted from %s */\n\n", cur_in);
			fflush(fp);
			add_fnm(t_file);
		}
	} else
		suppress = 1;

	if (is_icall(want))
	{	extended = 1;
	}

	if (Verbose_cmds)
	printf("want %s, wanttype %s, lut %s\n", want, wanttype, lut);

	modex_any(root, 1);	/* want, wanttype, lut */

	if (new_lut)
	{	dump_lut();
	}

	if (!globals_only
	&&  !show_deps)
	{	if (!new_lut)
		{	doreturn(3);	/* local decls to fp */
		}
		if (redundancies)
		{	check_lut(stdout);
	}	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %r14
movq %rdi, %rbx
callq 0x14005
leaq 0x258bb(%rip), %rdi     # 0x39a80
movq %r14, %rsi
callq 0x10020
movq %r14, %rdi
callq 0x10ff8
leaq 0x25ab0(%rip), %r13     # 0x39c8c
cmpl $0x0, (%r13)
leaq 0x25878(%rip), %rbp     # 0x39a60
leaq 0x25aad(%rip), %r12     # 0x39c9c
jne 0x14312
cmpl $0x0, (%rbp)
jne 0x14312
cmpl $0x0, (%r12)
jne 0x14312
leaq 0x2586f(%rip), %rsi     # 0x39a80
movq %rsp, %r15
movq %r15, %rdi
callq 0x40b0
movq %r15, %rdi
callq 0x4110
movl $0x6c6d702e, (%rsp,%rax) # imm = 0x6C6D702E
movb $0x0, 0x4(%rsp,%rax)
cmpb $0x0, 0x31f89(%rip)     # 0x461c0
je 0x14250
leaq 0x31f80(%rip), %rdi     # 0x461c0
movq %rsp, %rsi
callq 0x41b0
testl %eax, %eax
je 0x143bf
leaq 0x31f69(%rip), %rdi     # 0x461c0
movq %rsp, %rsi
callq 0x40b0
movq 0x260fa(%rip), %rdx     # 0x3a360
testq %rdx, %rdx
je 0x14292
leaq 0x25796(%rip), %rax     # 0x39a08
cmpl $0x0, (%rax)
jne 0x1440a
movq 0x260de(%rip), %rdi     # 0x3a360
callq 0x793c
movq $0x0, 0x260ce(%rip) # 0x3a360
leaq 0x16646(%rip), %rsi     # 0x2a8df
movq %rsp, %rdi
callq 0x4260
movq %rax, 0x260b8(%rip)     # 0x3a360
testq %rax, %rax
je 0x14427
leaq 0x25750(%rip), %rcx     # 0x39a08
cmpl $0x0, (%rcx)
jne 0x143e7
movq 0x26098(%rip), %rdi     # 0x3a360
leaq 0x22eb1(%rip), %rax     # 0x37180
movq (%rax), %rdx
leaq 0x11e38(%rip), %rsi     # 0x26111
xorl %eax, %eax
callq 0x41c0
movq 0x26079(%rip), %rdi     # 0x3a360
leaq 0x11de3(%rip), %rsi     # 0x260d1
leaq 0x25e4b(%rip), %rdx     # 0x3a140
xorl %eax, %eax
callq 0x41c0
movq 0x2605d(%rip), %rdi     # 0x3a360
callq 0x4220
movq %rsp, %rdi
callq 0xe728
jmp 0x1431f
leaq 0x25997(%rip), %rax     # 0x39cb0
movl $0x1, (%rax)
leaq 0x22e72(%rip), %r15     # 0x37198
movq (%r15), %rdi
callq 0x783b
testl %eax, %eax
je 0x1433f
leaq 0x2594b(%rip), %rax     # 0x39c84
movl $0x1, (%rax)
leaq 0x256c6(%rip), %rax     # 0x39a0c
cmpl $0x0, (%rax)
je 0x14369
movq (%r15), %rsi
leaq 0x22e53(%rip), %rax     # 0x371a8
movq (%rax), %rdx
leaq 0x11dbc(%rip), %rdi     # 0x2611b
movq %r14, %rcx
xorl %eax, %eax
callq 0x4140
movq %rbx, %rdi
movl $0x1, %esi
callq 0x12679
cmpl $0x0, (%r12)
jne 0x143e0
movl (%rbp), %eax
orl (%r13), %eax
jne 0x143ad
cmpl $0x0, (%r12)
jne 0x14392
callq 0x13dc2
leaq 0x25913(%rip), %rax     # 0x39cac
cmpl $0x0, (%rax)
je 0x143ad
movq 0x22c2b(%rip), %rax     # 0x36fd0
movq (%rax), %rdi
callq 0x11304
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x25f9a(%rip), %rdi     # 0x3a360
leaq 0x11d03(%rip), %rsi     # 0x260d0
leaq 0x25d6c(%rip), %rdx     # 0x3a140
xorl %eax, %eax
callq 0x41c0
jmp 0x1431f
callq 0x4431
jmp 0x1437d
movq 0x22c0a(%rip), %rcx     # 0x36ff8
movq (%rcx), %rdi
leaq 0x1100b(%rip), %rsi     # 0x25403
movq %rsp, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x41c0
jmp 0x142c1
movq 0x22be7(%rip), %rax     # 0x36ff8
movq (%rax), %rdi
leaq 0x11cd0(%rip), %rsi     # 0x260eb
xorl %eax, %eax
callq 0x41c0
jmp 0x1427b
movq %rsp, %rdi
callq 0x4f14