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

// Token: 0x02000356 RID: 854
[Token(Token = "0x2000356")]
[RequireComponent(typeof(ObiSolver))]
public class CollisionEventHandler : MonoBehaviour
{
	// Token: 0x06002102 RID: 8450 RVA: 0x0004E7A8 File Offset: 0x0004C9A8
	[Token(Token = "0x6002102")]
	[Address(RVA = "0xE89200", Offset = "0xE88000", VA = "0x180E89200")]
	private void Awake()
	{
		/*
An exception occurred when decompiling this method (06002102)

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: 0x06002103 RID: 8451 RVA: 0x0004E7C4 File Offset: 0x0004C9C4
	[Token(Token = "0x6002103")]
	[Address(RVA = "0xE89640", Offset = "0xE88440", VA = "0x180E89640")]
	private void OnEnable()
	{
		ObiSolver obiSolver = this.solver;
		EventHandler<ObiSolver.ObiCollisionEventArgs> eventHandler = new EventHandler(this.Solver_OnCollision);
		obiSolver.OnCollision += eventHandler;
	}

	// Token: 0x06002104 RID: 8452 RVA: 0x0004E7F4 File Offset: 0x0004C9F4
	[Token(Token = "0x6002104")]
	[Address(RVA = "0xE89250", Offset = "0xE88050", VA = "0x180E89250")]
	private void OnDisable()
	{
		ObiSolver obiSolver = this.solver;
		EventHandler<ObiSolver.ObiCollisionEventArgs> eventHandler = new EventHandler(this.Solver_OnCollision);
		obiSolver.OnCollision -= eventHandler;
	}

	// Token: 0x06002105 RID: 8453 RVA: 0x0004E824 File Offset: 0x0004CA24
	[Token(Token = "0x6002105")]
	[Address(RVA = "0xE896E0", Offset = "0xE884E0", VA = "0x180E896E0")]
	private void Solver_OnCollision(object sender, ObiSolver.ObiCollisionEventArgs e)
	{
		/*
An exception occurred when decompiling this method (06002105)

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: 0x06002106 RID: 8454 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6002106")]
	[Address(RVA = "0xE892F0", Offset = "0xE880F0", VA = "0x180E892F0")]
	private void OnDrawGizmos()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06002107 RID: 8455 RVA: 0x0004E838 File Offset: 0x0004CA38
	[Token(Token = "0x6002107")]
	[Address(RVA = "0x3088F0", Offset = "0x3076F0", VA = "0x1803088F0")]
	public CollisionEventHandler()
	{
	}

	// Token: 0x04002A6D RID: 10861
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x4002A6D")]
	private ObiSolver solver;

	// Token: 0x04002A6E RID: 10862
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x4002A6E")]
	private ObiSolver.ObiCollisionEventArgs frame;
}
