package p138.p176.p177.p190.p198;

import p138.p176.p177.p190.p198.InterfaceC3571;
import p138.p176.p177.p190.p239.C4150;

/* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ೲ.ށ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class C3557 implements InterfaceC3571 {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final long f10554;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final long f10555;

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public final int f10556;

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public final long f10557;

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public final int f10558;

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public final long f10559;

    public C3557(long j, long j2, int i, int i2) {
        this.f10554 = j;
        this.f10555 = j2;
        this.f10556 = i2 == -1 ? 1 : i2;
        this.f10558 = i;
        if (j == -1) {
            this.f10557 = -1L;
            this.f10559 = -9223372036854775807L;
        } else {
            this.f10557 = j - j2;
            this.f10559 = m5868(j, j2, i);
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static long m5868(long j, long j2, int i) {
        return ((Math.max(0L, j - j2) * 8) * 1000000) / ((long) i);
    }

    @Override // p138.p176.p177.p190.p198.InterfaceC3571
    /* JADX INFO: renamed from: ؠ */
    public InterfaceC3571.C3572 mo5857(long j) {
        long j2 = this.f10557;
        if (j2 == -1) {
            return new InterfaceC3571.C3572(new C3574(0L, this.f10555));
        }
        long j3 = (((long) this.f10558) * j) / 8000000;
        long j4 = this.f10556;
        long jM6789 = this.f10555 + C4150.m6789((j3 / j4) * j4, 0L, j2 - j4);
        long jM5869 = m5869(jM6789);
        C3574 c3574 = new C3574(jM5869, jM6789);
        if (jM5869 < j) {
            int i = this.f10556;
            if (((long) i) + jM6789 < this.f10554) {
                long j5 = jM6789 + ((long) i);
                return new InterfaceC3571.C3572(c3574, new C3574(m5869(j5), j5));
            }
        }
        return new InterfaceC3571.C3572(c3574);
    }

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public long m5869(long j) {
        return m5868(j, this.f10555, this.f10558);
    }

    @Override // p138.p176.p177.p190.p198.InterfaceC3571
    /* JADX INFO: renamed from: ހ */
    public boolean mo5858() {
        return this.f10557 != -1;
    }

    @Override // p138.p176.p177.p190.p198.InterfaceC3571
    /* JADX INFO: renamed from: ށ */
    public long mo5859() {
        return this.f10559;
    }
}
