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

import android.util.Log;
import p138.p176.p177.p190.C3431;
import p138.p176.p177.p190.p194.C3526;
import p138.p176.p177.p190.p198.InterfaceC3562;
import p138.p176.p177.p190.p198.InterfaceC3575;
import p138.p176.p177.p190.p198.p207.InterfaceC3690;
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 C3669 implements InterfaceC3660 {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final C4140 f11243 = new C4140(10);

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public InterfaceC3575 f11244;

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public boolean f11245;

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public long f11246;

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public int f11247;

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public int f11248;

    @Override // p138.p176.p177.p190.p198.p207.InterfaceC3660
    /* JADX INFO: renamed from: ֏ */
    public void mo5997() {
        this.f11245 = false;
    }

    @Override // p138.p176.p177.p190.p198.p207.InterfaceC3660
    /* JADX INFO: renamed from: ֏ */
    public void mo5998(long j, int i) {
        if ((i & 4) == 0) {
            return;
        }
        this.f11245 = true;
        this.f11246 = j;
        this.f11247 = 0;
        this.f11248 = 0;
    }

    @Override // p138.p176.p177.p190.p198.p207.InterfaceC3660
    /* JADX INFO: renamed from: ֏ */
    public void mo5999(InterfaceC3562 interfaceC3562, InterfaceC3690.C3694 c3694) {
        c3694.m6035();
        InterfaceC3575 interfaceC3575Mo5891 = interfaceC3562.mo5891(c3694.m6037(), 4);
        this.f11244 = interfaceC3575Mo5891;
        interfaceC3575Mo5891.mo5884(C3431.m5589(c3694.m6036(), "application/id3", (String) null, -1, (C3526) null));
    }

    @Override // p138.p176.p177.p190.p198.p207.InterfaceC3660
    /* JADX INFO: renamed from: ֏ */
    public void mo6000(C4140 c4140) {
        if (this.f11245) {
            int iM6679 = c4140.m6679();
            int i = this.f11248;
            if (i < 10) {
                int iMin = Math.min(iM6679, 10 - i);
                System.arraycopy(c4140.f13227, c4140.f13228, this.f11243.f13227, this.f11248, iMin);
                if (this.f11248 + iMin == 10) {
                    this.f11243.m6693(0);
                    if (73 != this.f11243.m6702() || 68 != this.f11243.m6702() || 51 != this.f11243.m6702()) {
                        Log.w("Id3Reader", "Discarding invalid ID3 tag");
                        this.f11245 = false;
                        return;
                    } else {
                        this.f11243.m6695(3);
                        this.f11247 = this.f11243.m6701() + 10;
                    }
                }
            }
            int iMin2 = Math.min(iM6679, this.f11247 - this.f11248);
            this.f11244.mo5885(c4140, iMin2);
            this.f11248 += iMin2;
        }
    }

    @Override // p138.p176.p177.p190.p198.p207.InterfaceC3660
    /* JADX INFO: renamed from: ؠ */
    public void mo6001() {
        int i;
        if (this.f11245 && (i = this.f11247) != 0 && this.f11248 == i) {
            this.f11244.mo5883(this.f11246, 1, i, 0, null);
            this.f11245 = false;
        }
    }
}
