using System;
using Il2CppInterop.Common.Attributes;
using Il2CppInterop.Runtime;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppSystem;
using UnityEngine;

namespace RootMotion
{
	// Token: 0x02000405 RID: 1029
	public static class LayerMaskExtensions : Il2CppSystem.Object
	{
		// Token: 0x06007DF1 RID: 32241 RVA: 0x002034CC File Offset: 0x002016CC
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 0, XrefRangeEnd = 0, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static bool Contains(LayerMask mask, int layer)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref mask;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref layer;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(LayerMaskExtensions.NativeMethodInfoPtr_Contains_Public_Static_Boolean_LayerMask_Int32_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x06007DF2 RID: 32242 RVA: 0x00203534 File Offset: 0x00201734
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 623218, XrefRangeEnd = 623223, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static LayerMask Create(Il2CppStringArray layerNames = null)
		{
			if (layerNames == null)
			{
				layerNames = new Il2CppStringArray(0L);
			}
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(layerNames);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(LayerMaskExtensions.NativeMethodInfoPtr_Create_Public_Static_LayerMask_Il2CppStringArray_0, 0, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				return *IL2CPP.il2cpp_object_unbox(intPtr);
			}
		}

		// Token: 0x06007DF3 RID: 32243 RVA: 0x002035A4 File Offset: 0x002017A4
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 623223, XrefRangeEnd = 623227, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static LayerMask Create(Il2CppStructArray<int> layerNumbers = null)
		{
			if (layerNumbers == null)
			{
				layerNumbers = new Il2CppStructArray<int>(0L);
			}
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(layerNumbers);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(LayerMaskExtensions.NativeMethodInfoPtr_Create_Public_Static_LayerMask_Il2CppStructArray_1_Int32_0, 0, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				return *IL2CPP.il2cpp_object_unbox(intPtr);
			}
		}

		// Token: 0x06007DF4 RID: 32244 RVA: 0x00203614 File Offset: 0x00201814
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 0, XrefRangeEnd = 0, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static LayerMask NamesToMask(Il2CppStringArray layerNames = null)
		{
			if (layerNames == null)
			{
				layerNames = new Il2CppStringArray(0L);
			}
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(layerNames);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(LayerMaskExtensions.NativeMethodInfoPtr_NamesToMask_Public_Static_LayerMask_Il2CppStringArray_0, 0, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				return *IL2CPP.il2cpp_object_unbox(intPtr);
			}
		}

		// Token: 0x06007DF5 RID: 32245 RVA: 0x00203684 File Offset: 0x00201884
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 0, XrefRangeEnd = 0, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static LayerMask LayerNumbersToMask(Il2CppStructArray<int> layerNumbers = null)
		{
			if (layerNumbers == null)
			{
				layerNumbers = new Il2CppStructArray<int>(0L);
			}
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(layerNumbers);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(LayerMaskExtensions.NativeMethodInfoPtr_LayerNumbersToMask_Public_Static_LayerMask_Il2CppStructArray_1_Int32_0, 0, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				return *IL2CPP.il2cpp_object_unbox(intPtr);
			}
		}

		// Token: 0x06007DF6 RID: 32246 RVA: 0x002036F4 File Offset: 0x002018F4
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 623227, XrefRangeEnd = 623229, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static LayerMask Inverse(this LayerMask original)
		{
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref original;
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(LayerMaskExtensions.NativeMethodInfoPtr_Inverse_Public_Static_LayerMask_LayerMask_0, 0, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				return *IL2CPP.il2cpp_object_unbox(intPtr);
			}
		}

		// Token: 0x06007DF7 RID: 32247 RVA: 0x00203748 File Offset: 0x00201948
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 623229, XrefRangeEnd = 623240, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static LayerMask AddToMask(this LayerMask original, Il2CppStringArray layerNames = null)
		{
			if (layerNames == null)
			{
				layerNames = new Il2CppStringArray(0L);
			}
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref original;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.Il2CppObjectBaseToPtr(layerNames);
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(LayerMaskExtensions.NativeMethodInfoPtr_AddToMask_Public_Static_LayerMask_LayerMask_Il2CppStringArray_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x06007DF8 RID: 32248 RVA: 0x002037C8 File Offset: 0x002019C8
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 623240, XrefRangeEnd = 623253, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static LayerMask RemoveFromMask(this LayerMask original, Il2CppStringArray layerNames = null)
		{
			if (layerNames == null)
			{
				layerNames = new Il2CppStringArray(0L);
			}
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref original;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.Il2CppObjectBaseToPtr(layerNames);
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(LayerMaskExtensions.NativeMethodInfoPtr_RemoveFromMask_Public_Static_LayerMask_LayerMask_Il2CppStringArray_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x06007DF9 RID: 32249 RVA: 0x00203848 File Offset: 0x00201A48
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 623253, XrefRangeEnd = 623269, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static Il2CppStringArray MaskToNames(this LayerMask original)
		{
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref original;
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(LayerMaskExtensions.NativeMethodInfoPtr_MaskToNames_Public_Static_Il2CppStringArray_LayerMask_0, 0, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				IntPtr intPtr3 = intPtr;
				return (intPtr3 != 0) ? new Il2CppStringArray(intPtr3) : null;
			}
		}

		// Token: 0x06007DFA RID: 32250 RVA: 0x002038A4 File Offset: 0x00201AA4
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 623269, XrefRangeEnd = 623283, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static Il2CppStructArray<int> MaskToNumbers(this LayerMask original)
		{
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref original;
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(LayerMaskExtensions.NativeMethodInfoPtr_MaskToNumbers_Public_Static_Il2CppStructArray_1_Int32_LayerMask_0, 0, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				IntPtr intPtr3 = intPtr;
				return (intPtr3 != 0) ? new Il2CppStructArray<int>(intPtr3) : null;
			}
		}

		// Token: 0x06007DFB RID: 32251 RVA: 0x00203900 File Offset: 0x00201B00
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 623283, XrefRangeEnd = 623302, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static string MaskToString(this LayerMask original)
		{
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref original;
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(LayerMaskExtensions.NativeMethodInfoPtr_MaskToString_Public_Static_String_LayerMask_0, 0, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				return IL2CPP.Il2CppStringToManaged(intPtr);
			}
		}

		// Token: 0x06007DFC RID: 32252 RVA: 0x00203950 File Offset: 0x00201B50
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 623302, XrefRangeEnd = 623319, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static string MaskToString(this LayerMask original, string delimiter)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref original;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.ManagedStringToIl2Cpp(delimiter);
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(LayerMaskExtensions.NativeMethodInfoPtr_MaskToString_Public_Static_String_LayerMask_String_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return IL2CPP.Il2CppStringToManaged(intPtr);
		}

		// Token: 0x06007DFD RID: 32253 RVA: 0x002039B6 File Offset: 0x00201BB6
		public static LayerMask Create(params string[] layerNames)
		{
			return LayerMaskExtensions.Create(new Il2CppStringArray(layerNames));
		}

		// Token: 0x06007DFE RID: 32254 RVA: 0x002039C6 File Offset: 0x00201BC6
		public static LayerMask Create(params int[] layerNumbers)
		{
			return LayerMaskExtensions.Create(new Il2CppStructArray<int>(layerNumbers));
		}

		// Token: 0x06007DFF RID: 32255 RVA: 0x002039D6 File Offset: 0x00201BD6
		public static LayerMask NamesToMask(params string[] layerNames)
		{
			return LayerMaskExtensions.NamesToMask(new Il2CppStringArray(layerNames));
		}

		// Token: 0x06007E00 RID: 32256 RVA: 0x002039E6 File Offset: 0x00201BE6
		public static LayerMask LayerNumbersToMask(params int[] layerNumbers)
		{
			return LayerMaskExtensions.LayerNumbersToMask(new Il2CppStructArray<int>(layerNumbers));
		}

		// Token: 0x06007E01 RID: 32257 RVA: 0x002039F6 File Offset: 0x00201BF6
		public static LayerMask AddToMask(LayerMask original, params string[] layerNames)
		{
			return original.AddToMask(new Il2CppStringArray(layerNames));
		}

		// Token: 0x06007E02 RID: 32258 RVA: 0x00203A0A File Offset: 0x00201C0A
		public static LayerMask RemoveFromMask(LayerMask original, params string[] layerNames)
		{
			return original.RemoveFromMask(new Il2CppStringArray(layerNames));
		}

		// Token: 0x06007E03 RID: 32259 RVA: 0x00203A20 File Offset: 0x00201C20
		// Note: this type is marked as 'beforefieldinit'.
		static LayerMaskExtensions()
		{
			Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "RootMotion", "LayerMaskExtensions");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr);
			LayerMaskExtensions.NativeMethodInfoPtr_Contains_Public_Static_Boolean_LayerMask_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672900);
			LayerMaskExtensions.NativeMethodInfoPtr_Create_Public_Static_LayerMask_Il2CppStringArray_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672901);
			LayerMaskExtensions.NativeMethodInfoPtr_Create_Public_Static_LayerMask_Il2CppStructArray_1_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672902);
			LayerMaskExtensions.NativeMethodInfoPtr_NamesToMask_Public_Static_LayerMask_Il2CppStringArray_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672903);
			LayerMaskExtensions.NativeMethodInfoPtr_LayerNumbersToMask_Public_Static_LayerMask_Il2CppStructArray_1_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672904);
			LayerMaskExtensions.NativeMethodInfoPtr_Inverse_Public_Static_LayerMask_LayerMask_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672905);
			LayerMaskExtensions.NativeMethodInfoPtr_AddToMask_Public_Static_LayerMask_LayerMask_Il2CppStringArray_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672906);
			LayerMaskExtensions.NativeMethodInfoPtr_RemoveFromMask_Public_Static_LayerMask_LayerMask_Il2CppStringArray_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672907);
			LayerMaskExtensions.NativeMethodInfoPtr_MaskToNames_Public_Static_Il2CppStringArray_LayerMask_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672908);
			LayerMaskExtensions.NativeMethodInfoPtr_MaskToNumbers_Public_Static_Il2CppStructArray_1_Int32_LayerMask_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672909);
			LayerMaskExtensions.NativeMethodInfoPtr_MaskToString_Public_Static_String_LayerMask_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672910);
			LayerMaskExtensions.NativeMethodInfoPtr_MaskToString_Public_Static_String_LayerMask_String_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672911);
		}

		// Token: 0x06007E04 RID: 32260 RVA: 0x0000A74C File Offset: 0x0000894C
		public LayerMaskExtensions(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x040054BE RID: 21694
		private static readonly IntPtr NativeMethodInfoPtr_Contains_Public_Static_Boolean_LayerMask_Int32_0;

		// Token: 0x040054BF RID: 21695
		private static readonly IntPtr NativeMethodInfoPtr_Create_Public_Static_LayerMask_Il2CppStringArray_0;

		// Token: 0x040054C0 RID: 21696
		private static readonly IntPtr NativeMethodInfoPtr_Create_Public_Static_LayerMask_Il2CppStructArray_1_Int32_0;

		// Token: 0x040054C1 RID: 21697
		private static readonly IntPtr NativeMethodInfoPtr_NamesToMask_Public_Static_LayerMask_Il2CppStringArray_0;

		// Token: 0x040054C2 RID: 21698
		private static readonly IntPtr NativeMethodInfoPtr_LayerNumbersToMask_Public_Static_LayerMask_Il2CppStructArray_1_Int32_0;

		// Token: 0x040054C3 RID: 21699
		private static readonly IntPtr NativeMethodInfoPtr_Inverse_Public_Static_LayerMask_LayerMask_0;

		// Token: 0x040054C4 RID: 21700
		private static readonly IntPtr NativeMethodInfoPtr_AddToMask_Public_Static_LayerMask_LayerMask_Il2CppStringArray_0;

		// Token: 0x040054C5 RID: 21701
		private static readonly IntPtr NativeMethodInfoPtr_RemoveFromMask_Public_Static_LayerMask_LayerMask_Il2CppStringArray_0;

		// Token: 0x040054C6 RID: 21702
		private static readonly IntPtr NativeMethodInfoPtr_MaskToNames_Public_Static_Il2CppStringArray_LayerMask_0;

		// Token: 0x040054C7 RID: 21703
		private static readonly IntPtr NativeMethodInfoPtr_MaskToNumbers_Public_Static_Il2CppStructArray_1_Int32_LayerMask_0;

		// Token: 0x040054C8 RID: 21704
		private static readonly IntPtr NativeMethodInfoPtr_MaskToString_Public_Static_String_LayerMask_0;

		// Token: 0x040054C9 RID: 21705
		private static readonly IntPtr NativeMethodInfoPtr_MaskToString_Public_Static_String_LayerMask_String_0;
	}
}
