Instruction getInstructionBefore(Address address) {
		Address addrBefore = address.previous();
		Instruction instrBefore = null;

		while (addrBefore != null) {
			instrBefore = program.getListing().getInstructionContaining(addrBefore);
			if (instrBefore == null) {
				break;
			}
			if (!instrBefore.isInDelaySlot()) {
				break;
			}
			addrBefore = instrBefore.getMinAddress().previous();
		}
		return instrBefore;
	}
Get the instruction directly before this address, makeing sure it is the
head instruction in a delayslot

@param address to get instruction before
@return instruction if found, null otherwise
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/function/ApplyFunctionDataTypesCmd.java