public static void gatherFirstLevelVars(ArrayList<Varnode> varlist, PcodeSyntaxTree fd,
			Address addr, long h) {
		int opc = getOpCodeFromHash(h);
		int slot = getSlotFromHash(h);
		boolean isnotattached = getIsNotAttached(h);
		Iterator<PcodeOpAST> iter = fd.getPcodeOps(addr);

		while (iter.hasNext()) {
			PcodeOp op = iter.next();
			if (transtable[op.getOpcode()] != opc) {
				continue;
			}
			if (slot < 0) {
				Varnode vn = op.getOutput();
				if (vn != null) {
					if (isnotattached) {		// If original varnode was not attached to (this) op
						op = vn.getLoneDescend();
						if (op != null) {
							if (transtable[op.getOpcode()] == 0) {	// Check for skip op
								vn = op.getOutput();
								if (vn == null) {
									continue;
								}
							}
						}
					}
					varlist.add(vn);
				}
			}
			else if (slot < op.getNumInputs()) {
				Varnode vn = op.getInput(slot);
				if (isnotattached) {
					op = vn.getDef();
					if ((op != null) && (transtable[op.getOpcode()] == 0)) {
						vn = op.getInput(0);
					}
				}
				varlist.add(vn);
			}
		}
		dedupVarnodes(varlist);
	}
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