package h1;

import androidx.lifecycle.a0;
import androidx.lifecycle.g0;
import androidx.lifecycle.u;
import dn.l;
import h1.b;
import kotlin.jvm.internal.v;
import y0.l0;
import y0.m;
import y0.m0;
import y0.p;
import y0.p0;
import y0.q1;
import y0.s3;
import y0.y3;

/* loaded from: classes.dex */
public abstract class b {

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class a extends v implements l {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ a0 f20656p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ u f20657q;

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

        /* renamed from: h1.b$a$a, reason: collision with other inner class name */
        /* loaded from: classes.dex */
        public static final class C0448a implements l0 {

            /* renamed from: a, reason: collision with root package name */
            final /* synthetic */ a0 f20659a;

            /* renamed from: b, reason: collision with root package name */
            final /* synthetic */ g0 f20660b;

            public C0448a(a0 a0Var, g0 g0Var) {
                this.f20659a = a0Var;
                this.f20660b = g0Var;
            }

            @Override // y0.l0
            public void a() {
                this.f20659a.o(this.f20660b);
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        a(a0 a0Var, u uVar, q1 q1Var) {
            super(1);
            this.f20656p = a0Var;
            this.f20657q = uVar;
            this.f20658r = q1Var;
        }

        /* JADX INFO: Access modifiers changed from: private */
        public static final void c(q1 q1Var, Object obj) {
            q1Var.setValue(obj);
        }

        @Override // dn.l
        /* renamed from: b, reason: merged with bridge method [inline-methods] */
        public final l0 invoke(m0 m0Var) {
            final q1 q1Var = this.f20658r;
            g0 g0Var = new g0() { // from class: h1.a
                @Override // androidx.lifecycle.g0
                public final void d(Object obj) {
                    b.a.c(q1.this, obj);
                }
            };
            this.f20656p.j(this.f20657q, g0Var);
            return new C0448a(this.f20656p, g0Var);
        }
    }

    public static final y3 a(a0 a0Var, Object obj, m mVar, int i10) {
        if (p.H()) {
            p.Q(411178300, i10, -1, "androidx.compose.runtime.livedata.observeAsState (LiveDataAdapter.kt:57)");
        }
        u uVar = (u) mVar.t(q4.b.a());
        Object f10 = mVar.f();
        m.a aVar = m.f51621a;
        if (f10 == aVar.a()) {
            if (a0Var.i()) {
                obj = a0Var.f();
            }
            f10 = s3.d(obj, null, 2, null);
            mVar.I(f10);
        }
        q1 q1Var = (q1) f10;
        boolean m10 = mVar.m(a0Var) | mVar.m(uVar);
        Object f11 = mVar.f();
        if (m10 || f11 == aVar.a()) {
            f11 = new a(a0Var, uVar, q1Var);
            mVar.I(f11);
        }
        p0.b(a0Var, uVar, (l) f11, mVar, i10 & 14);
        if (p.H()) {
            p.P();
        }
        return q1Var;
    }

    public static final y3 b(a0 a0Var, m mVar, int i10) {
        if (p.H()) {
            p.Q(-2027206144, i10, -1, "androidx.compose.runtime.livedata.observeAsState (LiveDataAdapter.kt:40)");
        }
        y3 a10 = a(a0Var, a0Var.f(), mVar, i10 & 14);
        if (p.H()) {
            p.P();
        }
        return a10;
    }
}
