package o;

import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.m9, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1839m9 extends I80 implements Map {

    /* renamed from: o, reason: collision with root package name */
    public C1364h9 f632o;
    public C1554j9 p;
    public C1744l9 q;

    public C1839m9() {
        super(0);
    }

    @Override // java.util.Map
    public final Set entrySet() {
        C1364h9 c1364h9 = this.f632o;
        if (c1364h9 != null) {
            return c1364h9;
        }
        C1364h9 c1364h92 = new C1364h9(this, 0);
        this.f632o = c1364h92;
        return c1364h92;
    }

    public final boolean j(Collection collection) {
        Iterator it = collection.iterator();
        while (it.hasNext()) {
            if (!super.containsKey(it.next())) {
                return false;
            }
        }
        return true;
    }

    public final boolean k(Collection collection) {
        int i = this.n;
        Iterator it = collection.iterator();
        while (it.hasNext()) {
            super.remove(it.next());
        }
        return i != this.n;
    }

    @Override // java.util.Map
    public final Set keySet() {
        C1554j9 c1554j9 = this.p;
        if (c1554j9 != null) {
            return c1554j9;
        }
        C1554j9 c1554j92 = new C1554j9(this);
        this.p = c1554j92;
        return c1554j92;
    }

    public final boolean l(Collection collection) {
        int i = this.n;
        for (int i2 = i - 1; i2 >= 0; i2--) {
            if (!collection.contains(f(i2))) {
                g(i2);
            }
        }
        return i != this.n;
    }

    @Override // java.util.Map
    public final void putAll(Map map) {
        b(map.size() + this.n);
        for (Map.Entry entry : map.entrySet()) {
            put(entry.getKey(), entry.getValue());
        }
    }

    @Override // java.util.Map
    public final Collection values() {
        C1744l9 c1744l9 = this.q;
        if (c1744l9 != null) {
            return c1744l9;
        }
        C1744l9 c1744l92 = new C1744l9(this);
        this.q = c1744l92;
        return c1744l92;
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C1839m9(I80 i80) {
        super(0);
        int i = i80.n;
        b(this.n + i);
        if (this.n != 0) {
            for (int i2 = 0; i2 < i; i2++) {
                put(i80.f(i2), i80.i(i2));
            }
        } else if (i > 0) {
            AbstractC2219q9.I(0, 0, i, i80.l, this.l);
            AbstractC2219q9.J(0, 0, i << 1, i80.m, this.m);
            this.n = i;
        }
    }
}
