package kotlinx.coroutines;

import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;

/* JADX INFO: compiled from: Builders.common.kt */
/* JADX INFO: loaded from: classes.dex */
public final class y0<T> extends kotlinx.coroutines.o2.o<T> {

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    private static final /* synthetic */ AtomicIntegerFieldUpdater f1173g = AtomicIntegerFieldUpdater.newUpdater(y0.class, "_decision");
    private volatile /* synthetic */ int _decision;

    private final boolean H0() {
        do {
            int i2 = this._decision;
            if (i2 != 0) {
                if (i2 == 1) {
                    return false;
                }
                throw new IllegalStateException("Already resumed".toString());
            }
        } while (!f1173g.compareAndSet(this, 0, 2));
        return true;
    }

    @Override // kotlinx.coroutines.o2.o, kotlinx.coroutines.c
    protected void D0(Object obj) {
        if (H0()) {
            return;
        }
        kotlinx.coroutines.o2.f.c(h.u.i.c.c(this.f1119f), f0.a(obj, this.f1119f), null, 2, null);
    }

    @Override // kotlinx.coroutines.o2.o, kotlinx.coroutines.z1
    protected void w(Object obj) {
        D0(obj);
    }
}
