content: package kotlin.internal;
  
  import kotlin.Metadata;
  import kotlin.UInt;
  import kotlin.ULong;
  import kotlin.UnsignedKt;
  
  @Metadata(d1 = {"\u0000 \n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\b\n\u0000\n\u0002\u0010\t\n\u0002\b\u0002\u001a*\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00012\u0006\u0010\u0003\u001a\u00020\u00012\u0006\u0010\u0004\u001a\u00020\u0001H\u0002ø\u0001\u0000¢\u0006\u0004\b\u0005\u0010\u0006\u001a*\u0010\u0000\u001a\u00020\u00072\u0006\u0010\u0002\u001a\u00020\u00072\u0006\u0010\u0003\u001a\u00020\u00072\u0006\u0010\u0004\u001a\u00020\u0007H\u0002ø\u0001\u0000¢\u0006\u0004\b\b\u0010\t\u001a*\u0010\n\u001a\u00020\u00012\u0006\u0010\u000b\u001a\u00020\u00012\u0006\u0010\f\u001a\u00020\u00012\u0006\u0010\r\u001a\u00020\u000eH\u0001ø\u0001\u0000¢\u0006\u0004\b\u000f\u0010\u0006\u001a*\u0010\n\u001a\u00020\u00072\u0006\u0010\u000b\u001a\u00020\u00072\u0006\u0010\f\u001a\u00020\u00072\u0006\u0010\r\u001a\u00020\u0010H\u0001ø\u0001\u0000¢\u0006\u0004\b\u0011\u0010\t\u0002\u0004\n\u0002\b\u0019¨\u0006\u0012"}, d2 = {"differenceModulo", "Lkotlin/UInt;", "a", "b", "c", "differenceModulo-WZ9TVnA", "(III)I", "Lkotlin/ULong;", "differenceModulo-sambcqE", "(JJJ)J", "getProgressionLastElement", "start", "end", "step", "", "getProgressionLastElement-Nkh28Cs", "", "getProgressionLastElement-7ftBX0g", "kotlin-stdlib"}, k = 2, mv = {1, 7, 1}, xi = 48)
  /* compiled from: UProgressionUtil.kt */
  public final class UProgressionUtilKt {
      /* renamed from: differenceModulo-WZ9TVnA  reason: not valid java name */
      private static final int m1244differenceModuloWZ9TVnA(int a, int b, int c) {
          int r0 = UnsignedKt.m384uintRemainderJ1ME1BU(a, c);
          int r1 = UnsignedKt.m384uintRemainderJ1ME1BU(b, c);
          return UInt.m130constructorimpl(UnsignedKt.uintCompare(r0, r1) >= 0 ? r0 - r1 : UInt.m130constructorimpl(r0 - r1) + c);
      }
  
      /* renamed from: differenceModulo-sambcqE  reason: not valid java name */
      private static final long m1245differenceModulosambcqE(long a, long b, long c) {
          long r0 = UnsignedKt.m386ulongRemaindereb3DHEI(a, c);
          long r2 = UnsignedKt.m386ulongRemaindereb3DHEI(b, c);
          return ULong.m208constructorimpl(UnsignedKt.ulongCompare(r0, r2) >= 0 ? r0 - r2 : ULong.m208constructorimpl(r0 - r2) + c);
      }
  
      /* renamed from: getProgressionLastElement-7ftBX0g  reason: not valid java name */
      public static final long m1246getProgressionLastElement7ftBX0g(long start, long end, long step) {
          if (step > 0) {
              if (UnsignedKt.ulongCompare(start, end) < 0) {
                  return ULong.m208constructorimpl(end - m1245differenceModulosambcqE(end, start, ULong.m208constructorimpl(step)));
              }
          } else if (step >= 0) {
              throw new IllegalArgumentException("Step is zero.");
          } else if (UnsignedKt.ulongCompare(start, end) > 0) {
              return ULong.m208constructorimpl(m1245differenceModulosambcqE(start, end, ULong.m208constructorimpl(-step)) + end);
          }
          return end;
      }
  
      /* renamed from: getProgressionLastElement-Nkh28Cs  reason: not valid java name */
      public static final int m1247getProgressionLastElementNkh28Cs(int start, int end, int step) {
          if (step > 0) {
              if (UnsignedKt.uintCompare(start, end) < 0) {
                  return UInt.m130constructorimpl(end - m1244differenceModuloWZ9TVnA(end, start, UInt.m130constructorimpl(step)));
              }
          } else if (step >= 0) {
              throw new IllegalArgumentException("Step is zero.");
          } else if (UnsignedKt.uintCompare(start, end) > 0) {
              return UInt.m130constructorimpl(m1244differenceModuloWZ9TVnA(start, end, UInt.m130constructorimpl(-step)) + end);
          }
          return end;
      }
  }
  