/* If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT(). */
UINTN EFIAPI InternalBaseLibBitFieldAndUint(IN UINTN Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINTN AndData)
/* If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT(). */
UINTN EFIAPI InternalBaseLibBitFieldAndUint(IN UINTN Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINTN AndData)
{
  ASSERT ((AndData >> (EndBit - StartBit)) == ((AndData >> (EndBit - StartBit)) & 1));
  return Operand & ~((~AndData << StartBit) & ~((UINTN)-2 << EndBit));
}