package p7;

import android.os.SystemClock;
import com.google.android.gms.internal.ads.vb;
import java.io.IOException;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import java.security.MessageDigest;

/* JADX INFO: loaded from: classes2.dex */
public final class b0 implements vb {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public long f31654b;

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

    public b0(long j10) {
        this.f31654b = Long.MIN_VALUE;
        this.f31655c = new Object();
        this.f31653a = j10;
    }

    public final boolean a() {
        synchronized (this.f31655c) {
            try {
                m7.n.C.f30472k.getClass();
                long jElapsedRealtime = SystemClock.elapsedRealtime();
                if (this.f31654b + this.f31653a > jElapsedRealtime) {
                    return false;
                }
                this.f31654b = jElapsedRealtime;
                return true;
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    @Override // com.google.android.gms.internal.ads.vb
    public final long zza() {
        return this.f31654b;
    }

    @Override // com.google.android.gms.internal.ads.vb
    public final void zzb(MessageDigest[] messageDigestArr, long j10, int i10) throws IOException {
        MappedByteBuffer map = ((FileChannel) this.f31655c).map(FileChannel.MapMode.READ_ONLY, this.f31653a + j10, i10);
        map.load();
        for (MessageDigest messageDigest : messageDigestArr) {
            map.position(0);
            messageDigest.update(map);
        }
    }

    public b0(FileChannel fileChannel, long j10, long j11) {
        this.f31655c = fileChannel;
        this.f31653a = j10;
        this.f31654b = j11;
    }
}
