void grabFromFunction(Function f, int overrideExtrapop, boolean doOverride) {
		modelname = f.getCallingConventionName();
		PrototypeModel protoModel = f.getCallingConvention();
		if (protoModel == null) {
			protoModel = f.getProgram().getCompilerSpec().getDefaultCallingConvention();
		}
		hasThis = protoModel.hasThisPointer();
		modellock =
			((modelname != null) && !Function.UNKNOWN_CALLING_CONVENTION_STRING.equals(modelname));
		injectname = f.getCallFixup();
		voidinputlock = false;
		Parameter returnparam = f.getReturn();
		returntype = returnparam.getDataType();
		returnstorage = returnparam.getVariableStorage();

		SourceType sigSource = f.getSignatureSource();
		if (sigSource != SourceType.DEFAULT) {
			outputlock = DataType.DEFAULT != returntype;
		}
		else {
			outputlock = false;
		}

		if ((returnstorage == null) || (!returnstorage.isValid())) {	// Unassigned or otherwise invalid storage
			outputlock = false;
			returnstorage = VariableStorage.VOID_STORAGE;		// Treat as unlocked void
			returntype = VoidDataType.dataType;
		}
		voidinputlock =
			(f.getSignatureSource() != SourceType.DEFAULT) && f.getParameterCount() == 0;
		dotdotdot = f.hasVarArgs();
		isinline = f.isInline();
		noreturn = f.hasNoReturn() | isNoReturnInjection(f, injectname);
		custom = f.hasCustomVariableStorage();

		// This assumes that the Purge is the value popped from the excluding normal
		// calling conventions.
		// In the spec file extrapop is the overall stack change including the extra purged bytes
		// stackshift is the normal stack change because of a call.
		//
		int purge = f.getStackPurgeSize();
		if (doOverride) {
			extrapop = overrideExtrapop;
		}
		else {
			if (purge == Function.INVALID_STACK_DEPTH_CHANGE ||
				purge == Function.UNKNOWN_STACK_DEPTH_CHANGE) {
				extrapop = protoModel.getExtrapop();
			}
			else {
				extrapop = purge + protoModel.getStackshift();
			}
		}
	}
Populate Function Prototype from information attached to a function in the Program DB.

@param f is the function to grab prototype from
@param overrideExtrapop is the override value to use for extrapop
@param doOverride is true if the override value should be used
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/FunctionPrototype.java