using System;
using System.Collections;
using Cpp2IlInjected;

namespace Obi
{
	// Token: 0x020004C2 RID: 1218
	[Token(Token = "0x20004C2")]
	public class CoroutineJob
	{
		// Token: 0x170002E7 RID: 743
		// (get) Token: 0x06002B0D RID: 11021 RVA: 0x0005D650 File Offset: 0x0005B850
		[Token(Token = "0x170002E7")]
		public object Result
		{
			[Token(Token = "0x6002B0D")]
			[Address(RVA = "0xE92330", Offset = "0xE91130", VA = "0x180E92330")]
			get
			{
				while (this.e != (ulong)0L)
				{
				}
				return this.result;
			}
		}

		// Token: 0x170002E8 RID: 744
		// (get) Token: 0x06002B0E RID: 11022 RVA: 0x0005D670 File Offset: 0x0005B870
		[Token(Token = "0x170002E8")]
		public bool IsDone
		{
			[Token(Token = "0x6002B0E")]
			[Address(RVA = "0x3FBFE0", Offset = "0x3FADE0", VA = "0x1803FBFE0")]
			get
			{
				return this.isDone;
			}
		}

		// Token: 0x170002E9 RID: 745
		// (get) Token: 0x06002B0F RID: 11023 RVA: 0x0005D684 File Offset: 0x0005B884
		[Token(Token = "0x170002E9")]
		public bool RaisedException
		{
			[Token(Token = "0x6002B0F")]
			[Address(RVA = "0x3FBFF0", Offset = "0x3FADF0", VA = "0x1803FBFF0")]
			get
			{
				return this.raisedException;
			}
		}

		// Token: 0x06002B10 RID: 11024 RVA: 0x0005D698 File Offset: 0x0005B898
		[Token(Token = "0x6002B10")]
		[Address(RVA = "0xE920B0", Offset = "0xE90EB0", VA = "0x180E920B0")]
		private void Init()
		{
			/*
An exception occurred when decompiling this method (06002B10)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void Obi.CoroutineJob::Init()

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	Block_0:; 	stfld:bool(CoroutineJob::isDone, ldloc:CoroutineJob(this), ldc.i4:bool(0)); 	stfld:bool(CoroutineJob::stop, ldloc:CoroutineJob(this), ldc.i4:bool(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: 0x06002B11 RID: 11025 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B11")]
		[Address(RVA = "0xE920D0", Offset = "0xE90ED0", VA = "0x180E920D0")]
		public static object RunSynchronously(IEnumerator coroutine)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B12 RID: 11026 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B12")]
		[Address(RVA = "0xE922A0", Offset = "0xE910A0", VA = "0x180E922A0")]
		public IEnumerator Start(IEnumerator coroutine)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B13 RID: 11027 RVA: 0x0005D6B4 File Offset: 0x0005B8B4
		[Token(Token = "0x6002B13")]
		[Address(RVA = "0xBDD5F0", Offset = "0xBDC3F0", VA = "0x180BDD5F0")]
		public void Stop()
		{
			this.stop = true;
		}

		// Token: 0x06002B14 RID: 11028 RVA: 0x0005D6C8 File Offset: 0x0005B8C8
		[Token(Token = "0x6002B14")]
		[Address(RVA = "0x3D8B20", Offset = "0x3D7920", VA = "0x1803D8B20")]
		public CoroutineJob()
		{
		}

		// Token: 0x04003392 RID: 13202
		[FieldOffset(Offset = "0x10")]
		[Token(Token = "0x4003392")]
		private object result;

		// Token: 0x04003393 RID: 13203
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4003393")]
		private bool isDone;

		// Token: 0x04003394 RID: 13204
		[FieldOffset(Offset = "0x19")]
		[Token(Token = "0x4003394")]
		private bool raisedException;

		// Token: 0x04003395 RID: 13205
		[FieldOffset(Offset = "0x1A")]
		[Token(Token = "0x4003395")]
		private bool stop;

		// Token: 0x04003396 RID: 13206
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4003396")]
		private Exception e;

		// Token: 0x04003397 RID: 13207
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003397")]
		public int asyncThreshold;

		// Token: 0x020004C3 RID: 1219
		[Token(Token = "0x20004C3")]
		public class ProgressInfo
		{
			// Token: 0x06002B15 RID: 11029 RVA: 0x0005D6DC File Offset: 0x0005B8DC
			[Token(Token = "0x6002B15")]
			[Address(RVA = "0x5FD4F0", Offset = "0x5FC2F0", VA = "0x1805FD4F0")]
			public ProgressInfo(string userReadableInfo, float progress)
			{
				this.userReadableInfo = userReadableInfo;
				this.progress = progress;
			}

			// Token: 0x04003398 RID: 13208
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x4003398")]
			public string userReadableInfo;

			// Token: 0x04003399 RID: 13209
			[FieldOffset(Offset = "0x18")]
			[Token(Token = "0x4003399")]
			public float progress;
		}
	}
}
