package defpackage;

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

/* JADX INFO: renamed from: ˀˈᵞᵖ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C0540 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final boolean f2775;

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public final /* synthetic */ C1549 f2776;

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

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final BitSet f2778;

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

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public final C3310 f2780;

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

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public final C3310 f2782;

    public C0540(C1549 c1549, String str) {
        this.f2776 = c1549;
        this.f2779 = str;
        this.f2775 = true;
        this.f2781 = new BitSet();
        this.f2778 = new BitSet();
        this.f2782 = new C3310(0);
        this.f2780 = new C3310(0);
    }

    public C0540(C1549 c1549, String str, C1851 c1851, BitSet bitSet, BitSet bitSet2, C3310 c3310, C3310 c33102) {
        this.f2776 = c1549;
        this.f2779 = str;
        this.f2781 = bitSet;
        this.f2778 = bitSet2;
        this.f2782 = c3310;
        this.f2780 = new C3310(0);
        for (Integer num : (C3882) c33102.keySet()) {
            ArrayList arrayList = new ArrayList();
            arrayList.add((Long) c33102.get(num));
            this.f2780.put(num, arrayList);
        }
        this.f2775 = false;
        this.f2777 = c1851;
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final C3028 m2080(int i) {
        ArrayList arrayList;
        List list;
        C3499 c3499M7112 = C3028.m7112();
        c3499M7112.m9868();
        ((C3028) c3499M7112.f17955).m7113(i);
        c3499M7112.m9868();
        ((C3028) c3499M7112.f17955).m7118(this.f2775);
        C1851 c1851 = this.f2777;
        if (c1851 != null) {
            c3499M7112.m9868();
            ((C3028) c3499M7112.f17955).m7123(c1851);
        }
        C0440 c0440M5028 = C1851.m5028();
        ArrayList arrayListM5263 = C1962.m5263(this.f2781);
        c0440M5028.m9868();
        ((C1851) c0440M5028.f17955).m5030(arrayListM5263);
        ArrayList arrayListM52632 = C1962.m5263(this.f2778);
        c0440M5028.m9868();
        ((C1851) c0440M5028.f17955).m5045(arrayListM52632);
        C3310 c3310 = this.f2782;
        if (c3310 == null) {
            arrayList = null;
        } else {
            ArrayList arrayList2 = new ArrayList(c3310.f15546);
            for (Integer num : (C3882) c3310.keySet()) {
                int iIntValue = num.intValue();
                Long l = (Long) c3310.get(num);
                if (l != null) {
                    C0469 c0469M9666 = C4588.m9666();
                    c0469M9666.m9868();
                    ((C4588) c0469M9666.f17955).m9671(iIntValue);
                    long jLongValue = l.longValue();
                    c0469M9666.m9868();
                    ((C4588) c0469M9666.f17955).m9672(jLongValue);
                    arrayList2.add((C4588) c0469M9666.m9869());
                }
            }
            arrayList = arrayList2;
        }
        if (arrayList != null) {
            c0440M5028.m9868();
            ((C1851) c0440M5028.f17955).m5033(arrayList);
        }
        C3310 c33102 = this.f2780;
        if (c33102 == null) {
            list = Collections.EMPTY_LIST;
        } else {
            ArrayList arrayList3 = new ArrayList(c33102.f15546);
            for (Integer num2 : (C3882) c33102.keySet()) {
                C2442 c2442M6873 = C2893.m6873();
                int iIntValue2 = num2.intValue();
                c2442M6873.m9868();
                ((C2893) c2442M6873.f17955).m6879(iIntValue2);
                List list2 = (List) c33102.get(num2);
                if (list2 != null) {
                    Collections.sort(list2);
                    c2442M6873.m9868();
                    ((C2893) c2442M6873.f17955).m6880(list2);
                }
                arrayList3.add((C2893) c2442M6873.m9869());
            }
            list = arrayList3;
        }
        c0440M5028.m9868();
        ((C1851) c0440M5028.f17955).m5031(list);
        c3499M7112.m9868();
        ((C3028) c3499M7112.f17955).m7116((C1851) c0440M5028.m9869());
        return (C3028) c3499M7112.m9869();
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final void m2081(C3925 c3925) {
        int iM8808;
        switch (c3925.f14993) {
            case 0:
                iM8808 = ((C4012) c3925.f14995).m8808();
                break;
            default:
                iM8808 = ((C3607) c3925.f14995).m8131();
                break;
        }
        boolean z = true;
        if (c3925.f14990 != null) {
            this.f2778.set(iM8808, true);
        }
        Boolean bool = c3925.f14994;
        if (bool != null) {
            this.f2781.set(iM8808, bool.booleanValue());
        }
        if (c3925.f14991 != null) {
            Integer numValueOf = Integer.valueOf(iM8808);
            C3310 c3310 = this.f2782;
            Long l = (Long) c3310.get(numValueOf);
            long jLongValue = c3925.f14991.longValue() / 1000;
            if (l == null || jLongValue > l.longValue()) {
                c3310.put(numValueOf, Long.valueOf(jLongValue));
            }
        }
        if (c3925.f14996 != null) {
            Integer numValueOf2 = Integer.valueOf(iM8808);
            C3310 c33102 = this.f2780;
            List arrayList = (List) c33102.get(numValueOf2);
            if (arrayList == null) {
                arrayList = new ArrayList();
                c33102.put(numValueOf2, arrayList);
            }
            boolean zM8817 = false;
            switch (c3925.f14993) {
                case 0:
                    z = false;
                    break;
            }
            if (z) {
                arrayList.clear();
            }
            C3934.m8666();
            C1103 c1103 = (C1103) ((ᵜᵪʾ) this.f2776).ˌᴵ;
            C3691 c3691 = c1103.f4726;
            C0511 c0511 = AbstractC3818.f14551;
            String str = this.f2779;
            if (c3691.m8314(str, c0511)) {
                switch (c3925.f14993) {
                    case 0:
                        zM8817 = ((C4012) c3925.f14995).m8817();
                        break;
                }
                if (zM8817) {
                    arrayList.clear();
                }
            }
            C3934.m8666();
            boolean zM8314 = c1103.f4726.m8314(str, c0511);
            Long l2 = c3925.f14996;
            if (!zM8314) {
                arrayList.add(Long.valueOf(l2.longValue() / 1000));
                return;
            }
            Long lValueOf = Long.valueOf(l2.longValue() / 1000);
            if (arrayList.contains(lValueOf)) {
                return;
            }
            arrayList.add(lValueOf);
        }
    }
}
