package defpackage;

import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
import sun.misc.Unsafe;

/* JADX INFO: renamed from: ˋˇᵹ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public class C1466 {

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public static final /* synthetic */ AtomicReferenceFieldUpdater f5956 = AtomicReferenceFieldUpdater.newUpdater(C1466.class, Object.class, "_next$volatile");

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

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public static final /* synthetic */ AtomicReferenceFieldUpdater f5958;

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public static final /* synthetic */ long f5959;

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public static final /* synthetic */ long f5960;

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public static final /* synthetic */ long f5961;
    private volatile /* synthetic */ Object _next$volatile = this;
    private volatile /* synthetic */ Object _prev$volatile = this;
    private volatile /* synthetic */ Object _removedRef$volatile;

    static {
        Unsafe unsafe = AbstractC1929.f7689;
        f5959 = unsafe.objectFieldOffset(C1466.class.getDeclaredField("_next$volatile"));
        f5958 = AtomicReferenceFieldUpdater.newUpdater(C1466.class, Object.class, "_prev$volatile");
        f5960 = unsafe.objectFieldOffset(C1466.class.getDeclaredField("_prev$volatile"));
        f5957 = AtomicReferenceFieldUpdater.newUpdater(C1466.class, Object.class, "_removedRef$volatile");
        f5961 = unsafe.objectFieldOffset(C1466.class.getDeclaredField("_removedRef$volatile"));
    }

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public static C1466 m4197(C1466 c1466) {
        while (c1466.mo4199()) {
            f5958.getClass();
            c1466 = (C1466) AbstractC1929.f7689.getObjectVolatile(c1466, f5960);
        }
        return c1466;
    }

    public String toString() {
        return new C2685(this, ᵹˊᵫˋ.class, "classSimpleName", "getClassSimpleName(Ljava/lang/Object;)Ljava/lang/String;", 1) + '@' + ᵹˊᵫˋ.ᵶᵥᵝ(this);
    }

    /* JADX WARN: Code restructure failed: missing block: B:11:0x0034, code lost:
    
        return r8;
     */
    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final C1466 m4198() {
        C1466 c1466;
        Unsafe unsafe;
        loop0: while (true) {
            f5958.getClass();
            Unsafe unsafe2 = AbstractC1929.f7689;
            long j = f5960;
            C1466 c14662 = (C1466) unsafe2.getObjectVolatile(this, j);
            C1466 c14663 = null;
            C1466 c14664 = c14662;
            while (true) {
                f5956.getClass();
                if (c14664 == null) {
                    C1685.m4560();
                    return null;
                }
                Unsafe unsafe3 = AbstractC1929.f7689;
                long j2 = f5959;
                Object objectVolatile = unsafe3.getObjectVolatile(c14664, j2);
                if (objectVolatile != this) {
                    C1466 c14665 = c14662;
                    c1466 = this;
                    if (c1466.mo4199()) {
                        return null;
                    }
                    if (!(objectVolatile instanceof C5570)) {
                        c14663 = c14664;
                        c14664 = (C1466) objectVolatile;
                    } else if (c14663 != null) {
                        C1466 c14666 = ((C5570) objectVolatile).f21023;
                        do {
                            C1466 c14667 = c14664;
                            unsafe = AbstractC1929.f7689;
                            boolean zCompareAndSwapObject = unsafe.compareAndSwapObject(c14663, f5959, c14667, c14666);
                            c14664 = c14667;
                            if (zCompareAndSwapObject) {
                                this = c1466;
                                c14664 = c14663;
                                c14662 = c14665;
                                c14663 = null;
                            }
                        } while (unsafe.getObjectVolatile(c14663, j2) == c14664);
                    } else {
                        if (c14664 == null) {
                            C1685.m4560();
                            return null;
                        }
                        c14664 = (C1466) unsafe3.getObjectVolatile(c14664, j);
                    }
                    this = c1466;
                    c14662 = c14665;
                } else {
                    if (c14662 == c14664) {
                        break;
                    }
                    while (true) {
                        Unsafe unsafe4 = AbstractC1929.f7689;
                        C1466 c14668 = this;
                        boolean zCompareAndSwapObject2 = unsafe4.compareAndSwapObject(c14668, f5960, c14662, c14664);
                        C1466 c14669 = c14662;
                        c1466 = c14668;
                        if (zCompareAndSwapObject2) {
                            break loop0;
                        }
                        if (unsafe4.getObjectVolatile(c1466, j) != c14669) {
                            break;
                        }
                        this = c1466;
                        c14662 = c14669;
                    }
                }
            }
            this = c1466;
        }
    }

    /* JADX INFO: renamed from: ˋˈ, reason: contains not printable characters */
    public boolean mo4199() {
        return m4207() instanceof C5570;
    }

    /* JADX INFO: renamed from: ᵝᵶ, reason: contains not printable characters */
    public final C1466 m4200() {
        C1466 c1466M4198 = m4198();
        if (c1466M4198 != null) {
            return c1466M4198;
        }
        f5958.getClass();
        return m4197((C1466) AbstractC1929.f7689.getObjectVolatile(this, f5960));
    }

    /* JADX INFO: renamed from: ᵟᵹᵙ, reason: contains not printable characters */
    public final C5570 m4201() {
        f5957.getClass();
        Unsafe unsafe = AbstractC1929.f7689;
        long j = f5961;
        C5570 c5570 = (C5570) unsafe.getObjectVolatile(this, j);
        if (c5570 != null) {
            return c5570;
        }
        C5570 c55702 = new C5570(this);
        unsafe.putObjectVolatile(this, j, c55702);
        return c55702;
    }

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final boolean m4202(C1466 c1466, int i) {
        C1466 c1466M4200;
        do {
            c1466M4200 = m4200();
            if (c1466M4200 instanceof C1878) {
                return (((C1878) c1466M4200).f7437 & i) == 0 && c1466M4200.m4202(c1466, i);
            }
        } while (!c1466M4200.m4208(c1466, this));
        return true;
    }

    /* JADX INFO: renamed from: ᵪᵹᵥᵻ, reason: contains not printable characters */
    public final C1466 m4203() {
        C1466 c1466;
        while (true) {
            Object objM4207 = this.m4207();
            if (objM4207 instanceof C5570) {
                return ((C5570) objM4207).f21023;
            }
            if (objM4207 == this) {
                return (C1466) objM4207;
            }
            C1466 c14662 = (C1466) objM4207;
            C5570 c5570M4201 = c14662.m4201();
            while (true) {
                f5956.getClass();
                Unsafe unsafe = AbstractC1929.f7689;
                long j = f5959;
                c1466 = this;
                if (unsafe.compareAndSwapObject(c1466, j, objM4207, c5570M4201)) {
                    c14662.m4198();
                    return null;
                }
                if (unsafe.getObjectVolatile(c1466, j) != objM4207) {
                    break;
                }
                this = c1466;
            }
            this = c1466;
        }
    }

    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public final C1466 m4204() {
        Object objM4207 = m4207();
        C5570 c5570 = objM4207 instanceof C5570 ? (C5570) objM4207 : null;
        return c5570 != null ? c5570.f21023 : (C1466) objM4207;
    }

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public final void m4205(C1466 c1466) {
        C1466 c14662;
        while (true) {
            f5958.getClass();
            if (c1466 == null) {
                C1685.m4560();
                return;
            }
            Unsafe unsafe = AbstractC1929.f7689;
            long j = f5960;
            C1466 c14663 = (C1466) unsafe.getObjectVolatile(c1466, j);
            if (this.m4207() != c1466) {
                return;
            }
            while (c1466 != null) {
                Unsafe unsafe2 = AbstractC1929.f7689;
                c14662 = this;
                C1466 c14664 = c1466;
                if (unsafe2.compareAndSwapObject(c14664, f5960, c14663, c14662)) {
                    if (c14662.mo4199()) {
                        c14664.m4198();
                        return;
                    }
                    return;
                } else {
                    if (c14664 == null) {
                        C1685.m4560();
                        return;
                    }
                    c1466 = c14664;
                    if (unsafe2.getObjectVolatile(c14664, j) != c14663) {
                        break;
                    } else {
                        this = c14662;
                    }
                }
            }
            C1685.m4560();
            return;
            this = c14662;
        }
    }

    /* JADX WARN: Code restructure failed: missing block: B:12:0x0034, code lost:
    
        r9 = r4;
        r10 = r8;
     */
    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m4206(C2404 c2404) {
        f5958.getClass();
        Unsafe unsafe = AbstractC1929.f7689;
        unsafe.putObjectVolatile(c2404, f5960, this);
        f5956.getClass();
        long j = f5959;
        unsafe.putObjectVolatile(c2404, j, this);
        while (this.m4207() == this) {
            while (true) {
                Unsafe unsafe2 = AbstractC1929.f7689;
                C1466 c1466 = this;
                C2404 c24042 = c2404;
                if (unsafe2.compareAndSwapObject(c1466, f5959, this, c24042)) {
                    c24042.m4205(c1466);
                    return;
                } else {
                    if (unsafe2.getObjectVolatile(c1466, j) != c1466) {
                        break;
                    }
                    this = c1466;
                    c2404 = c24042;
                }
            }
        }
    }

    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public final Object m4207() {
        f5956.getClass();
        return AbstractC1929.f7689.getObjectVolatile(this, f5959);
    }

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public final boolean m4208(C1466 c1466, C1466 c14662) {
        f5958.getClass();
        Unsafe unsafe = AbstractC1929.f7689;
        unsafe.putObjectVolatile(c1466, f5960, this);
        f5956.getClass();
        long j = f5959;
        unsafe.putObjectVolatile(c1466, j, c14662);
        while (true) {
            Unsafe unsafe2 = AbstractC1929.f7689;
            C1466 c14663 = this;
            C1466 c14664 = c1466;
            C1466 c14665 = c14662;
            if (unsafe2.compareAndSwapObject(c14663, f5959, c14665, c14664)) {
                c14664.m4205(c14665);
                return true;
            }
            if (unsafe2.getObjectVolatile(c14663, j) != c14665) {
                return false;
            }
            this = c14663;
            c14662 = c14665;
            c1466 = c14664;
        }
    }
}
