// File: /workspace/github_c_makefile_star2_O0/saltyJeff[P]uClibcpp/extra/config/./expr.c
// Function: expr_calc_value
tristate expr_calc_value(struct expr *e)
{
	tristate val1, val2;
	const char *str1, *str2;

	if (!e)
		return yes;

	switch (e->type) {
	case E_SYMBOL:
		sym_calc_value(e->left.sym);
		return e->left.sym->curr.tri;
	case E_AND:
		val1 = expr_calc_value(e->left.expr);
		val2 = expr_calc_value(e->right.expr);
		return E_AND(val1, val2);
	case E_OR:
		val1 = expr_calc_value(e->left.expr);
		val2 = expr_calc_value(e->right.expr);
		return E_OR(val1, val2);
	case E_NOT:
		val1 = expr_calc_value(e->left.expr);
		return E_NOT(val1);
	case E_EQUAL:
		sym_calc_value(e->left.sym);
		sym_calc_value(e->right.sym);
		str1 = sym_get_string_value(e->left.sym);
		str2 = sym_get_string_value(e->right.sym);
		return !strcmp(str1, str2) ? yes : no;
	case E_UNEQUAL:
		sym_calc_value(e->left.sym);
		sym_calc_value(e->right.sym);
		str1 = sym_get_string_value(e->left.sym);
		str2 = sym_get_string_value(e->right.sym);
		return !strcmp(str1, str2) ? no : yes;
	default:
		printf("expr_calc_value: %d?\n", e->type);
		return no;
	}
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0xe28e
movl $0x2, 0x34(%rsp)
jmp 0xe494
movq 0x28(%rsp), %rax
movl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x6, %eax
ja 0xe477
movq 0x8(%rsp), %rax
leaq 0x244d(%rip), %rcx      # 0x10700
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xa4f0
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x28(%rax), %eax
movl %eax, 0x34(%rsp)
jmp 0xe494
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xe270
movl %eax, 0x24(%rsp)
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xe270
movl %eax, 0x20(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x20(%rsp), %eax
jae 0xe317
movl 0x24(%rsp), %eax
movl %eax, 0x4(%rsp)
jmp 0xe31f
movl 0x20(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0xe494
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xe270
movl %eax, 0x24(%rsp)
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xe270
movl %eax, 0x20(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x20(%rsp), %eax
jbe 0xe363
movl 0x24(%rsp), %eax
movl %eax, (%rsp)
jmp 0xe36a
movl 0x20(%rsp), %eax
movl %eax, (%rsp)
movl (%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0xe494
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xe270
movl %eax, 0x24(%rsp)
movl $0x2, %eax
subl 0x24(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0xe494
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xa4f0
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xa4f0
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xb7c0
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xb7c0
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x2180
cmpl $0x0, %eax
setne %dl
xorb $-0x1, %dl
xorl %eax, %eax
movl $0x2, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, 0x34(%rsp)
jmp 0xe494
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xa4f0
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xa4f0
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xb7c0
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xb7c0
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x2180
cmpl $0x0, %eax
setne %dl
xorb $-0x1, %dl
movl $0x2, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, 0x34(%rsp)
jmp 0xe494
movq 0x28(%rsp), %rax
movl (%rax), %esi
leaq 0x7900(%rip), %rdi      # 0x15d85
movb $0x0, %al
callq 0x20f0
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)