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

namespace RootMotion
{
	// Token: 0x020003AD RID: 941
	public static class LayerMaskExtensions : Il2CppSystem.Object
	{
		// Token: 0x0600759E RID: 30110 RVA: 0x001E0790 File Offset: 0x001DE990
		[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: 0x0600759F RID: 30111 RVA: 0x001E07F8 File Offset: 0x001DE9F8
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 590913, XrefRangeEnd = 590918, 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: 0x060075A0 RID: 30112 RVA: 0x001E0868 File Offset: 0x001DEA68
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 590918, XrefRangeEnd = 590922, 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: 0x060075A1 RID: 30113 RVA: 0x001E08D8 File Offset: 0x001DEAD8
		[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: 0x060075A2 RID: 30114 RVA: 0x001E0948 File Offset: 0x001DEB48
		[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: 0x060075A3 RID: 30115 RVA: 0x001E09B8 File Offset: 0x001DEBB8
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 590922, XrefRangeEnd = 590924, 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: 0x060075A4 RID: 30116 RVA: 0x001E0A0C File Offset: 0x001DEC0C
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 590924, XrefRangeEnd = 590935, 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: 0x060075A5 RID: 30117 RVA: 0x001E0A8C File Offset: 0x001DEC8C
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 590935, XrefRangeEnd = 590948, 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: 0x060075A6 RID: 30118 RVA: 0x001E0B0C File Offset: 0x001DED0C
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 590948, XrefRangeEnd = 590964, 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: 0x060075A7 RID: 30119 RVA: 0x001E0B68 File Offset: 0x001DED68
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 590964, XrefRangeEnd = 590978, 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: 0x060075A8 RID: 30120 RVA: 0x001E0BC4 File Offset: 0x001DEDC4
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 590978, XrefRangeEnd = 590997, 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: 0x060075A9 RID: 30121 RVA: 0x001E0C14 File Offset: 0x001DEE14
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 590997, XrefRangeEnd = 591014, 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: 0x060075AA RID: 30122 RVA: 0x001E0C7A File Offset: 0x001DEE7A
		public static LayerMask Create(params string[] layerNames)
		{
			return LayerMaskExtensions.Create(new Il2CppStringArray(layerNames));
		}

		// Token: 0x060075AB RID: 30123 RVA: 0x001E0C8A File Offset: 0x001DEE8A
		public static LayerMask Create(params int[] layerNumbers)
		{
			return LayerMaskExtensions.Create(new Il2CppStructArray<int>(layerNumbers));
		}

		// Token: 0x060075AC RID: 30124 RVA: 0x001E0C9A File Offset: 0x001DEE9A
		public static LayerMask NamesToMask(params string[] layerNames)
		{
			return LayerMaskExtensions.NamesToMask(new Il2CppStringArray(layerNames));
		}

		// Token: 0x060075AD RID: 30125 RVA: 0x001E0CAA File Offset: 0x001DEEAA
		public static LayerMask LayerNumbersToMask(params int[] layerNumbers)
		{
			return LayerMaskExtensions.LayerNumbersToMask(new Il2CppStructArray<int>(layerNumbers));
		}

		// Token: 0x060075AE RID: 30126 RVA: 0x001E0CBA File Offset: 0x001DEEBA
		public static LayerMask AddToMask(LayerMask original, params string[] layerNames)
		{
			return original.AddToMask(new Il2CppStringArray(layerNames));
		}

		// Token: 0x060075AF RID: 30127 RVA: 0x001E0CCE File Offset: 0x001DEECE
		public static LayerMask RemoveFromMask(LayerMask original, params string[] layerNames)
		{
			return original.RemoveFromMask(new Il2CppStringArray(layerNames));
		}

		// Token: 0x060075B0 RID: 30128 RVA: 0x001E0CE4 File Offset: 0x001DEEE4
		// 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, 100672187);
			LayerMaskExtensions.NativeMethodInfoPtr_Create_Public_Static_LayerMask_Il2CppStringArray_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672188);
			LayerMaskExtensions.NativeMethodInfoPtr_Create_Public_Static_LayerMask_Il2CppStructArray_1_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672189);
			LayerMaskExtensions.NativeMethodInfoPtr_NamesToMask_Public_Static_LayerMask_Il2CppStringArray_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672190);
			LayerMaskExtensions.NativeMethodInfoPtr_LayerNumbersToMask_Public_Static_LayerMask_Il2CppStructArray_1_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672191);
			LayerMaskExtensions.NativeMethodInfoPtr_Inverse_Public_Static_LayerMask_LayerMask_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672192);
			LayerMaskExtensions.NativeMethodInfoPtr_AddToMask_Public_Static_LayerMask_LayerMask_Il2CppStringArray_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672193);
			LayerMaskExtensions.NativeMethodInfoPtr_RemoveFromMask_Public_Static_LayerMask_LayerMask_Il2CppStringArray_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672194);
			LayerMaskExtensions.NativeMethodInfoPtr_MaskToNames_Public_Static_Il2CppStringArray_LayerMask_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672195);
			LayerMaskExtensions.NativeMethodInfoPtr_MaskToNumbers_Public_Static_Il2CppStructArray_1_Int32_LayerMask_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672196);
			LayerMaskExtensions.NativeMethodInfoPtr_MaskToString_Public_Static_String_LayerMask_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672197);
			LayerMaskExtensions.NativeMethodInfoPtr_MaskToString_Public_Static_String_LayerMask_String_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<LayerMaskExtensions>.NativeClassPtr, 100672198);
		}

		// Token: 0x060075B1 RID: 30129 RVA: 0x0000A688 File Offset: 0x00008888
		public LayerMaskExtensions(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x04004F15 RID: 20245
		private static readonly IntPtr NativeMethodInfoPtr_Contains_Public_Static_Boolean_LayerMask_Int32_0;

		// Token: 0x04004F16 RID: 20246
		private static readonly IntPtr NativeMethodInfoPtr_Create_Public_Static_LayerMask_Il2CppStringArray_0;

		// Token: 0x04004F17 RID: 20247
		private static readonly IntPtr NativeMethodInfoPtr_Create_Public_Static_LayerMask_Il2CppStructArray_1_Int32_0;

		// Token: 0x04004F18 RID: 20248
		private static readonly IntPtr NativeMethodInfoPtr_NamesToMask_Public_Static_LayerMask_Il2CppStringArray_0;

		// Token: 0x04004F19 RID: 20249
		private static readonly IntPtr NativeMethodInfoPtr_LayerNumbersToMask_Public_Static_LayerMask_Il2CppStructArray_1_Int32_0;

		// Token: 0x04004F1A RID: 20250
		private static readonly IntPtr NativeMethodInfoPtr_Inverse_Public_Static_LayerMask_LayerMask_0;

		// Token: 0x04004F1B RID: 20251
		private static readonly IntPtr NativeMethodInfoPtr_AddToMask_Public_Static_LayerMask_LayerMask_Il2CppStringArray_0;

		// Token: 0x04004F1C RID: 20252
		private static readonly IntPtr NativeMethodInfoPtr_RemoveFromMask_Public_Static_LayerMask_LayerMask_Il2CppStringArray_0;

		// Token: 0x04004F1D RID: 20253
		private static readonly IntPtr NativeMethodInfoPtr_MaskToNames_Public_Static_Il2CppStringArray_LayerMask_0;

		// Token: 0x04004F1E RID: 20254
		private static readonly IntPtr NativeMethodInfoPtr_MaskToNumbers_Public_Static_Il2CppStructArray_1_Int32_LayerMask_0;

		// Token: 0x04004F1F RID: 20255
		private static readonly IntPtr NativeMethodInfoPtr_MaskToString_Public_Static_String_LayerMask_0;

		// Token: 0x04004F20 RID: 20256
		private static readonly IntPtr NativeMethodInfoPtr_MaskToString_Public_Static_String_LayerMask_String_0;
	}
}
