package defpackage;

import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Arrays;

/* renamed from: ᵷᵷ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C4926 {

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public static int f18320;

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public int f18321;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public int f18322;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public ArrayList f18323;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public int f18324;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public ArrayList f18325;

    public final String toString() {
        StringBuilder sb = new StringBuilder();
        int i = this.f18322;
        sb.append(i == 0 ? "Horizontal" : i == 1 ? "Vertical" : i == 2 ? "Both" : "Unknown");
        sb.append(" [");
        String strM9545 = AbstractC4486.m9545(sb, this.f18324, "] <");
        ArrayList arrayList = this.f18323;
        int size = arrayList.size();
        int i2 = 0;
        while (i2 < size) {
            Object obj = arrayList.get(i2);
            i2++;
            strM9545 = strM9545 + " " + ((C0425) obj).f2392;
        }
        return strM9545.concat(" >");
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final void m10361(int i, C4926 c4926) {
        int i2 = c4926.f18324;
        ArrayList arrayList = this.f18323;
        int size = arrayList.size();
        int i3 = 0;
        while (i3 < size) {
            Object obj = arrayList.get(i3);
            i3++;
            C0425 c0425 = (C0425) obj;
            ArrayList arrayList2 = c4926.f18323;
            if (!arrayList2.contains(c0425)) {
                arrayList2.add(c0425);
            }
            if (i == 0) {
                c0425.f2397 = i2;
            } else {
                c0425.f2353 = i2;
            }
        }
        this.f18321 = i2;
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final void m10362(ArrayList arrayList) {
        int size = this.f18323.size();
        if (this.f18321 != -1 && size > 0) {
            for (int i = 0; i < arrayList.size(); i++) {
                C4926 c4926 = (C4926) arrayList.get(i);
                if (this.f18321 == c4926.f18324) {
                    m10361(this.f18322, c4926);
                }
            }
        }
        if (size == 0) {
            arrayList.remove(this);
        }
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final int m10363(C1692 c1692, int i) {
        int iM4865;
        int iM48652;
        ArrayList arrayList = this.f18323;
        if (arrayList.size() == 0) {
            return 0;
        }
        C1968 c1968 = (C1968) ((C0425) arrayList.get(0)).f2367;
        c1692.m4876();
        c1968.mo2006(c1692, false);
        for (int i2 = 0; i2 < arrayList.size(); i2++) {
            ((C0425) arrayList.get(i2)).mo2006(c1692, false);
        }
        if (i == 0 && c1968.f7918 > 0) {
            ˋˌ.ᵴᵳ(c1968, c1692, arrayList, 0);
        }
        if (i == 1 && c1968.f7927 > 0) {
            ˋˌ.ᵴᵳ(c1968, c1692, arrayList, 1);
        }
        try {
            c1692.m4867();
        } catch (Exception e) {
            System.err.println(e.toString() + "\n" + Arrays.toString(e.getStackTrace()).replace("[", "   at ").replace(",", "\n   at").replace("]", ""));
        }
        this.f18325 = new ArrayList();
        for (int i3 = 0; i3 < arrayList.size(); i3++) {
            C0425 c0425 = (C0425) arrayList.get(i3);
            ᵬˆˀᵣ r4 = new ᵬˆˀᵣ(15);
            new WeakReference(c0425);
            C1692.m4865(c0425.f2377);
            C1692.m4865(c0425.f2407);
            C1692.m4865(c0425.f2358);
            C1692.m4865(c0425.f2420);
            C1692.m4865(c0425.f2378);
            this.f18325.add(r4);
        }
        if (i == 0) {
            iM4865 = C1692.m4865(c1968.f2377);
            iM48652 = C1692.m4865(c1968.f2358);
            c1692.m4876();
        } else {
            iM4865 = C1692.m4865(c1968.f2407);
            iM48652 = C1692.m4865(c1968.f2420);
            c1692.m4876();
        }
        return iM48652 - iM4865;
    }
}
