package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.hj0, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1411hj0 implements InterfaceC1028dj0 {
    public final InterfaceC1219fj0 l;
    public final int m;
    public final long n;

    /* renamed from: o, reason: collision with root package name */
    public final long f567o;

    public C1411hj0(InterfaceC1219fj0 interfaceC1219fj0, int i, long j) {
        this.l = interfaceC1219fj0;
        this.m = i;
        this.n = (interfaceC1219fj0.o() + interfaceC1219fj0.j()) * 1000000;
        this.f567o = j * 1000000;
    }

    @Override // o.InterfaceC1028dj0
    public final boolean a() {
        return true;
    }

    @Override // o.InterfaceC1028dj0
    public final long b(Y6 y6, Y6 y62, Y6 y63) {
        return Long.MAX_VALUE;
    }

    public final long c(long j) {
        long j2 = j + this.f567o;
        if (j2 <= 0) {
            return 0L;
        }
        long j3 = this.n;
        long j4 = j2 / j3;
        return (this.m == 1 || j4 % ((long) 2) == 0) ? j2 - (j4 * j3) : ((j4 + 1) * j3) - j2;
    }

    public final Y6 d(long j, Y6 y6, Y6 y62, Y6 y63) {
        long j2 = this.f567o;
        long j3 = j + j2;
        long j4 = this.n;
        return j3 > j4 ? this.l.l(j4 - j2, y6, y63, y62) : y62;
    }

    @Override // o.InterfaceC1028dj0
    public final Y6 l(long j, Y6 y6, Y6 y62, Y6 y63) {
        return this.l.l(c(j), y6, y62, d(j, y6, y63, y62));
    }

    @Override // o.InterfaceC1028dj0
    public final Y6 m(long j, Y6 y6, Y6 y62, Y6 y63) {
        return this.l.m(c(j), y6, y62, d(j, y6, y63, y62));
    }
}
