90 {
91 if (bufferLength == 0)
92 {
93 return 0u;
94 }
96 uint num2 = num / 2;
97 char* ptr = pBuffer;
101 uint num3;
102 if (bufferLength >= num2)
103 {
108 if ((num3 & 0xAAAA) == 0)
109 {
110 bufferLength <<= 1;
111 if (bufferLength < 2 * num)
112 {
113 goto IL_013e;
114 }
115 pBuffer = (char*)((nuint)((byte*)pBuffer + num) & ~(nuint)(num - 1));
116 bufferLength = (nuint)(bufferLength + (byte*)ptr);
117 bufferLength -= (nuint)pBuffer;
118 if (bufferLength < 2 * num)
119 {
120 goto IL_00fa;
121 }
122 char* ptr2 = (char*)((byte*)pBuffer + bufferLength - 2 * num);
124 while (true)
125 {
130 {
132 {
133 break;
134 }
135 }
136 else
137 {
139 if ((num3 & 0xAAAAu) != 0)
140 {
141 break;
142 }
143 }
144 pBuffer += 2 * num2;
145 if (pBuffer <= ptr2)
146 {
147 continue;
148 }
149 goto IL_00fa;
150 }
152 {
154 {
155 goto IL_01e6;
156 }
157 }
158 else
159 {
161 if ((num3 & 0xAAAAu) != 0)
162 {
163 goto IL_01fa;
164 }
165 }
166 pBuffer += num2;
167 left = vector;
168 goto IL_01e6;
169 }
170 goto IL_01fa;
171 }
172 uint num5;
173 if ((bufferLength & 4) != 0)
174 {
176 {
177 ulong num4 =
Unsafe.ReadUnaligned<ulong>(pBuffer);
179 {
180 num4 &= 0xFF00FF00FF00FF00uL;
182 goto IL_01a1;
183 }
184 }
185 else
186 {
187 num5 =
Unsafe.ReadUnaligned<uint>(pBuffer);
188 uint num6 =
Unsafe.ReadUnaligned<uint>(pBuffer + 2);
190 {
192 {
193 num5 = num6;
194 pBuffer += 2;
195 }
196 goto IL_0214;
197 }
198 }
199 pBuffer += 4;
200 }
201 if ((bufferLength & 2) != 0)
202 {
203 num5 =
Unsafe.ReadUnaligned<uint>(pBuffer);
205 {
206 goto IL_0214;
207 }
208 pBuffer += 2;
209 }
210 if ((bufferLength & 1) != 0 && *pBuffer <= 'ΓΏ')
211 {
212 pBuffer++;
213 }
214 goto IL_01a1;
215 IL_01e6:
217 goto IL_01fa;
218 IL_0214:
220 {
221 pBuffer++;
222 }
223 goto IL_01a1;
224 IL_01a1:
225 return (nuint)(pBuffer - ptr);
226 IL_0148:
227 if (((byte)bufferLength & (num - 1)) != 0)
228 {
229 pBuffer = (char*)((byte*)pBuffer + (bufferLength & (num - 1)) - num);
232 {
234 {
235 goto IL_01e6;
236 }
237 }
238 else
239 {
241 if ((num3 & 0xAAAAu) != 0)
242 {
243 goto IL_01fa;
244 }
245 }
246 pBuffer += num2;
247 }
248 goto IL_01a1;
249 IL_00fa:
250 if ((bufferLength & num) != 0)
251 {
254 {
256 {
257 goto IL_01e6;
258 }
259 }
260 else
261 {
263 if ((num3 & 0xAAAAu) != 0)
264 {
265 goto IL_01fa;
266 }
267 }
268 goto IL_013e;
269 }
270 goto IL_0148;
271 IL_01fa:
272 num3 &= 0xAAAAu;
274 goto IL_01a1;
275 IL_013e:
276 pBuffer += num2;
277 goto IL_0148;
278 }
static int TrailingZeroCount(int value)
static Vector128< byte > Create(byte value)
static ulong TrailingZeroCount(ulong value)
static new bool IsSupported
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 FirstCharInUInt32IsLatin1(uint value)
static bool AllCharsInUInt32AreLatin1(uint value)
static bool AllCharsInUInt64AreLatin1(ulong value)