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

import java.util.ArrayList;
import java.util.BitSet;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import p037.p057.C1714;
import p138.p176.p177.p242.p258.p263.AbstractC4421;
import p138.p176.p177.p242.p258.p263.AbstractC4444;
import p138.p176.p177.p242.p258.p263.C4490;
import p138.p176.p177.p242.p258.p263.C4630;
import p138.p176.p177.p242.p258.p263.C4632;
import p138.p176.p177.p242.p258.p263.C4647;
import p138.p176.p177.p242.p258.p263.C4663;
import p138.p176.p177.p242.p258.p263.InterfaceC4518;
import p138.p176.p177.p242.p258.p263.InterfaceC4527;

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

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

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public boolean f14410;

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public C4647 f14411;

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

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public BitSet f14413;

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

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public Map<Integer, List<Long>> f14415;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public final /* synthetic */ C4957 f14416;

    public /* synthetic */ C4780(C4957 c4957, String str, C4647 c4647, BitSet bitSet, BitSet bitSet2, Map map, Map map2, C4859 c4859) {
        this.f14416 = c4957;
        this.f14409 = str;
        this.f14412 = bitSet;
        this.f14413 = bitSet2;
        this.f14414 = map;
        this.f14415 = new C1714();
        if (map2 != null) {
            for (Integer num : map2.keySet()) {
                ArrayList arrayList = new ArrayList();
                arrayList.add((Long) map2.get(num));
                this.f14415.put(num, arrayList);
            }
        }
        this.f14410 = false;
        this.f14411 = c4647;
    }

    public /* synthetic */ C4780(C4957 c4957, String str, C4859 c4859) {
        this.f14416 = c4957;
        this.f14409 = str;
        this.f14410 = true;
        this.f14412 = new BitSet();
        this.f14413 = new BitSet();
        this.f14414 = new C1714();
        this.f14415 = new C1714();
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r1v14, types: [java.util.ArrayList] */
    /* JADX WARN: Type inference failed for: r1v15, types: [java.lang.Iterable] */
    /* JADX WARN: Type inference failed for: r1v19, types: [java.util.List] */
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final C4630 m8026(int i) {
        ArrayList arrayList;
        ?? arrayList2;
        C4630.C4631 c4631M7362 = C4630.zzh.m7362();
        if (c4631M7362.f13775) {
            c4631M7362.m7368();
            c4631M7362.f13775 = false;
        }
        C4630 c4630 = (C4630) c4631M7362.f13774;
        c4630.zzc |= 1;
        c4630.zzd = i;
        boolean z = this.f14410;
        if (c4631M7362.f13775) {
            c4631M7362.m7368();
            c4631M7362.f13775 = false;
        }
        C4630 c46302 = (C4630) c4631M7362.f13774;
        c46302.zzc |= 8;
        c46302.zzg = z;
        C4647 c4647 = this.f14411;
        if (c4647 != null) {
            if (c4631M7362.f13775) {
                c4631M7362.m7368();
                c4631M7362.f13775 = false;
            }
            C4630.m7646((C4630) c4631M7362.f13774, c4647);
        }
        C4647.C4648 c4648M7362 = C4647.zzg.m7362();
        c4648M7362.m7786(C4833.m8119(this.f14412));
        c4648M7362.m7785(C4833.m8119(this.f14413));
        if (this.f14414 == null) {
            arrayList = null;
        } else {
            arrayList = new ArrayList(this.f14414.size());
            Iterator<Integer> it = this.f14414.keySet().iterator();
            while (it.hasNext()) {
                int iIntValue = it.next().intValue();
                C4632.C4633 c4633M7362 = C4632.zzf.m7362();
                if (c4633M7362.f13775) {
                    c4633M7362.m7368();
                    c4633M7362.f13775 = false;
                }
                C4632 c4632 = (C4632) c4633M7362.f13774;
                c4632.zzc |= 1;
                c4632.zzd = iIntValue;
                long jLongValue = this.f14414.get(Integer.valueOf(iIntValue)).longValue();
                if (c4633M7362.f13775) {
                    c4633M7362.m7368();
                    c4633M7362.f13775 = false;
                }
                C4632 c46322 = (C4632) c4633M7362.f13774;
                c46322.zzc |= 2;
                c46322.zze = jLongValue;
                arrayList.add((C4632) ((AbstractC4421) c4633M7362.m7370()));
            }
        }
        if (c4648M7362.f13775) {
            c4648M7362.m7368();
            c4648M7362.f13775 = false;
        }
        C4647 c46472 = (C4647) c4648M7362.f13774;
        InterfaceC4518<C4632> interfaceC4518 = c46472.zze;
        if (!interfaceC4518.mo7400()) {
            c46472.zze = AbstractC4421.m7354(interfaceC4518);
        }
        AbstractC4444.m7404(arrayList, c46472.zze);
        if (this.f14415 == null) {
            arrayList2 = Collections.emptyList();
        } else {
            arrayList2 = new ArrayList(this.f14415.size());
            for (Integer num : this.f14415.keySet()) {
                C4663.C4664 c4664M7362 = C4663.zzf.m7362();
                int iIntValue2 = num.intValue();
                if (c4664M7362.f13775) {
                    c4664M7362.m7368();
                    c4664M7362.f13775 = false;
                }
                C4663 c4663 = (C4663) c4664M7362.f13774;
                c4663.zzc |= 1;
                c4663.zzd = iIntValue2;
                List<Long> list = this.f14415.get(num);
                if (list != null) {
                    Collections.sort(list);
                    if (c4664M7362.f13775) {
                        c4664M7362.m7368();
                        c4664M7362.f13775 = false;
                    }
                    C4663 c46632 = (C4663) c4664M7362.f13774;
                    InterfaceC4527 interfaceC4527 = c46632.zze;
                    if (!interfaceC4527.mo7400()) {
                        c46632.zze = AbstractC4421.m7355(interfaceC4527);
                    }
                    AbstractC4444.m7404(list, c46632.zze);
                }
                arrayList2.add((C4663) ((AbstractC4421) c4664M7362.m7370()));
            }
        }
        if (c4648M7362.f13775) {
            c4648M7362.m7368();
            c4648M7362.f13775 = false;
        }
        C4647 c46473 = (C4647) c4648M7362.f13774;
        InterfaceC4518<C4663> interfaceC45182 = c46473.zzf;
        if (!interfaceC45182.mo7400()) {
            c46473.zzf = AbstractC4421.m7354(interfaceC45182);
        }
        AbstractC4444.m7404(arrayList2, c46473.zzf);
        if (c4631M7362.f13775) {
            c4631M7362.m7368();
            c4631M7362.f13775 = false;
        }
        C4630.m7645((C4630) c4631M7362.f13774, (C4647) ((AbstractC4421) c4648M7362.m7370()));
        return (C4630) ((AbstractC4421) c4631M7362.m7370());
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m8027(AbstractC4886 abstractC4886) {
        int iMo8030 = abstractC4886.mo8030();
        Boolean bool = abstractC4886.f14697;
        if (bool != null) {
            this.f14413.set(iMo8030, bool.booleanValue());
        }
        Boolean bool2 = abstractC4886.f14698;
        if (bool2 != null) {
            this.f14412.set(iMo8030, bool2.booleanValue());
        }
        if (abstractC4886.f14699 != null) {
            Long l = this.f14414.get(Integer.valueOf(iMo8030));
            long jLongValue = abstractC4886.f14699.longValue() / 1000;
            if (l == null || jLongValue > l.longValue()) {
                this.f14414.put(Integer.valueOf(iMo8030), Long.valueOf(jLongValue));
            }
        }
        if (abstractC4886.f14700 != null) {
            List<Long> arrayList = this.f14415.get(Integer.valueOf(iMo8030));
            if (arrayList == null) {
                arrayList = new ArrayList<>();
                this.f14415.put(Integer.valueOf(iMo8030), arrayList);
            }
            if (abstractC4886.mo8032()) {
                arrayList.clear();
            }
            if (C4490.m7544() && this.f14416.f14588.f15015.m8183(this.f14409, C4915.f14888) && abstractC4886.mo8033()) {
                arrayList.clear();
            }
            if (!C4490.m7544() || !this.f14416.f14588.f15015.m8183(this.f14409, C4915.f14888)) {
                arrayList.add(Long.valueOf(abstractC4886.f14700.longValue() / 1000));
                return;
            }
            long jLongValue2 = abstractC4886.f14700.longValue() / 1000;
            if (arrayList.contains(Long.valueOf(jLongValue2))) {
                return;
            }
            arrayList.add(Long.valueOf(jLongValue2));
        }
    }
}
