private void pieceTogetherHash(Varnode root, int method) {
		if (opedge.size() == 0) {
			hash = 0;
			addrresult = null;
			return;
		}

		int reg = 0x3ba0fe06;		// Calculate the 32-bit hash

		// Hash in information about the root
		reg = SimpleCRC32.hashOneByte(reg, root.getSize());
		if (root.isConstant()) {
			long val = root.getOffset();
			for (int i = 0; i < root.getSize(); ++i) {
				reg = SimpleCRC32.hashOneByte(reg, (int) val);
				val >>>= 8;
			}
		}

		for (ToOpEdge element : opedge) {
			reg = element.hash(reg);
		}

		// Build the final 64-bit hash
		PcodeOp op = null;
		int slot = 0;
		int ct;
		boolean attachedop = true;
		for (ct = 0; ct < opedge.size(); ++ct) {	// Find op that is directly attached to -root- i.e. not a skip op
			op = opedge.get(ct).getOp();
			slot = opedge.get(ct).getSlot();
			if ((slot < 0) && (op.getOutput() == root)) {
				break;
			}
			if ((slot >= 0) && (op.getInput(slot) == root)) {
				break;
			}
		}
		if (ct == opedge.size()) {			// If everything attached to the root was a skip op
			op = opedge.get(0).getOp();		// Return op that is not attached directly
			slot = opedge.get(0).getSlot();
			attachedop = false;
		}

		// 15 bits unused
		hash = attachedop ? 0 : 1;
		hash <<= 4;
		hash |= method;			// 4-bits
		hash <<= 7;
		hash |= transtable[op.getOpcode()];	// 7-bits
		hash <<= 5;
		hash |= slot & 0x1f;	// 5-bits

		hash <<= 32;
		hash |= reg & 0xffffffffL;				// 32-bits for the neighborhood hash
		addrresult = op.getSeqnum().getTarget();
	}
Encode a particular PcodeOp and slot
@param op is the PcodeOp to preserve
@param slot is the slot to preserve (-1 for output, >=0 for input)
@param method is the method to use for encoding (4, 5, or 6)
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/DynamicHash.java