content: package kotlin.sequences;
  
  import java.util.Iterator;
  import kotlin.Metadata;
  import kotlin.ResultKt;
  import kotlin.Unit;
  import kotlin.coroutines.Continuation;
  import kotlin.coroutines.intrinsics.IntrinsicsKt;
  import kotlin.coroutines.jvm.internal.DebugMetadata;
  import kotlin.coroutines.jvm.internal.RestrictedSuspendLambda;
  import kotlin.jvm.functions.Function0;
  import kotlin.jvm.functions.Function2;
  
  @Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u0003H@"}, d2 = {"<anonymous>", "", "T", "Lkotlin/sequences/SequenceScope;"}, k = 3, mv = {1, 7, 1}, xi = 48)
  @DebugMetadata(c = "kotlin.sequences.SequencesKt__SequencesKt$ifEmpty$1", f = "Sequences.kt", i = {}, l = {69, 71}, m = "invokeSuspend", n = {}, s = {})
  /* compiled from: Sequences.kt */
  final class SequencesKt__SequencesKt$ifEmpty$1 extends RestrictedSuspendLambda implements Function2<SequenceScope<? super T>, Continuation<? super Unit>, Object> {
      final /* synthetic */ Function0<Sequence<T>> $defaultValue;
      final /* synthetic */ Sequence<T> $this_ifEmpty;
      private /* synthetic */ Object L$0;
      int label;
  
      /* JADX INFO: super call moved to the top of the method (can break code semantics) */
      SequencesKt__SequencesKt$ifEmpty$1(Sequence<? extends T> sequence, Function0<? extends Sequence<? extends T>> function0, Continuation<? super SequencesKt__SequencesKt$ifEmpty$1> continuation) {
          super(2, continuation);
          this.$this_ifEmpty = sequence;
          this.$defaultValue = function0;
      }
  
      public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
          SequencesKt__SequencesKt$ifEmpty$1 sequencesKt__SequencesKt$ifEmpty$1 = new SequencesKt__SequencesKt$ifEmpty$1(this.$this_ifEmpty, this.$defaultValue, continuation);
          sequencesKt__SequencesKt$ifEmpty$1.L$0 = obj;
          return sequencesKt__SequencesKt$ifEmpty$1;
      }
  
      public final Object invoke(SequenceScope<? super T> sequenceScope, Continuation<? super Unit> continuation) {
          return ((SequencesKt__SequencesKt$ifEmpty$1) create(sequenceScope, continuation)).invokeSuspend(Unit.INSTANCE);
      }
  
      public final Object invokeSuspend(Object obj) {
          Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
          switch (this.label) {
              case 0:
                  ResultKt.throwOnFailure(obj);
                  SequenceScope sequenceScope = (SequenceScope) this.L$0;
                  Iterator<T> it = this.$this_ifEmpty.iterator();
                  if (!it.hasNext()) {
                      this.label = 2;
                      if (sequenceScope.yieldAll(this.$defaultValue.invoke(), (Continuation<? super Unit>) this) != coroutine_suspended) {
                          break;
                      } else {
                          return coroutine_suspended;
                      }
                  } else {
                      this.label = 1;
                      if (sequenceScope.yieldAll(it, (Continuation<? super Unit>) this) != coroutine_suspended) {
                          break;
                      } else {
                          return coroutine_suspended;
                      }
                  }
              case 1:
                  ResultKt.throwOnFailure(obj);
                  break;
              case 2:
                  ResultKt.throwOnFailure(obj);
                  break;
              default:
                  throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
          }
          return Unit.INSTANCE;
      }
  }
  