package p138.p176.p177.p190.p217.p220.p221;

import android.net.Uri;
import java.util.Collections;
import java.util.List;
import p138.p176.p177.p190.C3431;
import p138.p176.p177.p190.p217.p220.InterfaceC3858;
import p138.p176.p177.p190.p217.p220.p221.AbstractC3882;
import p138.p176.p177.p190.p239.C4150;

/* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ໞ.ޞ.އ.ކ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public abstract class AbstractC3878 {

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

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

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

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public final List<C3873> f12009;

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

    /* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ໞ.ޞ.އ.ކ$ؠ, reason: contains not printable characters */
    public static class C3880 extends AbstractC3878 implements InterfaceC3858 {

        /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
        public final AbstractC3882.AbstractC3883 f12011;

        public C3880(long j, C3431 c3431, String str, AbstractC3882.AbstractC3883 abstractC3883, List<C3873> list) {
            super(j, c3431, str, abstractC3883, list, null);
            this.f12011 = abstractC3883;
        }

        @Override // p138.p176.p177.p190.p217.p220.InterfaceC3858
        /* JADX INFO: renamed from: ֏ */
        public long mo6242(long j) {
            return this.f12011.m6298(j);
        }

        @Override // p138.p176.p177.p190.p217.p220.InterfaceC3858
        /* JADX INFO: renamed from: ֏ */
        public long mo6243(long j, long j2) {
            long j3;
            AbstractC3882.AbstractC3883 abstractC3883 = this.f12011;
            long j4 = abstractC3883.f12018;
            long jMo6295 = abstractC3883.mo6295(j2);
            if (jMo6295 == 0) {
                return j4;
            }
            if (abstractC3883.f12020 == null) {
                j3 = (j / ((abstractC3883.f12019 * 1000000) / abstractC3883.f12016)) + abstractC3883.f12018;
                if (j3 < j4) {
                    return j4;
                }
                if (jMo6295 != -1) {
                    return Math.min(j3, (j4 + jMo6295) - 1);
                }
            } else {
                long j5 = (jMo6295 + j4) - 1;
                j3 = j4;
                while (j3 <= j5) {
                    long j6 = ((j5 - j3) / 2) + j3;
                    long jM6298 = abstractC3883.m6298(j6);
                    if (jM6298 < j) {
                        j3 = j6 + 1;
                    } else {
                        if (jM6298 <= j) {
                            return j6;
                        }
                        j5 = j6 - 1;
                    }
                }
                if (j3 != j4) {
                    return j5;
                }
            }
            return j3;
        }

        @Override // p138.p176.p177.p190.p217.p220.InterfaceC3858
        /* JADX INFO: renamed from: ֏ */
        public boolean mo6244() {
            return this.f12011.mo6297();
        }

        @Override // p138.p176.p177.p190.p217.p220.InterfaceC3858
        /* JADX INFO: renamed from: ؠ */
        public long mo6245() {
            return this.f12011.f12018;
        }

        @Override // p138.p176.p177.p190.p217.p220.InterfaceC3858
        /* JADX INFO: renamed from: ؠ */
        public long mo6246(long j, long j2) {
            AbstractC3882.AbstractC3883 abstractC3883 = this.f12011;
            List<AbstractC3882.C3886> list = abstractC3883.f12020;
            if (list != null) {
                return (list.get((int) (j - abstractC3883.f12018)).f12026 * 1000000) / abstractC3883.f12016;
            }
            int iMo6295 = abstractC3883.mo6295(j2);
            return (iMo6295 == -1 || j != (abstractC3883.f12018 + ((long) iMo6295)) - 1) ? (abstractC3883.f12019 * 1000000) / abstractC3883.f12016 : j2 - abstractC3883.m6298(j);
        }

        @Override // p138.p176.p177.p190.p217.p220.InterfaceC3858
        /* JADX INFO: renamed from: ؠ */
        public C3877 mo6247(long j) {
            return this.f12011.mo6296(this, j);
        }

        @Override // p138.p176.p177.p190.p217.p220.InterfaceC3858
        /* JADX INFO: renamed from: ހ */
        public int mo6248(long j) {
            return this.f12011.mo6295(j);
        }

        @Override // p138.p176.p177.p190.p217.p220.p221.AbstractC3878
        /* JADX INFO: renamed from: ހ */
        public String mo6291() {
            return null;
        }

        @Override // p138.p176.p177.p190.p217.p220.p221.AbstractC3878
        /* JADX INFO: renamed from: ށ */
        public InterfaceC3858 mo6292() {
            return this;
        }

        @Override // p138.p176.p177.p190.p217.p220.p221.AbstractC3878
        /* JADX INFO: renamed from: ނ */
        public C3877 mo6293() {
            return null;
        }
    }

    /* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ໞ.ޞ.އ.ކ$ހ, reason: contains not printable characters */
    public static class C3881 extends AbstractC3878 {

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

        /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
        public final C3877 f12013;

        /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
        public final C3888 f12014;

        public C3881(long j, C3431 c3431, String str, AbstractC3882.C3887 c3887, List<C3873> list, String str2, long j2) {
            super(j, c3431, str, c3887, list, null);
            Uri.parse(str);
            long j3 = c3887.f12028;
            C3877 c3877 = j3 <= 0 ? null : new C3877(null, c3887.f12027, j3);
            this.f12013 = c3877;
            this.f12012 = str2;
            this.f12014 = c3877 == null ? new C3888(new C3877(null, 0L, j2)) : null;
        }

        @Override // p138.p176.p177.p190.p217.p220.p221.AbstractC3878
        /* JADX INFO: renamed from: ހ */
        public String mo6291() {
            return this.f12012;
        }

        @Override // p138.p176.p177.p190.p217.p220.p221.AbstractC3878
        /* JADX INFO: renamed from: ށ */
        public InterfaceC3858 mo6292() {
            return this.f12014;
        }

        @Override // p138.p176.p177.p190.p217.p220.p221.AbstractC3878
        /* JADX INFO: renamed from: ނ */
        public C3877 mo6293() {
            return this.f12013;
        }
    }

    public /* synthetic */ AbstractC3878(long j, C3431 c3431, String str, AbstractC3882 abstractC3882, List list, C3879 c3879) {
        this.f12006 = c3431;
        this.f12007 = str;
        this.f12009 = list == null ? Collections.emptyList() : Collections.unmodifiableList(list);
        this.f12010 = abstractC3882.mo6294(this);
        this.f12008 = C4150.m6797(abstractC3882.f12017, 1000000L, abstractC3882.f12016);
    }

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public abstract String mo6291();

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public abstract InterfaceC3858 mo6292();

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public abstract C3877 mo6293();
}
