package defpackage;

import j$.util.DesugarCollections;
import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;

/* renamed from: ˉˎˈˊ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C1173 {

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

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final C3368 f4989;

    public C1173(LinkedHashMap linkedHashMap, boolean z) {
        this.f4988 = linkedHashMap;
        this.f4989 = new C3368(z);
    }

    public /* synthetic */ C1173(boolean z) {
        this(new LinkedHashMap(), z);
    }

    /* JADX WARN: Removed duplicated region for block: B:27:0x005d  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final boolean equals(java.lang.Object r6) {
        /*
            r5 = this;
            boolean r0 = r6 instanceof defpackage.C1173
            r1 = 0
            if (r0 != 0) goto L6
            goto L60
        L6:
            ˉˎˈˊ r6 = (defpackage.C1173) r6
            java.util.LinkedHashMap r6 = r6.f4988
            java.util.LinkedHashMap r5 = r5.f4988
            r0 = 1
            if (r6 != r5) goto L10
            goto L61
        L10:
            int r2 = r6.size()
            int r3 = r5.size()
            if (r2 == r3) goto L1b
            goto L60
        L1b:
            boolean r2 = r6.isEmpty()
            if (r2 == 0) goto L22
            goto L61
        L22:
            java.util.Set r6 = r6.entrySet()
            java.util.Iterator r6 = r6.iterator()
        L2a:
            boolean r2 = r6.hasNext()
            if (r2 == 0) goto L61
            java.lang.Object r2 = r6.next()
            java.util.Map$Entry r2 = (java.util.Map.Entry) r2
            java.lang.Object r3 = r2.getKey()
            java.lang.Object r3 = r5.get(r3)
            if (r3 == 0) goto L5d
            java.lang.Object r2 = r2.getValue()
            boolean r4 = r2 instanceof byte[]
            if (r4 == 0) goto L58
            boolean r4 = r3 instanceof byte[]
            if (r4 == 0) goto L5d
            byte[] r2 = (byte[]) r2
            byte[] r3 = (byte[]) r3
            boolean r2 = java.util.Arrays.equals(r2, r3)
            if (r2 == 0) goto L5d
            r2 = r0
            goto L5e
        L58:
            boolean r2 = ᵲᵝᵪ.ᵹᵝᵶ(r2, r3)
            goto L5e
        L5d:
            r2 = r1
        L5e:
            if (r2 != 0) goto L2a
        L60:
            return r1
        L61:
            return r0
        */
        throw new UnsupportedOperationException("Method not decompiled: defpackage.C1173.equals(java.lang.Object):boolean");
    }

    public final int hashCode() {
        Iterator it = this.f4988.entrySet().iterator();
        int iHashCode = 0;
        while (it.hasNext()) {
            Object value = ((Map.Entry) it.next()).getValue();
            iHashCode += value instanceof byte[] ? Arrays.hashCode((byte[]) value) : value.hashCode();
        }
        return iHashCode;
    }

    public final String toString() {
        return AbstractC2767.m6822(this.f4988.entrySet(), ",\n", "{\n", "\n}", C4041.f15197, 24);
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final void m3684(C4661 c4661, Object obj) {
        m3686();
        LinkedHashMap linkedHashMap = this.f4988;
        if (obj == null) {
            m3686();
            linkedHashMap.remove(c4661);
        } else if (obj instanceof Set) {
            linkedHashMap.put(c4661, DesugarCollections.unmodifiableSet(AbstractC2767.m6812((Set) obj)));
        } else if (!(obj instanceof byte[])) {
            linkedHashMap.put(c4661, obj);
        } else {
            byte[] bArr = (byte[]) obj;
            linkedHashMap.put(c4661, Arrays.copyOf(bArr, bArr.length));
        }
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final Map m3685() {
        C2836 c2836;
        Set<Map.Entry> setEntrySet = this.f4988.entrySet();
        int iM9659 = AbstractC4546.m9659(AbstractC3869.m8517(setEntrySet, 10));
        if (iM9659 < 16) {
            iM9659 = 16;
        }
        LinkedHashMap linkedHashMap = new LinkedHashMap(iM9659);
        for (Map.Entry entry : setEntrySet) {
            Object value = entry.getValue();
            if (value instanceof byte[]) {
                byte[] bArr = (byte[]) value;
                c2836 = new C2836(entry.getKey(), Arrays.copyOf(bArr, bArr.length));
            } else {
                c2836 = new C2836(entry.getKey(), entry.getValue());
            }
            linkedHashMap.put(c2836.f10917, c2836.f10916);
        }
        return DesugarCollections.unmodifiableMap(linkedHashMap);
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final void m3686() {
        if (this.f4989.f12592.get()) {
            ᵹˉᵞ.ᵳٴᵶ("Do mutate preferences once returned to DataStore.");
        }
    }
}
