package androidx.compose.ui.platform;

/* loaded from: classes.dex */
public abstract class f2 {

    /* renamed from: a, reason: collision with root package name */
    private static final y0.h2 f2429a = y0.x.f(a.f2430p);

    /* loaded from: classes.dex */
    static final class a extends kotlin.jvm.internal.v implements dn.a {

        /* renamed from: p, reason: collision with root package name */
        public static final a f2430p = new a();

        a() {
            super(0);
        }

        public final z0 a() {
            return null;
        }

        @Override // dn.a
        public /* bridge */ /* synthetic */ Object invoke() {
            a();
            return null;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class b extends kotlin.coroutines.jvm.internal.d {

        /* renamed from: p, reason: collision with root package name */
        /* synthetic */ Object f2431p;

        /* renamed from: q, reason: collision with root package name */
        int f2432q;

        b(vm.d dVar) {
            super(dVar);
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            this.f2431p = obj;
            this.f2432q |= Integer.MIN_VALUE;
            return f2.b(null, null, this);
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class c extends kotlin.coroutines.jvm.internal.d {

        /* renamed from: p, reason: collision with root package name */
        /* synthetic */ Object f2433p;

        /* renamed from: q, reason: collision with root package name */
        int f2434q;

        c(vm.d dVar) {
            super(dVar);
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            this.f2433p = obj;
            this.f2434q |= Integer.MIN_VALUE;
            return f2.c(null, null, null, this);
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:15:0x0031  */
    /* JADX WARN: Removed duplicated region for block: B:8:0x0023  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static final Object b(e2 e2Var, dn.p pVar, vm.d dVar) {
        b bVar;
        Object f10;
        int i10;
        if (dVar instanceof b) {
            bVar = (b) dVar;
            int i11 = bVar.f2432q;
            if ((i11 & Integer.MIN_VALUE) != 0) {
                bVar.f2432q = i11 - Integer.MIN_VALUE;
                Object obj = bVar.f2431p;
                f10 = wm.d.f();
                i10 = bVar.f2432q;
                if (i10 != 0) {
                    rm.y.b(obj);
                    if (!e2Var.P0().O1()) {
                        throw new IllegalArgumentException("establishTextInputSession called from an unattached node".toString());
                    }
                    j2.j1 n10 = j2.k.n(e2Var);
                    android.support.v4.media.session.b.a(j2.k.m(e2Var).J().a(f2429a));
                    bVar.f2432q = 1;
                    if (c(n10, null, pVar, bVar) == f10) {
                        return f10;
                    }
                } else {
                    if (i10 != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    rm.y.b(obj);
                }
                throw new rm.k();
            }
        }
        bVar = new b(dVar);
        Object obj2 = bVar.f2431p;
        f10 = wm.d.f();
        i10 = bVar.f2432q;
        if (i10 != 0) {
        }
        throw new rm.k();
    }

    /* JADX INFO: Access modifiers changed from: private */
    /* JADX WARN: Removed duplicated region for block: B:19:0x003d  */
    /* JADX WARN: Removed duplicated region for block: B:8:0x0023  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static final Object c(j2.j1 j1Var, z0 z0Var, dn.p pVar, vm.d dVar) {
        c cVar;
        Object f10;
        int i10;
        if (dVar instanceof c) {
            cVar = (c) dVar;
            int i11 = cVar.f2434q;
            if ((i11 & Integer.MIN_VALUE) != 0) {
                cVar.f2434q = i11 - Integer.MIN_VALUE;
                Object obj = cVar.f2433p;
                f10 = wm.d.f();
                i10 = cVar.f2434q;
                if (i10 != 0) {
                    rm.y.b(obj);
                    cVar.f2434q = 1;
                    if (j1Var.k(pVar, cVar) == f10) {
                        return f10;
                    }
                } else {
                    if (i10 != 1) {
                        if (i10 != 2) {
                            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                        }
                        rm.y.b(obj);
                        throw new rm.k();
                    }
                    rm.y.b(obj);
                }
                throw new rm.k();
            }
        }
        cVar = new c(dVar);
        Object obj2 = cVar.f2433p;
        f10 = wm.d.f();
        i10 = cVar.f2434q;
        if (i10 != 0) {
        }
        throw new rm.k();
    }
}
