package O1;

import m3.AbstractC2467b;
import w4.C3137A;

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

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ O f5325b;

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

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new G(this.f5325b, dVar);
    }

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

    /* JADX WARN: Code restructure failed: missing block: B:21:0x0044, code lost:
    
        if (r6 == r0) goto L22;
     */
    @Override // C4.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) throws Throwable {
        B4.a aVar = B4.a.f492a;
        int i6 = this.f5324a;
        O o6 = this.f5325b;
        try {
            if (i6 == 0) {
                AbstractC2467b.l(obj);
                if (o6.f5360g.j() instanceof P) {
                    return o6.f5360g.j();
                }
                this.f5324a = 1;
                if (o6.f(this) != aVar) {
                }
                return aVar;
            }
            if (i6 != 1) {
                if (i6 != 2) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                AbstractC2467b.l(obj);
                return (Z) obj;
            }
            AbstractC2467b.l(obj);
            this.f5324a = 2;
            obj = O.c(o6, false, this);
        } catch (Throwable th) {
            return new S(th, -1);
        }
    }
}
