private Instruction checkPair(Scalar offset1, Scalar offset2, Register base1, Register base2,
			Register destReg1, Register destReg2, Instruction start_inst, Instruction curr_inst) {
		int start_index1 = 0;
		int start_index2 = 0;
		String str = start_inst.getMnemonicString();
		String str2 = curr_inst.getMnemonicString();

		// Check for delay slot
		if (str.charAt(0) == '_') {
			start_index1 = 1;
		}
		if (str2.charAt(0) == '_') {
			start_index2 = 1;
		}

		// Check mnemonics are matching
		if (!str.substring(start_index1, start_index1 + 2).equals(
			str2.substring(start_index2, start_index2 + 2))) {
			return null;
		}

		// Check offset
		long diff = Math.abs(offset2.getSignedValue() - offset1.getSignedValue());
		if ((str.endsWith("wl") || str.endsWith("wr")) && diff != 3) {
			return null;
		}
		else if ((str.endsWith("dl") || str.endsWith("dr")) && diff != 7) {
			return null;
		}

		// Check base and destination registers
		if (base1.equals(base2) && (destReg1.equals(destReg2) | destReg2.equals(alternateReg))) {
			// Match found
			return curr_inst;
		}
		return null;
	}
Checks if two instructions are a pair.
A pair is found if
 1) mnemonics are correct
	2) offset difference is correct
	3) destination and base registers match

@param offset1
@param offset2
@param base1
@param base2
@param destReg1
@param destReg2
@param str			start inst mnemonic
@param curr_inst
@return Instruction that is the pair of this one
Ghidra/Processors/MIPS/src/main/java/ghidra/app/plugin/core/analysis/MipsPreAnalyzer.java