package o;

import android.view.View;
import com.google.android.gms.common.api.Api;
import java.util.List;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.vL, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2706vL {
    public boolean a;
    public int b;
    public int c;
    public int d;
    public int e;
    public int f;
    public int g;
    public int h;
    public int i;
    public int j;
    public List k;
    public boolean l;

    public final void a(View view) {
        int iB;
        int size = this.k.size();
        View view2 = null;
        int i = Api.BaseClientBuilder.API_PRIORITY_OTHER;
        for (int i2 = 0; i2 < size; i2++) {
            View view3 = ((AbstractC2488t10) this.k.get(i2)).a;
            C1253g10 c1253g10 = (C1253g10) view3.getLayoutParams();
            if (view3 != view && !c1253g10.a.h() && (iB = (c1253g10.a.b() - this.d) * this.e) >= 0 && iB < i) {
                view2 = view3;
                if (iB == 0) {
                    break;
                } else {
                    i = iB;
                }
            }
        }
        if (view2 == null) {
            this.d = -1;
        } else {
            this.d = ((C1253g10) view2.getLayoutParams()).a.b();
        }
    }

    public final View b(C1729l10 c1729l10) {
        List list = this.k;
        if (list == null) {
            View view = c1729l10.i(this.d, Long.MAX_VALUE).a;
            this.d += this.e;
            return view;
        }
        int size = list.size();
        for (int i = 0; i < size; i++) {
            View view2 = ((AbstractC2488t10) this.k.get(i)).a;
            C1253g10 c1253g10 = (C1253g10) view2.getLayoutParams();
            if (!c1253g10.a.h() && this.d == c1253g10.a.b()) {
                a(view2);
                return view2;
            }
        }
        return null;
    }
}
