using System;
using Cpp2IlInjected;
using Obi;
using UnityEngine;

// Token: 0x020003AE RID: 942
[Token(Token = "0x20003AE")]
[RequireComponent(typeof(ObiSolver))]
public class CollisionEventHandler : MonoBehaviour
{
	// Token: 0x060023CB RID: 9163 RVA: 0x00055A44 File Offset: 0x00053C44
	[Token(Token = "0x60023CB")]
	[Address(RVA = "0xB9A290", Offset = "0xB99290", VA = "0x180B9A290")]
	private void Awake()
	{
		/*
An exception occurred when decompiling this method (060023CB)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void CollisionEventHandler::Awake()

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	Block_0:; 	stloc:ObiSolver(var_0_06, call:ObiSolver(Component::GetComponent, ldloc:CollisionEventHandler[exp:Component](this))); 	stfld:ObiSolver(CollisionEventHandler::solver, ldloc:CollisionEventHandler(this), ldloc:ObiSolver(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: 0x060023CC RID: 9164 RVA: 0x00055A60 File Offset: 0x00053C60
	[Token(Token = "0x60023CC")]
	[Address(RVA = "0xB9A6D0", Offset = "0xB996D0", VA = "0x180B9A6D0")]
	private void OnEnable()
	{
		ObiSolver obiSolver = this.solver;
		EventHandler<ObiSolver.ObiCollisionEventArgs> eventHandler = new EventHandler(this.Solver_OnCollision);
		obiSolver.OnCollision += eventHandler;
	}

	// Token: 0x060023CD RID: 9165 RVA: 0x00055A90 File Offset: 0x00053C90
	[Token(Token = "0x60023CD")]
	[Address(RVA = "0xB9A2E0", Offset = "0xB992E0", VA = "0x180B9A2E0")]
	private void OnDisable()
	{
		ObiSolver obiSolver = this.solver;
		EventHandler<ObiSolver.ObiCollisionEventArgs> eventHandler = new EventHandler(this.Solver_OnCollision);
		obiSolver.OnCollision -= eventHandler;
	}

	// Token: 0x060023CE RID: 9166 RVA: 0x00055AC0 File Offset: 0x00053CC0
	[Token(Token = "0x60023CE")]
	[Address(RVA = "0xB9A770", Offset = "0xB99770", VA = "0x180B9A770")]
	private void Solver_OnCollision(object sender, ObiSolver.ObiCollisionEventArgs e)
	{
		/*
An exception occurred when decompiling this method (060023CE)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void CollisionEventHandler::Solver_OnCollision(System.Object,Obi.ObiSolver/ObiCollisionEventArgs)

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	Block_0:; 	stfld:ObiCollisionEventArgs(CollisionEventHandler::frame, ldloc:CollisionEventHandler(this), ldloc:ObiCollisionEventArgs(e)); }; 
   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: 0x060023CF RID: 9167 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60023CF")]
	[Address(RVA = "0xB9A380", Offset = "0xB99380", VA = "0x180B9A380")]
	private void OnDrawGizmos()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060023D0 RID: 9168 RVA: 0x00055AD4 File Offset: 0x00053CD4
	[Token(Token = "0x60023D0")]
	[Address(RVA = "0x328C40", Offset = "0x327C40", VA = "0x180328C40")]
	public CollisionEventHandler()
	{
	}

	// Token: 0x04002D57 RID: 11607
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x4002D57")]
	private ObiSolver solver;

	// Token: 0x04002D58 RID: 11608
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x4002D58")]
	private ObiSolver.ObiCollisionEventArgs frame;
}
