package kotlinx.coroutines.flow;

import kotlin.coroutines.Continuation;
import kotlinx.coroutines.j0;

/* JADX INFO: loaded from: classes.dex */
public final class r implements j0 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final s f29414a;

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

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final Continuation f29417d;

    public r(s sVar, long j10, Object obj, kotlinx.coroutines.h hVar) {
        this.f29414a = sVar;
        this.f29415b = j10;
        this.f29416c = obj;
        this.f29417d = hVar;
    }

    @Override // kotlinx.coroutines.j0
    public final void dispose() {
        s sVar = this.f29414a;
        synchronized (sVar) {
            if (this.f29415b < sVar.n()) {
                return;
            }
            Object[] objArr = sVar.f29421g;
            nb.g.f(objArr);
            long j10 = this.f29415b;
            if (objArr[((int) j10) & (objArr.length - 1)] != this) {
                return;
            }
            h.b(objArr, j10, h.f29373c);
            sVar.i();
        }
    }
}
