// File: corecodec[P]coremake/coremake.c
// Function: dumpcond
void dumpcond(FILE* f,itemcond* p,int first,int prev,int* startpos,int nobreak)
{
    int pos = ftell(f);
    if (startpos && !nobreak && pos>*startpos+200)
    {
        fprintf(f,"\\\n    ");
        *startpos = pos;
    }

    itemcond_reduce(p);

	if (!first && (p->func==COND_OR || p->func==COND_AND) && p->func!=prev)
		fprintf(f,"(");

	switch (p->func)
	{
	case COND_GET:
		fprintf(f,"defined(%s)",p->value->value);
		break;
	case COND_NOT:
        if (p->a->func == COND_NOT)
		    dumpcond(f,p->a->a,0,COND_NOT,startpos,0);
        else
        {
		    fprintf(f,"!");
		    dumpcond(f,p->a,0,p->func,startpos,1);
        }
		break;
	case COND_OR:
		dumpcond(f,p->a,0,p->func,startpos,0);
		fprintf(f," || ");
		dumpcond(f,p->b,0,p->func,startpos,0);
		break;
	case COND_AND:
		dumpcond(f,p->a,0,p->func,startpos,0);
		fprintf(f," && ");
		dumpcond(f,p->b,0,p->func,startpos,0);
		break;
	case COND_0:
		fprintf(f,"0");
		break;
	case COND_1:
		fprintf(f,"1");
		break;
	}

	if (!first && (p->func==COND_OR || p->func==COND_AND) && p->func!=prev)
		fprintf(f,")");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movq -0x8(%rbp), %rdi
callq 0x21f0
movl %eax, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x7625
cmpl $0x0, -0x24(%rbp)
jne 0x7625
movl -0x28(%rbp), %eax
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
addl $0xc8, %ecx
cmpl %ecx, %eax
jle 0x7625
movq -0x8(%rbp), %rdi
leaq 0xef41(%rip), %rsi      # 0x16556
movb $0x0, %al
callq 0x21e0
movl -0x28(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x3420
cmpl $0x0, -0x14(%rbp)
jne 0x7666
movq -0x10(%rbp), %rax
cmpl $0x1, 0x4(%rax)
je 0x7648
movq -0x10(%rbp), %rax
cmpl $0x2, 0x4(%rax)
jne 0x7666
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x18(%rbp), %eax
je 0x7666
movq -0x8(%rbp), %rdi
leaq 0xef1b(%rip), %rsi      # 0x1657a
movb $0x0, %al
callq 0x21e0
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq %rax, -0x30(%rbp)
subq $0x5, %rax
ja 0x77f6
movq -0x30(%rbp), %rax
leaq 0xe9a6(%rip), %rcx      # 0x1602c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdx
leaq 0xeeb8(%rip), %rsi      # 0x1655d
movb $0x0, %al
callq 0x21e0
jmp 0x77f6
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x3, 0x4(%rax)
jne 0x76e5
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rsi
movq -0x20(%rbp), %r8
xorl %r9d, %r9d
movl $0x3, %ecx
movl %r9d, %edx
callq 0x75c0
jmp 0x771b
movq -0x8(%rbp), %rdi
leaq 0xfeea(%rip), %rsi      # 0x175da
movb $0x0, %al
callq 0x21e0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x20(%rbp), %r8
xorl %edx, %edx
movl $0x1, %r9d
callq 0x75c0
jmp 0x77f6
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x20(%rbp), %r8
xorl %r9d, %r9d
movl %r9d, %edx
callq 0x75c0
movq -0x8(%rbp), %rdi
leaq 0xee1c(%rip), %rsi      # 0x16569
movb $0x0, %al
callq 0x21e0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x20(%rbp), %r8
xorl %r9d, %r9d
movl %r9d, %edx
callq 0x75c0
jmp 0x77f6
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x20(%rbp), %r8
xorl %r9d, %r9d
movl %r9d, %edx
callq 0x75c0
movq -0x8(%rbp), %rdi
leaq 0xedc9(%rip), %rsi      # 0x1656e
movb $0x0, %al
callq 0x21e0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x20(%rbp), %r8
xorl %r9d, %r9d
movl %r9d, %edx
callq 0x75c0
jmp 0x77f6
movq -0x8(%rbp), %rdi
leaq 0xf9b2(%rip), %rsi      # 0x1718d
movb $0x0, %al
callq 0x21e0
jmp 0x77f6
movq -0x8(%rbp), %rdi
leaq 0xeca9(%rip), %rsi      # 0x16498
movb $0x0, %al
callq 0x21e0
cmpl $0x0, -0x14(%rbp)
jne 0x782e
movq -0x10(%rbp), %rax
cmpl $0x1, 0x4(%rax)
je 0x7810
movq -0x10(%rbp), %rax
cmpl $0x2, 0x4(%rax)
jne 0x782e
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x18(%rbp), %eax
je 0x782e
movq -0x8(%rbp), %rdi
leaq 0xfb5b(%rip), %rsi      # 0x17382
movb $0x0, %al
callq 0x21e0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)