package defpackage;

import java.util.Iterator;
import java.util.Map;
import java.util.WeakHashMap;

/* renamed from: ˈˉʽ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C1031 implements Iterable {

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public C2270 f4500;

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public C2270 f4501;

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public final WeakHashMap f4503 = new WeakHashMap();

    /* renamed from: ᵾᵬ, reason: contains not printable characters */
    public int f4502 = 0;

    /* JADX WARN: Code restructure failed: missing block: B:24:0x0048, code lost:
    
        if (r1.hasNext() != false) goto L28;
     */
    /* JADX WARN: Code restructure failed: missing block: B:26:0x0050, code lost:
    
        if (((defpackage.C3252) r6).hasNext() != false) goto L28;
     */
    /* JADX WARN: Code restructure failed: missing block: B:27:0x0052, code lost:
    
        return true;
     */
    /* JADX WARN: Code restructure failed: missing block: B:28:0x0053, code lost:
    
        return false;
     */
    /*
        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;
            r0 = 1
            if (r6 != r5) goto L4
            return r0
        L4:
            boolean r1 = r6 instanceof defpackage.C1031
            r2 = 0
            if (r1 != 0) goto La
            return r2
        La:
            ˈˉʽ r6 = (defpackage.C1031) r6
            int r1 = r5.f4502
            int r3 = r6.f4502
            if (r1 == r3) goto L13
            return r2
        L13:
            java.util.Iterator r5 = r5.iterator()
            java.util.Iterator r6 = r6.iterator()
        L1b:
            r1 = r5
            ᵢʽ r1 = (defpackage.C3252) r1
            boolean r3 = r1.hasNext()
            if (r3 == 0) goto L44
            r3 = r6
            ᵢʽ r3 = (defpackage.C3252) r3
            boolean r4 = r3.hasNext()
            if (r4 == 0) goto L44
            java.lang.Object r1 = r1.next()
            java.util.Map$Entry r1 = (java.util.Map.Entry) r1
            java.lang.Object r3 = r3.next()
            if (r1 != 0) goto L3b
            if (r3 != 0) goto L43
        L3b:
            if (r1 == 0) goto L1b
            boolean r1 = r1.equals(r3)
            if (r1 != 0) goto L1b
        L43:
            return r2
        L44:
            boolean r5 = r1.hasNext()
            if (r5 != 0) goto L53
            ᵢʽ r6 = (defpackage.C3252) r6
            boolean r5 = r6.hasNext()
            if (r5 != 0) goto L53
            return r0
        L53:
            return r2
        */
        throw new UnsupportedOperationException("Method not decompiled: defpackage.C1031.equals(java.lang.Object):boolean");
    }

    public final int hashCode() {
        Iterator it = iterator();
        int iHashCode = 0;
        while (true) {
            C3252 c3252 = (C3252) it;
            if (!c3252.hasNext()) {
                return iHashCode;
            }
            iHashCode += ((Map.Entry) c3252.next()).hashCode();
        }
    }

    @Override // java.lang.Iterable
    public final Iterator iterator() {
        C2270 c2270 = this.f4501;
        C2270 c22702 = this.f4500;
        C3252 c3252 = new C3252();
        c3252.f12248 = c22702;
        c3252.f12247 = c2270;
        this.f4503.put(c3252, Boolean.FALSE);
        return c3252;
    }

    public final String toString() {
        StringBuilder sb = new StringBuilder("[");
        Iterator it = iterator();
        while (true) {
            C3252 c3252 = (C3252) it;
            if (!c3252.hasNext()) {
                sb.append("]");
                return sb.toString();
            }
            sb.append(((Map.Entry) c3252.next()).toString());
            if (c3252.hasNext()) {
                sb.append(", ");
            }
        }
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final Object m3395(Object obj) {
        C2270 c2270 = this.f4501;
        while (c2270 != null && !c2270.f8876.equals(obj)) {
            c2270 = c2270.f8878;
        }
        if (c2270 == null) {
            return null;
        }
        this.f4502--;
        WeakHashMap weakHashMap = this.f4503;
        if (!weakHashMap.isEmpty()) {
            Iterator it = weakHashMap.keySet().iterator();
            while (it.hasNext()) {
                ((AbstractC3585) it.next()).mo3809(c2270);
            }
        }
        C2270 c22702 = c2270.f8877;
        C2270 c22703 = c2270.f8878;
        if (c22702 != null) {
            c22702.f8878 = c22703;
        } else {
            this.f4501 = c22703;
        }
        C2270 c22704 = c2270.f8878;
        if (c22704 != null) {
            c22704.f8877 = c22702;
        } else {
            this.f4500 = c22702;
        }
        c2270.f8878 = null;
        c2270.f8877 = null;
        return c2270.f8875;
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final Object m3396(Object obj, Object obj2) {
        C2270 c2270 = this.f4501;
        while (c2270 != null && !c2270.f8876.equals(obj)) {
            c2270 = c2270.f8878;
        }
        if (c2270 != null) {
            return c2270.f8875;
        }
        C2270 c22702 = new C2270(obj, obj2);
        this.f4502++;
        C2270 c22703 = this.f4500;
        if (c22703 == null) {
            this.f4501 = c22702;
            this.f4500 = c22702;
            return null;
        }
        c22703.f8878 = c22702;
        c22702.f8877 = c22703;
        this.f4500 = c22702;
        return null;
    }
}
