package defpackage;

import android.view.View;
import android.view.ViewGroup;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.RestrictedSuspendLambda;

/* JADX INFO: loaded from: classes.dex */
@Metadata(d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0003\u001a\u00020\u0002*\b\u0012\u0004\u0012\u00020\u00010\u0000H\n¢\u0006\u0004\b\u0003\u0010\u0004"}, d2 = {"Lrg8;", "Landroid/view/View;", "Le6a;", "<anonymous>", "(Lrg8;)V"}, k = 3, mv = {2, 0, 0})
@DebugMetadata(c = "androidx.core.view.ViewKt$allViews$1", f = "View.kt", i = {0}, l = {410, 412}, m = "invokeSuspend", n = {"$this$sequence"}, s = {"L$0"})
final class kja extends RestrictedSuspendLambda implements gr3<rg8<? super View>, Continuation<? super e6a>, Object> {
    public int a;
    public /* synthetic */ Object b;
    public final /* synthetic */ View c;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public kja(View view, Continuation continuation) {
        super(2, continuation);
        this.c = view;
    }

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Continuation create(Object obj, Continuation continuation) {
        kja kjaVar = new kja(this.c, continuation);
        kjaVar.b = obj;
        return kjaVar;
    }

    @Override // defpackage.gr3
    public final Object invoke(Object obj, Object obj2) {
        return ((kja) create((rg8) obj, (Continuation) obj2)).invokeSuspend(e6a.a);
    }

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Object invokeSuspend(Object obj) {
        ck1 ck1Var = ck1.a;
        int i = this.a;
        View view = this.c;
        if (i == 0) {
            s38.b(obj);
            rg8 rg8Var = (rg8) this.b;
            this.b = rg8Var;
            this.a = 1;
            rg8Var.a(view, this);
            return ck1Var;
        }
        e6a e6aVar = e6a.a;
        if (i == 1) {
            rg8 rg8Var2 = (rg8) this.b;
            s38.b(obj);
            if (view instanceof ViewGroup) {
                zia ziaVar = new zia((ViewGroup) view);
                this.b = null;
                this.a = 2;
                rg8Var2.getClass();
                Object objB = rg8Var2.b(ziaVar.getA(), this);
                if (objB != ck1Var) {
                    objB = e6aVar;
                }
                if (objB == ck1Var) {
                    return ck1Var;
                }
            }
        } else {
            if (i != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            s38.b(obj);
        }
        return e6aVar;
    }
}
