private FunctionDefinition editFunctionDefinition(DataTypeComponent structureComponent,
			FunctionDefinition newFunctionDefinition) {

		DataType componentDataType = structureComponent.getDataType();
		if (!(componentDataType instanceof Pointer)) {
			throw new IllegalArgumentException("Structure component must be a pointer " +
				structureComponent.getDataType().getName());
		}

		Pointer pointer = (Pointer) componentDataType;
		DataType pointedToDataType = pointer.getDataType();

		if (!(pointedToDataType instanceof FunctionDefinition)) {
			throw new IllegalArgumentException(
				"Structure component must be a pointer to a FunctionDefinition " +
					structureComponent.getDataType().getName());
		}

		FunctionDefinition componentFunctionDefinition = (FunctionDefinition) pointedToDataType;

		if (!componentFunctionDefinition.isEquivalent(newFunctionDefinition)) {
			// if it is a purecall then don't update the function definition as it will always point
			// to the purecall function and we don't want to rename that function to the new name
			// since anyone calling purecall will call it
			if (!componentFunctionDefinition.getName().contains("purecall")) {
				// otherwise update data type with the new signature
				FunctionDefinition changedFunctionDefinition =
					updateFunctionDefinition(componentFunctionDefinition, newFunctionDefinition);

				return changedFunctionDefinition;
			}
		}

		return null;
	}
Method to edit the function definition pointed to by the given structure component with any
differences in the given function definition
@param structureComponent the given structure component
@param newFunctionDefinition the given function definition
@return the changed function definition or null if no changes are made
Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RecoveredClassHelper.java