using System;
using Cpp2IlInjected;
using RootMotion.FinalIK;
using UnityEngine;

namespace RootMotion.Demos
{
	// Token: 0x02000429 RID: 1065
	[Token(Token = "0x2000429")]
	[RequireComponent(typeof(Recoil))]
	public class RecoilTest : MonoBehaviour
	{
		// Token: 0x06002660 RID: 9824 RVA: 0x00058904 File Offset: 0x00056B04
		[Token(Token = "0x6002660")]
		[Address(RVA = "0x5037A0", Offset = "0x5027A0", VA = "0x1805037A0")]
		private void Start()
		{
			/*
An exception occurred when decompiling this method (06002660)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void RootMotion.Demos.RecoilTest::Start()

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	Block_0:; 	stloc:Recoil(var_0_06, call:Recoil(Component::GetComponent, ldloc:RecoilTest[exp:Component](this))); 	stfld:Recoil(RecoilTest::recoil, ldloc:RecoilTest(this), ldloc:Recoil(var_0_06)); }; 
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 344
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
   --- End of inner exception stack trace ---
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
   at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1618
*/;
		}

		// Token: 0x06002661 RID: 9825 RVA: 0x00058920 File Offset: 0x00056B20
		[Token(Token = "0x6002661")]
		[Address(RVA = "0x5037F0", Offset = "0x5027F0", VA = "0x1805037F0")]
		private void Update()
		{
			if (Input.GetKeyDownInt(KeyCode.R) || Input.GetMouseButtonDown(0))
			{
				Recoil recoil = this.recoil;
				float num = this.magnitude;
				recoil.Fire(num);
				return;
			}
		}

		// Token: 0x06002662 RID: 9826 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002662")]
		[Address(RVA = "0x5036C0", Offset = "0x5026C0", VA = "0x1805036C0")]
		private void OnGUI()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002663 RID: 9827 RVA: 0x0005895C File Offset: 0x00056B5C
		[Token(Token = "0x6002663")]
		[Address(RVA = "0x503840", Offset = "0x502840", VA = "0x180503840")]
		public RecoilTest()
		{
		}

		// Token: 0x04003012 RID: 12306
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4003012")]
		public float magnitude = 1f;

		// Token: 0x04003013 RID: 12307
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4003013")]
		private Recoil recoil;
	}
}
