package b0;

import d2.h0;
import java.util.List;
import kotlin.jvm.internal.o0;
import rm.n0;
import tp.m0;

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

    /* renamed from: a */
    private static final dn.q f6199a = new a(null);

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

        /* renamed from: p */
        int f6200p;

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

        public final Object b(r rVar, long j10, vm.d dVar) {
            return new a(dVar).invokeSuspend(n0.f34904a);
        }

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

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

    /* loaded from: classes.dex */
    public static final class b extends kotlin.coroutines.jvm.internal.d {

        /* renamed from: p */
        Object f6201p;

        /* renamed from: q */
        Object f6202q;

        /* renamed from: r */
        boolean f6203r;

        /* renamed from: s */
        /* synthetic */ Object f6204s;

        /* renamed from: t */
        int f6205t;

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

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            this.f6204s = obj;
            this.f6205t |= Integer.MIN_VALUE;
            return a0.d(null, false, null, this);
        }
    }

    /* loaded from: classes.dex */
    public static final class c extends kotlin.coroutines.jvm.internal.k implements dn.p {

        /* renamed from: q */
        long f6206q;

        /* renamed from: r */
        int f6207r;

        /* renamed from: s */
        private /* synthetic */ Object f6208s;

        /* renamed from: t */
        final /* synthetic */ d2.y f6209t;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        c(d2.y yVar, vm.d dVar) {
            super(2, dVar);
            this.f6209t = yVar;
        }

        @Override // dn.p
        /* renamed from: b */
        public final Object invoke(d2.b bVar, vm.d dVar) {
            return ((c) create(bVar, dVar)).invokeSuspend(n0.f34904a);
        }

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

        /*  JADX ERROR: JadxOverflowException in pass: RegionMakerVisitor
            jadx.core.utils.exceptions.JadxOverflowException: Regions count limit reached
            	at jadx.core.utils.ErrorsCounter.addError(ErrorsCounter.java:59)
            	at jadx.core.utils.ErrorsCounter.error(ErrorsCounter.java:31)
            	at jadx.core.dex.attributes.nodes.NotificationAttrNode.addError(NotificationAttrNode.java:19)
            */
        /* JADX WARN: Removed duplicated region for block: B:11:0x0051 A[RETURN] */
        /* JADX WARN: Removed duplicated region for block: B:9:0x0046 A[RETURN] */
        /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:8:0x0044 -> B:5:0x0047). Please report as a decompilation issue!!! */
        @Override // kotlin.coroutines.jvm.internal.a
        /*
            Code decompiled incorrectly, please refer to instructions dump.
        */
        public final java.lang.Object invokeSuspend(java.lang.Object r12) {
            /*
                r11 = this;
                java.lang.Object r0 = wm.b.f()
                int r1 = r11.f6207r
                r2 = 1
                if (r1 == 0) goto L1d
                if (r1 != r2) goto L15
                long r3 = r11.f6206q
                java.lang.Object r1 = r11.f6208s
                d2.b r1 = (d2.b) r1
                rm.y.b(r12)
                goto L47
            L15:
                java.lang.IllegalStateException r11 = new java.lang.IllegalStateException
                java.lang.String r12 = "call to 'resume' before 'invoke' with coroutine"
                r11.<init>(r12)
                throw r11
            L1d:
                rm.y.b(r12)
                java.lang.Object r12 = r11.f6208s
                d2.b r12 = (d2.b) r12
                d2.y r1 = r11.f6209t
                long r3 = r1.o()
                androidx.compose.ui.platform.y2 r1 = r12.getViewConfiguration()
                long r5 = r1.b()
                long r3 = r3 + r5
                r1 = r12
            L34:
                r6 = 0
                r7 = 0
                r9 = 3
                r10 = 0
                r11.f6208s = r1
                r11.f6206q = r3
                r11.f6207r = r2
                r5 = r1
                r8 = r11
                java.lang.Object r12 = b0.a0.e(r5, r6, r7, r8, r9, r10)
                if (r12 != r0) goto L47
                return r0
            L47:
                d2.y r12 = (d2.y) r12
                long r5 = r12.o()
                int r5 = (r5 > r3 ? 1 : (r5 == r3 ? 0 : -1))
                if (r5 < 0) goto L34
                return r12
            */
            throw new UnsupportedOperationException("Method not decompiled: b0.a0.c.invokeSuspend(java.lang.Object):java.lang.Object");
        }
    }

    /* loaded from: classes.dex */
    public static final class d extends kotlin.coroutines.jvm.internal.d {

        /* renamed from: p */
        Object f6210p;

        /* renamed from: q */
        /* synthetic */ Object f6211q;

        /* renamed from: r */
        int f6212r;

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

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            this.f6211q = obj;
            this.f6212r |= Integer.MIN_VALUE;
            return a0.g(null, this);
        }
    }

    /* loaded from: classes.dex */
    public static final class e extends kotlin.coroutines.jvm.internal.l implements dn.p {

        /* renamed from: p */
        int f6213p;

        /* renamed from: q */
        private /* synthetic */ Object f6214q;

        /* renamed from: r */
        final /* synthetic */ h0 f6215r;

        /* renamed from: s */
        final /* synthetic */ dn.q f6216s;

        /* renamed from: t */
        final /* synthetic */ dn.l f6217t;

        /* renamed from: u */
        final /* synthetic */ s f6218u;

        /* loaded from: classes.dex */
        public static final class a extends kotlin.coroutines.jvm.internal.k implements dn.p {

            /* renamed from: q */
            int f6219q;

            /* renamed from: r */
            private /* synthetic */ Object f6220r;

            /* renamed from: s */
            final /* synthetic */ m0 f6221s;

            /* renamed from: t */
            final /* synthetic */ dn.q f6222t;

            /* renamed from: u */
            final /* synthetic */ dn.l f6223u;

            /* renamed from: v */
            final /* synthetic */ s f6224v;

            /* renamed from: b0.a0$e$a$a */
            /* loaded from: classes.dex */
            public static final class C0162a extends kotlin.coroutines.jvm.internal.l implements dn.p {

                /* renamed from: p */
                int f6225p;

                /* renamed from: q */
                final /* synthetic */ s f6226q;

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                C0162a(s sVar, vm.d dVar) {
                    super(2, dVar);
                    this.f6226q = sVar;
                }

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

                @Override // kotlin.coroutines.jvm.internal.a
                public final Object invokeSuspend(Object obj) {
                    Object f10;
                    f10 = wm.d.f();
                    int i10 = this.f6225p;
                    if (i10 == 0) {
                        rm.y.b(obj);
                        s sVar = this.f6226q;
                        this.f6225p = 1;
                        if (sVar.q(this) == f10) {
                            return f10;
                        }
                    } else {
                        if (i10 != 1) {
                            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                        }
                        rm.y.b(obj);
                    }
                    return n0.f34904a;
                }

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

            /* loaded from: classes.dex */
            public static final class b extends kotlin.coroutines.jvm.internal.l implements dn.p {

                /* renamed from: p */
                int f6227p;

                /* renamed from: q */
                final /* synthetic */ dn.q f6228q;

                /* renamed from: r */
                final /* synthetic */ s f6229r;

                /* renamed from: s */
                final /* synthetic */ d2.y f6230s;

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                b(dn.q qVar, s sVar, d2.y yVar, vm.d dVar) {
                    super(2, dVar);
                    this.f6228q = qVar;
                    this.f6229r = sVar;
                    this.f6230s = yVar;
                }

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

                @Override // kotlin.coroutines.jvm.internal.a
                public final Object invokeSuspend(Object obj) {
                    Object f10;
                    f10 = wm.d.f();
                    int i10 = this.f6227p;
                    if (i10 == 0) {
                        rm.y.b(obj);
                        dn.q qVar = this.f6228q;
                        s sVar = this.f6229r;
                        r1.g d10 = r1.g.d(this.f6230s.h());
                        this.f6227p = 1;
                        if (qVar.invoke(sVar, d10, this) == f10) {
                            return f10;
                        }
                    } else {
                        if (i10 != 1) {
                            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                        }
                        rm.y.b(obj);
                    }
                    return n0.f34904a;
                }

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

            /* loaded from: classes.dex */
            public static final class c extends kotlin.coroutines.jvm.internal.l implements dn.p {

                /* renamed from: p */
                int f6231p;

                /* renamed from: q */
                final /* synthetic */ s f6232q;

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                c(s sVar, vm.d dVar) {
                    super(2, dVar);
                    this.f6232q = sVar;
                }

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

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

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

            /* loaded from: classes.dex */
            public static final class d extends kotlin.coroutines.jvm.internal.l implements dn.p {

                /* renamed from: p */
                int f6233p;

                /* renamed from: q */
                final /* synthetic */ s f6234q;

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                d(s sVar, vm.d dVar) {
                    super(2, dVar);
                    this.f6234q = sVar;
                }

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

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

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

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            a(m0 m0Var, dn.q qVar, dn.l lVar, s sVar, vm.d dVar) {
                super(2, dVar);
                this.f6221s = m0Var;
                this.f6222t = qVar;
                this.f6223u = lVar;
                this.f6224v = sVar;
            }

            @Override // dn.p
            /* renamed from: b */
            public final Object invoke(d2.b bVar, vm.d dVar) {
                return ((a) create(bVar, dVar)).invokeSuspend(n0.f34904a);
            }

            @Override // kotlin.coroutines.jvm.internal.a
            public final vm.d create(Object obj, vm.d dVar) {
                a aVar = new a(this.f6221s, this.f6222t, this.f6223u, this.f6224v, dVar);
                aVar.f6220r = obj;
                return aVar;
            }

            /* JADX WARN: Removed duplicated region for block: B:12:0x0092  */
            /* JADX WARN: Removed duplicated region for block: B:8:0x0081  */
            @Override // kotlin.coroutines.jvm.internal.a
            /*
                Code decompiled incorrectly, please refer to instructions dump.
            */
            public final Object invokeSuspend(Object obj) {
                Object f10;
                d2.b bVar;
                Object e10;
                Object l10;
                d2.y yVar;
                f10 = wm.d.f();
                int i10 = this.f6219q;
                if (i10 == 0) {
                    rm.y.b(obj);
                    bVar = (d2.b) this.f6220r;
                    tp.k.d(this.f6221s, null, null, new C0162a(this.f6224v, null), 3, null);
                    this.f6220r = bVar;
                    this.f6219q = 1;
                    e10 = a0.e(bVar, false, null, this, 3, null);
                    if (e10 == f10) {
                        return f10;
                    }
                } else {
                    if (i10 != 1) {
                        if (i10 != 2) {
                            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                        }
                        rm.y.b(obj);
                        l10 = obj;
                        yVar = (d2.y) l10;
                        if (yVar != null) {
                            tp.k.d(this.f6221s, null, null, new c(this.f6224v, null), 3, null);
                        } else {
                            yVar.a();
                            tp.k.d(this.f6221s, null, null, new d(this.f6224v, null), 3, null);
                            dn.l lVar = this.f6223u;
                            if (lVar != null) {
                                lVar.invoke(r1.g.d(yVar.h()));
                            }
                        }
                        return n0.f34904a;
                    }
                    d2.b bVar2 = (d2.b) this.f6220r;
                    rm.y.b(obj);
                    bVar = bVar2;
                    e10 = obj;
                }
                d2.y yVar2 = (d2.y) e10;
                yVar2.a();
                if (this.f6222t != a0.f6199a) {
                    tp.k.d(this.f6221s, null, null, new b(this.f6222t, this.f6224v, yVar2, null), 3, null);
                }
                this.f6220r = null;
                this.f6219q = 2;
                l10 = a0.l(bVar, null, this, 1, null);
                if (l10 == f10) {
                    return f10;
                }
                yVar = (d2.y) l10;
                if (yVar != null) {
                }
                return n0.f34904a;
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        e(h0 h0Var, dn.q qVar, dn.l lVar, s sVar, vm.d dVar) {
            super(2, dVar);
            this.f6215r = h0Var;
            this.f6216s = qVar;
            this.f6217t = lVar;
            this.f6218u = sVar;
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final vm.d create(Object obj, vm.d dVar) {
            e eVar = new e(this.f6215r, this.f6216s, this.f6217t, this.f6218u, dVar);
            eVar.f6214q = obj;
            return eVar;
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            Object f10;
            f10 = wm.d.f();
            int i10 = this.f6213p;
            if (i10 == 0) {
                rm.y.b(obj);
                m0 m0Var = (m0) this.f6214q;
                h0 h0Var = this.f6215r;
                a aVar = new a(m0Var, this.f6216s, this.f6217t, this.f6218u, null);
                this.f6213p = 1;
                if (o.c(h0Var, aVar, this) == f10) {
                    return f10;
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                rm.y.b(obj);
            }
            return n0.f34904a;
        }

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

    /* loaded from: classes.dex */
    public static final class f extends kotlin.coroutines.jvm.internal.l implements dn.p {

        /* renamed from: p */
        int f6235p;

        /* renamed from: q */
        private /* synthetic */ Object f6236q;

        /* renamed from: r */
        final /* synthetic */ h0 f6237r;

        /* renamed from: s */
        final /* synthetic */ dn.q f6238s;

        /* renamed from: t */
        final /* synthetic */ dn.l f6239t;

        /* renamed from: u */
        final /* synthetic */ dn.l f6240u;

        /* renamed from: v */
        final /* synthetic */ dn.l f6241v;

        /* loaded from: classes.dex */
        public static final class a extends kotlin.coroutines.jvm.internal.k implements dn.p {
            final /* synthetic */ dn.l A;
            final /* synthetic */ s B;

            /* renamed from: q */
            Object f6242q;

            /* renamed from: r */
            Object f6243r;

            /* renamed from: s */
            Object f6244s;

            /* renamed from: t */
            long f6245t;

            /* renamed from: u */
            int f6246u;

            /* renamed from: v */
            private /* synthetic */ Object f6247v;

            /* renamed from: w */
            final /* synthetic */ m0 f6248w;

            /* renamed from: x */
            final /* synthetic */ dn.q f6249x;

            /* renamed from: y */
            final /* synthetic */ dn.l f6250y;

            /* renamed from: z */
            final /* synthetic */ dn.l f6251z;

            /* renamed from: b0.a0$f$a$a */
            /* loaded from: classes.dex */
            public static final class C0163a extends kotlin.coroutines.jvm.internal.l implements dn.p {

                /* renamed from: p */
                int f6252p;

                /* renamed from: q */
                final /* synthetic */ s f6253q;

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                C0163a(s sVar, vm.d dVar) {
                    super(2, dVar);
                    this.f6253q = sVar;
                }

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

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

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

            /* loaded from: classes.dex */
            public static final class b extends kotlin.coroutines.jvm.internal.l implements dn.p {

                /* renamed from: p */
                int f6254p;

                /* renamed from: q */
                final /* synthetic */ s f6255q;

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                b(s sVar, vm.d dVar) {
                    super(2, dVar);
                    this.f6255q = sVar;
                }

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

                @Override // kotlin.coroutines.jvm.internal.a
                public final Object invokeSuspend(Object obj) {
                    Object f10;
                    f10 = wm.d.f();
                    int i10 = this.f6254p;
                    if (i10 == 0) {
                        rm.y.b(obj);
                        s sVar = this.f6255q;
                        this.f6254p = 1;
                        if (sVar.q(this) == f10) {
                            return f10;
                        }
                    } else {
                        if (i10 != 1) {
                            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                        }
                        rm.y.b(obj);
                    }
                    return n0.f34904a;
                }

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

            /* loaded from: classes.dex */
            public static final class c extends kotlin.coroutines.jvm.internal.l implements dn.p {

                /* renamed from: p */
                int f6256p;

                /* renamed from: q */
                final /* synthetic */ dn.q f6257q;

                /* renamed from: r */
                final /* synthetic */ s f6258r;

                /* renamed from: s */
                final /* synthetic */ d2.y f6259s;

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                c(dn.q qVar, s sVar, d2.y yVar, vm.d dVar) {
                    super(2, dVar);
                    this.f6257q = qVar;
                    this.f6258r = sVar;
                    this.f6259s = yVar;
                }

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

                @Override // kotlin.coroutines.jvm.internal.a
                public final Object invokeSuspend(Object obj) {
                    Object f10;
                    f10 = wm.d.f();
                    int i10 = this.f6256p;
                    if (i10 == 0) {
                        rm.y.b(obj);
                        dn.q qVar = this.f6257q;
                        s sVar = this.f6258r;
                        r1.g d10 = r1.g.d(this.f6259s.h());
                        this.f6256p = 1;
                        if (qVar.invoke(sVar, d10, this) == f10) {
                            return f10;
                        }
                    } else {
                        if (i10 != 1) {
                            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                        }
                        rm.y.b(obj);
                    }
                    return n0.f34904a;
                }

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

            /* loaded from: classes.dex */
            public static final class d extends kotlin.coroutines.jvm.internal.k implements dn.p {

                /* renamed from: q */
                int f6260q;

                /* renamed from: r */
                private /* synthetic */ Object f6261r;

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

                @Override // dn.p
                /* renamed from: b */
                public final Object invoke(d2.b bVar, vm.d dVar) {
                    return ((d) create(bVar, dVar)).invokeSuspend(n0.f34904a);
                }

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

                @Override // kotlin.coroutines.jvm.internal.a
                public final Object invokeSuspend(Object obj) {
                    Object f10;
                    f10 = wm.d.f();
                    int i10 = this.f6260q;
                    if (i10 == 0) {
                        rm.y.b(obj);
                        d2.b bVar = (d2.b) this.f6261r;
                        this.f6260q = 1;
                        obj = a0.l(bVar, null, this, 1, null);
                        if (obj == f10) {
                            return f10;
                        }
                    } else {
                        if (i10 != 1) {
                            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                        }
                        rm.y.b(obj);
                    }
                    return obj;
                }
            }

            /* loaded from: classes.dex */
            public static final class e extends kotlin.coroutines.jvm.internal.l implements dn.p {

                /* renamed from: p */
                int f6262p;

                /* renamed from: q */
                final /* synthetic */ s f6263q;

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                e(s sVar, vm.d dVar) {
                    super(2, dVar);
                    this.f6263q = sVar;
                }

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

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

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

            /* renamed from: b0.a0$f$a$f */
            /* loaded from: classes.dex */
            public static final class C0164f extends kotlin.coroutines.jvm.internal.l implements dn.p {

                /* renamed from: p */
                int f6264p;

                /* renamed from: q */
                final /* synthetic */ s f6265q;

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                C0164f(s sVar, vm.d dVar) {
                    super(2, dVar);
                    this.f6265q = sVar;
                }

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

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

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

            /* loaded from: classes.dex */
            public static final class g extends kotlin.coroutines.jvm.internal.l implements dn.p {

                /* renamed from: p */
                int f6266p;

                /* renamed from: q */
                final /* synthetic */ s f6267q;

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                g(s sVar, vm.d dVar) {
                    super(2, dVar);
                    this.f6267q = sVar;
                }

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

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

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

            /* loaded from: classes.dex */
            public static final class h extends kotlin.coroutines.jvm.internal.l implements dn.p {

                /* renamed from: p */
                int f6268p;

                /* renamed from: q */
                final /* synthetic */ s f6269q;

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                h(s sVar, vm.d dVar) {
                    super(2, dVar);
                    this.f6269q = sVar;
                }

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

                @Override // kotlin.coroutines.jvm.internal.a
                public final Object invokeSuspend(Object obj) {
                    Object f10;
                    f10 = wm.d.f();
                    int i10 = this.f6268p;
                    if (i10 == 0) {
                        rm.y.b(obj);
                        s sVar = this.f6269q;
                        this.f6268p = 1;
                        if (sVar.q(this) == f10) {
                            return f10;
                        }
                    } else {
                        if (i10 != 1) {
                            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                        }
                        rm.y.b(obj);
                    }
                    return n0.f34904a;
                }

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

            /* loaded from: classes.dex */
            public static final class i extends kotlin.coroutines.jvm.internal.l implements dn.p {

                /* renamed from: p */
                int f6270p;

                /* renamed from: q */
                final /* synthetic */ dn.q f6271q;

                /* renamed from: r */
                final /* synthetic */ s f6272r;

                /* renamed from: s */
                final /* synthetic */ d2.y f6273s;

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                i(dn.q qVar, s sVar, d2.y yVar, vm.d dVar) {
                    super(2, dVar);
                    this.f6271q = qVar;
                    this.f6272r = sVar;
                    this.f6273s = yVar;
                }

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

                @Override // kotlin.coroutines.jvm.internal.a
                public final Object invokeSuspend(Object obj) {
                    Object f10;
                    f10 = wm.d.f();
                    int i10 = this.f6270p;
                    if (i10 == 0) {
                        rm.y.b(obj);
                        dn.q qVar = this.f6271q;
                        s sVar = this.f6272r;
                        r1.g d10 = r1.g.d(this.f6273s.h());
                        this.f6270p = 1;
                        if (qVar.invoke(sVar, d10, this) == f10) {
                            return f10;
                        }
                    } else {
                        if (i10 != 1) {
                            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                        }
                        rm.y.b(obj);
                    }
                    return n0.f34904a;
                }

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

            /* loaded from: classes.dex */
            public static final class j extends kotlin.coroutines.jvm.internal.k implements dn.p {

                /* renamed from: q */
                int f6274q;

                /* renamed from: r */
                private /* synthetic */ Object f6275r;

                /* renamed from: s */
                final /* synthetic */ m0 f6276s;

                /* renamed from: t */
                final /* synthetic */ dn.l f6277t;

                /* renamed from: u */
                final /* synthetic */ dn.l f6278u;

                /* renamed from: v */
                final /* synthetic */ o0 f6279v;

                /* renamed from: w */
                final /* synthetic */ s f6280w;

                /* renamed from: b0.a0$f$a$j$a */
                /* loaded from: classes.dex */
                public static final class C0165a extends kotlin.coroutines.jvm.internal.l implements dn.p {

                    /* renamed from: p */
                    int f6281p;

                    /* renamed from: q */
                    final /* synthetic */ s f6282q;

                    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                    C0165a(s sVar, vm.d dVar) {
                        super(2, dVar);
                        this.f6282q = sVar;
                    }

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

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

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

                /* loaded from: classes.dex */
                public static final class b extends kotlin.coroutines.jvm.internal.l implements dn.p {

                    /* renamed from: p */
                    int f6283p;

                    /* renamed from: q */
                    final /* synthetic */ s f6284q;

                    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                    b(s sVar, vm.d dVar) {
                        super(2, dVar);
                        this.f6284q = sVar;
                    }

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

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

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

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                j(m0 m0Var, dn.l lVar, dn.l lVar2, o0 o0Var, s sVar, vm.d dVar) {
                    super(2, dVar);
                    this.f6276s = m0Var;
                    this.f6277t = lVar;
                    this.f6278u = lVar2;
                    this.f6279v = o0Var;
                    this.f6280w = sVar;
                }

                @Override // dn.p
                /* renamed from: b */
                public final Object invoke(d2.b bVar, vm.d dVar) {
                    return ((j) create(bVar, dVar)).invokeSuspend(n0.f34904a);
                }

                @Override // kotlin.coroutines.jvm.internal.a
                public final vm.d create(Object obj, vm.d dVar) {
                    j jVar = new j(this.f6276s, this.f6277t, this.f6278u, this.f6279v, this.f6280w, dVar);
                    jVar.f6275r = obj;
                    return jVar;
                }

                @Override // kotlin.coroutines.jvm.internal.a
                public final Object invokeSuspend(Object obj) {
                    Object f10;
                    f10 = wm.d.f();
                    int i10 = this.f6274q;
                    if (i10 == 0) {
                        rm.y.b(obj);
                        d2.b bVar = (d2.b) this.f6275r;
                        this.f6274q = 1;
                        obj = a0.l(bVar, null, this, 1, null);
                        if (obj == f10) {
                            return f10;
                        }
                    } else {
                        if (i10 != 1) {
                            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                        }
                        rm.y.b(obj);
                    }
                    d2.y yVar = (d2.y) obj;
                    if (yVar != null) {
                        yVar.a();
                        tp.k.d(this.f6276s, null, null, new C0165a(this.f6280w, null), 3, null);
                        this.f6277t.invoke(r1.g.d(yVar.h()));
                        return n0.f34904a;
                    }
                    tp.k.d(this.f6276s, null, null, new b(this.f6280w, null), 3, null);
                    dn.l lVar = this.f6278u;
                    if (lVar == null) {
                        return null;
                    }
                    lVar.invoke(r1.g.d(((d2.y) this.f6279v.f26199p).h()));
                    return n0.f34904a;
                }
            }

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            a(m0 m0Var, dn.q qVar, dn.l lVar, dn.l lVar2, dn.l lVar3, s sVar, vm.d dVar) {
                super(2, dVar);
                this.f6248w = m0Var;
                this.f6249x = qVar;
                this.f6250y = lVar;
                this.f6251z = lVar2;
                this.A = lVar3;
                this.B = sVar;
            }

            @Override // dn.p
            /* renamed from: b */
            public final Object invoke(d2.b bVar, vm.d dVar) {
                return ((a) create(bVar, dVar)).invokeSuspend(n0.f34904a);
            }

            @Override // kotlin.coroutines.jvm.internal.a
            public final vm.d create(Object obj, vm.d dVar) {
                a aVar = new a(this.f6248w, this.f6249x, this.f6250y, this.f6251z, this.A, this.B, dVar);
                aVar.f6247v = obj;
                return aVar;
            }

            /* JADX WARN: Failed to find 'out' block for switch in B:2:0x0009. Please report as an issue. */
            /* JADX WARN: Removed duplicated region for block: B:17:0x01f6  */
            /* JADX WARN: Removed duplicated region for block: B:20:0x0209  */
            /* JADX WARN: Removed duplicated region for block: B:23:0x0223 A[RETURN] */
            /* JADX WARN: Removed duplicated region for block: B:27:0x0190  */
            /* JADX WARN: Removed duplicated region for block: B:30:0x01a5  */
            /* JADX WARN: Removed duplicated region for block: B:43:0x015e  */
            /* JADX WARN: Removed duplicated region for block: B:59:0x00fb A[Catch: p -> 0x0122, TryCatch #3 {p -> 0x0122, blocks: (B:57:0x00f5, B:59:0x00fb, B:62:0x010c), top: B:56:0x00f5 }] */
            /* JADX WARN: Removed duplicated region for block: B:62:0x010c A[Catch: p -> 0x0122, TRY_LEAVE, TryCatch #3 {p -> 0x0122, blocks: (B:57:0x00f5, B:59:0x00fb, B:62:0x010c), top: B:56:0x00f5 }] */
            /* JADX WARN: Removed duplicated region for block: B:66:0x0129  */
            /* JADX WARN: Removed duplicated region for block: B:69:0x0147 A[RETURN] */
            /* JADX WARN: Removed duplicated region for block: B:76:0x00b0  */
            /* JADX WARN: Removed duplicated region for block: B:79:0x00c6  */
            /* JADX WARN: Removed duplicated region for block: B:84:0x00f1 A[RETURN] */
            /* JADX WARN: Removed duplicated region for block: B:85:0x00f2  */
            /* JADX WARN: Removed duplicated region for block: B:88:0x00cf  */
            @Override // kotlin.coroutines.jvm.internal.a
            /*
                Code decompiled incorrectly, please refer to instructions dump.
            */
            public final Object invokeSuspend(Object obj) {
                Object f10;
                Object e10;
                d2.b bVar;
                d2.y yVar;
                long c10;
                o0 o0Var;
                Object h02;
                d2.b bVar2;
                d2.y yVar2;
                o0 o0Var2;
                d2.b bVar3;
                dn.l lVar;
                Object obj2;
                Object obj3;
                Object f11;
                d2.b bVar4;
                d2.y yVar3;
                d2.y yVar4;
                d2.b bVar5;
                o0 o0Var3;
                dn.l lVar2;
                dn.l lVar3;
                f10 = wm.d.f();
                switch (this.f6246u) {
                    case 0:
                        rm.y.b(obj);
                        d2.b bVar6 = (d2.b) this.f6247v;
                        this.f6247v = bVar6;
                        this.f6246u = 1;
                        e10 = a0.e(bVar6, false, null, this, 3, null);
                        if (e10 == f10) {
                            return f10;
                        }
                        bVar = bVar6;
                        yVar = (d2.y) e10;
                        yVar.a();
                        tp.k.d(this.f6248w, null, null, new b(this.B, null), 3, null);
                        if (this.f6249x != a0.f6199a) {
                            tp.k.d(this.f6248w, null, null, new c(this.f6249x, this.B, yVar, null), 3, null);
                        }
                        c10 = this.f6250y == null ? bVar.getViewConfiguration().c() : 4611686018427387903L;
                        o0Var = new o0();
                        try {
                            d dVar = new d(null);
                            this.f6247v = bVar;
                            this.f6242q = yVar;
                            this.f6243r = o0Var;
                            this.f6244s = o0Var;
                            this.f6245t = c10;
                            this.f6246u = 2;
                            h02 = bVar.h0(c10, dVar, this);
                        } catch (d2.p unused) {
                            bVar3 = bVar;
                            lVar = this.f6250y;
                            if (lVar != null) {
                            }
                            this.f6247v = bVar3;
                            this.f6242q = o0Var;
                            this.f6243r = null;
                            this.f6244s = null;
                            this.f6245t = c10;
                            this.f6246u = 3;
                            if (a0.g(bVar3, this) == f10) {
                            }
                            tp.k.d(this.f6248w, null, null, new g(this.B, null), 3, null);
                            o0Var2 = o0Var;
                            bVar2 = bVar3;
                            obj3 = o0Var2.f26199p;
                            if (obj3 != null) {
                            }
                            return n0.f34904a;
                        }
                        if (h02 != f10) {
                            return f10;
                        }
                        bVar2 = bVar;
                        yVar2 = yVar;
                        o0Var2 = o0Var;
                        try {
                            o0Var.f26199p = h02;
                            obj2 = o0Var2.f26199p;
                            if (obj2 != null) {
                                tp.k.d(this.f6248w, null, null, new e(this.B, null), 3, null);
                            } else {
                                ((d2.y) obj2).a();
                                tp.k.d(this.f6248w, null, null, new C0164f(this.B, null), 3, null);
                            }
                        } catch (d2.p unused2) {
                            o0Var = o0Var2;
                            yVar = yVar2;
                            bVar3 = bVar2;
                            lVar = this.f6250y;
                            if (lVar != null) {
                            }
                            this.f6247v = bVar3;
                            this.f6242q = o0Var;
                            this.f6243r = null;
                            this.f6244s = null;
                            this.f6245t = c10;
                            this.f6246u = 3;
                            if (a0.g(bVar3, this) == f10) {
                            }
                            tp.k.d(this.f6248w, null, null, new g(this.B, null), 3, null);
                            o0Var2 = o0Var;
                            bVar2 = bVar3;
                            obj3 = o0Var2.f26199p;
                            if (obj3 != null) {
                            }
                            return n0.f34904a;
                        }
                        obj3 = o0Var2.f26199p;
                        if (obj3 != null) {
                            if (this.f6251z == null) {
                                dn.l lVar4 = this.A;
                                if (lVar4 != null) {
                                    lVar4.invoke(r1.g.d(((d2.y) obj3).h()));
                                }
                            } else {
                                this.f6247v = bVar2;
                                this.f6242q = o0Var2;
                                this.f6243r = null;
                                this.f6244s = null;
                                this.f6245t = c10;
                                this.f6246u = 4;
                                f11 = a0.f(bVar2, (d2.y) obj3, this);
                                if (f11 == f10) {
                                    return f10;
                                }
                                bVar4 = bVar2;
                                yVar3 = (d2.y) f11;
                                if (yVar3 != null) {
                                    dn.l lVar5 = this.A;
                                    if (lVar5 != null) {
                                        lVar5.invoke(r1.g.d(((d2.y) o0Var2.f26199p).h()));
                                    }
                                } else {
                                    tp.k.d(this.f6248w, null, null, new h(this.B, null), 3, null);
                                    if (this.f6249x != a0.f6199a) {
                                        tp.k.d(this.f6248w, null, null, new i(this.f6249x, this.B, yVar3, null), 3, null);
                                    }
                                    try {
                                        j jVar = new j(this.f6248w, this.f6251z, this.A, o0Var2, this.B, null);
                                        this.f6247v = bVar4;
                                        this.f6242q = o0Var2;
                                        this.f6243r = yVar3;
                                        this.f6246u = 5;
                                        if (bVar4.h0(c10, jVar, this) == f10) {
                                            return f10;
                                        }
                                    } catch (d2.p unused3) {
                                        yVar4 = yVar3;
                                        bVar5 = bVar4;
                                        o0Var3 = o0Var2;
                                        lVar2 = this.A;
                                        if (lVar2 != null) {
                                            lVar2.invoke(r1.g.d(((d2.y) o0Var3.f26199p).h()));
                                        }
                                        lVar3 = this.f6250y;
                                        if (lVar3 != null) {
                                            lVar3.invoke(r1.g.d(yVar4.h()));
                                        }
                                        this.f6247v = null;
                                        this.f6242q = null;
                                        this.f6243r = null;
                                        this.f6246u = 6;
                                        if (a0.g(bVar5, this) == f10) {
                                            return f10;
                                        }
                                        tp.k.d(this.f6248w, null, null, new C0163a(this.B, null), 3, null);
                                        return n0.f34904a;
                                    }
                                }
                            }
                        }
                        return n0.f34904a;
                    case 1:
                        d2.b bVar7 = (d2.b) this.f6247v;
                        rm.y.b(obj);
                        bVar = bVar7;
                        e10 = obj;
                        yVar = (d2.y) e10;
                        yVar.a();
                        tp.k.d(this.f6248w, null, null, new b(this.B, null), 3, null);
                        if (this.f6249x != a0.f6199a) {
                        }
                        if (this.f6250y == null) {
                        }
                        o0Var = new o0();
                        d dVar2 = new d(null);
                        this.f6247v = bVar;
                        this.f6242q = yVar;
                        this.f6243r = o0Var;
                        this.f6244s = o0Var;
                        this.f6245t = c10;
                        this.f6246u = 2;
                        h02 = bVar.h0(c10, dVar2, this);
                        if (h02 != f10) {
                        }
                        break;
                    case 2:
                        c10 = this.f6245t;
                        o0Var = (o0) this.f6244s;
                        o0 o0Var4 = (o0) this.f6243r;
                        yVar = (d2.y) this.f6242q;
                        bVar = (d2.b) this.f6247v;
                        try {
                            rm.y.b(obj);
                            bVar2 = bVar;
                            yVar2 = yVar;
                            o0Var2 = o0Var4;
                            h02 = obj;
                            o0Var.f26199p = h02;
                            obj2 = o0Var2.f26199p;
                            if (obj2 != null) {
                            }
                        } catch (d2.p unused4) {
                            o0Var = o0Var4;
                            bVar3 = bVar;
                            lVar = this.f6250y;
                            if (lVar != null) {
                                lVar.invoke(r1.g.d(yVar.h()));
                            }
                            this.f6247v = bVar3;
                            this.f6242q = o0Var;
                            this.f6243r = null;
                            this.f6244s = null;
                            this.f6245t = c10;
                            this.f6246u = 3;
                            if (a0.g(bVar3, this) == f10) {
                                return f10;
                            }
                            tp.k.d(this.f6248w, null, null, new g(this.B, null), 3, null);
                            o0Var2 = o0Var;
                            bVar2 = bVar3;
                            obj3 = o0Var2.f26199p;
                            if (obj3 != null) {
                            }
                            return n0.f34904a;
                        }
                        obj3 = o0Var2.f26199p;
                        if (obj3 != null) {
                        }
                        return n0.f34904a;
                    case 3:
                        c10 = this.f6245t;
                        o0Var = (o0) this.f6242q;
                        bVar3 = (d2.b) this.f6247v;
                        rm.y.b(obj);
                        tp.k.d(this.f6248w, null, null, new g(this.B, null), 3, null);
                        o0Var2 = o0Var;
                        bVar2 = bVar3;
                        obj3 = o0Var2.f26199p;
                        if (obj3 != null) {
                        }
                        return n0.f34904a;
                    case 4:
                        c10 = this.f6245t;
                        o0 o0Var5 = (o0) this.f6242q;
                        bVar4 = (d2.b) this.f6247v;
                        rm.y.b(obj);
                        o0Var2 = o0Var5;
                        f11 = obj;
                        yVar3 = (d2.y) f11;
                        if (yVar3 != null) {
                        }
                        return n0.f34904a;
                    case 5:
                        yVar4 = (d2.y) this.f6243r;
                        o0Var3 = (o0) this.f6242q;
                        bVar5 = (d2.b) this.f6247v;
                        try {
                            rm.y.b(obj);
                        } catch (d2.p unused5) {
                            lVar2 = this.A;
                            if (lVar2 != null) {
                            }
                            lVar3 = this.f6250y;
                            if (lVar3 != null) {
                            }
                            this.f6247v = null;
                            this.f6242q = null;
                            this.f6243r = null;
                            this.f6246u = 6;
                            if (a0.g(bVar5, this) == f10) {
                            }
                            tp.k.d(this.f6248w, null, null, new C0163a(this.B, null), 3, null);
                            return n0.f34904a;
                        }
                        return n0.f34904a;
                    case 6:
                        rm.y.b(obj);
                        tp.k.d(this.f6248w, null, null, new C0163a(this.B, null), 3, null);
                        return n0.f34904a;
                    default:
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        f(h0 h0Var, dn.q qVar, dn.l lVar, dn.l lVar2, dn.l lVar3, vm.d dVar) {
            super(2, dVar);
            this.f6237r = h0Var;
            this.f6238s = qVar;
            this.f6239t = lVar;
            this.f6240u = lVar2;
            this.f6241v = lVar3;
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final vm.d create(Object obj, vm.d dVar) {
            f fVar = new f(this.f6237r, this.f6238s, this.f6239t, this.f6240u, this.f6241v, dVar);
            fVar.f6236q = obj;
            return fVar;
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            Object f10;
            f10 = wm.d.f();
            int i10 = this.f6235p;
            if (i10 == 0) {
                rm.y.b(obj);
                m0 m0Var = (m0) this.f6236q;
                s sVar = new s(this.f6237r);
                h0 h0Var = this.f6237r;
                a aVar = new a(m0Var, this.f6238s, this.f6239t, this.f6240u, this.f6241v, sVar, null);
                this.f6235p = 1;
                if (o.c(h0Var, aVar, this) == f10) {
                    return f10;
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                rm.y.b(obj);
            }
            return n0.f34904a;
        }

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

    /* loaded from: classes.dex */
    public static final class g extends kotlin.coroutines.jvm.internal.d {

        /* renamed from: p */
        Object f6285p;

        /* renamed from: q */
        Object f6286q;

        /* renamed from: r */
        /* synthetic */ Object f6287r;

        /* renamed from: s */
        int f6288s;

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

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            this.f6287r = obj;
            this.f6288s |= Integer.MIN_VALUE;
            return a0.k(null, null, this);
        }
    }

    /*  JADX ERROR: JadxOverflowException in pass: RegionMakerVisitor
        jadx.core.utils.exceptions.JadxOverflowException: Regions count limit reached
        	at jadx.core.utils.ErrorsCounter.addError(ErrorsCounter.java:59)
        	at jadx.core.utils.ErrorsCounter.error(ErrorsCounter.java:31)
        	at jadx.core.dex.attributes.nodes.NotificationAttrNode.addError(NotificationAttrNode.java:19)
        */
    /* JADX WARN: Removed duplicated region for block: B:12:0x005f  */
    /* JADX WARN: Removed duplicated region for block: B:22:0x0050 A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:24:0x007a  */
    /* JADX WARN: Removed duplicated region for block: B:27:0x0077 A[SYNTHETIC] */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:19:0x004e -> B:10:0x0051). Please report as a decompilation issue!!! */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static final java.lang.Object d(d2.b r9, boolean r10, d2.o r11, vm.d r12) {
        /*
            boolean r0 = r12 instanceof b0.a0.b
            if (r0 == 0) goto L13
            r0 = r12
            b0.a0$b r0 = (b0.a0.b) r0
            int r1 = r0.f6205t
            r2 = -2147483648(0xffffffff80000000, float:-0.0)
            r3 = r1 & r2
            if (r3 == 0) goto L13
            int r1 = r1 - r2
            r0.f6205t = r1
            goto L18
        L13:
            b0.a0$b r0 = new b0.a0$b
            r0.<init>(r12)
        L18:
            java.lang.Object r12 = r0.f6204s
            java.lang.Object r1 = wm.b.f()
            int r2 = r0.f6205t
            r3 = 1
            if (r2 == 0) goto L3f
            if (r2 != r3) goto L37
            boolean r9 = r0.f6203r
            java.lang.Object r10 = r0.f6202q
            d2.o r10 = (d2.o) r10
            java.lang.Object r11 = r0.f6201p
            d2.b r11 = (d2.b) r11
            rm.y.b(r12)
            r8 = r10
            r10 = r9
            r9 = r11
            r11 = r8
            goto L51
        L37:
            java.lang.IllegalStateException r9 = new java.lang.IllegalStateException
            java.lang.String r10 = "call to 'resume' before 'invoke' with coroutine"
            r9.<init>(r10)
            throw r9
        L3f:
            rm.y.b(r12)
        L42:
            r0.f6201p = r9
            r0.f6202q = r11
            r0.f6203r = r10
            r0.f6205t = r3
            java.lang.Object r12 = r9.P(r11, r0)
            if (r12 != r1) goto L51
            return r1
        L51:
            d2.m r12 = (d2.m) r12
            java.util.List r2 = r12.c()
            int r4 = r2.size()
            r5 = 0
            r6 = r5
        L5d:
            if (r6 >= r4) goto L77
            java.lang.Object r7 = r2.get(r6)
            d2.y r7 = (d2.y) r7
            if (r10 == 0) goto L6c
            boolean r7 = d2.n.a(r7)
            goto L70
        L6c:
            boolean r7 = d2.n.b(r7)
        L70:
            if (r7 != 0) goto L74
            r2 = r5
            goto L78
        L74:
            int r6 = r6 + 1
            goto L5d
        L77:
            r2 = r3
        L78:
            if (r2 == 0) goto L42
            java.util.List r9 = r12.c()
            java.lang.Object r9 = r9.get(r5)
            return r9
        */
        throw new UnsupportedOperationException("Method not decompiled: b0.a0.d(d2.b, boolean, d2.o, vm.d):java.lang.Object");
    }

    public static /* synthetic */ Object e(d2.b bVar, boolean z10, d2.o oVar, vm.d dVar, int i10, Object obj) {
        if ((i10 & 1) != 0) {
            z10 = true;
        }
        if ((i10 & 2) != 0) {
            oVar = d2.o.Main;
        }
        return d(bVar, z10, oVar, dVar);
    }

    public static final Object f(d2.b bVar, d2.y yVar, vm.d dVar) {
        return bVar.t1(bVar.getViewConfiguration().a(), new c(yVar, null), dVar);
    }

    /*  JADX ERROR: JadxOverflowException in pass: RegionMakerVisitor
        jadx.core.utils.exceptions.JadxOverflowException: Regions count limit reached
        	at jadx.core.utils.ErrorsCounter.addError(ErrorsCounter.java:59)
        	at jadx.core.utils.ErrorsCounter.error(ErrorsCounter.java:31)
        	at jadx.core.dex.attributes.nodes.NotificationAttrNode.addError(NotificationAttrNode.java:19)
        */
    /* JADX WARN: Removed duplicated region for block: B:12:0x0052 A[LOOP:0: B:11:0x0050->B:12:0x0052, LOOP_END] */
    /* JADX WARN: Removed duplicated region for block: B:16:0x0069  */
    /* JADX WARN: Removed duplicated region for block: B:24:0x0043 A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:26:0x007c  */
    /* JADX WARN: Removed duplicated region for block: B:28:0x007a A[EDGE_INSN: B:28:0x007a->B:21:0x007a BREAK  A[LOOP:1: B:15:0x0067->B:18:0x0077], SYNTHETIC] */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:21:0x0041 -> B:10:0x0044). Please report as a decompilation issue!!! */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static final java.lang.Object g(d2.b r8, vm.d r9) {
        /*
            boolean r0 = r9 instanceof b0.a0.d
            if (r0 == 0) goto L13
            r0 = r9
            b0.a0$d r0 = (b0.a0.d) r0
            int r1 = r0.f6212r
            r2 = -2147483648(0xffffffff80000000, float:-0.0)
            r3 = r1 & r2
            if (r3 == 0) goto L13
            int r1 = r1 - r2
            r0.f6212r = r1
            goto L18
        L13:
            b0.a0$d r0 = new b0.a0$d
            r0.<init>(r9)
        L18:
            java.lang.Object r9 = r0.f6211q
            java.lang.Object r1 = wm.b.f()
            int r2 = r0.f6212r
            r3 = 1
            if (r2 == 0) goto L35
            if (r2 != r3) goto L2d
            java.lang.Object r8 = r0.f6210p
            d2.b r8 = (d2.b) r8
            rm.y.b(r9)
            goto L44
        L2d:
            java.lang.IllegalStateException r8 = new java.lang.IllegalStateException
            java.lang.String r9 = "call to 'resume' before 'invoke' with coroutine"
            r8.<init>(r9)
            throw r8
        L35:
            rm.y.b(r9)
        L38:
            r0.f6210p = r8
            r0.f6212r = r3
            r9 = 0
            java.lang.Object r9 = d2.b.Z(r8, r9, r0, r3, r9)
            if (r9 != r1) goto L44
            return r1
        L44:
            d2.m r9 = (d2.m) r9
            java.util.List r2 = r9.c()
            int r4 = r2.size()
            r5 = 0
            r6 = r5
        L50:
            if (r6 >= r4) goto L5e
            java.lang.Object r7 = r2.get(r6)
            d2.y r7 = (d2.y) r7
            r7.a()
            int r6 = r6 + 1
            goto L50
        L5e:
            java.util.List r9 = r9.c()
            int r2 = r9.size()
            r4 = r5
        L67:
            if (r4 >= r2) goto L7a
            java.lang.Object r6 = r9.get(r4)
            d2.y r6 = (d2.y) r6
            boolean r6 = r6.i()
            if (r6 == 0) goto L77
            r5 = r3
            goto L7a
        L77:
            int r4 = r4 + 1
            goto L67
        L7a:
            if (r5 != 0) goto L38
            rm.n0 r8 = rm.n0.f34904a
            return r8
        */
        throw new UnsupportedOperationException("Method not decompiled: b0.a0.g(d2.b, vm.d):java.lang.Object");
    }

    public static final Object h(h0 h0Var, dn.q qVar, dn.l lVar, vm.d dVar) {
        Object f10;
        Object f11 = tp.n0.f(new e(h0Var, qVar, lVar, new s(h0Var), null), dVar);
        f10 = wm.d.f();
        return f11 == f10 ? f11 : n0.f34904a;
    }

    public static final Object i(h0 h0Var, dn.l lVar, dn.l lVar2, dn.q qVar, dn.l lVar3, vm.d dVar) {
        Object f10;
        Object f11 = tp.n0.f(new f(h0Var, qVar, lVar2, lVar, lVar3, null), dVar);
        f10 = wm.d.f();
        return f11 == f10 ? f11 : n0.f34904a;
    }

    public static /* synthetic */ Object j(h0 h0Var, dn.l lVar, dn.l lVar2, dn.q qVar, dn.l lVar3, vm.d dVar, int i10, Object obj) {
        dn.l lVar4 = (i10 & 1) != 0 ? null : lVar;
        dn.l lVar5 = (i10 & 2) != 0 ? null : lVar2;
        if ((i10 & 4) != 0) {
            qVar = f6199a;
        }
        return i(h0Var, lVar4, lVar5, qVar, (i10 & 8) != 0 ? null : lVar3, dVar);
    }

    /* JADX WARN: Removed duplicated region for block: B:14:0x00ee  */
    /* JADX WARN: Removed duplicated region for block: B:20:0x0102 A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:22:0x0103  */
    /* JADX WARN: Removed duplicated region for block: B:25:0x0068 A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:26:0x0069  */
    /* JADX WARN: Removed duplicated region for block: B:29:0x0081  */
    /* JADX WARN: Removed duplicated region for block: B:35:0x0095  */
    /* JADX WARN: Removed duplicated region for block: B:37:0x009e  */
    /* JADX WARN: Removed duplicated region for block: B:56:0x0092 A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:58:0x00ff A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:63:0x0053  */
    /* JADX WARN: Removed duplicated region for block: B:8:0x0028  */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:45:0x00de -> B:11:0x0037). Please report as a decompilation issue!!! */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static final Object k(d2.b bVar, d2.o oVar, vm.d dVar) {
        g gVar;
        Object f10;
        int i10;
        d2.b bVar2;
        Object obj;
        g gVar2;
        d2.o oVar2;
        d2.b bVar3;
        d2.o oVar3;
        int size;
        int i11;
        boolean z10;
        boolean z11;
        Object P;
        boolean z12;
        if (dVar instanceof g) {
            gVar = (g) dVar;
            int i12 = gVar.f6288s;
            if ((i12 & Integer.MIN_VALUE) != 0) {
                gVar.f6288s = i12 - Integer.MIN_VALUE;
                Object obj2 = gVar.f6287r;
                f10 = wm.d.f();
                i10 = gVar.f6288s;
                if (i10 != 0) {
                    rm.y.b(obj2);
                    bVar2 = bVar;
                    obj = f10;
                    gVar2 = gVar;
                    oVar2 = oVar;
                    gVar2.f6285p = bVar2;
                    gVar2.f6286q = oVar2;
                    gVar2.f6288s = 1;
                    P = bVar2.P(oVar2, gVar2);
                    if (P != obj) {
                    }
                } else if (i10 == 1) {
                    oVar3 = (d2.o) gVar.f6286q;
                    bVar3 = (d2.b) gVar.f6285p;
                    rm.y.b(obj2);
                    d2.m mVar = (d2.m) obj2;
                    List c10 = mVar.c();
                    size = c10.size();
                    i11 = 0;
                    while (true) {
                        if (i11 >= size) {
                        }
                        i11++;
                    }
                    if (!z10) {
                    }
                } else {
                    if (i10 != 2) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    oVar3 = (d2.o) gVar.f6286q;
                    bVar3 = (d2.b) gVar.f6285p;
                    rm.y.b(obj2);
                    Object obj3 = f10;
                    gVar2 = gVar;
                    oVar2 = oVar3;
                    obj = obj3;
                    List c11 = ((d2.m) obj2).c();
                    int size2 = c11.size();
                    int i13 = 0;
                    while (true) {
                        if (i13 >= size2) {
                            z12 = false;
                            break;
                        }
                        if (((d2.y) c11.get(i13)).p()) {
                            z12 = true;
                            break;
                        }
                        i13++;
                    }
                    if (!z12) {
                        return null;
                    }
                    bVar2 = bVar3;
                    gVar2.f6285p = bVar2;
                    gVar2.f6286q = oVar2;
                    gVar2.f6288s = 1;
                    P = bVar2.P(oVar2, gVar2);
                    if (P != obj) {
                        return obj;
                    }
                    bVar3 = bVar2;
                    obj2 = P;
                    Object obj4 = obj;
                    oVar3 = oVar2;
                    gVar = gVar2;
                    f10 = obj4;
                    d2.m mVar2 = (d2.m) obj2;
                    List c102 = mVar2.c();
                    size = c102.size();
                    i11 = 0;
                    while (true) {
                        if (i11 >= size) {
                            z10 = true;
                            break;
                        }
                        if (!d2.n.c((d2.y) c102.get(i11))) {
                            z10 = false;
                            break;
                        }
                        i11++;
                    }
                    if (!z10) {
                        return mVar2.c().get(0);
                    }
                    List c12 = mVar2.c();
                    int size3 = c12.size();
                    int i14 = 0;
                    while (true) {
                        if (i14 >= size3) {
                            z11 = false;
                            break;
                        }
                        d2.y yVar = (d2.y) c12.get(i14);
                        if (yVar.p() || d2.n.f(yVar, bVar3.g(), bVar3.R0())) {
                            z11 = true;
                            break;
                        }
                        i14++;
                    }
                    if (z11) {
                        return null;
                    }
                    d2.o oVar4 = d2.o.Final;
                    gVar.f6285p = bVar3;
                    gVar.f6286q = oVar3;
                    gVar.f6288s = 2;
                    obj2 = bVar3.P(oVar4, gVar);
                    if (obj2 == f10) {
                        return f10;
                    }
                    Object obj32 = f10;
                    gVar2 = gVar;
                    oVar2 = oVar3;
                    obj = obj32;
                    List c112 = ((d2.m) obj2).c();
                    int size22 = c112.size();
                    int i132 = 0;
                    while (true) {
                        if (i132 >= size22) {
                        }
                        i132++;
                    }
                    if (!z12) {
                    }
                }
            }
        }
        gVar = new g(dVar);
        Object obj22 = gVar.f6287r;
        f10 = wm.d.f();
        i10 = gVar.f6288s;
        if (i10 != 0) {
        }
    }

    public static /* synthetic */ Object l(d2.b bVar, d2.o oVar, vm.d dVar, int i10, Object obj) {
        if ((i10 & 1) != 0) {
            oVar = d2.o.Main;
        }
        return k(bVar, oVar, dVar);
    }
}
