// File: /workspace/github_c_makefile_star2_O1/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 %rdx, %r14
movq %rsi, %rdx
movq 0x8(%rsi), %rax
movl (%rax), %ecx
movq %rax, %rsi
cmpl $0xf, %ecx
jb 0x8a0b
movq 0x10(%rax), %rsi
cmpl $0x3, (%rsi)
jb 0x8a36
movq %rax, %rsi
cmpl $0xf, %ecx
jb 0x8a1c
movq 0x10(%rax), %rsi
cmpl $0x6, (%rsi)
ja 0x8a36
movq 0x8(%r14), %rsi
cmpl $0xf, (%rsi)
jb 0x8a2e
movq 0x10(%rsi), %rsi
cmpl $0x7, (%rsi)
movq %r14, %rsi
je 0x89f3
movq %rax, %rsi
cmpl $0xf, %ecx
jb 0x8a42
movq 0x10(%rax), %rsi
cmpl $0x7, (%rsi)
jne 0x8ae2
movq 0x8(%r14), %rsi
movl (%rsi), %edi
movq %rsi, %r8
cmpl $0xf, %edi
jb 0x8a5d
movq 0x10(%rsi), %r8
cmpl $0x3, (%r8)
jb 0x8ae2
cmpl $0xf, %edi
jb 0x8a6c
movq 0x10(%rsi), %rsi
cmpl $0x6, (%rsi)
ja 0x8ae2
leaq 0x29560(%rip), %r12     # 0x31fd8
movq (%r12), %rsi
movq %rdx, %rdi
callq 0xa341
movq %rax, %r15
movq (%r12), %rsi
movq %r14, %rdi
callq 0xa341
movq %rax, %r14
cmpl $0x16, (%rax)
jne 0x8aa2
cmpl $0x0, 0x28(%r14)
je 0x8ac8
cmpl $0x1e0, %ebx            # imm = 0x1E0
leaq 0x16193(%rip), %rax     # 0x1ec42
leaq 0x1618f(%rip), %rsi     # 0x1ec45
cmoveq %rax, %rsi
leaq 0x16159(%rip), %rdi     # 0x1ec1a
xorl %eax, %eax
callq 0x9720
addl $0x6, %ebx
leaq 0x294c6(%rip), %rax     # 0x31f98
movq (%rax), %rsi
movl %ebx, %edi
movq %r15, %rdx
movq %r14, %rcx
jmp 0x8bc9
movq %rax, %rsi
cmpl $0xf, %ecx
jb 0x8aee
movq 0x10(%rax), %rsi
cmpl $0x7, (%rsi)
jne 0x8b2e
movq 0x10(%rax), %rcx
cmpl $0xf, (%rcx)
jb 0x8b00
movq 0x10(%rcx), %rcx
cmpl $0xb, (%rcx)
je 0x8b2e
movq 0x8(%r14), %rcx
leaq 0x294e0(%rip), %rsi     # 0x31ff0
cmpq (%rsi), %rcx
je 0x8b92
movq 0x10(%rcx), %rcx
cmpl $0xf, (%rcx)
jb 0x8b22
movq 0x10(%rcx), %rcx
leaq 0x294b7(%rip), %rsi     # 0x31fe0
cmpq (%rsi), %rcx
je 0x8b92
movq 0x8(%r14), %rcx
cmpl $0xf, (%rcx)
movq %rcx, %rsi
jb 0x8b3e
movq 0x10(%rcx), %rsi
cmpl $0x7, (%rsi)
jne 0x8b7a
movq 0x10(%rcx), %rcx
cmpl $0xf, (%rcx)
jb 0x8b50
movq 0x10(%rcx), %rcx
cmpl $0xb, (%rcx)
je 0x8b7a
leaq 0x29494(%rip), %rcx     # 0x31ff0
cmpq (%rcx), %rax
je 0x8b92
movq 0x10(%rax), %rax
cmpl $0xf, (%rax)
jb 0x8b6e
movq 0x10(%rax), %rax
leaq 0x2946b(%rip), %rcx     # 0x31fe0
cmpq (%rcx), %rax
je 0x8b92
movl %ebx, %edi
movq %rdx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8931
leaq 0x2943f(%rip), %r12     # 0x31fd8
movq (%r12), %rsi
movq %rdx, %rdi
callq 0xa341
movq %rax, %r15
movq (%r12), %rsi
movq %r14, %rdi
callq 0xa341
addl $0x6, %ebx
leaq 0x293da(%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 0x12653