package d3;

import androidx.compose.runtime.MonotonicFrameClockKt;
import androidx.compose.runtime.MutableFloatState;
import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.State;
import j$.time.format.DateTimeFormatter;
import m3.AbstractC2467b;
import w4.C3137A;

/* JADX INFO: loaded from: classes.dex */
public final class S1 extends C4.j implements J4.e {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public int f15320a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public /* synthetic */ Object f15321b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ MutableState f15322c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ State f15323d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ MutableFloatState f15324e;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public S1(MutableState mutableState, State state, MutableFloatState mutableFloatState, A4.d dVar) {
        super(2, dVar);
        this.f15322c = mutableState;
        this.f15323d = state;
        this.f15324e = mutableFloatState;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        S1 s12 = new S1(this.f15322c, this.f15323d, this.f15324e, dVar);
        s12.f15321b = obj;
        return s12;
    }

    @Override // J4.e
    public final Object invoke(Object obj, Object obj2) {
        return ((S1) create((V4.C) obj, (A4.d) obj2)).invokeSuspend(C3137A.f25453a);
    }

    /* JADX WARN: Multi-variable type inference failed */
    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        V4.C c6;
        B4.a aVar = B4.a.f492a;
        int i6 = this.f15320a;
        C3137A c3137a = C3137A.f25453a;
        State state = this.f15323d;
        MutableFloatState mutableFloatState = this.f15324e;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            V4.C c7 = (V4.C) this.f15321b;
            DateTimeFormatter dateTimeFormatter = v2.f16084a;
            if (((Long) this.f15322c.getValue()) == null) {
                mutableFloatState.setFloatValue(((Number) state.getValue()).floatValue());
                return c3137a;
            }
            c6 = c7;
        } else {
            if (i6 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            c6 = (V4.C) this.f15321b;
            AbstractC2467b.l(obj);
        }
        while (V4.E.v(c6)) {
            DateTimeFormatter dateTimeFormatter2 = v2.f16084a;
            float fFloatValue = ((Number) state.getValue()).floatValue();
            float floatValue = fFloatValue - mutableFloatState.getFloatValue();
            if (Math.abs(floatValue) >= 2.0E-4f) {
                fFloatValue = mutableFloatState.getFloatValue() + (floatValue * 0.22f);
            }
            mutableFloatState.setFloatValue(fFloatValue);
            q.H0 h0 = new q.H0(9);
            this.f15321b = c6;
            this.f15320a = 1;
            if (MonotonicFrameClockKt.withFrameNanos(h0, this) == aVar) {
                return aVar;
            }
        }
        return c3137a;
    }
}
