content: package kotlin.coroutines.jvm.internal;
  
  import kotlin.Metadata;
  import kotlin.coroutines.Continuation;
  import kotlin.coroutines.ContinuationInterceptor;
  import kotlin.coroutines.CoroutineContext;
  import kotlin.jvm.internal.Intrinsics;
  
  @Metadata(d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\u0002\n\u0000\b!\u0018\u00002\u00020\u0001B\u0019\b\u0016\u0012\u0010\u0010\u0002\u001a\f\u0012\u0006\u0012\u0004\u0018\u00010\u0004\u0018\u00010\u0003¢\u0006\u0002\u0010\u0005B!\u0012\u0010\u0010\u0002\u001a\f\u0012\u0006\u0012\u0004\u0018\u00010\u0004\u0018\u00010\u0003\u0012\b\u0010\u0006\u001a\u0004\u0018\u00010\u0007¢\u0006\u0002\u0010\bJ\u000e\u0010\f\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00040\u0003J\b\u0010\r\u001a\u00020\u000eH\u0014R\u0010\u0010\u0006\u001a\u0004\u0018\u00010\u0007X\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\t\u001a\u00020\u00078VX\u0004¢\u0006\u0006\u001a\u0004\b\n\u0010\u000bR\u0018\u0010\f\u001a\f\u0012\u0006\u0012\u0004\u0018\u00010\u0004\u0018\u00010\u0003X\u000e¢\u0006\u0002\n\u0000¨\u0006\u000f"}, d2 = {"Lkotlin/coroutines/jvm/internal/ContinuationImpl;", "Lkotlin/coroutines/jvm/internal/BaseContinuationImpl;", "completion", "Lkotlin/coroutines/Continuation;", "", "(Lkotlin/coroutines/Continuation;)V", "_context", "Lkotlin/coroutines/CoroutineContext;", "(Lkotlin/coroutines/Continuation;Lkotlin/coroutines/CoroutineContext;)V", "context", "getContext", "()Lkotlin/coroutines/CoroutineContext;", "intercepted", "releaseIntercepted", "", "kotlin-stdlib"}, k = 1, mv = {1, 7, 1}, xi = 48)
  /* compiled from: ContinuationImpl.kt */
  public abstract class ContinuationImpl extends BaseContinuationImpl {
      private final CoroutineContext _context;
      private transient Continuation<Object> intercepted;
  
      /* JADX INFO: this call moved to the top of the method (can break code semantics) */
      public ContinuationImpl(Continuation<Object> completion) {
          this(completion, completion != null ? completion.getContext() : null);
      }
  
      public ContinuationImpl(Continuation<Object> completion, CoroutineContext _context2) {
          super(completion);
          this._context = _context2;
      }
  
      public CoroutineContext getContext() {
          CoroutineContext coroutineContext = this._context;
          Intrinsics.checkNotNull(coroutineContext);
          return coroutineContext;
      }
  
      public final Continuation<Object> intercepted() {
          Continuation<Object> continuation = this.intercepted;
          if (continuation == null) {
              ContinuationInterceptor continuationInterceptor = (ContinuationInterceptor) getContext().get(ContinuationInterceptor.Key);
              if (continuationInterceptor == null || (continuation = continuationInterceptor.interceptContinuation(this)) == null) {
                  continuation = this;
              }
              this.intercepted = continuation;
          }
          return continuation;
      }
  
      /* access modifiers changed from: protected */
      public void releaseIntercepted() {
          Continuation<Object> continuation = this.intercepted;
          if (!(continuation == null || continuation == this)) {
              CoroutineContext.Element element = getContext().get(ContinuationInterceptor.Key);
              Intrinsics.checkNotNull(element);
              ((ContinuationInterceptor) element).releaseInterceptedContinuation(continuation);
          }
          this.intercepted = CompletedContinuation.INSTANCE;
      }
  }
  