package defpackage;

import java.nio.ByteBuffer;
import java.util.ArrayList;

/* JADX INFO: renamed from: ˊˀʽ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C1316 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final ArrayList f5482 = new ArrayList();

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public ByteBuffer[] f5483 = new ByteBuffer[0];

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

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

    public C1316(AbstractC4509 abstractC4509) {
        this.f5484 = abstractC4509;
        C2917 c2917 = C2917.f11219;
        this.f5485 = false;
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof C1316)) {
            return false;
        }
        AbstractC4509 abstractC4509 = ((C1316) obj).f5484;
        AbstractC4509 abstractC45092 = this.f5484;
        if (abstractC45092.size() != abstractC4509.size()) {
            return false;
        }
        for (int i = 0; i < abstractC45092.size(); i++) {
            if (abstractC45092.get(i) != abstractC4509.get(i)) {
                return false;
            }
        }
        return true;
    }

    public final int hashCode() {
        return this.f5484.hashCode();
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final int m3834() {
        return this.f5483.length - 1;
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final boolean m3835() {
        return this.f5485 && ((InterfaceC2497) this.f5482.get(m3834())).mo4908() && !this.f5483[m3834()].hasRemaining();
    }

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final void m3836(ByteBuffer byteBuffer) {
        boolean z;
        for (boolean z2 = true; z2; z2 = z) {
            z = false;
            int i = 0;
            while (i <= m3834()) {
                if (!this.f5483[i].hasRemaining()) {
                    ArrayList arrayList = this.f5482;
                    InterfaceC2497 interfaceC2497 = (InterfaceC2497) arrayList.get(i);
                    if (!interfaceC2497.mo4908()) {
                        ByteBuffer byteBuffer2 = i > 0 ? this.f5483[i - 1] : byteBuffer.hasRemaining() ? byteBuffer : InterfaceC2497.f9685;
                        long jRemaining = byteBuffer2.remaining();
                        interfaceC2497.mo3789(byteBuffer2);
                        this.f5483[i] = interfaceC2497.mo4913();
                        z |= jRemaining - ((long) byteBuffer2.remaining()) > 0 || this.f5483[i].hasRemaining();
                    } else if (!this.f5483[i].hasRemaining() && i < m3834()) {
                        ((InterfaceC2497) arrayList.get(i + 1)).mo4909();
                    }
                }
                i++;
            }
        }
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final void m3837() {
        C2995 c2995 = C2995.f11537;
        ArrayList arrayList = this.f5482;
        arrayList.clear();
        this.f5485 = false;
        long jMo4914 = c2995.f11538;
        int i = 0;
        while (true) {
            AbstractC4509 abstractC4509 = this.f5484;
            if (i >= abstractC4509.size()) {
                break;
            }
            InterfaceC2497 interfaceC2497 = (InterfaceC2497) abstractC4509.get(i);
            interfaceC2497.mo4911(new C2995(jMo4914));
            if (interfaceC2497.mo3847()) {
                jMo4914 = interfaceC2497.mo4914(jMo4914);
                ᵻᵪ.ˌᴵ(jMo4914 >= 0);
                arrayList.add(interfaceC2497);
            }
            i++;
        }
        this.f5483 = new ByteBuffer[arrayList.size()];
        for (int i2 = 0; i2 <= m3834(); i2++) {
            this.f5483[i2] = ((InterfaceC2497) arrayList.get(i2)).mo4913();
        }
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final boolean m3838() {
        return !this.f5482.isEmpty();
    }
}
