// File: /workspace/github_cpp_makefile_star2_O3/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 0x7034(%rip), %rax      # 0x1128b
leaq 0x70b3(%rip), %rcx      # 0x11311
cmovneq %rcx, %rax
movq %rax, 0x10(%rsp)
xorl %r12d, %r12d
testq %r14, %r14
je 0xa27d
movq 0x20(%r14), %rax
subq 0x18(%r14), %rax
sarq $0x3, %rax
jmp 0xa27f
xorl %eax, %eax
cmpq %rax, %r12
jae 0xa447
movq 0x18(%r14), %rax
movq (%rax,%r12,8), %rdi
callq 0x281b
testq %rax, %rax
je 0xa43f
movq %rax, %rbx
movl 0xc329(%rip), %eax      # 0x165d0
cmpl %eax, 0x34(%rbx)
je 0xa43f
movl %eax, 0x34(%rbx)
movq %r15, %rdi
movq 0x10(%rsp), %rsi
xorl %edx, %edx
callq 0x270b
movq %rax, %r13
movq %rbx, %rdi
leaq 0x7042(%rip), %rsi      # 0x11311
callq 0x2694
movq 0x18(%r14), %rcx
movq (%rcx,%r12,8), %rdx
movq %r13, %rdi
movq %rax, %rsi
callq 0x334a
movq %r15, %rdi
leaq 0x702b(%rip), %rbp      # 0x1131c
movq %rbp, %rsi
xorl %edx, %edx
callq 0x270b
movq %rax, %r13
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2694
movq 0x18(%r14), %rcx
movq (%rcx,%r12,8), %rdx
movq %r13, %rdi
movq %rax, %rsi
callq 0x334a
movq %r15, %rdi
leaq 0x7001(%rip), %rbp      # 0x11327
movq %rbp, %rsi
xorl %edx, %edx
callq 0x270b
movq %rax, %r13
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2694
movq 0x18(%r14), %rcx
movq (%rcx,%r12,8), %rdx
movq %r13, %rdi
movq %rax, %rsi
callq 0x334a
movq %r15, %rdi
leaq 0x70a6(%rip), %rbp      # 0x11401
movq %rbp, %rsi
xorl %edx, %edx
callq 0x270b
movq %rax, %r13
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2694
movq 0x18(%r14), %rcx
movq (%rcx,%r12,8), %rdx
movq %r13, %rdi
movq %rax, %rsi
callq 0x334a
movq %r15, %rdi
leaq 0x707a(%rip), %rbp      # 0x1140a
movq %rbp, %rsi
xorl %edx, %edx
callq 0x270b
movq %rax, %r13
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2694
movq 0x18(%r14), %rcx
movq (%rcx,%r12,8), %rdx
movq %r13, %rdi
movq %rax, %rsi
callq 0x334a
cmpl $0x0, 0xc(%rsp)
jne 0xa3f8
movq %r15, %rdi
leaq 0x7af5(%rip), %rsi      # 0x11ec1
xorl %edx, %edx
callq 0x270b
movq %rax, %r13
movq %rbx, %rdi
leaq 0x7ade(%rip), %rsi      # 0x11ebe
callq 0x2694
movq 0x18(%r14), %rcx
movq (%rcx,%r12,8), %rdx
movq %r13, %rdi
movq %rax, %rsi
callq 0x334a
movq %rbx, %rdi
leaq 0x6cde(%rip), %rsi      # 0x110e0
xorl %edx, %edx
callq 0x270b
movq %r15, %rdi
movq %rax, %rsi
movl 0x8(%rsp), %ebp
movl %ebp, %edx
movl $0x1, %ecx
callq 0xa232
movq %rbx, %rdi
leaq 0x6cb3(%rip), %rsi      # 0x110dc
xorl %edx, %edx
callq 0x270b
movq %r15, %rdi
movq %rax, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0xa232
incq %r12
jmp 0xa26a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq