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

// Token: 0x02000120 RID: 288
[Token(Token = "0x2000120")]
public class EffectProvider
{
	// Token: 0x06000F41 RID: 3905 RVA: 0x00023B48 File Offset: 0x00021D48
	[Token(Token = "0x6000F41")]
	[Address(RVA = "0x159DB80", Offset = "0x159CB80", VA = "0x18159DB80")]
	public EffectProvider(GameObject prefab, Transform root)
	{
		/*
An exception occurred when decompiling this method (06000F41)

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: 0x06000F42 RID: 3906 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6000F42")]
	[Address(RVA = "0x159DA00", Offset = "0x159CA00", VA = "0x18159DA00")]
	public EffectUpdater Get()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06000F43 RID: 3907 RVA: 0x00023B78 File Offset: 0x00021D78
	[Token(Token = "0x6000F43")]
	[Address(RVA = "0x159DAF0", Offset = "0x159CAF0", VA = "0x18159DAF0")]
	public void Return(EffectUpdater updater)
	{
		Transform transform = this.root;
		updater.source.transform.parentInternal = transform;
		this.effectPool.Enqueue(updater);
	}

	// Token: 0x040019BA RID: 6586
	[FieldOffset(Offset = "0x10")]
	[Token(Token = "0x40019BA")]
	private GameObject prefab;

	// Token: 0x040019BB RID: 6587
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x40019BB")]
	private Transform root;

	// Token: 0x040019BC RID: 6588
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x40019BC")]
	private Queue<EffectUpdater> effectPool;
}
