package defpackage;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;

/* renamed from: ˁˉˋʼ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C0666 {

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final long f3300;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final int f3301;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final int f3302;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final byte[] f3303;

    public C0666(long j, byte[] bArr, int i, int i2) {
        this.f3301 = i;
        this.f3302 = i2;
        this.f3300 = j;
        this.f3303 = bArr;
    }

    public C0666(byte[] bArr, int i, int i2) {
        this(-1L, bArr, i, i2);
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public static C0666 m2620(int i, ByteOrder byteOrder) {
        ByteBuffer byteBufferWrap = ByteBuffer.wrap(new byte[C2845.f10968[3]]);
        byteBufferWrap.order(byteOrder);
        byteBufferWrap.putShort((short) new int[]{i}[0]);
        return new C0666(byteBufferWrap.array(), 3, 1);
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public static C0666 m2621(long j, ByteOrder byteOrder) {
        long[] jArr = {j};
        ByteBuffer byteBufferWrap = ByteBuffer.wrap(new byte[C2845.f10968[4]]);
        byteBufferWrap.order(byteOrder);
        byteBufferWrap.putInt((int) jArr[0]);
        return new C0666(byteBufferWrap.array(), 4, 1);
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public static C0666 m2622(C2080 c2080, ByteOrder byteOrder) {
        C2080[] c2080Arr = {c2080};
        ByteBuffer byteBufferWrap = ByteBuffer.wrap(new byte[C2845.f10968[5]]);
        byteBufferWrap.order(byteOrder);
        C2080 c20802 = c2080Arr[0];
        byteBufferWrap.putInt((int) c20802.f8263);
        byteBufferWrap.putInt((int) c20802.f8264);
        return new C0666(byteBufferWrap.array(), 5, 1);
    }

    public final String toString() {
        StringBuilder sb = new StringBuilder("(");
        sb.append(C2845.f10957[this.f3301]);
        sb.append(", data length:");
        return AbstractC4486.m9545(sb, this.f3303.length, ")");
    }

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public final int m2623(ByteOrder byteOrder) throws Throwable {
        Object objM2624 = m2624(byteOrder);
        if (objM2624 == null) {
            throw new NumberFormatException("NULL can't be converted to a integer value");
        }
        if (objM2624 instanceof String) {
            return Integer.parseInt((String) objM2624);
        }
        if (objM2624 instanceof long[]) {
            long[] jArr = (long[]) objM2624;
            if (jArr.length == 1) {
                return (int) jArr[0];
            }
            throw new NumberFormatException("There are more than one component");
        }
        if (!(objM2624 instanceof int[])) {
            throw new NumberFormatException("Couldn't find a integer value");
        }
        int[] iArr = (int[]) objM2624;
        if (iArr.length == 1) {
            return iArr[0];
        }
        throw new NumberFormatException("There are more than one component");
    }

    /* JADX WARN: Can't wrap try/catch for region: R(9:59|(2:61|(2:62|(2:64|(2:148|66)(1:67))(2:149|68)))|69|(2:71|(6:151|73|79|143|80|81)(3:74|(2:76|153)(2:77|152)|78))|150|79|143|80|81) */
    /* JADX WARN: Type inference failed for: r11v11, types: [int[], java.io.Serializable] */
    /* JADX WARN: Type inference failed for: r11v12, types: [java.io.Serializable, long[]] */
    /* JADX WARN: Type inference failed for: r11v13, types: [java.io.Serializable, ˑᵣ[]] */
    /* JADX WARN: Type inference failed for: r11v14, types: [int[], java.io.Serializable] */
    /* JADX WARN: Type inference failed for: r11v15, types: [int[], java.io.Serializable] */
    /* JADX WARN: Type inference failed for: r11v16, types: [java.io.Serializable, ˑᵣ[]] */
    /* JADX WARN: Type inference failed for: r11v17, types: [double[], java.io.Serializable] */
    /* JADX WARN: Type inference failed for: r11v18, types: [double[], java.io.Serializable] */
    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final java.io.Serializable m2624(java.nio.ByteOrder r11) throws java.lang.Throwable {
        /*
            Method dump skipped, instructions count: 334
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: defpackage.C0666.m2624(java.nio.ByteOrder):java.io.Serializable");
    }

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public final String m2625(ByteOrder byteOrder) throws Throwable {
        Object objM2624 = m2624(byteOrder);
        if (objM2624 == null) {
            return null;
        }
        if (objM2624 instanceof String) {
            return (String) objM2624;
        }
        StringBuilder sb = new StringBuilder();
        int i = 0;
        if (objM2624 instanceof long[]) {
            long[] jArr = (long[]) objM2624;
            while (i < jArr.length) {
                sb.append(jArr[i]);
                i++;
                if (i != jArr.length) {
                    sb.append(",");
                }
            }
            return sb.toString();
        }
        if (objM2624 instanceof int[]) {
            int[] iArr = (int[]) objM2624;
            while (i < iArr.length) {
                sb.append(iArr[i]);
                i++;
                if (i != iArr.length) {
                    sb.append(",");
                }
            }
            return sb.toString();
        }
        if (objM2624 instanceof double[]) {
            double[] dArr = (double[]) objM2624;
            while (i < dArr.length) {
                sb.append(dArr[i]);
                i++;
                if (i != dArr.length) {
                    sb.append(",");
                }
            }
            return sb.toString();
        }
        if (!(objM2624 instanceof C2080[])) {
            return null;
        }
        C2080[] c2080Arr = (C2080[]) objM2624;
        while (i < c2080Arr.length) {
            sb.append(c2080Arr[i].f8263);
            sb.append('/');
            sb.append(c2080Arr[i].f8264);
            i++;
            if (i != c2080Arr.length) {
                sb.append(",");
            }
        }
        return sb.toString();
    }

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final double m2626(ByteOrder byteOrder) throws Throwable {
        Object objM2624 = m2624(byteOrder);
        if (objM2624 == null) {
            throw new NumberFormatException("NULL can't be converted to a double value");
        }
        if (objM2624 instanceof String) {
            return Double.parseDouble((String) objM2624);
        }
        if (objM2624 instanceof long[]) {
            if (((long[]) objM2624).length == 1) {
                return r3[0];
            }
            throw new NumberFormatException("There are more than one component");
        }
        if (objM2624 instanceof int[]) {
            if (((int[]) objM2624).length == 1) {
                return r3[0];
            }
            throw new NumberFormatException("There are more than one component");
        }
        if (objM2624 instanceof double[]) {
            double[] dArr = (double[]) objM2624;
            if (dArr.length == 1) {
                return dArr[0];
            }
            throw new NumberFormatException("There are more than one component");
        }
        if (!(objM2624 instanceof C2080[])) {
            throw new NumberFormatException("Couldn't find a double value");
        }
        C2080[] c2080Arr = (C2080[]) objM2624;
        if (c2080Arr.length != 1) {
            throw new NumberFormatException("There are more than one component");
        }
        C2080 c2080 = c2080Arr[0];
        return c2080.f8263 / c2080.f8264;
    }
}
