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

namespace MTAssets.UltimateLODSystem.MeshSimplifier.Internal
{
	// Token: 0x02000689 RID: 1673
	[StructLayout(2)]
	public struct Ref
	{
		// Token: 0x0600AA0B RID: 43531 RVA: 0x002BB6EC File Offset: 0x002B98EC
		[CallerCount(68)]
		[CachedScanResults(RefRangeStart = 32895, RefRangeEnd = 32963, XrefRangeStart = 32895, XrefRangeEnd = 32963, 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: 0x0600AA0C RID: 43532 RVA: 0x002BB744 File Offset: 0x002B9944
		// 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, 100676556);
		}

		// Token: 0x0600AA0D RID: 43533 RVA: 0x002BB7B0 File Offset: 0x002B99B0
		public Object BoxIl2CppObject()
		{
			return new Object(IL2CPP.il2cpp_value_box(Il2CppClassPointerStore<Ref>.NativeClassPtr, ref this));
		}

		// Token: 0x04007240 RID: 29248
		private static readonly IntPtr NativeFieldInfoPtr_tid;

		// Token: 0x04007241 RID: 29249
		private static readonly IntPtr NativeFieldInfoPtr_tvertex;

		// Token: 0x04007242 RID: 29250
		private static readonly IntPtr NativeMethodInfoPtr_Set_Public_Void_Int32_Int32_0;

		// Token: 0x04007243 RID: 29251
		[FieldOffset(0)]
		public int tid;

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