// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: preprocess_dependency_include
void preprocess_dependency_include(item* base, item* list, int keep_exp_inc, int discard_exp_def)
{
	size_t i;
	for (i=0;i<item_childcount(list);++i)
	{
		item* ref = findref(list->child[i]);
		if (ref && ref->stamp != stamp)
		{
            ref->stamp = stamp;

			// add to "expinclude" to "include" or "expinclude"
            item_merge(item_get(base,keep_exp_inc?"expinclude":"include",0),item_find(ref,"expinclude"),list->child[i]);
			// also merge "subinclude"
			item_merge(item_get(base,"subinclude",0),item_find(ref,"subinclude"),list->child[i]);
			// also merge "sysinclude"
			item_merge(item_get(base,"sysinclude",0),item_find(ref,"sysinclude"),list->child[i]);
			// also merge "linkfile"
			item_merge(item_get(base,"linkfile",0),item_find(ref,"linkfile"),list->child[i]);
			// also merge "crt0"
			item_merge(item_get(base,"crt0",0),item_find(ref,"crt0"),list->child[i]);
			// also merge "expdefine" to "define" or "expdefine"
            if (!discard_exp_def)
			    item_merge(item_get(base,"define",0),item_find(ref,"expdefine"),list->child[i]);

            preprocess_dependency_include(base,item_get(ref,"useinclude",0),keep_exp_inc,1);
            preprocess_dependency_include(base,item_get(ref,"use",0),keep_exp_inc,0);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, 0xc(%rsp)
movq %rsi, %r14
movq %rdi, %r15
movl %edx, 0x8(%rsp)
testl %edx, %edx
leaq 0x7204(%rip), %rax      # 0x1028b
leaq 0x7283(%rip), %rcx      # 0x10311
cmovneq %rcx, %rax
movq %rax, 0x10(%rsp)
xorl %r12d, %r12d
testq %r14, %r14
je 0x90ad
movq 0x20(%r14), %rax
subq 0x18(%r14), %rax
sarq $0x3, %rax
jmp 0x90af
xorl %eax, %eax
cmpq %rax, %r12
jae 0x9275
movq 0x18(%r14), %rax
movq (%rax,%r12,8), %rdi
callq 0x2776
testq %rax, %rax
je 0x926d
movq %rax, %rbx
movl 0xd4f9(%rip), %eax      # 0x165d0
cmpl %eax, 0x34(%rbx)
je 0x926d
movl %eax, 0x34(%rbx)
movq %r15, %rdi
movq 0x10(%rsp), %rsi
xorl %edx, %edx
callq 0x26a2
movq %rax, %r13
movq %rbx, %rdi
leaq 0x7212(%rip), %rsi      # 0x10311
callq 0x262e
movq 0x18(%r14), %rcx
movq (%rcx,%r12,8), %rdx
movq %r13, %rdi
movq %rax, %rsi
callq 0x30f9
movq %r15, %rdi
leaq 0x71fb(%rip), %rbp      # 0x1031c
movq %rbp, %rsi
xorl %edx, %edx
callq 0x26a2
movq %rax, %r13
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x262e
movq 0x18(%r14), %rcx
movq (%rcx,%r12,8), %rdx
movq %r13, %rdi
movq %rax, %rsi
callq 0x30f9
movq %r15, %rdi
leaq 0x71d1(%rip), %rbp      # 0x10327
movq %rbp, %rsi
xorl %edx, %edx
callq 0x26a2
movq %rax, %r13
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x262e
movq 0x18(%r14), %rcx
movq (%rcx,%r12,8), %rdx
movq %r13, %rdi
movq %rax, %rsi
callq 0x30f9
movq %r15, %rdi
leaq 0x7276(%rip), %rbp      # 0x10401
movq %rbp, %rsi
xorl %edx, %edx
callq 0x26a2
movq %rax, %r13
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x262e
movq 0x18(%r14), %rcx
movq (%rcx,%r12,8), %rdx
movq %r13, %rdi
movq %rax, %rsi
callq 0x30f9
movq %r15, %rdi
leaq 0x724a(%rip), %rbp      # 0x1040a
movq %rbp, %rsi
xorl %edx, %edx
callq 0x26a2
movq %rax, %r13
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x262e
movq 0x18(%r14), %rcx
movq (%rcx,%r12,8), %rdx
movq %r13, %rdi
movq %rax, %rsi
callq 0x30f9
cmpl $0x0, 0xc(%rsp)
jne 0x9228
movq %r15, %rdi
leaq 0x7cc5(%rip), %rsi      # 0x10ec1
xorl %edx, %edx
callq 0x26a2
movq %rax, %r13
movq %rbx, %rdi
leaq 0x7cae(%rip), %rsi      # 0x10ebe
callq 0x262e
movq 0x18(%r14), %rcx
movq (%rcx,%r12,8), %rdx
movq %r13, %rdi
movq %rax, %rsi
callq 0x30f9
movq %rbx, %rdi
leaq 0x6eae(%rip), %rsi      # 0x100e0
xorl %edx, %edx
callq 0x26a2
movq %r15, %rdi
movq %rax, %rsi
movl 0x8(%rsp), %ebp
movl %ebp, %edx
pushq $0x1
popq %rcx
callq 0x9062
movq %rbx, %rdi
leaq 0x6e85(%rip), %rsi      # 0x100dc
xorl %edx, %edx
callq 0x26a2
movq %r15, %rdi
movq %rax, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x9062
incq %r12
jmp 0x909a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq