package defpackage;

import androidx.media3.common.ParserException;
import java.math.RoundingMode;

/* JADX INFO: renamed from: ᵤᵭᵬ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C3458 implements InterfaceC3802 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final InterfaceC5226 f13333;

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public final C5286 f13334;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final C1597 f13335;

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final byte[] f13336;

    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public long f13337;

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public long f13338;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final InterfaceC4550 f13339;

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public final int f13340;

    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public int f13341;

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final int f13342;

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public int f13343;

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public final C4545 f13344;

    /* JADX INFO: renamed from: ᵝᵶ, reason: contains not printable characters */
    public static final int[] f13332 = {-1, -1, -1, -1, 2, 4, 6, 8, -1, -1, -1, -1, 2, 4, 6, 8};

    /* JADX INFO: renamed from: ˋˈ, reason: contains not printable characters */
    public static final int[] f13331 = {7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31, 34, 37, 41, 45, 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, 130, 143, 157, 173, 190, 209, 230, 253, 279, 307, 337, 371, 408, 449, 494, 544, 598, 658, 724, 796, 876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066, 2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358, 5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899, 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767};

    public C3458(InterfaceC4550 interfaceC4550, InterfaceC5226 interfaceC5226, C1597 c1597) throws ParserException {
        this.f13339 = interfaceC4550;
        this.f13333 = interfaceC5226;
        this.f13335 = c1597;
        int i = c1597.f6408;
        int iMax = Math.max(1, i / 10);
        this.f13340 = iMax;
        C4545 c4545 = new C4545(c1597.f6410);
        c4545.m9607();
        int iM9607 = c4545.m9607();
        this.f13342 = iM9607;
        int i2 = c1597.f6411;
        int i3 = c1597.f6409;
        int i4 = (((i3 - (i2 * 4)) * 8) / (c1597.f6412 * i2)) + 1;
        if (iM9607 != i4) {
            throw ParserException.m357("Expected frames per block: " + i4 + "; got: " + iM9607, null);
        }
        int iM3265 = AbstractC0956.m3265(iMax, iM9607);
        this.f13336 = new byte[iM3265 * i3];
        this.f13344 = new C4545(iM9607 * 2 * i2 * iM3265);
        int i5 = ((i3 * i) * 8) / iM9607;
        C4753 c4753 = new C4753();
        c4753.f18101 = AbstractC4208.m9132("audio/raw");
        c4753.f18099 = i5;
        c4753.f18128 = i5;
        c4753.f18116 = iMax * 2 * i2;
        c4753.f18090 = i2;
        c4753.f18113 = i;
        c4753.f18095 = 2;
        this.f13334 = new C5286(c4753);
    }

    /* JADX WARN: Removed duplicated region for block: B:43:0x0045 A[ADDED_TO_REGION, EDGE_INSN: B:43:0x0045->B:14:0x0045 BREAK  A[LOOP:0: B:6:0x0023->B:13:0x003f], REMOVE, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:8:0x0027  */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:11:0x003c -> B:4:0x0020). Please report as a decompilation issue!!! */
    /*  JADX ERROR: JadxOverflowException in pass: RegionMakerVisitor
        jadx.core.utils.exceptions.JadxOverflowException: Regions count limit reached
        	at jadx.core.utils.ErrorsCounter.addError(ErrorsCounter.java:59)
        	at jadx.core.utils.ErrorsCounter.error(ErrorsCounter.java:31)
        	at jadx.core.dex.attributes.nodes.NotificationAttrNode.addError(NotificationAttrNode.java:19)
        */
    @Override // defpackage.InterfaceC3802
    /* JADX INFO: renamed from: ʽˈˋ */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final boolean mo5204(defpackage.InterfaceC5206 r25, long r26) {
        /*
            Method dump skipped, instruction units count: 327
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: defpackage.C3458.mo5204(ᵻᵗᵻ, long):boolean");
    }

    @Override // defpackage.InterfaceC3802
    /* JADX INFO: renamed from: ːˏᵟᵯ */
    public final void mo5205(long j, int i) {
        C1977 c1977 = new C1977(this.f13335, this.f13342, i, j);
        this.f13339.mo2739(c1977);
        C5286 c5286 = this.f13334;
        InterfaceC5226 interfaceC5226 = this.f13333;
        interfaceC5226.mo1742(c5286);
        interfaceC5226.mo1743(c1977.f7844);
    }

    @Override // defpackage.InterfaceC3802
    /* JADX INFO: renamed from: ᵲᵶᵳˈ */
    public final void mo5206(long j) {
        this.f13343 = 0;
        this.f13338 = j;
        this.f13341 = 0;
        this.f13337 = 0L;
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final void m7894(int i) {
        long j = this.f13338;
        long j2 = this.f13337;
        C1597 c1597 = this.f13335;
        long j3 = c1597.f6408;
        String str = AbstractC0956.f4222;
        long jM3218 = j + AbstractC0956.m3218(j2, 1000000L, j3, RoundingMode.DOWN);
        int i2 = i * 2 * c1597.f6411;
        this.f13333.mo1741(jM3218, 1, i2, this.f13341 - i2, null);
        this.f13337 += (long) i;
        this.f13341 -= i2;
    }
}
