package defpackage;

import java.util.ArrayList;
import java.util.BitSet;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;

/* renamed from: ˁᵵˊ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C0758 {

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public final BitSet f3617;

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public final C1200 f3618;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public final C1200 f3619;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final C2175 f3620;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final String f3621;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final boolean f3622;

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public final /* synthetic */ C3365 f3623;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final BitSet f3624;

    public C0758(C3365 c3365, String str) {
        this.f3623 = c3365;
        this.f3621 = str;
        this.f3622 = true;
        this.f3624 = new BitSet();
        this.f3617 = new BitSet();
        this.f3619 = new C1200(0);
        this.f3618 = new C1200(0);
    }

    public C0758(C3365 c3365, String str, C2175 c2175, BitSet bitSet, BitSet bitSet2, C1200 c1200, C1200 c12002) {
        this.f3623 = c3365;
        this.f3621 = str;
        this.f3624 = bitSet;
        this.f3617 = bitSet2;
        this.f3619 = c1200;
        this.f3618 = new C1200(0);
        Iterator it = ((C4225) c12002.keySet()).iterator();
        while (it.hasNext()) {
            Integer num = (Integer) it.next();
            ArrayList arrayList = new ArrayList();
            arrayList.add((Long) c12002.get(num));
            this.f3618.put(num, arrayList);
        }
        this.f3622 = false;
        this.f3620 = c2175;
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final void m2829(C4101 c4101) {
        int iM9209;
        switch (c4101.f15323) {
            case 0:
                iM9209 = ((C4257) c4101.f15326).m9209();
                break;
            default:
                iM9209 = ((C5226) c4101.f15326).m10864();
                break;
        }
        boolean z = true;
        if (c4101.f15325 != null) {
            this.f3617.set(iM9209, true);
        }
        Boolean bool = c4101.f15330;
        if (bool != null) {
            this.f3624.set(iM9209, bool.booleanValue());
        }
        if (c4101.f15322 != null) {
            Integer numValueOf = Integer.valueOf(iM9209);
            C1200 c1200 = this.f3619;
            Long l = (Long) c1200.get(numValueOf);
            long jLongValue = c4101.f15322.longValue() / 1000;
            if (l == null || jLongValue > l.longValue()) {
                c1200.put(numValueOf, Long.valueOf(jLongValue));
            }
        }
        if (c4101.f15324 != null) {
            Integer numValueOf2 = Integer.valueOf(iM9209);
            C1200 c12002 = this.f3618;
            List arrayList = (List) c12002.get(numValueOf2);
            if (arrayList == null) {
                arrayList = new ArrayList();
                c12002.put(numValueOf2, arrayList);
            }
            boolean zM9213 = false;
            switch (c4101.f15323) {
                case 0:
                    z = false;
                    break;
            }
            if (z) {
                arrayList.clear();
            }
            C4409.m9449();
            C4205 c4205 = (C4205) ((ᵢˇᵭ) this.f3623).ᵧᵾˀˈ;
            C1904 c1904 = c4205.f15726;
            C5559 c5559 = AbstractC5018.f18703;
            String str = this.f3621;
            if (c1904.m5353(str, c5559)) {
                switch (c4101.f15323) {
                    case 0:
                        zM9213 = ((C4257) c4101.f15326).m9213();
                        break;
                }
                if (zM9213) {
                    arrayList.clear();
                }
            }
            C4409.m9449();
            boolean zM5353 = c4205.f15726.m5353(str, c5559);
            Long l2 = c4101.f15324;
            if (!zM5353) {
                arrayList.add(Long.valueOf(l2.longValue() / 1000));
                return;
            }
            Long lValueOf = Long.valueOf(l2.longValue() / 1000);
            if (arrayList.contains(lValueOf)) {
                return;
            }
            arrayList.add(lValueOf);
        }
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final C3133 m2830(int i) {
        ArrayList arrayList;
        List list;
        C4804 c4804M7485 = C3133.m7485();
        c4804M7485.m11120();
        ((C3133) c4804M7485.f20589).m7486(i);
        c4804M7485.m11120();
        ((C3133) c4804M7485.f20589).m7487(this.f3622);
        C2175 c2175 = this.f3620;
        if (c2175 != null) {
            c4804M7485.m11120();
            ((C3133) c4804M7485.f20589).m7488(c2175);
        }
        C3997 c3997M5809 = C2175.m5809();
        ArrayList arrayListM4827 = C1680.m4827(this.f3624);
        c3997M5809.m11120();
        ((C2175) c3997M5809.f20589).m5822(arrayListM4827);
        ArrayList arrayListM48272 = C1680.m4827(this.f3617);
        c3997M5809.m11120();
        ((C2175) c3997M5809.f20589).m5813(arrayListM48272);
        C1200 c1200 = this.f3619;
        if (c1200 == null) {
            arrayList = null;
        } else {
            ArrayList arrayList2 = new ArrayList(c1200.f10698);
            Iterator it = ((C4225) c1200.keySet()).iterator();
            while (it.hasNext()) {
                Integer num = (Integer) it.next();
                int iIntValue = num.intValue();
                Long l = (Long) c1200.get(num);
                if (l != null) {
                    C1564 c1564M7390 = C3066.m7390();
                    c1564M7390.m11120();
                    ((C3066) c1564M7390.f20589).m7396(iIntValue);
                    long jLongValue = l.longValue();
                    c1564M7390.m11120();
                    ((C3066) c1564M7390.f20589).m7393(jLongValue);
                    arrayList2.add((C3066) c1564M7390.m11118());
                }
            }
            arrayList = arrayList2;
        }
        if (arrayList != null) {
            c3997M5809.m11120();
            ((C2175) c3997M5809.f20589).m5824(arrayList);
        }
        C1200 c12002 = this.f3618;
        if (c12002 == null) {
            list = Collections.EMPTY_LIST;
        } else {
            ArrayList arrayList3 = new ArrayList(c12002.f10698);
            Iterator it2 = ((C4225) c12002.keySet()).iterator();
            while (it2.hasNext()) {
                Integer num2 = (Integer) it2.next();
                C5453 c5453M6346 = C2496.m6346();
                int iIntValue2 = num2.intValue();
                c5453M6346.m11120();
                ((C2496) c5453M6346.f20589).m6350(iIntValue2);
                List list2 = (List) c12002.get(num2);
                if (list2 != null) {
                    Collections.sort(list2);
                    c5453M6346.m11120();
                    ((C2496) c5453M6346.f20589).m6348(list2);
                }
                arrayList3.add((C2496) c5453M6346.m11118());
            }
            list = arrayList3;
        }
        c3997M5809.m11120();
        ((C2175) c3997M5809.f20589).m5823(list);
        c4804M7485.m11120();
        ((C3133) c4804M7485.f20589).m7490((C2175) c3997M5809.m11118());
        return (C3133) c4804M7485.m11118();
    }
}
