package defpackage;

import com.google.android.gms.measurement.api.AppMeasurementSdk;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;

/* JADX INFO: loaded from: classes3.dex */
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\b\u001a\u00020\u0007*\b\u0012\u0004\u0012\u00020\u00010\u00002\u0015\u0010\u0006\u001a\u00110\u0002¢\u0006\f\b\u0003\u0012\b\b\u0004\u0012\u0004\b\b(\u0005H\n¢\u0006\u0004\b\b\u0010\t"}, d2 = {"Ll43;", "Lpq8;", "", "Lj17;", AppMeasurementSdk.ConditionalUserProperty.NAME, AppMeasurementSdk.ConditionalUserProperty.VALUE, "count", "Le6a;", "<anonymous>", "(Ll43;I)V"}, k = 3, mv = {2, 0, 0})
@DebugMetadata(c = "kotlinx.coroutines.flow.StartedWhileSubscribed$command$1", f = "SharingStarted.kt", i = {1, 2, 3}, l = {174, 176, 178, 179, 181}, m = "invokeSuspend", n = {"$this$transformLatest", "$this$transformLatest", "$this$transformLatest"}, s = {"L$0", "L$0", "L$0"})
final class e29 extends SuspendLambda implements ir3<l43<? super pq8>, Integer, Continuation<? super e6a>, Object> {
    public int a;
    public /* synthetic */ l43 b;
    public /* synthetic */ int c;
    public final /* synthetic */ g29 d;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public e29(g29 g29Var, Continuation continuation) {
        super(3, continuation);
        this.d = g29Var;
    }

    @Override // defpackage.ir3
    public final Object invoke(Object obj, Object obj2, Object obj3) {
        int iIntValue = ((Number) obj2).intValue();
        e29 e29Var = new e29(this.d, (Continuation) obj3);
        e29Var.b = (l43) obj;
        e29Var.c = iIntValue;
        return e29Var.invokeSuspend(e6a.a);
    }

    /* JADX WARN: Code restructure failed: missing block: B:21:0x004b, code lost:
    
        if (r8.emit(r1, r7) == r0) goto L29;
     */
    /* JADX WARN: Code restructure failed: missing block: B:28:0x0065, code lost:
    
        if (r1.emit(r8, r7) == r0) goto L29;
     */
    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) {
        l43 l43Var;
        ck1 ck1Var = ck1.a;
        int i = this.a;
        if (i == 0) {
            s38.b(obj);
            l43 l43Var2 = this.b;
            if (this.c > 0) {
                pq8 pq8Var = pq8.a;
                this.a = 1;
            } else {
                this.b = l43Var2;
                this.a = 2;
                if (h32.a(0L, this) != ck1Var) {
                    l43Var = l43Var2;
                    pq8 pq8Var2 = pq8.b;
                    this.b = null;
                    this.a = 5;
                }
            }
            return ck1Var;
        }
        if (i != 1) {
            if (i != 2) {
                if (i == 3) {
                    l43Var = this.b;
                    s38.b(obj);
                    this.b = l43Var;
                    this.a = 4;
                    if (h32.a(0L, this) != ck1Var) {
                        pq8 pq8Var22 = pq8.b;
                        this.b = null;
                        this.a = 5;
                    }
                    return ck1Var;
                }
                if (i != 4) {
                    if (i != 5) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                }
            }
            l43Var = this.b;
            s38.b(obj);
            pq8 pq8Var222 = pq8.b;
            this.b = null;
            this.a = 5;
        }
        s38.b(obj);
        return e6a.a;
    }
}
