300 {
301 nint num;
302 MethodTable** ptr;
304 {
305 MethodTable* methodTable = RuntimeHelpers.GetMethodTable(
obj);
306 num = methodTable->InterfaceCount;
307 if (num == 0)
308 {
309 goto IL_0084;
310 }
311 ptr = methodTable->InterfaceMap;
312 if (num < 4)
313 {
314 goto IL_0069;
315 }
316 while (*ptr != toTypeHnd && ptr[1] != toTypeHnd && ptr[2] != toTypeHnd && ptr[3] != toTypeHnd)
317 {
318 ptr += 4;
319 num -= 4;
320 if (num >= 4)
321 {
322 continue;
323 }
324 goto IL_0066;
325 }
326 }
327 goto IL_0082;
328 IL_0082:
330 IL_0069:
331 while (*ptr != toTypeHnd)
332 {
333 ptr++;
334 num--;
335 if (num > 0)
336 {
337 continue;
338 }
339 goto IL_0084;
340 }
341 goto IL_0082;
342 IL_0066:
343 if (num != 0)
344 {
345 goto IL_0069;
346 }
347 goto IL_0084;
348 IL_0084:
350 }
static unsafe object ChkCast_Helper(void *toTypeHnd, object obj)