using System;
using Cpp2IlInjected;
using UnityEngine;

namespace RootMotion.FinalIK
{
	// Token: 0x02000479 RID: 1145
	[Token(Token = "0x2000479")]
	[Serializable]
	public class IKMappingSpine : IKMapping
	{
		// Token: 0x06002894 RID: 10388 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002894")]
		[Address(RVA = "0x170B3B0", Offset = "0x170A3B0", VA = "0x18170B3B0", Slot = "4")]
		public override bool IsValid(IKSolver solver, ref string message)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002895 RID: 10389 RVA: 0x0005C5F0 File Offset: 0x0005A7F0
		[Token(Token = "0x6002895")]
		[Address(RVA = "0x170C5D0", Offset = "0x170B5D0", VA = "0x18170C5D0")]
		public IKMappingSpine()
		{
			this.iterations = (int)((ulong)3L);
			int num = 0;
			this.twistWeight = 1f;
			IKMapping.BoneMap[] array = new IKMapping.BoneMap[num];
			this.spine = array;
			IKMapping.BoneMap boneMap = new IKMapping.BoneMap();
			this.leftUpperArm = boneMap;
			IKMapping.BoneMap boneMap2 = new IKMapping.BoneMap();
			this.rightUpperArm = boneMap2;
			IKMapping.BoneMap boneMap3 = new IKMapping.BoneMap();
			this.leftThigh = boneMap3;
			IKMapping.BoneMap boneMap4 = new IKMapping.BoneMap();
			this.rightThigh = boneMap4;
			base..ctor();
		}

		// Token: 0x06002896 RID: 10390 RVA: 0x0005C660 File Offset: 0x0005A860
		[Token(Token = "0x6002896")]
		[Address(RVA = "0x170C6F0", Offset = "0x170B6F0", VA = "0x18170C6F0")]
		public IKMappingSpine(Transform[] spineBones, Transform leftUpperArmBone, Transform rightUpperArmBone, Transform leftThighBone, Transform rightThighBone)
		{
			/*
An exception occurred when decompiling this method (06002896)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void RootMotion.FinalIK.IKMappingSpine::.ctor(UnityEngine.Transform[],UnityEngine.Transform,UnityEngine.Transform,UnityEngine.Transform,UnityEngine.Transform)

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	Block_0:; 	stfld:int32(IKMappingSpine::iterations, ldloc:IKMappingSpine(this), conv.u8:uint64[exp:int32](ldc.i8:int64[exp:uint64](3))); 	stloc:int32(var_0_0A, ldc.i4:int32(0)); 	stfld:float32(IKMappingSpine::twistWeight, ldloc:IKMappingSpine(this), ldc.r4:float32(1)); 	stloc:class RootMotion.FinalIK.IKMapping/BoneMap[](var_1_1C, newarr:class RootMotion.FinalIK.IKMapping/BoneMap[](RootMotion.FinalIK.IKMapping/BoneMap, ldloc:int32(var_0_0A))); 	stfld:class RootMotion.FinalIK.IKMapping/BoneMap[](IKMappingSpine::spine, ldloc:IKMappingSpine(this), ldloc:class RootMotion.FinalIK.IKMapping/BoneMap[](var_1_1C)); 	stloc:BoneMap(var_2_29, newobj:BoneMap(BoneMap::.ctor)); 	stfld:BoneMap(IKMappingSpine::leftUpperArm, ldloc:IKMappingSpine(this), ldloc:BoneMap(var_2_29)); 	stloc:BoneMap(var_3_36, newobj:BoneMap(BoneMap::.ctor)); 	stfld:BoneMap(IKMappingSpine::rightUpperArm, ldloc:IKMappingSpine(this), ldloc:BoneMap(var_3_36)); 	stloc:BoneMap(var_4_43, newobj:BoneMap(BoneMap::.ctor)); 	stfld:BoneMap(IKMappingSpine::leftThigh, ldloc:IKMappingSpine(this), ldloc:BoneMap(var_4_43)); 	stloc:BoneMap(var_5_52, newobj:BoneMap(BoneMap::.ctor)); 	stfld:BoneMap(IKMappingSpine::rightThigh, ldloc:IKMappingSpine(this), ldloc:BoneMap(var_5_52)); 	call:void(object::.ctor, ldloc:IKMappingSpine[exp:object](this)); 	stfld:class [UnityEngine.CoreModule]UnityEngine.Transform[](IKMappingSpine::spineBones, ldloc:IKMappingSpine(this), ldloc:class [UnityEngine.CoreModule]UnityEngine.Transform[](spineBones)); 	stfld:Transform(IKMappingSpine::leftUpperArmBone, ldloc:IKMappingSpine(this), ldloc:Transform(leftUpperArmBone)); 	stfld:Transform(IKMappingSpine::rightUpperArmBone, ldloc:IKMappingSpine(this), ldloc:Transform(rightUpperArmBone)); 	stfld:Transform(IKMappingSpine::leftThighBone, ldloc:IKMappingSpine(this), ldc.i4:int32[exp:Transform](0)); 	stfld:Transform(IKMappingSpine::rightThighBone, ldloc:IKMappingSpine(this), ldc.i4:int32[exp:Transform](0)); }; 
   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: 0x06002897 RID: 10391 RVA: 0x0005C6F4 File Offset: 0x0005A8F4
		[Token(Token = "0x6002897")]
		[Address(RVA = "0x170BFE0", Offset = "0x170AFE0", VA = "0x18170BFE0")]
		public void SetBones(Transform[] spineBones, Transform leftUpperArmBone, Transform rightUpperArmBone, Transform leftThighBone, Transform rightThighBone)
		{
			/*
An exception occurred when decompiling this method (06002897)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void RootMotion.FinalIK.IKMappingSpine::SetBones(UnityEngine.Transform[],UnityEngine.Transform,UnityEngine.Transform,UnityEngine.Transform,UnityEngine.Transform)

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	Block_0:; 	stfld:class [UnityEngine.CoreModule]UnityEngine.Transform[](IKMappingSpine::spineBones, ldloc:IKMappingSpine(this), ldloc:class [UnityEngine.CoreModule]UnityEngine.Transform[](spineBones)); 	stfld:Transform(IKMappingSpine::leftUpperArmBone, ldloc:IKMappingSpine(this), ldloc:Transform(leftUpperArmBone)); 	stfld:Transform(IKMappingSpine::rightUpperArmBone, ldloc:IKMappingSpine(this), ldloc:Transform(rightUpperArmBone)); 	stfld:Transform(IKMappingSpine::leftThighBone, ldloc:IKMappingSpine(this), ldc.i4:int32[exp:Transform](0)); 	stfld:Transform(IKMappingSpine::rightThighBone, ldloc:IKMappingSpine(this), ldc.i4:int32[exp:Transform](0)); }; 
   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: 0x06002898 RID: 10392 RVA: 0x0005C724 File Offset: 0x0005A924
		[Token(Token = "0x6002898")]
		[Address(RVA = "0x170C060", Offset = "0x170B060", VA = "0x18170C060")]
		public void StoreDefaultLocalState()
		{
			IKMapping.BoneMap[] array = this.spine;
			int num = 0;
			if (num < array.Length)
			{
				array[num].StoreDefaultLocalState();
				IKMapping.BoneMap[] array2 = this.spine;
				num++;
			}
		}

		// Token: 0x06002899 RID: 10393 RVA: 0x0005C760 File Offset: 0x0005A960
		[Token(Token = "0x6002899")]
		[Address(RVA = "0x170A890", Offset = "0x1709890", VA = "0x18170A890")]
		public void FixTransforms()
		{
			IKMapping.BoneMap[] array = this.spine;
			int num = 0;
			int num2 = 0;
			if (num2 < array.Length)
			{
				int length = array.Length;
				IKMapping.BoneMap boneMap = array[num];
				if (num == 0)
				{
				}
				int num3 = length - 1;
				bool flag = num == num3;
				boneMap.FixTransform(flag);
				IKMapping.BoneMap[] array2 = this.spine;
				num++;
			}
		}

		// Token: 0x0600289A RID: 10394 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600289A")]
		[Address(RVA = "0x170AB20", Offset = "0x1709B20", VA = "0x18170AB20", Slot = "5")]
		public override void Initiate(IKSolverFullBody solver)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600289B RID: 10395 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600289B")]
		[Address(RVA = "0x170C0E0", Offset = "0x170B0E0", VA = "0x18170C0E0")]
		private bool UseFABRIK()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600289C RID: 10396 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600289C")]
		[Address(RVA = "0x170BC00", Offset = "0x170AC00", VA = "0x18170BC00")]
		public void ReadPose()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600289D RID: 10397 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600289D")]
		[Address(RVA = "0x170C110", Offset = "0x170B110", VA = "0x18170C110")]
		public void WritePose(IKSolverFullBody solver)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600289E RID: 10398 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600289E")]
		[Address(RVA = "0x170A930", Offset = "0x1709930", VA = "0x18170A930")]
		public void ForwardReach(Vector3 position)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600289F RID: 10399 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600289F")]
		[Address(RVA = "0x170A6B0", Offset = "0x17096B0", VA = "0x18170A6B0")]
		private void BackwardReach(Vector3 position)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060028A0 RID: 10400 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60028A0")]
		[Address(RVA = "0x170B7D0", Offset = "0x170A7D0", VA = "0x18170B7D0")]
		private void MapToSolverPositions(IKSolverFullBody solver)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x04003263 RID: 12899
		[FieldOffset(Offset = "0x10")]
		[Token(Token = "0x4003263")]
		public Transform[] spineBones;

		// Token: 0x04003264 RID: 12900
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4003264")]
		public Transform leftUpperArmBone;

		// Token: 0x04003265 RID: 12901
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4003265")]
		public Transform rightUpperArmBone;

		// Token: 0x04003266 RID: 12902
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003266")]
		public Transform leftThighBone;

		// Token: 0x04003267 RID: 12903
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003267")]
		public Transform rightThighBone;

		// Token: 0x04003268 RID: 12904
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003268")]
		[Range(1f, 3f)]
		public int iterations;

		// Token: 0x04003269 RID: 12905
		[FieldOffset(Offset = "0x3C")]
		[Token(Token = "0x4003269")]
		[Range(0f, 1f)]
		public float twistWeight;

		// Token: 0x0400326A RID: 12906
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x400326A")]
		private int rootNodeIndex;

		// Token: 0x0400326B RID: 12907
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x400326B")]
		private IKMapping.BoneMap[] spine;

		// Token: 0x0400326C RID: 12908
		[FieldOffset(Offset = "0x50")]
		[Token(Token = "0x400326C")]
		private IKMapping.BoneMap leftUpperArm;

		// Token: 0x0400326D RID: 12909
		[FieldOffset(Offset = "0x58")]
		[Token(Token = "0x400326D")]
		private IKMapping.BoneMap rightUpperArm;

		// Token: 0x0400326E RID: 12910
		[FieldOffset(Offset = "0x60")]
		[Token(Token = "0x400326E")]
		private IKMapping.BoneMap leftThigh;

		// Token: 0x0400326F RID: 12911
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x400326F")]
		private IKMapping.BoneMap rightThigh;

		// Token: 0x04003270 RID: 12912
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x4003270")]
		private bool useFABRIK;
	}
}
