package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class ZM extends UW {
    public final /* synthetic */ int m;
    public final Object n;

    public /* synthetic */ ZM(int i, Object obj) {
        this.m = i;
        this.n = obj;
    }

    @Override // o.UW
    public float b(C1751lF c1751lF) {
        float fIntBitsToFloat;
        int iR;
        switch (this.m) {
            case 0:
                SC sc = c1751lF.a;
                if (sc != null) {
                    return ((Number) sc.f(this, Float.valueOf(Float.NaN))).floatValue();
                }
                YM ym = (YM) this.n;
                if (ym.v) {
                    return Float.NaN;
                }
                YM ym2 = ym;
                while (true) {
                    C2689v7 c2689v7 = ym2.x;
                    if (!Float.isNaN((c2689v7 == null || (iR = AbstractC2219q9.R((C1751lF[]) c2689v7.b, c1751lF)) < 0) ? Float.NaN : ((float[]) c2689v7.c)[iR])) {
                        ym2.d0(ym.w0(), c1751lF);
                        InterfaceC1184fK interfaceC1184fKP0 = ym2.p0();
                        InterfaceC1184fK interfaceC1184fKP02 = ym.p0();
                        switch (c1751lF.b) {
                            case 0:
                                fIntBitsToFloat = Float.intBitsToFloat((int) (interfaceC1184fKP02.p(interfaceC1184fKP0, (Float.floatToRawIntBits(r3) & 4294967295L) | (Float.floatToRawIntBits(((int) (interfaceC1184fKP0.K() >> 32)) / 2.0f) << 32)) & 4294967295L));
                                break;
                            default:
                                fIntBitsToFloat = Float.intBitsToFloat((int) (interfaceC1184fKP02.p(interfaceC1184fKP0, (Float.floatToRawIntBits(r3) << 32) | (Float.floatToRawIntBits(((int) (interfaceC1184fKP0.K() & 4294967295L)) / 2.0f) & 4294967295L)) >> 32));
                                break;
                        }
                        return fIntBitsToFloat;
                    }
                    YM ymY0 = ym2.y0();
                    if (ymY0 == null) {
                        ym2.d0(ym.w0(), c1751lF);
                        return Float.NaN;
                    }
                    ym2 = ymY0;
                }
                break;
            default:
                return super.b(c1751lF);
        }
    }

    @Override // o.UW
    public final EnumC1280gK c() {
        switch (this.m) {
            case 0:
                return ((YM) this.n).getLayoutDirection();
            default:
                return ((C2207q3) this.n).getLayoutDirection();
        }
    }

    @Override // o.UW
    public final int d() {
        switch (this.m) {
            case 0:
                return ((YM) this.n).Y();
            default:
                return ((C2207q3) this.n).getRoot().O.f773o.l;
        }
    }

    @Override // o.InterfaceC2281qr
    public final float e() {
        switch (this.m) {
            case 0:
                return ((YM) this.n).e();
            default:
                return ((C2207q3) this.n).getDensity().e();
        }
    }

    @Override // o.InterfaceC2281qr
    public final float q() {
        switch (this.m) {
            case 0:
                return ((YM) this.n).q();
            default:
                return ((C2207q3) this.n).getDensity().q();
        }
    }
}
