// File: /workspace/github_cpp_makefile_star2_O3/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 0xa612
movq %rdi, %r14
movq 0x18(%rdi), %r13
cmpq 0x20(%rdi), %r13
je 0xa612
leaq 0x7a42(%rip), %rbp      # 0x11ec8
movq (%r13), %rbx
andl $0xffffff7f, 0x30(%rbx) # imm = 0xFFFFFF7F
incl 0xc139(%rip)            # 0x165d0
movq %rbx, %rdi
leaq 0x6c3f(%rip), %rsi      # 0x110e0
xorl %edx, %edx
callq 0x270b
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0xa232
movq (%r13), %rbx
movq %rbx, %rdi
leaq 0x6c14(%rip), %rsi      # 0x110dc
xorl %edx, %edx
callq 0x270b
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xa232
movq (%r13), %rbx
movq %rbx, %rdi
leaq 0x71b3(%rip), %rsi      # 0x1169f
callq 0x2694
movq %rax, %r15
xorl %r12d, %r12d
testq %r15, %r15
je 0xa50a
movq 0x20(%r15), %rax
subq 0x18(%r15), %rax
sarq $0x3, %rax
jmp 0xa50c
xorl %eax, %eax
cmpq %rax, %r12
jae 0xa535
movq 0x18(%r15), %rax
movq (%rax,%r12,8), %rdi
testb $0x40, 0x30(%rdi)
jne 0xa530
movq %rbp, %rsi
callq 0x2694
testq %rax, %rax
je 0xa604
incq %r12
jmp 0xa4f7
movq %rbx, %rdi
leaq 0x6eb0(%rip), %rsi      # 0x113ef
callq 0x2694
movq %rax, %r15
xorl %r12d, %r12d
testq %r15, %r15
je 0xa55d
movq 0x20(%r15), %rax
subq 0x18(%r15), %rax
sarq $0x3, %rax
jmp 0xa55f
xorl %eax, %eax
cmpq %rax, %r12
jae 0xa588
movq 0x18(%r15), %rax
movq (%rax,%r12,8), %rdi
testb $0x40, 0x30(%rdi)
jne 0xa583
movq %rbp, %rsi
callq 0x2694
testq %rax, %rax
je 0xa604
incq %r12
jmp 0xa54a
cmpl $0x0, 0x4(%rsp)
jne 0xa5fc
movq %rbx, %rdi
leaq 0x6b43(%rip), %rsi      # 0x110dc
callq 0x2694
movq %rax, %rbx
xorl %r15d, %r15d
testq %rbx, %rbx
je 0xa5b7
movq 0x20(%rbx), %rax
subq 0x18(%rbx), %rax
sarq $0x3, %rax
jmp 0xa5b9
xorl %eax, %eax
cmpq %rax, %r15
jae 0xa5f8
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rdi
testb $0x40, 0x30(%rdi)
jne 0xa5f3
callq 0x281b
testq %rax, %rax
je 0xa5f3
testb $0x40, 0x30(%rax)
jne 0xa5f3
movq 0x10(%rax), %rax
movq (%rax), %rdi
leaq 0x7bb5(%rip), %rsi      # 0x1219f
callq 0x2070
testl %eax, %eax
je 0xa604
incq %r15
jmp 0xa5a4
movq (%r13), %rbx
movq %rbx, %rdi
callq 0x5e99
addq $0x8, %r13
cmpq 0x20(%r14), %r13
jne 0xa486
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq