namespace ExitGames.Demos.DemoPunVoice
{

	// [TypeInfo RVA: 0x0]
	public class Highlighter : MonoBehaviour
	{
		private UnityEngine.Canvas canvas; // 0x20
		private Photon.Voice.PUN.PhotonVoiceView photonVoiceView; // 0x28
		private UnityEngine.UI.Image recorderSprite; // 0x30
		private UnityEngine.UI.Image speakerSprite; // 0x38
		private UnityEngine.UI.Text bufferLagText; // 0x40
		private bool showSpeakerLag; // 0x48

		// RVA: 0x328231C VA: 0x781896D31C
		private void OnEnable();
		/*
		 *   undefined *puVar1;
		 *   undefined *puVar2;
		 *   undefined *puVar3;
		 *   undefined *puVar4;
		 *   bool bVar5;
		 *   void *pvVar6;
		 *   long *plVar7;
		 *   void *pvVar8;
		 *   void *extraout_x1;
		 *   void *pvVar9;
		 *
		 *   puVar4 = PTR_DAT_070c5998;
		 *   puVar3 = PTR_DAT_070c5990;
		 *   puVar2 = PTR_DAT_070c5988;
		 *   puVar1 = PTR_DAT_070c58d0;
		 *   if ((bRam000000000754acac & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c5988);
		 *     func_0x031fdc8c(PTR_DAT_070c5998);
		 *     func_0x031fdc8c(PTR_DAT_070c58d0);
		 *     func_0x031fdc8c(PTR_DAT_070c5990);
		 *     bRam000000000754acac = 1;
		 *     methodInfo = extraout_x1;
		 *   }
		 *   pvVar6 = (void *)func_0x031fdf24(*(undefined8 *)puVar1,methodInfo);
		 *   pvVar9 = null;
		 *   OnCameraChanged..ctor(pvVar6,this,*(void **)puVar2);
		 *   ChangePOV.add_CameraChanged(pvVar6);
		 *   pvVar6 = (void *)func_0x031fdf24(*(undefined8 *)puVar3);
		 *   OnDebugToggle..ctor(pvVar6,this,*(void **)puVar4);
		 *   puVar1 = PTR_DAT_070c59a0;
		 *   if ((bRam000000000754acb3 & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c5990);
		 *     func_0x031fdc8c(PTR_DAT_070c59a0);
		 *     bRam000000000754acb3 = 1;
		 *   }
		 *   puVar2 = PTR_DAT_070c5990;
		 *   pvVar9 = (void *)**(undefined8 **)(*(long *)puVar1 + 0xb8);
		 *   while ((plVar7 = System.Delegate.Combine(pvVar9,pvVar6),
		 *          plVar7 == null || (*plVar7 == *(long *)puVar2))) {
		 *     pvVar8 = (void *)func_0x03236d84(*(undefined8 *)(*(long *)puVar1 + 0xb8),plVar7,pvVar9);
		 *     bVar5 = pvVar8 == pvVar9;
		 *     pvVar9 = pvVar8;
		 *     if (bVar5) {
		 *       return;
		 *     }
		 *   }
		 *   noreturn_helper_30fe2b4(plVar7);
		 */
		// RVA: 0x3282544 VA: 0x781896D544
		private void OnDisable();
		/*
		 *   undefined *puVar1;
		 *   undefined *puVar2;
		 *   undefined *puVar3;
		 *   undefined *puVar4;
		 *   bool bVar5;
		 *   void *pvVar6;
		 *   long *plVar7;
		 *   void *pvVar8;
		 *   void *extraout_x1;
		 *   void *pvVar9;
		 *
		 *   puVar4 = PTR_DAT_070c5998;
		 *   puVar3 = PTR_DAT_070c5990;
		 *   puVar2 = PTR_DAT_070c5988;
		 *   puVar1 = PTR_DAT_070c58d0;
		 *   if ((bRam000000000754acad & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c5988);
		 *     func_0x031fdc8c(PTR_DAT_070c5998);
		 *     func_0x031fdc8c(PTR_DAT_070c58d0);
		 *     func_0x031fdc8c(PTR_DAT_070c5990);
		 *     bRam000000000754acad = 1;
		 *     methodInfo = extraout_x1;
		 *   }
		 *   pvVar6 = (void *)func_0x031fdf24(*(undefined8 *)puVar1,methodInfo);
		 *   pvVar9 = null;
		 *   OnCameraChanged..ctor(pvVar6,this,*(void **)puVar2);
		 *   ChangePOV.remove_CameraChanged(pvVar6);
		 *   pvVar6 = (void *)func_0x031fdf24(*(undefined8 *)puVar3);
		 *   OnDebugToggle..ctor(pvVar6,this,*(void **)puVar4);
		 *   puVar1 = PTR_DAT_070c59a0;
		 *   if ((bRam000000000754acb4 & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c5990);
		 *     func_0x031fdc8c(PTR_DAT_070c59a0);
		 *     bRam000000000754acb4 = 1;
		 *   }
		 *   puVar2 = PTR_DAT_070c5990;
		 *   pvVar9 = (void *)**(undefined8 **)(*(long *)puVar1 + 0xb8);
		 *   while ((plVar7 = System.Delegate.Remove(pvVar9,pvVar6),
		 *          plVar7 == null || (*plVar7 == *(long *)puVar2))) {
		 *     pvVar8 = (void *)func_0x03236d84(*(undefined8 *)(*(long *)puVar1 + 0xb8),plVar7,pvVar9);
		 *     bVar5 = pvVar8 == pvVar9;
		 *     pvVar9 = pvVar8;
		 *     if (bVar5) {
		 *       return;
		 *     }
		 *   }
		 *   noreturn_helper_30fe2b4(plVar7);
		 */
		// RVA: 0x32826CC VA: 0x781896D6CC
		private void VoiceDemoUI_DebugToggled(bool debugMode);
		/*
		 *   this.showSpeakerLag = debugMode;
		 *   return;
		 */
		// RVA: 0x32826D4 VA: 0x781896D6D4
		private void ChangePOV_CameraChanged(UnityEngine.Camera camera);
		/*
		 *   undefined *puVar1;
		 *   void *obj;
		 *   long lVar2;
		 *   undefined8 uVar3;
		 *
		 *   obj = this.canvas;
		 *   if (obj == null) {
		 *     IL2CPP.ThrowNullReferenceException();
		 *   }
		 *   if ((bRam0000000007563e61 & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_07161e58,camera,0);
		 *     func_0x031fdc8c(PTR_DAT_0714e4b8);
		 *     bRam0000000007563e61 = 1;
		 *   }
		 *   puVar1 = PTR_DAT_0714e4b8;
		 *   if (obj != null) {
		 *     lVar2 = *(long *)((long)obj + 0x10);
		 *     if (lVar2 == 0) {
		 *       UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException(obj);
		 *     }
		 *     if (*(long *)(*(long *)puVar1 + 0x38) == 0) {
		 *       func_0x03237280();
		 *     }
		 *     uVar3 = 0;
		 *     if (camera != null) {
		 *       uVar3 = *(undefined8 *)((long)camera + 0x10);
		 *     }
		 *     if (pcRam0000000007563f58 == null) {
		 *       pcRam0000000007563f58 = (code *)func_0x031fdc50(&UNK_0135ef95);
		 *     }
		 *     (*pcRam0000000007563f58)(lVar2,uVar3);
		 *     return;
		 *   }
		 *   IL2CPP.ThrowNullReferenceException();
		 */
		// RVA: 0x32826EC VA: 0x781896D6EC
		private void Awake();
		/*
		 *   undefined *puVar1;
		 *   void *pvVar2;
		 *   void **ppvVar3;
		 *
		 *   puVar1 = PTR_DAT_070c59a8;
		 *   if ((bRam000000000754acae & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c5840);
		 *     func_0x031fdc8c(PTR_DAT_070c59a8);
		 *     func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8);
		 *     bRam000000000754acae = 1;
		 *   }
		 *   pvVar2 = (void *)func_0x0373df50(this,*(undefined8 *)puVar1);
		 *   ppvVar3 = &this.canvas;
		 *   *ppvVar3 = pvVar2;
		 *   if (iRam00000000077785f0 != 0) {
		 *     func_0x032ed0c0(1L << ((ulong)ppvVar3 >> 0xc & 0x3f),
		 *                     ((ulong)ppvVar3 >> 0x12 & 0x7fff) * 8 + 0x75ac5c8);
		 *   }
		 *   return;
		 */
		// RVA: 0x328281C VA: 0x781896D81C
		private void Update();
		/*
		 *   bool bVar1;
		 *   long *plVar2;
		 *   void *pvVar3;
		 *   int iStack_14;
		 *
		 *   if ((bRam000000000754acaf & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c59b0);
		 *     bRam000000000754acaf = 1;
		 *   }
		 *   if (this.photonVoiceView != null) {
		 *     pvVar3 = this.recorderSprite;
		 *     bVar1 = Photon.Voice.PUN.PhotonVoiceView.get_IsRecording(this.photonVoiceView);
		 *     if (pvVar3 != null) {
		 *       UnityEngine.InputSystem.OnScreen.OnScreenStick.Behaviour.set_enabled(pvVar3,bVar1);
		 *       if (this.photonVoiceView != null) {
		 *         pvVar3 = this.speakerSprite;
		 *         bVar1 = Photon.Voice.PUN.PhotonVoiceView.get_IsSpeaking(this.photonVoiceView);
		 *         if (pvVar3 != null) {
		 *           UnityEngine.InputSystem.OnScreen.OnScreenStick.Behaviour.set_enabled(pvVar3,bVar1);
		 *           pvVar3 = this.bufferLagText;
		 *           if (this.showSpeakerLag == false) {
		 *             bVar1 = false;
		 *           }
		 *           else {
		 *             if (this.photonVoiceView == null) goto LAB_03382964;
		 *             bVar1 = Photon.Voice.PUN.PhotonVoiceView.get_IsSpeaking(this.photonVoiceView);
		 *           }
		 *           if (pvVar3 != null) {
		 *             UnityEngine.InputSystem.OnScreen.OnScreenStick.Behaviour.set_enabled(pvVar3,bVar1);
		 *             if (this.bufferLagText != null) {
		 *               bVar1 = UnityEngine.InputSystem.OnScreen.OnScreenStick.Behaviour.get_enabled(this.bufferLagText);
		 *               if (!bVar1) {
		 *                 return;
		 *               }
		 *               if ((this.photonVoiceView != null) &&
		 *                  (pvVar3 = *(void **)((long)this.photonVoiceView + 0x40), pvVar3 != null)) {
		 *                 plVar2 = this.bufferLagText;
		 *                 iStack_14 = Photon.Voice.Unity.Speaker.get_Lag(pvVar3);
		 *                 pvVar3 = (void *)func_0x031fde10(*(undefined8 *)(PTR_DAT_070c0840 + 0x48),&iStack_14
		 *                                                 );
		 *                 pvVar3 = System.String.Format(*(void **)PTR_DAT_070c59b0,pvVar3);
		 *                 if (plVar2 != null) {
		 *                   (**(code **)(*plVar2 + 0x5e8))(plVar2,pvVar3,*(undefined8 *)(*plVar2 + 0x5f0));
		 *                   return;
		 *                 }
		 *               }
		 *             }
		 *           }
		 *         }
		 *       }
		 *     }
		 *   }
		 * LAB_03382964:
		 *   IL2CPP.ThrowNullReferenceException();
		 */
		// RVA: 0x3282968 VA: 0x781896D968
		private void LateUpdate();
		/*
		 *   undefined1 auVar1 [12];
		 *   undefined *puVar2;
		 *   long lVar3;
		 *   ulong uVar4;
		 *   void *pvVar5;
		 *   void *extraout_x1;
		 *   void *pvVar6;
		 *   UnityEngine_Vector3 UVar7;
		 *   UnityEngine_Vector4 UVar8;
		 *   float fStack_30;
		 *   float fStack_2c;
		 *   float fStack_28;
		 *   float fStack_24;
		 *
		 *   puVar2 = typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8;
		 *   if ((bRam000000000754acb0 & 1) == 0) {
		 *     func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8);
		 *     bRam000000000754acb0 = 1;
		 *     methodInfo = extraout_x1;
		 *   }
		 *   lVar3 = *(long *)puVar2;
		 *   pvVar6 = this.canvas;
		 *   if (*(int *)(lVar3 + 0xe4) == 0) {
		 *     func_0x031fde08(lVar3,methodInfo);
		 *   }
		 *   uVar4 = UnityEngine.Object.op_Equality(pvVar6,null);
		 *   if ((uVar4 & 1) != 0) {
		 *     return;
		 *   }
		 *   if (this.canvas != null) {
		 *     pvVar6 = UnityEngine.Canvas.get_worldCamera(this.canvas);
		 *     lVar3 = *(long *)puVar2;
		 *     if (*(int *)(lVar3 + 0xe4) == 0) {
		 *       func_0x031fde08(lVar3);
		 *     }
		 *     uVar4 = UnityEngine.Object.op_Equality(pvVar6,null);
		 *     if ((uVar4 & 1) != 0) {
		 *       return;
		 *     }
		 *     pvVar6 = UnityEngine.Component.get_transform(this);
		 *     if (((this.canvas != null) &&
		 *         (pvVar5 = UnityEngine.Canvas.get_worldCamera(this.canvas),
		 *         pvVar5 != null)) &&
		 *        (pvVar5 = UnityEngine.Component.get_transform(pvVar5),
		 *        pvVar5 != null)) {
		 *       UVar7 = UnityEngine.Transform.get_eulerAngles(pvVar5);
		 *       auVar1._4_8_ = 0;
		 *       auVar1._0_4_ = UVar7.y * _UNK_0134ef54;
		 *       UVar8 = UnityEngine.Quaternion.Internal_FromEulerRad((UnityEngine_Vector3)(auVar1 << 0x20));
		 *       fStack_24 = UVar8.w;
		 *       fStack_28 = UVar8.z;
		 *       fStack_2c = UVar8.y;
		 *       fStack_30 = UVar8.x;
		 *       if (pvVar6 != null) {
		 *         if ((bRam000000000755ff1d & 1) == 0) {
		 *           func_0x031fdc8c(PTR_DAT_0714f6d0,0);
		 *           bRam000000000755ff1d = 1;
		 *         }
		 *         if (pvVar6 == null) {
		 *           IL2CPP.ThrowNullReferenceException();
		 *         }
		 *         lVar3 = *(long *)((long)pvVar6 + 0x10);
		 *         if (lVar3 == 0) {
		 *           UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException(pvVar6);
		 *         }
		 *         if (pcRam000000000755ff70 == null) {
		 *           pcRam000000000755ff70 = (code *)func_0x031fdc50(&UNK_013598d0);
		 *         }
		 *         (*pcRam000000000755ff70)(lVar3,&fStack_30);
		 *         return;
		 *       }
		 *     }
		 *   }
		 *   IL2CPP.ThrowNullReferenceException();
		 */
		// RVA: 0x3282A80 VA: 0x781896DA80
		public void .ctor();
		/*
		 *   undefined *puVar1;
		 *
		 *   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;
		 */
	}
}
