package f.a.w.h;

import java.util.concurrent.atomic.AtomicReference;

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

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