package com.google.firebase.sessions;

import android.util.Log;
import dn.q;
import kotlin.Metadata;
import kotlin.coroutines.jvm.internal.l;
import rm.n0;
import rm.y;

@kotlin.coroutines.jvm.internal.f(c = "com.google.firebase.sessions.SessionDatastoreImpl$firebaseSessionDataFlow$1", f = "SessionDatastore.kt", l = {76}, m = "invokeSuspend")
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0003\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0005\u001a\u00020\u0004*\b\u0012\u0004\u0012\u00020\u00010\u00002\u0006\u0010\u0003\u001a\u00020\u0002H\u008a@"}, d2 = {"Lwp/f;", "Li4/d;", "", "exception", "Lrm/n0;", "<anonymous>"}, k = 3, mv = {1, 8, 0})
/* loaded from: classes3.dex */
final class SessionDatastoreImpl$firebaseSessionDataFlow$1 extends l implements q {
    private /* synthetic */ Object L$0;
    /* synthetic */ Object L$1;
    int label;

    /* JADX INFO: Access modifiers changed from: package-private */
    public SessionDatastoreImpl$firebaseSessionDataFlow$1(vm.d<? super SessionDatastoreImpl$firebaseSessionDataFlow$1> dVar) {
        super(3, dVar);
    }

    @Override // kotlin.coroutines.jvm.internal.a
    public final Object invokeSuspend(Object obj) {
        Object f10;
        f10 = wm.d.f();
        int i10 = this.label;
        if (i10 == 0) {
            y.b(obj);
            wp.f fVar = (wp.f) this.L$0;
            Log.e("FirebaseSessionsRepo", "Error reading stored session data.", (Throwable) this.L$1);
            i4.d a10 = i4.e.a();
            this.L$0 = null;
            this.label = 1;
            if (fVar.emit(a10, this) == f10) {
                return f10;
            }
        } else {
            if (i10 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            y.b(obj);
        }
        return n0.f34904a;
    }

    @Override // dn.q
    public final Object invoke(wp.f fVar, Throwable th2, vm.d<? super n0> dVar) {
        SessionDatastoreImpl$firebaseSessionDataFlow$1 sessionDatastoreImpl$firebaseSessionDataFlow$1 = new SessionDatastoreImpl$firebaseSessionDataFlow$1(dVar);
        sessionDatastoreImpl$firebaseSessionDataFlow$1.L$0 = fVar;
        sessionDatastoreImpl$firebaseSessionDataFlow$1.L$1 = th2;
        return sessionDatastoreImpl$firebaseSessionDataFlow$1.invokeSuspend(n0.f34904a);
    }
}
