// [TypeInfo RVA: 0x0]
public class RicochetBullet : MonoBehaviour
{
	public float forceAmount; // 0x20
	public int maxRicochets; // 0x24
	public float speedLossFactor; // 0x28
	public float lifeTime; // 0x2C
	public UnityEngine.GameObject impactEffect; // 0x30
	public UnityEngine.GameObject bulletHoleDecal; // 0x38
	public float decalLifetime; // 0x40
	public UnityEngine.AudioClip ricochetSound; // 0x48
	public float soundVolume; // 0x50
	public UnityEngine.AudioSource ricochetAudioPrefab; // 0x58
	private UnityEngine.Rigidbody rb; // 0x60
	private int ricochetCount; // 0x68
	private float currentLifetime; // 0x6C

	// RVA: 0x3237774 VA: 0x7818922774
	private void Awake();
	/*
	 *   undefined *puVar1;
	 *   void *pvVar2;
	 *   void **ppvVar3;
	 *
	 *   puVar1 = PTR_DAT_070c0c08;
	 *   if ((bRam000000000754a979 & 1) == 0) {
	 *     func_0x031fdc8c(PTR_DAT_070c0c08);
	 *     bRam000000000754a979 = 1;
	 *   }
	 *   pvVar2 = (void *)func_0x0373df50(this,*(undefined8 *)puVar1);
	 *   ppvVar3 = &this.rb;
	 *   *ppvVar3 = pvVar2;
	 *   if (iRam00000000077785f0 != 0) {
	 *     func_0x032ed0c0(1L << ((ulong)ppvVar3 >> 0xc & 0x3f),
	 *                     ((ulong)ppvVar3 >> 0x12 & 0x7fff) * 8 + 0x75ac5c8);
	 *   }
	 *   return;
	 */
	// RVA: 0x32377CC VA: 0x78189227CC
	private void OnEnable();
	/*
	 *   undefined *puVar1;
	 *   char cVar2;
	 *   void *pvVar3;
	 *   void *obj;
	 *   long lVar4;
	 *
	 *   cVar2 = cRam000000000754a7ce;
	 *   pvVar3 = this.rb;
	 *   this.ricochetCount = 0;
	 *   this.currentLifetime = this.lifeTime;
	 *   if (cVar2 == '\0') {
	 *     func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Vector3_6FC0A08);
	 *     cRam000000000754a7ce = '\x01';
	 *   }
	 *   puVar1 = typeinfo_ptr_UnityEngine_CoreModule_Vector3_6FC0A08;
	 *   if (pvVar3 != null) {
	 *     UnityEngine.Rigidbody.set_linearVelocity(pvVar3,**(UnityEngine_Vector3 **)
	 *                         (*(long *)typeinfo_ptr_UnityEngine_CoreModule_Vector3_6FC0A08 + 0xb8));
	 *     pvVar3 = this.rb;
	 *     if (cRam000000000754a7ce == '\0') {
	 *       func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Vector3_6FC0A08);
	 *       cRam000000000754a7ce = '\x01';
	 *     }
	 *     if (pvVar3 != null) {
	 *       UnityEngine.Rigidbody.set_angularVelocity(pvVar3,**(UnityEngine_Vector3 **)(*(long *)puVar1 + 0xb8));
	 *       obj = this.rb;
	 *       pvVar3 = UnityEngine.Component.get_transform(this);
	 *       if (pvVar3 != null) {
	 *         UnityEngine.Transform.get_forward(pvVar3);
	 *         if (obj != null) {
	 *           if ((bRam0000000007561ed7 & 1) == 0) {
	 *             func_0x031fdc8c(PTR_DAT_071515f0,1,0);
	 *             bRam0000000007561ed7 = 1;
	 *           }
	 *           if (obj != null) {
	 *             lVar4 = *(long *)((long)obj + 0x10);
	 *             if (lVar4 == 0) {
	 *               UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException(obj);
	 *             }
	 *             if (pcRam0000000007561fc0 == null) {
	 *               pcRam0000000007561fc0 = (code *)func_0x031fdc50(&UNK_01357c7f);
	 *             }
	 *             (*pcRam0000000007561fc0)(lVar4,&stack0xffffffffffffffd4,1);
	 *             return;
	 *           }
	 *           IL2CPP.ThrowNullReferenceException();
	 *         }
	 *       }
	 *     }
	 *   }
	 *   IL2CPP.ThrowNullReferenceException();
	 */
	// RVA: 0x32378C4 VA: 0x78189228C4
	private void Update();
	/*
	 *   void *obj;
	 *   long lVar1;
	 *   float fVar2;
	 *   float fVar3;
	 *
	 *   fVar3 = this.currentLifetime;
	 *   fVar2 = UnityEngine.Time.get_deltaTime();
	 *   fVar3 = fVar3 - fVar2;
	 *   this.currentLifetime = fVar3;
	 *   if (0.0 < fVar3) {
	 *     return;
	 *   }
	 *   obj = UnityEngine.Component.get_gameObject(this);
	 *   if (obj != null) {
	 *     if ((bRam000000000755f7e0 & 1) == 0) {
	 *       func_0x031fdc8c(PTR_DAT_0714f3e0,0,0);
	 *       bRam000000000755f7e0 = 1;
	 *     }
	 *     if (obj != null) {
	 *       lVar1 = *(long *)((long)obj + 0x10);
	 *       if (lVar1 == 0) {
	 *         UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException(obj);
	 *       }
	 *       if (pcRam000000000755f860 == null) {
	 *         pcRam000000000755f860 = (code *)func_0x031fdc50(&UNK_0138da18);
	 *       }
	 *       (*pcRam000000000755f860)(lVar1,0);
	 *       return;
	 *     }
	 *     IL2CPP.ThrowNullReferenceException();
	 *   }
	 *   IL2CPP.ThrowNullReferenceException();
	 */
	// RVA: 0x3237920 VA: 0x7818922920
	private void OnDisable();
	/*
	 *   long lVar1;
	 *   void *pvVar2;
	 *
	 *   pvVar2 = this.rb;
	 *   if (cRam000000000754a7ce == '\0') {
	 *     func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Vector3_6FC0A08);
	 *     cRam000000000754a7ce = '\x01';
	 *   }
	 *   if (pvVar2 != null) {
	 *     UnityEngine.Rigidbody.set_linearVelocity(pvVar2,**(UnityEngine_Vector3 **)
	 *                         (*(long *)typeinfo_ptr_UnityEngine_CoreModule_Vector3_6FC0A08 + 0xb8));
	 *     pvVar2 = this.rb;
	 *     if (cRam000000000754a7ce == '\0') {
	 *       func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Vector3_6FC0A08);
	 *       cRam000000000754a7ce = '\x01';
	 *     }
	 *     if (pvVar2 != null) {
	 *       if ((bRam0000000007561ebe & 1) == 0) {
	 *         func_0x031fdc8c(PTR_DAT_071515f0,0);
	 *         bRam0000000007561ebe = 1;
	 *       }
	 *       if (pvVar2 != null) {
	 *         lVar1 = *(long *)((long)pvVar2 + 0x10);
	 *         if (lVar1 == 0) {
	 *           UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException(pvVar2);
	 *         }
	 *         if (pcRam0000000007561ef8 == null) {
	 *           pcRam0000000007561ef8 = (code *)func_0x031fdc50(&UNK_01396f40);
	 *         }
	 *         (*pcRam0000000007561ef8)(lVar1,&stack0xffffffffffffffd4);
	 *         return;
	 *       }
	 *       IL2CPP.ThrowNullReferenceException();
	 *     }
	 *   }
	 *   IL2CPP.ThrowNullReferenceException();
	 */
	// RVA: 0x32379CC VA: 0x78189229CC
	private void OnCollisionEnter(UnityEngine.Collision collision);
	/*
	 *   undefined *puVar1;
	 *   undefined *puVar2;
	 *   void *pvVar3;
	 *   ulong uVar4;
	 *   void *in_x3;
	 *   undefined4 *puVar5;
	 *   long lVar6;
	 *   SimpleObjectPool *pSVar7;
	 *   void *prefab;
	 *   float fVar8;
	 *   float fVar10;
	 *   float fVar11;
	 *   float fVar13;
	 *   float fVar14;
	 *   float fVar15;
	 *   float fVar16;
	 *   float fVar17;
	 *   float fVar18;
	 *   undefined4 uVar19;
	 *   undefined4 uVar20;
	 *   undefined4 uVar21;
	 *   undefined4 uVar22;
	 *   UnityEngine_Vector3 UVar23;
	 *   UnityEngine_Vector3 position;
	 *   UnityEngine_Vector3 UVar24;
	 *   UnityEngine_Vector3 value;
	 *   UnityEngine_Vector4 UVar25;
	 *   undefined8 uStack_b0;
	 *   undefined8 uStack_a8;
	 *   undefined8 uStack_a0;
	 *   undefined8 uStack_98;
	 *   undefined8 uStack_90;
	 *   undefined8 uStack_88;
	 *   float fVar9;
	 *   float fVar12;
	 *
	 *   if ((bRam000000000754a97a & 1) == 0) {
	 *     func_0x031fdc8c(PTR_DAT_070c3308);
	 *     func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8);
	 *     func_0x031fdc8c(PTR_DAT_070c3310);
	 *     bRam000000000754a97a = 1;
	 *   }
	 *   uStack_98 = 0;
	 *   uStack_a0 = 0;
	 *   uStack_88 = 0;
	 *   uStack_90 = 0;
	 *   uStack_a8 = 0;
	 *   uStack_b0 = 0;
	 *   if (this.ricochetCount < this.maxRicochets) {
	 *     if ((collision != null) &&
	 *        (pvVar3 = UnityEngine.Collision.get_contacts(collision),
	 *        pvVar3 != null)) {
	 *       if (*(long *)((long)pvVar3 + 0x18) == 0) {
	 *         return;
	 *       }
	 *       pvVar3 = UnityEngine.Collision.get_contacts(collision);
	 *       if (pvVar3 != null) {
	 *         if (*(int *)((long)pvVar3 + 0x18) == 0) {
	 *           IL2CPP.ThrowIndexOutOfRangeException();
	 *         }
	 *         uStack_98 = *(undefined8 *)((long)pvVar3 + 0x38);
	 *         uStack_a0 = *(undefined8 *)((long)pvVar3 + 0x30);
	 *         uStack_88 = *(undefined8 *)((long)pvVar3 + 0x48);
	 *         uStack_90 = *(undefined8 *)((long)pvVar3 + 0x40);
	 *         uStack_a8 = *(undefined8 *)((long)pvVar3 + 0x28);
	 *         uStack_b0 = *(undefined8 *)((long)pvVar3 + 0x20);
	 *         UVar23 = UnityEngine.ContactPoint.get_normal(&uStack_b0)
	 *         ;
	 *         fVar12 = UVar23.z;
	 *         fVar9 = UVar23.y;
	 *         fVar8 = UVar23.x;
	 *         position = UnityEngine.ContactPoint.get_point(&uStack_b0);
	 *         pvVar3 = this.rb;
	 *         if (pvVar3 != null) {
	 *           UVar24 = UnityEngine.Rigidbody.get_linearVelocity(pvVar3);
	 *           fVar15 = (fVar12 * UVar24.z + fVar8 * UVar24.x + fVar9 * UVar24.y) * -2.0;
	 *           fVar16 = this.speedLossFactor;
	 *           value.x = fVar16 * (UVar24.x + fVar8 * fVar15);
	 *           value.y = fVar16 * (UVar24.y + fVar9 * fVar15);
	 *           value.z = fVar16 * (UVar24.z + fVar12 * fVar15);
	 *           UnityEngine.Rigidbody.set_linearVelocity(pvVar3,value)
	 *           ;
	 *           puVar1 = typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8;
	 *           pvVar3 = this.impactEffect;
	 *           if (*(int *)(*(long *)typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8 + 0xe4) == 0) {
	 *             func_0x031fde08();
	 *           }
	 *           uVar4 = UnityEngine.Object.op_Implicit(pvVar3);
	 *           puVar2 = PTR_DAT_070c3310;
	 *           if ((uVar4 & 1) != 0) {
	 *             pvVar3 = this.impactEffect;
	 *             pSVar7 = (SimpleObjectPool *)**(undefined8 **)(*(long *)PTR_DAT_070c3310 + 0xb8);
	 *             UVar25 = UnityEngine.Quaternion.LookRotation(UVar23);
	 *             if (pSVar7 == null) goto LAB_03337f00;
	 *             pvVar3 = SimpleObjectPool.Spawn(pSVar7,pvVar3,position,UVar25,null);
	 *             if ((SimpleObjectPool *)**(undefined8 **)(*(long *)puVar2 + 0xb8) ==
	 *                 null) goto LAB_03337f00;
	 *             SimpleObjectPool.Despawn((SimpleObjectPool *)**(undefined8 **)(*(long *)puVar2 + 0xb8),this.impactEffect,pvVar3,1.5);
	 *           }
	 *           pvVar3 = this.ricochetAudioPrefab;
	 *           if (*(int *)(*(long *)puVar1 + 0xe4) == 0) {
	 *             func_0x031fde08();
	 *           }
	 *           uVar4 = UnityEngine.Object.op_Implicit(pvVar3);
	 *           if ((uVar4 & 1) != 0) {
	 *             pvVar3 = this.ricochetSound;
	 *             if (*(int *)(*(long *)puVar1 + 0xe4) == 0) {
	 *               func_0x031fde08();
	 *             }
	 *             uVar4 = UnityEngine.Object.op_Implicit(pvVar3);
	 *             if ((uVar4 & 1) != 0) {
	 *               pvVar3 = this.ricochetAudioPrefab;
	 *               if (cRam000000000754a7d0 == '\0') {
	 *                 func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Quaternion_6FC0EA0);
	 *                 cRam000000000754a7d0 = '\x01';
	 *               }
	 *               puVar5 = *(undefined4 **)
	 *                         (*(long *)typeinfo_ptr_UnityEngine_CoreModule_Quaternion_6FC0EA0 + 0xb8);
	 *               uVar19 = *puVar5;
	 *               uVar20 = puVar5[1];
	 *               uVar21 = puVar5[2];
	 *               uVar22 = puVar5[3];
	 *               if (*(int *)(*(long *)puVar1 + 0xe4) == 0) {
	 *                 func_0x031fde08();
	 *               }
	 *               pvVar3 = (void *)func_0x03890c2c(position.x,position.y,position.z,uVar19,uVar20,uVar21
	 *                                                ,uVar22,pvVar3,*(undefined8 *)PTR_DAT_070c3308);
	 *               if (pvVar3 == null) goto LAB_03337f00;
	 *               UnityEngine.AudioSource.set_clip(pvVar3,this.ricochetSound);
	 *               UnityEngine.AudioSource.set_volume(pvVar3,this.soundVolume);
	 *               UnityEngine.AudioSource.Play(pvVar3);
	 *               pvVar3 = UnityEngine.Component.get_gameObject(pvVar3)
	 *               ;
	 *               if (this.ricochetSound == null) goto LAB_03337f00;
	 *               UnityEngine.AudioClip.get_length(this.ricochetSound);
	 *               UnityEngine.Object.Destroy(pvVar3,0);
	 *             }
	 *           }
	 *           pvVar3 = this.bulletHoleDecal;
	 *           if (*(int *)(*(long *)puVar1 + 0xe4) == 0) {
	 *             func_0x031fde08();
	 *           }
	 *           uVar4 = UnityEngine.Object.op_Implicit(pvVar3);
	 *           if ((uVar4 & 1) == 0) {
	 * LAB_03337e8c:
	 *             this.ricochetCount = this.ricochetCount + 1;
	 *             return;
	 *           }
	 *           UVar25 = UnityEngine.Quaternion.LookRotation(UVar23);
	 *           fVar17 = UVar25.w;
	 *           fVar13 = UVar25.z;
	 *           fVar10 = UVar25.y;
	 *           fVar15 = UVar25.x;
	 *           UVar23.y = 0.0;
	 *           UVar23.z = 0.0;
	 *           UVar23.x = (float)_UNK_0134e998;
	 *           UVar25 = UnityEngine.Quaternion.Internal_FromEulerRad(UVar23);
	 *           puVar1 = PTR_DAT_070c3310;
	 *           fVar18 = UVar25.w;
	 *           fVar14 = UVar25.z;
	 *           fVar11 = UVar25.y;
	 *           fVar16 = UVar25.x;
	 *           prefab = this.bulletHoleDecal;
	 *           pSVar7 = (SimpleObjectPool *)**(undefined8 **)(*(long *)PTR_DAT_070c3310 + 0xb8);
	 *           pvVar3 = UnityEngine.Collision.get_transform(collision);
	 *           if (pSVar7 != null) {
	 *             UVar24.z = position.z + fVar12 * _UNK_0134e9fc;
	 *             UVar25.z = (fVar15 * fVar11 + fVar17 * fVar14 + fVar13 * fVar18) - fVar10 * fVar16;
	 *             UVar24.y = position.y + fVar9 * _UNK_0134e9fc;
	 *             UVar24.x = position.x + fVar8 * _UNK_0134e9fc;
	 *             UVar25.w = ((fVar17 * fVar18 - fVar15 * fVar16) - fVar10 * fVar11) - fVar13 * fVar14;
	 *             UVar25.y = (fVar13 * fVar16 + fVar17 * fVar11 + fVar10 * fVar18) - fVar15 * fVar14;
	 *             UVar25.x = (fVar10 * fVar14 + fVar17 * fVar16 + fVar15 * fVar18) - fVar13 * fVar11;
	 *             pvVar3 = SimpleObjectPool.Spawn(pSVar7,prefab,UVar24,UVar25,pvVar3);
	 *             if ((SimpleObjectPool *)**(undefined8 **)(*(long *)puVar1 + 0xb8) !=
	 *                 null) {
	 *               SimpleObjectPool.Despawn((SimpleObjectPool *)**(undefined8 **)(*(long *)puVar1 + 0xb8),this.bulletHoleDecal,pvVar3,this.decalLifetime);
	 *               goto LAB_03337e8c;
	 *             }
	 *           }
	 *         }
	 *       }
	 *     }
	 *   }
	 *   else {
	 *     pvVar3 = UnityEngine.Component.get_gameObject(this);
	 *     if (pvVar3 != null) {
	 *       if ((bRam000000000755f7e0 & 1) == 0) {
	 *         func_0x031fdc8c(PTR_DAT_0714f3e0,0,0);
	 *         bRam000000000755f7e0 = 1;
	 *       }
	 *       if (pvVar3 == null) {
	 *         IL2CPP.ThrowNullReferenceException();
	 *       }
	 *       lVar6 = *(long *)((long)pvVar3 + 0x10);
	 *       if (lVar6 == 0) {
	 *         UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException(pvVar3)
	 *         ;
	 *       }
	 *       if (pcRam000000000755f860 == null) {
	 *         pcRam000000000755f860 = (code *)func_0x031fdc50(&UNK_0138da18);
	 *       }
	 *       (*pcRam000000000755f860)(lVar6,0);
	 *       return;
	 *     }
	 *   }
	 * LAB_03337f00:
	 *   IL2CPP.ThrowNullReferenceException();
	 */
	// RVA: 0x3238318 VA: 0x7818923318
	public void .ctor();
	/*
	 *   undefined8 uVar1;
	 *   undefined4 uVar2;
	 *   undefined *puVar3;
	 *   undefined8 uVar4;
	 *
	 *   uVar1 = _UNK_0134daf8;
	 *   this.forceAmount = 1000.0;
	 *   this.maxRicochets = 3;
	 *   this.decalLifetime = 5.0;
	 *   uVar4 = _UNK_0134daf8;
	 *   _UNK_0134daf8 = (undefined4)uVar1;
	 *   _UNK_0134dafc = SUB84(uVar1,4);
	 *   uVar2 = _UNK_0134dafc;
	 *   this.speedLossFactor = (float)_UNK_0134daf8;
	 *   _UNK_0134daf8 = uVar4;
	 *   this.lifeTime = (float)uVar2;
	 *   this.soundVolume = 0.7;
	 *   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;
	 */
}
