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

namespace Obi
{
	// Token: 0x020004FE RID: 1278
	public static class ObiUtils : Il2CppSystem.Object
	{
		// Token: 0x060091BA RID: 37306 RVA: 0x00257D7C File Offset: 0x00255F7C
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 613418, RefRangeEnd = 613419, XrefRangeStart = 613411, XrefRangeEnd = 613418, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static void DrawArrowGizmo(float bodyLenght, float bodyWidth, float headLenght, float headWidth)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)4) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref bodyLenght;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref bodyWidth;
			ptr[checked(unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref headLenght;
			ptr[checked(unchecked((UIntPtr)3) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref headWidth;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(ObiUtils.NativeMethodInfoPtr_DrawArrowGizmo_Public_Static_Void_Single_Single_Single_Single_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x060091BB RID: 37307 RVA: 0x00257DFC File Offset: 0x00255FFC
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 613419, XrefRangeEnd = 613422, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static void ArrayFill<T>(Il2CppArrayBase<T> arrayToFill, Il2CppArrayBase<T> fillValue)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(arrayToFill);
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.Il2CppObjectBaseToPtr(fillValue);
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(ObiUtils.MethodInfoStoreGeneric_ArrayFill_Public_Static_Void_Il2CppArrayBase_1_T_Il2CppArrayBase_1_T_0<T>.Pointer, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x060091BC RID: 37308 RVA: 0x00257E60 File Offset: 0x00256060
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 613422, XrefRangeEnd = 613434, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static IList<T> Swap<T>(this IList<T> list, int indexA, int indexB)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)3) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(list);
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref indexA;
			ptr[checked(unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref indexB;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(ObiUtils.MethodInfoStoreGeneric_Swap_Public_Static_IList_1_T_IList_1_T_Int32_Int32_0<T>.Pointer, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			IntPtr intPtr3 = intPtr;
			return (intPtr3 != 0) ? new IList<T>(intPtr3) : null;
		}

		// Token: 0x060091BD RID: 37309 RVA: 0x00257EE4 File Offset: 0x002560E4
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 613434, XrefRangeEnd = 613435, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static void AddRange<T>(ref Il2CppArrayBase<T> array, Il2CppArrayBase<T> other)
		{
			IntPtr* ptr;
			IntPtr intPtr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				ref IntPtr ptr2 = ref *ptr;
				intPtr = IL2CPP.Il2CppObjectBaseToPtr(array);
				ptr2 = &intPtr;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.Il2CppObjectBaseToPtr(other);
			IntPtr intPtr3;
			IntPtr intPtr2 = IL2CPP.il2cpp_runtime_invoke(ObiUtils.MethodInfoStoreGeneric_AddRange_Public_Static_Void_byref_Il2CppArrayBase_1_T_Il2CppArrayBase_1_T_0<T>.Pointer, 0, (void**)ptr, ref intPtr3);
			Il2CppException.RaiseExceptionIfNecessary(intPtr3);
			IntPtr intPtr4 = intPtr;
			array = ((intPtr4 == 0) ? null : new Il2CppArrayBase(intPtr4));
		}

		// Token: 0x060091BE RID: 37310 RVA: 0x00257F68 File Offset: 0x00256168
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 613435, XrefRangeEnd = 613438, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static void RemoveRange<T>(ref Il2CppArrayBase<T> array, int index, int count)
		{
			IntPtr* ptr;
			IntPtr intPtr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)3) * (UIntPtr)sizeof(IntPtr)];
				ref IntPtr ptr2 = ref *ptr;
				intPtr = IL2CPP.Il2CppObjectBaseToPtr(array);
				ptr2 = &intPtr;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref index;
			ptr[checked(unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref count;
			IntPtr intPtr3;
			IntPtr intPtr2 = IL2CPP.il2cpp_runtime_invoke(ObiUtils.MethodInfoStoreGeneric_RemoveRange_Public_Static_Void_byref_Il2CppArrayBase_1_T_Int32_Int32_0<T>.Pointer, 0, (void**)ptr, ref intPtr3);
			Il2CppException.RaiseExceptionIfNecessary(intPtr3);
			IntPtr intPtr4 = intPtr;
			array = ((intPtr4 == 0) ? null : new Il2CppArrayBase(intPtr4));
		}

		// Token: 0x060091BF RID: 37311 RVA: 0x00257FF8 File Offset: 0x002561F8
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 613489, RefRangeEnd = 613490, XrefRangeStart = 613438, XrefRangeEnd = 613489, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static Bounds Transform(this Bounds b, Matrix4x4 m)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref b;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref m;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(ObiUtils.NativeMethodInfoPtr_Transform_Public_Static_Bounds_Bounds_Matrix4x4_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x060091C0 RID: 37312 RVA: 0x00258060 File Offset: 0x00256260
		[CallerCount(0)]
		public unsafe static float Remap(this float value, float from1, float to1, float from2, float to2)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)5) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref value;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref from1;
			ptr[checked(unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref to1;
			ptr[checked(unchecked((UIntPtr)3) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref from2;
			ptr[checked(unchecked((UIntPtr)4) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref to2;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(ObiUtils.NativeMethodInfoPtr_Remap_Public_Static_Single_Single_Single_Single_Single_Single_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x060091C1 RID: 37313 RVA: 0x00258100 File Offset: 0x00256300
		[CallerCount(2)]
		[CachedScanResults(RefRangeStart = 613491, RefRangeEnd = 613493, XrefRangeStart = 613490, XrefRangeEnd = 613491, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static float Mod(float a, float b)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref a;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref b;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(ObiUtils.NativeMethodInfoPtr_Mod_Public_Static_Single_Single_Single_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x060091C2 RID: 37314 RVA: 0x00258168 File Offset: 0x00256368
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 613493, XrefRangeEnd = 613497, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static float TriangleArea(Vector3 p1, Vector3 p2, Vector3 p3)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)3) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref p1;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref p2;
			ptr[checked(unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref p3;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(ObiUtils.NativeMethodInfoPtr_TriangleArea_Public_Static_Single_Vector3_Vector3_Vector3_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x060091C3 RID: 37315 RVA: 0x002581E4 File Offset: 0x002563E4
		// Note: this type is marked as 'beforefieldinit'.
		static ObiUtils()
		{
			Il2CppClassPointerStore<ObiUtils>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "Obi", "ObiUtils");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<ObiUtils>.NativeClassPtr);
			ObiUtils.NativeMethodInfoPtr_DrawArrowGizmo_Public_Static_Void_Single_Single_Single_Single_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiUtils>.NativeClassPtr, 100674611);
			ObiUtils.NativeMethodInfoPtr_ArrayFill_Public_Static_Void_Il2CppArrayBase_1_T_Il2CppArrayBase_1_T_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiUtils>.NativeClassPtr, 100674612);
			ObiUtils.NativeMethodInfoPtr_Swap_Public_Static_IList_1_T_IList_1_T_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiUtils>.NativeClassPtr, 100674613);
			ObiUtils.NativeMethodInfoPtr_AddRange_Public_Static_Void_byref_Il2CppArrayBase_1_T_Il2CppArrayBase_1_T_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiUtils>.NativeClassPtr, 100674614);
			ObiUtils.NativeMethodInfoPtr_RemoveRange_Public_Static_Void_byref_Il2CppArrayBase_1_T_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiUtils>.NativeClassPtr, 100674615);
			ObiUtils.NativeMethodInfoPtr_Transform_Public_Static_Bounds_Bounds_Matrix4x4_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiUtils>.NativeClassPtr, 100674616);
			ObiUtils.NativeMethodInfoPtr_Remap_Public_Static_Single_Single_Single_Single_Single_Single_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiUtils>.NativeClassPtr, 100674617);
			ObiUtils.NativeMethodInfoPtr_Mod_Public_Static_Single_Single_Single_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiUtils>.NativeClassPtr, 100674618);
			ObiUtils.NativeMethodInfoPtr_TriangleArea_Public_Static_Single_Vector3_Vector3_Vector3_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiUtils>.NativeClassPtr, 100674619);
		}

		// Token: 0x060091C4 RID: 37316 RVA: 0x0000A688 File Offset: 0x00008888
		public ObiUtils(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x04006124 RID: 24868
		private static readonly IntPtr NativeMethodInfoPtr_DrawArrowGizmo_Public_Static_Void_Single_Single_Single_Single_0;

		// Token: 0x04006125 RID: 24869
		private static readonly IntPtr NativeMethodInfoPtr_ArrayFill_Public_Static_Void_Il2CppArrayBase_1_T_Il2CppArrayBase_1_T_0;

		// Token: 0x04006126 RID: 24870
		private static readonly IntPtr NativeMethodInfoPtr_Swap_Public_Static_IList_1_T_IList_1_T_Int32_Int32_0;

		// Token: 0x04006127 RID: 24871
		private static readonly IntPtr NativeMethodInfoPtr_AddRange_Public_Static_Void_byref_Il2CppArrayBase_1_T_Il2CppArrayBase_1_T_0;

		// Token: 0x04006128 RID: 24872
		private static readonly IntPtr NativeMethodInfoPtr_RemoveRange_Public_Static_Void_byref_Il2CppArrayBase_1_T_Int32_Int32_0;

		// Token: 0x04006129 RID: 24873
		private static readonly IntPtr NativeMethodInfoPtr_Transform_Public_Static_Bounds_Bounds_Matrix4x4_0;

		// Token: 0x0400612A RID: 24874
		private static readonly IntPtr NativeMethodInfoPtr_Remap_Public_Static_Single_Single_Single_Single_Single_Single_0;

		// Token: 0x0400612B RID: 24875
		private static readonly IntPtr NativeMethodInfoPtr_Mod_Public_Static_Single_Single_Single_0;

		// Token: 0x0400612C RID: 24876
		private static readonly IntPtr NativeMethodInfoPtr_TriangleArea_Public_Static_Single_Vector3_Vector3_Vector3_0;

		// Token: 0x020004FF RID: 1279
		private sealed class MethodInfoStoreGeneric_ArrayFill_Public_Static_Void_Il2CppArrayBase_1_T_Il2CppArrayBase_1_T_0<T>
		{
			// Token: 0x0400612D RID: 24877
			internal static IntPtr Pointer = IL2CPP.il2cpp_method_get_from_reflection(IL2CPP.Il2CppObjectBaseToPtrNotNull(new MethodInfo(IL2CPP.il2cpp_method_get_object(ObiUtils.NativeMethodInfoPtr_ArrayFill_Public_Static_Void_Il2CppArrayBase_1_T_Il2CppArrayBase_1_T_0, Il2CppClassPointerStore<ObiUtils>.NativeClassPtr)).MakeGenericMethod(new Il2CppReferenceArray<Type>(new Type[] { Type.internal_from_handle(IL2CPP.il2cpp_class_get_type(Il2CppClassPointerStore<T>.NativeClassPtr)) }))));
		}

		// Token: 0x02000500 RID: 1280
		private sealed class MethodInfoStoreGeneric_Swap_Public_Static_IList_1_T_IList_1_T_Int32_Int32_0<T>
		{
			// Token: 0x0400612E RID: 24878
			internal static IntPtr Pointer = IL2CPP.il2cpp_method_get_from_reflection(IL2CPP.Il2CppObjectBaseToPtrNotNull(new MethodInfo(IL2CPP.il2cpp_method_get_object(ObiUtils.NativeMethodInfoPtr_Swap_Public_Static_IList_1_T_IList_1_T_Int32_Int32_0, Il2CppClassPointerStore<ObiUtils>.NativeClassPtr)).MakeGenericMethod(new Il2CppReferenceArray<Type>(new Type[] { Type.internal_from_handle(IL2CPP.il2cpp_class_get_type(Il2CppClassPointerStore<T>.NativeClassPtr)) }))));
		}

		// Token: 0x02000501 RID: 1281
		private sealed class MethodInfoStoreGeneric_AddRange_Public_Static_Void_byref_Il2CppArrayBase_1_T_Il2CppArrayBase_1_T_0<T>
		{
			// Token: 0x0400612F RID: 24879
			internal static IntPtr Pointer = IL2CPP.il2cpp_method_get_from_reflection(IL2CPP.Il2CppObjectBaseToPtrNotNull(new MethodInfo(IL2CPP.il2cpp_method_get_object(ObiUtils.NativeMethodInfoPtr_AddRange_Public_Static_Void_byref_Il2CppArrayBase_1_T_Il2CppArrayBase_1_T_0, Il2CppClassPointerStore<ObiUtils>.NativeClassPtr)).MakeGenericMethod(new Il2CppReferenceArray<Type>(new Type[] { Type.internal_from_handle(IL2CPP.il2cpp_class_get_type(Il2CppClassPointerStore<T>.NativeClassPtr)) }))));
		}

		// Token: 0x02000502 RID: 1282
		private sealed class MethodInfoStoreGeneric_RemoveRange_Public_Static_Void_byref_Il2CppArrayBase_1_T_Int32_Int32_0<T>
		{
			// Token: 0x04006130 RID: 24880
			internal static IntPtr Pointer = IL2CPP.il2cpp_method_get_from_reflection(IL2CPP.Il2CppObjectBaseToPtrNotNull(new MethodInfo(IL2CPP.il2cpp_method_get_object(ObiUtils.NativeMethodInfoPtr_RemoveRange_Public_Static_Void_byref_Il2CppArrayBase_1_T_Int32_Int32_0, Il2CppClassPointerStore<ObiUtils>.NativeClassPtr)).MakeGenericMethod(new Il2CppReferenceArray<Type>(new Type[] { Type.internal_from_handle(IL2CPP.il2cpp_class_get_type(Il2CppClassPointerStore<T>.NativeClassPtr)) }))));
		}
	}
}
