namespace TMPro.Examples
{

	// [TypeInfo RVA: 0x0]
	public class TMP_UiFrameRateCounter : MonoBehaviour
	{
		public float UpdateInterval; // 0x20
		private float m_LastInterval; // 0x24
		private int m_Frames; // 0x28
		public TMPro.Examples.TMP_UiFrameRateCounter.FpsCounterAnchorPositions AnchorPosition; // 0x2C
		private string htmlColorTag; // 0x30
		private const string fpsLabel; // 0x0
		private TMPro.TextMeshProUGUI m_TextMeshPro; // 0x38
		private UnityEngine.RectTransform m_frameCounter_transform; // 0x40
		private TMPro.Examples.TMP_UiFrameRateCounter.FpsCounterAnchorPositions last_AnchorPosition; // 0x48

		// RVA: 0x3271E44 VA: 0x781895CE44
		private void Awake();
		/*
		 *   undefined *puVar1;
		 *   undefined *puVar2;
		 *   bool bVar3;
		 *   void *pvVar4;
		 *   void *pvVar5;
		 *   undefined8 uVar6;
		 *   void **ppvVar7;
		 *   void *this_00;
		 *   long *plVar8;
		 *
		 *   if ((bRam000000000754ac0f & 1) == 0) {
		 *     func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Application_6FC0EA8);
		 *     func_0x031fdc8c(PTR_DAT_070c55d8);
		 *     func_0x031fdc8c(PTR_DAT_070c52a0);
		 *     func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_GameObject_6FC1548);
		 *     func_0x031fdc8c(PTR_DAT_070c50c0);
		 *     func_0x031fdc8c(PTR_DAT_070c5438);
		 *     func_0x031fdc8c(PTR_DAT_070c5448);
		 *     func_0x031fdc8c(PTR_DAT_070c5450);
		 *     func_0x031fdc8c(PTR_DAT_070c5458);
		 *     bRam000000000754ac0f = 1;
		 *   }
		 *   bVar3 = UnityEngine.InputSystem.OnScreen.OnScreenStick.Behaviour.get_enabled(this);
		 *   puVar2 = PTR_DAT_070c5450;
		 *   puVar1 = typeinfo_ptr_UnityEngine_CoreModule_GameObject_6FC1548;
		 *   if (!bVar3) {
		 *     return;
		 *   }
		 *   if (*(int *)(*(long *)typeinfo_ptr_UnityEngine_CoreModule_Application_6FC0EA8 + 0xe4) == 0) {
		 *     func_0x031fde08();
		 *   }
		 *   UnityEngine.Application.set_targetFrameRate(1000);
		 *   pvVar4 = (void *)func_0x031fdf24(*(undefined8 *)puVar1);
		 *   UnityEngine.GameObject..ctor(pvVar4,*(void **)puVar2);
		 *   if (pvVar4 != null) {
		 *     pvVar5 = (void *)func_0x037f2fa8(pvVar4,*(undefined8 *)PTR_DAT_070c55d8);
		 *     ppvVar7 = &this.m_frameCounter_transform;
		 *     *ppvVar7 = pvVar5;
		 *     func_0x031fdc38(ppvVar7,pvVar5);
		 *     this_00 = *ppvVar7;
		 *     pvVar5 = UnityEngine.Component.get_transform(this);
		 *     if (this_00 != null) {
		 *       UnityEngine.Transform.SetParent(this_00,pvVar5,false);
		 *       pvVar4 = (void *)func_0x037f2fa8(pvVar4,*(undefined8 *)PTR_DAT_070c52a0);
		 *       ppvVar7 = &this.m_TextMeshPro;
		 *       *ppvVar7 = pvVar4;
		 *       func_0x031fdc38(ppvVar7,pvVar4);
		 *       pvVar5 = *ppvVar7;
		 *       pvVar4 = (void *)func_0x03949758(*(undefined8 *)PTR_DAT_070c5458,
		 *                                        *(undefined8 *)PTR_DAT_070c5438);
		 *       if (pvVar5 != null) {
		 *         TMPro.TMP_Text.set_font(pvVar5,pvVar4);
		 *         plVar8 = *ppvVar7;
		 *         uVar6 = func_0x03949758(*(undefined8 *)PTR_DAT_070c5448,*(undefined8 *)PTR_DAT_070c50c0);
		 *         if (plVar8 != null) {
		 *           (**(code **)(*plVar8 + 0x578))(plVar8,uVar6,*(undefined8 *)(*plVar8 + 0x580));
		 *           if (*ppvVar7 != null) {
		 *             TMPro.TMP_Text.set_textWrappingMode(*ppvVar7,0);
		 *             if (*ppvVar7 != null) {
		 *               TMPro.TMP_Text.set_fontSize(*ppvVar7,36.0);
		 *               if (*ppvVar7 != null) {
		 *                 TMPro.TMP_Text.set_isOverlay(*ppvVar7,true);
		 *                 TMP_UiFrameRateCounter.Set_FrameCounter_Position(this,*(undefined4 *)&this.field_0x2c);
		 *                 *(undefined4 *)&this.last_AnchorPosition = *(undefined4 *)&this.field_0x2c;
		 *                 return;
		 *               }
		 *             }
		 *           }
		 *         }
		 *       }
		 *     }
		 *   }
		 *   IL2CPP.ThrowNullReferenceException();
		 */
		// RVA: 0x32722B4 VA: 0x781895D2B4
		private void Start();
		/*
		 *   float fVar1;
		 *
		 *   fVar1 = UnityEngine.Time.get_realtimeSinceStartup();
		 *   this.m_Frames = 0;
		 *   this.m_LastInterval = fVar1;
		 *   return;
		 */
		// RVA: 0x32722D4 VA: 0x781895D2D4
		private void Update();
		/*
		 *   undefined8 *puVar1;
		 *   undefined8 *puVar2;
		 *   void *this_00;
		 *   undefined *puVar3;
		 *   void *sourceText;
		 *   int iVar4;
		 *   void **ppvVar5;
		 *   float fVar6;
		 *   float arg0;
		 *
		 *   if ((bRam000000000754ac10 & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c5480);
		 *     func_0x031fdc8c(PTR_DAT_070c5488);
		 *     func_0x031fdc8c(PTR_DAT_070c5490);
		 *     func_0x031fdc8c(PTR_DAT_070c5498);
		 *     bRam000000000754ac10 = 1;
		 *   }
		 *   iVar4 = *(int *)&this.field_0x2c;
		 *   if (iVar4 != *(int *)&this.last_AnchorPosition) {
		 *     TMP_UiFrameRateCounter.Set_FrameCounter_Position(this);
		 *     iVar4 = *(int *)&this.field_0x2c;
		 *   }
		 *   *(int *)&this.last_AnchorPosition = iVar4;
		 *   this.m_Frames = this.m_Frames + 1;
		 *   fVar6 = UnityEngine.Time.get_realtimeSinceStartup();
		 *   puVar3 = PTR_DAT_070c5498;
		 *   if (this.m_LastInterval + this.UpdateInterval < fVar6) {
		 *     arg0 = (float)this.m_Frames / (fVar6 - this.m_LastInterval);
		 *     puVar1 = (undefined8 *)PTR_DAT_070c5488;
		 *     if (10.0 <= arg0) {
		 *       puVar1 = (undefined8 *)PTR_DAT_070c5480;
		 *     }
		 *     puVar2 = (undefined8 *)PTR_DAT_070c5490;
		 *     if (30.0 <= arg0) {
		 *       puVar2 = puVar1;
		 *     }
		 *     ppvVar5 = &this.htmlColorTag;
		 *     *ppvVar5 = (void *)*puVar2;
		 *     func_0x031fdc38(ppvVar5);
		 *     this_00 = this.m_TextMeshPro;
		 *     sourceText = System.String.Concat(*ppvVar5,*(void **)puVar3);
		 *     if (this_00 == null) {
		 *       IL2CPP.ThrowNullReferenceException();
		 *     }
		 *     TMPro.TMP_Text.SetText(this_00,sourceText,arg0,1000.0 / arg0);
		 *     this.m_Frames = 0;
		 *     this.m_LastInterval = fVar6;
		 *   }
		 *   return;
		 */
		// RVA: 0x327207C VA: 0x781895D07C
		private void Set_FrameCounter_Position(TMPro.Examples.TMP_UiFrameRateCounter.FpsCounterAnchorPositions anchor_position);
		/*
		 *   float fVar1;
		 *   float fVar2;
		 *   void *obj;
		 *   long lVar3;
		 *   UnityEngine_Vector2 value;
		 *   UnityEngine_Vector2 value_00;
		 *   UnityEngine_Vector2 value_01;
		 *   UnityEngine_Vector2 value_02;
		 *   UnityEngine_Vector2 value_03;
		 *   UnityEngine_Vector2 value_04;
		 *   UnityEngine_Vector2 value_05;
		 *   UnityEngine_Vector2 value_06;
		 *
		 *   if (param_2 < 2) {
		 *     if (param_2 == 0) {
		 *       if (*(void **)(param_1 + 0x38) == null) goto LAB_033722b0;
		 *       TMPro.TMP_Text.set_alignment(*(void **)(param_1 + 0x38),0x101);
		 *       if (*(void **)(param_1 + 0x40) == null) goto LAB_033722b0;
		 *       UnityEngine.RectTransform.set_pivot(*(void **)(param_1 + 0x40),(UnityEngine_Vector2)0x3f80000000000000);
		 *       fVar2 = _UNK_0134ee60;
		 *       fVar1 = _UNK_0134e9fc;
		 *       if (*(void **)(param_1 + 0x40) == null) goto LAB_033722b0;
		 *       value_03.y = _UNK_0134ee60;
		 *       value_03.x = _UNK_0134e9fc;
		 *       UnityEngine.RectTransform.set_anchorMin(*(void **)(param_1 + 0x40),value_03);
		 *       if (*(void **)(param_1 + 0x40) == null) goto LAB_033722b0;
		 *       value_04.y = fVar2;
		 *       value_04.x = fVar1;
		 *       UnityEngine.RectTransform.set_anchorMax(*(void **)(param_1 + 0x40),value_04);
		 *       obj = *(void **)(param_1 + 0x40);
		 *     }
		 *     else {
		 *       if (param_2 != 1) {
		 *         return;
		 *       }
		 *       if (*(void **)(param_1 + 0x38) == null) goto LAB_033722b0;
		 *       TMPro.TMP_Text.set_alignment(*(void **)(param_1 + 0x38),0x401);
		 *       if (*(void **)(param_1 + 0x40) == null) goto LAB_033722b0;
		 *       UnityEngine.RectTransform.set_pivot(*(void **)(param_1 + 0x40),(UnityEngine_Vector2)0x0);
		 *       fVar1 = _UNK_0134e9fc;
		 *       if (*(void **)(param_1 + 0x40) == null) goto LAB_033722b0;
		 *       value.y = _UNK_0134e9fc;
		 *       value.x = _UNK_0134e9fc;
		 *       UnityEngine.RectTransform.set_anchorMin(*(void **)(param_1 + 0x40),value);
		 *       if (*(void **)(param_1 + 0x40) == null) goto LAB_033722b0;
		 *       value_00.y = fVar1;
		 *       value_00.x = fVar1;
		 *       UnityEngine.RectTransform.set_anchorMax(*(void **)(param_1 + 0x40),value_00);
		 *       obj = *(void **)(param_1 + 0x40);
		 *     }
		 *   }
		 *   else if (param_2 == 2) {
		 *     if (*(void **)(param_1 + 0x38) == null) goto LAB_033722b0;
		 *     TMPro.TMP_Text.set_alignment(*(void **)(param_1 + 0x38),0x104)
		 *     ;
		 *     if (*(void **)(param_1 + 0x40) == null) goto LAB_033722b0;
		 *     UnityEngine.RectTransform.set_pivot(*(void **)(param_1 + 0x40),(UnityEngine_Vector2)0x3f8000003f800000);
		 *     fVar1 = _UNK_0134ee60;
		 *     if (*(void **)(param_1 + 0x40) == null) goto LAB_033722b0;
		 *     value_05.y = _UNK_0134ee60;
		 *     value_05.x = _UNK_0134ee60;
		 *     UnityEngine.RectTransform.set_anchorMin(*(void **)(param_1 + 0x40),value_05);
		 *     if (*(void **)(param_1 + 0x40) == null) goto LAB_033722b0;
		 *     value_06.y = fVar1;
		 *     value_06.x = fVar1;
		 *     UnityEngine.RectTransform.set_anchorMax(*(void **)(param_1 + 0x40),value_06);
		 *     obj = *(void **)(param_1 + 0x40);
		 *   }
		 *   else {
		 *     if (param_2 != 3) {
		 *       return;
		 *     }
		 *     if (*(void **)(param_1 + 0x38) == null) goto LAB_033722b0;
		 *     TMPro.TMP_Text.set_alignment(*(void **)(param_1 + 0x38),0x404)
		 *     ;
		 *     if (*(void **)(param_1 + 0x40) == null) goto LAB_033722b0;
		 *     UnityEngine.RectTransform.set_pivot(*(void **)(param_1 + 0x40),(UnityEngine_Vector2)0x3f800000);
		 *     fVar2 = _UNK_0134ee60;
		 *     fVar1 = _UNK_0134e9fc;
		 *     if (*(void **)(param_1 + 0x40) == null) goto LAB_033722b0;
		 *     value_01.y = _UNK_0134e9fc;
		 *     value_01.x = _UNK_0134ee60;
		 *     UnityEngine.RectTransform.set_anchorMin(*(void **)(param_1 + 0x40),value_01);
		 *     if (*(void **)(param_1 + 0x40) == null) goto LAB_033722b0;
		 *     value_02.y = fVar1;
		 *     value_02.x = fVar2;
		 *     UnityEngine.RectTransform.set_anchorMax(*(void **)(param_1 + 0x40),value_02);
		 *     obj = *(void **)(param_1 + 0x40);
		 *   }
		 *   if (obj != null) {
		 *     if ((bRam000000000755fea8 & 1) == 0) {
		 *       func_0x031fdc8c(PTR_DAT_0714f860,0);
		 *       bRam000000000755fea8 = 1;
		 *     }
		 *     if (obj == null) {
		 *       IL2CPP.ThrowNullReferenceException();
		 *     }
		 *     lVar3 = *(long *)((long)obj + 0x10);
		 *     if (lVar3 == 0) {
		 *       UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException(obj);
		 *     }
		 *     if (pcRam000000000755fee8 == null) {
		 *       pcRam000000000755fee8 = (code *)func_0x031fdc50(&UNK_0137551e);
		 *     }
		 *     (*pcRam000000000755fee8)(lVar3,&stack0xffffffffffffffe8);
		 *     return;
		 *   }
		 * LAB_033722b0:
		 *   IL2CPP.ThrowNullReferenceException();
		 */
		// RVA: 0x3272430 VA: 0x781895D430
		public void .ctor();
		/*
		 *   undefined *puVar1;
		 *
		 *   this.UpdateInterval = 5.0;
		 *   *(undefined4 *)&this.field_0x2c = 2;
		 *   puVar1 = typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8;
		 *   if ((bRam000000000755f76f & 1) == 0) {
		 *     func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8,0);
		 *     bRam000000000755f76f = 1;
		 *   }
		 *   if (*(int *)(*(long *)puVar1 + 0xe4) == 0) {
		 *     func_0x031fde08();
		 *   }
		 *   return;
		 */
	}
}
