package defpackage;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;

/* JADX INFO: renamed from: ᵮˋᵸ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C4214 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public int f16028;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public boolean f16030;

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final int f16031;

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final C2622 f16034;

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public C4996 f16035;

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public C4214 f16036;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public HashSet f16032 = null;

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public int f16033 = 0;

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public int f16029 = Integer.MIN_VALUE;

    public C4214(C2622 c2622, int i) {
        this.f16034 = c2622;
        this.f16031 = i;
    }

    public final String toString() {
        return this.f16034.f10178 + ":" + AbstractC3589.m8099(this.f16031);
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final boolean m9146(C4214 c4214, int i, int i2, boolean z) {
        if (c4214 == null) {
            m9151();
            return true;
        }
        if (!z && !m9156(c4214)) {
            return false;
        }
        this.f16036 = c4214;
        if (c4214.f16032 == null) {
            c4214.f16032 = new HashSet();
        }
        HashSet hashSet = this.f16036.f16032;
        if (hashSet != null) {
            hashSet.add(this);
        }
        this.f16033 = i;
        this.f16029 = i2;
        return true;
    }

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public final boolean m9147() {
        return this.f16036 != null;
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final void m9148(int i, C4760 c4760, ArrayList arrayList) {
        HashSet hashSet = this.f16032;
        if (hashSet != null) {
            Iterator it = hashSet.iterator();
            while (it.hasNext()) {
                ᵗʓ.ˋˈ(((C4214) it.next()).f16034, i, arrayList, c4760);
            }
        }
    }

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final int m9149() {
        C4214 c4214;
        if (this.f16034.f10174 == 8) {
            return 0;
        }
        int i = this.f16029;
        return (i == Integer.MIN_VALUE || (c4214 = this.f16036) == null || c4214.f16034.f10174 != 8) ? this.f16033 : i;
    }

    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public final void m9150(int i) {
        this.f16028 = i;
        this.f16030 = true;
    }

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public final void m9151() {
        HashSet hashSet;
        C4214 c4214 = this.f16036;
        if (c4214 != null && (hashSet = c4214.f16032) != null) {
            hashSet.remove(this);
            if (this.f16036.f16032.size() == 0) {
                this.f16036.f16032 = null;
            }
        }
        this.f16032 = null;
        this.f16036 = null;
        this.f16033 = 0;
        this.f16029 = Integer.MIN_VALUE;
        this.f16030 = false;
        this.f16028 = 0;
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final void m9152(C4214 c4214, int i) {
        m9146(c4214, i, Integer.MIN_VALUE, false);
    }

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public final boolean m9153() {
        HashSet hashSet = this.f16032;
        if (hashSet == null) {
            return false;
        }
        Iterator it = hashSet.iterator();
        while (it.hasNext()) {
            if (((C4214) it.next()).m9157().m9147()) {
                return true;
            }
        }
        return false;
    }

    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public final void m9154() {
        C4996 c4996 = this.f16035;
        if (c4996 == null) {
            this.f16035 = new C4996(1);
        } else {
            c4996.m10327();
        }
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final int m9155() {
        if (this.f16030) {
            return this.f16028;
        }
        return 0;
    }

    /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
    /* JADX WARN: Removed duplicated region for block: B:46:0x0063 A[RETURN] */
    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final boolean m9156(C4214 c4214) {
        if (c4214 != null) {
            C2622 c2622 = c4214.f16034;
            int i = c4214.f16031;
            int i2 = this.f16031;
            if (i != i2) {
                switch (AbstractC3653.m8218(i2)) {
                    case 0:
                    case C5224.DOUBLE_FIELD_NUMBER /* 7 */:
                    case C5224.BYTES_FIELD_NUMBER /* 8 */:
                        break;
                    case 1:
                    case 3:
                        boolean z = i == 2 || i == 4;
                        if (!(c2622 instanceof C0148)) {
                            return z;
                        }
                        if (z || i == 8) {
                        }
                        break;
                    case 2:
                    case 4:
                        boolean z2 = i == 3 || i == 5;
                        if (!(c2622 instanceof C0148)) {
                            return z2;
                        }
                        if (z2 || i == 9) {
                        }
                        break;
                    case 5:
                        if (i == 2 || i == 4) {
                        }
                        break;
                    case C5224.STRING_SET_FIELD_NUMBER /* 6 */:
                        if (i == 6 || i == 8 || i == 9) {
                        }
                        break;
                    default:
                        throw new AssertionError(AbstractC3589.m8099(i2));
                }
            } else if (i2 != 6 || (c2622.f10176 && this.f16034.f10176)) {
                return true;
            }
        }
        return false;
    }

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public final C4214 m9157() {
        int i = this.f16031;
        int iM8218 = AbstractC3653.m8218(i);
        C2622 c2622 = this.f16034;
        switch (iM8218) {
            case 0:
            case 5:
            case C5224.STRING_SET_FIELD_NUMBER /* 6 */:
            case C5224.DOUBLE_FIELD_NUMBER /* 7 */:
            case C5224.BYTES_FIELD_NUMBER /* 8 */:
                return null;
            case 1:
                return c2622.f10164;
            case 2:
                return c2622.f10161;
            case 3:
                return c2622.f10151;
            case 4:
                return c2622.f10149;
            default:
                throw new AssertionError(AbstractC3589.m8099(i));
        }
    }
}
