package defpackage;

/* JADX INFO: renamed from: ᵧˁˌʿ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C3637 implements InterfaceC2750 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final C0272 f13809;

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public int f13810 = 0;

    /* JADX INFO: renamed from: ˋˈ, reason: contains not printable characters */
    public long f13811;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final String f13812;

    /* JADX INFO: renamed from: ᵝᵶ, reason: contains not printable characters */
    public int f13813;

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

    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public long f13815;

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public boolean f13816;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final C4545 f13817;

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public String f13818;

    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public boolean f13819;

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

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public int f13821;

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public InterfaceC5226 f13822;

    public C3637(int i, String str, String str2) {
        C4545 c4545 = new C4545(4);
        this.f13817 = c4545;
        c4545.f17284[0] = -1;
        this.f13809 = new C0272();
        this.f13811 = -9223372036854775807L;
        this.f13812 = str;
        this.f13820 = i;
        this.f13814 = str2;
    }

    @Override // defpackage.InterfaceC2750
    /* JADX INFO: renamed from: ːˏᵟᵯ */
    public final void mo2659() {
        this.f13810 = 0;
        this.f13821 = 0;
        this.f13819 = false;
        this.f13811 = -9223372036854775807L;
    }

    @Override // defpackage.InterfaceC2750
    /* JADX INFO: renamed from: ᵨᵣ */
    public final void mo2660(long j, int i) {
        this.f13811 = j;
    }

    @Override // defpackage.InterfaceC2750
    /* JADX INFO: renamed from: ᵲᵶᵳˈ */
    public final void mo2661(C4545 c4545) {
        this.f13822.getClass();
        while (c4545.m9623() > 0) {
            int i = this.f13810;
            C4545 c45452 = this.f13817;
            if (i == 0) {
                byte[] bArr = c4545.f17284;
                int i2 = c4545.f17282;
                int i3 = c4545.f17283;
                while (true) {
                    if (i2 >= i3) {
                        c4545.m9624(i3);
                        break;
                    }
                    byte b = bArr[i2];
                    boolean z = (b & 255) == 255;
                    boolean z2 = this.f13819 && (b & 224) == 224;
                    this.f13819 = z;
                    if (z2) {
                        c4545.m9624(i2 + 1);
                        this.f13819 = false;
                        c45452.f17284[1] = bArr[i2];
                        this.f13821 = 2;
                        this.f13810 = 1;
                        break;
                    }
                    i2++;
                }
            } else if (i == 1) {
                int iMin = Math.min(c4545.m9623(), 4 - this.f13821);
                c4545.m9627(c45452.f17284, this.f13821, iMin);
                int i4 = this.f13821 + iMin;
                this.f13821 = i4;
                if (i4 >= 4) {
                    c45452.m9624(0);
                    int iM9614 = c45452.m9614();
                    C0272 c0272 = this.f13809;
                    if (c0272.m1496(iM9614)) {
                        this.f13813 = c0272.f1889;
                        if (!this.f13816) {
                            this.f13815 = (((long) c0272.f1895) * 1000000) / ((long) c0272.f1890);
                            C4753 c4753 = new C4753();
                            c4753.f18121 = this.f13818;
                            c4753.f18111 = AbstractC4208.m9132(this.f13814);
                            c4753.f18101 = AbstractC4208.m9132((String) c0272.f1893);
                            c4753.f18116 = 4096;
                            c4753.f18090 = c0272.f1894;
                            c4753.f18113 = c0272.f1890;
                            c4753.f18126 = this.f13812;
                            c4753.f18129 = this.f13820;
                            this.f13822.mo1742(new C5286(c4753));
                            this.f13816 = true;
                        }
                        c45452.m9624(0);
                        this.f13822.mo1740(4, c45452);
                        this.f13810 = 2;
                    } else {
                        this.f13821 = 0;
                        this.f13810 = 1;
                    }
                }
            } else {
                if (i != 2) {
                    ᵷᵝˎ.ᵱʡˏ();
                    return;
                }
                int iMin2 = Math.min(c4545.m9623(), this.f13813 - this.f13821);
                this.f13822.mo1740(iMin2, c4545);
                int i5 = this.f13821 + iMin2;
                this.f13821 = i5;
                if (i5 >= this.f13813) {
                    ᵻᵪ.ˌᴵ(this.f13811 != -9223372036854775807L);
                    this.f13822.mo1741(this.f13811, 1, this.f13813, 0, null);
                    this.f13811 += this.f13815;
                    this.f13821 = 0;
                    this.f13810 = 0;
                }
            }
        }
    }

    @Override // defpackage.InterfaceC2750
    /* JADX INFO: renamed from: ᵷᵺʾᵖ */
    public final void mo2662(boolean z) {
    }

    @Override // defpackage.InterfaceC2750
    /* JADX INFO: renamed from: ᵻˈᵦʼ */
    public final void mo2663(InterfaceC4550 interfaceC4550, C4173 c4173) {
        c4173.m9112();
        c4173.m9111();
        this.f13818 = c4173.f15926;
        c4173.m9111();
        this.f13822 = interfaceC4550.mo2743(c4173.f15928, 1);
    }
}
