package defpackage;

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

/* renamed from: ᵴˆˊː, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C4633 {

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

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

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final ArrayList f17163 = new ArrayList();

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public ByteBuffer[] f17161 = new ByteBuffer[0];

    public C4633(AbstractC2692 abstractC2692) {
        this.f17162 = abstractC2692;
        C2263 c2263 = C2263.f8838;
        this.f17164 = false;
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof C4633)) {
            return false;
        }
        AbstractC2692 abstractC2692 = ((C4633) obj).f17162;
        AbstractC2692 abstractC26922 = this.f17162;
        if (abstractC26922.size() != abstractC2692.size()) {
            return false;
        }
        for (int i = 0; i < abstractC26922.size(); i++) {
            if (abstractC26922.get(i) != abstractC2692.get(i)) {
                return false;
            }
        }
        return true;
    }

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

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public final void m9817(ByteBuffer byteBuffer) {
        boolean z;
        for (boolean z2 = true; z2; z2 = z) {
            z = false;
            int i = 0;
            while (i <= m9820()) {
                if (!this.f17161[i].hasRemaining()) {
                    ArrayList arrayList = this.f17163;
                    InterfaceC0240 interfaceC0240 = (InterfaceC0240) arrayList.get(i);
                    if (!interfaceC0240.mo1543()) {
                        ByteBuffer byteBuffer2 = i > 0 ? this.f17161[i - 1] : byteBuffer.hasRemaining() ? byteBuffer : InterfaceC0240.f1780;
                        long jRemaining = byteBuffer2.remaining();
                        interfaceC0240.mo1540(byteBuffer2);
                        this.f17161[i] = interfaceC0240.mo1545();
                        z |= jRemaining - ((long) byteBuffer2.remaining()) > 0 || this.f17161[i].hasRemaining();
                    } else if (!this.f17161[i].hasRemaining() && i < m9820()) {
                        ((InterfaceC0240) arrayList.get(i + 1)).mo1544();
                    }
                }
                i++;
            }
        }
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final boolean m9818() {
        return this.f17164 && ((InterfaceC0240) this.f17163.get(m9820())).mo1543() && !this.f17161[m9820()].hasRemaining();
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final void m9819() {
        C3046 c3046 = C3046.f11698;
        ArrayList arrayList = this.f17163;
        arrayList.clear();
        this.f17164 = false;
        long jMo1542 = c3046.f11699;
        int i = 0;
        while (true) {
            AbstractC2692 abstractC2692 = this.f17162;
            if (i >= abstractC2692.size()) {
                break;
            }
            InterfaceC0240 interfaceC0240 = (InterfaceC0240) abstractC2692.get(i);
            interfaceC0240.mo1538(new C3046(jMo1542));
            if (interfaceC0240.mo1541()) {
                jMo1542 = interfaceC0240.mo1542(jMo1542);
                ᵛᵾˏ.ᵿʗᵝʽ(jMo1542 >= 0);
                arrayList.add(interfaceC0240);
            }
            i++;
        }
        this.f17161 = new ByteBuffer[arrayList.size()];
        for (int i2 = 0; i2 <= m9820(); i2++) {
            this.f17161[i2] = ((InterfaceC0240) arrayList.get(i2)).mo1545();
        }
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final int m9820() {
        return this.f17161.length - 1;
    }

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final boolean m9821() {
        return !this.f17163.isEmpty();
    }
}
