// File: corecodec[P]coremake/coremake.c
// Function: eval3
char* eval3(const char** s,item* config,reader* file)
{
	int n;
	char* a;
	const char* s0;
	evalspace(s);
	if ((*s)[0] == '(')
	{
		char* a;
		*s += 1;
		a = eval0(s,config,file);

		evalspace(s);
		if ((*s)[0] != ')')
			syntax(file);
		*s += 1;
		return a;
	}
	else
	if ((*s)[0] == '"')
	{
		*s += 1;
		s0 = *s;
		for (n=0;(*s)[0] && (*s)[0]!='"';(*s)++,++n);
		if ((*s)[0]!='"')
			syntax(file);
		*s += 1;
		a = (char*)zalloc(n+1);
		memcpy(a,s0,n);
	}
	else
	if (isname((*s)[0]))
	{
		s0 = *s;
		for (n=0;(*s)[0] && isname((*s)[0]);(*s)++,++n);
		a = (char*)zalloc(n+1);
		memcpy(a,s0,n);

		if (stricmp(a,"defined")==0 && (*s)[0]=='(')
		{
			item* i;
			free(a);
			*s += 1;

			s0 = *s;
			for (n=0;(*s)[0] && (*s)[0]!=')';(*s)++,++n);
			a = (char*)zalloc(n+1);
			memcpy(a,s0,n);

			i = item_find(config,a);
			free(a);

			if ((*s)[0] != ')')
				syntax(file);
			*s += 1;

			a = bool2str(i && (i->flags & FLAG_DEFINED));
		}
	}
	else
		a = strdup("");

	return a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x11d40
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x28, %eax
jne 0x11e3b
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x12100
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x11d40
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x29, %eax
je 0x11e20
movq -0x20(%rbp), %rdi
callq 0x24e0
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x120ec
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x11f04
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x49(%rbp)
je 0x11e95
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
setne %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x11e9e
jmp 0x11eb9
jmp 0x11ea0
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x11e6e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
je 0x11ed1
movq -0x20(%rbp), %rdi
callq 0x24e0
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movl -0x24(%rbp), %edi
addl $0x1, %edi
callq 0x2520
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movslq -0x24(%rbp), %rdx
callq 0x2220
jmp 0x120e2
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %edi
callq 0x4190
cmpl $0x0, %eax
je 0x120d0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x4a(%rbp)
je 0x11f5a
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %edi
callq 0x4190
cmpl $0x0, %eax
setne %al
movb %al, -0x4a(%rbp)
movb -0x4a(%rbp), %al
testb $0x1, %al
jne 0x11f63
jmp 0x11f7e
jmp 0x11f65
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x11f2e
movl -0x24(%rbp), %edi
addl $0x1, %edi
callq 0x2520
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movslq -0x24(%rbp), %rdx
callq 0x2220
movq -0x30(%rbp), %rdi
leaq 0x5383(%rip), %rsi      # 0x1732c
callq 0x2050
cmpl $0x0, %eax
jne 0x120ce
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x28, %eax
jne 0x120ce
movq -0x30(%rbp), %rdi
callq 0x2040
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x4b(%rbp)
je 0x1201a
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x29, %eax
setne %al
movb %al, -0x4b(%rbp)
movb -0x4b(%rbp), %al
testb $0x1, %al
jne 0x12023
jmp 0x1203e
jmp 0x12025
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x11ff3
movl -0x24(%rbp), %edi
addl $0x1, %edi
callq 0x2520
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movslq -0x24(%rbp), %rdx
callq 0x2220
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x27d0
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rdi
callq 0x2040
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x29, %eax
je 0x12090
movq -0x20(%rbp), %rdi
callq 0x24e0
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
xorl %eax, %eax
cmpq $0x0, -0x48(%rbp)
movb %al, -0x4c(%rbp)
je 0x120bd
movq -0x48(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x4c(%rbp)
movb -0x4c(%rbp), %al
andb $0x1, %al
movzbl %al, %edi
callq 0x11d10
movq %rax, -0x30(%rbp)
jmp 0x120e0
leaq 0x48a1(%rip), %rdi      # 0x16978
callq 0x2330
movq %rax, -0x30(%rbp)
jmp 0x120e2
jmp 0x120e4
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)