package defpackage;

/* renamed from: ˈʜﾞˆ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C0999 implements InterfaceC4315 {

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

    /* renamed from: ˌᵜᵹᵩ, reason: contains not printable characters */
    public long f4414;

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public String f4415;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public InterfaceC2154 f4416;

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

    /* renamed from: ᵝᵵᵺ, reason: contains not printable characters */
    public int f4418;

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

    /* renamed from: ᵪʩ, reason: contains not printable characters */
    public long f4420;

    /* renamed from: ᵯٴᵦ, reason: contains not printable characters */
    public int f4421;

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

    /* renamed from: ᵶᵷᵕ, reason: contains not printable characters */
    public boolean f4423;

    /* renamed from: ᵸˑ, reason: contains not printable characters */
    public boolean f4424;

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public int f4425 = 0;

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

    public C0999(int i, String str, String str2) {
        C3493 c3493 = new C3493(4);
        this.f4419 = c3493;
        c3493.f13082[0] = -1;
        this.f4422 = new C1295();
        this.f4420 = -9223372036854775807L;
        this.f4417 = str;
        this.f4426 = i;
        this.f4413 = str2;
    }

    @Override // defpackage.InterfaceC4315
    /* renamed from: ˇʼʤˎ */
    public final void mo1771(long j, int i) {
        this.f4420 = j;
    }

    @Override // defpackage.InterfaceC4315
    /* renamed from: ˏˋٴ */
    public final void mo1772(InterfaceC1982 interfaceC1982, C4996 c4996) {
        c4996.m10451();
        c4996.m10452();
        this.f4415 = c4996.f18544;
        c4996.m10452();
        this.f4416 = interfaceC1982.mo4996(c4996.f18548, 1);
    }

    @Override // defpackage.InterfaceC4315
    /* renamed from: ˏᵙ */
    public final void mo1773() {
        this.f4425 = 0;
        this.f4418 = 0;
        this.f4424 = false;
        this.f4420 = -9223372036854775807L;
    }

    @Override // defpackage.InterfaceC4315
    /* renamed from: ᵥᵯˎ */
    public final void mo1774(C3493 c3493) {
        this.f4416.getClass();
        while (c3493.m7959() > 0) {
            int i = this.f4425;
            C3493 c34932 = this.f4419;
            if (i == 0) {
                byte[] bArr = c3493.f13082;
                int i2 = c3493.f13083;
                int i3 = c3493.f13081;
                while (true) {
                    if (i2 >= i3) {
                        c3493.m7955(i3);
                        break;
                    }
                    byte b = bArr[i2];
                    boolean z = (b & 255) == 255;
                    boolean z2 = this.f4424 && (b & 224) == 224;
                    this.f4424 = z;
                    if (z2) {
                        c3493.m7955(i2 + 1);
                        this.f4424 = false;
                        c34932.f13082[1] = bArr[i2];
                        this.f4418 = 2;
                        this.f4425 = 1;
                        break;
                    }
                    i2++;
                }
            } else if (i == 1) {
                int iMin = Math.min(c3493.m7959(), 4 - this.f4418);
                c3493.m7970(c34932.f13082, this.f4418, iMin);
                int i4 = this.f4418 + iMin;
                this.f4418 = i4;
                if (i4 >= 4) {
                    c34932.m7955(0);
                    int iM7965 = c34932.m7965();
                    C1295 c1295 = this.f4422;
                    if (c1295.m4015(iM7965)) {
                        this.f4421 = c1295.f5373;
                        if (!this.f4423) {
                            this.f4414 = (c1295.f5370 * 1000000) / c1295.f5371;
                            C2153 c2153 = new C2153();
                            c2153.f8512 = this.f4415;
                            c2153.f8518 = AbstractC2924.m7101(this.f4413);
                            c2153.f8516 = AbstractC2924.m7101((String) c1295.f5369);
                            c2153.f8519 = 4096;
                            c2153.f8517 = c1295.f5374;
                            c2153.f8513 = c1295.f5371;
                            c2153.f8527 = this.f4417;
                            c2153.f8497 = this.f4426;
                            this.f4416.mo4407(new C3446(c2153));
                            this.f4423 = true;
                        }
                        c34932.m7955(0);
                        this.f4416.mo4406(4, c34932);
                        this.f4425 = 2;
                    } else {
                        this.f4418 = 0;
                        this.f4425 = 1;
                    }
                }
            } else {
                if (i != 2) {
                    ᵨᴵᵺ.ˌʾˀ();
                    return;
                }
                int iMin2 = Math.min(c3493.m7959(), this.f4421 - this.f4418);
                this.f4416.mo4406(iMin2, c3493);
                int i5 = this.f4418 + iMin2;
                this.f4418 = i5;
                if (i5 >= this.f4421) {
                    ᵛᵾˏ.ᵿʗᵝʽ(this.f4420 != -9223372036854775807L);
                    this.f4416.mo4410(this.f4420, 1, this.f4421, 0, null);
                    this.f4420 += this.f4414;
                    this.f4418 = 0;
                    this.f4425 = 0;
                }
            }
        }
    }

    @Override // defpackage.InterfaceC4315
    /* renamed from: ᵻᵢﹳᵰ */
    public final void mo1775(boolean z) {
    }
}
