package w0;

import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import rm.n0;
import y0.c2;
import y0.m1;
import y0.n3;
import y0.q1;
import y0.s3;
import y0.y3;
import z.g0;

/* loaded from: classes.dex */
public final class d {

    /* renamed from: p, reason: collision with root package name */
    public static final a f40542p = new a(null);

    /* renamed from: a, reason: collision with root package name */
    private final dn.l f40543a;

    /* renamed from: b, reason: collision with root package name */
    private final dn.a f40544b;

    /* renamed from: c, reason: collision with root package name */
    private final y.i f40545c;

    /* renamed from: d, reason: collision with root package name */
    private final dn.l f40546d;

    /* renamed from: e, reason: collision with root package name */
    private final l f40547e = new l();

    /* renamed from: f, reason: collision with root package name */
    private final b0.m f40548f = new h();

    /* renamed from: g, reason: collision with root package name */
    private final q1 f40549g;

    /* renamed from: h, reason: collision with root package name */
    private final y3 f40550h;

    /* renamed from: i, reason: collision with root package name */
    private final y3 f40551i;

    /* renamed from: j, reason: collision with root package name */
    private final m1 f40552j;

    /* renamed from: k, reason: collision with root package name */
    private final y3 f40553k;

    /* renamed from: l, reason: collision with root package name */
    private final m1 f40554l;

    /* renamed from: m, reason: collision with root package name */
    private final q1 f40555m;

    /* renamed from: n, reason: collision with root package name */
    private final q1 f40556n;

    /* renamed from: o, reason: collision with root package name */
    private final w0.c f40557o;

    /* loaded from: classes.dex */
    public static final class a {
        private a() {
        }

        public /* synthetic */ a(kotlin.jvm.internal.k kVar) {
            this();
        }
    }

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

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

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

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

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

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

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

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

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

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

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

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            a(d dVar) {
                super(0);
                this.f40565p = dVar;
            }

            @Override // dn.a
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final w0.f invoke() {
                return this.f40565p.o();
            }
        }

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

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

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

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

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            b(dn.q qVar, d dVar, vm.d dVar2) {
                super(2, dVar2);
                this.f40568r = qVar;
                this.f40569s = dVar;
            }

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

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

            @Override // kotlin.coroutines.jvm.internal.a
            public final Object invokeSuspend(Object obj) {
                Object f10;
                f10 = wm.d.f();
                int i10 = this.f40566p;
                if (i10 == 0) {
                    rm.y.b(obj);
                    w0.f fVar = (w0.f) this.f40567q;
                    dn.q qVar = this.f40568r;
                    w0.c cVar = this.f40569s.f40557o;
                    this.f40566p = 1;
                    if (qVar.invoke(cVar, fVar, 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;
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        c(dn.q qVar, vm.d dVar) {
            super(1, dVar);
            this.f40564r = qVar;
        }

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

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

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            Object f10;
            f10 = wm.d.f();
            int i10 = this.f40562p;
            if (i10 == 0) {
                rm.y.b(obj);
                a aVar = new a(d.this);
                b bVar = new b(this.f40564r, d.this, null);
                this.f40562p = 1;
                if (androidx.compose.material3.internal.b.c(aVar, bVar, 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;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* renamed from: w0.d$d, reason: collision with other inner class name */
    /* loaded from: classes.dex */
    public static final class C0954d extends kotlin.coroutines.jvm.internal.d {

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

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

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

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

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

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

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

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

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

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

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

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            a(d dVar) {
                super(0);
                this.f40578p = dVar;
            }

            @Override // dn.a
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final rm.v invoke() {
                return rm.c0.a(this.f40578p.o(), this.f40578p.x());
            }
        }

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

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

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

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

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            b(dn.r rVar, d dVar, vm.d dVar2) {
                super(2, dVar2);
                this.f40581r = rVar;
                this.f40582s = dVar;
            }

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

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

            @Override // kotlin.coroutines.jvm.internal.a
            public final Object invokeSuspend(Object obj) {
                Object f10;
                f10 = wm.d.f();
                int i10 = this.f40579p;
                if (i10 == 0) {
                    rm.y.b(obj);
                    rm.v vVar = (rm.v) this.f40580q;
                    w0.f fVar = (w0.f) vVar.a();
                    Object b10 = vVar.b();
                    dn.r rVar = this.f40581r;
                    w0.c cVar = this.f40582s.f40557o;
                    this.f40579p = 1;
                    if (rVar.j(cVar, fVar, b10, 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;
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        e(Object obj, dn.r rVar, vm.d dVar) {
            super(1, dVar);
            this.f40576r = obj;
            this.f40577s = rVar;
        }

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

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

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            Object f10;
            f10 = wm.d.f();
            int i10 = this.f40574p;
            if (i10 == 0) {
                rm.y.b(obj);
                d.this.D(this.f40576r);
                a aVar = new a(d.this);
                b bVar = new b(this.f40577s, d.this, null);
                this.f40574p = 1;
                if (androidx.compose.material3.internal.b.c(aVar, bVar, 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;
        }
    }

    /* loaded from: classes.dex */
    public static final class f implements w0.c {
        f() {
        }

        @Override // w0.c
        public void b(float f10, float f11) {
            d.this.F(f10);
            d.this.E(f11);
        }
    }

    /* loaded from: classes.dex */
    static final class g extends kotlin.jvm.internal.v implements dn.a {
        g() {
            super(0);
        }

        @Override // dn.a
        public final Object invoke() {
            Object t10 = d.this.t();
            if (t10 != null) {
                return t10;
            }
            d dVar = d.this;
            float w10 = dVar.w();
            return !Float.isNaN(w10) ? dVar.m(w10, dVar.s()) : dVar.s();
        }
    }

    /* loaded from: classes.dex */
    public static final class h implements b0.m {

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

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

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

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

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

            @Override // dn.q
            /* renamed from: b, reason: merged with bridge method [inline-methods] */
            public final Object invoke(w0.c cVar, w0.f fVar, vm.d dVar) {
                return new a(this.f40589r, dVar).invokeSuspend(n0.f34904a);
            }

            @Override // kotlin.coroutines.jvm.internal.a
            public final Object invokeSuspend(Object obj) {
                Object f10;
                f10 = wm.d.f();
                int i10 = this.f40587p;
                if (i10 == 0) {
                    rm.y.b(obj);
                    b bVar = h.this.f40585a;
                    dn.p pVar = this.f40589r;
                    this.f40587p = 1;
                    if (pVar.invoke(bVar, 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;
            }
        }

        /* loaded from: classes.dex */
        public static final class b implements b0.k {

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

            b(d dVar) {
                this.f40590a = dVar;
            }

            @Override // b0.k
            public void a(float f10) {
                w0.c.a(this.f40590a.f40557o, this.f40590a.z(f10), BitmapDescriptorFactory.HUE_RED, 2, null);
            }
        }

        h() {
            this.f40585a = new b(d.this);
        }

        @Override // b0.m
        public Object a(g0 g0Var, dn.p pVar, vm.d dVar) {
            Object f10;
            Object j10 = d.this.j(g0Var, new a(pVar, null), dVar);
            f10 = wm.d.f();
            return j10 == f10 ? j10 : n0.f34904a;
        }
    }

    /* loaded from: classes.dex */
    static final class i extends kotlin.jvm.internal.v implements dn.a {
        i() {
            super(0);
        }

        @Override // dn.a
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final Float invoke() {
            float d10 = d.this.o().d(d.this.s());
            float d11 = d.this.o().d(d.this.q()) - d10;
            float abs = Math.abs(d11);
            float f10 = 1.0f;
            if (!Float.isNaN(abs) && abs > 1.0E-6f) {
                float A = (d.this.A() - d10) / d11;
                if (A < 1.0E-6f) {
                    f10 = BitmapDescriptorFactory.HUE_RED;
                } else if (A <= 0.999999f) {
                    f10 = A;
                }
            }
            return Float.valueOf(f10);
        }
    }

    /* loaded from: classes.dex */
    static final class j extends kotlin.jvm.internal.v implements dn.a {
        j() {
            super(0);
        }

        @Override // dn.a
        public final Object invoke() {
            Object t10 = d.this.t();
            if (t10 != null) {
                return t10;
            }
            d dVar = d.this;
            float w10 = dVar.w();
            return !Float.isNaN(w10) ? dVar.l(w10, dVar.s(), BitmapDescriptorFactory.HUE_RED) : dVar.s();
        }
    }

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        k(Object obj) {
            super(0);
            this.f40594q = obj;
        }

        @Override // dn.a
        public /* bridge */ /* synthetic */ Object invoke() {
            m468invoke();
            return n0.f34904a;
        }

        /* renamed from: invoke, reason: collision with other method in class */
        public final void m468invoke() {
            w0.c cVar = d.this.f40557o;
            d dVar = d.this;
            Object obj = this.f40594q;
            float d10 = dVar.o().d(obj);
            if (!Float.isNaN(d10)) {
                w0.c.a(cVar, d10, BitmapDescriptorFactory.HUE_RED, 2, null);
                dVar.D(null);
            }
            dVar.C(obj);
        }
    }

    public d(Object obj, dn.l lVar, dn.a aVar, y.i iVar, dn.l lVar2) {
        q1 d10;
        q1 d11;
        q1 d12;
        this.f40543a = lVar;
        this.f40544b = aVar;
        this.f40545c = iVar;
        this.f40546d = lVar2;
        d10 = s3.d(obj, null, 2, null);
        this.f40549g = d10;
        this.f40550h = n3.d(new j());
        this.f40551i = n3.d(new g());
        this.f40552j = c2.a(Float.NaN);
        this.f40553k = n3.e(n3.q(), new i());
        this.f40554l = c2.a(BitmapDescriptorFactory.HUE_RED);
        d11 = s3.d(null, null, 2, null);
        this.f40555m = d11;
        d12 = s3.d(androidx.compose.material3.internal.b.b(), null, 2, null);
        this.f40556n = d12;
        this.f40557o = new f();
    }

    private final void B(w0.f fVar) {
        this.f40556n.setValue(fVar);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final void C(Object obj) {
        this.f40549g.setValue(obj);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final void D(Object obj) {
        this.f40555m.setValue(obj);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final void E(float f10) {
        this.f40554l.h(f10);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final void F(float f10) {
        this.f40552j.h(f10);
    }

    private final boolean H(Object obj) {
        return this.f40547e.e(new k(obj));
    }

    public static /* synthetic */ Object k(d dVar, Object obj, g0 g0Var, dn.r rVar, vm.d dVar2, int i10, Object obj2) {
        if ((i10 & 2) != 0) {
            g0Var = g0.Default;
        }
        return dVar.i(obj, g0Var, rVar, dVar2);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final Object l(float f10, Object obj, float f11) {
        Object b10;
        w0.f o10 = o();
        float d10 = o10.d(obj);
        float floatValue = ((Number) this.f40544b.invoke()).floatValue();
        if ((d10 == f10) || Float.isNaN(d10)) {
            return obj;
        }
        if (d10 < f10) {
            if (f11 >= floatValue) {
                Object b11 = o10.b(f10, true);
                kotlin.jvm.internal.t.d(b11);
                return b11;
            }
            b10 = o10.b(f10, true);
            kotlin.jvm.internal.t.d(b10);
            if (f10 < Math.abs(d10 + Math.abs(((Number) this.f40543a.invoke(Float.valueOf(Math.abs(o10.d(b10) - d10)))).floatValue()))) {
                return obj;
            }
        } else {
            if (f11 <= (-floatValue)) {
                Object b12 = o10.b(f10, false);
                kotlin.jvm.internal.t.d(b12);
                return b12;
            }
            b10 = o10.b(f10, false);
            kotlin.jvm.internal.t.d(b10);
            float abs = Math.abs(d10 - Math.abs(((Number) this.f40543a.invoke(Float.valueOf(Math.abs(d10 - o10.d(b10))))).floatValue()));
            if (f10 < BitmapDescriptorFactory.HUE_RED) {
                if (Math.abs(f10) < abs) {
                    return obj;
                }
            } else if (f10 > abs) {
                return obj;
            }
        }
        return b10;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final Object m(float f10, Object obj) {
        Object b10;
        w0.f o10 = o();
        float d10 = o10.d(obj);
        if ((d10 == f10) || Float.isNaN(d10)) {
            return obj;
        }
        if (d10 < f10) {
            b10 = o10.b(f10, true);
            if (b10 == null) {
                return obj;
            }
        } else {
            b10 = o10.b(f10, false);
            if (b10 == null) {
                return obj;
            }
        }
        return b10;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final Object t() {
        return this.f40555m.getValue();
    }

    public final float A() {
        if (!Float.isNaN(w())) {
            return w();
        }
        throw new IllegalStateException("The offset was read before being initialized. Did you access the offset in a phase before layout, like effects or composition?".toString());
    }

    public final Object G(float f10, vm.d dVar) {
        Object f11;
        Object f12;
        Object s10 = s();
        Object l10 = l(A(), s10, f10);
        if (((Boolean) this.f40546d.invoke(l10)).booleanValue()) {
            Object d10 = androidx.compose.material3.internal.b.d(this, l10, f10, dVar);
            f12 = wm.d.f();
            return d10 == f12 ? d10 : n0.f34904a;
        }
        Object d11 = androidx.compose.material3.internal.b.d(this, s10, f10, dVar);
        f11 = wm.d.f();
        return d11 == f11 ? d11 : n0.f34904a;
    }

    public final void I(w0.f fVar, Object obj) {
        if (kotlin.jvm.internal.t.b(o(), fVar)) {
            return;
        }
        B(fVar);
        if (H(obj)) {
            return;
        }
        D(obj);
    }

    /* JADX WARN: Removed duplicated region for block: B:25:0x0038  */
    /* JADX WARN: Removed duplicated region for block: B:9:0x0026  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object i(Object obj, g0 g0Var, dn.r rVar, vm.d dVar) {
        C0954d c0954d;
        Object f10;
        int i10;
        Object c10;
        try {
            if (dVar instanceof C0954d) {
                c0954d = (C0954d) dVar;
                int i11 = c0954d.f40573s;
                if ((i11 & Integer.MIN_VALUE) != 0) {
                    c0954d.f40573s = i11 - Integer.MIN_VALUE;
                    Object obj2 = c0954d.f40571q;
                    f10 = wm.d.f();
                    i10 = c0954d.f40573s;
                    if (i10 != 0) {
                        rm.y.b(obj2);
                        if (!o().e(obj)) {
                            C(obj);
                            return n0.f34904a;
                        }
                        l lVar = this.f40547e;
                        e eVar = new e(obj, rVar, null);
                        c0954d.f40570p = this;
                        c0954d.f40573s = 1;
                        if (lVar.d(g0Var, eVar, c0954d) == f10) {
                            return f10;
                        }
                    } else {
                        if (i10 != 1) {
                            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                        }
                        this = (d) c0954d.f40570p;
                        rm.y.b(obj2);
                    }
                    if (c10 != null && Math.abs(this.w() - this.o().d(c10)) <= 0.5f && ((Boolean) this.f40546d.invoke(c10)).booleanValue()) {
                        this.C(c10);
                    }
                    return n0.f34904a;
                }
            }
            if (i10 != 0) {
            }
            if (c10 != null) {
                this.C(c10);
            }
            return n0.f34904a;
        } finally {
            this.D(null);
            c10 = this.o().c(this.w());
            if (c10 != null && Math.abs(this.w() - this.o().d(c10)) <= 0.5f && ((Boolean) this.f40546d.invoke(c10)).booleanValue()) {
                this.C(c10);
            }
        }
        c0954d = new C0954d(dVar);
        Object obj22 = c0954d.f40571q;
        f10 = wm.d.f();
        i10 = c0954d.f40573s;
    }

    /* JADX WARN: Removed duplicated region for block: B:25:0x0037  */
    /* JADX WARN: Removed duplicated region for block: B:9:0x0025  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object j(g0 g0Var, dn.q qVar, vm.d dVar) {
        b bVar;
        Object f10;
        int i10;
        Object c10;
        try {
            if (dVar instanceof b) {
                bVar = (b) dVar;
                int i11 = bVar.f40561s;
                if ((i11 & Integer.MIN_VALUE) != 0) {
                    bVar.f40561s = i11 - Integer.MIN_VALUE;
                    Object obj = bVar.f40559q;
                    f10 = wm.d.f();
                    i10 = bVar.f40561s;
                    if (i10 != 0) {
                        rm.y.b(obj);
                        l lVar = this.f40547e;
                        c cVar = new c(qVar, null);
                        bVar.f40558p = this;
                        bVar.f40561s = 1;
                        if (lVar.d(g0Var, cVar, bVar) == f10) {
                            return f10;
                        }
                    } else {
                        if (i10 != 1) {
                            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                        }
                        this = (d) bVar.f40558p;
                        rm.y.b(obj);
                    }
                    if (c10 != null && Math.abs(this.w() - this.o().d(c10)) <= 0.5f && ((Boolean) this.f40546d.invoke(c10)).booleanValue()) {
                        this.C(c10);
                    }
                    return n0.f34904a;
                }
            }
            if (i10 != 0) {
            }
            if (c10 != null) {
                this.C(c10);
            }
            return n0.f34904a;
        } finally {
            c10 = this.o().c(this.w());
            if (c10 != null && Math.abs(this.w() - this.o().d(c10)) <= 0.5f && ((Boolean) this.f40546d.invoke(c10)).booleanValue()) {
                this.C(c10);
            }
        }
        bVar = new b(dVar);
        Object obj2 = bVar.f40559q;
        f10 = wm.d.f();
        i10 = bVar.f40561s;
    }

    public final float n(float f10) {
        float z10 = z(f10);
        float w10 = Float.isNaN(w()) ? BitmapDescriptorFactory.HUE_RED : w();
        F(z10);
        return z10 - w10;
    }

    public final w0.f o() {
        return (w0.f) this.f40556n.getValue();
    }

    public final y.i p() {
        return this.f40545c;
    }

    public final Object q() {
        return this.f40551i.getValue();
    }

    public final dn.l r() {
        return this.f40546d;
    }

    public final Object s() {
        return this.f40549g.getValue();
    }

    public final b0.m u() {
        return this.f40548f;
    }

    public final float v() {
        return this.f40554l.b();
    }

    public final float w() {
        return this.f40552j.b();
    }

    public final Object x() {
        return this.f40550h.getValue();
    }

    public final boolean y() {
        return t() != null;
    }

    public final float z(float f10) {
        float j10;
        j10 = jn.o.j((Float.isNaN(w()) ? BitmapDescriptorFactory.HUE_RED : w()) + f10, o().a(), o().f());
        return j10;
    }
}
