package defpackage;

import com.google.android.gms.measurement.api.AppMeasurementSdk;
import defpackage.dw7;
import defpackage.uv0;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;

/* JADX INFO: loaded from: classes3.dex */
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0004\u001a\u00020\u00032\f\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00010\u0000H\n¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"Luv0;", "", AppMeasurementSdk.ConditionalUserProperty.VALUE, "Le6a;", "<anonymous>", "(Luv0;)V"}, k = 3, mv = {2, 0, 0})
@DebugMetadata(c = "kotlinx.coroutines.flow.FlowKt__DelayKt$debounceInternal$1$3$2", f = "Delay.kt", i = {0}, l = {236}, m = "invokeSuspend", n = {"$this$onFailure_u2dWpGqRn0$iv"}, s = {"L$0"})
@vx8
final class b83 extends SuspendLambda implements gr3<uv0<? extends Object>, Continuation<? super e6a>, Object> {
    public dw7.h a;
    public int b;
    public /* synthetic */ Object c;
    public final /* synthetic */ dw7.h d;
    public final /* synthetic */ l43 e;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public b83(l43 l43Var, dw7.h hVar, Continuation continuation) {
        super(2, continuation);
        this.d = hVar;
        this.e = l43Var;
    }

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Continuation create(Object obj, Continuation continuation) {
        b83 b83Var = new b83(this.e, this.d, continuation);
        b83Var.c = obj;
        return b83Var;
    }

    @Override // defpackage.gr3
    public final Object invoke(Object obj, Object obj2) {
        return ((b83) create(new uv0(((uv0) obj).a), (Continuation) obj2)).invokeSuspend(e6a.a);
    }

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Object invokeSuspend(Object obj) throws Throwable {
        dw7.h hVar;
        dw7.h hVar2;
        ck1 ck1Var = ck1.a;
        int i = this.b;
        if (i == 0) {
            s38.b(obj);
            Object obj2 = ((uv0) this.c).a;
            boolean z = obj2 instanceof uv0.c;
            hVar = this.d;
            if (!z) {
                hVar.a = obj2;
            }
            if (z) {
                Throwable thA = uv0.a(obj2);
                if (thA != null) {
                    throw thA;
                }
                Object obj3 = hVar.a;
                if (obj3 != null) {
                    if (obj3 == kq6.a) {
                        obj3 = null;
                    }
                    this.c = obj2;
                    this.a = hVar;
                    this.b = 1;
                    if (this.e.emit(obj3, this) == ck1Var) {
                        return ck1Var;
                    }
                    hVar2 = hVar;
                }
                hVar.a = kq6.c;
            }
            return e6a.a;
        }
        if (i != 1) {
            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
        hVar2 = this.a;
        s38.b(obj);
        hVar = hVar2;
        hVar.a = kq6.c;
        return e6a.a;
    }
}
