package j2;

import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.State;
import androidx.navigation.C1137l;
import androidx.navigation.H;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import m3.AbstractC2467b;
import q.A0;
import w4.C3137A;

/* JADX INFO: renamed from: j2.A, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C2320A extends C4.j implements J4.e {

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

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ Map f19457c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ State f19458d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ C2330h f19459e;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C2320A(A0 a02, H h5, Map map, State state, C2330h c2330h, A4.d dVar) {
        super(2, dVar);
        this.f19455a = a02;
        this.f19456b = h5;
        this.f19457c = map;
        this.f19458d = state;
        this.f19459e = c2330h;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new C2320A(this.f19455a, this.f19456b, this.f19457c, this.f19458d, this.f19459e, dVar);
    }

    @Override // J4.e
    public final Object invoke(Object obj, Object obj2) {
        C2320A c2320a = (C2320A) create((V4.C) obj, (A4.d) obj2);
        C3137A c3137a = C3137A.f25453a;
        c2320a.invokeSuspend(c3137a);
        return c3137a;
    }

    /* JADX WARN: Multi-variable type inference failed */
    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        B4.a aVar = B4.a.f492a;
        AbstractC2467b.l(obj);
        A0 a02 = this.f19455a;
        Object objB = a02.f23134a.b();
        MutableState mutableState = a02.f23137d;
        if (kotlin.jvm.internal.o.c(objB, mutableState.getValue())) {
            H h5 = this.f19456b;
            if (((C1137l) h5.f12674g.l()) == null || kotlin.jvm.internal.o.c(mutableState.getValue(), (C1137l) h5.f12674g.l())) {
                Iterator it = ((List) this.f19458d.getValue()).iterator();
                while (it.hasNext()) {
                    this.f19459e.b().b((C1137l) it.next());
                }
                LinkedHashMap linkedHashMap = new LinkedHashMap();
                Map map = this.f19457c;
                for (Map.Entry entry : map.entrySet()) {
                    if (!kotlin.jvm.internal.o.c(entry.getKey(), ((C1137l) mutableState.getValue()).f12761f)) {
                        linkedHashMap.put(entry.getKey(), entry.getValue());
                    }
                }
                Iterator it2 = linkedHashMap.entrySet().iterator();
                while (it2.hasNext()) {
                    map.remove(((Map.Entry) it2.next()).getKey());
                }
            }
        }
        return C3137A.f25453a;
    }
}
