package ym;

import java.lang.reflect.Method;
import kotlin.jvm.internal.t;
import sm.p;

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

    /* JADX INFO: Access modifiers changed from: private */
    /* renamed from: ym.a$a, reason: collision with other inner class name */
    /* loaded from: classes3.dex */
    public static final class C1046a {

        /* renamed from: a, reason: collision with root package name */
        public static final C1046a f52842a = new C1046a();

        /* renamed from: b, reason: collision with root package name */
        public static final Method f52843b;

        /* renamed from: c, reason: collision with root package name */
        public static final Method f52844c;

        /* JADX WARN: Removed duplicated region for block: B:10:0x003d A[LOOP:0: B:2:0x0013->B:10:0x003d, LOOP_END] */
        /* JADX WARN: Removed duplicated region for block: B:11:0x0041 A[EDGE_INSN: B:11:0x0041->B:12:0x0041 BREAK  A[LOOP:0: B:2:0x0013->B:10:0x003d], SYNTHETIC] */
        static {
            Method method;
            Method method2;
            boolean z10;
            Object w02;
            Method[] methods = Throwable.class.getMethods();
            t.d(methods);
            int length = methods.length;
            int i10 = 0;
            int i11 = 0;
            while (true) {
                method = null;
                if (i11 >= length) {
                    method2 = null;
                    break;
                }
                method2 = methods[i11];
                if (t.b(method2.getName(), "addSuppressed")) {
                    Class<?>[] parameterTypes = method2.getParameterTypes();
                    t.f(parameterTypes, "getParameterTypes(...)");
                    w02 = p.w0(parameterTypes);
                    if (t.b(w02, Throwable.class)) {
                        z10 = true;
                        if (!z10) {
                            break;
                        } else {
                            i11++;
                        }
                    }
                }
                z10 = false;
                if (!z10) {
                }
            }
            f52843b = method2;
            int length2 = methods.length;
            while (true) {
                if (i10 >= length2) {
                    break;
                }
                Method method3 = methods[i10];
                if (t.b(method3.getName(), "getSuppressed")) {
                    method = method3;
                    break;
                }
                i10++;
            }
            f52844c = method;
        }

        private C1046a() {
        }
    }

    public void a(Throwable cause, Throwable exception) {
        t.g(cause, "cause");
        t.g(exception, "exception");
        Method method = C1046a.f52843b;
        if (method != null) {
            method.invoke(cause, exception);
        }
    }

    public hn.c b() {
        return new hn.b();
    }
}
