package defpackage;

import androidx.media3.container.NalUnitUtil;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.SuspendLambda;

/* JADX INFO: loaded from: classes3.dex */
@Metadata(d1 = {"\u0000\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000*\u0001\u0000\b\n\u0018\u00002\b\u0012\u0004\u0012\u00028\u00000\u0001¨\u0006\u0002¸\u0006\u0000"}, d2 = {"u98", "Lj43;", "kotlinx-coroutines-core"}, k = 1, mv = {2, 0, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
@vx8
public final class k93 implements j43<Object> {
    public final /* synthetic */ j43 a;
    public final /* synthetic */ SuspendLambda b;

    /* JADX WARN: Multi-variable type inference failed */
    public k93(j43 j43Var, ir3 ir3Var) {
        this.a = j43Var;
        this.b = (SuspendLambda) ir3Var;
    }

    /* JADX WARN: Code restructure failed: missing block: B:23:0x005e, code lost:
    
        if (r2.invoke(r6, r7, r0) == r1) goto L24;
     */
    /* JADX WARN: Removed duplicated region for block: B:7:0x0013  */
    /* JADX WARN: Type inference failed for: r2v3, types: [ir3, kotlin.coroutines.jvm.internal.SuspendLambda] */
    @Override // defpackage.j43
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object collect(l43 l43Var, Continuation continuation) throws Throwable {
        j93 j93Var;
        k93 k93Var;
        if (continuation instanceof j93) {
            j93Var = (j93) continuation;
            int i = j93Var.b;
            if ((i & Integer.MIN_VALUE) != 0) {
                j93Var.b = i - Integer.MIN_VALUE;
            } else {
                j93Var = new j93(this, continuation);
            }
        }
        Object objD = j93Var.a;
        Object obj = ck1.a;
        int i2 = j93Var.b;
        if (i2 == 0) {
            s38.b(objD);
            j93Var.d = this;
            j93Var.e = l43Var;
            j93Var.b = 1;
            objD = k63.d(this.a, l43Var, j93Var);
            if (objD != obj) {
                k93Var = this;
            }
            return obj;
        }
        if (i2 != 1) {
            if (i2 != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            s38.b(objD);
            return e6a.a;
        }
        l43Var = j93Var.e;
        k93Var = j93Var.d;
        s38.b(objD);
        Throwable th = (Throwable) objD;
        if (th != null) {
            ?? r2 = k93Var.b;
            j93Var.d = null;
            j93Var.e = null;
            j93Var.b = 2;
        }
        return e6a.a;
    }
}
