package kotlinx.coroutines;

/* JADX INFO: compiled from: CancellableContinuationImpl.kt */
/* JADX INFO: loaded from: classes.dex */
final class a0 {
    public final Object a;
    public final l b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final h.x.c.l<Throwable, h.r> f1065c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final Object f1066d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final Throwable f1067e;

    /* JADX WARN: Multi-variable type inference failed */
    public a0(Object obj, l lVar, h.x.c.l<? super Throwable, h.r> lVar2, Object obj2, Throwable th) {
        this.a = obj;
        this.b = lVar;
        this.f1065c = lVar2;
        this.f1066d = obj2;
        this.f1067e = th;
    }

    /* JADX WARN: Multi-variable type inference failed */
    public static /* synthetic */ a0 b(a0 a0Var, Object obj, l lVar, h.x.c.l lVar2, Object obj2, Throwable th, int i2, Object obj3) {
        if ((i2 & 1) != 0) {
            obj = a0Var.a;
        }
        if ((i2 & 2) != 0) {
            lVar = a0Var.b;
        }
        l lVar3 = lVar;
        if ((i2 & 4) != 0) {
            lVar2 = a0Var.f1065c;
        }
        h.x.c.l lVar4 = lVar2;
        if ((i2 & 8) != 0) {
            obj2 = a0Var.f1066d;
        }
        Object obj4 = obj2;
        if ((i2 & 16) != 0) {
            th = a0Var.f1067e;
        }
        return a0Var.a(obj, lVar3, lVar4, obj4, th);
    }

    public final a0 a(Object obj, l lVar, h.x.c.l<? super Throwable, h.r> lVar2, Object obj2, Throwable th) {
        return new a0(obj, lVar, lVar2, obj2, th);
    }

    public final boolean c() {
        return this.f1067e != null;
    }

    public final void d(o<?> oVar, Throwable th) {
        l lVar = this.b;
        if (lVar != null) {
            oVar.n(lVar, th);
        }
        h.x.c.l<Throwable, h.r> lVar2 = this.f1065c;
        if (lVar2 == null) {
            return;
        }
        oVar.o(lVar2, th);
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof a0)) {
            return false;
        }
        a0 a0Var = (a0) obj;
        return h.x.d.k.a(this.a, a0Var.a) && h.x.d.k.a(this.b, a0Var.b) && h.x.d.k.a(this.f1065c, a0Var.f1065c) && h.x.d.k.a(this.f1066d, a0Var.f1066d) && h.x.d.k.a(this.f1067e, a0Var.f1067e);
    }

    public int hashCode() {
        Object obj = this.a;
        int iHashCode = (obj == null ? 0 : obj.hashCode()) * 31;
        l lVar = this.b;
        int iHashCode2 = (iHashCode + (lVar == null ? 0 : lVar.hashCode())) * 31;
        h.x.c.l<Throwable, h.r> lVar2 = this.f1065c;
        int iHashCode3 = (iHashCode2 + (lVar2 == null ? 0 : lVar2.hashCode())) * 31;
        Object obj2 = this.f1066d;
        int iHashCode4 = (iHashCode3 + (obj2 == null ? 0 : obj2.hashCode())) * 31;
        Throwable th = this.f1067e;
        return iHashCode4 + (th != null ? th.hashCode() : 0);
    }

    public String toString() {
        return "CompletedContinuation(result=" + this.a + ", cancelHandler=" + this.b + ", onCancellation=" + this.f1065c + ", idempotentResume=" + this.f1066d + ", cancelCause=" + this.f1067e + ')';
    }

    public /* synthetic */ a0(Object obj, l lVar, h.x.c.l lVar2, Object obj2, Throwable th, int i2, h.x.d.h hVar) {
        this(obj, (i2 & 2) != 0 ? null : lVar, (i2 & 4) != 0 ? null : lVar2, (i2 & 8) != 0 ? null : obj2, (i2 & 16) != 0 ? null : th);
    }
}
