package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.lq0, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1805lq0 {
    public static final Object f = new Object();
    public final String a;
    public final To0 b;
    public final Object c;
    public final Object d = new Object();
    public volatile Object e = null;

    public /* synthetic */ C1805lq0(String str, Object obj, To0 to0) {
        this.a = str;
        this.c = obj;
        this.b = to0;
    }

    public final Object a(Object obj) {
        synchronized (this.d) {
        }
        if (obj != null) {
            return obj;
        }
        if (Co0.j == null) {
            return this.c;
        }
        synchronized (f) {
            try {
                if (C2616uQ.x()) {
                    return this.e == null ? this.c : this.e;
                }
                try {
                    for (C1805lq0 c1805lq0 : AbstractC1900mq0.a) {
                        if (C2616uQ.x()) {
                            throw new IllegalStateException("Refreshing flag cache must be done on a worker thread.");
                        }
                        Object objZza = null;
                        try {
                            To0 to0 = c1805lq0.b;
                            if (to0 != null) {
                                objZza = to0.zza();
                            }
                        } catch (IllegalStateException unused) {
                        }
                        synchronized (f) {
                            c1805lq0.e = objZza;
                        }
                    }
                } catch (SecurityException unused2) {
                }
                To0 to02 = this.b;
                if (to02 != null) {
                    try {
                        return to02.zza();
                    } catch (IllegalStateException | SecurityException unused3) {
                    }
                }
                return this.c;
            } finally {
            }
        }
    }
}
