package o;

import android.content.Context;
import android.graphics.Typeface;
import android.os.Trace;
import java.nio.MappedByteBuffer;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.p1, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final /* synthetic */ class RunnableC2108p1 implements Runnable {
    public final /* synthetic */ int l;
    public final /* synthetic */ Object m;

    public /* synthetic */ RunnableC2108p1(int i, Object obj) {
        this.l = i;
        this.m = obj;
    }

    private final void a() {
        C3075zA c3075zA = (C3075zA) this.m;
        synchronized (c3075zA.f821o) {
            try {
                if (c3075zA.s == null) {
                    return;
                }
                try {
                    QA qaC = c3075zA.c();
                    int i = qaC.f;
                    if (i == 2) {
                        synchronized (c3075zA.f821o) {
                        }
                    }
                    if (i != 0) {
                        throw new RuntimeException("fetchFonts result is not OK. (" + i + ")");
                    }
                    try {
                        int i2 = AbstractC1500ig0.a;
                        Trace.beginSection("EmojiCompat.FontRequestEmojiCompatConfig.buildTypeface");
                        J7 j7 = c3075zA.n;
                        Context context = c3075zA.l;
                        j7.getClass();
                        QA[] qaArr = {qaC};
                        AbstractC2461sm0 abstractC2461sm0 = AbstractC1977nh0.a;
                        AbstractC2798wI.f("TypefaceCompat.createFromFontInfo");
                        try {
                            Typeface typefaceF = AbstractC1977nh0.a.f(context, qaArr, 0);
                            Trace.endSection();
                            MappedByteBuffer mappedByteBufferZ = AbstractC2841wm0.z(c3075zA.l, qaC.a);
                            if (mappedByteBufferZ == null || typefaceF == null) {
                                throw new RuntimeException("Unable to open file.");
                            }
                            try {
                                Trace.beginSection("EmojiCompat.MetadataRepo.create");
                                C2062oc0 c2062oc0 = new C2062oc0(typefaceF, AbstractC2001nt0.B(mappedByteBufferZ));
                                Trace.endSection();
                                synchronized (c3075zA.f821o) {
                                    try {
                                        AbstractC0249Jp abstractC0249Jp = c3075zA.s;
                                        if (abstractC0249Jp != null) {
                                            abstractC0249Jp.W(c2062oc0);
                                        }
                                    } finally {
                                    }
                                }
                                c3075zA.b();
                            } finally {
                                int i3 = AbstractC1500ig0.a;
                            }
                        } finally {
                            Trace.endSection();
                        }
                    } catch (Throwable th) {
                        throw th;
                    }
                } catch (Throwable th2) {
                    synchronized (c3075zA.f821o) {
                        try {
                            AbstractC0249Jp abstractC0249Jp2 = c3075zA.s;
                            if (abstractC0249Jp2 != null) {
                                abstractC0249Jp2.T(th2);
                            }
                            c3075zA.b();
                        } finally {
                        }
                    }
                }
            } finally {
            }
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:245:0x04cd  */
    /* JADX WARN: Type inference failed for: r0v83, types: [java.lang.Object, o.zK] */
    /* JADX WARN: Type inference failed for: r0v95, types: [java.lang.Object, o.zK] */
    /* JADX WARN: Type inference failed for: r4v0 */
    /* JADX WARN: Type inference failed for: r4v1 */
    /* JADX WARN: Type inference failed for: r4v4 */
    /* JADX WARN: Type inference failed for: r4v5, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r4v6 */
    @Override // java.lang.Runnable
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void run() {
        /*
            Method dump skipped, instructions count: 1580
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.RunnableC2108p1.run():void");
    }
}
