package X6FRs_4.X6FRs_4.KQgRr5e_0.XnFJ5_9;

import X6FRs_4.X6FRs_4.KQgRr5e_0.Xgtqvk_8;
/* compiled from: ConstraintAnchor.java */
/* loaded from: classes.dex */
public class X6FRs_4 {

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public X6FRs_4.X6FRs_4.KQgRr5e_0.Xgtqvk_8 f1198KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final IFxWkV_5 f1200KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final Mqv2r_3 f1201KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public X6FRs_4 f1203KQgRr5e_0;
    public int PGPF6hQ_2;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public EuDEkJe_12 f1199KQgRr5e_0 = new EuDEkJe_12(this);
    public int KQgRr5e_0 = 0;
    public int QxJ9d_1 = -1;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public PGPF6hQ_2 f1202KQgRr5e_0 = PGPF6hQ_2.NONE;

    /* compiled from: ConstraintAnchor.java */
    /* loaded from: classes.dex */
    public static /* synthetic */ class KQgRr5e_0 {
        public static final /* synthetic */ int[] KQgRr5e_0;

        static {
            int[] iArr = new int[Mqv2r_3.values().length];
            KQgRr5e_0 = iArr;
            try {
                iArr[Mqv2r_3.CENTER.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                KQgRr5e_0[Mqv2r_3.LEFT.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                KQgRr5e_0[Mqv2r_3.RIGHT.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
            try {
                KQgRr5e_0[Mqv2r_3.TOP.ordinal()] = 4;
            } catch (NoSuchFieldError unused4) {
            }
            try {
                KQgRr5e_0[Mqv2r_3.BOTTOM.ordinal()] = 5;
            } catch (NoSuchFieldError unused5) {
            }
            try {
                KQgRr5e_0[Mqv2r_3.BASELINE.ordinal()] = 6;
            } catch (NoSuchFieldError unused6) {
            }
            try {
                KQgRr5e_0[Mqv2r_3.CENTER_X.ordinal()] = 7;
            } catch (NoSuchFieldError unused7) {
            }
            try {
                KQgRr5e_0[Mqv2r_3.CENTER_Y.ordinal()] = 8;
            } catch (NoSuchFieldError unused8) {
            }
            try {
                KQgRr5e_0[Mqv2r_3.NONE.ordinal()] = 9;
            } catch (NoSuchFieldError unused9) {
            }
        }
    }

    /* compiled from: ConstraintAnchor.java */
    /* loaded from: classes.dex */
    public enum Mqv2r_3 {
        NONE,
        LEFT,
        TOP,
        RIGHT,
        BOTTOM,
        BASELINE,
        CENTER,
        CENTER_X,
        CENTER_Y
    }

    /* compiled from: ConstraintAnchor.java */
    /* loaded from: classes.dex */
    public enum PGPF6hQ_2 {
        NONE,
        STRONG,
        WEAK
    }

    /* compiled from: ConstraintAnchor.java */
    /* loaded from: classes.dex */
    public enum QxJ9d_1 {
        RELAXED,
        STRICT
    }

    public X6FRs_4(IFxWkV_5 iFxWkV_5, Mqv2r_3 mqv2r_3) {
        QxJ9d_1 qxJ9d_1 = QxJ9d_1.RELAXED;
        this.PGPF6hQ_2 = 0;
        this.f1200KQgRr5e_0 = iFxWkV_5;
        this.f1201KQgRr5e_0 = mqv2r_3;
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public EuDEkJe_12 m575KQgRr5e_0() {
        return this.f1199KQgRr5e_0;
    }

    public int QxJ9d_1() {
        X6FRs_4 x6FRs_4;
        if (this.f1200KQgRr5e_0.Xgtqvk_8() == 8) {
            return 0;
        }
        if (this.QxJ9d_1 > -1 && (x6FRs_4 = this.f1203KQgRr5e_0) != null && x6FRs_4.f1200KQgRr5e_0.Xgtqvk_8() == 8) {
            return this.QxJ9d_1;
        }
        return this.KQgRr5e_0;
    }

    public String toString() {
        return this.f1200KQgRr5e_0.m557KQgRr5e_0() + ":" + this.f1201KQgRr5e_0.toString();
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public X6FRs_4.X6FRs_4.KQgRr5e_0.Xgtqvk_8 m574KQgRr5e_0() {
        return this.f1198KQgRr5e_0;
    }

    public void KQgRr5e_0(X6FRs_4.X6FRs_4.KQgRr5e_0.PGPF6hQ_2 pGPF6hQ_2) {
        X6FRs_4.X6FRs_4.KQgRr5e_0.Xgtqvk_8 xgtqvk_8 = this.f1198KQgRr5e_0;
        if (xgtqvk_8 == null) {
            this.f1198KQgRr5e_0 = new X6FRs_4.X6FRs_4.KQgRr5e_0.Xgtqvk_8(Xgtqvk_8.KQgRr5e_0.UNRESTRICTED, null);
        } else {
            xgtqvk_8.KQgRr5e_0();
        }
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public IFxWkV_5 m576KQgRr5e_0() {
        return this.f1200KQgRr5e_0;
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public Mqv2r_3 m577KQgRr5e_0() {
        return this.f1201KQgRr5e_0;
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public PGPF6hQ_2 m578KQgRr5e_0() {
        return this.f1202KQgRr5e_0;
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public X6FRs_4 m579KQgRr5e_0() {
        return this.f1203KQgRr5e_0;
    }

    public int KQgRr5e_0() {
        return this.PGPF6hQ_2;
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public void m580KQgRr5e_0() {
        this.f1203KQgRr5e_0 = null;
        this.KQgRr5e_0 = 0;
        this.QxJ9d_1 = -1;
        this.f1202KQgRr5e_0 = PGPF6hQ_2.STRONG;
        this.PGPF6hQ_2 = 0;
        QxJ9d_1 qxJ9d_1 = QxJ9d_1.RELAXED;
        this.f1199KQgRr5e_0.PGPF6hQ_2();
    }

    public boolean KQgRr5e_0(X6FRs_4 x6FRs_4, int i, PGPF6hQ_2 pGPF6hQ_2, int i2) {
        return KQgRr5e_0(x6FRs_4, i, -1, pGPF6hQ_2, i2, false);
    }

    public boolean KQgRr5e_0(X6FRs_4 x6FRs_4, int i, int i2, PGPF6hQ_2 pGPF6hQ_2, int i3, boolean z) {
        if (x6FRs_4 == null) {
            this.f1203KQgRr5e_0 = null;
            this.KQgRr5e_0 = 0;
            this.QxJ9d_1 = -1;
            this.f1202KQgRr5e_0 = PGPF6hQ_2.NONE;
            this.PGPF6hQ_2 = 2;
            return true;
        } else if (z || KQgRr5e_0(x6FRs_4)) {
            this.f1203KQgRr5e_0 = x6FRs_4;
            if (i > 0) {
                this.KQgRr5e_0 = i;
            } else {
                this.KQgRr5e_0 = 0;
            }
            this.QxJ9d_1 = i2;
            this.f1202KQgRr5e_0 = pGPF6hQ_2;
            this.PGPF6hQ_2 = i3;
            return true;
        } else {
            return false;
        }
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public boolean m581KQgRr5e_0() {
        return this.f1203KQgRr5e_0 != null;
    }

    public boolean KQgRr5e_0(X6FRs_4 x6FRs_4) {
        boolean z = false;
        if (x6FRs_4 == null) {
            return false;
        }
        Mqv2r_3 m577KQgRr5e_0 = x6FRs_4.m577KQgRr5e_0();
        Mqv2r_3 mqv2r_3 = this.f1201KQgRr5e_0;
        if (m577KQgRr5e_0 == mqv2r_3) {
            return mqv2r_3 != Mqv2r_3.BASELINE || (x6FRs_4.m576KQgRr5e_0().m571QxJ9d_1() && m576KQgRr5e_0().m571QxJ9d_1());
        }
        switch (KQgRr5e_0.KQgRr5e_0[mqv2r_3.ordinal()]) {
            case 1:
                return (m577KQgRr5e_0 == Mqv2r_3.BASELINE || m577KQgRr5e_0 == Mqv2r_3.CENTER_X || m577KQgRr5e_0 == Mqv2r_3.CENTER_Y) ? false : true;
            case 2:
            case 3:
                boolean z2 = m577KQgRr5e_0 == Mqv2r_3.LEFT || m577KQgRr5e_0 == Mqv2r_3.RIGHT;
                if (x6FRs_4.m576KQgRr5e_0() instanceof Xgtqvk_8) {
                    return (z2 || m577KQgRr5e_0 == Mqv2r_3.CENTER_X) ? true : true;
                }
                return z2;
            case 4:
            case 5:
                boolean z3 = m577KQgRr5e_0 == Mqv2r_3.TOP || m577KQgRr5e_0 == Mqv2r_3.BOTTOM;
                if (x6FRs_4.m576KQgRr5e_0() instanceof Xgtqvk_8) {
                    return (z3 || m577KQgRr5e_0 == Mqv2r_3.CENTER_Y) ? true : true;
                }
                return z3;
            case 6:
            case 7:
            case 8:
            case 9:
                return false;
            default:
                throw new AssertionError(this.f1201KQgRr5e_0.name());
        }
    }
}
