package y0;

import java.util.Arrays;
import y0.m;

/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public abstract /* synthetic */ class p3 {

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class a extends kotlin.coroutines.jvm.internal.l implements dn.p {

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

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

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ dn.p f51755r;

        /* renamed from: s, reason: collision with root package name */
        final /* synthetic */ q1 f51756s;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        a(dn.p pVar, q1 q1Var, vm.d dVar) {
            super(2, dVar);
            this.f51755r = pVar;
            this.f51756s = q1Var;
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final vm.d create(Object obj, vm.d dVar) {
            a aVar = new a(this.f51755r, this.f51756s, dVar);
            aVar.f51754q = obj;
            return aVar;
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            Object f10;
            f10 = wm.d.f();
            int i10 = this.f51753p;
            if (i10 == 0) {
                rm.y.b(obj);
                tp.m0 m0Var = (tp.m0) this.f51754q;
                dn.p pVar = this.f51755r;
                g2 g2Var = new g2(this.f51756s, m0Var.getCoroutineContext());
                this.f51753p = 1;
                if (pVar.invoke(g2Var, this) == f10) {
                    return f10;
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                rm.y.b(obj);
            }
            return rm.n0.f34904a;
        }

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

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class b extends kotlin.coroutines.jvm.internal.l implements dn.p {

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

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

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ dn.p f51759r;

        /* renamed from: s, reason: collision with root package name */
        final /* synthetic */ q1 f51760s;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        b(dn.p pVar, q1 q1Var, vm.d dVar) {
            super(2, dVar);
            this.f51759r = pVar;
            this.f51760s = q1Var;
        }

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

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            Object f10;
            f10 = wm.d.f();
            int i10 = this.f51757p;
            if (i10 == 0) {
                rm.y.b(obj);
                tp.m0 m0Var = (tp.m0) this.f51758q;
                dn.p pVar = this.f51759r;
                g2 g2Var = new g2(this.f51760s, m0Var.getCoroutineContext());
                this.f51757p = 1;
                if (pVar.invoke(g2Var, this) == f10) {
                    return f10;
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                rm.y.b(obj);
            }
            return rm.n0.f34904a;
        }

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

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class c extends kotlin.coroutines.jvm.internal.l implements dn.p {

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

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

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ dn.p f51763r;

        /* renamed from: s, reason: collision with root package name */
        final /* synthetic */ q1 f51764s;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        c(dn.p pVar, q1 q1Var, vm.d dVar) {
            super(2, dVar);
            this.f51763r = pVar;
            this.f51764s = q1Var;
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final vm.d create(Object obj, vm.d dVar) {
            c cVar = new c(this.f51763r, this.f51764s, dVar);
            cVar.f51762q = obj;
            return cVar;
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            Object f10;
            f10 = wm.d.f();
            int i10 = this.f51761p;
            if (i10 == 0) {
                rm.y.b(obj);
                tp.m0 m0Var = (tp.m0) this.f51762q;
                dn.p pVar = this.f51763r;
                g2 g2Var = new g2(this.f51764s, m0Var.getCoroutineContext());
                this.f51761p = 1;
                if (pVar.invoke(g2Var, this) == f10) {
                    return f10;
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                rm.y.b(obj);
            }
            return rm.n0.f34904a;
        }

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

    public static final y3 a(Object obj, dn.p pVar, m mVar, int i10) {
        if (p.H()) {
            p.Q(10454275, i10, -1, "androidx.compose.runtime.produceState (ProduceState.kt:79)");
        }
        Object f10 = mVar.f();
        m.a aVar = m.f51621a;
        if (f10 == aVar.a()) {
            f10 = s3.d(obj, null, 2, null);
            mVar.I(f10);
        }
        q1 q1Var = (q1) f10;
        rm.n0 n0Var = rm.n0.f34904a;
        boolean m10 = mVar.m(pVar);
        Object f11 = mVar.f();
        if (m10 || f11 == aVar.a()) {
            f11 = new a(pVar, q1Var, null);
            mVar.I(f11);
        }
        p0.d(n0Var, (dn.p) f11, mVar, 6);
        if (p.H()) {
            p.P();
        }
        return q1Var;
    }

    public static final y3 b(Object obj, Object obj2, Object obj3, dn.p pVar, m mVar, int i10) {
        if (p.H()) {
            p.Q(-1703169085, i10, -1, "androidx.compose.runtime.produceState (ProduceState.kt:146)");
        }
        Object f10 = mVar.f();
        m.a aVar = m.f51621a;
        if (f10 == aVar.a()) {
            f10 = s3.d(obj, null, 2, null);
            mVar.I(f10);
        }
        q1 q1Var = (q1) f10;
        boolean m10 = mVar.m(pVar);
        Object f11 = mVar.f();
        if (m10 || f11 == aVar.a()) {
            f11 = new b(pVar, q1Var, null);
            mVar.I(f11);
        }
        int i11 = i10 >> 3;
        p0.e(obj2, obj3, (dn.p) f11, mVar, (i11 & 112) | (i11 & 14));
        if (p.H()) {
            p.P();
        }
        return q1Var;
    }

    public static final y3 c(Object obj, Object[] objArr, dn.p pVar, m mVar, int i10) {
        if (p.H()) {
            p.Q(490154582, i10, -1, "androidx.compose.runtime.produceState (ProduceState.kt:214)");
        }
        Object f10 = mVar.f();
        m.a aVar = m.f51621a;
        if (f10 == aVar.a()) {
            f10 = s3.d(obj, null, 2, null);
            mVar.I(f10);
        }
        q1 q1Var = (q1) f10;
        Object[] copyOf = Arrays.copyOf(objArr, objArr.length);
        boolean m10 = mVar.m(pVar);
        Object f11 = mVar.f();
        if (m10 || f11 == aVar.a()) {
            f11 = new c(pVar, q1Var, null);
            mVar.I(f11);
        }
        p0.f(copyOf, (dn.p) f11, mVar, 0);
        if (p.H()) {
            p.P();
        }
        return q1Var;
    }
}
