package o; import java.util.concurrent.atomic.AtomicReference; /* renamed from: o.fYq, reason: case insensitive filesystem */ /* loaded from: classes6.dex */ public final class C13378fYq implements InterfaceC13408fZk { private final AtomicReference> d; private final AtomicReference> e; public C13378fYq() { AtomicReference> atomicReference = new AtomicReference<>(); this.d = atomicReference; AtomicReference> atomicReference2 = new AtomicReference<>(); this.e = atomicReference2; LWm lWm = new LWm<>(); atomicReference2.lazySet(lWm); atomicReference.getAndSet(lWm); } @Override // o.InterfaceC13414fZq public final boolean b(T t) { if (t == null) { throw new NullPointerException("Null is not a valid element"); } LWm lWm = new LWm<>(t); this.d.getAndSet(lWm).lazySet(lWm); return true; } @Override // o.InterfaceC13408fZk, o.InterfaceC13414fZq public final T b() { LWm lWm; LWm lWm2 = this.e.get(); LWm lWm3 = lWm2.get(); if (lWm3 != null) { T t = lWm3.a; lWm3.a = null; this.e.lazySet(lWm3); return t; } if (lWm2 == this.d.get()) { return null; } do { lWm = lWm2.get(); } while (lWm == null); T t2 = lWm.a; lWm.a = null; this.e.lazySet(lWm); return t2; } @Override // o.InterfaceC13414fZq public final void e() { while (b() != null && this.e.get() != this.d.get()) { } } @Override // o.InterfaceC13414fZq public final boolean c() { return this.e.get() == this.d.get(); } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.fYq$LWm */ /* loaded from: classes6.dex */ public static final class LWm extends AtomicReference> { E a; LWm() { } LWm(E e) { this.a = e; } } }