package a0;

import a.AbstractC0212a;
import d4.C0550i;
import i4.EnumC0643a;
import j4.AbstractC0806h;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.jvm.functions.Function2;
import r4.AbstractC0983h;

/* JADX INFO: loaded from: classes.dex */
public final class b extends AbstractC0806h implements Function2 {

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

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    /* JADX WARN: Multi-variable type inference failed */
    public b(Function2 function2, h4.c cVar) {
        super(2, cVar);
        this.f3548m = (AbstractC0806h) function2;
    }

    /* JADX WARN: Type inference failed for: r1v0, types: [j4.h, kotlin.jvm.functions.Function2] */
    @Override // j4.AbstractC0799a
    public final h4.c create(Object obj, h4.c cVar) {
        b bVar = new b(this.f3548m, cVar);
        bVar.f3547l = obj;
        return bVar;
    }

    @Override // kotlin.jvm.functions.Function2
    public final Object invoke(Object obj, Object obj2) {
        return ((b) create((C0213a) obj, (h4.c) obj2)).invokeSuspend(C0550i.f6143a);
    }

    /* JADX WARN: Type inference failed for: r1v1, types: [j4.h, kotlin.jvm.functions.Function2] */
    @Override // j4.AbstractC0799a
    public final Object invokeSuspend(Object obj) throws Throwable {
        EnumC0643a enumC0643a = EnumC0643a.f6670k;
        int i = this.f3546k;
        if (i == 0) {
            AbstractC0212a.H(obj);
            C0213a c0213a = (C0213a) this.f3547l;
            this.f3546k = 1;
            obj = this.f3548m.invoke(c0213a, this);
            if (obj == enumC0643a) {
                return enumC0643a;
            }
        } else {
            if (i != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            AbstractC0212a.H(obj);
        }
        C0213a c0213a2 = (C0213a) obj;
        AbstractC0983h.c("null cannot be cast to non-null type androidx.datastore.preferences.core.MutablePreferences", c0213a2);
        ((AtomicBoolean) c0213a2.f3545b.f2797k).set(true);
        return c0213a2;
    }
}
