package r0;

import androidx.compose.ui.platform.y2;

/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public final class d {

    /* renamed from: a, reason: collision with root package name */
    private final y2 f34139a;

    /* renamed from: b, reason: collision with root package name */
    private int f34140b;

    /* renamed from: c, reason: collision with root package name */
    private d2.y f34141c;

    public d(y2 y2Var) {
        this.f34139a = y2Var;
    }

    public final int a() {
        return this.f34140b;
    }

    public final boolean b(d2.y yVar, d2.y yVar2) {
        boolean f10;
        f10 = s.f(this.f34139a, yVar, yVar2);
        return f10;
    }

    public final boolean c(d2.y yVar, d2.y yVar2) {
        return yVar2.o() - yVar.o() < this.f34139a.a();
    }

    public final void d(d2.m mVar) {
        d2.y yVar = this.f34141c;
        d2.y yVar2 = (d2.y) mVar.c().get(0);
        if (yVar != null && c(yVar, yVar2) && b(yVar, yVar2)) {
            this.f34140b++;
        } else {
            this.f34140b = 1;
        }
        this.f34141c = yVar2;
    }
}
