package d3;

import androidx.compose.runtime.MutableFloatState;
import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.State;
import androidx.media3.exoplayer.ExoPlayer;
import m3.AbstractC2467b;
import w4.C3137A;

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

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ ExoPlayer f15330a;

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

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

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

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

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public T1(ExoPlayer exoPlayer, MutableState mutableState, MutableState mutableState2, State state, MutableState mutableState3, MutableState mutableState4, MutableFloatState mutableFloatState, A4.d dVar) {
        super(2, dVar);
        this.f15330a = exoPlayer;
        this.f15331b = mutableState;
        this.f15332c = mutableState2;
        this.f15333d = state;
        this.f15334e = mutableState3;
        this.f15335f = mutableState4;
        this.f15336j = mutableFloatState;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new T1(this.f15330a, this.f15331b, this.f15332c, this.f15333d, this.f15334e, this.f15335f, this.f15336j, dVar);
    }

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

    /* JADX WARN: Multi-variable type inference failed */
    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        long jLongValue;
        float fU;
        B4.a aVar = B4.a.f492a;
        AbstractC2467b.l(obj);
        boolean z6 = v2.z(this.f15331b);
        C3137A c3137a = C3137A.f25453a;
        if (!z6) {
            return c3137a;
        }
        if (((Long) this.f15332c.getValue()) != null) {
            fU = ((Number) this.f15333d.getValue()).floatValue();
        } else {
            MutableState mutableState = this.f15334e;
            if (((Number) mutableState.getValue()).longValue() <= 0) {
                fU = 0.0f;
            } else {
                Long l = (Long) this.f15335f.getValue();
                if (l != null) {
                    jLongValue = l.longValue();
                } else {
                    long currentPosition = this.f15330a.getCurrentPosition();
                    jLongValue = currentPosition >= 0 ? currentPosition : 0L;
                    long jLongValue2 = ((Number) mutableState.getValue()).longValue();
                    if (jLongValue > jLongValue2) {
                        jLongValue = jLongValue2;
                    }
                }
                fU = L4.a.u(jLongValue / ((Number) mutableState.getValue()).longValue(), 0.0f, 1.0f);
            }
        }
        this.f15336j.setFloatValue(fU);
        return c3137a;
    }
}
