// File: /workspace/github_c_makefile_star2_O2/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 0x1273e
leaq 0x2416f(%rip), %rdi     # 0x36a90
movq %r14, %rsi
callq 0xe511
movq %r14, %rdi
callq 0xf1b9
leaq 0x24364(%rip), %r13     # 0x36c9c
cmpl $0x0, (%r13)
leaq 0x2412c(%rip), %rbp     # 0x36a70
leaq 0x24361(%rip), %r12     # 0x36cac
jne 0x12a63
cmpl $0x0, (%rbp)
jne 0x12a63
cmpl $0x0, (%r12)
jne 0x12a63
leaq 0x24123(%rip), %rsi     # 0x36a90
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, 0x3083d(%rip)     # 0x431d0
je 0x129ac
leaq 0x30834(%rip), %rdi     # 0x431d0
movq %rsp, %rsi
callq 0x41b0
testl %eax, %eax
je 0x12b13
leaq 0x3081d(%rip), %rdi     # 0x431d0
movq %rsp, %rsi
callq 0x40b0
movq 0x249ae(%rip), %rdx     # 0x37370
testq %rdx, %rdx
je 0x129e7
leaq 0x2404a(%rip), %rax     # 0x36a18
cmpl $0x0, (%rax)
jne 0x12b5e
movq %rdx, %rdi
callq 0x59e0
andq $0x0, 0x24989(%rip)     # 0x37370
leaq 0x14e01(%rip), %rsi     # 0x277ef
movq %rsp, %rdi
callq 0x4270
movq %rax, 0x24973(%rip)     # 0x37370
testq %rax, %rax
je 0x12b82
leaq 0x2400b(%rip), %rcx     # 0x36a18
cmpl $0x0, (%rcx)
jne 0x12b34
leaq 0x21773(%rip), %rcx     # 0x34190
movq (%rcx), %rdx
leaq 0x105ea(%rip), %rsi     # 0x23011
movq %rax, %rdi
xorl %eax, %eax
callq 0x41c0
movq 0x24938(%rip), %rdi     # 0x37370
leaq 0x10592(%rip), %rsi     # 0x22fd1
leaq 0x2470a(%rip), %rdx     # 0x37150
xorl %eax, %eax
callq 0x41c0
movq 0x2491c(%rip), %rdi     # 0x37370
callq 0x4220
movq %rsp, %rdi
callq 0xcb92
jmp 0x12a70
leaq 0x24256(%rip), %rax     # 0x36cc0
movl $0x1, (%rax)
leaq 0x21731(%rip), %r15     # 0x341a8
movq (%r15), %rdi
callq 0x58a4
testl %eax, %eax
je 0x12a90
leaq 0x2420a(%rip), %rax     # 0x36c94
movl $0x1, (%rax)
leaq 0x23f85(%rip), %rax     # 0x36a1c
cmpl $0x0, (%rax)
je 0x12aba
movq (%r15), %rsi
leaq 0x21712(%rip), %rax     # 0x341b8
movq (%rax), %rdx
leaq 0x1056b(%rip), %rdi     # 0x2301b
movq %r14, %rcx
xorl %eax, %eax
callq 0x4140
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x10939
cmpl $0x0, (%r12)
je 0x12ad1
callq 0xf4ad
movl (%rbp), %eax
orl (%r13), %eax
jne 0x12b01
cmpl $0x0, (%r12)
jne 0x12ae6
callq 0x12514
leaq 0x241cf(%rip), %rax     # 0x36cbc
cmpl $0x0, (%rax)
je 0x12b01
movq 0x214d7(%rip), %rax     # 0x33fd0
movq (%rax), %rdi
callq 0xf612
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x24856(%rip), %rdi     # 0x37370
leaq 0x104af(%rip), %rsi     # 0x22fd0
leaq 0x24628(%rip), %rdx     # 0x37150
xorl %eax, %eax
callq 0x41c0
jmp 0x12a70
movq 0x214bd(%rip), %rcx     # 0x33ff8
movq (%rcx), %rdi
leaq 0xf7be(%rip), %rsi      # 0x22303
movq %rsp, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x41c0
movq 0x24817(%rip), %rax     # 0x37370
jmp 0x12a16
movq 0x21493(%rip), %rax     # 0x33ff8
movq (%rax), %rdi
leaq 0x1047c(%rip), %rsi     # 0x22feb
xorl %eax, %eax
callq 0x41c0
movq 0x247f3(%rip), %rdx     # 0x37370
jmp 0x129d7
movq 0x2146f(%rip), %rax     # 0x33ff8
movq (%rax), %rdi
leaq 0x2160d(%rip), %rax     # 0x341a0
movq (%rax), %rdx
leaq 0x1045c(%rip), %rsi     # 0x22ff9
movq %rsp, %rcx
xorl %eax, %eax
callq 0x41c0
pushq $0x1
popq %rdi
callq 0x42b0