private boolean checkContext(boolean input, final int opIndex, VarnodeContext context,
					Instruction instr) {
				if (instr.getMinAddress().equals(curInstrloc)) {
					if (targetInDelaySlot && instr.getDelaySlotDepth() > 0) {
						instr = instr.getNext();
					}
					if (checkInstructionMatch(opIndex, input, context, instr)) {
						return true;
					}
					// if instruction is in delayslot, assume reference is good.
					if (instr.getDelaySlotDepth() > 0) {
						instr = instr.getNext();
						return checkInstructionMatch(opIndex, input, context, instr);
					}
				}
				return false;
			}
Get the register at the location

@param opIndex index into operands for instruction
@param subOpIndex index into operands for an operand location

@return register if there is one at the location
Ghidra/Features/Base/ghidra_scripts/MultiInstructionMemReference.java