package c0;

import a0.AbstractC0953y0;
import a0.C0911k;
import i0.AbstractC2237a;
import i0.C2239c;
import i0.C2245i;
import i0.C2246j;
import java.util.List;
import q.AbstractC2761L;
import x4.AbstractC3252r;

/* JADX INFO: renamed from: c0.g, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1206g implements l1.B {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final long f13320a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final h1.c f13321b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final int f13322c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final C0911k f13323d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final C1201b f13324e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final C1201b f13325f;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public final C1198B f13326j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public final C1198B f13327k;
    public final C1202c l;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public final C1202c f13328m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public final C1202c f13329n;

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public final C1199C f13330o;

    /* JADX INFO: renamed from: p, reason: collision with root package name */
    public final C1199C f13331p;

    public C1206g(long j4, h1.c cVar, C0911k c0911k) {
        int iG0 = cVar.g0(AbstractC0953y0.f10333a);
        this.f13320a = j4;
        this.f13321b = cVar;
        this.f13322c = iG0;
        this.f13323d = c0911k;
        int iG02 = cVar.g0(Float.intBitsToFloat((int) (j4 >> 32)));
        C2245i c2245i = C2239c.f18805p;
        this.f13324e = new C1201b(c2245i, c2245i, iG02);
        C2245i c2245i2 = C2239c.f18807r;
        this.f13325f = new C1201b(c2245i2, c2245i2, iG02);
        this.f13326j = new C1198B(AbstractC2237a.f18791c);
        this.f13327k = new C1198B(AbstractC2237a.f18792d);
        int iG03 = cVar.g0(Float.intBitsToFloat((int) (j4 & 4294967295L)));
        C2246j c2246j = C2239c.f18802m;
        C2246j c2246j2 = C2239c.f18804o;
        this.l = new C1202c(c2246j, c2246j2, iG03);
        this.f13328m = new C1202c(c2246j2, c2246j, iG03);
        this.f13329n = new C1202c(C2239c.f18803n, c2246j, iG03);
        this.f13330o = new C1199C(c2246j, iG0);
        this.f13331p = new C1199C(c2246j2, iG0);
    }

    @Override // l1.B
    public final long b(h1.k kVar, long j4, h1.m mVar, long j6) {
        h1.k kVar2;
        long j7;
        char c6;
        int iA;
        char c7;
        long j8;
        int i6;
        int i7;
        char c8 = 3;
        char c9 = ' ';
        int i8 = (int) (j4 >> 32);
        List listB = AbstractC3252r.B(this.f13324e, this.f13325f, ((int) (kVar.a() >> 32)) < i8 / 2 ? this.f13326j : this.f13327k);
        int size = listB.size();
        int i9 = 0;
        while (true) {
            if (i9 >= size) {
                kVar2 = kVar;
                j7 = j4;
                c6 = c8;
                iA = 0;
                break;
            }
            InterfaceC1210k interfaceC1210k = (InterfaceC1210k) listB.get(i9);
            int i10 = (int) (j6 >> 32);
            int i11 = size;
            c6 = c8;
            j7 = j4;
            int i12 = i9;
            kVar2 = kVar;
            iA = interfaceC1210k.a(kVar2, j7, i10, mVar);
            if (i12 == AbstractC3252r.A(listB) || (iA >= 0 && i10 + iA <= i8)) {
                break;
            }
            i9 = i12 + 1;
            size = i11;
            c8 = c6;
        }
        long j9 = 4294967295L;
        int i13 = (int) (j7 & 4294967295L);
        C1199C c1199c = ((int) (kVar2.a() & 4294967295L)) < i13 / 2 ? this.f13330o : this.f13331p;
        C1202c c1202c = this.l;
        C1202c c1202c2 = this.f13328m;
        C1202c c1202c3 = this.f13329n;
        InterfaceC1211l[] interfaceC1211lArr = new InterfaceC1211l[4];
        interfaceC1211lArr[0] = c1202c;
        interfaceC1211lArr[1] = c1202c2;
        interfaceC1211lArr[2] = c1202c3;
        interfaceC1211lArr[c6] = c1199c;
        List listB2 = AbstractC3252r.B(interfaceC1211lArr);
        int size2 = listB2.size();
        int i14 = 0;
        while (i14 < size2) {
            c7 = c9;
            j8 = j9;
            int i15 = (int) (j6 & j8);
            int iA2 = ((InterfaceC1211l) listB2.get(i14)).a(kVar2, j7, i15);
            if (i14 == AbstractC3252r.A(listB2) || (iA2 >= (i7 = this.f13322c) && i15 + iA2 <= i13 - i7)) {
                i6 = iA2;
                break;
            }
            i14++;
            c9 = c7;
            j9 = j8;
        }
        c7 = c9;
        j8 = j9;
        i6 = 0;
        long j10 = (((long) iA) << c7) | (((long) i6) & j8);
        this.f13323d.invoke(kVar2, W.d.f(j10, j6));
        return j10;
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof C1206g)) {
            return false;
        }
        C1206g c1206g = (C1206g) obj;
        return this.f13320a == c1206g.f13320a && kotlin.jvm.internal.o.c(this.f13321b, c1206g.f13321b) && this.f13322c == c1206g.f13322c && kotlin.jvm.internal.o.c(this.f13323d, c1206g.f13323d);
    }

    public final int hashCode() {
        return this.f13323d.hashCode() + AbstractC2761L.a(this.f13322c, (this.f13321b.hashCode() + (Long.hashCode(this.f13320a) * 31)) * 31, 31);
    }

    public final String toString() {
        return "DropdownMenuPositionProvider(contentOffset=" + ((Object) h1.g.a(this.f13320a)) + ", density=" + this.f13321b + ", verticalMargin=" + this.f13322c + ", onPositionCalculated=" + this.f13323d + ')';
    }
}
