package p138.p176.p177.p190.p198.p204;

import android.util.Log;
import p138.p139.p143.p144.C2803;
import p138.p176.p177.p190.p210.p214.AbstractC3749;
import p138.p176.p177.p190.p210.p214.C3734;
import p138.p176.p177.p190.p210.p214.C3742;
import p138.p176.p177.p190.p210.p214.C3756;
import p138.p176.p177.p190.p239.C4140;

/* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ೲ.ޚ.ރ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C3625 {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static final String[] f10920 = {"Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge", "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&B", "Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska", "Death Metal", "Pranks", "Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop", "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical", "Instrumental", "Acid", "House", "Game", "Sound Clip", "Gospel", "Noise", "AlternRock", "Bass", "Soul", "Punk", "Space", "Meditative", "Instrumental Pop", "Instrumental Rock", "Ethnic", "Gothic", "Darkwave", "Techno-Industrial", "Electronic", "Pop-Folk", "Eurodance", "Dream", "Southern Rock", "Comedy", "Cult", "Gangsta", "Top 40", "Christian Rap", "Pop/Funk", "Jungle", "Native American", "Cabaret", "New Wave", "Psychadelic", "Rave", "Showtunes", "Trailer", "Lo-Fi", "Tribal", "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical", "Rock & Roll", "Hard Rock", "Folk", "Folk-Rock", "National Folk", "Swing", "Fast Fusion", "Bebob", "Latin", "Revival", "Celtic", "Bluegrass", "Avantgarde", "Gothic Rock", "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock", "Big Band", "Chorus", "Easy Listening", "Acoustic", "Humour", "Speech", "Chanson", "Opera", "Chamber Music", "Sonata", "Symphony", "Booty Bass", "Primus", "Porn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba", "Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle", "Duet", "Punk Rock", "Drum Solo", "A capella", "Euro-House", "Dance Hall", "Goa", "Drum & Bass", "Club-House", "Hardcore", "Terror", "Indie", "BritPop", "Afro-Punk", "Polsk Punk", "Beat", "Christian Gangsta Rap", "Heavy Metal", "Black Metal", "Crossover", "Contemporary Christian", "Christian Rock", "Merengue", "Salsa", "Thrash Metal", "Anime", "Jpop", "Synthpop", "Abstract", "Art Rock", "Baroque", "Bhangra", "Big beat", "Breakbeat", "Chillout", "Downtempo", "Dub", "EBM", "Eclectic", "Electro", "Electroclash", "Emo", "Experimental", "Garage", "Global", "IDM", "Illbient", "Industro-Goth", "Jam Band", "Krautrock", "Leftfield", "Lounge", "Math Rock", "New Romantic", "Nu-Breakz", "Post-Punk", "Post-Rock", "Psytrance", "Shoegaze", "Space Rock", "Trop Rock", "World Music", "Neoclassical", "Audiobook", "Audio theatre", "Neue Deutsche Welle", "Podcast", "Indie-Rock", "G-Funk", "Dubstep", "Garage Rock", "Psybient"};

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static C3734 m5968(C4140 c4140) {
        int iM6688 = c4140.m6688();
        if (c4140.m6688() != 1684108385) {
            Log.w("MetadataUtil", "Failed to parse cover art attribute");
            return null;
        }
        int iM66882 = c4140.m6688() & 16777215;
        String str = iM66882 == 13 ? "image/jpeg" : iM66882 == 14 ? "image/png" : null;
        if (str == null) {
            C2803.m4900("Unrecognized cover art flags: ", iM66882, "MetadataUtil");
            return null;
        }
        c4140.m6695(4);
        int i = iM6688 - 16;
        byte[] bArr = new byte[i];
        System.arraycopy(c4140.f13227, c4140.f13228, bArr, 0, i);
        c4140.f13228 += i;
        return new C3734(str, null, 3, bArr);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static C3742 m5969(int i, C4140 c4140) {
        int iM6688 = c4140.m6688();
        if (c4140.m6688() == 1684108385) {
            c4140.m6695(8);
            String strM6680 = c4140.m6680(iM6688 - 16);
            return new C3742("und", strM6680, strM6680);
        }
        StringBuilder sbM4889 = C2803.m4889("Failed to parse comment attribute: ");
        sbM4889.append(AbstractC3611.m5942(i));
        Log.w("MetadataUtil", sbM4889.toString());
        return null;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static AbstractC3749 m5970(int i, String str, C4140 c4140, boolean z, boolean z2) {
        int iM5972 = m5972(c4140);
        if (z2) {
            iM5972 = Math.min(1, iM5972);
        }
        if (iM5972 >= 0) {
            return z ? new C3756(str, null, Integer.toString(iM5972)) : new C3742("und", str, Integer.toString(iM5972));
        }
        StringBuilder sbM4889 = C2803.m4889("Failed to parse uint8 attribute: ");
        sbM4889.append(AbstractC3611.m5942(i));
        Log.w("MetadataUtil", sbM4889.toString());
        return null;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static C3756 m5971(int i, String str, C4140 c4140) {
        int iM6688 = c4140.m6688();
        if (c4140.m6688() == 1684108385 && iM6688 >= 22) {
            c4140.m6695(10);
            int iM6707 = c4140.m6707();
            if (iM6707 > 0) {
                String strM4871 = C2803.m4871("", iM6707);
                int iM67072 = c4140.m6707();
                if (iM67072 > 0) {
                    strM4871 = strM4871 + "/" + iM67072;
                }
                return new C3756(str, null, strM4871);
            }
        }
        StringBuilder sbM4889 = C2803.m4889("Failed to parse index/count attribute: ");
        sbM4889.append(AbstractC3611.m5942(i));
        Log.w("MetadataUtil", sbM4889.toString());
        return null;
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static int m5972(C4140 c4140) {
        c4140.m6695(4);
        if (c4140.m6688() == 1684108385) {
            c4140.m6695(8);
            return c4140.m6702();
        }
        Log.w("MetadataUtil", "Failed to parse uint8 attribute value");
        return -1;
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static C3756 m5973(int i, String str, C4140 c4140) {
        int iM6688 = c4140.m6688();
        if (c4140.m6688() == 1684108385) {
            c4140.m6695(8);
            return new C3756(str, null, c4140.m6680(iM6688 - 16));
        }
        StringBuilder sbM4889 = C2803.m4889("Failed to parse text attribute: ");
        sbM4889.append(AbstractC3611.m5942(i));
        Log.w("MetadataUtil", sbM4889.toString());
        return null;
    }
}
