package defpackage;

import java.math.RoundingMode;

/* JADX INFO: renamed from: ˈˈˈᐧ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C1047 implements InterfaceC0728 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final C3180 f4514 = new C3180(1);

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public InterfaceC5226 f4515;

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

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final int f4517;

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

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public long f4519;

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

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

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

    public C1047(C3176 c3176) {
        this.f4518 = c3176;
        this.f4516 = c3176.f12056;
        String str = (String) c3176.f12060.get("mode");
        str.getClass();
        if (ᵻᵕᵭ.ᵱᵽʡᵚ(str, "AAC-hbr")) {
            this.f4520 = 13;
            this.f4517 = 3;
        } else {
            if (!ᵻᵕᵭ.ᵱᵽʡᵚ(str, "AAC-lbr")) {
                C4468.m9515("AAC mode not supported");
                throw null;
            }
            this.f4520 = 6;
            this.f4517 = 2;
        }
        this.f4522 = this.f4517 + this.f4520;
    }

    @Override // defpackage.InterfaceC0728
    /* JADX INFO: renamed from: ʽˈˋ */
    public final void mo2599(long j, long j2) {
        this.f4519 = j;
        this.f4521 = j2;
    }

    @Override // defpackage.InterfaceC0728
    /* JADX INFO: renamed from: ːˏᵟᵯ */
    public final void mo2600(InterfaceC4550 interfaceC4550, int i) {
        InterfaceC5226 interfaceC5226Mo2743 = interfaceC4550.mo2743(i, 1);
        this.f4515 = interfaceC5226Mo2743;
        interfaceC5226Mo2743.mo1742(this.f4518.f12057);
    }

    @Override // defpackage.InterfaceC0728
    /* JADX INFO: renamed from: ᵲᵶᵳˈ */
    public final void mo2601(long j) {
        this.f4519 = j;
    }

    @Override // defpackage.InterfaceC0728
    /* JADX INFO: renamed from: ᵷᵺʾᵖ */
    public final void mo2602(C4545 c4545, long j, int i, boolean z) {
        this.f4515.getClass();
        short sM9611 = c4545.m9611();
        int i2 = sM9611 / this.f4522;
        long j2 = ᵸᵺᵜ.ˁˌᵩ(this.f4516, this.f4521, j, this.f4519);
        C3180 c3180 = this.f4514;
        c3180.m7294(c4545);
        int i3 = this.f4517;
        int i4 = this.f4520;
        if (i2 == 1) {
            int iM7302 = c3180.m7302(i4);
            c3180.m7287(i3);
            this.f4515.mo1740(c4545.m9623(), c4545);
            if (z) {
                this.f4515.mo1741(j2, 1, iM7302, 0, null);
                return;
            }
            return;
        }
        c4545.m9609((sM9611 + 7) / 8);
        long jM3218 = j2;
        for (int i5 = 0; i5 < i2; i5++) {
            int iM73022 = c3180.m7302(i4);
            c3180.m7287(i3);
            this.f4515.mo1740(iM73022, c4545);
            this.f4515.mo1741(jM3218, 1, iM73022, 0, null);
            jM3218 += AbstractC0956.m3218(i2, 1000000L, this.f4516, RoundingMode.DOWN);
        }
    }
}
