package h3;

import android.speech.SpeechRecognizer;
import androidx.compose.runtime.MutableState;
import m3.AbstractC2467b;
import w4.C3137A;

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

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ a3.a0 f17026b;

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public L2(a3.a0 a0Var, MutableState mutableState, A4.d dVar) {
        super(2, dVar);
        this.f17026b = a0Var;
        this.f17027c = mutableState;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new L2(this.f17026b, this.f17027c, dVar);
    }

    @Override // J4.e
    public final Object invoke(Object obj, Object obj2) {
        return ((L2) 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) {
        B4.a aVar = B4.a.f492a;
        int i6 = this.f17025a;
        C3137A c3137a = C3137A.f25453a;
        MutableState mutableState = this.f17027c;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            float f6 = T2.f17380a;
            if (((Boolean) mutableState.getValue()).booleanValue()) {
                this.f17025a = 1;
                if (V4.E.l(5000L, this) == aVar) {
                    return aVar;
                }
            }
            return c3137a;
        }
        if (i6 != 1) {
            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
        AbstractC2467b.l(obj);
        float f7 = T2.f17380a;
        if (((Boolean) mutableState.getValue()).booleanValue()) {
            try {
                SpeechRecognizer speechRecognizer = this.f17026b.f10616b;
                if (speechRecognizer != null) {
                    speechRecognizer.stopListening();
                }
            } catch (Throwable th) {
                AbstractC2467b.d(th);
            }
            mutableState.setValue(Boolean.FALSE);
        }
        return c3137a;
    }
}
