// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: preprocess_dependency_init
void preprocess_dependency_init(item* p,int onlysource)
{
	item** child;
	if (!p) return;
	for (child=p->child;child!=p->childend;++child)
	{
		size_t i;
		item* list;
		int empty = 1;

		(*child)->flags &= ~FLAG_PROCESSED;

        ++stamp;
        preprocess_dependency_include(*child,item_get(*child,"useinclude",0),0,1);
        preprocess_dependency_include(*child,item_get(*child,"use",0),0,0);

		list = item_find(*child,"source");
		for (i=0;i<item_childcount(list);++i)
			if (!(list->child[i]->flags & FLAG_REMOVED) && !item_find(list->child[i],"sys"))
			{
				empty = 0;
				break;
			}

		if (empty) {
			list = item_find(*child, "sourcedir");
			for (i = 0; i < item_childcount(list); ++i)
			if (!(list->child[i]->flags & FLAG_REMOVED) && !item_find(list->child[i], "sys"))
			{
				empty = 0;
				break;
			}
		}

		if (empty && !onlysource)
		{
			list = item_find(*child,"use");
			for (i=0;i<item_childcount(list);++i)
				if (!(list->child[i]->flags & FLAG_REMOVED))
				{
					item* ref = findref(list->child[i]);
					if (ref && !(ref->flags & FLAG_REMOVED) && stricmp(ref->parent->value,"lib")==0)
					{
						empty = 0;
						break;
					}
				}
		}

		if (empty)
			preprocess_setremoved(*child); // empty project
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, 0x4(%rsp)
testq %rdi, %rdi
je 0x9439
movq %rdi, %r14
movq 0x18(%rdi), %r13
leaq 0x7c1e(%rip), %rbx      # 0x10ec8
cmpq 0x20(%r14), %r13
je 0x9439
movq (%r13), %r15
andl $0xffffff7f, 0x30(%r15) # imm = 0xFFFFFF7F
incl 0xd30a(%rip)            # 0x165d0
movq %r15, %rdi
leaq 0x6e10(%rip), %rsi      # 0x100e0
xorl %edx, %edx
callq 0x26a2
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
pushq $0x1
popq %rcx
callq 0x9062
movq (%r13), %r15
movq %r15, %rdi
leaq 0x6de7(%rip), %rsi      # 0x100dc
xorl %edx, %edx
callq 0x26a2
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x9062
movq (%r13), %r15
movq %r15, %rdi
leaq 0x7386(%rip), %rsi      # 0x1069f
callq 0x262e
movq %rax, %rbp
xorl %r12d, %r12d
testq %rbp, %rbp
je 0x9337
movq 0x20(%rbp), %rax
subq 0x18(%rbp), %rax
sarq $0x3, %rax
jmp 0x9339
xorl %eax, %eax
cmpq %rax, %r12
jae 0x9362
movq 0x18(%rbp), %rax
movq (%rax,%r12,8), %rdi
testb $0x40, 0x30(%rdi)
jne 0x935d
movq %rbx, %rsi
callq 0x262e
testq %rax, %rax
je 0x9430
incq %r12
jmp 0x9324
movq %r15, %rdi
leaq 0x7083(%rip), %rsi      # 0x103ef
callq 0x262e
movq %rax, %rbp
xorl %r12d, %r12d
testq %rbp, %rbp
je 0x938a
movq 0x20(%rbp), %rax
subq 0x18(%rbp), %rax
sarq $0x3, %rax
jmp 0x938c
xorl %eax, %eax
cmpq %rax, %r12
jae 0x93b5
movq 0x18(%rbp), %rax
movq (%rax,%r12,8), %rdi
testb $0x40, 0x30(%rdi)
jne 0x93b0
movq %rbx, %rsi
callq 0x262e
testq %rax, %rax
je 0x9430
incq %r12
jmp 0x9377
cmpl $0x0, 0x4(%rsp)
jne 0x9428
movq %r15, %rdi
leaq 0x6d16(%rip), %rsi      # 0x100dc
callq 0x262e
movq %rax, %r15
xorl %ebp, %ebp
testq %r15, %r15
je 0x93e3
movq 0x20(%r15), %rax
subq 0x18(%r15), %rax
sarq $0x3, %rax
jmp 0x93e5
xorl %eax, %eax
cmpq %rax, %rbp
jae 0x9424
movq 0x18(%r15), %rax
movq (%rax,%rbp,8), %rdi
testb $0x40, 0x30(%rdi)
jne 0x941f
callq 0x2776
testq %rax, %rax
je 0x941f
testb $0x40, 0x30(%rax)
jne 0x941f
movq 0x10(%rax), %rax
movq (%rax), %rdi
leaq 0x7d89(%rip), %rsi      # 0x1119f
callq 0x2070
testl %eax, %eax
je 0x9430
incq %rbp
jmp 0x93d0
movq (%r13), %r15
movq %r15, %rdi
callq 0x55ad
addq $0x8, %r13
jmp 0x92aa
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq