// File: /workspace/github_c_makefile_star2_O1/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 0x93a1
movl (%rbx), %eax
cmpl $0x1, %eax
je 0x92c2
cmpl $0x2, %eax
jne 0x93a1
movq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x921d
movq %r14, 0x8(%rbx)
movq 0x10(%rbx), %r14
movq %r14, %rdi
callq 0x921d
movq %r14, 0x10(%rbx)
movq 0x8(%rbx), %rdi
cmpl $0x7, (%rdi)
jne 0x928f
movq 0x8(%rdi), %rax
leaq 0xcfa2(%rip), %r15      # 0x16218
cmpq %r15, %rax
je 0x9347
leaq 0xd002(%rip), %rcx      # 0x16288
cmpq %rcx, %rax
je 0x9369
cmpl $0x7, (%r14)
jne 0x93a1
movq 0x8(%r14), %rax
leaq 0xcf74(%rip), %r15      # 0x16218
cmpq %r15, %rax
je 0x9347
leaq 0xcfd4(%rip), %rcx      # 0x16288
cmpq %rcx, %rax
jne 0x93a1
jmp 0x9382
movq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x921d
movq %r14, 0x8(%rbx)
movq 0x10(%rbx), %r14
movq %r14, %rdi
callq 0x921d
movq %r14, 0x10(%rbx)
movq 0x8(%rbx), %rdi
cmpl $0x7, (%rdi)
jne 0x9307
movq 0x8(%rdi), %rax
leaq 0xcf22(%rip), %rcx      # 0x16218
cmpq %rcx, %rax
je 0x9369
leaq 0xcf86(%rip), %r15      # 0x16288
cmpq %r15, %rax
je 0x9347
cmpl $0x7, (%r14)
jne 0x93a1
movq 0x8(%r14), %rax
leaq 0xcefc(%rip), %rcx      # 0x16218
cmpq %rcx, %rax
je 0x9382
leaq 0xcf60(%rip), %r14      # 0x16288
cmpq %r14, %rax
jne 0x93a1
callq 0x9034
movq 0x10(%rbx), %rdi
callq 0x9034
movl $0x7, (%rbx)
movq %r14, 0x8(%rbx)
jmp 0x935f
callq 0x9034
movq 0x10(%rbx), %rdi
callq 0x9034
movl $0x7, (%rbx)
movq %r15, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
jmp 0x93a1
callq 0x2040
movq 0x10(%rbx), %rdi
movups (%rdi), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rdi), %rax
movq %rax, 0x10(%rbx)
jmp 0x939c
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