public static int getNormalizedBitfieldOffset(int byteOffset, int storageSize,
				int effectiveBitSize, int bitOffset, boolean bigEndian) {
			int offset = (8 * byteOffset);
			if (effectiveBitSize == 0) {
				// force zero-length bitfield placement
				effectiveBitSize = 1;
				if (bigEndian) {
					bitOffset |= 7;
				}
				else {
					bitOffset &= 0xfffffff8;
				}
			}
			if (bigEndian) {
				offset += (8 * storageSize) - effectiveBitSize - bitOffset;
			}
			else {
				offset += bitOffset;
			}
			return offset;
		}
Compute the normalized bit offset of a bitfield relative to the start of a structure.

NOTE: This implementation currently relies only on endianness to dictate bit allocation
ordering. If future support is added for alternate bitfield packing, this implementation
will require modification.

@param byteOffset byte offset within structure of storage unit
@param storageSize storage unit size (i.e., component length)
@param effectiveBitSize size of bitfield in bits
@param bitOffset left shift amount for bitfield based upon a big-endian view of the
           storage unit
@param bigEndian true if big-endian packing applies
@return normalized bit-offset
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Structure.java