package V;

import android.view.textclassifier.TextClassifier;
import m3.AbstractC2467b;
import w4.C3137A;

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

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public e5.a f7147a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public C0626u f7148b;

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ C0626u f7150d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ C4.j f7151e;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    /* JADX WARN: Multi-variable type inference failed */
    public r(C0626u c0626u, J4.e eVar, A4.d dVar) {
        super(2, dVar);
        this.f7150d = c0626u;
        this.f7151e = (C4.j) eVar;
    }

    /* JADX WARN: Type inference failed for: r0v0, types: [C4.j, J4.e] */
    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new r(this.f7150d, this.f7151e, dVar);
    }

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

    /* JADX WARN: Removed duplicated region for block: B:35:0x0087 A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:36:0x0088 A[RETURN] */
    /* JADX WARN: Type inference failed for: r1v9, types: [C4.j, J4.e] */
    @Override // C4.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) throws Throwable {
        C0626u c0626u;
        e5.a aVar;
        e5.a aVar2;
        Throwable th;
        TextClassifier textClassifierK;
        e5.a aVar3;
        B4.a aVar4 = B4.a.f492a;
        int i6 = this.f7149c;
        try {
            if (i6 == 0) {
                AbstractC2467b.l(obj);
                c0626u = this.f7150d;
                e5.c cVar = c0626u.f7169e;
                this.f7147a = cVar;
                this.f7148b = c0626u;
                this.f7149c = 1;
                Object objE = cVar.e(this);
                aVar = cVar;
                if (objE != aVar4) {
                }
            }
            if (i6 != 1) {
                if (i6 != 2) {
                    if (i6 != 3) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    AbstractC2467b.l(obj);
                    return obj;
                }
                aVar2 = this.f7147a;
                try {
                    AbstractC2467b.l(obj);
                    aVar2 = aVar2;
                    textClassifierK = G1.c.k(obj);
                    aVar3 = aVar2;
                    ((e5.c) aVar3).g(null);
                    C0622p c0622p = new C0622p(textClassifierK, this.f7151e, null);
                    this.f7147a = null;
                    this.f7148b = null;
                    this.f7149c = 3;
                    Object objJ = V4.E.J(200L, c0622p, this);
                    return objJ == aVar4 ? aVar4 : objJ;
                } catch (Throwable th2) {
                    th = th2;
                    ((e5.c) aVar2).g(null);
                    throw th;
                }
            }
            c0626u = this.f7148b;
            e5.a aVar5 = this.f7147a;
            AbstractC2467b.l(obj);
            aVar = aVar5;
            textClassifierK = c0626u.f7170f;
            if (textClassifierK != null) {
                aVar3 = aVar;
                if (textClassifierK.isDestroyed()) {
                }
                ((e5.c) aVar3).g(null);
                C0622p c0622p2 = new C0622p(textClassifierK, this.f7151e, null);
                this.f7147a = null;
                this.f7148b = null;
                this.f7149c = 3;
                Object objJ2 = V4.E.J(200L, c0622p2, this);
                if (objJ2 == aVar4) {
                }
            }
            C0623q c0623q = new C0623q(c0626u, null);
            this.f7147a = aVar;
            this.f7148b = null;
            this.f7149c = 2;
            Object objJ3 = V4.E.J(300L, c0623q, this);
            if (objJ3 != aVar4) {
                aVar2 = aVar;
                obj = objJ3;
                textClassifierK = G1.c.k(obj);
                aVar3 = aVar2;
                ((e5.c) aVar3).g(null);
                C0622p c0622p22 = new C0622p(textClassifierK, this.f7151e, null);
                this.f7147a = null;
                this.f7148b = null;
                this.f7149c = 3;
                Object objJ22 = V4.E.J(200L, c0622p22, this);
                if (objJ22 == aVar4) {
                }
            }
        } catch (Throwable th3) {
            aVar2 = aVar;
            th = th3;
            ((e5.c) aVar2).g(null);
            throw th;
        }
    }
}
