package defpackage;

import java.util.concurrent.CancellationException;
import kotlin.Metadata;

/* JADX INFO: renamed from: ox4, reason: from Kotlin metadata and case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0003\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\u0010\u0006\u001a\u00020\u0003\"\u0004\b\u0000\u0010\u00002\b\u0010\u0002\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"R", "", "throwable", "Le6a;", "invoke", "(Ljava/lang/Throwable;)V", "<anonymous>"}, k = 3, mv = {1, 8, 0})
final class C0651ox4 extends u55 implements sq3<Throwable, e6a> {
    public final /* synthetic */ px4 a;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C0651ox4(px4 px4Var) {
        super(1);
        this.a = px4Var;
    }

    @Override // defpackage.sq3
    public final Object invoke(Object obj) {
        Throwable th = (Throwable) obj;
        px4 px4Var = this.a;
        if (th == null) {
            if (!px4Var.a.isDone()) {
                throw new IllegalArgumentException("Failed requirement.");
            }
        } else if (th instanceof CancellationException) {
            px4Var.a.cancel(true);
        } else {
            pm8 pm8Var = px4Var.a;
            Throwable cause = th.getCause();
            if (cause != null) {
                th = cause;
            }
            pm8Var.i(th);
        }
        return e6a.a;
    }
}
