380 {
381 if (bufferLength == 0)
382 {
383 return 0u;
384 }
386 uint num2 = num / 2;
387 char* ptr = pBuffer;
391 uint num3;
392 if (bufferLength >= num2)
393 {
398 if ((num3 & 0xAAAA) == 0)
399 {
400 bufferLength <<= 1;
401 if (bufferLength < 2 * num)
402 {
403 goto IL_013e;
404 }
405 pBuffer = (char*)((nuint)((byte*)pBuffer + num) & ~(nuint)(num - 1));
406 bufferLength = (nuint)(bufferLength + (byte*)ptr);
407 bufferLength -= (nuint)pBuffer;
408 if (bufferLength < 2 * num)
409 {
410 goto IL_00fa;
411 }
412 char* ptr2 = (char*)((byte*)pBuffer + bufferLength - 2 * num);
414 while (true)
415 {
420 {
422 {
423 break;
424 }
425 }
426 else
427 {
429 if ((num3 & 0xAAAAu) != 0)
430 {
431 break;
432 }
433 }
434 pBuffer += 2 * num2;
435 if (pBuffer <= ptr2)
436 {
437 continue;
438 }
439 goto IL_00fa;
440 }
442 {
444 {
445 goto IL_01e6;
446 }
447 }
448 else
449 {
451 if ((num3 & 0xAAAAu) != 0)
452 {
453 goto IL_01fa;
454 }
455 }
456 pBuffer += num2;
457 left = vector;
458 goto IL_01e6;
459 }
460 goto IL_01fa;
461 }
462 if ((bufferLength & 4) != 0)
463 {
465 ulong num4 =
Unsafe.ReadUnaligned<ulong>(pBuffer);
467 {
468 num4 &= 0xFF80FF80FF80FF80uL;
470 goto IL_01a1;
471 }
472 pBuffer += 4;
473 }
474 if ((bufferLength & 2) != 0)
475 {
478 {
480 {
481 pBuffer++;
482 }
483 goto IL_01a1;
484 }
485 pBuffer += 2;
486 }
487 if ((bufferLength & 1) != 0 && *pBuffer <= '\u007f')
488 {
489 pBuffer++;
490 }
491 goto IL_01a1;
492 IL_00fa:
493 if ((bufferLength & num) != 0)
494 {
497 {
499 {
500 goto IL_01e6;
501 }
502 }
503 else
504 {
506 if ((num3 & 0xAAAAu) != 0)
507 {
508 goto IL_01fa;
509 }
510 }
511 goto IL_013e;
512 }
513 goto IL_0148;
514 IL_01fa:
515 num3 &= 0xAAAAu;
517 goto IL_01a1;
518 IL_0148:
519 if (((byte)bufferLength & (num - 1)) != 0)
520 {
521 pBuffer = (char*)((byte*)pBuffer + (bufferLength & (num - 1)) - num);
524 {
526 {
527 goto IL_01e6;
528 }
529 }
530 else
531 {
533 if ((num3 & 0xAAAAu) != 0)
534 {
535 goto IL_01fa;
536 }
537 }
538 pBuffer += num2;
539 }
540 goto IL_01a1;
541 IL_01e6:
543 goto IL_01fa;
544 IL_013e:
545 pBuffer += num2;
546 goto IL_0148;
547 IL_01a1:
548 return (nuint)(pBuffer - ptr);
549 }
static int TrailingZeroCount(int value)
static Vector128< byte > Create(byte value)
static unsafe Vector128< sbyte > LoadVector128(sbyte *address)
static int MoveMask(Vector128< sbyte > value)
static unsafe Vector128< sbyte > LoadAlignedVector128(sbyte *address)
static Vector128< byte > Or(Vector128< byte > left, Vector128< byte > right)
static Vector128< sbyte > AddSaturate(Vector128< sbyte > left, Vector128< sbyte > right)
static bool TestZ(Vector128< sbyte > left, Vector128< sbyte > right)
static new bool IsSupported
static bool AllCharsInUInt32AreAscii(uint value)
static bool AllCharsInUInt64AreAscii(ulong value)
static bool FirstCharInUInt32IsAscii(uint value)