// File: /workspace/github_c_makefile_star2_O2/Oric4ever[P]lcc65/6502/build/../src/enode.c
// Function: eqnode
Tree eqnode(int op, Tree l, Tree r) {
	if (isint(l->type) && isptr(r->type))
		return eqnode(op, r, l);
	if (isptr(l->type) && isint(r->type)) {
		l = cast(l, unsignedtype);
		r = cast(r, unsignedtype);
		if (r->op != CNST+U || r->u.v.u)
			error("operands of %s have incompatible types\n",
				op == EQ ? "==" : "!=");
		return simplify(op + U, inttype, l, r);
	}
	if ((isptr(l->type) && !isfunc(l->type->type) && (r->type == voidptype || unqual(r->type->type) == voidtype))
	||  (isptr(r->type) && !isfunc(r->type->type) && (l->type == voidptype || unqual(l->type->type) == voidtype))) {
		l = cast(l, unsignedtype);
		r = cast(r, unsignedtype);
		return simplify(op + U, inttype, l, r);
	}
	return cmpnode(op, l, r);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x8(%rsi), %rdi
movl (%rdi), %r8d
movq %rdx, %r14
movq %rsi, %rdx
movq %rdi, %rax
movl %r8d, %ecx
cmpl $0xf, %r8d
jb 0x80fb
movq 0x10(%rax), %rsi
movl (%rsi), %esi
cmpl $0x2, %esi
ja 0x8106
jmp 0x81db
movl %ecx, %esi
cmpl $0x3, %ecx
jb 0x8227
cmpl $0x6, %esi
ja 0x812b
movq 0x8(%r14), %rdi
movl (%rdi), %r8d
movl %r8d, %r9d
cmpl $0xf, %r8d
jb 0x8122
movq 0x10(%rdi), %rsi
movl (%rsi), %r9d
movq %r14, %rsi
cmpl $0x7, %r9d
je 0x80d9
movq %rax, %rsi
cmpl $0xf, %ecx
jb 0x8137
movq 0x10(%rax), %rsi
cmpl $0x7, (%rsi)
jne 0x81d3
movq 0x8(%r14), %rdi
movl (%rdi), %esi
cmpl $0xf, %esi
jb 0x8158
movq 0x10(%rdi), %rsi
movl (%rsi), %esi
cmpl $0x2, %esi
ja 0x815d
jmp 0x81d3
cmpl $0x3, %esi
jb 0x81d3
cmpl $0x6, %esi
ja 0x81d3
leaq 0x29e6f(%rip), %r12     # 0x31fd8
movq (%r12), %rsi
movq %rdx, %rdi
callq 0x9912
movq %rax, %r15
movq (%r12), %rsi
movq %r14, %rdi
callq 0x9912
movq %rax, %r14
cmpl $0x16, (%rax)
jne 0x8193
cmpl $0x0, 0x28(%r14)
je 0x81b9
cmpl $0x1e0, %ebx            # imm = 0x1E0
leaq 0x14abb(%rip), %rax     # 0x1cc5b
leaq 0x14ab7(%rip), %rsi     # 0x1cc5e
cmoveq %rax, %rsi
leaq 0x14a81(%rip), %rdi     # 0x1cc33
xorl %eax, %eax
callq 0x8dd4
addl $0x6, %ebx
leaq 0x29dd5(%rip), %rax     # 0x31f98
movq (%rax), %rsi
movl %ebx, %edi
movq %r15, %rdx
movq %r14, %rcx
jmp 0x82c7
movq %rax, %rsi
cmpl $0xf, %ecx
jb 0x81df
movq 0x10(%rax), %rsi
cmpl $0x7, (%rsi)
jne 0x8227
movq 0x10(%rax), %rsi
movl (%rsi), %ecx
cmpl $0xf, %ecx
jb 0x81f5
movq 0x10(%rsi), %rcx
movl (%rcx), %ecx
cmpl $0xb, %ecx
je 0x8227
movq 0x8(%r14), %rcx
leaq 0x29deb(%rip), %rsi     # 0x31ff0
cmpq (%rsi), %rcx
je 0x8290
movq 0x10(%rcx), %rcx
cmpl $0xf, (%rcx)
jb 0x821b
movq 0x10(%rcx), %rcx
leaq 0x29dbe(%rip), %rsi     # 0x31fe0
cmpq (%rsi), %rcx
je 0x8290
movq 0x8(%r14), %rcx
movl (%rcx), %esi
cmpl $0xf, %esi
jb 0x8238
movq 0x10(%rcx), %rsi
movl (%rsi), %esi
cmpl $0x7, %esi
jne 0x8278
movq 0x10(%rcx), %rsi
movl (%rsi), %ecx
cmpl $0xf, %ecx
jb 0x824e
movq 0x10(%rsi), %rcx
movl (%rcx), %ecx
cmpl $0xb, %ecx
je 0x8278
leaq 0x29d96(%rip), %rcx     # 0x31ff0
cmpq (%rcx), %rax
je 0x8290
movq 0x10(%rax), %rax
cmpl $0xf, (%rax)
jb 0x826c
movq 0x10(%rax), %rax
leaq 0x29d6d(%rip), %rcx     # 0x31fe0
cmpq (%rcx), %rax
je 0x8290
movl %ebx, %edi
movq %rdx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8012
leaq 0x29d41(%rip), %r12     # 0x31fd8
movq (%r12), %rsi
movq %rdx, %rdi
callq 0x9912
movq %rax, %r15
movq (%r12), %rsi
movq %r14, %rdi
callq 0x9912
addl $0x6, %ebx
leaq 0x29cdc(%rip), %rcx     # 0x31f98
movq (%rcx), %rsi
movl %ebx, %edi
movq %r15, %rdx
movq %rax, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1131b