package o;

import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Set;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.Jk, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0244Jk extends AbstractC0425Qk {
    public final long a;
    public final boolean b;
    public final boolean c;
    public HashSet d;
    public final LinkedHashSet e = new LinkedHashSet();
    public final MV f = new MV(C3097zW.f825o, C0669Zu.S);
    public final /* synthetic */ C0321Mk g;

    public C0244Jk(C0321Mk c0321Mk, long j, boolean z, boolean z2, J7 j7) {
        this.g = c0321Mk;
        this.a = j;
        this.b = z;
        this.c = z2;
    }

    @Override // o.AbstractC0425Qk
    public final void a(C0555Vk c0555Vk, C0554Vj c0554Vj) {
        this.g.b.a(c0555Vk, c0554Vj);
    }

    @Override // o.AbstractC0425Qk
    public final void b() {
        C0321Mk c0321Mk = this.g;
        c0321Mk.z--;
    }

    @Override // o.AbstractC0425Qk
    public final boolean c() {
        return this.g.b.c();
    }

    @Override // o.AbstractC0425Qk
    public final boolean d() {
        return this.b;
    }

    @Override // o.AbstractC0425Qk
    public final boolean e() {
        return this.c;
    }

    @Override // o.AbstractC0425Qk
    public final long f() {
        return this.a;
    }

    @Override // o.AbstractC0425Qk
    public final InterfaceC0399Pk g() {
        return this.g.g;
    }

    @Override // o.AbstractC0425Qk
    public final AW h() {
        return (AW) this.f.getValue();
    }

    @Override // o.AbstractC0425Qk
    public final InterfaceC2747vn i() {
        return this.g.b.i();
    }

    @Override // o.AbstractC0425Qk
    public final void j(C0555Vk c0555Vk) {
        C0321Mk c0321Mk = this.g;
        c0321Mk.b.j(c0321Mk.g);
        c0321Mk.b.j(c0555Vk);
    }

    @Override // o.AbstractC0425Qk
    public final AbstractC1952nQ k(AbstractC2047oQ abstractC2047oQ) {
        return this.g.b.k(abstractC2047oQ);
    }

    @Override // o.AbstractC0425Qk
    public final void l(Set set) {
        HashSet hashSet = this.d;
        if (hashSet == null) {
            hashSet = new HashSet();
            this.d = hashSet;
        }
        hashSet.add(set);
    }

    @Override // o.AbstractC0425Qk
    public final void m(C0321Mk c0321Mk) {
        this.e.add(c0321Mk);
    }

    @Override // o.AbstractC0425Qk
    public final void n(C0555Vk c0555Vk) {
        this.g.b.n(c0555Vk);
    }

    @Override // o.AbstractC0425Qk
    public final void o() {
        this.g.z++;
    }

    @Override // o.AbstractC0425Qk
    public final void p(C0321Mk c0321Mk) {
        HashSet hashSet = this.d;
        if (hashSet != null) {
            Iterator it = hashSet.iterator();
            while (it.hasNext()) {
                ((Set) it.next()).remove(c0321Mk.c);
            }
        }
        LinkedHashSet linkedHashSet = this.e;
        if (!(linkedHashSet instanceof InterfaceC2989yJ) || (linkedHashSet instanceof InterfaceC3084zJ)) {
            linkedHashSet.remove(c0321Mk);
        } else {
            AbstractC1692kh0.N(linkedHashSet, "kotlin.collections.MutableCollection");
            throw null;
        }
    }

    @Override // o.AbstractC0425Qk
    public final void q(C0555Vk c0555Vk) {
        this.g.b.q(c0555Vk);
    }

    public final void r() {
        LinkedHashSet<C0321Mk> linkedHashSet = this.e;
        if (linkedHashSet.isEmpty()) {
            return;
        }
        HashSet hashSet = this.d;
        if (hashSet != null) {
            for (C0321Mk c0321Mk : linkedHashSet) {
                Iterator it = hashSet.iterator();
                while (it.hasNext()) {
                    ((Set) it.next()).remove(c0321Mk.c);
                }
            }
        }
        linkedHashSet.clear();
    }
}
