package defpackage;

import androidx.room.RoomDatabase;
import java.util.concurrent.Callable;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;

/* JADX INFO: renamed from: hk1, reason: from Kotlin metadata and case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
@Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0003\u001a\u00020\u0002\"\u0004\b\u0000\u0010\u0000*\u00020\u0001H\u008a@¢\u0006\u0004\b\u0003\u0010\u0004"}, d2 = {"R", "Lak1;", "Le6a;", "<anonymous>", "(Lak1;)V"}, k = 3, mv = {1, 8, 0})
@DebugMetadata(c = "androidx.room.CoroutinesRoom$Companion$createFlow$1$1", f = "CoroutinesRoom.kt", i = {}, l = {137}, m = "invokeSuspend", n = {}, s = {})
final class C0568hk1 extends SuspendLambda implements gr3<ak1, Continuation<? super e6a>, Object> {
    public int a;
    public /* synthetic */ Object b;
    public final /* synthetic */ boolean c;
    public final /* synthetic */ RoomDatabase d;
    public final /* synthetic */ l43 e;
    public final /* synthetic */ String[] f;
    public final /* synthetic */ Callable i;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C0568hk1(boolean z, RoomDatabase roomDatabase, l43 l43Var, String[] strArr, Callable callable, Continuation continuation) {
        super(2, continuation);
        this.c = z;
        this.d = roomDatabase;
        this.e = l43Var;
        this.f = strArr;
        this.i = callable;
    }

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Continuation create(Object obj, Continuation continuation) {
        C0568hk1 c0568hk1 = new C0568hk1(this.c, this.d, this.e, this.f, this.i, continuation);
        c0568hk1.b = obj;
        return c0568hk1;
    }

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

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Object invokeSuspend(Object obj) {
        gj1 gj1VarB;
        ck1 ck1Var = ck1.a;
        int i = this.a;
        e6a e6aVar = e6a.a;
        if (i != 0) {
            if (i != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            s38.b(obj);
            return e6aVar;
        }
        s38.b(obj);
        ak1 ak1Var = (ak1) this.b;
        zg0 zg0VarA = ov0.a(-1, 6, null);
        gk1 gk1Var = new gk1(this.f, zg0VarA);
        zg0VarA.i(e6aVar);
        us9 us9Var = (us9) ak1Var.getJ().cb(us9.c);
        if (us9Var != null) {
            gj1VarB = us9Var.a;
        } else {
            boolean z = this.c;
            RoomDatabase roomDatabase = this.d;
            gj1VarB = z ? nk1.b(roomDatabase) : nk1.a(roomDatabase);
        }
        zg0 zg0VarA2 = ov0.a(0, 7, null);
        wj0.c(ak1Var, gj1VarB, null, new C0550fk1(this.d, gk1Var, zg0VarA, this.i, zg0VarA2, null), 2);
        this.a = 1;
        return k63.j(this.e, zg0VarA2, this) == ck1Var ? ck1Var : e6aVar;
    }
}
