private int getVfunctionIndex(Structure vftableStructure, Pointer pointerToVfunction)
			throws CancelledException {

		int vfunctionIndex = -1;

		int numComponents = vftableStructure.getNumComponents();
		for (int i = 0; i < numComponents; i++) {
			monitor.checkCancelled();

			DataTypeComponent component = vftableStructure.getComponent(i);
			if (component.getDataType().equals(pointerToVfunction)) {
				return i;
			}
		}
		return vfunctionIndex;
	}
Method to get the index of the vfunction pointer in the given vftable structure
@param vftableStructure the given vftable structure
@param pointerToVfunction the given vfunction pointer
@return the index of the given vfunction pointer or -1 if not in structure
@throws CancelledException if cancelled
Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RecoveredClassHelper.java