package defpackage;

import java.math.RoundingMode;
import java.util.List;

/* JADX INFO: renamed from: ᵕᵪ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public abstract class AbstractC2349 extends AbstractC4434 {

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public final long f9213;

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final long f9214;

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public final long f9215;

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final long f9216;

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public final long f9217;

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public final List f9218;

    public AbstractC2349(C4281 c4281, long j, long j2, long j3, long j4, List list, long j5, long j6, long j7) {
        super(c4281, j, j2);
        this.f9216 = j3;
        this.f9214 = j4;
        this.f9218 = list;
        this.f9217 = j5;
        this.f9215 = j6;
        this.f9213 = j7;
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final long m6024(long j, long j2) {
        long jMo5788 = mo5788(j);
        return jMo5788 != -1 ? jMo5788 : (int) (m6029((j2 - this.f9213) + this.f9217, j) - m6025(j, j2));
    }

    /* JADX INFO: renamed from: ˊᵫᵗ */
    public abstract C4281 mo5786(C0847 c0847, long j);

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final long m6025(long j, long j2) {
        long jMo5788 = mo5788(j);
        long j3 = this.f9216;
        if (jMo5788 == -1) {
            long j4 = this.f9215;
            if (j4 != -9223372036854775807L) {
                return Math.max(j3, m6029((j2 - this.f9213) - j4, j));
            }
        }
        return j3;
    }

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final long m6026(long j, long j2) {
        long j3 = this.f16865;
        long j4 = this.f9216;
        List list = this.f9218;
        if (list != null) {
            return (((C4327) list.get((int) (j - j4))).f16467 * 1000000) / j3;
        }
        long jMo5788 = mo5788(j2);
        return (jMo5788 == -1 || j != (j4 + jMo5788) - 1) ? (this.f9214 * 1000000) / j3 : j2 - m6027(j);
    }

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public final long m6027(long j) {
        List list = this.f9218;
        long j2 = this.f9216;
        long j3 = list != null ? ((C4327) list.get((int) (j - j2))).f16468 - this.f16866 : (j - j2) * this.f9214;
        String str = AbstractC0956.f4222;
        return AbstractC0956.m3218(j3, 1000000L, this.f16865, RoundingMode.DOWN);
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ */
    public abstract long mo5788(long j);

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public boolean mo6028() {
        return this.f9218 != null;
    }

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public final long m6029(long j, long j2) {
        long jMo5788 = mo5788(j2);
        long j3 = this.f9216;
        if (jMo5788 != 0) {
            if (this.f9218 != null) {
                long j4 = (jMo5788 + j3) - 1;
                long j5 = j3;
                while (j5 <= j4) {
                    long j6 = ((j4 - j5) / 2) + j5;
                    long jM6027 = m6027(j6);
                    if (jM6027 < j) {
                        j5 = j6 + 1;
                    } else {
                        if (jM6027 <= j) {
                            return j6;
                        }
                        j4 = j6 - 1;
                    }
                }
                return j5 == j3 ? j5 : j4;
            }
            long j7 = (j / ((this.f9214 * 1000000) / this.f16865)) + j3;
            if (j7 >= j3) {
                return jMo5788 == -1 ? j7 : Math.min(j7, (j3 + jMo5788) - 1);
            }
        }
        return j3;
    }
}
