// File: /workspace/github_c_makefile_star2_O3/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 0x8a67
movq 0x10(%rax), %rsi
movl (%rsi), %esi
cmpl $0x2, %esi
ja 0x8a72
jmp 0x8b47
movl %ecx, %esi
cmpl $0x3, %ecx
jb 0x8b93
cmpl $0x6, %esi
ja 0x8a97
movq 0x8(%r14), %rdi
movl (%rdi), %r8d
movl %r8d, %r9d
cmpl $0xf, %r8d
jb 0x8a8e
movq 0x10(%rdi), %rsi
movl (%rsi), %r9d
movq %r14, %rsi
cmpl $0x7, %r9d
je 0x8a45
movq %rax, %rsi
cmpl $0xf, %ecx
jb 0x8aa3
movq 0x10(%rax), %rsi
cmpl $0x7, (%rsi)
jne 0x8b3f
movq 0x8(%r14), %rdi
movl (%rdi), %esi
cmpl $0xf, %esi
jb 0x8ac4
movq 0x10(%rdi), %rsi
movl (%rsi), %esi
cmpl $0x2, %esi
ja 0x8ac9
jmp 0x8b3f
cmpl $0x3, %esi
jb 0x8b3f
cmpl $0x6, %esi
ja 0x8b3f
leaq 0x2a503(%rip), %r12     # 0x32fd8
movq (%r12), %rsi
movq %rdx, %rdi
callq 0xa2f7
movq %rax, %r15
movq (%r12), %rsi
movq %r14, %rdi
callq 0xa2f7
movq %rax, %r14
cmpl $0x16, (%rax)
jne 0x8aff
cmpl $0x0, 0x28(%r14)
je 0x8b25
cmpl $0x1e0, %ebx            # imm = 0x1E0
leaq 0x1614f(%rip), %rax     # 0x1ec5b
leaq 0x1614b(%rip), %rsi     # 0x1ec5e
cmoveq %rax, %rsi
leaq 0x16115(%rip), %rdi     # 0x1ec33
xorl %eax, %eax
callq 0x974c
addl $0x6, %ebx
leaq 0x2a469(%rip), %rax     # 0x32f98
movq (%rax), %rsi
movl %ebx, %edi
movq %r15, %rdx
movq %r14, %rcx
jmp 0x8c33
movq %rax, %rsi
cmpl $0xf, %ecx
jb 0x8b4b
movq 0x10(%rax), %rsi
cmpl $0x7, (%rsi)
jne 0x8b93
movq 0x10(%rax), %rsi
movl (%rsi), %ecx
cmpl $0xf, %ecx
jb 0x8b61
movq 0x10(%rsi), %rcx
movl (%rcx), %ecx
cmpl $0xb, %ecx
je 0x8b93
movq 0x8(%r14), %rcx
leaq 0x2a47f(%rip), %rsi     # 0x32ff0
cmpq (%rsi), %rcx
je 0x8bfc
movq 0x10(%rcx), %rcx
cmpl $0xf, (%rcx)
jb 0x8b87
movq 0x10(%rcx), %rcx
leaq 0x2a452(%rip), %rsi     # 0x32fe0
cmpq (%rsi), %rcx
je 0x8bfc
movq 0x8(%r14), %rcx
movl (%rcx), %esi
cmpl $0xf, %esi
jb 0x8ba4
movq 0x10(%rcx), %rsi
movl (%rsi), %esi
cmpl $0x7, %esi
jne 0x8be4
movq 0x10(%rcx), %rsi
movl (%rsi), %ecx
cmpl $0xf, %ecx
jb 0x8bba
movq 0x10(%rsi), %rcx
movl (%rcx), %ecx
cmpl $0xb, %ecx
je 0x8be4
leaq 0x2a42a(%rip), %rcx     # 0x32ff0
cmpq (%rcx), %rax
je 0x8bfc
movq 0x10(%rax), %rax
cmpl $0xf, (%rax)
jb 0x8bd8
movq 0x10(%rax), %rax
leaq 0x2a401(%rip), %rcx     # 0x32fe0
cmpq (%rcx), %rax
je 0x8bfc
movl %ebx, %edi
movq %rdx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x897e
leaq 0x2a3d5(%rip), %r12     # 0x32fd8
movq (%r12), %rsi
movq %rdx, %rdi
callq 0xa2f7
movq %rax, %r15
movq (%r12), %rsi
movq %r14, %rdi
callq 0xa2f7
addl $0x6, %ebx
leaq 0x2a370(%rip), %rcx     # 0x32f98
movq (%rcx), %rsi
movl %ebx, %edi
movq %r15, %rdx
movq %rax, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x12443