@Override
	public int getAlignment(DataType dataType) {
		int dtSize = dataType.getAlignedLength();
		if (dataType instanceof Dynamic || dataType instanceof FactoryDataType || dtSize <= 0) {
			return 1;
		}
		// Typedef is aligned the same as its underlying data type is aligned.
		if (dataType instanceof TypeDef) {
			return getAlignment(((TypeDef) dataType).getBaseDataType());
		}
		// Array alignment is the alignment of its element data type.
		if (dataType instanceof Array) {
			DataType elementDt = ((Array) dataType).getDataType();
			return getAlignment(elementDt);
		}
		// Structure's or Union's alignment is a multiple of the least common multiple of
		// the components. It can also be adjusted by packing and alignment attributes.
		if (dataType instanceof Composite) {
			// IMPORTANT: composites are now responsible for computing their own alignment !!
			return ((Composite) dataType).getAlignment();
		}
		// Bit field alignment must be determined within the context of the containing structure.
		// See AlignedStructurePacker.
		if (dataType instanceof BitFieldDataType) {
			BitFieldDataType bitfieldDt = (BitFieldDataType) dataType;
			return getAlignment(bitfieldDt.getBaseDataType());
		}

		// If pointer size not found in size alignment map use default pointer alignment
		// TODO: this should probably be re-evaluated for its neccessity
		if (!sizeAlignmentMap.containsKey(dtSize) && dataType instanceof Pointer) {
			return getDefaultPointerAlignment();
		}

		// Otherwise get the alignment based on the size.
		return getSizeAlignment(dtSize);
	}
Returns the best fitting integer C-type whose size is less-than-or-equal
to the specified size.  "long long" will be returned for any size larger
than "long long";
@param size integer size
@param signed if false the unsigned modifier will be prepended.
@return the best fitting
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/DataOrganizationImpl.java