package d.a.s.h;

import java.util.concurrent.atomic.AtomicReference;

/* JADX INFO: loaded from: classes.dex */
public final class b extends AtomicReference<Throwable> {
    public boolean a(Throwable th) {
        Throwable th2;
        Throwable th3 = d.f5898a;
        do {
            th2 = get();
            if (th2 == d.f5898a) {
                return false;
            }
        } while (!compareAndSet(th2, th2 == null ? th : new d.a.q.a(th2, th)));
        return true;
    }

    public Throwable b() {
        Throwable th = d.f5898a;
        Throwable th2 = get();
        Throwable th3 = d.f5898a;
        return th2 != th3 ? getAndSet(th3) : th2;
    }
}
