// File: /workspace/github_c_makefile_star2_O3/saltyJeff[P]uClibcpp/extra/config/./expr.c
// Function: expr_eliminate_yn
struct expr *expr_eliminate_yn(struct expr *e)
{
	struct expr *tmp;

	if (e) switch (e->type) {
	case E_AND:
		e->left.expr = expr_eliminate_yn(e->left.expr);
		e->right.expr = expr_eliminate_yn(e->right.expr);
		if (e->left.expr->type == E_SYMBOL) {
			if (e->left.expr->left.sym == &symbol_no) {
				expr_free(e->left.expr);
				expr_free(e->right.expr);
				e->type = E_SYMBOL;
				e->left.sym = &symbol_no;
				e->right.expr = NULL;
				return e;
			} else if (e->left.expr->left.sym == &symbol_yes) {
				free(e->left.expr);
				tmp = e->right.expr;
				*e = *(e->right.expr);
				free(tmp);
				return e;
			}
		}
		if (e->right.expr->type == E_SYMBOL) {
			if (e->right.expr->left.sym == &symbol_no) {
				expr_free(e->left.expr);
				expr_free(e->right.expr);
				e->type = E_SYMBOL;
				e->left.sym = &symbol_no;
				e->right.expr = NULL;
				return e;
			} else if (e->right.expr->left.sym == &symbol_yes) {
				free(e->right.expr);
				tmp = e->left.expr;
				*e = *(e->left.expr);
				free(tmp);
				return e;
			}
		}
		break;
	case E_OR:
		e->left.expr = expr_eliminate_yn(e->left.expr);
		e->right.expr = expr_eliminate_yn(e->right.expr);
		if (e->left.expr->type == E_SYMBOL) {
			if (e->left.expr->left.sym == &symbol_no) {
				free(e->left.expr);
				tmp = e->right.expr;
				*e = *(e->right.expr);
				free(tmp);
				return e;
			} else if (e->left.expr->left.sym == &symbol_yes) {
				expr_free(e->left.expr);
				expr_free(e->right.expr);
				e->type = E_SYMBOL;
				e->left.sym = &symbol_yes;
				e->right.expr = NULL;
				return e;
			}
		}
		if (e->right.expr->type == E_SYMBOL) {
			if (e->right.expr->left.sym == &symbol_no) {
				free(e->right.expr);
				tmp = e->left.expr;
				*e = *(e->left.expr);
				free(tmp);
				return e;
			} else if (e->right.expr->left.sym == &symbol_yes) {
				expr_free(e->left.expr);
				expr_free(e->right.expr);
				e->type = E_SYMBOL;
				e->left.sym = &symbol_yes;
				e->right.expr = NULL;
				return e;
			}
		}
		break;
	default:
		;
	}
	return e;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x8cb2
movl (%rbx), %eax
cmpl $0x1, %eax
je 0x8bd3
cmpl $0x2, %eax
jne 0x8cb2
movq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x8b2e
movq %r14, 0x8(%rbx)
movq 0x10(%rbx), %r14
movq %r14, %rdi
callq 0x8b2e
movq %r14, 0x10(%rbx)
movq 0x8(%rbx), %rdi
cmpl $0x7, (%rdi)
jne 0x8ba0
movq 0x8(%rdi), %rax
leaq 0xc691(%rip), %r15      # 0x15218
cmpq %r15, %rax
je 0x8c58
leaq 0xc6f1(%rip), %rcx      # 0x15288
cmpq %rcx, %rax
je 0x8c7a
cmpl $0x7, (%r14)
jne 0x8cb2
movq 0x8(%r14), %rax
leaq 0xc663(%rip), %r15      # 0x15218
cmpq %r15, %rax
je 0x8c58
leaq 0xc6c3(%rip), %rcx      # 0x15288
cmpq %rcx, %rax
jne 0x8cb2
jmp 0x8c93
movq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x8b2e
movq %r14, 0x8(%rbx)
movq 0x10(%rbx), %r14
movq %r14, %rdi
callq 0x8b2e
movq %r14, 0x10(%rbx)
movq 0x8(%rbx), %rdi
cmpl $0x7, (%rdi)
jne 0x8c18
movq 0x8(%rdi), %rax
leaq 0xc611(%rip), %rcx      # 0x15218
cmpq %rcx, %rax
je 0x8c7a
leaq 0xc675(%rip), %r15      # 0x15288
cmpq %r15, %rax
je 0x8c58
cmpl $0x7, (%r14)
jne 0x8cb2
movq 0x8(%r14), %rax
leaq 0xc5eb(%rip), %rcx      # 0x15218
cmpq %rcx, %rax
je 0x8c93
leaq 0xc64f(%rip), %r14      # 0x15288
cmpq %r14, %rax
jne 0x8cb2
callq 0x8968
movq 0x10(%rbx), %rdi
callq 0x8968
movl $0x7, (%rbx)
movq %r14, 0x8(%rbx)
jmp 0x8c70
callq 0x8968
movq 0x10(%rbx), %rdi
callq 0x8968
movl $0x7, (%rbx)
movq %r15, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
jmp 0x8cb2
callq 0x2040
movq 0x10(%rbx), %rdi
movups (%rdi), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rdi), %rax
movq %rax, 0x10(%rbx)
jmp 0x8cad
movq %r14, %rdi
callq 0x2040
movq 0x8(%rbx), %rdi
movq 0x10(%rdi), %rax
movq %rax, 0x10(%rbx)
movups (%rdi), %xmm0
movups %xmm0, (%rbx)
callq 0x2040
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq