// [TypeInfo RVA: 0x0]
public class ProximityAudioScreenShake : MonoBehaviour
{
	public float maxShakeAngle; // 0x20
	public float shakeFrequency; // 0x24
	public float shakeRange; // 0x28
	public float decibelThreshold; // 0x2C
	public UnityEngine.AudioSource[] audioSources; // 0x30
	public UnityEngine.Transform shakeVisualTransform; // 0x38
	private float shakeTimer; // 0x40
	private UnityEngine.Quaternion originalLocalRotation; // 0x44
	public static System.Collections.Generic.List<ForcedShakeEmitter> activeEmitters; // 0x0
	private float audioCheckCooldown; // 0x54
	private float audioCheckTimer; // 0x58
	private float lastAudioShakeIntensity; // 0x5C
	private float shakeRangeSqr; // 0x60
	private System.Single[] audioSamples; // 0x68

	// RVA: 0x321E90C VA: 0x781890990C
	private void Start();
	/*
	 *   undefined *puVar1;
	 *   ulong uVar2;
	 *   void *pvVar3;
	 *   void *p;
	 *   void *extraout_x1;
	 *   void **ppvVar4;
	 *   void *pvVar5;
	 *   float fVar6;
	 *   UnityEngine_Vector4 UVar7;
	 *
	 *   puVar1 = typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8;
	 *   if ((bRam000000000754a8aa & 1) == 0) {
	 *     func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_GameObject_6FC1548);
	 *     func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8);
	 *     func_0x031fdc8c(PTR_DAT_070c23f0);
	 *     bRam000000000754a8aa = 1;
	 *     methodInfo = extraout_x1;
	 *   }
	 *   ppvVar4 = &this.shakeVisualTransform;
	 *   pvVar5 = *ppvVar4;
	 *   if (*(int *)(*(long *)puVar1 + 0xe4) == 0) {
	 *     func_0x031fde08(*(long *)puVar1,methodInfo);
	 *   }
	 *   uVar2 = UnityEngine.Object.op_Equality(pvVar5,null);
	 *   puVar1 = PTR_DAT_070c23f0;
	 *   if ((uVar2 & 1) != 0) {
	 *     pvVar5 = (void *)func_0x031fdf24(*(undefined8 *)
	 *                                       typeinfo_ptr_UnityEngine_CoreModule_GameObject_6FC1548);
	 *     UnityEngine.GameObject..ctor(pvVar5,*(void **)puVar1);
	 *     if (pvVar5 == null) goto LAB_0331eae4;
	 *     pvVar3 = UnityEngine.GameObject.get_transform(pvVar5);
	 *     p = UnityEngine.Component.get_transform(this);
	 *     if (pvVar3 == null) goto LAB_0331eae4;
	 *     UnityEngine.Transform.SetParent(pvVar3,p);
	 *     pvVar3 = UnityEngine.GameObject.get_transform(pvVar5);
	 *     if (cRam000000000754a7ce == '\0') {
	 *       func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Vector3_6FC0A08);
	 *       cRam000000000754a7ce = '\x01';
	 *     }
	 *     if (pvVar3 == null) goto LAB_0331eae4;
	 *     UnityEngine.Transform.set_localPosition(pvVar3,**(UnityEngine_Vector3 **)
	 *                         (*(long *)typeinfo_ptr_UnityEngine_CoreModule_Vector3_6FC0A08 + 0xb8));
	 *     pvVar3 = UnityEngine.GameObject.get_transform(pvVar5);
	 *     if (cRam000000000754a7d0 == '\0') {
	 *       func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Quaternion_6FC0EA0);
	 *       cRam000000000754a7d0 = '\x01';
	 *     }
	 *     if (pvVar3 == null) goto LAB_0331eae4;
	 *     UnityEngine.Transform.set_localRotation(pvVar3,**(UnityEngine_Vector4 **)
	 *                         (*(long *)typeinfo_ptr_UnityEngine_CoreModule_Quaternion_6FC0EA0 + 0xb8));
	 *     pvVar5 = UnityEngine.GameObject.get_transform(pvVar5);
	 *     *ppvVar4 = pvVar5;
	 *     func_0x031fdc38(ppvVar4,pvVar5);
	 *   }
	 *   if (*ppvVar4 != null) {
	 *     UVar7 = UnityEngine.Transform.get_localRotation(*ppvVar4);
	 *     fVar6 = this.shakeRange;
	 *     (this.originalLocalRotation).x = UVar7.x;
	 *     (this.originalLocalRotation).y = UVar7.y;
	 *     (this.originalLocalRotation).z = UVar7.z;
	 *     (this.originalLocalRotation).w = UVar7.w;
	 *     this.shakeRangeSqr = fVar6 * fVar6;
	 *     return;
	 *   }
	 * LAB_0331eae4:
	 *   IL2CPP.ThrowNullReferenceException();
	 */
	// RVA: 0x321EAE8 VA: 0x7818909AE8
	private void Update();
	/*
	 *   undefined1 auVar1 [12];
	 *   undefined *puVar2;
	 *   undefined *puVar3;
	 *   undefined *puVar4;
	 *   undefined *puVar5;
	 *   bool bVar6;
	 *   long lVar7;
	 *   ForcedShakeEmitter *this_00;
	 *   ulong uVar8;
	 *   void *pvVar9;
	 *   void *extraout_x1;
	 *   uint uVar10;
	 *   ulong uVar11;
	 *   ulong uVar12;
	 *   float *pfVar13;
	 *   int iVar14;
	 *   void *pvVar15;
	 *   void *pvVar16;
	 *   float fVar17;
	 *   float fVar18;
	 *   float fVar19;
	 *   float fVar20;
	 *   float fVar21;
	 *   UnityEngine_Vector3 UVar22;
	 *   UnityEngine_Vector3 UVar23;
	 *
	 *   puVar3 = PTR_DAT_070c0f48;
	 *   if ((bRam000000000754a8ab & 1) == 0) {
	 *     func_0x031fdc8c(PTR_DAT_070c23f8);
	 *     func_0x031fdc8c(PTR_DAT_070c2400);
	 *     func_0x031fdc8c(PTR_DAT_070c2408);
	 *     func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8);
	 *     func_0x031fdc8c(PTR_DAT_070c0f48);
	 *     bRam000000000754a8ab = 1;
	 *     methodInfo = extraout_x1;
	 *   }
	 *   lVar7 = *(long *)puVar3;
	 *   fVar20 = this.shakeFrequency;
	 *   if (*(int *)(lVar7 + 0xe4) == 0) {
	 *     func_0x031fde08(lVar7,methodInfo);
	 *     lVar7 = *(long *)puVar3;
	 *   }
	 *   puVar5 = PTR_DAT_070c2408;
	 *   puVar4 = PTR_DAT_070c23f8;
	 *   puVar2 = typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8;
	 *   if (**(long **)(lVar7 + 0xb8) != 0) {
	 *     iVar14 = *(int *)(**(long **)(lVar7 + 0xb8) + 0x18);
	 *     if (-1 < iVar14 + -1) {
	 *       fVar17 = 0.0;
	 *       do {
	 *         lVar7 = *(long *)puVar3;
	 *         if (*(int *)(lVar7 + 0xe4) == 0) {
	 *           func_0x031fde08();
	 *           lVar7 = *(long *)puVar3;
	 *         }
	 *         if (**(long **)(lVar7 + 0xb8) == 0) goto LAB_0331ee94;
	 *         iVar14 = iVar14 + -1;
	 *         this_00 = (ForcedShakeEmitter *)
	 *                   func_0x03f2d434(**(long **)(lVar7 + 0xb8),iVar14,*(undefined8 *)puVar5);
	 *         lVar7 = *(long *)puVar2;
	 *         if (*(int *)(lVar7 + 0xe4) == 0) {
	 *           func_0x031fde08(lVar7);
	 *         }
	 *         uVar8 = UnityEngine.Object.op_Equality(this_00,null);
	 *         if ((uVar8 & 1) == 0) {
	 *           pvVar16 = UnityEngine.Component.get_transform(this);
	 *           if ((pvVar16 == null) ||
	 *              (UVar22 = UnityEngine.Transform.get_position(pvVar16),
	 *              this_00 == null)) goto LAB_0331ee94;
	 *           fVar21 = ForcedShakeEmitter.GetCurrentShakeIntensity(this_00,UVar22);
	 *           if (fVar17 < fVar21) {
	 *             fVar20 = this_00->shakeFrequency;
	 *             fVar17 = fVar21;
	 *           }
	 *         }
	 *         else {
	 *           lVar7 = *(long *)puVar3;
	 *           if (*(int *)(lVar7 + 0xe4) == 0) {
	 *             func_0x031fde08();
	 *             lVar7 = *(long *)puVar3;
	 *           }
	 *           if (**(long **)(lVar7 + 0xb8) == 0) goto LAB_0331ee94;
	 *           func_0x03f2ee68(**(long **)(lVar7 + 0xb8),iVar14,*(undefined8 *)puVar4);
	 *         }
	 *       } while (0 < iVar14);
	 *       if (0.0 < fVar17) goto LAB_0331ee64;
	 *     }
	 *     fVar21 = this.audioCheckTimer;
	 *     fVar17 = UnityEngine.Time.get_unscaledDeltaTime();
	 *     fVar21 = fVar21 - fVar17;
	 *     this.audioCheckTimer = fVar21;
	 *     if (fVar21 <= 0.0) {
	 *       pvVar16 = this.audioSources;
	 *       this.lastAudioShakeIntensity = 0.0;
	 *       if (pvVar16 == null) goto LAB_0331ee94;
	 *       if (0 < (int)*(ulong *)((long)pvVar16 + 0x18)) {
	 *         uVar8 = 0;
	 *         uVar11 = *(ulong *)((long)pvVar16 + 0x18) & 0xffffffff;
	 *         do {
	 *           if (uVar11 <= uVar8) {
	 * LAB_0331ee98:
	 *             IL2CPP.ThrowIndexOutOfRangeException();
	 *           }
	 *           pvVar15 = *(void **)((long)pvVar16 + uVar8 * 8 + 0x20);
	 *           if (*(int *)(*(long *)puVar2 + 0xe4) == 0) {
	 *             func_0x031fde08();
	 *           }
	 *           uVar11 = UnityEngine.Object.op_Equality(pvVar15,null);
	 *           if ((uVar11 & 1) == 0) {
	 *             if (pvVar15 == null) goto LAB_0331ee94;
	 *             bVar6 = UnityEngine.AudioSource.get_isPlaying(pvVar15)
	 *             ;
	 *             if (bVar6) {
	 *               pvVar9 = UnityEngine.Component.get_transform(this);
	 *               if (pvVar9 == null) goto LAB_0331ee94;
	 *               UVar22 = UnityEngine.Transform.get_position(pvVar9);
	 *               pvVar9 = UnityEngine.Component.get_transform(pvVar15)
	 *               ;
	 *               if (pvVar9 == null) goto LAB_0331ee94;
	 *               UVar23 = UnityEngine.Transform.get_position(pvVar9);
	 *               fVar17 = UVar22.x - UVar23.x;
	 *               fVar21 = UVar22.y - UVar23.y;
	 *               fVar19 = UVar22.z - UVar23.z;
	 *               fVar17 = fVar19 * fVar19 + fVar17 * fVar17 + fVar21 * fVar21;
	 *               if (fVar17 <= this.shakeRangeSqr) {
	 *                 UnityEngine.AudioSource.GetOutputData(pvVar15,this.audioSamples,0);
	 *                 pvVar15 = this.audioSamples;
	 *                 if (pvVar15 == null) goto LAB_0331ee94;
	 *                 fVar21 = 0.0;
	 *                 uVar10 = (uint)*(ulong *)((long)pvVar15 + 0x18);
	 *                 if (0 < (int)uVar10) {
	 *                   uVar11 = (ulong)(uVar10 & ((int)uVar10 >> 0x1f ^ 0xffffffffU));
	 *                   uVar12 = *(ulong *)((long)pvVar15 + 0x18) & 0xffffffff;
	 *                   pfVar13 = (float *)((long)pvVar15 + 0x20);
	 *                   do {
	 *                     if (uVar12 == 0) goto LAB_0331ee98;
	 *                     uVar11 = uVar11 - 1;
	 *                     uVar12 = uVar12 - 1;
	 *                     fVar21 = fVar21 + *pfVar13 * *pfVar13;
	 *                     pfVar13 = pfVar13 + 1;
	 *                   } while (uVar11 != 0);
	 *                 }
	 *                 fVar21 = (float)func_0x06cb3960(SQRT(fVar21 / (float)(int)uVar10));
	 *                 fVar19 = this.decibelThreshold;
	 *                 if (fVar19 <= fVar21 * 20.0) {
	 *                   if (fVar19 == 0.0) {
	 *                     fVar21 = 0.0;
	 *                   }
	 *                   else {
	 *                     fVar18 = (fVar21 * 20.0 - fVar19) / (0.0 - fVar19);
	 *                     fVar19 = 1.0;
	 *                     if (fVar18 <= 1.0) {
	 *                       fVar19 = fVar18;
	 *                     }
	 *                     fVar21 = 0.0;
	 *                     if (0.0 <= fVar18) {
	 *                       fVar21 = fVar19;
	 *                     }
	 *                   }
	 *                   fVar17 = fVar17 / this.shakeRangeSqr;
	 *                   fVar19 = 1.0;
	 *                   if (fVar17 <= 1.0) {
	 *                     fVar19 = fVar17;
	 *                   }
	 *                   fVar18 = 1.0;
	 *                   if (0.0 <= fVar17) {
	 *                     fVar18 = 1.0 - fVar19;
	 *                   }
	 *                   if (this.lastAudioShakeIntensity < fVar21 * fVar18) {
	 *                     this.lastAudioShakeIntensity = fVar21 * fVar18;
	 *                   }
	 *                 }
	 *               }
	 *             }
	 *           }
	 *           uVar11 = (ulong)*(uint *)((long)pvVar16 + 0x18);
	 *           uVar8 = uVar8 + 1;
	 *         } while ((long)uVar8 < (long)(int)*(uint *)((long)pvVar16 + 0x18));
	 *       }
	 *       this.audioCheckTimer = this.audioCheckCooldown;
	 *     }
	 *     fVar17 = this.lastAudioShakeIntensity;
	 * LAB_0331ee64:
	 *     if (fVar17 <= 0.0) {
	 *       pvVar16 = this.shakeVisualTransform;
	 *     }
	 *     else {
	 *       fVar19 = this.shakeTimer;
	 *       fVar21 = UnityEngine.Time.get_unscaledDeltaTime();
	 *       this.shakeTimer = fVar19 + fVar21 * fVar20;
	 *       fVar20 = (float)func_0x06cb3950();
	 *       pvVar16 = this.shakeVisualTransform;
	 *       auVar1._4_8_ = 0;
	 *       auVar1._0_4_ = fVar20 * this.maxShakeAngle * fVar17 * _UNK_0134ef54;
	 *       UnityEngine.Quaternion.Internal_FromEulerRad((UnityEngine_Vector3)(auVar1 << 0x40));
	 *     }
	 *     if (pvVar16 == null) {
	 *       IL2CPP.ThrowNullReferenceException();
	 *     }
	 *     if ((bRam000000000755ff1f & 1) == 0) {
	 *       func_0x031fdc8c(PTR_DAT_0714f6d0,0);
	 *       bRam000000000755ff1f = 1;
	 *     }
	 *     if (pvVar16 != null) {
	 *       lVar7 = *(long *)((long)pvVar16 + 0x10);
	 *       if (lVar7 == 0) {
	 *         UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException(pvVar16);
	 *       }
	 *       if (pcRam000000000755ff80 == null) {
	 *         pcRam000000000755ff80 = (code *)func_0x031fdc50(&UNK_01380e4d);
	 *       }
	 *       (*pcRam000000000755ff80)(lVar7,&stack0xffffffffffffffd0);
	 *       return;
	 *     }
	 *     IL2CPP.ThrowNullReferenceException();
	 *   }
	 * LAB_0331ee94:
	 *   IL2CPP.ThrowNullReferenceException();
	 */
	// RVA: 0x321EE9C VA: 0x7818909E9C
	private void ApplyShake(float intensity, float frequency);
	/*
	 *   undefined1 auVar1 [12];
	 *   void *obj;
	 *   long lVar2;
	 *   float fVar3;
	 *   float fVar4;
	 *
	 *   if (intensity <= 0.0) {
	 *     obj = this.shakeVisualTransform;
	 *   }
	 *   else {
	 *     fVar4 = this.shakeTimer;
	 *     fVar3 = UnityEngine.Time.get_unscaledDeltaTime();
	 *     this.shakeTimer = fVar4 + fVar3 * frequency;
	 *     fVar3 = (float)func_0x06cb3950();
	 *     obj = this.shakeVisualTransform;
	 *     auVar1._4_8_ = 0;
	 *     auVar1._0_4_ = fVar3 * this.maxShakeAngle * intensity * _UNK_0134ef54;
	 *     UnityEngine.Quaternion.Internal_FromEulerRad((UnityEngine_Vector3)(auVar1 << 0x40));
	 *   }
	 *   if (obj == null) {
	 *     IL2CPP.ThrowNullReferenceException();
	 *   }
	 *   if ((bRam000000000755ff1f & 1) == 0) {
	 *     func_0x031fdc8c(PTR_DAT_0714f6d0,0);
	 *     bRam000000000755ff1f = 1;
	 *   }
	 *   if (obj != null) {
	 *     lVar2 = *(long *)((long)obj + 0x10);
	 *     if (lVar2 == 0) {
	 *       UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException(obj);
	 *     }
	 *     if (pcRam000000000755ff80 == null) {
	 *       pcRam000000000755ff80 = (code *)func_0x031fdc50(&UNK_01380e4d);
	 *     }
	 *     (*pcRam000000000755ff80)(lVar2,&stack0xffffffffffffffd0);
	 *     return;
	 *   }
	 *   IL2CPP.ThrowNullReferenceException();
	 */
	// RVA: 0x321EFB8 VA: 0x7818909FB8
	private void OnDisable();
	/*
	 *   undefined *puVar1;
	 *   ulong uVar2;
	 *   void *extraout_x1;
	 *   long lVar3;
	 *   void *pvVar4;
	 *   float fStack_30;
	 *   float fStack_2c;
	 *   float fStack_28;
	 *   float fStack_24;
	 *
	 *   puVar1 = typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8;
	 *   if ((bRam000000000754a8ac & 1) == 0) {
	 *     func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8);
	 *     bRam000000000754a8ac = 1;
	 *     methodInfo = extraout_x1;
	 *   }
	 *   pvVar4 = this.shakeVisualTransform;
	 *   if (*(int *)(*(long *)puVar1 + 0xe4) == 0) {
	 *     func_0x031fde08(*(long *)puVar1,methodInfo);
	 *   }
	 *   uVar2 = UnityEngine.Object.op_Inequality(pvVar4,null);
	 *   if ((uVar2 & 1) == 0) {
	 *     return;
	 *   }
	 *   pvVar4 = this.shakeVisualTransform;
	 *   if (pvVar4 == null) {
	 *     IL2CPP.ThrowNullReferenceException();
	 *   }
	 *   fStack_30 = (this.originalLocalRotation).x;
	 *   fStack_2c = (this.originalLocalRotation).y;
	 *   fStack_28 = (this.originalLocalRotation).z;
	 *   fStack_24 = (this.originalLocalRotation).w;
	 *   if ((bRam000000000755ff1f & 1) == 0) {
	 *     func_0x031fdc8c(PTR_DAT_0714f6d0,0);
	 *     bRam000000000755ff1f = 1;
	 *   }
	 *   if (pvVar4 != null) {
	 *     lVar3 = *(long *)((long)pvVar4 + 0x10);
	 *     if (lVar3 == 0) {
	 *       UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException(pvVar4);
	 *     }
	 *     if (pcRam000000000755ff80 == null) {
	 *       pcRam000000000755ff80 = (code *)func_0x031fdc50(&UNK_01380e4d);
	 *     }
	 *     (*pcRam000000000755ff80)(lVar3,&fStack_30);
	 *     return;
	 *   }
	 *   IL2CPP.ThrowNullReferenceException();
	 */
	// RVA: 0x321F044 VA: 0x781890A044
	public void .ctor();
	/*
	 *   undefined8 uVar1;
	 *   undefined4 uVar2;
	 *   undefined *puVar3;
	 *   undefined8 uVar4;
	 *   undefined8 uVar5;
	 *   void *pvVar6;
	 *
	 *   puVar3 = PTR_DAT_070c0f68;
	 *   if ((bRam000000000754a8ad & 1) == 0) {
	 *     func_0x031fdc8c(PTR_DAT_070c0f68);
	 *     bRam000000000754a8ad = 1;
	 *   }
	 *   uVar1 = _UNK_0134c4c0;
	 *   uVar5 = *(undefined8 *)puVar3;
	 *   uVar2 = _UNK_0134c4cc;
	 *   this.shakeRange = (float)_UNK_0134c4c8;
	 *   uVar4 = _UNK_0134c4c0;
	 *   this.decibelThreshold = (float)uVar2;
	 *   _UNK_0134c4c0 = (undefined4)uVar1;
	 *   _UNK_0134c4c4 = SUB84(uVar1,4);
	 *   uVar2 = _UNK_0134c4c4;
	 *   this.maxShakeAngle = (float)_UNK_0134c4c0;
	 *   _UNK_0134c4c0 = uVar4;
	 *   this.shakeFrequency = (float)uVar2;
	 *   this.audioCheckCooldown = 0.1;
	 *   pvVar6 = (void *)func_0x031fdd78(uVar5,0x100);
	 *   this.audioSamples = pvVar6;
	 *   func_0x031fdc38();
	 *   puVar3 = typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8;
	 *   if ((bRam000000000755f76f & 1) == 0) {
	 *     func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8,0);
	 *     bRam000000000755f76f = 1;
	 *   }
	 *   if (*(int *)(*(long *)puVar3 + 0xe4) == 0) {
	 *     func_0x031fde08();
	 *   }
	 *   return;
	 */
	// RVA: 0x321F0C0 VA: 0x781890A0C0
	private static void .cctor();
	/*
	 *   undefined *puVar1;
	 *   undefined *puVar2;
	 *   undefined *puVar3;
	 *   undefined8 uVar4;
	 *   ulong uVar5;
	 *
	 *   puVar3 = PTR_DAT_070c2418;
	 *   puVar2 = PTR_DAT_070c2410;
	 *   puVar1 = PTR_DAT_070c0f48;
	 *   if ((bRam000000000754a8ae & 1) == 0) {
	 *     func_0x031fdc8c(PTR_DAT_070c2418);
	 *     func_0x031fdc8c(PTR_DAT_070c2410);
	 *     func_0x031fdc8c(PTR_DAT_070c0f48);
	 *     bRam000000000754a8ae = 1;
	 *   }
	 *   uVar4 = func_0x031fdf24(*(undefined8 *)puVar2);
	 *   func_0x03f2ce9c(uVar4,*(undefined8 *)puVar3);
	 *   **(undefined8 **)(*(long *)puVar1 + 0xb8) = uVar4;
	 *   uVar5 = *(ulong *)(*(long *)puVar1 + 0xb8);
	 *   if (iRam00000000077785f0 != 0) {
	 *     func_0x032ed0c0(1L << (uVar5 >> 0xc & 0x3f),(uVar5 >> 0x12 & 0x7fff) * 8 + 0x75ac5c8);
	 *   }
	 *   return;
	 */
}
