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

namespace MTAssets.UltimateLODSystem.MeshSimplifier.Internal
{
	// Token: 0x02000631 RID: 1585
	[StructLayout(LayoutKind.Explicit)]
	public struct Ref
	{
		// Token: 0x0600A1B8 RID: 41400 RVA: 0x002989B0 File Offset: 0x00296BB0
		[CallerCount(68)]
		[CachedScanResults(RefRangeStart = 32982, RefRangeEnd = 33050, XrefRangeStart = 32982, XrefRangeEnd = 33050, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void Set(int tid, int tvertex)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref tid;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref tvertex;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Ref.NativeMethodInfoPtr_Set_Public_Void_Int32_Int32_0, ref this, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A1B9 RID: 41401 RVA: 0x00298A08 File Offset: 0x00296C08
		// Note: this type is marked as 'beforefieldinit'.
		static Ref()
		{
			Il2CppClassPointerStore<Ref>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "MTAssets.UltimateLODSystem.MeshSimplifier.Internal", "Ref");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<Ref>.NativeClassPtr);
			Ref.NativeFieldInfoPtr_tid = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Ref>.NativeClassPtr, "tid");
			Ref.NativeFieldInfoPtr_tvertex = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Ref>.NativeClassPtr, "tvertex");
			Ref.NativeMethodInfoPtr_Set_Public_Void_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Ref>.NativeClassPtr, 100675843);
		}

		// Token: 0x0600A1BA RID: 41402 RVA: 0x00298A74 File Offset: 0x00296C74
		public Object BoxIl2CppObject()
		{
			return new Object(IL2CPP.il2cpp_value_box(Il2CppClassPointerStore<Ref>.NativeClassPtr, ref this));
		}

		// Token: 0x04006C97 RID: 27799
		private static readonly IntPtr NativeFieldInfoPtr_tid;

		// Token: 0x04006C98 RID: 27800
		private static readonly IntPtr NativeFieldInfoPtr_tvertex;

		// Token: 0x04006C99 RID: 27801
		private static readonly IntPtr NativeMethodInfoPtr_Set_Public_Void_Int32_Int32_0;

		// Token: 0x04006C9A RID: 27802
		[FieldOffset(0)]
		public int tid;

		// Token: 0x04006C9B RID: 27803
		[FieldOffset(4)]
		public int tvertex;
	}
}
