package defpackage;

import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;

/* JADX INFO: renamed from: ᵱᵽˎᵟ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C4475 implements InterfaceC2973 {

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public Object f17075 = AbstractC4752.f18077;

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public final /* synthetic */ C0349 f17076;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public C3453 f17077;

    public C4475(C0349 c0349) {
        this.f17076 = c0349;
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final Object m9527(C2681 c2681) throws Throwable {
        C2552 c2552;
        C2552 c25522;
        Object obj = this.f17075;
        boolean z = true;
        if (obj == AbstractC4752.f18077 || obj == AbstractC4752.f18080) {
            AtomicReferenceFieldUpdater atomicReferenceFieldUpdater = C0349.f2115;
            C0349 c0349 = this.f17076;
            C2552 c25523 = (C2552) atomicReferenceFieldUpdater.get(c0349);
            while (true) {
                if (c0349.m1629()) {
                    this.f17075 = AbstractC4752.f18080;
                    Throwable thM1631 = c0349.m1631();
                    if (thM1631 != null) {
                        int i = AbstractC1152.f4931;
                        throw thM1631;
                    }
                    z = false;
                } else {
                    long andIncrement = C0349.f2119.getAndIncrement(c0349);
                    long j = AbstractC4752.f18070;
                    long j2 = andIncrement / j;
                    int i2 = (int) (andIncrement % j);
                    if (c25523.f17947 != j2) {
                        C2552 c2552M1653 = c0349.m1653(j2, c25523);
                        if (c2552M1653 == null) {
                            continue;
                        } else {
                            c2552 = c2552M1653;
                        }
                    } else {
                        c2552 = c25523;
                    }
                    Object objM1626 = c0349.m1626(c2552, i2, andIncrement, null);
                    C1735 c1735 = AbstractC4752.f18076;
                    if (objM1626 == c1735) {
                        ᵕᵩʽᵲ.ᵪᵹᵥᵻ("unreachable");
                        return null;
                    }
                    C1735 c17352 = AbstractC4752.f18079;
                    if (objM1626 == c17352) {
                        if (andIncrement < c0349.m1638()) {
                            c2552.m10590();
                        }
                        c25523 = c2552;
                    } else {
                        if (objM1626 == AbstractC4752.f18074) {
                            C3453 c3453 = ᵹˊᵫˋ.ˋˈ(ˌᵨʽʙ.ᵔᵖᵹᵫ(c2681));
                            try {
                                this.f17077 = c3453;
                                Object objM16262 = c0349.m1626(c2552, i2, andIncrement, this);
                                if (objM16262 == c1735) {
                                    mo3792(c2552, i2);
                                } else {
                                    if (objM16262 == c17352) {
                                        if (andIncrement < c0349.m1638()) {
                                            c2552.m10590();
                                        }
                                        C2552 c25524 = (C2552) C0349.f2115.get(c0349);
                                        while (true) {
                                            if (c0349.m1629()) {
                                                C3453 c34532 = this.f17077;
                                                this.f17077 = null;
                                                this.f17075 = AbstractC4752.f18080;
                                                Throwable thM16312 = c0349.m1631();
                                                if (thM16312 == null) {
                                                    c34532.mo3530(Boolean.FALSE);
                                                } else {
                                                    c34532.mo3530(new C2586(thM16312));
                                                }
                                            } else {
                                                long andIncrement2 = C0349.f2119.getAndIncrement(c0349);
                                                long j3 = AbstractC4752.f18070;
                                                long j4 = andIncrement2 / j3;
                                                int i3 = (int) (andIncrement2 % j3);
                                                if (c25524.f17947 != j4) {
                                                    C2552 c2552M16532 = c0349.m1653(j4, c25524);
                                                    if (c2552M16532 != null) {
                                                        c25522 = c2552M16532;
                                                    }
                                                } else {
                                                    c25522 = c25524;
                                                }
                                                Object objM16263 = c0349.m1626(c25522, i3, andIncrement2, this);
                                                C2552 c25525 = c25522;
                                                if (objM16263 == AbstractC4752.f18076) {
                                                    mo3792(c25525, i3);
                                                    break;
                                                }
                                                if (objM16263 == AbstractC4752.f18079) {
                                                    if (andIncrement2 < c0349.m1638()) {
                                                        c25525.m10590();
                                                    }
                                                    c25524 = c25525;
                                                } else {
                                                    if (objM16263 == AbstractC4752.f18074) {
                                                        throw new IllegalStateException("unexpected");
                                                    }
                                                    c25525.m10590();
                                                    this.f17075 = objM16263;
                                                    this.f17077 = null;
                                                }
                                            }
                                        }
                                    } else {
                                        c2552.m10590();
                                        this.f17075 = objM16262;
                                        this.f17077 = null;
                                    }
                                    c3453.mo2190(Boolean.TRUE, null);
                                }
                                return c3453.m7875();
                            } catch (Throwable th) {
                                c3453.m7877();
                                throw th;
                            }
                        }
                        c2552.m10590();
                        this.f17075 = objM1626;
                    }
                }
            }
        }
        return Boolean.valueOf(z);
    }

    @Override // defpackage.InterfaceC2973
    /* JADX INFO: renamed from: ᵲᵶᵳˈ */
    public final void mo3792(AbstractC4709 abstractC4709, int i) {
        C3453 c3453 = this.f17077;
        if (c3453 != null) {
            c3453.mo3792(abstractC4709, i);
        }
    }
}
