package l0;

import d0.n;
import l1.i;
import y0.m;
import y0.n3;
import y0.s3;
import y0.y3;

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

    /* loaded from: classes.dex */
    static final class a extends kotlin.jvm.internal.v implements dn.q {

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

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ d0.l f27216q;

        /* JADX INFO: Access modifiers changed from: package-private */
        /* renamed from: l0.u0$a$a, reason: collision with other inner class name */
        /* loaded from: classes.dex */
        public static final class C0599a extends kotlin.jvm.internal.v implements dn.l {

            /* renamed from: p, reason: collision with root package name */
            final /* synthetic */ y0.q1 f27217p;

            /* renamed from: q, reason: collision with root package name */
            final /* synthetic */ d0.l f27218q;

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

                /* renamed from: a, reason: collision with root package name */
                final /* synthetic */ y0.q1 f27219a;

                /* renamed from: b, reason: collision with root package name */
                final /* synthetic */ d0.l f27220b;

                public C0600a(y0.q1 q1Var, d0.l lVar) {
                    this.f27219a = q1Var;
                    this.f27220b = lVar;
                }

                @Override // y0.l0
                public void a() {
                    n.b bVar = (n.b) this.f27219a.getValue();
                    if (bVar != null) {
                        n.a aVar = new n.a(bVar);
                        d0.l lVar = this.f27220b;
                        if (lVar != null) {
                            lVar.b(aVar);
                        }
                        this.f27219a.setValue(null);
                    }
                }
            }

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            C0599a(y0.q1 q1Var, d0.l lVar) {
                super(1);
                this.f27217p = q1Var;
                this.f27218q = lVar;
            }

            @Override // dn.l
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final y0.l0 invoke(y0.m0 m0Var) {
                return new C0600a(this.f27217p, this.f27218q);
            }
        }

        /* 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 f27221p;

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

            /* renamed from: r, reason: collision with root package name */
            final /* synthetic */ tp.m0 f27223r;

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

            /* renamed from: t, reason: collision with root package name */
            final /* synthetic */ d0.l f27225t;

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

            /* JADX INFO: Access modifiers changed from: package-private */
            /* renamed from: l0.u0$a$b$a, reason: collision with other inner class name */
            /* loaded from: classes.dex */
            public static final class C0601a extends kotlin.coroutines.jvm.internal.l implements dn.q {

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

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

                /* renamed from: r, reason: collision with root package name */
                /* synthetic */ long f27229r;

                /* renamed from: s, reason: collision with root package name */
                final /* synthetic */ tp.m0 f27230s;

                /* renamed from: t, reason: collision with root package name */
                final /* synthetic */ y0.q1 f27231t;

                /* renamed from: u, reason: collision with root package name */
                final /* synthetic */ d0.l f27232u;

                /* JADX INFO: Access modifiers changed from: package-private */
                /* renamed from: l0.u0$a$b$a$a, reason: collision with other inner class name */
                /* loaded from: classes.dex */
                public static final class C0602a extends kotlin.coroutines.jvm.internal.l implements dn.p {

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

                    /* renamed from: q, reason: collision with root package name */
                    int f27234q;

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

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

                    /* renamed from: t, reason: collision with root package name */
                    final /* synthetic */ d0.l f27237t;

                    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                    C0602a(y0.q1 q1Var, long j10, d0.l lVar, vm.d dVar) {
                        super(2, dVar);
                        this.f27235r = q1Var;
                        this.f27236s = j10;
                        this.f27237t = lVar;
                    }

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

                    /* JADX WARN: Removed duplicated region for block: B:17:0x005a  */
                    @Override // kotlin.coroutines.jvm.internal.a
                    /*
                        Code decompiled incorrectly, please refer to instructions dump.
                    */
                    public final Object invokeSuspend(Object obj) {
                        Object f10;
                        y0.q1 q1Var;
                        y0.q1 q1Var2;
                        n.b bVar;
                        d0.l lVar;
                        n.b bVar2;
                        f10 = wm.d.f();
                        int i10 = this.f27234q;
                        if (i10 == 0) {
                            rm.y.b(obj);
                            n.b bVar3 = (n.b) this.f27235r.getValue();
                            if (bVar3 != null) {
                                d0.l lVar2 = this.f27237t;
                                q1Var = this.f27235r;
                                n.a aVar = new n.a(bVar3);
                                if (lVar2 != null) {
                                    this.f27233p = q1Var;
                                    this.f27234q = 1;
                                    if (lVar2.c(aVar, this) == f10) {
                                        return f10;
                                    }
                                    q1Var2 = q1Var;
                                }
                                q1Var.setValue(null);
                            }
                            bVar = new n.b(this.f27236s, null);
                            lVar = this.f27237t;
                            if (lVar != null) {
                                this.f27233p = bVar;
                                this.f27234q = 2;
                                if (lVar.c(bVar, this) == f10) {
                                    return f10;
                                }
                                bVar2 = bVar;
                                bVar = bVar2;
                            }
                            this.f27235r.setValue(bVar);
                            return rm.n0.f34904a;
                        }
                        if (i10 != 1) {
                            if (i10 != 2) {
                                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                            }
                            bVar2 = (n.b) this.f27233p;
                            rm.y.b(obj);
                            bVar = bVar2;
                            this.f27235r.setValue(bVar);
                            return rm.n0.f34904a;
                        }
                        q1Var2 = (y0.q1) this.f27233p;
                        rm.y.b(obj);
                        q1Var = q1Var2;
                        q1Var.setValue(null);
                        bVar = new n.b(this.f27236s, null);
                        lVar = this.f27237t;
                        if (lVar != null) {
                        }
                        this.f27235r.setValue(bVar);
                        return rm.n0.f34904a;
                    }

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

                /* JADX INFO: Access modifiers changed from: package-private */
                /* renamed from: l0.u0$a$b$a$b, reason: collision with other inner class name */
                /* loaded from: classes.dex */
                public static final class C0603b extends kotlin.coroutines.jvm.internal.l implements dn.p {

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

                    /* renamed from: q, reason: collision with root package name */
                    int f27239q;

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

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

                    /* renamed from: t, reason: collision with root package name */
                    final /* synthetic */ d0.l f27242t;

                    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                    C0603b(y0.q1 q1Var, boolean z10, d0.l lVar, vm.d dVar) {
                        super(2, dVar);
                        this.f27240r = q1Var;
                        this.f27241s = z10;
                        this.f27242t = lVar;
                    }

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

                    @Override // kotlin.coroutines.jvm.internal.a
                    public final Object invokeSuspend(Object obj) {
                        Object f10;
                        y0.q1 q1Var;
                        y0.q1 q1Var2;
                        f10 = wm.d.f();
                        int i10 = this.f27239q;
                        if (i10 == 0) {
                            rm.y.b(obj);
                            n.b bVar = (n.b) this.f27240r.getValue();
                            if (bVar != null) {
                                boolean z10 = this.f27241s;
                                d0.l lVar = this.f27242t;
                                q1Var = this.f27240r;
                                d0.i cVar = z10 ? new n.c(bVar) : new n.a(bVar);
                                if (lVar != null) {
                                    this.f27238p = q1Var;
                                    this.f27239q = 1;
                                    if (lVar.c(cVar, this) == f10) {
                                        return f10;
                                    }
                                    q1Var2 = q1Var;
                                }
                                q1Var.setValue(null);
                            }
                            return rm.n0.f34904a;
                        }
                        if (i10 != 1) {
                            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                        }
                        q1Var2 = (y0.q1) this.f27238p;
                        rm.y.b(obj);
                        q1Var = q1Var2;
                        q1Var.setValue(null);
                        return rm.n0.f34904a;
                    }

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

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                C0601a(tp.m0 m0Var, y0.q1 q1Var, d0.l lVar, vm.d dVar) {
                    super(3, dVar);
                    this.f27230s = m0Var;
                    this.f27231t = q1Var;
                    this.f27232u = lVar;
                }

                public final Object b(b0.r rVar, long j10, vm.d dVar) {
                    C0601a c0601a = new C0601a(this.f27230s, this.f27231t, this.f27232u, dVar);
                    c0601a.f27228q = rVar;
                    c0601a.f27229r = j10;
                    return c0601a.invokeSuspend(rm.n0.f34904a);
                }

                @Override // dn.q
                public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2, Object obj3) {
                    return b((b0.r) obj, ((r1.g) obj2).v(), (vm.d) obj3);
                }

                @Override // kotlin.coroutines.jvm.internal.a
                public final Object invokeSuspend(Object obj) {
                    Object f10;
                    f10 = wm.d.f();
                    int i10 = this.f27227p;
                    if (i10 == 0) {
                        rm.y.b(obj);
                        b0.r rVar = (b0.r) this.f27228q;
                        tp.k.d(this.f27230s, null, null, new C0602a(this.f27231t, this.f27229r, this.f27232u, null), 3, null);
                        this.f27227p = 1;
                        obj = rVar.l0(this);
                        if (obj == f10) {
                            return f10;
                        }
                    } else {
                        if (i10 != 1) {
                            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                        }
                        rm.y.b(obj);
                    }
                    tp.k.d(this.f27230s, null, null, new C0603b(this.f27231t, ((Boolean) obj).booleanValue(), this.f27232u, null), 3, null);
                    return rm.n0.f34904a;
                }
            }

            /* JADX INFO: Access modifiers changed from: package-private */
            /* renamed from: l0.u0$a$b$b, reason: collision with other inner class name */
            /* loaded from: classes.dex */
            public static final class C0604b extends kotlin.jvm.internal.v implements dn.l {

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

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                C0604b(y3 y3Var) {
                    super(1);
                    this.f27243p = y3Var;
                }

                public final void a(long j10) {
                    ((dn.l) this.f27243p.getValue()).invoke(r1.g.d(j10));
                }

                @Override // dn.l
                public /* bridge */ /* synthetic */ Object invoke(Object obj) {
                    a(((r1.g) obj).v());
                    return rm.n0.f34904a;
                }
            }

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            b(tp.m0 m0Var, y0.q1 q1Var, d0.l lVar, y3 y3Var, vm.d dVar) {
                super(2, dVar);
                this.f27223r = m0Var;
                this.f27224s = q1Var;
                this.f27225t = lVar;
                this.f27226u = y3Var;
            }

            @Override // dn.p
            /* renamed from: b, reason: merged with bridge method [inline-methods] */
            public final Object invoke(d2.h0 h0Var, vm.d dVar) {
                return ((b) create(h0Var, dVar)).invokeSuspend(rm.n0.f34904a);
            }

            @Override // kotlin.coroutines.jvm.internal.a
            public final vm.d create(Object obj, vm.d dVar) {
                b bVar = new b(this.f27223r, this.f27224s, this.f27225t, this.f27226u, dVar);
                bVar.f27222q = obj;
                return bVar;
            }

            @Override // kotlin.coroutines.jvm.internal.a
            public final Object invokeSuspend(Object obj) {
                Object f10;
                f10 = wm.d.f();
                int i10 = this.f27221p;
                if (i10 == 0) {
                    rm.y.b(obj);
                    d2.h0 h0Var = (d2.h0) this.f27222q;
                    C0601a c0601a = new C0601a(this.f27223r, this.f27224s, this.f27225t, null);
                    C0604b c0604b = new C0604b(this.f27226u);
                    this.f27221p = 1;
                    if (b0.a0.h(h0Var, c0601a, c0604b, 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;
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        a(dn.l lVar, d0.l lVar2) {
            super(3);
            this.f27215p = lVar;
            this.f27216q = lVar2;
        }

        public final l1.i a(l1.i iVar, y0.m mVar, int i10) {
            mVar.S(-102778667);
            if (y0.p.H()) {
                y0.p.Q(-102778667, i10, -1, "androidx.compose.foundation.text.tapPressTextFieldModifier.<anonymous> (TextFieldPressGestureFilter.kt:40)");
            }
            Object f10 = mVar.f();
            m.a aVar = y0.m.f51621a;
            if (f10 == aVar.a()) {
                Object b0Var = new y0.b0(y0.p0.i(vm.h.f40193p, mVar));
                mVar.I(b0Var);
                f10 = b0Var;
            }
            tp.m0 a10 = ((y0.b0) f10).a();
            Object f11 = mVar.f();
            if (f11 == aVar.a()) {
                f11 = s3.d(null, null, 2, null);
                mVar.I(f11);
            }
            y0.q1 q1Var = (y0.q1) f11;
            y3 o10 = n3.o(this.f27215p, mVar, 0);
            d0.l lVar = this.f27216q;
            boolean R = mVar.R(this.f27216q);
            d0.l lVar2 = this.f27216q;
            Object f12 = mVar.f();
            if (R || f12 == aVar.a()) {
                f12 = new C0599a(q1Var, lVar2);
                mVar.I(f12);
            }
            y0.p0.a(lVar, (dn.l) f12, mVar, 0);
            i.a aVar2 = l1.i.f27362a;
            d0.l lVar3 = this.f27216q;
            boolean m10 = mVar.m(a10) | mVar.R(this.f27216q) | mVar.R(o10);
            d0.l lVar4 = this.f27216q;
            Object f13 = mVar.f();
            if (m10 || f13 == aVar.a()) {
                f13 = new b(a10, q1Var, lVar4, o10, null);
                mVar.I(f13);
            }
            l1.i c10 = d2.q0.c(aVar2, lVar3, (dn.p) f13);
            if (y0.p.H()) {
                y0.p.P();
            }
            mVar.H();
            return c10;
        }

        @Override // dn.q
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2, Object obj3) {
            return a((l1.i) obj, (y0.m) obj2, ((Number) obj3).intValue());
        }
    }

    public static final l1.i a(l1.i iVar, d0.l lVar, boolean z10, dn.l lVar2) {
        return z10 ? l1.h.c(iVar, null, new a(lVar2, lVar), 1, null) : iVar;
    }
}
