package hn;

import java.io.Serializable;
import kotlin.jvm.internal.k;

/* loaded from: classes3.dex */
public abstract class c {

    /* renamed from: p, reason: collision with root package name */
    public static final a f21873p = new a(null);

    /* renamed from: q, reason: collision with root package name */
    private static final c f21874q = ym.b.f52845a.b();

    /* loaded from: classes3.dex */
    public static final class a extends c implements Serializable {
        public /* synthetic */ a(k kVar) {
            this();
        }

        @Override // hn.c
        public int b(int i10) {
            return c.f21874q.b(i10);
        }

        @Override // hn.c
        public int c() {
            return c.f21874q.c();
        }

        @Override // hn.c
        public int d(int i10) {
            return c.f21874q.d(i10);
        }

        @Override // hn.c
        public int e(int i10, int i11) {
            return c.f21874q.e(i10, i11);
        }

        private a() {
        }
    }

    public abstract int b(int i10);

    public abstract int c();

    public abstract int d(int i10);

    public int e(int i10, int i11) {
        int c10;
        int i12;
        int i13;
        int c11;
        boolean z10;
        d.b(i10, i11);
        int i14 = i11 - i10;
        if (i14 > 0 || i14 == Integer.MIN_VALUE) {
            if (((-i14) & i14) == i14) {
                i13 = b(d.c(i14));
                return i10 + i13;
            }
            do {
                c10 = c() >>> 1;
                i12 = c10 % i14;
            } while ((c10 - i12) + (i14 - 1) < 0);
            i13 = i12;
            return i10 + i13;
        }
        do {
            c11 = c();
            z10 = false;
            if (i10 <= c11 && c11 < i11) {
                z10 = true;
            }
        } while (!z10);
        return c11;
    }
}
