package com.ss.android.ugc.aweme.im.sdk.chat.data.model;

import X.054;
import X.C52724Qu;
import com.bytedance.covode.number.Covode;

public final class EmojiPool {
    public static final EmojiPool INSTANCE = new EmojiPool();
    public static final 054<Long, C52724Qu> cache = new 054<>(100);

    static {
        Covode.recordClassIndex(84089);
    }

    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r4v1, resolved type: X.4Qu} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r2v0, resolved type: java.lang.Object} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r4v2, resolved type: X.4Qu} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r4v3, resolved type: X.4Qu} */
    /* JADX WARNING: Multi-variable type inference failed */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final java.util.List<X.C52724Qu> getFromPool(java.util.List<? extends X.C52724Qu> r8) {
        /*
            r7 = this;
            X.Crj r0 = X.AnonymousClass2d2.LIZIZ
            java.lang.Object r0 = r0.getValue()
            java.lang.Boolean r0 = (java.lang.Boolean) r0
            boolean r0 = r0.booleanValue()
            if (r0 != 0) goto L_0x0013
            if (r8 != 0) goto L_0x0012
            X.Lel r8 = X.Lel.INSTANCE
        L_0x0012:
            return r8
        L_0x0013:
            if (r8 == 0) goto L_0x0059
            java.util.ArrayList r6 = new java.util.ArrayList
            r0 = 10
            int r0 = X.9HM.LIZ(r8, r0)
            r6.<init>(r0)
            java.util.Iterator r5 = r8.iterator()
        L_0x0024:
            boolean r0 = r5.hasNext()
            if (r0 == 0) goto L_0x0056
            java.lang.Object r4 = r5.next()
            X.4Qu r4 = (X.C52724Qu) r4
            X.054<java.lang.Long, X.4Qu> r3 = cache
            long r0 = r4.getId()
            java.lang.Long r0 = java.lang.Long.valueOf(r0)
            java.lang.Object r2 = r3.LIZ(r0)
            if (r2 != 0) goto L_0x004b
            long r0 = r4.getId()
            java.lang.Long r0 = java.lang.Long.valueOf(r0)
            r3.LIZ(r0, r4)
        L_0x004b:
            boolean r0 = kotlin.h.b.n.LIZ(r2, r4)
            if (r0 == 0) goto L_0x0052
            r4 = r2
        L_0x0052:
            r6.add(r4)
            goto L_0x0024
        L_0x0056:
            java.util.List r6 = (java.util.List) r6
            return r6
        L_0x0059:
            X.Lel r0 = X.Lel.INSTANCE
            return r0
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.im.sdk.chat.data.model.EmojiPool.getFromPool(java.util.List):java.util.List");
    }
}
