public static int compare(Program program1, Address addr1, Program program2, Address addr2) {
		Address translatedAddr = getCompatibleAddress(program1, addr1, program2);
		if (translatedAddr != null) {
			if (addr2 != null) {
				return translatedAddr.compareTo(addr2);
			}
			return 1;
		}
		if (addr2 == null) {
			return 0;
		}
		return -1;
	}
Compare any two addresses from two different programs.
@param program1
@param addr1
@param program2
@param addr2
@return
Ghidra/Features/Base/src/main/java/ghidra/program/util/DiffUtility.java