content: package kotlinx.coroutines;
  
  import kotlin.Metadata;
  import kotlin.Unit;
  import kotlin.coroutines.Continuation;
  import kotlin.coroutines.ContinuationInterceptor;
  import kotlin.coroutines.CoroutineContext;
  import kotlin.coroutines.EmptyCoroutineContext;
  import kotlin.coroutines.intrinsics.IntrinsicsKt;
  import kotlin.coroutines.jvm.internal.DebugProbesKt;
  import kotlin.jvm.functions.Function1;
  import kotlin.jvm.functions.Function2;
  import kotlin.jvm.internal.InlineMarker;
  import kotlin.jvm.internal.Intrinsics;
  import kotlinx.coroutines.internal.ScopeCoroutine;
  import kotlinx.coroutines.internal.ThreadContextKt;
  import kotlinx.coroutines.intrinsics.CancellableKt;
  import kotlinx.coroutines.intrinsics.UndispatchedKt;
  
  @Metadata(d1 = {"\u0000J\n\u0000\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u001aU\u0010\u0004\u001a\u0002H\u0005\"\u0004\b\u0000\u0010\u00052\u0006\u0010\u0006\u001a\u00020\u00072'\u0010\b\u001a#\b\u0001\u0012\u0004\u0012\u00020\n\u0012\n\u0012\b\u0012\u0004\u0012\u0002H\u00050\u000b\u0012\u0006\u0012\u0004\u0018\u00010\f0\t¢\u0006\u0002\b\rH@ø\u0001\u0000\u0002\n\n\b\b\u0001\u0012\u0002\u0010\u0002 \u0001¢\u0006\u0002\u0010\u000e\u001a[\u0010\u000f\u001a\b\u0012\u0004\u0012\u0002H\u00050\u0010\"\u0004\b\u0000\u0010\u0005*\u00020\n2\b\b\u0002\u0010\u0006\u001a\u00020\u00072\b\b\u0002\u0010\u0011\u001a\u00020\u00122'\u0010\b\u001a#\b\u0001\u0012\u0004\u0012\u00020\n\u0012\n\u0012\b\u0012\u0004\u0012\u0002H\u00050\u000b\u0012\u0006\u0012\u0004\u0018\u00010\f0\t¢\u0006\u0002\b\rø\u0001\u0000¢\u0006\u0002\u0010\u0013\u001aF\u0010\u0014\u001a\u0002H\u0005\"\u0004\b\u0000\u0010\u0005*\u00020\u00152)\b\b\u0010\b\u001a#\b\u0001\u0012\u0004\u0012\u00020\n\u0012\n\u0012\b\u0012\u0004\u0012\u0002H\u00050\u000b\u0012\u0006\u0012\u0004\u0018\u00010\f0\t¢\u0006\u0002\b\rHJø\u0001\u0000¢\u0006\u0002\u0010\u0016\u001aO\u0010\u0017\u001a\u00020\u0018*\u00020\n2\b\b\u0002\u0010\u0006\u001a\u00020\u00072\b\b\u0002\u0010\u0011\u001a\u00020\u00122'\u0010\b\u001a#\b\u0001\u0012\u0004\u0012\u00020\n\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00190\u000b\u0012\u0006\u0012\u0004\u0018\u00010\f0\t¢\u0006\u0002\b\rø\u0001\u0000¢\u0006\u0002\u0010\u001a\"\u000e\u0010\u0000\u001a\u00020\u0001XT¢\u0006\u0002\n\u0000\"\u000e\u0010\u0002\u001a\u00020\u0001XT¢\u0006\u0002\n\u0000\"\u000e\u0010\u0003\u001a\u00020\u0001XT¢\u0006\u0002\n\u0000\u0002\u0004\n\u0002\b\u0019¨\u0006\u001b"}, d2 = {"RESUMED", "", "SUSPENDED", "UNDECIDED", "withContext", "T", "context", "Lkotlin/coroutines/CoroutineContext;", "block", "Lkotlin/Function2;", "Lkotlinx/coroutines/CoroutineScope;", "Lkotlin/coroutines/Continuation;", "", "Lkotlin/ExtensionFunctionType;", "(Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "async", "Lkotlinx/coroutines/Deferred;", "start", "Lkotlinx/coroutines/CoroutineStart;", "(Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lkotlinx/coroutines/CoroutineStart;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/Deferred;", "invoke", "Lkotlinx/coroutines/CoroutineDispatcher;", "(Lkotlinx/coroutines/CoroutineDispatcher;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "launch", "Lkotlinx/coroutines/Job;", "", "(Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lkotlinx/coroutines/CoroutineStart;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/Job;", "kotlinx-coroutines-core"}, k = 5, mv = {1, 6, 0}, xi = 48, xs = "kotlinx/coroutines/BuildersKt")
  /* compiled from: Builders.common.kt */
  final /* synthetic */ class BuildersKt__Builders_commonKt {
      private static final int RESUMED = 2;
      private static final int SUSPENDED = 1;
      private static final int UNDECIDED = 0;
  
      public static final <T> Deferred<T> async(CoroutineScope $this$async, CoroutineContext context, CoroutineStart start, Function2<? super CoroutineScope, ? super Continuation<? super T>, ? extends Object> block) {
          CoroutineContext newCoroutineContext = CoroutineContextKt.newCoroutineContext($this$async, context);
          DeferredCoroutine lazyDeferredCoroutine = start.isLazy() ? new LazyDeferredCoroutine(newCoroutineContext, block) : new DeferredCoroutine(newCoroutineContext, true);
          lazyDeferredCoroutine.start(start, lazyDeferredCoroutine, block);
          return lazyDeferredCoroutine;
      }
  
      public static /* synthetic */ Deferred async$default(CoroutineScope coroutineScope, CoroutineContext coroutineContext, CoroutineStart coroutineStart, Function2 function2, int i, Object obj) {
          if ((i & 1) != 0) {
              coroutineContext = EmptyCoroutineContext.INSTANCE;
          }
          if ((i & 2) != 0) {
              coroutineStart = CoroutineStart.DEFAULT;
          }
          return BuildersKt.async(coroutineScope, coroutineContext, coroutineStart, function2);
      }
  
      public static final <T> Object invoke(CoroutineDispatcher $this$invoke, Function2<? super CoroutineScope, ? super Continuation<? super T>, ? extends Object> block, Continuation<? super T> $completion) {
          return BuildersKt.withContext($this$invoke, block, $completion);
      }
  
      private static final <T> Object invoke$$forInline(CoroutineDispatcher $this$invoke, Function2<? super CoroutineScope, ? super Continuation<? super T>, ? extends Object> block, Continuation<? super T> $completion) {
          InlineMarker.mark(0);
          Object withContext = BuildersKt.withContext($this$invoke, block, $completion);
          InlineMarker.mark(1);
          return withContext;
      }
  
      public static final Job launch(CoroutineScope $this$launch, CoroutineContext context, CoroutineStart start, Function2<? super CoroutineScope, ? super Continuation<? super Unit>, ? extends Object> block) {
          CoroutineContext newCoroutineContext = CoroutineContextKt.newCoroutineContext($this$launch, context);
          StandaloneCoroutine lazyStandaloneCoroutine = start.isLazy() ? new LazyStandaloneCoroutine(newCoroutineContext, block) : new StandaloneCoroutine(newCoroutineContext, true);
          lazyStandaloneCoroutine.start(start, lazyStandaloneCoroutine, block);
          return lazyStandaloneCoroutine;
      }
  
      public static /* synthetic */ Job launch$default(CoroutineScope coroutineScope, CoroutineContext coroutineContext, CoroutineStart coroutineStart, Function2 function2, int i, Object obj) {
          if ((i & 1) != 0) {
              coroutineContext = EmptyCoroutineContext.INSTANCE;
          }
          if ((i & 2) != 0) {
              coroutineStart = CoroutineStart.DEFAULT;
          }
          return BuildersKt.launch(coroutineScope, coroutineContext, coroutineStart, function2);
      }
  
      /* JADX INFO: finally extract failed */
      public static final <T> Object withContext(CoroutineContext context, Function2<? super CoroutineScope, ? super Continuation<? super T>, ? extends Object> block, Continuation<? super T> $completion) {
          Object obj;
          Continuation<? super T> continuation = $completion;
          CoroutineContext context2 = continuation.getContext();
          CoroutineContext newCoroutineContext = CoroutineContextKt.newCoroutineContext(context2, context);
          JobKt.ensureActive(newCoroutineContext);
          if (newCoroutineContext == context2) {
              ScopeCoroutine scopeCoroutine = new ScopeCoroutine(newCoroutineContext, continuation);
              obj = UndispatchedKt.startUndispatchedOrReturn(scopeCoroutine, scopeCoroutine, block);
          } else if (Intrinsics.areEqual((Object) newCoroutineContext.get(ContinuationInterceptor.Key), (Object) context2.get(ContinuationInterceptor.Key))) {
              UndispatchedCoroutine undispatchedCoroutine = new UndispatchedCoroutine(newCoroutineContext, continuation);
              Object updateThreadContext = ThreadContextKt.updateThreadContext(newCoroutineContext, (Object) null);
              try {
                  Object startUndispatchedOrReturn = UndispatchedKt.startUndispatchedOrReturn(undispatchedCoroutine, undispatchedCoroutine, block);
                  ThreadContextKt.restoreThreadContext(newCoroutineContext, updateThreadContext);
                  obj = startUndispatchedOrReturn;
              } catch (Throwable th) {
                  ThreadContextKt.restoreThreadContext(newCoroutineContext, updateThreadContext);
                  throw th;
              }
          } else {
              DispatchedCoroutine dispatchedCoroutine = new DispatchedCoroutine(newCoroutineContext, continuation);
              CancellableKt.startCoroutineCancellable$default(block, dispatchedCoroutine, dispatchedCoroutine, (Function1) null, 4, (Object) null);
              obj = dispatchedCoroutine.getResult();
          }
          if (obj == IntrinsicsKt.getCOROUTINE_SUSPENDED()) {
              DebugProbesKt.probeCoroutineSuspended($completion);
          }
          return obj;
      }
  }
  