package M;

import android.view.View;
import android.view.ViewGroup;
import com.google.android.gms.internal.measurement.C1;

/* JADX INFO: loaded from: classes.dex */
public final class M extends G6.h implements O6.p, P6.e {

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public final int f4072r;

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

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public /* synthetic */ E6.d f4074t;

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

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

    @Override // P6.e
    public final int e() {
        return this.f4072r;
    }

    @Override // O6.p
    public final Object k(Object obj, Object obj2) {
        return ((M) m((E6.d) obj2, (W6.i) obj)).p(A6.n.f457a);
    }

    @Override // G6.a
    public final E6.d m(E6.d dVar, Object obj) {
        M m8 = new M(this.f4075u, dVar);
        m8.f4074t = (E6.d) obj;
        return m8;
    }

    @Override // G6.a
    public final Object p(Object obj) throws Throwable {
        Object obj2;
        F6.a aVar = F6.a.f2580q;
        int i = this.f4073s;
        View view = this.f4075u;
        if (i == 0) {
            C1.N(obj);
            W6.i iVar = (W6.i) this.f4074t;
            this.f4074t = iVar;
            this.f4073s = 1;
            iVar.f7208r = view;
            iVar.f7207q = 3;
            iVar.f7210t = this;
            return aVar;
        }
        A6.n nVar = A6.n.f457a;
        if (i != 1) {
            if (i != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            C1.N(obj);
            return nVar;
        }
        W6.i iVar2 = (W6.i) this.f4074t;
        C1.N(obj);
        if (view instanceof ViewGroup) {
            this.f4074t = null;
            this.f4073s = 2;
            iVar2.getClass();
            C0188s c0188s = new C0188s(new B6.b(1, (ViewGroup) view));
            if (c0188s.f4130r.hasNext()) {
                iVar2.f7209s = c0188s;
                iVar2.f7207q = 2;
                iVar2.f7210t = this;
                obj2 = aVar;
            } else {
                obj2 = nVar;
            }
            if (obj2 != aVar) {
                obj2 = nVar;
            }
            if (obj2 == aVar) {
                return aVar;
            }
        }
        return nVar;
    }

    @Override // G6.a
    public final String toString() {
        if (this.f3014q != null) {
            return super.toString();
        }
        P6.n.f5536a.getClass();
        String strA = P6.o.a(this);
        P6.g.d(strA, "renderLambdaToString(...)");
        return strA;
    }
}
