@Override
	public PcodeOp[] getPcode(Program program, InjectContext con) {
		if (!analysisStateRecoverable) {
			return new PcodeOp[0];
		}
		DexAnalysisState analysisState;
		try {
			analysisState = DexAnalysisState.getState(program);
		}
		catch (IOException e) {
			Msg.error(this, e.getMessage(), e);
			analysisStateRecoverable = false;
			return new PcodeOp[0];
		}
		DexHeader header = analysisState.getHeader();
		PcodeOp[] resOps;
		Function func = program.getFunctionManager().getFunctionContaining(con.baseAddr);
		EncodedMethod encodedMethod = null;
		if (func != null) {
			encodedMethod = analysisState.getEncodedMethod(func.getEntryPoint());
		}
		if (encodedMethod == null) {
			return new PcodeOp[0];
		}
		int paramCount = 0;
		if (!encodedMethod.isStatic()) {
			paramCount += 1;			// A this pointer at least
		}
		CodeItem codeItem = encodedMethod.getCodeItem();
		int registerIndex = codeItem.getRegistersSize() - codeItem.getIncomingSize();
		MethodIDItem methodIDItem = header.getMethods().get(encodedMethod.getMethodIndex());
		int prototypeIndex = methodIDItem.getProtoIndex() & 0xffff;
		PrototypesIDItem prototype = header.getPrototypes().get(prototypeIndex);
		TypeList parameters = prototype.getParameters();
		if (parameters != null) {
			paramCount += parameters.getItems().size();
		}
		AddressSpace registerSpace = program.getAddressFactory().getAddressSpace("register");
		resOps = new PcodeOp[paramCount];
		long fromOffset = INPUT_REGISTER_START;		// Base of designated input registers
		long toOffset = REGISTER_START + 4 * registerIndex;	// Base of registers in method's frame
		int i = 0;
		if (!encodedMethod.isStatic()) {	// Copy the this pointer to the right place
			Address fromAddr = registerSpace.getAddress(fromOffset);
			Address toAddr = registerSpace.getAddress(toOffset);
			fromOffset += 4;
			toOffset += 4;
			PcodeOp op = new PcodeOp(con.baseAddr, i, PcodeOp.COPY);
			op.setInput(new Varnode(fromAddr, 4), 0);
			op.setOutput(new Varnode(toAddr, 4));
			resOps[i] = op;
			i += 1;
		}
		if (parameters != null) {
			for (TypeItem parameterTypeItem : parameters.getItems()) {
				String parameterTypeString =
					DexUtil.convertTypeIndexToString(header, parameterTypeItem.getType());
				int size;
				char firstChar = parameterTypeString.charAt(0);
				Address fromAddr = registerSpace.getAddress(fromOffset);
				Address toAddr = registerSpace.getAddress(toOffset);
				size = (firstChar == 'D' || firstChar == 'J') ? 8 : 4; // Double or Long are size 8, otherwise 4
				fromOffset += size;
				toOffset += size;
				PcodeOp op = new PcodeOp(con.baseAddr, i, PcodeOp.COPY);
				op.setInput(new Varnode(fromAddr, size), 0);
				op.setOutput(new Varnode(toAddr, size));
				resOps[i++] = op;
			}
		}
		return resOps;
	}
The "uponentry" injection for a DEX method.  We simulate DEX's register stack by copying values from
specially designated "input" registers to the v# and vw# registers at the bottom of method's register frame.
Ghidra/Processors/Dalvik/src/main/java/ghidra/dalvik/dex/inject/InjectPayloadDexParameters.java