package defpackage;

/* renamed from: ᵰʽᵩᵽ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C4327 implements InterfaceC4887 {

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public final long f16195;

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public final long[] f16196;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public final long f16197;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final long f16198;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final long f16199;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final int f16200;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final int f16201;

    public C4327(long j, int i, long j2, int i2, long j3, long[] jArr) {
        this.f16199 = j;
        this.f16200 = i;
        this.f16198 = j2;
        this.f16201 = i2;
        this.f16195 = j3;
        this.f16196 = jArr;
        this.f16197 = j3 != -1 ? j + j3 : -1L;
    }

    @Override // defpackage.InterfaceC5013
    /* renamed from: ˇʼʤˎ */
    public final C0611 mo1072(long j) {
        double d;
        double d2;
        boolean zMo1074 = mo1074();
        int i = this.f16200;
        long j2 = this.f16199;
        if (!zMo1074) {
            C5531 c5531 = new C5531(0L, j2 + i);
            return new C0611(c5531, c5531);
        }
        long jM8153 = AbstractC3558.m8153(j, 0L, this.f16198);
        double d3 = (jM8153 * 100.0d) / this.f16198;
        double d4 = 0.0d;
        if (d3 <= 0.0d) {
            d = 256.0d;
        } else if (d3 >= 100.0d) {
            d = 256.0d;
            d4 = 256.0d;
        } else {
            int i2 = (int) d3;
            long[] jArr = this.f16196;
            jArr.getClass();
            double d5 = jArr[i2];
            if (i2 == 99) {
                d = 256.0d;
                d2 = 256.0d;
            } else {
                d = 256.0d;
                d2 = jArr[i2 + 1];
            }
            d4 = ((d2 - d5) * (d3 - i2)) + d5;
        }
        long j3 = this.f16195;
        C5531 c55312 = new C5531(jM8153, j2 + AbstractC3558.m8153(Math.round((d4 / d) * j3), i, j3 - 1));
        return new C0611(c55312, c55312);
    }

    @Override // defpackage.InterfaceC5013
    /* renamed from: ˎˏʜʾ */
    public final long mo1073() {
        return this.f16198;
    }

    @Override // defpackage.InterfaceC4887
    /* renamed from: ˏˋٴ */
    public final int mo7005() {
        return this.f16201;
    }

    @Override // defpackage.InterfaceC5013
    /* renamed from: ˏᵙ */
    public final boolean mo1074() {
        return this.f16196 != null;
    }

    @Override // defpackage.InterfaceC4887
    /* renamed from: ᵥᵯˎ */
    public final long mo7006(long j) {
        long j2 = j - this.f16199;
        if (!mo1074() || j2 <= this.f16200) {
            return 0L;
        }
        long[] jArr = this.f16196;
        jArr.getClass();
        double d = (j2 * 256.0d) / this.f16195;
        int iM8119 = AbstractC3558.m8119(jArr, (long) d, true);
        long j3 = this.f16198;
        long j4 = (iM8119 * j3) / 100;
        long j5 = jArr[iM8119];
        int i = iM8119 + 1;
        long j6 = (j3 * i) / 100;
        return Math.round((j5 == (iM8119 == 99 ? 256L : jArr[i]) ? 0.0d : (d - j5) / (r0 - j5)) * (j6 - j4)) + j4;
    }

    @Override // defpackage.InterfaceC4887
    /* renamed from: ᵴᵳ */
    public final long mo7007() {
        return this.f16197;
    }

    @Override // defpackage.InterfaceC5013
    /* renamed from: ᵻᵢﹳᵰ */
    public final /* synthetic */ boolean mo1075() {
        return false;
    }
}
