package T;

import V4.C;
import V4.E;
import V4.InterfaceC0765i0;
import m3.AbstractC2467b;
import w4.C3137A;

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

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

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ m f6337c;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public k(InterfaceC0765i0 interfaceC0765i0, m mVar, A4.d dVar) {
        super(2, dVar);
        this.f6336b = interfaceC0765i0;
        this.f6337c = mVar;
    }

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

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

    /* JADX WARN: Code restructure failed: missing block: B:21:0x0045, code lost:
    
        if (V4.E.j(r12, r11) == r0) goto L32;
     */
    /* JADX WARN: Code restructure failed: missing block: B:31:0x006b, code lost:
    
        if (V4.E.l(500, r11) != r0) goto L33;
     */
    /* JADX WARN: Removed duplicated region for block: B:29:0x005f  */
    /* JADX WARN: Removed duplicated region for block: B:30:0x0060 A[Catch: all -> 0x001d, TryCatch #0 {all -> 0x001d, blocks: (B:8:0x0019, B:33:0x006e, B:27:0x0057, B:30:0x0060, B:14:0x0027, B:15:0x002b, B:16:0x0033, B:23:0x0048, B:25:0x0051), top: B:37:0x000f }] */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:31:0x006b -> B:33:0x006e). Please report as a decompilation issue!!! */
    @Override // C4.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) {
        B4.a aVar = B4.a.f492a;
        int i6 = this.f6335a;
        m mVar = this.f6337c;
        try {
            if (i6 == 0) {
                AbstractC2467b.l(obj);
                InterfaceC0765i0 interfaceC0765i0 = this.f6336b;
                if (interfaceC0765i0 != null) {
                    this.f6335a = 1;
                }
            } else if (i6 == 1) {
                AbstractC2467b.l(obj);
            } else {
                if (i6 == 2) {
                    AbstractC2467b.l(obj);
                    throw new E3.v();
                }
                if (i6 != 3) {
                    if (i6 != 4) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    AbstractC2467b.l(obj);
                    mVar.f6342c.setFloatValue(1.0f);
                    this.f6335a = 3;
                    if (E.l(500L, this) == aVar) {
                        mVar.f6342c.setFloatValue(0.0f);
                        this.f6335a = 4;
                    }
                    return aVar;
                }
                AbstractC2467b.l(obj);
                mVar.f6342c.setFloatValue(0.0f);
                this.f6335a = 4;
            }
            mVar.f6342c.setFloatValue(1.0f);
            if (!mVar.f6340a) {
                this.f6335a = 2;
                E.g(this);
                return aVar;
            }
            this.f6335a = 3;
            if (E.l(500L, this) == aVar) {
            }
            return aVar;
        } catch (Throwable th) {
            mVar.f6342c.setFloatValue(0.0f);
            throw th;
        }
    }
}
