// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: preprocess_dependency_project
void preprocess_dependency_project(item* p)
{
	if (!(p->flags & FLAG_PROCESSED))
	{
		// remove not exising dependencies
		size_t i;
		item* use = item_get(p,"use",0);

		p->flags |= FLAG_PROCESSED;

		for (i=0;i<item_childcount(use);++i)
		{
			item* ref = findref(use->child[i]);
			if (!ref || (ref->flags & FLAG_REMOVED) || ref==p)
			{
				preprocess_setremoved(use->child[i]);
			}
			else
			if (stricmp(ref->parent->value,"lib")==0)
			{
				preprocess_dependency_project(ref);
				// copy use of lib's
				item_merge(use,item_find(ref,"use"),use->child[i]);

                item_merge_name(p,ref,"uselib",use->child[i]);
                item_merge_name(p,ref,"framework",use->child[i]);
                item_merge_name(p,ref,"framework_lib",use->child[i]);
                item_merge_name(p,ref,"privateframework",use->child[i]);
                item_merge_name(p,ref,"libinclude",use->child[i]);
                item_merge_name(p,ref,"libinclude_debug",use->child[i]);
                item_merge_name(p,ref,"libinclude_release",use->child[i]);
                item_merge_name(p,ref,"rpath",use->child[i]);
                item_merge_name(p,ref,"android_permission",use->child[i]);
			}
		}
	}
}

// Assembly:
testb $-0x80, 0x30(%rdi)
jne 0x589a
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xa9f5(%rip), %r14      # 0x100dc
xorl %r13d, %r13d
movq %r14, %rsi
xorl %edx, %edx
callq 0x26a2
orb $-0x80, 0x30(%rbx)
movq %rax, %r15
leaq 0xba9d(%rip), %r12      # 0x1119f
testq %r15, %r15
je 0x5715
movq 0x20(%r15), %rax
subq 0x18(%r15), %rax
sarq $0x3, %rax
jmp 0x5717
xorl %eax, %eax
cmpq %rax, %r13
jae 0x588c
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rdi
callq 0x2776
testq %rax, %rax
je 0x5877
movq %rax, %rbp
cmpq %rbx, %rax
je 0x5877
movl 0x30(%rbp), %eax
andl $0x40, %eax
jne 0x5877
movq 0x10(%rbp), %rax
movq (%rax), %rdi
movq %r12, %rsi
callq 0x2070
testl %eax, %eax
jne 0x5884
movq %rbp, %rdi
callq 0x56c8
movq %rbp, %rdi
movq %r14, %rsi
callq 0x262e
movq 0x18(%r15), %rcx
movq (%rcx,%r13,8), %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x30f9
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rcx
movq %rbx, %rdi
movq %rbp, %rsi
leaq 0xab28(%rip), %rdx      # 0x102c8
callq 0x567c
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rcx
movq %rbx, %rdi
movq %rbp, %rsi
leaq 0xada8(%rip), %rdx      # 0x10562
callq 0x567c
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rcx
movq %rbx, %rdi
movq %rbp, %rsi
leaq 0xad79(%rip), %rdx      # 0x1054d
callq 0x567c
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rcx
movq %rbx, %rdi
movq %rbp, %rsi
leaq 0xad6d(%rip), %rdx      # 0x1055b
callq 0x567c
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rcx
movq %rbx, %rdi
movq %rbp, %rsi
leaq 0xab35(%rip), %rdx      # 0x1033d
callq 0x567c
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rcx
movq %rbx, %rdi
movq %rbp, %rsi
leaq 0xab26(%rip), %rdx      # 0x10348
callq 0x567c
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rcx
movq %rbx, %rdi
movq %rbp, %rsi
leaq 0xab1d(%rip), %rdx      # 0x10359
callq 0x567c
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rcx
movq %rbx, %rdi
movq %rbp, %rsi
leaq 0xad16(%rip), %rdx      # 0x1056c
callq 0x567c
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rcx
movq %rbx, %rdi
movq %rbp, %rsi
leaq 0xad02(%rip), %rdx      # 0x10572
callq 0x567c
jmp 0x5884
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rdi
callq 0x55ad
incq %r13
jmp 0x5702
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq