package androidx.navigation;

import android.os.Bundle;
import java.io.Serializable;

/* JADX INFO: renamed from: androidx.navigation.s, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1143s extends kotlin.jvm.internal.p implements J4.c {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f12794a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ Object f12795b;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ C1143s(int i6, Serializable serializable) {
        super(1);
        this.f12794a = i6;
        this.f12795b = serializable;
    }

    @Override // J4.c
    public final Object invoke(Object obj) {
        switch (this.f12794a) {
            case 0:
                return Boolean.valueOf(kotlin.jvm.internal.o.c((String) obj, (String) this.f12795b));
            case 1:
                String key = (String) obj;
                kotlin.jvm.internal.o.h(key, "key");
                Object obj2 = ((kotlin.jvm.internal.C) this.f12795b).f20115a;
                boolean z6 = true;
                if (obj2 != null && ((Bundle) obj2).containsKey(key)) {
                    z6 = false;
                }
                return Boolean.valueOf(z6);
            default:
                C1137l backStackEntry = (C1137l) obj;
                kotlin.jvm.internal.o.h(backStackEntry, "backStackEntry");
                B b5 = backStackEntry.f12757b;
                if (b5 == null) {
                    b5 = null;
                }
                if (b5 != null) {
                    backStackEntry.a();
                    X x6 = (X) this.f12795b;
                    B bC = x6.c(b5);
                    if (bC != null) {
                        if (bC.equals(b5)) {
                            return backStackEntry;
                        }
                        C1139n c1139nB = x6.b();
                        Bundle bundleG = bC.g(backStackEntry.a());
                        H h5 = c1139nB.f12778h;
                        return C1134i.j(h5.f12668a, bC, bundleG, h5.i(), h5.f12682p);
                    }
                }
                return null;
        }
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C1143s(X x6, K k6) {
        super(1);
        this.f12794a = 2;
        this.f12795b = x6;
    }
}
