583 {
584 nuint num = 0u;
585 uint num2 = 0u;
586 uint num3 = 0u;
587 ulong num4 = 0uL;
589 {
591 {
593 num4 =
Unsafe.ReadUnaligned<ulong>(pUtf16Buffer);
595 {
596 goto IL_018b;
597 }
599 }
600 }
602 {
604 if (elementCount >= 2 * num5)
605 {
607 num4 =
Unsafe.ReadUnaligned<ulong>(pUtf16Buffer);
609 {
610 goto IL_018b;
611 }
613 nuint num6 = elementCount - 2 * num5;
614 do
615 {
618 if (
Vector.GreaterThanAny(
Vector.BitwiseOr(vector, vector2), right))
619 {
620 break;
621 }
624 num += num5;
625 }
626 while (num <= num6);
627 }
628 }
629 nuint num7 = elementCount - num;
630 if (num7 < 4)
631 {
632 goto IL_0137;
633 }
634 nuint num8 = num + num7 - 4;
635 while (true)
636 {
638 num4 =
Unsafe.ReadUnaligned<ulong>(pUtf16Buffer + num);
640 {
641 break;
642 }
644 num += 4;
645 if (num <= num8)
646 {
647 continue;
648 }
649 goto IL_0137;
650 }
651 goto IL_018b;
652 IL_01c4:
654 {
655 if (!BitConverter.IsLittleEndian)
656 {
657 }
658 pAsciiBuffer[num] = (byte)num2;
659 num++;
660 }
661 goto IL_0189;
662 IL_0189:
663 return num;
664 IL_0137:
665 if (((uint)(int)num7 & 2u) != 0)
666 {
667 num2 =
Unsafe.ReadUnaligned<uint>(pUtf16Buffer + num);
669 {
670 goto IL_01c4;
671 }
673 num += 2;
674 }
675 if (((uint)(int)num7 & (true ? 1u : 0u)) != 0)
676 {
677 num2 = pUtf16Buffer[num];
678 if (num2 <= 127)
679 {
680 pAsciiBuffer[num] = (byte)num2;
681 num++;
682 }
683 }
684 goto IL_0189;
685 IL_018b:
687 _ = BitConverter.IsLittleEndian;
688 num2 = (uint)num4;
690 {
692 _ = BitConverter.IsLittleEndian;
693 num2 = (uint)(num4 >> 32);
694 num += 2;
695 }
696 goto IL_01c4;
697 }
static bool IsHardwareAccelerated
static unsafe Vector< byte > Narrow(Vector< ushort > low, Vector< ushort > high)
static new bool IsSupported
static bool AllCharsInUInt32AreAscii(uint value)
static bool AllCharsInUInt64AreAscii(ulong value)
static bool FirstCharInUInt32IsAscii(uint value)
static void NarrowFourUtf16CharsToAsciiAndWriteToBuffer(ref byte outputBuffer, ulong value)
static void NarrowTwoUtf16CharsToAsciiAndWriteToBuffer(ref byte outputBuffer, uint value)
static unsafe nuint NarrowUtf16ToAscii_Sse2(char *pUtf16Buffer, byte *pAsciiBuffer, nuint elementCount)