package defpackage;

import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;

/* JADX INFO: renamed from: ᵠﹳᵣ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C3181 extends ᵸᵺᵜ {

    /* JADX INFO: renamed from: ᵟᵹᵙ, reason: contains not printable characters */
    public final /* synthetic */ int f12080;

    public /* synthetic */ C3181(int i) {
        this.f12080 = i;
    }

    /* JADX INFO: renamed from: ˀᵭ, reason: contains not printable characters */
    public static C3175 m7306(C4545 c4545) {
        String strM9605 = c4545.m9605();
        strM9605.getClass();
        String strM96052 = c4545.m9605();
        strM96052.getClass();
        return new C3175(strM9605, strM96052, c4545.m9601(), c4545.m9601(), Arrays.copyOfRange(c4545.f17284, c4545.f17282, c4545.f17283));
    }

    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public final C1956 m7307(C0899 c0899, ByteBuffer byteBuffer) {
        switch (this.f12080) {
            case 0:
                if (byteBuffer.get() != 116) {
                    return null;
                }
                C3180 c3180 = new C3180(byteBuffer.limit(), byteBuffer.array());
                c3180.m7287(12);
                int iM7305 = (c3180.m7305() + c3180.m7302(12)) - 4;
                c3180.m7287(44);
                c3180.m7291(c3180.m7302(12));
                c3180.m7287(16);
                ArrayList arrayList = new ArrayList();
                while (c3180.m7305() < iM7305) {
                    c3180.m7287(48);
                    int iM7302 = c3180.m7302(8);
                    c3180.m7287(4);
                    int iM73052 = c3180.m7305() + c3180.m7302(12);
                    String str = null;
                    String str2 = null;
                    while (c3180.m7305() < iM73052) {
                        int iM73022 = c3180.m7302(8);
                        int iM73023 = c3180.m7302(8);
                        int iM73053 = c3180.m7305() + iM73023;
                        if (iM73022 == 2) {
                            int iM73024 = c3180.m7302(16);
                            c3180.m7287(8);
                            if (iM73024 == 3) {
                                while (c3180.m7305() < iM73053) {
                                    int iM73025 = c3180.m7302(8);
                                    Charset charset = StandardCharsets.US_ASCII;
                                    byte[] bArr = new byte[iM73025];
                                    c3180.m7290(iM73025, bArr);
                                    String str3 = new String(bArr, charset);
                                    int iM73026 = c3180.m7302(8);
                                    for (int i = 0; i < iM73026; i++) {
                                        c3180.m7291(c3180.m7302(8));
                                    }
                                    str = str3;
                                }
                            }
                        } else if (iM73022 == 21) {
                            Charset charset2 = StandardCharsets.US_ASCII;
                            byte[] bArr2 = new byte[iM73023];
                            c3180.m7290(iM73023, bArr2);
                            str2 = new String(bArr2, charset2);
                        }
                        c3180.m7298(iM73053 * 8);
                    }
                    c3180.m7298(iM73052 * 8);
                    if (str != null && str2 != null) {
                        arrayList.add(new C2419(iM7302, str.concat(str2)));
                    }
                }
                if (arrayList.isEmpty()) {
                    return null;
                }
                return new C1956(arrayList);
            default:
                return new C1956(m7306(new C4545(byteBuffer.limit(), byteBuffer.array())));
        }
    }
}
