what-the-bank/sources/o/C13328fXb.java

159 lines
5.5 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.R;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicInteger;
/* renamed from: o.fXb, reason: case insensitive filesystem */
/* loaded from: classes6.dex */
public final class C13328fXb {
public static <T, R> boolean d(InterfaceC13169fSq<T> interfaceC13169fSq, InterfaceC13174fSv<? super R> interfaceC13174fSv, fSS<? super T, ? extends InterfaceC13169fSq<? extends R>> fss) {
if (!(interfaceC13169fSq instanceof InterfaceC13189fTc)) {
return false;
}
try {
R.bool boolVar = (Object) ((InterfaceC13189fTc) interfaceC13169fSq).d();
if (boolVar == null) {
EnumC13195fTi.e(interfaceC13174fSv);
return true;
}
try {
InterfaceC13169fSq interfaceC13169fSq2 = (InterfaceC13169fSq) Objects.requireNonNull(fss.a(boolVar), "The mapper returned a null ObservableSource");
if (interfaceC13169fSq2 instanceof InterfaceC13189fTc) {
try {
Object d = ((InterfaceC13189fTc) interfaceC13169fSq2).d();
if (d == null) {
EnumC13195fTi.e(interfaceC13174fSv);
return true;
}
LWm lWm = new LWm(interfaceC13174fSv, d);
interfaceC13174fSv.onSubscribe(lWm);
lWm.run();
} catch (Throwable th) {
C13147fSI.c(th);
EnumC13195fTi.a(th, interfaceC13174fSv);
return true;
}
} else {
interfaceC13169fSq2.subscribe(interfaceC13174fSv);
}
return true;
} catch (Throwable th2) {
C13147fSI.c(th2);
EnumC13195fTi.a(th2, interfaceC13174fSv);
return true;
}
} catch (Throwable th3) {
C13147fSI.c(th3);
EnumC13195fTi.a(th3, interfaceC13174fSv);
return true;
}
}
/* renamed from: o.fXb$IeS */
/* loaded from: classes6.dex */
public static final class IeS<T, R> extends AbstractC13163fSk<R> {
private fSS<? super T, ? extends InterfaceC13169fSq<? extends R>> c;
private T e;
public IeS(T t, fSS<? super T, ? extends InterfaceC13169fSq<? extends R>> fss) {
this.e = t;
this.c = fss;
}
@Override // o.AbstractC13163fSk
public final void subscribeActual(InterfaceC13174fSv<? super R> interfaceC13174fSv) {
try {
InterfaceC13169fSq interfaceC13169fSq = (InterfaceC13169fSq) Objects.requireNonNull(this.c.a(this.e), "The mapper returned a null ObservableSource");
if (interfaceC13169fSq instanceof InterfaceC13189fTc) {
try {
Object d = ((InterfaceC13189fTc) interfaceC13169fSq).d();
if (d == null) {
EnumC13195fTi.e(interfaceC13174fSv);
return;
}
LWm lWm = new LWm(interfaceC13174fSv, d);
interfaceC13174fSv.onSubscribe(lWm);
lWm.run();
return;
} catch (Throwable th) {
C13147fSI.c(th);
EnumC13195fTi.a(th, interfaceC13174fSv);
return;
}
}
interfaceC13169fSq.subscribe(interfaceC13174fSv);
} catch (Throwable th2) {
C13147fSI.c(th2);
EnumC13195fTi.a(th2, interfaceC13174fSv);
}
}
}
/* renamed from: o.fXb$LWm */
/* loaded from: classes6.dex */
public static final class LWm<T> extends AtomicInteger implements InterfaceC13412fZo<T>, Runnable {
private T a;
private InterfaceC13174fSv<? super T> d;
public LWm(InterfaceC13174fSv<? super T> interfaceC13174fSv, T t) {
this.d = interfaceC13174fSv;
this.a = t;
}
@Override // o.InterfaceC13414fZq
public final boolean b(T t) {
throw new UnsupportedOperationException("Should not be called!");
}
@Override // o.InterfaceC13414fZq
public final T b() {
if (get() != 1) {
return null;
}
lazySet(3);
return this.a;
}
@Override // o.InterfaceC13414fZq
public final boolean c() {
return get() != 1;
}
@Override // o.InterfaceC13414fZq
public final void e() {
lazySet(3);
}
@Override // o.fSJ
public final void dispose() {
set(3);
}
@Override // o.fSJ
public final boolean isDisposed() {
return get() == 3;
}
@Override // o.InterfaceC13413fZp
public final int b(int i) {
if ((i & 1) == 0) {
return 0;
}
lazySet(1);
return 1;
}
@Override // java.lang.Runnable
public final void run() {
if (get() == 0 && compareAndSet(0, 2)) {
this.d.onNext(this.a);
if (get() == 2) {
lazySet(3);
this.d.onComplete();
}
}
}
}
}