package defpackage;

import defpackage.gu8;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;

/* JADX INFO: renamed from: ju8, reason: from Kotlin metadata and case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0004\u001a\u00020\u0003\"\u0004\b\u0000\u0010\u00002\f\u0010\u0002\u001a\b\u0012\u0004\u0012\u00028\u00000\u0001H\u008a@¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"T", "Lgu8$b;", "msg", "Le6a;", "<anonymous>", "(Lgu8$b;)V"}, k = 3, mv = {1, 5, 1})
@DebugMetadata(c = "androidx.datastore.core.SingleProcessDataStore$actor$3", f = "SingleProcessDataStore.kt", i = {}, l = {239, 242}, m = "invokeSuspend", n = {}, s = {})
final class C0587ju8 extends SuspendLambda implements gr3<gu8.b<Object>, Continuation<? super e6a>, Object> {
    public int a;
    public /* synthetic */ Object b;
    public final /* synthetic */ gu8 c;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C0587ju8(gu8 gu8Var, Continuation continuation) {
        super(2, continuation);
        this.c = gu8Var;
    }

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Continuation create(Object obj, Continuation continuation) {
        C0587ju8 c0587ju8 = new C0587ju8(this.c, continuation);
        c0587ju8.b = obj;
        return c0587ju8;
    }

    @Override // defpackage.gr3
    public final Object invoke(Object obj, Object obj2) {
        return ((C0587ju8) create((gu8.b) obj, (Continuation) obj2)).invokeSuspend(e6a.a);
    }

    /* JADX WARN: Removed duplicated region for block: B:40:0x0078 A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:41:0x0079 A[RETURN] */
    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) {
        Object objG;
        ck1 ck1Var = ck1.a;
        int i = this.a;
        e6a e6aVar = e6a.a;
        if (i != 0) {
            if (i == 1) {
                s38.b(obj);
                return e6aVar;
            }
            if (i != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            s38.b(obj);
            return e6aVar;
        }
        s38.b(obj);
        gu8.b bVar = (gu8.b) this.b;
        boolean z = bVar instanceof gu8.b.a;
        gu8 gu8Var = this.c;
        if (!z) {
            if (bVar instanceof gu8.b.C0144b) {
                this.a = 2;
                if (gu8.c(gu8Var, (gu8.b.C0144b) bVar, this) == ck1Var) {
                }
            }
        }
        gu8.b.a aVar = (gu8.b.a) bVar;
        this.a = 1;
        l29 l29Var = (l29) gu8Var.g.getValue();
        if (!(l29Var instanceof xp1)) {
            if (l29Var instanceof rt7) {
                if (l29Var != aVar.a || (objG = gu8Var.g(this)) != ck1Var) {
                }
                return objG == ck1Var ? ck1Var : e6aVar;
            }
            if (cr4.b(l29Var, y4a.a)) {
                objG = gu8Var.g(this);
                if (objG != ck1Var) {
                }
                if (objG == ck1Var) {
                }
            } else if (l29Var instanceof e03) {
                throw new IllegalStateException("Can't read in final state.");
            }
        }
        objG = e6aVar;
        if (objG == ck1Var) {
        }
    }
}
