 extension UTF8.ReverseDecoder : _UTF8Decoder {
   public typealias CodeUnit = UInt8
 
-  public static func scalar(buffer: UInt32, length: Int) -> UnicodeScalar {
+  public static func scalar(bufferStorage: UInt32, length: Int) -> UnicodeScalar {
     switch length {
     case 1:
-      return UnicodeScalar(_unchecked: buffer & 0xff)
+      return UnicodeScalar(_unchecked: bufferStorage & 0xff)
     case 2:
-      var value = buffer       & 0b0______________________11_1111
-      value    |= buffer &>> 2 & 0b0______________0111__1100_0000
+      var value = bufferStorage       & 0b0______________________11_1111
+      value    |= bufferStorage &>> 2 & 0b0______________0111__1100_0000
       return UnicodeScalar(_unchecked: value)
     case 3:
-      var value = buffer       & 0b0______________________11_1111
-      value    |= buffer &>> 2 & 0b0______________1111__1100_0000
-      value    |= buffer &>> 4 & 0b0_________1111_0000__0000_0000
+      var value = bufferStorage       & 0b0______________________11_1111
+      value    |= bufferStorage &>> 2 & 0b0______________1111__1100_0000
+      value    |= bufferStorage &>> 4 & 0b0_________1111_0000__0000_0000
       return UnicodeScalar(_unchecked: value)
     default:
       _sanityCheck(length == 4)
-      var value = buffer       & 0b0______________________11_1111
-      value    |= buffer &>> 2 & 0b0______________1111__1100_0000
-      value    |= buffer &>> 4 & 0b0_____11__1111_0000__0000_0000
-      value    |= buffer &>> 6 & 0b0_1_1100__0000_0000__0000_0000
+      var value = bufferStorage       & 0b0______________________11_1111
+      value    |= bufferStorage &>> 2 & 0b0______________1111__1100_0000
+      value    |= bufferStorage &>> 4 & 0b0_____11__1111_0000__0000_0000
+      value    |= bufferStorage &>> 6 & 0b0_1_1100__0000_0000__0000_0000
       return UnicodeScalar(_unchecked: value)
     }
   }

        return .valid(UInt32(codeUnit), length: 1)
      }
      // Non-ASCII, proceed to buffering mode.
      _buffer = UInt32(extendingOrTruncating: codeUnit)
      _bitsInBuffer = 8
    } else if _buffer & 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
      _bitsInBuffer = _bitsInBuffer &- 8
      return .valid(codeUnit, length: 1)
    }

  
  public // @testable
  func _validateBuffer() -> (valid: Bool, length: UInt8) {
    if _bufferStorage & 0x80 == 0 { // 1-byte sequence (ASCII), buffer: [ ... ... ... CU0 ].
      return (true, 1)
    }

    if _bufferStorage & 0b0__1100_0000__1110_0000
                     == 0b0__1000_0000__1100_0000 {
      // 2-byte sequence. At least one of the top 4 bits of the decoded result
      // must be nonzero.
      if _fastPath(_bufferStorage & 0b0_0001_1110 != 0) { return (true, 2) }
    }
    else if _bufferStorage & 0b0__1100_0000__1100_0000__1111_0000
                          == 0b0__1000_0000__1000_0000__1110_0000 {
      // 3-byte sequence. The top 5 bits of the decoded result must be nonzero
      // and not a surrogate
      let top5Bits =                  _bufferStorage & 0b0___0010_0000__0000_1111
      if _fastPath(top5Bits != 0 && top5Bits != 0b0___0010_0000__0000_1101) {
        return (true, 3)
      }
    }
    else if _bufferStorage & 0b0__1100_0000__1100_0000__1100_0000__1111_1000
                          == 0b0__1000_0000__1000_0000__1000_0000__1111_0000 {
      // 4-byte sequence.  The top 5 bits of the decoded result must be nonzero
      // and no greater than 0b0__0100_0000
      let top5bits = UInt16(_bufferStorage       & 0b0__0011_0000__0000_0111)
      if _fastPath(
        top5bits != 0
        && top5bits.byteSwapped <=                 0b0__0000_0100__0000_0000
      ) { return (true, 4) }
    }
    return (false, _invalidLength())
