package v;

import V4.InterfaceC0765i0;
import m3.AbstractC2467b;
import w4.C3137A;
import z.InterfaceC3290j;

/* JADX INFO: renamed from: v.f, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C3021f extends C4.j implements J4.e {

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

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public /* synthetic */ Object f24854c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ x.C0 f24855d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ long f24856e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final /* synthetic */ z.l f24857f;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public final /* synthetic */ AbstractC3045r f24858j;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C3021f(x.C0 c02, long j4, z.l lVar, AbstractC3045r abstractC3045r, A4.d dVar) {
        super(2, dVar);
        this.f24855d = c02;
        this.f24856e = j4;
        this.f24857f = lVar;
        this.f24858j = abstractC3045r;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        C3021f c3021f = new C3021f(this.f24855d, this.f24856e, this.f24857f, this.f24858j, dVar);
        c3021f.f24854c = obj;
        return c3021f;
    }

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

    /* JADX WARN: Code restructure failed: missing block: B:31:0x00a9, code lost:
    
        if (((z.m) r10).a(r2, r17) != r1) goto L41;
     */
    /* JADX WARN: Code restructure failed: missing block: B:39:0x00c7, code lost:
    
        if (((z.m) r10).a(r3, r17) == r1) goto L40;
     */
    /* JADX WARN: Removed duplicated region for block: B:26:0x0084  */
    @Override // C4.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) {
        InterfaceC0765i0 interfaceC0765i0Y;
        Object objK;
        boolean z6;
        z.p pVar;
        B4.a aVar = B4.a.f492a;
        int i6 = this.f24853b;
        AbstractC3045r abstractC3045r = this.f24858j;
        z.l lVar = this.f24857f;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            interfaceC0765i0Y = V4.E.y((V4.C) this.f24854c, null, null, new C3019e(this.f24858j, this.f24856e, this.f24857f, null), 3);
            this.f24854c = interfaceC0765i0Y;
            this.f24853b = 1;
            objK = this.f24855d.k(this);
            if (objK != aVar) {
            }
            return aVar;
        }
        if (i6 == 1) {
            interfaceC0765i0Y = (InterfaceC0765i0) this.f24854c;
            AbstractC2467b.l(obj);
            objK = obj;
        } else {
            if (i6 == 2) {
                z6 = this.f24852a;
                AbstractC2467b.l(obj);
                if (z6) {
                    z.o oVar = new z.o(this.f24856e);
                    z.p pVar2 = new z.p(oVar);
                    this.f24854c = pVar2;
                    this.f24853b = 3;
                    if (((z.m) lVar).a(oVar, this) != aVar) {
                        pVar = pVar2;
                        this.f24854c = null;
                        this.f24853b = 4;
                    }
                    return aVar;
                }
                abstractC3045r.f24930q = null;
                return C3137A.f25453a;
            }
            if (i6 != 3) {
                if (i6 != 4 && i6 != 5) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                AbstractC2467b.l(obj);
                abstractC3045r.f24930q = null;
                return C3137A.f25453a;
            }
            pVar = (z.p) this.f24854c;
            AbstractC2467b.l(obj);
            this.f24854c = null;
            this.f24853b = 4;
        }
        boolean zBooleanValue = ((Boolean) objK).booleanValue();
        if (!interfaceC0765i0Y.isActive()) {
            z.o oVar2 = abstractC3045r.f24930q;
            if (oVar2 != null) {
                InterfaceC3290j pVar3 = zBooleanValue ? new z.p(oVar2) : new z.n(oVar2);
                this.f24854c = null;
                this.f24853b = 5;
            }
            abstractC3045r.f24930q = null;
            return C3137A.f25453a;
        }
        this.f24854c = null;
        this.f24852a = zBooleanValue;
        this.f24853b = 2;
        if (V4.E.j(interfaceC0765i0Y, this) != aVar) {
            z6 = zBooleanValue;
            if (z6) {
            }
            abstractC3045r.f24930q = null;
            return C3137A.f25453a;
        }
        return aVar;
    }
}
