package androidx.constraintlayout.solver.widgets.analyzer;

import com.facebook.internal.security.CertificateUtil;
import java.util.ArrayList;
import java.util.List;
import ῲ.ⁱ.ῲ.㿎.ᕣ.AbstractC2096;
import ῲ.ⁱ.ῲ.㿎.ᕣ.C2095;

public class DependencyNode implements AbstractC2096 {

    /* renamed from: ʬ  reason: contains not printable characters */
    public boolean f906 = false;

    /* renamed from: ඓ  reason: contains not printable characters */
    public Type f907 = Type.UNKNOWN;

    /* renamed from: ᕣ  reason: contains not printable characters */
    public List<AbstractC2096> f908 = new ArrayList();

    /* renamed from: ᨨ  reason: contains not printable characters */
    public C2095 f909 = null;

    /* renamed from: ῲ  reason: contains not printable characters */
    public boolean f910 = false;

    /* renamed from: ⁱ  reason: contains not printable characters */
    public int f911;

    /* renamed from: K  reason: contains not printable characters */
    public AbstractC2096 f912 = null;

    /* renamed from: 㑃  reason: contains not printable characters */
    public List<DependencyNode> f913 = new ArrayList();

    /* renamed from: 㳳  reason: contains not printable characters */
    public boolean f914 = false;

    /* renamed from: 㴹  reason: contains not printable characters */
    public int f915;

    /* renamed from: 㸾  reason: contains not printable characters */
    public WidgetRun f916;

    /* renamed from: 㿎  reason: contains not printable characters */
    public int f917 = 1;

    public enum Type {
        UNKNOWN,
        HORIZONTAL_DIMENSION,
        VERTICAL_DIMENSION,
        LEFT,
        RIGHT,
        TOP,
        BOTTOM,
        BASELINE
    }

    public DependencyNode(WidgetRun widgetRun) {
        this.f916 = widgetRun;
    }

    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(this.f916.f922.f893);
        sb.append(CertificateUtil.DELIMITER);
        sb.append(this.f907);
        sb.append("(");
        sb.append(this.f914 ? Integer.valueOf(this.f911) : "unresolved");
        sb.append(") <t=");
        sb.append(this.f913.size());
        sb.append(":d=");
        sb.append(this.f908.size());
        sb.append(">");
        return sb.toString();
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m516(int i) {
        if (!this.f914) {
            this.f914 = true;
            this.f911 = i;
            for (AbstractC2096 r0 : this.f908) {
                r0.m5540(r0);
            }
        }
    }

    @Override // ῲ.ⁱ.ῲ.㿎.ᕣ.AbstractC2096
    /* renamed from: K  reason: contains not printable characters */
    public void m517(AbstractC2096 r6) {
        for (DependencyNode dependencyNode : this.f913) {
            if (!dependencyNode.f914) {
                return;
            }
        }
        this.f906 = true;
        AbstractC2096 r0 = this.f912;
        if (r0 != null) {
            r0.m5540(this);
        }
        if (this.f910) {
            this.f916.m528(this);
            return;
        }
        DependencyNode dependencyNode2 = null;
        int i = 0;
        for (DependencyNode dependencyNode3 : this.f913) {
            if (!(dependencyNode3 instanceof C2095)) {
                i++;
                dependencyNode2 = dependencyNode3;
            }
        }
        if (dependencyNode2 != null && i == 1 && dependencyNode2.f914) {
            C2095 r62 = this.f909;
            if (r62 != null) {
                if (r62.f914) {
                    this.f915 = this.f917 * r62.f911;
                } else {
                    return;
                }
            }
            m516(dependencyNode2.f911 + this.f915);
        }
        AbstractC2096 r63 = this.f912;
        if (r63 != null) {
            r63.m5540(this);
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m515() {
        this.f913.clear();
        this.f908.clear();
        this.f914 = false;
        this.f911 = 0;
        this.f906 = false;
        this.f910 = false;
    }
}
