package o;

import java.util.LinkedHashMap;
import java.util.Map;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class GP extends LP implements InterfaceC0581Wk, InterfaceC1851mK {
    public LinkedHashMap z;

    @Override // o.InterfaceC1851mK
    public final InterfaceC2329rO a(InterfaceC2424sO interfaceC2424sO, InterfaceC1760lO interfaceC1760lO, long j) {
        float f = ((C0148Fs) AbstractC2461sm0.j(this, AbstractC2134pI.c)).l;
        float f2 = 0;
        if (f < f2) {
            f = f2;
        }
        VW vwC = interfaceC1760lO.c(j);
        boolean z = this.y && !Float.isNaN(f) && Float.compare(f, f2) > 0;
        int iN = !Float.isNaN(f) ? interfaceC2424sO.N(f) : 0;
        int iMax = z ? Math.max(vwC.l, iN) : vwC.l;
        int iMax2 = z ? Math.max(vwC.m, iN) : vwC.m;
        if (z) {
            LinkedHashMap linkedHashMap = this.z;
            if (linkedHashMap == null) {
                linkedHashMap = new LinkedHashMap(2);
                this.z = linkedHashMap;
            }
            C2740vj0 c2740vj0 = AbstractC2134pI.b;
            int iRound = Math.round((iN - vwC.l) / 2.0f);
            if (iRound < 0) {
                iRound = 0;
            }
            linkedHashMap.put(c2740vj0, Integer.valueOf(iRound));
            C1467iF c1467iF = AbstractC2134pI.a;
            int iRound2 = Math.round((iN - vwC.m) / 2.0f);
            linkedHashMap.put(c1467iF, Integer.valueOf(iRound2 >= 0 ? iRound2 : 0));
        }
        Map map = this.z;
        if (map == null) {
            map = C0358Nv.l;
        }
        return interfaceC2424sO.H(iMax, iMax2, map, new PH(iMax, vwC, iMax2));
    }
}
