package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class Oe0 {
    public final Ne0 a;
    public InterfaceC1184fK b = null;
    public InterfaceC1184fK c;

    public Oe0(Ne0 ne0, InterfaceC1184fK interfaceC1184fK) {
        this.a = ne0;
        this.c = interfaceC1184fK;
    }

    public final long a(long j) {
        T00 t00H;
        InterfaceC1184fK interfaceC1184fK = this.b;
        T00 t00 = T00.e;
        if (interfaceC1184fK != null) {
            if (interfaceC1184fK.A()) {
                InterfaceC1184fK interfaceC1184fK2 = this.c;
                t00H = interfaceC1184fK2 != null ? interfaceC1184fK2.h(interfaceC1184fK, true) : null;
            } else {
                t00H = t00;
            }
            if (t00H != null) {
                t00 = t00H;
            }
        }
        int i = (int) (j >> 32);
        float fIntBitsToFloat = Float.intBitsToFloat(i);
        float fIntBitsToFloat2 = t00.a;
        if (fIntBitsToFloat >= fIntBitsToFloat2) {
            float fIntBitsToFloat3 = Float.intBitsToFloat(i);
            fIntBitsToFloat2 = t00.c;
            if (fIntBitsToFloat3 <= fIntBitsToFloat2) {
                fIntBitsToFloat2 = Float.intBitsToFloat(i);
            }
        }
        int i2 = (int) (j & 4294967295L);
        float fIntBitsToFloat4 = Float.intBitsToFloat(i2);
        float fIntBitsToFloat5 = t00.b;
        if (fIntBitsToFloat4 >= fIntBitsToFloat5) {
            float fIntBitsToFloat6 = Float.intBitsToFloat(i2);
            fIntBitsToFloat5 = t00.d;
            if (fIntBitsToFloat6 <= fIntBitsToFloat5) {
                fIntBitsToFloat5 = Float.intBitsToFloat(i2);
            }
        }
        return (Float.floatToRawIntBits(fIntBitsToFloat2) << 32) | (Float.floatToRawIntBits(fIntBitsToFloat5) & 4294967295L);
    }

    public final int b(boolean z, long j) {
        if (z) {
            j = a(j);
        }
        return this.a.b.g(d(j));
    }

    public final boolean c(long j) {
        long jD = d(a(j));
        float fIntBitsToFloat = Float.intBitsToFloat((int) (4294967295L & jD));
        Ne0 ne0 = this.a;
        int iE = ne0.b.e(fIntBitsToFloat);
        int i = (int) (jD >> 32);
        return Float.intBitsToFloat(i) >= ne0.e(iE) && Float.intBitsToFloat(i) <= ne0.f(iE);
    }

    public final long d(long j) {
        InterfaceC1184fK interfaceC1184fK;
        InterfaceC1184fK interfaceC1184fK2 = this.b;
        if (interfaceC1184fK2 == null) {
            return j;
        }
        if (!interfaceC1184fK2.A()) {
            interfaceC1184fK2 = null;
        }
        if (interfaceC1184fK2 == null || (interfaceC1184fK = this.c) == null) {
            return j;
        }
        InterfaceC1184fK interfaceC1184fK3 = interfaceC1184fK.A() ? interfaceC1184fK : null;
        return interfaceC1184fK3 == null ? j : interfaceC1184fK2.p(interfaceC1184fK3, j);
    }

    public final long e(long j) {
        InterfaceC1184fK interfaceC1184fK;
        InterfaceC1184fK interfaceC1184fK2 = this.b;
        if (interfaceC1184fK2 == null) {
            return j;
        }
        if (!interfaceC1184fK2.A()) {
            interfaceC1184fK2 = null;
        }
        if (interfaceC1184fK2 == null || (interfaceC1184fK = this.c) == null) {
            return j;
        }
        InterfaceC1184fK interfaceC1184fK3 = interfaceC1184fK.A() ? interfaceC1184fK : null;
        return interfaceC1184fK3 == null ? j : interfaceC1184fK3.p(interfaceC1184fK2, j);
    }
}
