package fg;

import androidx.lifecycle.f0;
import dn.p;
import java.util.List;
import kotlin.coroutines.jvm.internal.l;
import kotlin.jvm.internal.t;
import rm.n0;
import rm.y;
import tp.a1;
import tp.i0;
import tp.m0;

/* loaded from: classes4.dex */
public final class f implements fg.b {

    /* renamed from: a, reason: collision with root package name */
    private final eg.a f18285a;

    /* renamed from: b, reason: collision with root package name */
    private final f0 f18286b;

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes4.dex */
    public static final class a extends kotlin.coroutines.jvm.internal.d {

        /* renamed from: p, reason: collision with root package name */
        Object f18287p;

        /* renamed from: q, reason: collision with root package name */
        /* synthetic */ Object f18288q;

        /* renamed from: s, reason: collision with root package name */
        int f18290s;

        a(vm.d dVar) {
            super(dVar);
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            this.f18288q = obj;
            this.f18290s |= Integer.MIN_VALUE;
            return f.this.a(this);
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes4.dex */
    public static final class b extends l implements p {

        /* renamed from: p, reason: collision with root package name */
        int f18291p;

        b(vm.d dVar) {
            super(2, dVar);
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final vm.d create(Object obj, vm.d dVar) {
            return new b(dVar);
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            wm.d.f();
            if (this.f18291p != 0) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            y.b(obj);
            return f.this.f18285a.b();
        }

        @Override // dn.p
        public final Object invoke(m0 m0Var, vm.d dVar) {
            return ((b) create(m0Var, dVar)).invokeSuspend(n0.f34904a);
        }
    }

    public f(eg.a dao) {
        t.g(dao, "dao");
        this.f18285a = dao;
        this.f18286b = new f0();
    }

    /* JADX WARN: Removed duplicated region for block: B:15:0x0035  */
    /* JADX WARN: Removed duplicated region for block: B:8:0x0023  */
    @Override // fg.b
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public Object a(vm.d dVar) {
        a aVar;
        Object f10;
        int i10;
        if (dVar instanceof a) {
            aVar = (a) dVar;
            int i11 = aVar.f18290s;
            if ((i11 & Integer.MIN_VALUE) != 0) {
                aVar.f18290s = i11 - Integer.MIN_VALUE;
                Object obj = aVar.f18288q;
                f10 = wm.d.f();
                i10 = aVar.f18290s;
                if (i10 != 0) {
                    y.b(obj);
                    i0 b10 = a1.b();
                    b bVar = new b(null);
                    aVar.f18287p = this;
                    aVar.f18290s = 1;
                    obj = tp.i.g(b10, bVar, aVar);
                    if (obj == f10) {
                        return f10;
                    }
                } else {
                    if (i10 != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    this = (f) aVar.f18287p;
                    y.b(obj);
                }
                this.f18286b.n((List) obj);
                return n0.f34904a;
            }
        }
        aVar = new a(dVar);
        Object obj2 = aVar.f18288q;
        f10 = wm.d.f();
        i10 = aVar.f18290s;
        if (i10 != 0) {
        }
        this.f18286b.n((List) obj2);
        return n0.f34904a;
    }
}
