package defpackage;

import android.content.Context;
import androidx.media3.common.ParserException;
import java.io.EOFException;
import java.util.ArrayList;

/* renamed from: ᵔᵳ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C2251 {

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public int f8808;

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

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public final Object f8810;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public int f8811;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public int f8812;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public long f8813;

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

    public C2251() {
        this.f8810 = new int[255];
        this.f8809 = new C3493(255);
    }

    public C2251(Context context) {
        this.f8811 = 0;
        this.f8814 = 1;
        this.f8808 = 0;
        this.f8810 = context;
        this.f8812 = 112;
    }

    /* JADX WARN: Code restructure failed: missing block: B:21:0x004d, code lost:
    
        if (r10 == (-1)) goto L24;
     */
    /* JADX WARN: Code restructure failed: missing block: B:23:0x0055, code lost:
    
        if (r9.getPosition() >= r10) goto L33;
     */
    /* JADX WARN: Code restructure failed: missing block: B:25:0x005c, code lost:
    
        if (r9.mo4243(1) == (-1)) goto L34;
     */
    /* JADX WARN: Code restructure failed: missing block: B:27:0x005f, code lost:
    
        return false;
     */
    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public boolean m5925(defpackage.InterfaceC1383 r9, long r10) {
        /*
            r8 = this;
            java.lang.Object r8 = r8.f8809
            ᵥˁˋˁ r8 = (defpackage.C3493) r8
            long r0 = r9.getPosition()
            long r2 = r9.mo4244()
            int r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1))
            r1 = 0
            r2 = 1
            if (r0 != 0) goto L14
            r0 = r2
            goto L15
        L14:
            r0 = r1
        L15:
            ᵛᵾˏ.ᵯٴᵦ(r0)
            r0 = 4
            r8.m7939(r0)
        L1c:
            r3 = -1
            int r3 = (r10 > r3 ? 1 : (r10 == r3 ? 0 : -1))
            if (r3 == 0) goto L2d
            long r4 = r9.getPosition()
            r6 = 4
            long r4 = r4 + r6
            int r4 = (r4 > r10 ? 1 : (r4 == r10 ? 0 : -1))
            if (r4 >= 0) goto L4d
        L2d:
            byte[] r4 = r8.f13082
            boolean r4 = r9.mo4251(r4, r1, r0, r2)     // Catch: java.io.EOFException -> L34
            goto L35
        L34:
            r4 = r1
        L35:
            if (r4 == 0) goto L4d
            r8.m7955(r1)
            long r3 = r8.m7954()
            r5 = 1332176723(0x4f676753, double:6.58182753E-315)
            int r3 = (r3 > r5 ? 1 : (r3 == r5 ? 0 : -1))
            if (r3 != 0) goto L49
            r9.mo4245()
            return r2
        L49:
            r9.mo4248(r2)
            goto L1c
        L4d:
            if (r3 == 0) goto L57
            long r4 = r9.getPosition()
            int r8 = (r4 > r10 ? 1 : (r4 == r10 ? 0 : -1))
            if (r8 >= 0) goto L5f
        L57:
            int r8 = r9.mo4243(r2)
            r0 = -1
            if (r8 == r0) goto L5f
            goto L4d
        L5f:
            return r1
        */
        throw new UnsupportedOperationException("Method not decompiled: defpackage.C2251.m5925(ˊᵬᐧ, long):boolean");
    }

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public void m5926(int i) {
        this.f8809 = ((Context) this.f8810).getString(i);
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public void m5927(boolean z) {
        this.f8812 = ((z ? 1 : 0) & 1) | (this.f8812 & (~1));
        if (this.f8811 == 0) {
            return;
        }
        ᵹˉᵞ.ˌᵜᵹᵩ("Editable actions cannot also be checked");
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public C2718 m5928() {
        C2718 c2718 = new C2718();
        c2718.f10539 = -1L;
        new ArrayList();
        c2718.f10539 = this.f8813;
        c2718.f10537 = (String) this.f8809;
        c2718.f10536 = null;
        c2718.f10545 = null;
        c2718.f10535 = null;
        c2718.f10541 = null;
        c2718.f10544 = this.f8811;
        c2718.f10538 = 524289;
        c2718.f10542 = 524289;
        c2718.f10543 = 1;
        c2718.f10534 = this.f8814;
        c2718.f10533 = this.f8812;
        c2718.f10540 = this.f8808;
        return c2718;
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public void m5929(int i) {
        this.f8808 = i;
        if (this.f8811 == 0) {
            return;
        }
        ᵹˉᵞ.ˌᵜᵹᵩ("Editable actions cannot also be in check sets");
    }

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public boolean m5930(InterfaceC1383 interfaceC1383, boolean z) throws ParserException, EOFException {
        boolean zMo4251;
        boolean zMo42512;
        int[] iArr = (int[]) this.f8810;
        this.f8812 = 0;
        this.f8813 = 0L;
        this.f8811 = 0;
        this.f8814 = 0;
        this.f8808 = 0;
        C3493 c3493 = (C3493) this.f8809;
        c3493.m7939(27);
        try {
            zMo4251 = interfaceC1383.mo4251(c3493.f13082, 0, 27, z);
        } catch (EOFException e) {
            if (!z) {
                throw e;
            }
            zMo4251 = false;
        }
        if (zMo4251 && c3493.m7954() == 1332176723) {
            if (c3493.m7956() == 0) {
                this.f8812 = c3493.m7956();
                this.f8813 = c3493.m7940();
                c3493.m7969();
                c3493.m7969();
                c3493.m7969();
                int iM7956 = c3493.m7956();
                this.f8811 = iM7956;
                this.f8814 = iM7956 + 27;
                c3493.m7939(iM7956);
                try {
                    zMo42512 = interfaceC1383.mo4251(c3493.f13082, 0, this.f8811, z);
                } catch (EOFException e2) {
                    if (!z) {
                        throw e2;
                    }
                    zMo42512 = false;
                }
                if (zMo42512) {
                    for (int i = 0; i < this.f8811; i++) {
                        int iM79562 = c3493.m7956();
                        iArr[i] = iM79562;
                        this.f8808 += iM79562;
                    }
                    return true;
                }
            } else if (!z) {
                throw ParserException.m355("unsupported bit stream revision");
            }
        }
        return false;
    }
}
