package p025.p026.p027;

import java.util.Iterator;
import java.util.List;
import kotlinx.coroutines.internal.MainDispatcherFactory;
import p025.p026.AbstractC1376;
import p138.p176.p177.p242.p246.p251.C4303;

/* JADX INFO: renamed from: އ.֏.֏.މ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C1291 {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static final AbstractC1376 f4428;

    static {
        Object obj;
        String strM2594 = C1297.m2594("kotlinx.coroutines.fast.service.loader");
        if (strM2594 != null) {
            Boolean.parseBoolean(strM2594);
        }
        List<? extends MainDispatcherFactory> listM7042 = C4303.m7042(C4303.m7070(֏.ؠ()));
        Iterator it = listM7042.iterator();
        if (it.hasNext()) {
            Object next = it.next();
            if (it.hasNext()) {
                int iMo1483 = ((MainDispatcherFactory) next).mo1483();
                do {
                    Object next2 = it.next();
                    int iMo14832 = ((MainDispatcherFactory) next2).mo1483();
                    if (iMo1483 < iMo14832) {
                        next = next2;
                        iMo1483 = iMo14832;
                    }
                } while (it.hasNext());
            }
            obj = next;
        } else {
            obj = null;
        }
        MainDispatcherFactory mainDispatcherFactory = (MainDispatcherFactory) obj;
        if (mainDispatcherFactory != null) {
            try {
                AbstractC1376 abstractC1376Mo1482 = mainDispatcherFactory.mo1482(listM7042);
                if (abstractC1376Mo1482 != null) {
                    f4428 = abstractC1376Mo1482;
                    return;
                }
            } catch (Throwable th) {
                mainDispatcherFactory.mo1481();
                throw th;
            }
        }
        throw new IllegalStateException("Module with the Main dispatcher is missing. Add dependency providing the Main dispatcher, e.g. 'kotlinx-coroutines-android' and ensure it has the same version as 'kotlinx-coroutines-core'");
    }
}
