// File: /workspace/github_c_makefile_star2_O3/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 0x14111
leaq 0x247bc(%rip), %rdi     # 0x38a90
movq %r14, %rsi
callq 0xff28
movq %r14, %rdi
callq 0x110b3
leaq 0x249b1(%rip), %r13     # 0x38c9c
cmpl $0x0, (%r13)
leaq 0x24779(%rip), %rbp     # 0x38a70
leaq 0x249ae(%rip), %r12     # 0x38cac
jne 0x14419
cmpl $0x0, (%rbp)
jne 0x14419
cmpl $0x0, (%r12)
jne 0x14419
leaq 0x24770(%rip), %rsi     # 0x38a90
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, 0x30e8a(%rip)     # 0x451d0
je 0x1435f
leaq 0x30e81(%rip), %rdi     # 0x451d0
movq %rsp, %rsi
callq 0x41c0
testl %eax, %eax
je 0x144c6
leaq 0x30e6a(%rip), %rdi     # 0x451d0
movq %rsp, %rsi
callq 0x40b0
movq 0x24ffb(%rip), %rdx     # 0x39370
testq %rdx, %rdx
je 0x1439d
leaq 0x24697(%rip), %rax     # 0x38a18
cmpl $0x0, (%rax)
jne 0x14518
movq %rdx, %rdi
callq 0x77d0
movq $0x0, 0x24fd3(%rip) # 0x39370
leaq 0x1553b(%rip), %rsi     # 0x298df
movq %rsp, %rdi
callq 0x4270
movq %rax, 0x24fbd(%rip)     # 0x39370
testq %rax, %rax
je 0x1453c
leaq 0x24655(%rip), %rcx     # 0x38a18
cmpl $0x0, (%rcx)
jne 0x144ee
leaq 0x21dbd(%rip), %rcx     # 0x36190
movq (%rcx), %rdx
leaq 0x10d34(%rip), %rsi     # 0x25111
movq %rax, %rdi
xorl %eax, %eax
callq 0x41d0
movq 0x24f82(%rip), %rdi     # 0x39370
leaq 0x10cdc(%rip), %rsi     # 0x250d1
leaq 0x24d54(%rip), %rdx     # 0x39150
xorl %eax, %eax
callq 0x41d0
movq 0x24f66(%rip), %rdi     # 0x39370
callq 0x4230
movq %rsp, %rdi
callq 0xe5e3
jmp 0x14426
leaq 0x248a0(%rip), %rax     # 0x38cc0
movl $0x1, (%rax)
leaq 0x21d7b(%rip), %r15     # 0x361a8
movq (%r15), %rdi
callq 0x76d0
testl %eax, %eax
je 0x14446
leaq 0x24854(%rip), %rax     # 0x38c94
movl $0x1, (%rax)
leaq 0x245cf(%rip), %rax     # 0x38a1c
cmpl $0x0, (%rax)
je 0x14470
movq (%r15), %rsi
leaq 0x21d5c(%rip), %rax     # 0x361b8
movq (%rax), %rdx
leaq 0x10cb5(%rip), %rdi     # 0x2511b
movq %r14, %rcx
xorl %eax, %eax
callq 0x4140
movq %rbx, %rdi
movl $0x1, %esi
callq 0x12743
cmpl $0x0, (%r12)
jne 0x144e7
movl (%rbp), %eax
orl (%r13), %eax
jne 0x144b4
cmpl $0x0, (%r12)
jne 0x14499
callq 0x13ece
leaq 0x2481c(%rip), %rax     # 0x38cbc
cmpl $0x0, (%rax)
je 0x144b4
movq 0x21b24(%rip), %rax     # 0x35fd0
movq (%rax), %rdi
callq 0x113cc
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x24ea3(%rip), %rdi     # 0x39370
leaq 0x10bfc(%rip), %rsi     # 0x250d0
leaq 0x24c75(%rip), %rdx     # 0x39150
xorl %eax, %eax
callq 0x41d0
jmp 0x14426
callq 0x4432
jmp 0x14484
movq 0x21b03(%rip), %rcx     # 0x35ff8
movq (%rcx), %rdi
leaq 0xff04(%rip), %rsi      # 0x24403
movq %rsp, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x41d0
movq 0x24e5d(%rip), %rax     # 0x39370
jmp 0x143cc
movq 0x21ad9(%rip), %rax     # 0x35ff8
movq (%rax), %rdi
leaq 0x10bc2(%rip), %rsi     # 0x250eb
xorl %eax, %eax
callq 0x41d0
movq 0x24e39(%rip), %rdx     # 0x39370
jmp 0x1438a
movq %rsp, %rdi
callq 0x4ef0