private boolean countRegistersFor(DataType dt, List<Register> result) {
		if (DWARFUtil.isZeroByteDataType(dt)) {
			return false;
		}

		if (dt instanceof TypeDef typedefDT) {
			dt = typedefDT.getBaseDataType();
		}
		if (dt instanceof Pointer) {
			return allocateReg(1, INTREG, dt, result);
		}
		if (GoRegisterInfo.isIntType(dt)) {
			int size = dt.getLength();
			int intRegSize = callspecInfo.getIntRegisterSize();
			if (size <= intRegSize * 2) {
				return allocateReg(
					(int) (NumericUtilities.getUnsignedAlignedValue(size, intRegSize) / intRegSize),
					INTREG, dt, result);
			}
		}
		if (dt instanceof AbstractFloatDataType) {
			return allocateReg(1, FLOATREG, dt, result);
		}
		if (dt instanceof Array array) {
			int numElements = array.getNumElements();
			if (numElements == 0) {
				return true;
			}
			if (numElements == 1 && countRegistersFor(array.getDataType(), result)) {
				return true;
			}
			return false;
		}
		if (dt instanceof Structure struct) {
//			DataTypeComponent prevDTC = null;
			for (DataTypeComponent dtc : struct.getDefinedComponents()) {
//				int padding = prevDTC != null ? dtc.getOffset() - prevDTC.getOffset() : 0;
//				if (padding != 0) {
//
//				}
				if (!countRegistersFor(dtc.getDataType(), result)) {
					return false;
				}
			}
			return true;
		}
		return false;
	}
Returns the stack offset that should be used to store the data type on the stack, as well
as marking that stack area as used and unavailable.

@param dt {@link DataType} to allocate stack space for
@return offset in stack where the data item will be located
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/golang/GoParamStorageAllocator.java