package o;

import java.util.concurrent.CancellationException;
import java.util.concurrent.atomic.AtomicReference;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.oR, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2048oR {
    public final AtomicReference a = new AtomicReference(null);
    public final C2427sR b = C1884mi0.d();

    public static final void a(C2048oR c2048oR, C1763lR c1763lR) {
        AtomicReference atomicReference = c2048oR.a;
        while (true) {
            C1763lR c1763lR2 = (C1763lR) atomicReference.get();
            if (c1763lR2 != null && AbstractC2462sn.a(c1763lR.a, c1763lR2.a) < 0) {
                throw new CancellationException("Current mutation had a higher priority");
            }
            while (!atomicReference.compareAndSet(c1763lR2, c1763lR)) {
                if (atomicReference.get() != c1763lR2) {
                    break;
                }
            }
            if (c1763lR2 != null) {
                c1763lR2.b.c(new C1440hz("Mutation interrupted", 0));
                return;
            }
            return;
        }
    }
}
