using System;
using Il2CppInterop.Common.Attributes;
using Il2CppInterop.Runtime;
using Il2CppSystem;

namespace MTAssets.UltimateLODSystem.MeshSimplifier.Internal
{
	// Token: 0x02000630 RID: 1584
	public class BorderVertexComparer : Object
	{
		// Token: 0x0600A1B2 RID: 41394 RVA: 0x00298840 File Offset: 0x00296A40
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 626376, XrefRangeEnd = 626377, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe virtual int Compare(BorderVertex x, BorderVertex y)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref x;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref y;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(BorderVertexComparer.NativeMethodInfoPtr_Compare_Public_Virtual_Final_New_Int32_BorderVertex_BorderVertex_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x0600A1B3 RID: 41395 RVA: 0x002988B8 File Offset: 0x00296AB8
		[CallerCount(1642)]
		[CachedScanResults(RefRangeStart = 7417, RefRangeEnd = 9059, XrefRangeStart = 7417, XrefRangeEnd = 9059, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe BorderVertexComparer()
			: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<BorderVertexComparer>.NativeClassPtr))
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(BorderVertexComparer.NativeMethodInfoPtr__ctor_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A1B4 RID: 41396 RVA: 0x00298904 File Offset: 0x00296B04
		// Note: this type is marked as 'beforefieldinit'.
		static BorderVertexComparer()
		{
			Il2CppClassPointerStore<BorderVertexComparer>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "MTAssets.UltimateLODSystem.MeshSimplifier.Internal", "BorderVertexComparer");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<BorderVertexComparer>.NativeClassPtr);
			BorderVertexComparer.NativeFieldInfoPtr_instance = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<BorderVertexComparer>.NativeClassPtr, "instance");
			BorderVertexComparer.NativeMethodInfoPtr_Compare_Public_Virtual_Final_New_Int32_BorderVertex_BorderVertex_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<BorderVertexComparer>.NativeClassPtr, 100675840);
			BorderVertexComparer.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<BorderVertexComparer>.NativeClassPtr, 100675841);
		}

		// Token: 0x0600A1B5 RID: 41397 RVA: 0x0000A688 File Offset: 0x00008888
		public BorderVertexComparer(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x170036C1 RID: 14017
		// (get) Token: 0x0600A1B6 RID: 41398 RVA: 0x00298970 File Offset: 0x00296B70
		// (set) Token: 0x0600A1B7 RID: 41399 RVA: 0x0029899B File Offset: 0x00296B9B
		public unsafe static BorderVertexComparer instance
		{
			get
			{
				IntPtr intPtr;
				IL2CPP.il2cpp_field_static_get_value(BorderVertexComparer.NativeFieldInfoPtr_instance, (void*)(&intPtr));
				IntPtr intPtr2 = intPtr;
				return (intPtr2 != 0) ? new BorderVertexComparer(intPtr2) : null;
			}
			set
			{
				IL2CPP.il2cpp_field_static_set_value(BorderVertexComparer.NativeFieldInfoPtr_instance, IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x04006C94 RID: 27796
		private static readonly IntPtr NativeFieldInfoPtr_instance;

		// Token: 0x04006C95 RID: 27797
		private static readonly IntPtr NativeMethodInfoPtr_Compare_Public_Virtual_Final_New_Int32_BorderVertex_BorderVertex_0;

		// Token: 0x04006C96 RID: 27798
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;
	}
}
