         return .valid(UInt32(codeUnit), length: 1)
       }
       // Non-ASCII, proceed to buffering mode.
-      _buffer = UInt32(extendingOrTruncating: codeUnit)
+      _bufferStorage = UInt32(extendingOrTruncating: codeUnit)
       _bitsInBuffer = 8
-    } else if _buffer & 0x80 == 0 {
+    } else if _bufferStorage & 0x80 == 0 {
       // ASCII in buffer.  We don't refill the buffer so we can return
       // to bufferless mode once we've exhausted it.
-      let codeUnit = _buffer & 0xff
-      _buffer &>>= 8
+      let codeUnit = _bufferStorage & 0xff
+      _bufferStorage &>>= 8
       _bitsInBuffer = _bitsInBuffer &- 8
       return .valid(codeUnit, length: 1)
     }

    _sanityCheck(_bitsInBuffer < 32)
    repeat {
      if let codeUnit = input.next() {
        _buffer |= UInt32(codeUnit) &<< _bitsInBuffer
        _bitsInBuffer = _bitsInBuffer &+ 8
      } else {
        if _bitsInBuffer == 0 { return .emptyInput }

  /// buffer.
  @inline(never)
  func _invalidLength() -> UInt8 {
    if _bufferStorage & 0b0__1111_0000__1100_0000
                     == 0b0__1110_0000__1000_0000 {
      // 2-byte prefix of 3-byte sequence. The top 5 bits of the decoded result
      // must be nonzero and not a surrogate
      let top5Bits = _bufferStorage        & 0b0__1111__0010_0000
      if top5Bits != 0 && top5Bits != 0b0__1101__0010_0000 { return 2 }
    }
    else if _bufferStorage & 0b1111_1000__1100_0000
                   == 0b1111_0000__1000_0000
    {
      // 2-byte prefix of 4-byte sequence
      // Make sure the top 5 bits of the decoded result would be in range
      let top5bits =        _bufferStorage & 0b0__0111__0011_0000
      if top5bits != 0 && top5bits <= 0b0__0100__0000_0000 { return 2 }
    }
    else if _bufferStorage & 0b0__1111_1000__1100_0000__1100_0000
                   == 0b0__1111_0000__1000_0000__1000_0000 {
      // 3-byte prefix of 4-byte sequence
      // Make sure the top 5 bits of the decoded result would be in range
      let top5bits =        _bufferStorage & 0b0__0111__0011_0000__0000_0000
      if top5bits != 0 && top5bits <= 0b0__0100__0000_0000__0000_0000 {
        return 3
      }
