package p138.p176.p177.p242.p265.p266;

import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import p000.p001.p002.p003.p004.C0567;
import p037.p057.C1714;
import p138.p176.p177.p242.p258.p263.AbstractC4421;
import p138.p176.p177.p242.p258.p263.C4490;
import p138.p176.p177.p242.p258.p263.C4586;
import p138.p176.p177.p242.p258.p263.C4593;
import p138.p176.p177.p242.p258.p263.C4630;
import p138.p176.p177.p242.p258.p263.C4632;
import p138.p176.p177.p242.p258.p263.C4634;
import p138.p176.p177.p242.p258.p263.C4647;
import p138.p176.p177.p242.p258.p263.C4657;
import p138.p176.p177.p242.p258.p263.C4663;
import p138.p176.p177.p242.p258.p263.C4665;
import p138.p176.p177.p242.p258.p263.InterfaceC4518;

/* JADX INFO: renamed from: ދ.ހ.֏.ހ.ބ.֏.ࡋ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C4957 extends AbstractC4843 {

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public String f14986;

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public Set<Integer> f14987;

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public Map<Integer, C4780> f14988;

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public Long f14989;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public Long f14990;

    public C4957(C4889 c4889) {
        super(c4889);
    }

    /* JADX WARN: Code restructure failed: missing block: B:335:0x0868, code lost:
    
        r7 = mo8165().f14447;
        r9 = p138.p176.p177.p242.p265.p266.C4794.m8038(r60.f14986);
     */
    /* JADX WARN: Code restructure failed: missing block: B:336:0x0878, code lost:
    
        if (r8.m7624() == false) goto L338;
     */
    /* JADX WARN: Code restructure failed: missing block: B:337:0x087a, code lost:
    
        r8 = java.lang.Integer.valueOf(r8.zzd);
     */
    /* JADX WARN: Code restructure failed: missing block: B:338:0x0881, code lost:
    
        r8 = null;
     */
    /* JADX WARN: Code restructure failed: missing block: B:339:0x0882, code lost:
    
        r7.m8036("Invalid property filter ID. appId, id", r9, java.lang.String.valueOf(r8));
        r8 = false;
     */
    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:177:0x0408  */
    /* JADX WARN: Removed duplicated region for block: B:238:0x052a  */
    /* JADX WARN: Removed duplicated region for block: B:365:0x0940  */
    /* JADX WARN: Removed duplicated region for block: B:419:0x0531 A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:64:0x017b  */
    /* JADX WARN: Type inference failed for: r8v0 */
    /* JADX WARN: Type inference failed for: r8v37 */
    /* JADX WARN: Type inference failed for: r8v38, types: [android.database.Cursor] */
    /* JADX WARN: Type inference failed for: r8v39 */
    /* JADX WARN: Type inference failed for: r8v47, types: [android.database.Cursor] */
    /* JADX WARN: Type inference failed for: r8v48 */
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final List<C4630> m8486(String str, List<C4634> list, List<C4665> list2, Long l, Long l2) throws Throwable {
        int i;
        int i2;
        boolean z;
        String str2;
        Map map;
        Cursor cursor;
        Cursor cursorQuery;
        C1714 c1714;
        C4909 c4909;
        C4989 c4989;
        C1714 c17142;
        C1714 c17143;
        List<C4586> list3;
        String str3;
        boolean z2;
        C1714 c17144;
        Iterator<C4632> it;
        Long lValueOf;
        ?? r8;
        Cursor cursorRawQuery;
        Map map2;
        Map map3;
        Iterator it2;
        Iterator it3;
        Iterator it4;
        Cursor cursorQuery2;
        C0567.m1926(str);
        C0567.m1910(list);
        C0567.m1910(list2);
        this.f14986 = str;
        this.f14987 = new HashSet();
        this.f14988 = new C1714();
        this.f14989 = l;
        this.f14990 = l2;
        Iterator<C4634> it5 = list.iterator();
        while (true) {
            i = 1;
            i2 = 0;
            if (!it5.hasNext()) {
                z = false;
                break;
            }
            if ("_s".equals(it5.next().zze)) {
                z = true;
                break;
            }
        }
        boolean z3 = C4490.m7544() && this.f14588.f15015.m8183(this.f14986, C4915.f14888);
        boolean z4 = C4490.m7544() && this.f14588.f15015.m8183(this.f14986, C4915.f14887);
        if (z) {
            C4900 c4900M8158 = m8158();
            String str4 = this.f14986;
            c4900M8158.m8155();
            c4900M8158.mo8008();
            C0567.m1926(str4);
            ContentValues contentValues = new ContentValues();
            str2 = "current_session_count";
            contentValues.put("current_session_count", (Integer) 0);
            try {
                str2 = "events";
                c4900M8158.m8354().update("events", contentValues, "app_id = ?", new String[]{str4});
            } catch (SQLiteException e) {
                c4900M8158.mo8165().f14444.m8036("Error resetting session-scoped event counts. appId", C4794.m8038(str4), e);
            }
        }
        Map mapEmptyMap = Collections.emptyMap();
        String str5 = "audience_id";
        ?? r82 = 0;
        if (z4 && z3) {
            C4900 c4900M81582 = m8158();
            String str6 = this.f14986;
            if (c4900M81582 == null) {
                throw null;
            }
            C0567.m1926(str6);
            C1714 c17145 = new C1714();
            try {
                try {
                    cursorQuery2 = c4900M81582.m8354().query("event_filters", new String[]{"audience_id", "data"}, "app_id=?", new String[]{str6}, null, null, null);
                    try {
                    } catch (SQLiteException e2) {
                        e = e2;
                        c4900M81582.mo8165().f14444.m8036("Database error querying filters. appId", C4794.m8038(str6), e);
                        mapEmptyMap = Collections.emptyMap();
                        if (cursorQuery2 != null) {
                            cursorQuery2.close();
                        }
                    }
                } catch (Throwable th) {
                    th = th;
                    r82 = str2;
                    if (r82 != 0) {
                        r82.close();
                    }
                    throw th;
                }
            } catch (SQLiteException e3) {
                e = e3;
                cursorQuery2 = null;
            } catch (Throwable th2) {
                th = th2;
                if (r82 != 0) {
                }
                throw th;
            }
            if (cursorQuery2.moveToFirst()) {
                while (true) {
                    try {
                        C4586 c4586 = (C4586) ((AbstractC4421) ((C4586.C4587) C4833.m8121(C4586.zzl.m7362(), cursorQuery2.getBlob(1))).m7370());
                        if (c4586.m7614()) {
                            int i3 = cursorQuery2.getInt(i2);
                            List arrayList = (List) c17145.get(Integer.valueOf(i3));
                            if (arrayList == null) {
                                arrayList = new ArrayList();
                                c17145.put(Integer.valueOf(i3), arrayList);
                            }
                            arrayList.add(c4586);
                        }
                    } catch (IOException e4) {
                        c4900M81582.mo8165().f14444.m8036("Failed to merge filter. appId", C4794.m8038(str6), e4);
                    }
                    if (!cursorQuery2.moveToNext()) {
                        break;
                    }
                    i2 = 0;
                }
                cursorQuery2.close();
                map = c17145;
            } else {
                mapEmptyMap = Collections.emptyMap();
                cursorQuery2.close();
                map = mapEmptyMap;
            }
        } else {
            map = mapEmptyMap;
        }
        C4900 c4900M81583 = m8158();
        String str7 = this.f14986;
        c4900M81583.m8155();
        c4900M81583.mo8008();
        C0567.m1926(str7);
        try {
            cursorQuery = c4900M81583.m8354().query("audience_filter_values", new String[]{"audience_id", "current_results"}, "app_id=?", new String[]{str7}, null, null, null);
            try {
                try {
                    if (cursorQuery.moveToFirst()) {
                        C1714 c17146 = new C1714();
                        int i4 = 0;
                        while (true) {
                            int i5 = cursorQuery.getInt(i4);
                            try {
                                c17146.put(Integer.valueOf(i5), (C4647) ((AbstractC4421) ((C4647.C4648) C4833.m8121(C4647.zzg.m7362(), cursorQuery.getBlob(i))).m7370()));
                            } catch (IOException e5) {
                                c4900M81583.mo8165().f14444.m8037("Failed to merge filter results. appId, audienceId, error", C4794.m8038(str7), Integer.valueOf(i5), e5);
                            }
                            if (!cursorQuery.moveToNext()) {
                                break;
                            }
                            i4 = 0;
                            i = 1;
                        }
                        cursorQuery.close();
                        c1714 = c17146;
                    } else {
                        cursorQuery.close();
                        c1714 = null;
                    }
                } catch (SQLiteException e6) {
                    e = e6;
                    c4900M81583.mo8165().f14444.m8036("Database error querying filter results. appId", C4794.m8038(str7), e);
                    if (cursorQuery != null) {
                        cursorQuery.close();
                    }
                    c1714 = null;
                }
            } catch (Throwable th3) {
                th = th3;
                cursor = cursorQuery;
                if (cursor != null) {
                    cursor.close();
                }
                throw th;
            }
        } catch (SQLiteException e7) {
            e = e7;
            cursorQuery = null;
        } catch (Throwable th4) {
            th = th4;
            cursor = null;
            if (cursor != null) {
            }
            throw th;
        }
        if (c1714 != null && !c1714.isEmpty()) {
            HashSet hashSet = new HashSet(c1714.keySet());
            if (z) {
                String str8 = this.f14986;
                C0567.m1926(str8);
                C0567.m1910(c1714);
                C1714 c17147 = new C1714();
                if (!c1714.isEmpty()) {
                    C4900 c4900M81584 = m8158();
                    c4900M81584.m8155();
                    c4900M81584.mo8008();
                    C0567.m1926(str8);
                    C1714 c17148 = new C1714();
                    SQLiteDatabase sQLiteDatabaseM8354 = c4900M81584.m8354();
                    try {
                        try {
                            cursorRawQuery = sQLiteDatabaseM8354.rawQuery("select audience_id, filter_id from event_filters where app_id = ? and session_scoped = 1 UNION select audience_id, filter_id from property_filters where app_id = ? and session_scoped = 1;", new String[]{str8, str8});
                            try {
                                if (cursorRawQuery.moveToFirst()) {
                                    do {
                                        int i6 = cursorRawQuery.getInt(0);
                                        List arrayList2 = (List) c17148.get(Integer.valueOf(i6));
                                        if (arrayList2 == null) {
                                            arrayList2 = new ArrayList();
                                            c17148.put(Integer.valueOf(i6), arrayList2);
                                        }
                                        arrayList2.add(Integer.valueOf(cursorRawQuery.getInt(1)));
                                    } while (cursorRawQuery.moveToNext());
                                    cursorRawQuery.close();
                                    map2 = c17148;
                                } else {
                                    Map mapEmptyMap2 = Collections.emptyMap();
                                    cursorRawQuery.close();
                                    map2 = mapEmptyMap2;
                                }
                            } catch (SQLiteException e8) {
                                e = e8;
                                c4900M81584.mo8165().f14444.m8036("Database error querying scoped filters. appId", C4794.m8038(str8), e);
                                if (cursorRawQuery != null) {
                                    cursorRawQuery.close();
                                }
                                map2 = null;
                            }
                        } catch (Throwable th5) {
                            th = th5;
                            r8 = sQLiteDatabaseM8354;
                            if (r8 != 0) {
                                r8.close();
                            }
                            throw th;
                        }
                    } catch (SQLiteException e9) {
                        e = e9;
                        cursorRawQuery = null;
                    } catch (Throwable th6) {
                        th = th6;
                        r8 = 0;
                        if (r8 != 0) {
                        }
                        throw th;
                    }
                    Iterator it6 = c1714.keySet().iterator();
                    Map map4 = map2;
                    while (it6.hasNext()) {
                        int iIntValue = ((Integer) it6.next()).intValue();
                        C4647 c4647 = (C4647) c1714.get(Integer.valueOf(iIntValue));
                        List<Integer> list4 = (List) map4.get(Integer.valueOf(iIntValue));
                        if (list4 == null || list4.isEmpty()) {
                            map3 = map4;
                            it2 = it6;
                            c17147.put(Integer.valueOf(iIntValue), c4647);
                        } else {
                            List<Long> listM8134 = m8157().m8134(c4647.zzd, list4);
                            if (listM8134.isEmpty()) {
                                map3 = map4;
                                it2 = it6;
                            } else {
                                C4647.C4648 c4648M7363 = c4647.m7363();
                                map3 = map4;
                                if (c4648M7363.f13775) {
                                    c4648M7363.m7368();
                                    it3 = it6;
                                    c4648M7363.f13775 = false;
                                } else {
                                    it3 = it6;
                                }
                                C4647.m7782((C4647) c4648M7363.f13774);
                                c4648M7363.m7786(listM8134);
                                List<Long> listM81342 = m8157().m8134(c4647.zzc, list4);
                                if (c4648M7363.f13775) {
                                    c4648M7363.m7368();
                                    c4648M7363.f13775 = false;
                                }
                                C4647.m7781((C4647) c4648M7363.f13774);
                                c4648M7363.m7785(listM81342);
                                int i7 = 0;
                                while (i7 < c4647.m7783()) {
                                    if (list4.contains(Integer.valueOf(c4647.zze.get(i7).zzd))) {
                                        if (c4648M7363.f13775) {
                                            c4648M7363.m7368();
                                            c4648M7363.f13775 = false;
                                        }
                                        C4647 c46472 = (C4647) c4648M7363.f13774;
                                        it4 = it3;
                                        InterfaceC4518<C4632> interfaceC4518 = c46472.zze;
                                        if (!interfaceC4518.mo7400()) {
                                            c46472.zze = AbstractC4421.m7354(interfaceC4518);
                                        }
                                        c46472.zze.remove(i7);
                                    } else {
                                        it4 = it3;
                                    }
                                    i7++;
                                    it3 = it4;
                                }
                                it2 = it3;
                                for (int i8 = 0; i8 < c4647.m7784(); i8++) {
                                    if (list4.contains(Integer.valueOf(c4647.zzf.get(i8).zzd))) {
                                        if (c4648M7363.f13775) {
                                            c4648M7363.m7368();
                                            c4648M7363.f13775 = false;
                                        }
                                        C4647 c46473 = (C4647) c4648M7363.f13774;
                                        InterfaceC4518<C4663> interfaceC45182 = c46473.zzf;
                                        if (!interfaceC45182.mo7400()) {
                                            c46473.zzf = AbstractC4421.m7354(interfaceC45182);
                                        }
                                        c46473.zzf.remove(i8);
                                    }
                                }
                                c17147.put(Integer.valueOf(iIntValue), (C4647) ((AbstractC4421) c4648M7363.m7370()));
                            }
                        }
                        map4 = map3;
                        it6 = it2;
                    }
                }
                c17143 = c17147;
            } else {
                c17143 = c1714;
            }
            Iterator it7 = hashSet.iterator();
            while (it7.hasNext()) {
                int iIntValue2 = ((Integer) it7.next()).intValue();
                C4647 c46474 = (C4647) c17143.get(Integer.valueOf(iIntValue2));
                BitSet bitSet = new BitSet();
                BitSet bitSet2 = new BitSet();
                C1714 c17149 = new C1714();
                if (c46474 != null && c46474.m7783() != 0) {
                    Iterator<C4632> it8 = c46474.zze.iterator();
                    while (it8.hasNext()) {
                        C4632 next = it8.next();
                        if ((next.zzc & 1) != 0) {
                            Integer numValueOf = Integer.valueOf(next.zzd);
                            if ((next.zzc & 2) != 0) {
                                it = it8;
                                lValueOf = Long.valueOf(next.zze);
                            } else {
                                it = it8;
                                lValueOf = null;
                            }
                            c17149.put(numValueOf, lValueOf);
                        } else {
                            it = it8;
                        }
                        it8 = it;
                    }
                }
                C1714 c171410 = new C1714();
                if (c46474 != null && c46474.m7784() != 0) {
                    for (C4663 c4663 : c46474.zzf) {
                        if (!((c4663.zzc & 1) != 0) || c4663.zze.size() <= 0) {
                            c17144 = c17143;
                        } else {
                            Integer numValueOf2 = Integer.valueOf(c4663.zzd);
                            c17144 = c17143;
                            int size = c4663.zze.size() - 1;
                            C4657 c4657 = (C4657) c4663.zze;
                            c4657.m7793(size);
                            c171410.put(numValueOf2, Long.valueOf(c4657.f14150[size]));
                        }
                        c17143 = c17144;
                    }
                }
                C1714 c171411 = c17143;
                if (c46474 != null) {
                    int i9 = 0;
                    while (i9 < (c46474.zzc.size() << 6)) {
                        if (C4833.m8126(c46474.zzc, i9)) {
                            str3 = str5;
                            mo8165().f14452.m8036("Filter already evaluated. audience ID, filter ID", Integer.valueOf(iIntValue2), Integer.valueOf(i9));
                            bitSet2.set(i9);
                            if (C4833.m8126(c46474.zzd, i9)) {
                                bitSet.set(i9);
                                z2 = true;
                            }
                            if (z2) {
                                c17149.remove(Integer.valueOf(i9));
                            }
                            i9++;
                            str5 = str3;
                        } else {
                            str3 = str5;
                        }
                        z2 = false;
                        if (z2) {
                        }
                        i9++;
                        str5 = str3;
                    }
                }
                String str9 = str5;
                C4647 c46475 = (C4647) c1714.get(Integer.valueOf(iIntValue2));
                if (z4 && z3 && (list3 = (List) map.get(Integer.valueOf(iIntValue2))) != null && this.f14990 != null && this.f14989 != null) {
                    for (C4586 c45862 : list3) {
                        int i10 = c45862.zzd;
                        long jLongValue = this.f14990.longValue() / 1000;
                        if (c45862.zzj) {
                            jLongValue = this.f14989.longValue() / 1000;
                        }
                        if (c17149.containsKey(Integer.valueOf(i10))) {
                            c17149.put(Integer.valueOf(i10), Long.valueOf(jLongValue));
                        }
                        if (c171410.containsKey(Integer.valueOf(i10))) {
                            c171410.put(Integer.valueOf(i10), Long.valueOf(jLongValue));
                        }
                    }
                }
                this.f14988.put(Integer.valueOf(iIntValue2), new C4780(this, this.f14986, c46475, bitSet, bitSet2, c17149, c171410, null));
                c1714 = c1714;
                c17143 = c171411;
                str5 = str9;
            }
        }
        String str10 = str5;
        C4859 c4859 = null;
        if (!list.isEmpty()) {
            C4989 c49892 = new C4989(this, c4859);
            C1714 c171412 = new C1714();
            for (C4634 c4634 : list) {
                C4634 c4634M8524 = c49892.m8524(this.f14986, c4634);
                if (c4634M8524 != null) {
                    C4900 c4900M81585 = m8158();
                    String str11 = this.f14986;
                    String str12 = c4634M8524.zze;
                    C4909 c4909M8329 = c4900M81585.m8329(str11, c4634.zze);
                    if (c4909M8329 == null) {
                        c4900M81585.mo8165().f14447.m8036("Event aggregate wasn't created during raw event logging. appId, event", C4794.m8038(str11), c4900M81585.m8161().m8110(str12));
                        c4909 = new C4909(str11, c4634.zze, 1L, 1L, 1L, c4634.zzf, 0L, null, null, null, null);
                    } else {
                        c4909 = new C4909(c4909M8329.f14809, c4909M8329.f14810, c4909M8329.f14811 + 1, c4909M8329.f14812 + 1, c4909M8329.f14813 + 1, c4909M8329.f14814, c4909M8329.f14815, c4909M8329.f14816, c4909M8329.f14817, c4909M8329.f14818, c4909M8329.f14819);
                    }
                    m8158().m8332(c4909);
                    long j = c4909.f14811;
                    String str13 = c4634M8524.zze;
                    Map<Integer, List<C4586>> mapM8350 = (Map) c171412.get(str13);
                    if (mapM8350 == null) {
                        mapM8350 = m8158().m8350(this.f14986, str13);
                        if (mapM8350 == null) {
                            mapM8350 = new C1714<>();
                        }
                        c171412.put(str13, mapM8350);
                    }
                    Iterator<Integer> it9 = mapM8350.keySet().iterator();
                    while (it9.hasNext()) {
                        int iIntValue3 = it9.next().intValue();
                        if (this.f14987.contains(Integer.valueOf(iIntValue3))) {
                            mo8165().f14452.m8035("Skipping failed audience ID", Integer.valueOf(iIntValue3));
                        } else {
                            Iterator<C4586> it10 = mapM8350.get(Integer.valueOf(iIntValue3)).iterator();
                            boolean zM8031 = true;
                            while (true) {
                                if (!it10.hasNext()) {
                                    c4989 = c49892;
                                    c17142 = c171412;
                                    break;
                                }
                                C4586 next2 = it10.next();
                                c4989 = c49892;
                                C4791 c4791 = new C4791(this, this.f14986, iIntValue3, next2);
                                c17142 = c171412;
                                zM8031 = c4791.m8031(this.f14989, this.f14990, c4634M8524, j, c4909, m8488(iIntValue3, next2.zzd));
                                if (this.f14588.f15015.m8183(this.f14986, C4915.f14885) && !zM8031) {
                                    this.f14987.add(Integer.valueOf(iIntValue3));
                                    break;
                                }
                                m8487(iIntValue3).m8027(c4791);
                                c49892 = c4989;
                                c171412 = c17142;
                            }
                            if (!zM8031) {
                                this.f14987.add(Integer.valueOf(iIntValue3));
                            }
                            c49892 = c4989;
                            c171412 = c17142;
                        }
                    }
                }
            }
        }
        if (!list2.isEmpty()) {
            C1714 c171413 = new C1714();
            for (C4665 c4665 : list2) {
                String str14 = c4665.zze;
                Map<Integer, List<C4593>> mapM8351 = (Map) c171413.get(str14);
                if (mapM8351 == null) {
                    mapM8351 = m8158().m8351(this.f14986, str14);
                    if (mapM8351 == null) {
                        mapM8351 = new C1714<>();
                    }
                    c171413.put(str14, mapM8351);
                }
                Iterator<Integer> it11 = mapM8351.keySet().iterator();
                while (true) {
                    if (it11.hasNext()) {
                        int iIntValue4 = it11.next().intValue();
                        if (this.f14987.contains(Integer.valueOf(iIntValue4))) {
                            mo8165().f14452.m8035("Skipping failed audience ID", Integer.valueOf(iIntValue4));
                            break;
                        }
                        Iterator<C4593> it12 = mapM8351.get(Integer.valueOf(iIntValue4)).iterator();
                        boolean zM8528 = true;
                        while (true) {
                            if (!it12.hasNext()) {
                                break;
                            }
                            C4593 next3 = it12.next();
                            if (mo8165().m8044(2)) {
                                mo8165().f14452.m8037("Evaluating filter. audience, filter, property", Integer.valueOf(iIntValue4), next3.m7624() ? Integer.valueOf(next3.zzd) : null, m8161().m8114(next3.zze));
                                mo8165().f14452.m8035("Filter definition", m8157().m8132(next3));
                            }
                            if (!next3.m7624() || next3.zzd > 256) {
                                break;
                            }
                            C5000 c5000 = new C5000(this, this.f14986, iIntValue4, next3);
                            zM8528 = c5000.m8528(this.f14989, this.f14990, c4665, m8488(iIntValue4, next3.zzd));
                            if (this.f14588.f15015.m8183(this.f14986, C4915.f14885) && !zM8528) {
                                this.f14987.add(Integer.valueOf(iIntValue4));
                                break;
                            }
                            m8487(iIntValue4).m8027(c5000);
                        }
                        if (!zM8528) {
                            this.f14987.add(Integer.valueOf(iIntValue4));
                        }
                    }
                }
            }
        }
        ArrayList arrayList3 = new ArrayList();
        Set<Integer> setKeySet = this.f14988.keySet();
        setKeySet.removeAll(this.f14987);
        Iterator<Integer> it13 = setKeySet.iterator();
        while (it13.hasNext()) {
            int iIntValue5 = it13.next().intValue();
            C4630 c4630M8026 = this.f14988.get(Integer.valueOf(iIntValue5)).m8026(iIntValue5);
            arrayList3.add(c4630M8026);
            C4900 c4900M81586 = m8158();
            String str15 = this.f14986;
            C4647 c46476 = c4630M8026.zze;
            if (c46476 == null) {
                c46476 = C4647.zzg;
            }
            c4900M81586.m8155();
            c4900M81586.mo8008();
            C0567.m1926(str15);
            C0567.m1910(c46476);
            byte[] bArrM7406 = c46476.m7406();
            ContentValues contentValues2 = new ContentValues();
            contentValues2.put("app_id", str15);
            String str16 = str10;
            contentValues2.put(str16, Integer.valueOf(iIntValue5));
            contentValues2.put("current_results", bArrM7406);
            try {
                try {
                    if (c4900M81586.m8354().insertWithOnConflict("audience_filter_values", null, contentValues2, 5) == -1) {
                        c4900M81586.mo8165().f14444.m8035("Failed to insert filter results (got -1). appId", C4794.m8038(str15));
                    }
                } catch (SQLiteException e10) {
                    e = e10;
                    c4900M81586.mo8165().f14444.m8036("Error storing filter results. appId", C4794.m8038(str15), e);
                }
            } catch (SQLiteException e11) {
                e = e11;
            }
            str10 = str16;
        }
        return arrayList3;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final C4780 m8487(int i) {
        if (this.f14988.containsKey(Integer.valueOf(i))) {
            return this.f14988.get(Integer.valueOf(i));
        }
        C4780 c4780 = new C4780(this, this.f14986, null);
        this.f14988.put(Integer.valueOf(i), c4780);
        return c4780;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final boolean m8488(int i, int i2) {
        if (this.f14988.get(Integer.valueOf(i)) == null) {
            return false;
        }
        return this.f14988.get(Integer.valueOf(i)).f14412.get(i2);
    }

    @Override // p138.p176.p177.p242.p265.p266.AbstractC4843
    /* JADX INFO: renamed from: ތ */
    public final boolean mo8082() {
        return false;
    }
}
