private void defineFuncVariable(SymbolicPropogator symEval, Function func, Instruction instr, int opIndex, int stackOffset,
			List<Variable> sortedVariables) {

		ReferenceManager refMgr = program.getReferenceManager();
		int refSize = getRefSize(symEval, instr, opIndex);
		try {
			// don't create crazy offsets
			if (stackOffset > MAX_PARAM_OFFSET || stackOffset < MAX_LOCAL_OFFSET) {
				return;
			}

			// check if operand already has a stack reference created
			Reference ref = instr.getPrimaryReference(opIndex);
			if (ref instanceof StackReference) {
				Variable var = refMgr.getReferencedVariable(ref);
				if (var == null) {
					accumulateVariable(func, ((StackReference) ref).getStackOffset(), refSize,
						sortedVariables);
				}
				return;
			}
			else if (ref == null) {
				RefType refType = RefTypeFactory.getDefaultStackRefType(instr, opIndex);
				refMgr.addStackReference(instr.getMinAddress(), opIndex, stackOffset, refType,
					SourceType.ANALYSIS);
				accumulateVariable(func, stackOffset, refSize, sortedVariables);
			}
		}
		catch (InvalidInputException e) {
			Msg.debug(this, "Failed to create variable (instruction at " + instr.getMinAddress() +
				", stack-offset=" + stackOffset + ", size=" + refSize + "): " + e.getMessage());
		}

	}
//	 * Checks the indicated function in the program to determine if it is a jump thunk
//	 * through a function pointer.
//	 * @param func the function to check
//	 * @param monitor status monitor for indicating progress and allowing cancel.
//	 * @returntrue if check if this is a jump thunk through a function pointer
//
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/function/NewFunctionStackAnalysisCmd.java