package F1;

import android.view.View;
import android.view.ViewGroup;
import m3.AbstractC2467b;
import w4.C3137A;

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

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

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public J(View view, A4.d dVar) {
        super(2, dVar);
        this.f1376c = view;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        J j4 = new J(this.f1376c, dVar);
        j4.f1375b = obj;
        return j4;
    }

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

    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        Object obj2;
        B4.a aVar = B4.a.f492a;
        int i6 = this.f1374a;
        View view = this.f1376c;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            R4.m mVar = (R4.m) this.f1375b;
            this.f1375b = mVar;
            this.f1374a = 1;
            mVar.a(this, view);
            return aVar;
        }
        C3137A c3137a = C3137A.f25453a;
        if (i6 != 1) {
            if (i6 != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            AbstractC2467b.l(obj);
            return c3137a;
        }
        R4.m mVar2 = (R4.m) this.f1375b;
        AbstractC2467b.l(obj);
        if (view instanceof ViewGroup) {
            this.f1375b = null;
            this.f1374a = 2;
            mVar2.getClass();
            C0192v c0192v = new C0192v(new I((ViewGroup) view, 0));
            R4.l lVar = (R4.l) mVar2;
            if (c0192v.f1472b.hasNext()) {
                lVar.f6112c = c0192v;
                lVar.f6110a = 2;
                lVar.f6113d = this;
                obj2 = aVar;
            } else {
                obj2 = c3137a;
            }
            if (obj2 != aVar) {
                obj2 = c3137a;
            }
            if (obj2 == aVar) {
                return aVar;
            }
        }
        return c3137a;
    }
}
