package defpackage;

import com.google.android.gms.internal.measurement.zzd;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.TreeMap;
import java.util.concurrent.Callable;

/* JADX INFO: renamed from: ᵳʽᵔ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C4555 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public C4055 f17306;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final C2994 f17307;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final C4055 f17308;

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final C2991 f17309;

    public C4555() {
        C4055 c4055 = new C4055(9);
        this.f17308 = c4055;
        this.f17306 = ((C4055) c4055.f15557).m8882();
        this.f17307 = new C2994(7);
        C2991 c2991 = new C2991();
        c2991.f11520 = new TreeMap();
        c2991.f11521 = new TreeMap();
        this.f17309 = c2991;
        final int i = 1;
        Callable callable = new Callable(this) { // from class: ᵧˀᵯ

            /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
            public final /* synthetic */ C4555 f13807;

            {
                this.f13807 = this;
            }

            @Override // java.util.concurrent.Callable
            public final /* synthetic */ Object call() {
                int i2 = i;
                C4555 c4555 = this.f13807;
                switch (i2) {
                    case 0:
                        return new C3058(c4555.f17307);
                    default:
                        return new C3058(c4555.f17309);
                }
            }
        };
        C1563 c1563 = (C1563) c4055.f15560;
        c1563.f6260.put("internal.registerCallback", callable);
        final int i2 = 0;
        c1563.f6260.put("internal.eventLogger", new Callable(this) { // from class: ᵧˀᵯ

            /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
            public final /* synthetic */ C4555 f13807;

            {
                this.f13807 = this;
            }

            @Override // java.util.concurrent.Callable
            public final /* synthetic */ Object call() {
                int i22 = i2;
                C4555 c4555 = this.f13807;
                switch (i22) {
                    case 0:
                        return new C3058(c4555.f17307);
                    default:
                        return new C3058(c4555.f17309);
                }
            }
        });
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final void m9643(C4413 c4413) {
        AbstractC5350 abstractC5350;
        try {
            C4055 c4055 = this.f17308;
            this.f17306 = ((C4055) c4055.f15557).m8882();
            if (c4055.m8888(this.f17306, (C0282[]) c4413.m9431().toArray(new C0282[0])) instanceof C2221) {
                throw new IllegalStateException("Program loading failed");
            }
            for (C4967 c4967 : c4413.m9430().m8947()) {
                List listM10279 = c4967.m10279();
                String strM10280 = c4967.m10280();
                Iterator it = listM10279.iterator();
                while (it.hasNext()) {
                    InterfaceC2992 interfaceC2992M8888 = c4055.m8888(this.f17306, (C0282) it.next());
                    if (!(interfaceC2992M8888 instanceof C3037)) {
                        throw new IllegalArgumentException("Invalid rule definition");
                    }
                    C4055 c40552 = this.f17306;
                    if (c40552.m8880(strM10280)) {
                        InterfaceC2992 interfaceC2992M8874 = c40552.m8874(strM10280);
                        if (!(interfaceC2992M8874 instanceof AbstractC5350)) {
                            throw new IllegalStateException("Invalid function name: ".concat(String.valueOf(strM10280)));
                        }
                        abstractC5350 = (AbstractC5350) interfaceC2992M8874;
                    } else {
                        abstractC5350 = null;
                    }
                    if (abstractC5350 == null) {
                        throw new IllegalStateException("Rule function is undefined: ".concat(String.valueOf(strM10280)));
                    }
                    abstractC5350.mo1168(this.f17306, Collections.singletonList(interfaceC2992M8888));
                }
            }
        } catch (Throwable th) {
            throw new zzd(th);
        }
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final boolean m9644(C3003 c3003) throws zzd {
        C2994 c2994 = this.f17307;
        try {
            c2994.f11535 = c3003;
            c2994.f11534 = c3003.clone();
            ((ArrayList) c2994.f11536).clear();
            ((C4055) this.f17308.f15559).m8884("runtime.counter", new C4102(Double.valueOf(0.0d)));
            this.f17309.m7068(this.f17306.m8882(), c2994);
            if (((C3003) c2994.f11534).equals((C3003) c2994.f11535)) {
                return !((ArrayList) c2994.f11536).isEmpty();
            }
            return true;
        } catch (Throwable th) {
            throw new zzd(th);
        }
    }
}
