content: package kotlin.comparisons;
  
  import java.util.Comparator;
  import kotlin.Metadata;
  import kotlin.jvm.internal.Intrinsics;
  
  @Metadata(d1 = {"\u0000\u0018\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0011\n\u0002\b\u0003\u001aG\u0010\u0000\u001a\u0002H\u0001\"\u0004\b\u0000\u0010\u00012\u0006\u0010\u0002\u001a\u0002H\u00012\u0006\u0010\u0003\u001a\u0002H\u00012\u0006\u0010\u0004\u001a\u0002H\u00012\u001a\u0010\u0005\u001a\u0016\u0012\u0006\b\u0000\u0012\u0002H\u00010\u0006j\n\u0012\u0006\b\u0000\u0012\u0002H\u0001`\u0007H\u0007¢\u0006\u0002\u0010\b\u001a?\u0010\u0000\u001a\u0002H\u0001\"\u0004\b\u0000\u0010\u00012\u0006\u0010\u0002\u001a\u0002H\u00012\u0006\u0010\u0003\u001a\u0002H\u00012\u001a\u0010\u0005\u001a\u0016\u0012\u0006\b\u0000\u0012\u0002H\u00010\u0006j\n\u0012\u0006\b\u0000\u0012\u0002H\u0001`\u0007H\u0007¢\u0006\u0002\u0010\t\u001aK\u0010\u0000\u001a\u0002H\u0001\"\u0004\b\u0000\u0010\u00012\u0006\u0010\u0002\u001a\u0002H\u00012\u0012\u0010\n\u001a\n\u0012\u0006\b\u0001\u0012\u0002H\u00010\u000b\"\u0002H\u00012\u001a\u0010\u0005\u001a\u0016\u0012\u0006\b\u0000\u0012\u0002H\u00010\u0006j\n\u0012\u0006\b\u0000\u0012\u0002H\u0001`\u0007H\u0007¢\u0006\u0002\u0010\f\u001aG\u0010\r\u001a\u0002H\u0001\"\u0004\b\u0000\u0010\u00012\u0006\u0010\u0002\u001a\u0002H\u00012\u0006\u0010\u0003\u001a\u0002H\u00012\u0006\u0010\u0004\u001a\u0002H\u00012\u001a\u0010\u0005\u001a\u0016\u0012\u0006\b\u0000\u0012\u0002H\u00010\u0006j\n\u0012\u0006\b\u0000\u0012\u0002H\u0001`\u0007H\u0007¢\u0006\u0002\u0010\b\u001a?\u0010\r\u001a\u0002H\u0001\"\u0004\b\u0000\u0010\u00012\u0006\u0010\u0002\u001a\u0002H\u00012\u0006\u0010\u0003\u001a\u0002H\u00012\u001a\u0010\u0005\u001a\u0016\u0012\u0006\b\u0000\u0012\u0002H\u00010\u0006j\n\u0012\u0006\b\u0000\u0012\u0002H\u0001`\u0007H\u0007¢\u0006\u0002\u0010\t\u001aK\u0010\r\u001a\u0002H\u0001\"\u0004\b\u0000\u0010\u00012\u0006\u0010\u0002\u001a\u0002H\u00012\u0012\u0010\n\u001a\n\u0012\u0006\b\u0001\u0012\u0002H\u00010\u000b\"\u0002H\u00012\u001a\u0010\u0005\u001a\u0016\u0012\u0006\b\u0000\u0012\u0002H\u00010\u0006j\n\u0012\u0006\b\u0000\u0012\u0002H\u0001`\u0007H\u0007¢\u0006\u0002\u0010\f¨\u0006\u000e"}, d2 = {"maxOf", "T", "a", "b", "c", "comparator", "Ljava/util/Comparator;", "Lkotlin/Comparator;", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/util/Comparator;)Ljava/lang/Object;", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/util/Comparator;)Ljava/lang/Object;", "other", "", "(Ljava/lang/Object;[Ljava/lang/Object;Ljava/util/Comparator;)Ljava/lang/Object;", "minOf", "kotlin-stdlib"}, k = 5, mv = {1, 7, 1}, xi = 49, xs = "kotlin/comparisons/ComparisonsKt")
  /* compiled from: _Comparisons.kt */
  class ComparisonsKt___ComparisonsKt extends ComparisonsKt___ComparisonsJvmKt {
      public static final <T> T maxOf(T a, T b, T c, Comparator<? super T> comparator) {
          Intrinsics.checkNotNullParameter(comparator, "comparator");
          return ComparisonsKt.maxOf(a, (T) ComparisonsKt.maxOf(b, c, comparator), comparator);
      }
  
      public static final <T> T maxOf(T a, T b, Comparator<? super T> comparator) {
          Intrinsics.checkNotNullParameter(comparator, "comparator");
          return comparator.compare(a, b) >= 0 ? a : b;
      }
  
      public static final <T> T maxOf(T a, T[] other, Comparator<? super T> comparator) {
          Intrinsics.checkNotNullParameter(other, "other");
          Intrinsics.checkNotNullParameter(comparator, "comparator");
          T t = a;
          for (T t2 : other) {
              if (comparator.compare(t, t2) < 0) {
                  t = t2;
              }
          }
          return t;
      }
  
      public static final <T> T minOf(T a, T b, T c, Comparator<? super T> comparator) {
          Intrinsics.checkNotNullParameter(comparator, "comparator");
          return ComparisonsKt.minOf(a, (T) ComparisonsKt.minOf(b, c, comparator), comparator);
      }
  
      public static final <T> T minOf(T a, T b, Comparator<? super T> comparator) {
          Intrinsics.checkNotNullParameter(comparator, "comparator");
          return comparator.compare(a, b) <= 0 ? a : b;
      }
  
      public static final <T> T minOf(T a, T[] other, Comparator<? super T> comparator) {
          Intrinsics.checkNotNullParameter(other, "other");
          Intrinsics.checkNotNullParameter(comparator, "comparator");
          T t = a;
          for (T t2 : other) {
              if (comparator.compare(t, t2) > 0) {
                  t = t2;
              }
          }
          return t;
      }
  }
  