 
     _sanityCheck(validBytes != 0,
         "input buffer should not be empty")
-    _sanityCheck(!UTF8._isValidUTF8(buffer, validBytes: validBytes),
+    _sanityCheck(!UTF8._isValidUTF8(buffer),
         "input sequence should be ill-formed UTF-8")
 
     // Unicode 6.3.0, D93b:

  var _lookaheadFlags: UInt8 = 0


  /// Returns `true` if the LSB bytes in `buffer` are well-formed UTF-8 code		
  /// unit sequence.
  @warn_unused_result
  static func _isValidUTF8(buffer: UInt32, validBytes: UInt8) -> Bool {
    _sanityCheck(validBytes & 0b0000_1111 != 0,
        "input buffer should not be empty")

    if _fastPath(buffer & 0x80 == 0) {
      return true // 0x00 -- 0x7f: 1-byte sequences (ASCII).

    // The first byte to read is located at MSB of `_decodeLookahead`.  Get a
    // representation of the buffer where we can read bytes starting from LSB.
    var buffer = _decodeLookahead.byteSwapped
    if _slowPath(!UTF8._isValidUTF8(buffer)) {
      // The code unit sequence is ill-formed.  According to Unicode
      // recommendation, replace the maximal subpart of ill-formed sequence
      // with one replacement character.
