private int getFunctionPurge(Program prog, Function function) {

		if (function == null) {
			return getDefaultStackDepthChange(prog, null, Function.UNKNOWN_STACK_DEPTH_CHANGE);
		}

		PrototypeModel conv = function.getCallingConvention();

		if (function.isStackPurgeSizeValid()) {
			int depth = function.getStackPurgeSize();
			return getDefaultStackDepthChange(prog, conv, depth);
		}

		return getDefaultStackDepthChange(prog, conv, Function.UNKNOWN_STACK_DEPTH_CHANGE);
	}
Get/Compute the Purge size from the stack for the function starting at
entryPoint.

@param prog -
           program containing the function to analyze
@param function -

@return size in bytes that is removed from the stack after the function
        is called.
Ghidra/Features/Base/src/main/java/ghidra/program/util/SymbolicPropogator.java