content: /*
   * Decompiled with CFR 0.153-SNAPSHOT (d6f6758-dirty).
   */
  package kotlin.sequences;
  
  import java.math.BigDecimal;
  import java.math.BigInteger;
  import java.util.Collection;
  import java.util.Comparator;
  import java.util.Iterator;
  import java.util.SortedSet;
  import java.util.TreeSet;
  import kotlin.Metadata;
  import kotlin.OverloadResolutionByLambdaReturnType;
  import kotlin.SinceKotlin;
  import kotlin.internal.InlineOnly;
  import kotlin.jvm.JvmName;
  import kotlin.jvm.functions.Function1;
  import kotlin.jvm.internal.Intrinsics;
  import kotlin.sequences.Sequence;
  import kotlin.sequences.SequencesKt;
  import kotlin.sequences.SequencesKt__SequencesKt;
  import org.jetbrains.annotations.NotNull;
  import org.jetbrains.annotations.Nullable;
  
  @Metadata(mv={1, 4, 0}, bv={1, 0, 3}, k=5, xi=1, d1={"\u0000D\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u001f\n\u0002\b\u0003\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\u0010\u000f\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u001a(\u0010\u0000\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\u0006\u0012\u0002\b\u00030\u00012\f\u0010\u0003\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0004\u001aA\u0010\u0005\u001a\u0002H\u0006\"\u0010\b\u0000\u0010\u0006*\n\u0012\u0006\b\u0000\u0012\u0002H\u00020\u0007\"\u0004\b\u0001\u0010\u0002*\u0006\u0012\u0002\b\u00030\u00012\u0006\u0010\b\u001a\u0002H\u00062\f\u0010\u0003\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0004\u00a2\u0006\u0002\u0010\t\u001a5\u0010\n\u001a\u00020\u000b\"\u0004\b\u0000\u0010\f*\b\u0012\u0004\u0012\u0002H\f0\u00012\u0012\u0010\r\u001a\u000e\u0012\u0004\u0012\u0002H\f\u0012\u0004\u0012\u00020\u000b0\u000eH\u0087\b\u00f8\u0001\u0000\u00a2\u0006\u0002\b\u000f\u001a5\u0010\n\u001a\u00020\u0010\"\u0004\b\u0000\u0010\f*\b\u0012\u0004\u0012\u0002H\f0\u00012\u0012\u0010\r\u001a\u000e\u0012\u0004\u0012\u0002H\f\u0012\u0004\u0012\u00020\u00100\u000eH\u0087\b\u00f8\u0001\u0000\u00a2\u0006\u0002\b\u0011\u001a&\u0010\u0012\u001a\b\u0012\u0004\u0012\u0002H\f0\u0013\"\u000e\b\u0000\u0010\f*\b\u0012\u0004\u0012\u0002H\f0\u0014*\b\u0012\u0004\u0012\u0002H\f0\u0001\u001a8\u0010\u0012\u001a\b\u0012\u0004\u0012\u0002H\f0\u0013\"\u0004\b\u0000\u0010\f*\b\u0012\u0004\u0012\u0002H\f0\u00012\u001a\u0010\u0015\u001a\u0016\u0012\u0006\b\u0000\u0012\u0002H\f0\u0016j\n\u0012\u0006\b\u0000\u0012\u0002H\f`\u0017\u0082\u0002\u0007\n\u0005\b\u009920\u0001\u00a8\u0006\u0018"}, d2={"filterIsInstance", "Lkotlin/sequences/Sequence;", "R", "klass", "Ljava/lang/Class;", "filterIsInstanceTo", "C", "", "destination", "(Lkotlin/sequences/Sequence;Ljava/util/Collection;Ljava/lang/Class;)Ljava/util/Collection;", "sumOf", "Ljava/math/BigDecimal;", "T", "selector", "Lkotlin/Function1;", "sumOfBigDecimal", "Ljava/math/BigInteger;", "sumOfBigInteger", "toSortedSet", "Ljava/util/SortedSet;", "", "comparator", "Ljava/util/Comparator;", "Lkotlin/Comparator;", "kotlin-stdlib"}, xs="kotlin/sequences/SequencesKt")
  class SequencesKt___SequencesJvmKt
  extends SequencesKt__SequencesKt {
      @NotNull
      public static final <R> Sequence<R> filterIsInstance(@NotNull Sequence<?> $this$filterIsInstance, @NotNull Class<R> klass) {
          Intrinsics.checkNotNullParameter($this$filterIsInstance, "$this$filterIsInstance");
          Intrinsics.checkNotNullParameter(klass, "klass");
          Sequence<?> sequence = SequencesKt.filter($this$filterIsInstance, (Function1)new Function1<Object, Boolean>(klass){
              final /* synthetic */ Class $klass;
  
              public final boolean invoke(@Nullable Object it) {
                  return this.$klass.isInstance(it);
              }
              {
                  this.$klass = clazz;
                  super(1);
              }
          });
          if (sequence == null) {
              throw new NullPointerException("null cannot be cast to non-null type kotlin.sequences.Sequence<R>");
          }
          return sequence;
      }
  
      @NotNull
      public static final <C extends Collection<? super R>, R> C filterIsInstanceTo(@NotNull Sequence<?> $this$filterIsInstanceTo, @NotNull C destination, @NotNull Class<R> klass) {
          Intrinsics.checkNotNullParameter($this$filterIsInstanceTo, "$this$filterIsInstanceTo");
          Intrinsics.checkNotNullParameter(destination, "destination");
          Intrinsics.checkNotNullParameter(klass, "klass");
          Iterator<?> iterator2 = $this$filterIsInstanceTo.iterator();
          while (iterator2.hasNext()) {
              Object element = iterator2.next();
              if (!klass.isInstance(element)) continue;
              destination.add(element);
          }
          return destination;
      }
  
      @NotNull
      public static final <T extends Comparable<? super T>> SortedSet<T> toSortedSet(@NotNull Sequence<? extends T> $this$toSortedSet) {
          Intrinsics.checkNotNullParameter($this$toSortedSet, "$this$toSortedSet");
          return (SortedSet)SequencesKt.toCollection($this$toSortedSet, (Collection)new TreeSet());
      }
  
      @NotNull
      public static final <T> SortedSet<T> toSortedSet(@NotNull Sequence<? extends T> $this$toSortedSet, @NotNull Comparator<? super T> comparator) {
          Intrinsics.checkNotNullParameter($this$toSortedSet, "$this$toSortedSet");
          Intrinsics.checkNotNullParameter(comparator, "comparator");
          return (SortedSet)SequencesKt.toCollection($this$toSortedSet, (Collection)new TreeSet<T>(comparator));
      }
  
      @SinceKotlin(version="1.4")
      @OverloadResolutionByLambdaReturnType
      @JvmName(name="sumOfBigDecimal")
      @InlineOnly
      private static final <T> BigDecimal sumOfBigDecimal(Sequence<? extends T> $this$sumOf, Function1<? super T, ? extends BigDecimal> selector) {
          int $i$f$sumOfBigDecimal = 0;
          int n = 0;
          boolean bl = false;
          BigDecimal bigDecimal = BigDecimal.valueOf(n);
          Intrinsics.checkNotNullExpressionValue(bigDecimal, "BigDecimal.valueOf(this.toLong())");
          BigDecimal sum = bigDecimal;
          Iterator<T> iterator2 = $this$sumOf.iterator();
          while (iterator2.hasNext()) {
              T element = iterator2.next();
              BigDecimal bigDecimal2 = sum;
              BigDecimal bigDecimal3 = selector.invoke(element);
              boolean bl2 = false;
              Intrinsics.checkNotNullExpressionValue(bigDecimal2.add(bigDecimal3), "this.add(other)");
          }
          return sum;
      }
  
      @SinceKotlin(version="1.4")
      @OverloadResolutionByLambdaReturnType
      @JvmName(name="sumOfBigInteger")
      @InlineOnly
      private static final <T> BigInteger sumOfBigInteger(Sequence<? extends T> $this$sumOf, Function1<? super T, ? extends BigInteger> selector) {
          int $i$f$sumOfBigInteger = 0;
          int n = 0;
          boolean bl = false;
          BigInteger bigInteger = BigInteger.valueOf(n);
          Intrinsics.checkNotNullExpressionValue(bigInteger, "BigInteger.valueOf(this.toLong())");
          BigInteger sum = bigInteger;
          Iterator<T> iterator2 = $this$sumOf.iterator();
          while (iterator2.hasNext()) {
              T element = iterator2.next();
              BigInteger bigInteger2 = sum;
              BigInteger bigInteger3 = selector.invoke(element);
              boolean bl2 = false;
              Intrinsics.checkNotNullExpressionValue(bigInteger2.add(bigInteger3), "this.add(other)");
          }
          return sum;
      }
  }
  
  