private Address skipNOPS(Address addr) {
		// skip over NOPS
		int count = 0;
		while (addr != null && count < 16) {
			Instruction instructionAt = program.getListing().getInstructionAt(addr);
			if (instructionAt == null) {
				return addr;
			}

			// any flow breaks
			if (!instructionAt.getFlowType().isFallthrough()) {
				return addr;
			}

			// instruction has PCODE, might not be a NOP
			PcodeOp[] pcode = instructionAt.getPcode();
			if (pcode != null && pcode.length != 0) {
				// must do an operation, or assign to non-unique
				for (PcodeOp pCode : pcode) {
					int opcode = pCode.getOpcode();
					switch (opcode) {
						case PcodeOp.LOAD:
						case PcodeOp.STORE:
						case PcodeOp.CALLOTHER:
						case PcodeOp.SEGMENTOP:
							return addr;
					}
					Varnode output = pCode.getOutput();
					if (output != null && !output.isUnique()) {
						return addr;
					}
				}
			}

			addr = instructionAt.getFallThrough();
			// this shouldn't happen, to have no fallthru, you should have flow, but could be override
			if (addr == null) {
				return instructionAt.getMinAddress();
			}
			count++;
		}
		return addr;
	}
Get the next defined function after the current address.

Save the returned function along with the address
The nextFunction will be valid for any getNextFunction call for
addresses from lastGetNextFuncAddress to nextFunction,
which avoids an expensive funcMgr.getNextFunction() call

@param addr address to find the next defined function after
@return return the next function if found, or null otherwise
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/FindNoReturnFunctionsAnalyzer.java