LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: item_delete
void item_delete(item* p)
{
	item** child;
	if (!p)
		return;
	if (p->parent)
		item_remove(p);
	for (child = p->child;child != p->childend;++child)
	{
		(*child)->parent = NULL;
		item_delete(*child);
	}
	itemcond_delete(p->cond);
	free(p->value);
	free(p);
}

// Assembly:
testq %rdi, %rdi
je 0x2d9b
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0x2db2
movq 0x18(%r14), %rdi
movq 0x20(%r14), %rax
cmpq %rax, %rdi
je 0x2daa
movq %rax, %rdx
subq %rdi, %rdx
addq $-0x8, %rdx
cmpq %rbx, (%rdi)
je 0x2d9c
addq $0x8, %rdi
addq $-0x8, %rdx
cmpq %rax, %rdi
jne 0x2d87
jmp 0x2daa
retq
leaq 0x8(%rdi), %rsi
callq 0x22c0
addq $-0x8, 0x20(%r14)
movq $0x0, 0x10(%rbx)
movq 0x18(%rbx), %r14
cmpq 0x20(%rbx), %r14
je 0x2dd5
movq (%r14), %rax
movq $0x0, 0x10(%rax)
movq (%r14), %rdi
callq 0x2d5b
addq $0x8, %r14
jmp 0x2db6
movq 0x8(%rbx), %rdi
callq 0x2d31
movq (%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2050
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: itemcond_new
itemcond* itemcond_new(int func, item* value)
{
	itemcond* p = (itemcond*)zalloc(sizeof(itemcond));
    p->refcount = 1;
	p->func = func;
	p->value = value;
	return p;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movl $0x20, %edi
callq 0x24fa
movl $0x1, (%rax)
movl %ebp, 0x4(%rax)
movq %rbx, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: itemcond_same
int itemcond_same(itemcond* a,itemcond* b)
{
	if (!a && !b)
		return 1;
	if (!a || !b)
		return 0;
	if (a->func != b->func)
		return 0;
	switch (a->func)
	{
	case COND_GET:
		return a->value == b->value;
	case COND_AND:
	case COND_OR:
		return (itemcond_same(a->a,b->a) && itemcond_same(a->b,b->b)) ||
               (itemcond_same(a->b,b->a) && itemcond_same(a->a,b->b));
	case COND_NOT:
		return itemcond_same(a->a,b->a);
	default:
		return 1;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
setne %al
testq %rsi, %rsi
setne %cl
movq %rdi, %rdx
orq %rsi, %rdx
je 0x2ed3
movq %rsi, %rbx
movq %rdi, %r14
xorl %ebp, %ebp
testb $0x1, %al
je 0x2ed8
testb $0x1, %cl
je 0x2ed8
movl 0x4(%r14), %eax
cmpl 0x4(%rbx), %eax
jne 0x2ed8
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jae 0x2ea6
movq 0x10(%r14), %r15
movq 0x10(%rbx), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x2e1b
movq 0x18(%r14), %r14
testl %eax, %eax
je 0x2e90
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x2e1b
testl %eax, %eax
jne 0x2ed3
movq %r14, %rdi
movq %r12, %rsi
callq 0x2e1b
movl $0x18, %ecx
testl %eax, %eax
jne 0x2eb4
jmp 0x2ed8
cmpl $0x3, %eax
jne 0x2ee3
movq 0x10(%r14), %r15
movl $0x10, %ecx
movq (%rbx,%rcx), %rbx
testq %r15, %r15
setne %al
testq %rbx, %rbx
setne %cl
movq %r15, %rdx
orq %rbx, %rdx
movq %r15, %r14
jne 0x2e43
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %ebp
testl %eax, %eax
jne 0x2ed8
movq 0x8(%r14), %rax
xorl %ebp, %ebp
cmpq 0x8(%rbx), %rax
sete %bpl
jmp 0x2ed8
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: itemcond_reduce
void itemcond_reduce(itemcond* cond)
{
    if (cond->func == COND_OR)
    {
        itemcond_reduce(cond->a);
        itemcond_reduce(cond->b);
        if (cond->a->value)
        {
            if (itemcond_same(cond->a,cond->b))
            {
                cond->func = COND_GET;
                cond->value = cond->a->value;
            }
        }
        if (cond->a->func == COND_GET && itemcond_contains(cond->b,cond->a->value))
        {
            cond->func = COND_GET;
            cond->value = cond->a->value;
        }
        if (cond->b->func == COND_GET && itemcond_contains(cond->a,cond->b->value))
        {
            cond->func = COND_GET;
            cond->value = cond->b->value;
        }
    }
    else
    if (cond->func == COND_AND)
    {
        itemcond_reduce(cond->a);
        itemcond_reduce(cond->b);
        if (cond->a->value)
        {
            if (itemcond_same(cond->a,cond->b))
            {
                cond->func = COND_GET;
                cond->value = cond->a->value;
            }
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %eax
cmpl $0x2, %eax
je 0x2fb0
cmpl $0x1, %eax
jne 0x2fe7
movq 0x10(%rbx), %rdi
callq 0x2f23
movq 0x18(%rbx), %rdi
callq 0x2f23
movq 0x10(%rbx), %r14
movq 0x18(%rbx), %r15
movq 0x8(%r14), %r12
testq %r12, %r12
je 0x2f7c
movq %r14, %rdi
movq %r15, %rsi
callq 0x2e1b
testl %eax, %eax
je 0x2f7c
movl $0x0, 0x4(%rbx)
movq %r12, 0x8(%rbx)
cmpl $0x0, 0x4(%r14)
je 0x2ff3
cmpl $0x0, 0x4(%r15)
jne 0x2fe7
movq 0x8(%r15), %r15
testq %r15, %r15
je 0x2fe7
cmpl $0x2, 0x4(%r14)
jne 0x2fe7
movq 0x10(%r14), %rax
cmpq %r15, 0x8(%rax)
je 0x2fdc
movq 0x18(%r14), %rax
cmpq %r15, 0x8(%rax)
jne 0x2fe7
jmp 0x2fdc
movq 0x10(%rbx), %rdi
callq 0x2f23
movq 0x18(%rbx), %rdi
callq 0x2f23
movq 0x10(%rbx), %rdi
movq 0x8(%rdi), %r15
testq %r15, %r15
je 0x2fe7
movq 0x18(%rbx), %rsi
callq 0x2e1b
testl %eax, %eax
je 0x2fe7
movl $0x0, 0x4(%rbx)
movq %r15, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x2f83
cmpl $0x2, 0x4(%r15)
jne 0x2f83
movq 0x10(%r15), %rcx
cmpq %rax, 0x8(%rcx)
je 0x301b
movq 0x18(%r15), %rcx
cmpq %rax, 0x8(%rcx)
jne 0x2f83
movl $0x0, 0x4(%rbx)
movq %rax, 0x8(%rbx)
jmp 0x2f83
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: itemcond_partof
int itemcond_partof(itemcond* a,itemcond* b)
{
    if (itemcond_same(a,b))
        return 1;

    if (a && a->func == COND_OR)
        return itemcond_partof(a->a,b) || itemcond_partof(a->b,b);

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2e1b
testl %eax, %eax
jne 0x3068
xorl %eax, %eax
testq %r14, %r14
je 0x306d
cmpl $0x1, 0x4(%r14)
jne 0x306d
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x302b
testl %eax, %eax
jne 0x3068
movq 0x18(%r14), %r14
movq %r14, %rdi
movq %rbx, %rsi
jmp 0x3035
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: itemcond_eval
int itemcond_eval(itemcond* p)
{
	switch (p->func)
	{
	case COND_GET:
		if (!(p->value->flags & FLAG_PROCESSED))
			preprocess_condeval(p->value);
		return (p->value->flags & FLAG_DEFINED)==FLAG_DEFINED;
	case COND_AND:
		return itemcond_eval(p->a) && itemcond_eval(p->b);
	case COND_OR:
		return itemcond_eval(p->a) || itemcond_eval(p->b);
	case COND_NOT:
		return !itemcond_eval(p->a);
	case COND_0:
        return 0;
	case COND_1:
        return 1;
	default:
		return 1;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
leaq 0xdf70(%rip), %r15      # 0x11004
movl $0x1, %ebp
movl 0x4(%rbx), %eax
cmpq $0x5, %rax
ja 0x30f9
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
movq 0x10(%rbx), %rdi
callq 0x3080
testl %eax, %eax
je 0x30c7
jmp 0x30f9
movq 0x10(%rbx), %rdi
callq 0x3080
testl %eax, %eax
je 0x30d7
movq 0x18(%rbx), %rbx
jmp 0x3099
movq 0x10(%rbx), %rbx
xorl $0x1, %r14d
jmp 0x3099
xorl %ebp, %ebp
jmp 0x30f9
movq 0x8(%rbx), %rdi
movl 0x30(%rdi), %ebp
testb %bpl, %bpl
js 0x30f3
callq 0x3109
movq 0x8(%rbx), %rax
movl 0x30(%rax), %ebp
shrl $0x5, %ebp
andl $0x1, %ebp
xorl %r14d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: preprocess_condeval
void preprocess_condeval(item* p)
{
	item** child;

	p->flags |= FLAG_PROCESSED;

	if (p->cond)
	{
		if (!itemcond_eval(p->cond))
			preprocess_setremoved(p);
	}

	if (!(p->flags & FLAG_REMOVED))
		for (child=p->child;child!=p->childend;++child)
			preprocess_condeval(*child);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
orb $-0x80, 0x30(%rdi)
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x312e
callq 0x3080
testl %eax, %eax
jne 0x312e
movq %rbx, %rdi
callq 0x5e99
testb $0x40, 0x30(%rbx)
jne 0x314c
movq 0x18(%rbx), %r14
cmpq 0x20(%rbx), %r14
je 0x314c
movq (%r14), %rdi
callq 0x3109
addq $0x8, %r14
jmp 0x3138
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: itemcond_and
itemcond* itemcond_and(itemcond* p,itemcond* cond)
{
	if (cond)
	{
		if (p)
		{
			itemcond* v = itemcond_new(COND_AND,NULL);
			v->a = itemcond_dup(cond);
			v->b = p;
			p = v;
		}
		else
			p = itemcond_dup(cond);
	}
	return p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
testq %rsi, %rsi
je 0x3196
movq %rsi, %rbx
testq %r14, %r14
je 0x319b
movl $0x20, %edi
callq 0x24fa
movabsq $0x200000001, %rcx      # imm = 0x200000001
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
incl (%rbx)
movq %rbx, 0x10(%rax)
movq %r14, 0x18(%rax)
movq %rax, %rbx
jmp 0x319d
movq %r14, %rbx
jmp 0x319d
incl (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: itemcond_or
itemcond* itemcond_or(itemcond* p,itemcond* cond)
{
	if (cond && p)
	{
		itemcond* v = itemcond_new(COND_OR,NULL);
		v->a = itemcond_dup(cond);
		v->b = p;
		p = v;
	}
	else
	{
		itemcond_delete(p);
		p = NULL;
	}
	return p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
sete %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x31ee
movq %rsi, %r14
movl $0x20, %edi
callq 0x24fa
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
incl (%r14)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
jmp 0x31f8
movq %rbx, %rdi
callq 0x2d31
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: item_getmerge
item* item_getmerge(item* p,const item* child,int removed,int *exists)
{
    item* dup;
	*exists = item_find(p,child->value) != NULL;
	dup = item_get(p,child->value,(child->flags & FLAG_DEFINED)==FLAG_DEFINED);
    if (((child->flags & FLAG_REMOVED) || removed) && (!*exists || (dup->flags & FLAG_REMOVED)))
        dup->flags |= FLAG_REMOVED;
    else
        dup->flags &= ~FLAG_REMOVED;
    dup->flags |= (child->flags & ~FLAG_REMOVED);
    return dup;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r15
movq (%rsi), %r12
movq %r12, %rsi
callq 0x2694
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
movl %ecx, (%r14)
movl 0x30(%rbx), %edx
shrl $0x5, %edx
andl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x270b
movl 0x30(%rbx), %ecx
andl $0x40, %ecx
orl %ebp, %ecx
je 0x325c
movl 0x30(%rax), %ecx
cmpl $0x0, (%r14)
je 0x3257
movl %ecx, %edx
andl $0x40, %edx
je 0x325f
orl $0x40, %ecx
jmp 0x3262
movl 0x30(%rax), %ecx
andl $-0x41, %ecx
movl %ecx, 0x30(%rax)
movl 0x30(%rbx), %edx
andl $-0x41, %edx
orl %ecx, %edx
movl %edx, 0x30(%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: item_merge2
void item_merge2(item* p,item* group,itemcond* cond0,int removed,int exists)
{
	if (group)
	{
		item** child;
		itemcond* cond = itemcond_and(itemcond_dup(group->cond),cond0);

		for (child = group->child;child != group->childend;++child)
		{
			int child_exists;
			item* dup = item_getmerge(p,*child,removed,&child_exists);
			item_merge2(dup,*child,cond,removed,child_exists);
		}

		if (!item_childcount(group) || (p->flags & FLAG_ATTRIB))
		{
			if (exists)
				p->cond = itemcond_or(p->cond,cond);
			else
			{
				itemcond_delete(p->cond);
				p->cond = itemcond_dup(cond);
			}
		}
		itemcond_delete(cond);
	}
}

// Assembly:
testq %rsi, %rsi
je 0x331c
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r13d
movl %ecx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x32a4
incl (%rdi)
movq %rdx, %rsi
callq 0x3154
movq %rax, %r14
movq 0x18(%r12), %rbp
cmpq 0x20(%r12), %rbp
je 0x3309
movl %r13d, (%rsp)
leaq 0x4(%rsp), %r13
movq (%rbp), %rsi
movq %rbx, %rdi
movl %r15d, %edx
movq %r13, %rcx
callq 0x3200
movq (%rbp), %rsi
movl 0x4(%rsp), %r8d
movq %rax, %rdi
movq %r14, %rdx
movl %r15d, %ecx
callq 0x3279
addq $0x8, %rbp
cmpq 0x20(%r12), %rbp
jne 0x32c4
cmpq 0x18(%r12), %rbp
movl (%rsp), %r13d
je 0x3309
testb $0x1, 0x31(%rbx)
je 0x3334
movq 0x8(%rbx), %rdi
testl %r13d, %r13d
je 0x331d
movq %r14, %rsi
callq 0x31a8
jmp 0x3330
retq
callq 0x2d31
movq %r14, %rax
testq %r14, %r14
je 0x3330
incl (%r14)
movq %r14, %rax
movq %rax, 0x8(%rbx)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2d31
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: item_merge
void item_merge(item* p,item* group,item* plus)
{
	if (group)
	{
		int removed=0;
		item* i;
		itemcond* cond = NULL;
		for (i=group->parent;i;i=i->parent)
			cond = itemcond_and(cond,i->cond);
		if (plus)
		{
			removed = (plus->flags & FLAG_REMOVED)==FLAG_REMOVED;
			cond = itemcond_and(cond,plus->cond);
		}
		item_merge2(p,group,cond,removed,1);
		itemcond_delete(cond);
	}
}

// Assembly:
testq %rsi, %rsi
je 0x33d8
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rsi), %rbp
xorl %r15d, %r15d
xorl %r12d, %r12d
testq %rbp, %rbp
je 0x338b
movq 0x8(%rbp), %rsi
movq %r12, %rdi
callq 0x3154
movq %rax, %r12
movq 0x10(%rbp), %rbp
jmp 0x3371
testq %r13, %r13
je 0x33ab
movl 0x30(%r13), %r15d
shrl $0x6, %r15d
andl $0x1, %r15d
movq 0x8(%r13), %rsi
movq %r12, %rdi
callq 0x3154
movq %rax, %r12
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl %r15d, %ecx
movl $0x1, %r8d
callq 0x3279
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2d31
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: reader_init
void reader_init(reader *p)
{
	memset(p,0,sizeof(reader));
    p->filename = (char*)malloc(MAX_PATH);
    p->line = (char*)malloc(MAX_LINE);
    p->token = (char*)malloc(MAX_LINE);
    memset(p->filename,0,MAX_PATH);
    memset(p->line,0,MAX_LINE);
    memset(p->token,0,MAX_LINE);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x0, 0x20(%rdi)
movl $0x1, %edi
movl $0x400, %esi            # imm = 0x400
callq 0x21e0
movq %rax, 0x38(%rbx)
movl $0x1, %edi
movl $0x2000, %esi           # imm = 0x2000
callq 0x21e0
movq %rax, 0x28(%rbx)
movl $0x1, %edi
movl $0x2000, %esi           # imm = 0x2000
callq 0x21e0
movq %rax, 0x30(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: reader_line
int reader_line(reader* p)
{
	size_t i;
    p->line[0] = 0;
	fgets(p->line,MAX_LINE,p->r.f);
	if (feof(p->r.f) && p->line[0]==0)
		return 0;
	i=strlen(p->line);
	while (i && isspace(p->line[--i]))
		p->line[i]=0;
	p->pos = p->line;
	++p->r.no;
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rax
movb $0x0, (%rax)
movq (%rdi), %rdx
movq 0x28(%rdi), %rdi
movl $0x2000, %esi           # imm = 0x2000
callq 0x21d0
movq (%rbx), %rdi
callq 0x2220
movq 0x28(%rbx), %r14
testl %eax, %eax
je 0x354a
cmpb $0x0, (%r14)
je 0x3590
movq %r14, %rdi
callq 0x2120
testq %rax, %rax
je 0x3582
movq %rax, %r15
callq 0x2360
movq (%rax), %rcx
movq 0x28(%rbx), %r14
movsbq -0x1(%r14,%r15), %rdx
testb $0x20, 0x1(%rcx,%rdx,2)
je 0x3582
movb $0x0, -0x1(%r14,%r15)
decq %r15
jne 0x355f
movq 0x28(%rbx), %r14
movq %r14, 0x20(%rbx)
incl 0xc(%rbx)
movl $0x1, %eax
jmp 0x3592
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: strins
char* strins(char* s,const char* begin,const char* end)
{
	size_t n = end?end-begin:strlen(begin);
	memmove(s+n,s,strlen(s)+1);
	memcpy(s,begin,n);
	return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x35b3
movq %rdx, %r15
subq %rbx, %r15
jmp 0x35be
movq %rbx, %rdi
callq 0x2120
movq %rax, %r15
leaq (%r14,%r15), %r12
movq %r14, %rdi
callq 0x2120
leaq 0x1(%rax), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x22c0
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2240
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: reader_comment
void reader_comment(reader* p)
{
	char* s = p->line;
	while (*s)
	{
		if (p->r.comment)
		{
			char* s0 = s;
			for (;*s;++s)
				if (s[0]=='*' && s[1]=='/')
				{
					s = strdel(s0,s);
					p->r.comment = 0;
					break;
				}

			if (p->r.comment)
			{
				s = s0;
				*s = 0;
			}
		}
		else
		{
			for (;*s;++s)
			{
				if (s[0]=='/' && s[1]=='*')
				{
					s = strdel(s,s+2);
					p->r.comment = 1;
					break;
				}
				if (s[0]=='/' && s[1]=='/')
				{
					*s = 0;
					break;
				}
			}
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x28(%rdi), %rbx
movb (%rbx), %al
testb %al, %al
je 0x36de
movq %rdi, %r14
cmpl $0x0, 0x8(%r14)
je 0x365c
movq %rbx, %r15
cmpb $0x2a, %al
je 0x364f
movzbl %al, %eax
testl %eax, %eax
je 0x36db
movb 0x1(%r15), %al
jmp 0x3657
movb 0x1(%r15), %al
cmpb $0x2f, %al
je 0x3683
incq %r15
jmp 0x363a
addq $0x2, %rbx
cmpb $0x2f, %al
je 0x3670
movzbl %al, %eax
testl %eax, %eax
je 0x369e
movb -0x1(%rbx), %al
jmp 0x367e
movzbl -0x1(%rbx), %eax
cmpl $0x2f, %eax
je 0x36d7
cmpl $0x2a, %eax
je 0x36a4
incq %rbx
jmp 0x3660
movq %r15, %rdi
callq 0x2120
leaq 0x1(%rax), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x22c0
xorl %eax, %eax
jmp 0x36c7
addq $-0x2, %rbx
jmp 0x36cb
movq %rbx, %rdi
callq 0x2120
leaq 0x1(%rax), %rdx
leaq -0x2(%rbx), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x22c0
movl $0x1, %eax
movq %r15, %rbx
movl %eax, 0x8(%r14)
movb (%rbx), %al
testb %al, %al
jne 0x3630
jmp 0x36de
addq $-0x2, %rbx
movb $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: reader_istoken
int reader_istoken(reader* p,const char* token)
{
	if (!(p->r.flags & FLAG_READY) && !reader_read(p))
		return 0;

	if (stricmp(p->token,token)!=0)
		return 0;

	p->r.flags &= ~FLAG_READY;
	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testb $0x2, 0x11(%rdi)
jne 0x39cc
movq %rbx, %rdi
callq 0x3747
testl %eax, %eax
je 0x39dc
movq 0x30(%rbx), %rdi
movq %r14, %rsi
callq 0x2070
testl %eax, %eax
je 0x39e0
xorl %eax, %eax
jmp 0x39e9
andb $-0x3, 0x11(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: reader_tokenline
int reader_tokenline(reader* p,int onespace)
{
	char* s = p->pos;

	assert(!(p->r.flags & FLAG_READY));

    if (onespace >= 0)
    {
	    while (*s && isspace(*s))
	    {
		    ++s;
		    if (onespace) break;
	    }
    }

	strcpy(p->token,s);
	p->pos = s + strlen(s);

	return p->token[0]!=0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testb $0x2, 0x11(%rdi)
jne 0x3ad8
movl %esi, %ebp
movq %rdi, %rbx
movq 0x20(%rdi), %r14
testl %esi, %esi
js 0x3aa6
movsbq (%r14), %r15
testq %r15, %r15
je 0x3aa6
callq 0x2360
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r15,2)
je 0x3aa6
incq %r14
testl %ebp, %ebp
je 0x3a86
movq 0x30(%rbx), %rdi
movq %r14, %rsi
callq 0x20b0
movq %r14, %rdi
callq 0x2120
addq %r14, %rax
movq %rax, 0x20(%rbx)
movq 0x30(%rbx), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd673(%rip), %rdi      # 0x11152
leaq 0xd5c0(%rip), %rsi      # 0x110a6
leaq 0xd680(%rip), %rcx      # 0x1116d
movl $0x3d8, %edx            # imm = 0x3D8
callq 0x2160
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: truncfilefourcc
void truncfilefourcc(char* path)
{
	char* i = getfilename(path);
	memmove(path,i,strlen(i)+1);
    path[4] = 0;
    while (strlen(path)<4)
        strcat(path,"_");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2f, %esi
callq 0x2150
leaq 0x1(%rax), %r14
testq %rax, %rax
cmoveq %rbx, %r14
movq %r14, %rdi
callq 0x2120
leaq 0x1(%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22c0
movb $0x0, 0x4(%rbx)
movq %rbx, %rdi
callq 0x2120
cmpq $0x3, %rax
ja 0x3cb2
movq %rbx, %rdi
callq 0x2120
movw $0x5f, (%rbx,%rax)
movq %rbx, %rdi
callq 0x2120
cmpq $0x4, %rax
jb 0x3c96
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: truncfileext
void truncfileext(char* path)
{
	char* i = getfilename(path);
	char* ext = strrchr(i,'.');
	if (ext)
		memmove(path,ext+1,strlen(ext+1)+1);
	else
		path[0]=0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2f, %esi
callq 0x2150
leaq 0x1(%rax), %rdi
testq %rax, %rax
cmoveq %rbx, %rdi
movl $0x2e, %esi
callq 0x2150
testq %rax, %rax
je 0x3d09
movq %rax, %r14
incq %r14
movq %r14, %rdi
callq 0x2120
leaq 0x1(%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x22c0
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: truncfourcc
void truncfourcc(char* s)
{
	size_t len = strlen(s);
	if (len>2 && s[0]=='\'' && s[len-1]=='\'')
	{
		strdel(s+len-1,s+len);
		strdel(s,s+1);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x2120
cmpq $0x3, %rax
jb 0x3d75
cmpb $0x27, (%rbx)
jne 0x3d75
cmpb $0x27, -0x1(%rbx,%rax)
jne 0x3d75
leaq (%rbx,%rax), %r14
leaq (%rbx,%rax), %r15
decq %r15
movq %r14, %rdi
callq 0x2120
leaq 0x1(%rax), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x22c0
leaq 0x1(%rbx), %r14
movq %r14, %rdi
callq 0x2120
leaq 0x1(%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x22c0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: truncfilepath
void truncfilepath(char* path,int delend)
{
	char* i = getfilename(path);
	if (i) *i=0;
	if (delend)
	{
		delendpath(path);
		if (!path[0])
			strcpy(path,".");
	}
	else
		addendpath(path);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x2f, %esi
callq 0x2150
leaq 0x1(%rax), %rcx
testq %rax, %rax
cmoveq %rbx, %rcx
testq %rcx, %rcx
je 0x3e35
movb $0x0, (%rcx)
testl %ebp, %ebp
je 0x3e63
cmpb $0x0, (%rbx)
je 0x3e57
movq %rbx, %rdi
callq 0x2120
cmpb $0x2f, -0x1(%rbx,%rax)
jne 0x3e5c
movb $0x0, -0x1(%rbx,%rax)
cmpb $0x0, (%rbx)
jne 0x3e5c
movw $0x2e, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3dcf
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: truncfileupper
void truncfileupper(char* path)
{
    delendpath(path);
    truncfilepath(path,0);
    if (!path[0])
        strcpy(path,"./");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x3e8e
movq %rbx, %rdi
callq 0x2120
cmpb $0x2f, -0x1(%rbx,%rax)
jne 0x3e8e
movb $0x0, -0x1(%rbx,%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3e10
cmpb $0x0, (%rbx)
jne 0x3ea6
movb $0x0, 0x2(%rbx)
movw $0x2f2e, (%rbx)         # imm = 0x2F2E
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: reversestr
void reversestr(char *value)
{
    char tmpstr[MAX_LINE];
    size_t i,len=strlen(value);
    for (i=0;i<len;++i)
        tmpstr[i]=value[len-i-1];
    memcpy(value,tmpstr,len);
    value[len]=0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x2008, %rsp           # imm = 0x2008
movq %rdi, %rbx
callq 0x2120
movq %rax, %r14
testq %rax, %rax
je 0x3f04
movq %rsp, %rax
movq %r14, %rcx
movb -0x1(%rbx,%rcx), %dl
movb %dl, (%rax)
incq %rax
decq %rcx
jne 0x3ef6
movq %rsp, %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x2240
movb $0x0, (%rbx,%r14)
addq $0x2008, %rsp           # imm = 0x2008
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: escapestr
void escapestr(char *value)
{
    char *s;
    s = strchr(value,'\\');
    while (s)
    {
        memmove(s+1,s,strlen(s)+1);
        value[s-value] = '\\';
        s = strchr(s+2,'\\');
    }
    s = strchr(value,'"');
    while (s)
    {
        memmove(s+1,s,strlen(s)+1);
        value[s-value] = '\\';
        s = strchr(s+2,'"');
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x5c, %esi
callq 0x2130
testq %rax, %rax
je 0x3f74
movq %rax, %r14
leaq 0x1(%r14), %r15
movq %r14, %rdi
callq 0x2120
leaq 0x1(%rax), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x22c0
movb $0x5c, (%r14)
addq $0x2, %r14
movq %r14, %rdi
movl $0x5c, %esi
callq 0x2130
movq %rax, %r14
testq %rax, %rax
jne 0x3f3c
movq %rbx, %rdi
movl $0x22, %esi
callq 0x2130
testq %rax, %rax
je 0x3fc0
movq %rax, %rbx
leaq 0x1(%rbx), %r14
movq %rbx, %rdi
callq 0x2120
leaq 0x1(%rax), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x22c0
movb $0x5c, (%rbx)
addq $0x2, %rbx
movq %rbx, %rdi
movl $0x22, %esi
callq 0x2130
movq %rax, %rbx
testq %rax, %rax
jne 0x3f89
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: simplifypath
void simplifypath(char* path, int head)
{
    char* s;
    for (s=path;*s;++s)
    {
        if (strncmp(s,"/../",4)==0 && s!=path)
        {
            char* end = s+4;
            do
            {
				if (s[-1] == '/' || s[-1] == '\\')
					break;
			} while (--s!=path);
            s = strdel(s,end);
            if (s != path)
                --s;
            --s;
        }
        if (strncmp(s,"/./",3)==0 && s!=path)
            memmove(s+1,s+3,strlen(s+3)+1);
        if (strncmp(s,"/.",3)==0 && s!=path)
            s[1]=0;
    }
    if (head)
    {
        while (path[0] == '.' && path[1] == '/')
            memmove(path,path+2,strlen(path+2));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, 0x4(%rsp)
movq %rdi, %rbx
movb (%rdi), %r12b
testb %r12b, %r12b
je 0x44f3
leaq 0xdd83(%rip), %r14      # 0x121a3
movq %rbx, %r15
movl $0x4, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x20a0
cmpq %rbx, %r15
je 0x4483
testl %eax, %eax
jne 0x4483
leaq 0x4(%r15), %r12
movzbl -0x1(%r15), %eax
cmpl $0x2f, %eax
je 0x445a
cmpl $0x5c, %eax
je 0x445a
decq %r15
cmpq %rbx, %r15
jne 0x4440
movq %rbx, %r15
movq %r12, %rdi
callq 0x2120
leaq 0x1(%rax), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x22c0
xorl %eax, %eax
cmpq %rbx, %r15
setne %al
notq %rax
movb (%rax,%r15), %r12b
addq %rax, %r15
cmpb $0x2f, %r12b
jne 0x44dc
cmpb $0x2e, 0x1(%r15)
jne 0x44c1
cmpq %rbx, %r15
sete %bpl
je 0x44c8
cmpb $0x2f, 0x2(%r15)
jne 0x44c8
leaq 0x1(%r15), %r12
leaq 0x3(%r15), %r13
movq %r13, %rdi
callq 0x2120
leaq 0x1(%rax), %rdx
movq %r12, %rdi
movq %r13, %rsi
callq 0x22c0
jmp 0x44c8
cmpq %rbx, %r15
sete %bpl
cmpb $0x2e, 0x1(%r15)
jne 0x44dc
cmpb $0x0, 0x2(%r15)
setne %al
orb %al, %bpl
je 0x44ee
movb 0x1(%r15), %r12b
incq %r15
testb %r12b, %r12b
jne 0x4423
jmp 0x44f3
movb $0x0, 0x1(%r15)
cmpl $0x0, 0x4(%rsp)
je 0x4524
cmpb $0x2e, (%rbx)
jne 0x4524
leaq 0x2(%rbx), %r14
cmpb $0x2f, 0x1(%rbx)
jne 0x4524
movq %r14, %rdi
callq 0x2120
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x22c0
cmpb $0x2e, (%rbx)
je 0x4503
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: strip_path_abs
void strip_path_abs(char *path, int flags)
{
    assert((flags & FLAG_PATH_MASK) != FLAG_PATH_NOT_PATH);
    switch (flags & FLAG_PATH_MASK)
    {
    case FLAG_PATH_GENERATED:
        if (proj_root_len && strstr(path,proj_root)==path)
            memmove(path,path+proj_root_len,strlen(path+proj_root_len)+1);
        break;
    case FLAG_PATH_COREMAKE:
        if (coremake_root_len && strstr(path,coremake_root)==path)
           memmove(path,path+coremake_root_len,strlen(path+coremake_root_len)+1);
        break;
    case FLAG_PATH_SOURCE:
        if (src_root_len && strstr(path,src_root)==path)
            memmove(path,path+src_root_len,strlen(path+src_root_len)+1);
        break;
    case FLAG_PATH_SYSTEM: // do nothing
        break;
    default: assert(0);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
andl $0xf, %esi
cmpl $0x4, %esi
ja 0x45f2
movq %rdi, %rbx
leaq 0xcace(%rip), %rax      # 0x1101c
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x12ca2(%rip), %r14     # 0x17200
testq %r14, %r14
je 0x45ae
leaq 0x12096(%rip), %r15     # 0x16600
jmp 0x4594
movq 0x12c9d(%rip), %r14     # 0x17210
testq %r14, %r14
je 0x45ae
leaq 0x12881(%rip), %r15     # 0x16e00
jmp 0x4594
movq 0x12c80(%rip), %r14     # 0x17208
testq %r14, %r14
je 0x45ae
leaq 0x1246c(%rip), %r15     # 0x16a00
movq %r15, %rdi
callq 0x2120
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x20a0
testl %eax, %eax
je 0x45b4
popq %rbx
popq %r14
popq %r15
retq
addq %rbx, %r14
movq %r14, %rdi
callq 0x2120
leaq 0x1(%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x22c0
leaq 0xcc03(%rip), %rdi      # 0x111dd
leaq 0xcac5(%rip), %rsi      # 0x110a6
leaq 0xcc24(%rip), %rcx      # 0x1120c
movl $0x4e0, %edx            # imm = 0x4E0
callq 0x2160
leaq 0xda80(%rip), %rdi      # 0x12079
leaq 0xcaa6(%rip), %rsi      # 0x110a6
leaq 0xcc05(%rip), %rcx      # 0x1120c
movl $0x4f1, %edx            # imm = 0x4F1
callq 0x2160
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: load_cond2
itemcond* load_cond2(reader* file,item* config)
{
	itemcond* p;
	if (reader_istoken(file,"("))
	{
		p = load_cond0(file,config);
		if (!reader_istoken(file,")"))
			syntax(file);
	}
	else
	{
		if (reader_istoken(file,")"))
			syntax(file);
		reader_name(file);
		p = itemcond_new(COND_GET,item_get(config,file->token,0));
	}
	return p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xcd16(%rip), %rsi      # 0x1154b
callq 0x39b0
testl %eax, %eax
je 0x4861
movq %rbx, %rdi
movq %r14, %rsi
callq 0x48d3
movq %rax, %r14
leaq 0xd9ee(%rip), %rsi      # 0x12241
movq %rbx, %rdi
callq 0x39b0
testl %eax, %eax
jne 0x48a5
jmp 0x48b0
leaq 0xd9d9(%rip), %rsi      # 0x12241
movq %rbx, %rdi
callq 0x39b0
testl %eax, %eax
jne 0x48b0
movq %rbx, %rdi
callq 0x3b40
movq 0x30(%rbx), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x270b
movq %rax, %rbx
movl $0x20, %edi
callq 0x24fa
movq %rax, %r14
movq $0x1, (%rax)
movq %rbx, 0x8(%rax)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x38(%rbx), %rsi
movl 0xc(%rbx), %edx
movq 0x28(%rbx), %rcx
leaq 0xc7ae(%rip), %rdi      # 0x11070
xorl %eax, %eax
callq 0x2140
movl $0x1, %edi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: load_cond0
itemcond* load_cond0(reader* file,item* config)
{
	itemcond* a = load_cond1(file,config);
	if (reader_istoken(file,"||"))
	{
		itemcond* p = itemcond_new(COND_OR,NULL);
		p->a = a;
		p->b = load_cond0(file,config);
		return p;
	}
	if (reader_istoken(file,"&&"))
	{
		itemcond* p = itemcond_new(COND_AND,NULL);
		p->a = a;
		p->b = load_cond0(file,config);
		return p;
	}
	return a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x495a
movq %rax, %r15
leaq 0xc994(%rip), %rsi      # 0x11284
movq %r14, %rdi
callq 0x39b0
movl $0x1, %ebp
testl %eax, %eax
jne 0x4919
leaq 0xc97f(%rip), %rsi      # 0x11287
movq %r14, %rdi
callq 0x39b0
movl $0x2, %ebp
testl %eax, %eax
je 0x494e
movl $0x20, %edi
callq 0x24fa
movq %rax, %r12
movl $0x1, (%rax)
movl %ebp, 0x4(%rax)
movq $0x0, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x48d3
movq %rax, 0x18(%r12)
movq %r12, %r15
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: load_cond1
itemcond* load_cond1(reader* file,item* config)
{
	if (reader_istoken(file,"!"))
	{
		itemcond* p = itemcond_new(COND_NOT,NULL);
		p->a = load_cond1(file,config);
		return p;
	}
	else
		return load_cond2(file,config);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xdb08(%rip), %rsi      # 0x12474
callq 0x39b0
testl %eax, %eax
je 0x49af
movl $0x20, %edi
callq 0x24fa
movq %rax, %r15
movabsq $0x300000001, %rax      # imm = 0x300000001
movq %rax, (%r15)
movq $0x0, 0x8(%r15)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x495a
movq %rax, 0x10(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x4824
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: load_cond
itemcond* load_cond(item* item, reader* file, int force)
{
	itemcond* p = NULL;
	if (reader_istoken(file,"("))
	{
		p = load_cond0(file,getconfig(item));
		if (!reader_istoken(file,")"))
			syntax(file);
	}
	else
	if (force)
		p = load_cond0(file,getconfig(item));

	return p;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xcb79(%rip), %rsi      # 0x1154b
movq %rbx, %rdi
callq 0x39b0
testl %eax, %eax
je 0x4a21
movq %r14, %rdi
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x49de
leaq 0xc6e0(%rip), %rsi      # 0x110d1
xorl %edx, %edx
callq 0x270b
movq %rbx, %rdi
movq %rax, %rsi
callq 0x48d3
movq %rax, %r14
leaq 0xd834(%rip), %rsi      # 0x12241
movq %rbx, %rdi
callq 0x39b0
testl %eax, %eax
je 0x4a53
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
testl %ebp, %ebp
je 0x4a4e
movq %r14, %rdi
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x4a25
leaq 0xc699(%rip), %rsi      # 0x110d1
xorl %edx, %edx
callq 0x270b
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x48d3
xorl %r14d, %r14d
jmp 0x4a19
movq 0x38(%rbx), %rsi
movl 0xc(%rbx), %edx
movq 0x28(%rbx), %rcx
leaq 0xc60b(%rip), %rdi      # 0x11070
xorl %eax, %eax
callq 0x2140
movl $0x1, %edi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: load_file
int load_file(item* p,const char* filename, int file_kind, itemcond* cond)
{
	reader r;
    reader_init(&r);
	strcpy(r.filename,filename);
	pathunix(r.filename);
	r.r.f = fopen(filename,"r");
	r.pos = r.line;
	if (r.r.f)
	{
        r.r.filename_kind = file_kind;
		load_item(p,&r,0,cond);
		fclose(r.r.f);
        reader_free(&r);
		return 1;
	}
    reader_free(&r);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %r14
movq %rsp, %r15
movq %r15, %rdi
callq 0x33d9
movq 0x38(%r15), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x20b0
movq %r15, %rax
movzbl (%rax), %ecx
cmpl $0x5c, %ecx
je 0x5b3f
testl %ecx, %ecx
jne 0x5b42
jmp 0x5b47
movb $0x2f, (%rax)
incq %rax
jmp 0x5b31
leaq 0xb823(%rip), %rsi      # 0x11371
movq %r12, %rdi
callq 0x22d0
movq %rax, (%rsp)
movq 0x28(%rsp), %r12
movq %r12, 0x20(%rsp)
testq %rax, %rax
je 0x5baa
movq %rsp, %r15
movl %ebp, 0x14(%r15)
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x4a76
movq (%r15), %rdi
callq 0x20f0
movq 0x38(%r15), %rdi
callq 0x2050
movq 0x28(%r15), %rdi
callq 0x2050
movq 0x30(%r15), %rdi
callq 0x2050
movl $0x1, %eax
jmp 0x5bc6
movq %r15, %rdi
callq 0x2050
movq %r12, %rdi
callq 0x2050
movq 0x30(%rsp), %rdi
callq 0x2050
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: dumpitem
void dumpitem(item* p,int deep)
{
	item** child;
	printf("%*c%s",deep*2,' ',p->value);
	if (p->cond)
	{
		printf(" (");
		dumpcond(stdout,p->cond,1,COND_GET,NULL,0);
		printf(")");
	}
	printf("\r\n");
	for (child=p->child;child!=p->childend;++child)
		dumpitem(*child,deep+1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
leal (%rbx,%rbx), %esi
movq (%rdi), %rcx
leaq 0xb77e(%rip), %rdi      # 0x11544
movl $0x20, %edx
xorl %eax, %eax
callq 0x2140
cmpq $0x0, 0x8(%r14)
je 0x5e11
leaq 0xb76a(%rip), %rdi      # 0x1154a
xorl %eax, %eax
callq 0x2140
movq 0x101f2(%rip), %rax     # 0x15fe0
movq (%rax), %rdi
movq 0x8(%r14), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5bd3
movl $0x29, %edi
callq 0x2060
leaq 0xc6fa(%rip), %rdi      # 0x12512
callq 0x20d0
movq 0x18(%r14), %r15
cmpq 0x20(%r14), %r15
je 0x5e3d
incl %ebx
movq (%r15), %rdi
movl %ebx, %esi
callq 0x5daf
addq $0x8, %r15
cmpq 0x20(%r14), %r15
jne 0x5e29
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: usage
void usage()
{
	printf("usage: coremake [<options>] <platform>\r\n\r\n");
	printf(" -h : help\r\n");
	printf(" -v : verbose\r\n");
	printf(" -r : root folder (default is current dir)\r\n");
	printf(" -f <file> : specify project file (default is root.proj)\r\n");
	printf(" -d : dump project\r\n");
	printf(" -p : dump project at the end\r\n");
    // TODO: add support for using another config file than config.h
}

// Assembly:
pushq %rax
leaq 0xc69f(%rip), %rdi      # 0x124ea
callq 0x20d0
leaq 0xc6bd(%rip), %rdi      # 0x12514
callq 0x20d0
leaq 0xc6bd(%rip), %rdi      # 0x12520
callq 0x20d0
leaq 0xc6c0(%rip), %rdi      # 0x1252f
callq 0x20d0
leaq 0xc6e0(%rip), %rdi      # 0x1255b
callq 0x20d0
leaq 0xc70e(%rip), %rdi      # 0x12595
callq 0x20d0
leaq 0xc716(%rip), %rdi      # 0x125a9
popq %rax
jmp 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: preprocess_setremoved
void preprocess_setremoved(item* p)
{
	item** child;
	p->flags |= FLAG_REMOVED;
	p->flags &= ~FLAG_DEFINED;
	for (child=p->child;child!=p->childend;++child)
		preprocess_setremoved(*child);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x30(%rdi), %eax
andl $-0x61, %eax
orl $0x40, %eax
movl %eax, 0x30(%rdi)
movq 0x18(%rdi), %r14
cmpq 0x20(%rdi), %r14
je 0x5ec8
movq %rdi, %rbx
movq (%r14), %rdi
callq 0x5e99
addq $0x8, %r14
cmpq 0x20(%rbx), %r14
jne 0x5eb6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: preprocess_condstart
void preprocess_condstart(item* p)
{
	item** child;
	p->flags &= ~FLAG_PROCESSED;
	p->flags &= ~FLAG_REMOVED;
	for (child=p->child;child!=p->childend;++child)
		preprocess_condstart(*child);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
andb $0x3f, 0x30(%rdi)
movq 0x18(%rdi), %r14
cmpq 0x20(%rdi), %r14
je 0x5ef7
movq %rdi, %rbx
movq (%r14), %rdi
callq 0x5ed0
addq $0x8, %r14
cmpq 0x20(%rbx), %r14
jne 0x5ee5
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: preprocess_config
void preprocess_config(item* p)
{
	item** child;
	for (child=p->child;child!=p->childend;++child)
		if (!((*child)->flags & FLAG_DEFINED))
			(*child)->flags |= FLAG_REMOVED;
}

// Assembly:
movq 0x18(%rdi), %rax
movq 0x20(%rdi), %rcx
cmpq %rcx, %rax
je 0x5f24
movq (%rax), %rdx
movl 0x30(%rdx), %esi
testb $0x20, %sil
jne 0x5f1e
orl $0x40, %esi
movl %esi, 0x30(%rdx)
addq $0x8, %rax
jmp 0x5f07
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: preprocess_condend
void preprocess_condend(item* p)
{
	item** child;

	if (p->cond)
	{
		itemcond_delete(p->cond);
		p->cond = NULL;
	}

	for (child=p->child;child!=p->childend;++child)
	{
		if ((*child)->flags & FLAG_REMOVED)
		{
			item_delete(*child);
			--child;
		}
		else
			preprocess_condend(*child);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x5f42
callq 0x2d31
movq $0x0, 0x8(%rbx)
movq 0x18(%rbx), %r14
cmpq 0x20(%rbx), %r14
je 0x5f6b
movq (%r14), %rdi
testb $0x40, 0x30(%rdi)
jne 0x5f5c
callq 0x5f25
jmp 0x5f65
callq 0x2d5b
addq $-0x8, %r14
addq $0x8, %r14
jmp 0x5f46
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: preprocess_dependency
void preprocess_dependency(item* p)
{
	item** child;
	if (!p) return;
	for (child=p->child;child!=p->childend;++child)
		preprocess_dependency_project(*child);
}

// Assembly:
testq %rdi, %rdi
je 0x61bd
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %r14
cmpq 0x20(%rbx), %r14
je 0x61b6
movq (%r14), %rdi
callq 0x5fbf
addq $0x8, %r14
jmp 0x61a2
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: file_finalize
void file_finalize(char* name)
{
	char tmp[MAX_PATH];
	char* i = strrchr(name,'.');
	if (i && stricmp(i,".tmp")==0)
	{
		FILE* a;
		FILE* b;
		int same=0;

		strcpy(tmp,name);
		*i = 0;

		a = fopen(tmp,"rb");
		b = fopen(name,"rb");
		if (a && b)
		{
			char bufa[1024];
			char bufb[1024];
			for (;;)
			{
				size_t na = fread(bufa,1,sizeof(bufa),a);
				size_t nb = fread(bufb,1,sizeof(bufb),b);
				if (na != nb || memcmp(bufa,bufb,na)!=0)
					break;
				if (feof(a) || feof(b))
				{
					same=1;
					break;
				}
			}
		}
		if (a) fclose(a);
		if (b) fclose(b);
		if (!same)
		{
			if (verbose)
				printf("updating %s\r\n",name);
			remove(name);
			rename(tmp,name);
		}
		else
			remove(tmp);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc18, %rsp            # imm = 0xC18
movq %rdi, %rbx
movl $0x2e, %esi
callq 0x2150
testq %rax, %rax
je 0x632f
movq %rax, %r14
leaq 0xb396(%rip), %rsi      # 0x11585
movq %rax, %rdi
callq 0x2070
testl %eax, %eax
jne 0x632f
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x20b0
movb $0x0, (%r14)
leaq 0xb370(%rip), %r14      # 0x1158a
movq %r15, %rdi
movq %r14, %rsi
callq 0x22d0
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22d0
movq %rax, %r14
testq %r15, %r15
sete %al
testq %r14, %r14
sete %cl
movb $0x1, %r12b
orb %al, %cl
jne 0x62d5
movq %rbx, 0x8(%rsp)
leaq 0x810(%rsp), %rbx
leaq 0x410(%rsp), %r12
movl $0x1, %esi
movl $0x400, %edx            # imm = 0x400
movq %rbx, %r13
movq %rbx, %rdi
movq %r15, %rcx
callq 0x20e0
movq %rax, %rbp
movl $0x1, %esi
movl $0x400, %edx            # imm = 0x400
movq %r12, %rdi
movq %r14, %rcx
callq 0x20e0
movq %r12, %rsi
movb $0x1, %r12b
cmpq %rax, %rbp
jne 0x62d0
movq %r13, %rbx
movq %r13, %rdi
movq %rsi, %r13
movq %rbp, %rdx
callq 0x2280
testl %eax, %eax
jne 0x62d0
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
jne 0x62cd
movq %r14, %rdi
callq 0x2220
testl %eax, %eax
movq %r13, %r12
je 0x6262
xorl %r12d, %r12d
movq 0x8(%rsp), %rbx
testq %r15, %r15
je 0x62e2
movq %r15, %rdi
callq 0x20f0
testq %r14, %r14
je 0x62ef
movq %r14, %rdi
callq 0x20f0
testb %r12b, %r12b
je 0x6325
cmpl $0x0, 0x102f5(%rip)     # 0x165f0
je 0x630e
leaq 0xb289(%rip), %rdi      # 0x1158d
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2140
movq %rbx, %rdi
callq 0x2090
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x22e0
jmp 0x632f
leaq 0x10(%rsp), %rdi
callq 0x2090
addq $0xc18, %rsp            # imm = 0xC18
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: itemcond_print
itemcond* itemcond_print(FILE* f,itemcond* p,itemcond* cond)
{
	if (!itemcond_same(p,cond))
	{
		if (p)
		{
			itemcond_delete(p);
			fprintf(f,"#endif\n");
		}

		p = itemcond_dup(cond);
		if (p)
		{
            int pos = ftell(f);
			fprintf(f,"#if ");
			dumpcond(f,p,1,COND_GET,&pos,0);
			fprintf(f,"\n");
		}
	}
	return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x2e1b
testl %eax, %eax
je 0x6367
movq %r15, %rbx
jmp 0x63e6
testq %r15, %r15
je 0x638d
movq %r15, %rdi
callq 0x2d31
leaq 0xb220(%rip), %rdi      # 0x1159b
movl $0x7, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x2330
testq %rbx, %rbx
je 0x63e4
incl (%rbx)
movq %r14, %rdi
callq 0x2210
leaq 0xc(%rsp), %r15
movl %eax, (%r15)
leaq 0xb1f8(%rip), %rdi      # 0x115a3
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x2330
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
movq %r15, %r8
xorl %r9d, %r9d
callq 0x5bd3
movl $0xa, %edi
movq %r14, %rsi
callq 0x21a0
jmp 0x63e6
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: getpri
int getpri(item* p)
{
    int i;
    item* v = item_find(p,"priority");
    if (v && item_childcount(v) && sscanf(v->child[0]->value,"%d",&i)==1)
        return i;
    return MAX_PRI;
}

// Assembly:
pushq %rax
leaq 0xb0ad(%rip), %rsi      # 0x1151e
callq 0x2694
movq %rax, %rcx
movl $0x100000, %eax         # imm = 0x100000
testq %rcx, %rcx
je 0x64b6
movq 0x18(%rcx), %rdx
cmpq %rdx, 0x20(%rcx)
je 0x64b6
movq (%rdx), %rax
movq (%rax), %rdi
leaq 0xb2cb(%rip), %rsi      # 0x11765
leaq 0x4(%rsp), %rdx
xorl %eax, %eax
callq 0x2270
movl %eax, %ecx
movl $0x100000, %eax         # imm = 0x100000
cmpl $0x1, %ecx
jne 0x64b6
movl 0x4(%rsp), %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O3/corecodec[P]coremake/coremake.c
// Function: getabspath
void getabspath(char* path, int path_flags, const char *rel_path, int rel_flags)
{
    //assert((path_flags & FLAG_PATH_MASK) != FLAG_PATH_NOT_PATH);
    if (!(path_flags & FLAG_PATH_SET_ABSOLUTE))
    {
        char base[3*MAX_PATH];
        if (rel_path[0])
        {
            base[0] = '\0';
            strins(base,rel_path,getfilename(rel_path));
        }
        else
            switch (rel_flags & FLAG_PATH_MASK)
            {
            case FLAG_PATH_SOURCE:    strcpy(base,src_root); break;
            case FLAG_PATH_GENERATED: strcpy(base,proj_root); break;
            case FLAG_PATH_COREMAKE:  strcpy(base,coremake_root); break;
            default: base[0] = '\0'; // safety
            }
        addendpath(base);
        strcat(base,path);
        simplifypath(base,0);
        strcpy(path,base);
    }
}

// Assembly:
testb $0x10, %sil
jne 0x6a93
pushq %r15
pushq %r14
pushq %rbx
subq $0xc00, %rsp            # imm = 0xC00
movq %rdx, %r14
movq %rdi, %rbx
cmpb $0x0, (%rdx)
je 0x6a23
movq %rsp, %r15
movb $0x0, (%r15)
movq %r14, %rdi
movl $0x2f, %esi
callq 0x2150
leaq 0x1(%rax), %rdx
testq %rax, %rax
cmoveq %r14, %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x3598
jmp 0x6a5c
andl $0xf, %ecx
cmpl $0x3, %ecx
je 0x6a47
cmpl $0x2, %ecx
je 0x6a3e
cmpl $0x1, %ecx
jne 0x6a58
leaq 0xfbc4(%rip), %rsi      # 0x16600
jmp 0x6a4e
leaq 0xffbb(%rip), %rsi      # 0x16a00
jmp 0x6a4e
leaq 0x103b2(%rip), %rsi     # 0x16e00
movq %rsp, %rdi
callq 0x20b0
jmp 0x6a5c
movb $0x0, (%rsp)
movq %rsp, %r14
movq %r14, %rdi
callq 0x3dcf
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2300
movq %r14, %rdi
xorl %esi, %esi
callq 0x43fb
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20b0
addq $0xc00, %rsp            # imm = 0xC00
popq %rbx
popq %r14
popq %r15
retq