content: package kotlinx.coroutines;
  
  import kotlin.Metadata;
  import kotlin.Unit;
  import kotlin.coroutines.Continuation;
  import kotlin.coroutines.CoroutineContext;
  import kotlin.coroutines.intrinsics.IntrinsicsKt;
  import kotlin.coroutines.jvm.internal.DebugProbesKt;
  import kotlinx.coroutines.internal.DispatchedContinuation;
  import kotlinx.coroutines.internal.DispatchedContinuationKt;
  
  @Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u001a\u0011\u0010\u0000\u001a\u00020\u0001H@ø\u0001\u0000¢\u0006\u0002\u0010\u0002\u0002\u0004\n\u0002\b\u0019¨\u0006\u0003"}, d2 = {"yield", "", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "kotlinx-coroutines-core"}, k = 2, mv = {1, 6, 0}, xi = 48)
  /* compiled from: Yield.kt */
  public final class YieldKt {
      public static final Object yield(Continuation<? super Unit> $completion) {
          Object obj;
          Continuation<? super Unit> continuation = $completion;
          CoroutineContext context = continuation.getContext();
          JobKt.ensureActive(context);
          Continuation<? super Unit> intercepted = IntrinsicsKt.intercepted(continuation);
          DispatchedContinuation dispatchedContinuation = intercepted instanceof DispatchedContinuation ? (DispatchedContinuation) intercepted : null;
          if (dispatchedContinuation == null) {
              obj = Unit.INSTANCE;
          } else {
              if (dispatchedContinuation.dispatcher.isDispatchNeeded(context)) {
                  dispatchedContinuation.dispatchYield$kotlinx_coroutines_core(context, Unit.INSTANCE);
              } else {
                  YieldContext yieldContext = new YieldContext();
                  dispatchedContinuation.dispatchYield$kotlinx_coroutines_core(context.plus(yieldContext), Unit.INSTANCE);
                  if (yieldContext.dispatcherWasUnconfined) {
                      obj = DispatchedContinuationKt.yieldUndispatched(dispatchedContinuation) ? IntrinsicsKt.getCOROUTINE_SUSPENDED() : Unit.INSTANCE;
                  }
              }
              obj = IntrinsicsKt.getCOROUTINE_SUSPENDED();
          }
          if (obj == IntrinsicsKt.getCOROUTINE_SUSPENDED()) {
              DebugProbesKt.probeCoroutineSuspended($completion);
          }
          return obj == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? obj : Unit.INSTANCE;
      }
  }
  