package X6FRs_4.YghfZG_14.PGPF6hQ_2;

import android.view.View;
/* compiled from: ViewBoundsCheck.java */
/* loaded from: classes.dex */
public class EuDEkJe_12 {
    public KQgRr5e_0 KQgRr5e_0 = new KQgRr5e_0();

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final QxJ9d_1 f1345KQgRr5e_0;

    /* compiled from: ViewBoundsCheck.java */
    /* loaded from: classes.dex */
    public interface QxJ9d_1 {
        int KQgRr5e_0();

        int KQgRr5e_0(View view);

        View KQgRr5e_0(int i);

        int QxJ9d_1();

        int QxJ9d_1(View view);
    }

    public EuDEkJe_12(QxJ9d_1 qxJ9d_1) {
        this.f1345KQgRr5e_0 = qxJ9d_1;
    }

    public View KQgRr5e_0(int i, int i2, int i3, int i4) {
        int KQgRr5e_02 = this.f1345KQgRr5e_0.KQgRr5e_0();
        int QxJ9d_12 = this.f1345KQgRr5e_0.QxJ9d_1();
        int i5 = i2 > i ? 1 : -1;
        View view = null;
        while (i != i2) {
            View KQgRr5e_03 = this.f1345KQgRr5e_0.KQgRr5e_0(i);
            this.KQgRr5e_0.KQgRr5e_0(KQgRr5e_02, QxJ9d_12, this.f1345KQgRr5e_0.QxJ9d_1(KQgRr5e_03), this.f1345KQgRr5e_0.KQgRr5e_0(KQgRr5e_03));
            if (i3 != 0) {
                this.KQgRr5e_0.KQgRr5e_0();
                this.KQgRr5e_0.KQgRr5e_0(i3);
                if (this.KQgRr5e_0.m622KQgRr5e_0()) {
                    return KQgRr5e_03;
                }
            }
            if (i4 != 0) {
                this.KQgRr5e_0.KQgRr5e_0();
                this.KQgRr5e_0.KQgRr5e_0(i4);
                if (this.KQgRr5e_0.m622KQgRr5e_0()) {
                    view = KQgRr5e_03;
                }
            }
            i += i5;
        }
        return view;
    }

    /* compiled from: ViewBoundsCheck.java */
    /* loaded from: classes.dex */
    public static class KQgRr5e_0 {
        public int KQgRr5e_0 = 0;

        /* renamed from: Mqv2r_3  reason: collision with root package name */
        public int f3332Mqv2r_3;
        public int PGPF6hQ_2;
        public int QxJ9d_1;

        /* renamed from: X6FRs_4  reason: collision with root package name */
        public int f3333X6FRs_4;

        public int KQgRr5e_0(int i, int i2) {
            if (i > i2) {
                return 1;
            }
            return i == i2 ? 2 : 4;
        }

        public void KQgRr5e_0(int i, int i2, int i3, int i4) {
            this.QxJ9d_1 = i;
            this.PGPF6hQ_2 = i2;
            this.f3332Mqv2r_3 = i3;
            this.f3333X6FRs_4 = i4;
        }

        public void KQgRr5e_0(int i) {
            this.KQgRr5e_0 = i | this.KQgRr5e_0;
        }

        public void KQgRr5e_0() {
            this.KQgRr5e_0 = 0;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public boolean m622KQgRr5e_0() {
            int i = this.KQgRr5e_0;
            if ((i & 7) == 0 || (i & (KQgRr5e_0(this.f3332Mqv2r_3, this.QxJ9d_1) << 0)) != 0) {
                int i2 = this.KQgRr5e_0;
                if ((i2 & 112) == 0 || (i2 & (KQgRr5e_0(this.f3332Mqv2r_3, this.PGPF6hQ_2) << 4)) != 0) {
                    int i3 = this.KQgRr5e_0;
                    if ((i3 & 1792) == 0 || (i3 & (KQgRr5e_0(this.f3333X6FRs_4, this.QxJ9d_1) << 8)) != 0) {
                        int i4 = this.KQgRr5e_0;
                        return (i4 & 28672) == 0 || (i4 & (KQgRr5e_0(this.f3333X6FRs_4, this.PGPF6hQ_2) << 12)) != 0;
                    }
                    return false;
                }
                return false;
            }
            return false;
        }
    }

    public boolean KQgRr5e_0(View view, int i) {
        this.KQgRr5e_0.KQgRr5e_0(this.f1345KQgRr5e_0.KQgRr5e_0(), this.f1345KQgRr5e_0.QxJ9d_1(), this.f1345KQgRr5e_0.QxJ9d_1(view), this.f1345KQgRr5e_0.KQgRr5e_0(view));
        if (i != 0) {
            this.KQgRr5e_0.KQgRr5e_0();
            this.KQgRr5e_0.KQgRr5e_0(i);
            return this.KQgRr5e_0.m622KQgRr5e_0();
        }
        return false;
    }
}
