package defpackage;

import androidx.media3.common.ParserException;
import java.util.List;

/* JADX INFO: renamed from: ʾˑᵰᵜ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C0265 implements InterfaceC4291 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public InterfaceC4550 f1869;

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public long f1870;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public InterfaceC5206 f1871;

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public C4583 f1872;

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

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public C1705 f1876;

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

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final C4545 f1874 = new C4545(16);

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public long f1873 = -1;

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public int f1878 = 0;

    @Override // defpackage.InterfaceC4291
    /* JADX INFO: renamed from: ʽˈˋ */
    public final void mo1252(long j, long j2) {
        if (j != 0) {
            if (this.f1878 == 3) {
                C4583 c4583 = this.f1872;
                c4583.getClass();
                c4583.mo1252(j, j2);
                return;
            }
            return;
        }
        this.f1878 = 0;
        this.f1877 = 0;
        this.f1873 = -1L;
        if (this.f1872 != null) {
            this.f1872 = null;
        }
    }

    @Override // defpackage.InterfaceC4291
    /* JADX INFO: renamed from: ːˏᵟᵯ */
    public final InterfaceC4291 mo1254() {
        return this;
    }

    @Override // defpackage.InterfaceC4291
    /* JADX INFO: renamed from: ᵨᵣ */
    public final boolean mo1255(InterfaceC5206 interfaceC5206) {
        return ˑᵕʾ.ʽᵡᵢᵾ((C2373) interfaceC5206, true);
    }

    @Override // defpackage.InterfaceC4291
    /* JADX INFO: renamed from: ᵲᵶᵳˈ */
    public final void mo1256() {
        C4583 c4583 = this.f1872;
        if (c4583 != null) {
            c4583.getClass();
            this.f1872 = null;
        }
    }

    @Override // defpackage.InterfaceC4291
    /* JADX INFO: renamed from: ᵵᵽ */
    public final void mo1257(InterfaceC4550 interfaceC4550) {
        this.f1869 = interfaceC4550;
    }

    @Override // defpackage.InterfaceC4291
    /* JADX INFO: renamed from: ᵷᵺʾᵖ */
    public final int mo1258(InterfaceC5206 interfaceC5206, C2669 c2669) throws ParserException {
        while (true) {
            int i = this.f1878;
            if (i == 0) {
                int i2 = this.f1877;
                C4545 c4545 = this.f1874;
                if (i2 == 0) {
                    if (!interfaceC5206.mo4710(c4545.f17284, 0, 8, true)) {
                        InterfaceC4550 interfaceC4550 = this.f1869;
                        interfaceC4550.getClass();
                        interfaceC4550.mo2740();
                        this.f1869.mo2739(new C3782(-9223372036854775807L));
                        this.f1878 = 4;
                        return -1;
                    }
                    this.f1877 = 8;
                    c4545.m9624(0);
                    this.f1870 = c4545.m9606();
                    this.f1875 = c4545.m9614();
                }
                if (this.f1870 == 1) {
                    interfaceC5206.readFully(c4545.f17284, 8, 8);
                    this.f1877 += 8;
                    this.f1870 = c4545.m9616();
                }
                if (this.f1875 == 1836086884) {
                    long position = interfaceC5206.getPosition();
                    this.f1873 = position;
                    long j = this.f1877;
                    C2568 c2568 = new C2568(0L, position - j, -9223372036854775807L, position, this.f1870 - j);
                    InterfaceC4550 interfaceC45502 = this.f1869;
                    interfaceC45502.getClass();
                    InterfaceC5226 interfaceC5226Mo2743 = interfaceC45502.mo2743(1024, 4);
                    C4753 c4753 = new C4753();
                    c4753.f18111 = AbstractC4208.m9132("image/heic");
                    c4753.f18125 = new C1956(c2568);
                    AbstractC0659.m2415(c4753, interfaceC5226Mo2743);
                    this.f1878 = 2;
                } else {
                    this.f1878 = 1;
                }
            } else if (i == 1) {
                interfaceC5206.mo4700((int) (this.f1870 - ((long) this.f1877)));
                this.f1877 = 0;
                this.f1878 = 0;
            } else {
                if (i != 2) {
                    if (i != 3) {
                        if (i == 4) {
                            return -1;
                        }
                        ᵷᵝˎ.ᵱʡˏ();
                        return 0;
                    }
                    if (this.f1876 == null || interfaceC5206 != this.f1871) {
                        this.f1871 = interfaceC5206;
                        this.f1876 = new C1705(interfaceC5206, this.f1873);
                    }
                    C4583 c4583 = this.f1872;
                    c4583.getClass();
                    int iMo1258 = c4583.mo1258(this.f1876, c2669);
                    if (iMo1258 == 1) {
                        c2669.f10317 += this.f1873;
                    }
                    return iMo1258;
                }
                if (this.f1872 == null) {
                    this.f1872 = new C4583(InterfaceC1471.f5974, 8);
                }
                C1705 c1705 = new C1705(interfaceC5206, this.f1873);
                this.f1876 = c1705;
                if (this.f1872.mo1255(c1705)) {
                    C4583 c45832 = this.f1872;
                    long j2 = this.f1873;
                    InterfaceC4550 interfaceC45503 = this.f1869;
                    interfaceC45503.getClass();
                    c45832.mo1257(new C1705(j2, interfaceC45503, 6));
                    this.f1878 = 3;
                } else {
                    InterfaceC4550 interfaceC45504 = this.f1869;
                    interfaceC45504.getClass();
                    interfaceC45504.mo2740();
                    this.f1869.mo2739(new C3782(-9223372036854775807L));
                    this.f1878 = 4;
                }
            }
        }
    }

    @Override // defpackage.InterfaceC4291
    /* JADX INFO: renamed from: ᵻˈᵦʼ */
    public final List mo1259() {
        C2822 c2822 = AbstractC4509.f17159;
        return C2598.f10048;
    }
}
