using System;
using System.Collections.Generic;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x020000FA RID: 250
[Token(Token = "0x20000FA")]
public class EffectProvider
{
	// Token: 0x06000E16 RID: 3606 RVA: 0x00021C08 File Offset: 0x0001FE08
	[Token(Token = "0x6000E16")]
	[Address(RVA = "0xA61350", Offset = "0xA60150", VA = "0x180A61350")]
	public EffectProvider(GameObject prefab, Transform root)
	{
		/*
An exception occurred when decompiling this method (06000E16)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void EffectProvider::.ctor(UnityEngine.GameObject,UnityEngine.Transform)

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	Block_0:; 	stloc:class [System]System.Collections.Generic.Queue`1<class EffectUpdater>(var_0_05, newobj:Queue`1[exp:class [System]System.Collections.Generic.Queue`1<class EffectUpdater>](Queue`1::.ctor)); 	stfld:class [System]System.Collections.Generic.Queue`1<class EffectUpdater>(EffectProvider::effectPool, ldloc:EffectProvider(this), ldloc:class [System]System.Collections.Generic.Queue`1<class EffectUpdater>(var_0_05)); 	call:void(object::.ctor, ldloc:EffectProvider[exp:object](this)); 	stfld:Transform(EffectProvider::root, ldloc:EffectProvider(this), ldloc:Transform(root)); 	stfld:GameObject(EffectProvider::prefab, ldloc:EffectProvider(this), ldloc:GameObject(prefab)); }; 
   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: 0x06000E17 RID: 3607 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6000E17")]
	[Address(RVA = "0xA611D0", Offset = "0xA5FFD0", VA = "0x180A611D0")]
	public EffectUpdater Get()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06000E18 RID: 3608 RVA: 0x00021C38 File Offset: 0x0001FE38
	[Token(Token = "0x6000E18")]
	[Address(RVA = "0xA612C0", Offset = "0xA600C0", VA = "0x180A612C0")]
	public void Return(EffectUpdater updater)
	{
		Transform transform = this.root;
		updater.source.transform.parentInternal = transform;
		this.effectPool.Enqueue(updater);
	}

	// Token: 0x040018B2 RID: 6322
	[FieldOffset(Offset = "0x10")]
	[Token(Token = "0x40018B2")]
	private GameObject prefab;

	// Token: 0x040018B3 RID: 6323
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x40018B3")]
	private Transform root;

	// Token: 0x040018B4 RID: 6324
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x40018B4")]
	private Queue<EffectUpdater> effectPool;
}
