package zp;

import java.util.List;
import tp.g2;

/* loaded from: classes3.dex */
public abstract class x {

    /* renamed from: a, reason: collision with root package name */
    private static final boolean f53602a = false;

    private static final y a(Throwable th2, String str) {
        if (f53602a) {
            return new y(th2, str);
        }
        if (th2 != null) {
            throw th2;
        }
        d();
        throw new rm.k();
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public static /* synthetic */ y b(Throwable th2, String str, int i10, Object obj) {
        if ((i10 & 1) != 0) {
            th2 = null;
        }
        if ((i10 & 2) != 0) {
            str = null;
        }
        return a(th2, str);
    }

    public static final boolean c(g2 g2Var) {
        return g2Var.X() instanceof y;
    }

    public static final Void d() {
        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'");
    }

    public static final g2 e(v vVar, List list) {
        try {
            return vVar.b(list);
        } catch (Throwable th2) {
            return a(th2, vVar.a());
        }
    }
}
