private void markToPreventIncorrectProcessorDisassembly(Program program,
			CliMethodDefRow methodRow, Address startAddr, Address endAddr)
			throws CodeUnitInsertionException {

		PrototypeModel cliCallingConvention = program.getLanguage()
				.getDefaultCompilerSpec()
				.getCallingConvention(CLITABLEMETHODDEF_CLRCALL_CONVENTION);

		// If Code here is not of the correct type, create a data array of bytes to stop disassembly
		if ((cliCallingConvention == null && !methodRow.isNative()) ||
			(cliCallingConvention != null && methodRow.isNative())) {
			Listing listing = program.getListing();
			Data data = listing.getDefinedDataAt(startAddr);
			if (data == null) {
				int codeLength = (int) endAddr.subtract(startAddr) + 1;
				ArrayDataType codeDT = new ArrayDataType(BYTE, codeLength, 1);
				data = listing.createData(startAddr, codeDT);

				// comment the type of code that should appear here
				data.setComment(CommentType.PRE,
					(methodRow.isManaged() ? ".NET CLR Managed Code" : "Native Code"));
			}
		}
	}
For .Net code in programs loaded as x86, protect CLI code from disassembly.
For x86 code in programs loaded as CLI, protect x86 code from disassembly.

@param program program either loaded as x86 or CLI
@param methodRow CliMethodTable row
@param startAddr start address of the function
@param endAddr end address of the function
@throws CodeUnitInsertionException couldn't create dagta.
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/cli/tables/CliTableMethodDef.java