// File: /workspace/github_c_makefile_star2_O0/saltyJeff[P]uClibcpp/extra/config/./expr.c
// Function: expr_trans_compare
struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym)
{
	struct expr *e1, *e2;

	if (!e) {
		e = expr_alloc_symbol(sym);
		if (type == E_UNEQUAL)
			e = expr_alloc_one(E_NOT, e);
		return e;
	}
	switch (e->type) {
	case E_AND:
		e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym);
		e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym);
		if (sym == &symbol_yes)
			e = expr_alloc_two(E_AND, e1, e2);
		if (sym == &symbol_no)
			e = expr_alloc_two(E_OR, e1, e2);
		if (type == E_UNEQUAL)
			e = expr_alloc_one(E_NOT, e);
		return e;
	case E_OR:
		e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym);
		e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym);
		if (sym == &symbol_yes)
			e = expr_alloc_two(E_OR, e1, e2);
		if (sym == &symbol_no)
			e = expr_alloc_two(E_AND, e1, e2);
		if (type == E_UNEQUAL)
			e = expr_alloc_one(E_NOT, e);
		return e;
	case E_NOT:
		return expr_trans_compare(e->left.expr, type == E_EQUAL ? E_UNEQUAL : E_EQUAL, sym);
	case E_UNEQUAL:
	case E_EQUAL:
		if (type == E_EQUAL) {
			if (sym == &symbol_yes)
				return expr_copy(e);
			if (sym == &symbol_mod)
				return expr_alloc_symbol(&symbol_no);
			if (sym == &symbol_no)
				return expr_alloc_one(E_NOT, expr_copy(e));
		} else {
			if (sym == &symbol_yes)
				return expr_alloc_one(E_NOT, expr_copy(e));
			if (sym == &symbol_mod)
				return expr_alloc_symbol(&symbol_yes);
			if (sym == &symbol_no)
				return expr_copy(e);
		}
		break;
	case E_SYMBOL:
		return expr_alloc_comp(type, e->left.sym, sym);
	case E_CHOICE:
	case E_RANGE:
	case E_NONE:
		/* panic */;
	}
	return NULL;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq %rdx, 0x18(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0xdf83
movq 0x18(%rsp), %rdi
callq 0x6840
movq %rax, 0x28(%rsp)
cmpl $0x5, 0x24(%rsp)
jne 0xdf74
movq 0x28(%rsp), %rsi
movl $0x3, %edi
callq 0x6890
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0xe258
movq 0x28(%rsp), %rax
movl (%rax), %eax
movq %rax, (%rsp)
subq $0x8, %rax
ja 0xe24f
movq (%rsp), %rax
leaq 0x2739(%rip), %rcx      # 0x106dc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x18(%rsp), %rdx
movl $0x4, %esi
callq 0xdf30
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x18(%rsp), %rdx
movl $0x4, %esi
callq 0xdf30
movq %rax, 0x8(%rsp)
leaq 0xb29b(%rip), %rax      # 0x19288
cmpq %rax, 0x18(%rsp)
jne 0xe00d
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
movl $0x2, %edi
callq 0x68e0
movq %rax, 0x28(%rsp)
leaq 0xb204(%rip), %rax      # 0x19218
cmpq %rax, 0x18(%rsp)
jne 0xe034
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
movl $0x1, %edi
callq 0x68e0
movq %rax, 0x28(%rsp)
cmpl $0x5, 0x24(%rsp)
jne 0xe04f
movq 0x28(%rsp), %rsi
movl $0x3, %edi
callq 0x6890
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0xe258
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x18(%rsp), %rdx
movl $0x4, %esi
callq 0xdf30
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x18(%rsp), %rdx
movl $0x4, %esi
callq 0xdf30
movq %rax, 0x8(%rsp)
leaq 0xb1e9(%rip), %rax      # 0x19288
cmpq %rax, 0x18(%rsp)
jne 0xe0bf
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
movl $0x1, %edi
callq 0x68e0
movq %rax, 0x28(%rsp)
leaq 0xb152(%rip), %rax      # 0x19218
cmpq %rax, 0x18(%rsp)
jne 0xe0e6
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
movl $0x2, %edi
callq 0x68e0
movq %rax, 0x28(%rsp)
cmpl $0x5, 0x24(%rsp)
jne 0xe101
movq 0x28(%rsp), %rsi
movl $0x3, %edi
callq 0x6890
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0xe258
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
movl 0x24(%rsp), %ecx
movl $0x4, %esi
movl $0x5, %eax
cmpl $0x4, %ecx
cmovel %eax, %esi
movq 0x18(%rsp), %rdx
callq 0xdf30
movq %rax, 0x30(%rsp)
jmp 0xe258
cmpl $0x4, 0x24(%rsp)
jne 0xe1bf
leaq 0xb139(%rip), %rax      # 0x19288
cmpq %rax, 0x18(%rsp)
jne 0xe16a
movq 0x28(%rsp), %rdi
callq 0xba40
movq %rax, 0x30(%rsp)
jmp 0xe258
leaq 0xb187(%rip), %rax      # 0x192f8
cmpq %rax, 0x18(%rsp)
jne 0xe18e
leaq 0xb099(%rip), %rdi      # 0x19218
callq 0x6840
movq %rax, 0x30(%rsp)
jmp 0xe258
leaq 0xb083(%rip), %rax      # 0x19218
cmpq %rax, 0x18(%rsp)
jne 0xe1bd
movq 0x28(%rsp), %rdi
callq 0xba40
movq %rax, %rsi
movl $0x3, %edi
callq 0x6890
movq %rax, 0x30(%rsp)
jmp 0xe258
jmp 0xe22d
leaq 0xb0c2(%rip), %rax      # 0x19288
cmpq %rax, 0x18(%rsp)
jne 0xe1eb
movq 0x28(%rsp), %rdi
callq 0xba40
movq %rax, %rsi
movl $0x3, %edi
callq 0x6890
movq %rax, 0x30(%rsp)
jmp 0xe258
leaq 0xb106(%rip), %rax      # 0x192f8
cmpq %rax, 0x18(%rsp)
jne 0xe20c
leaq 0xb088(%rip), %rdi      # 0x19288
callq 0x6840
movq %rax, 0x30(%rsp)
jmp 0xe258
leaq 0xb005(%rip), %rax      # 0x19218
cmpq %rax, 0x18(%rsp)
jne 0xe22b
movq 0x28(%rsp), %rdi
callq 0xba40
movq %rax, 0x30(%rsp)
jmp 0xe258
jmp 0xe22d
jmp 0xe24f
movl 0x24(%rsp), %edi
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x18(%rsp), %rdx
callq 0x63b0
movq %rax, 0x30(%rsp)
jmp 0xe258
jmp 0xe24f
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)