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

import p138.p176.p177.p190.C3431;
import p138.p176.p177.p190.p198.C3569;
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 C3671 implements InterfaceC3660 {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final C4140 f11269;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final C3569 f11270;

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public final String f11271;

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

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

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

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

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

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

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

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

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

    public C3671(String str) {
        C4140 c4140 = new C4140(4);
        this.f11269 = c4140;
        c4140.f13227[0] = -1;
        this.f11270 = new C3569();
        this.f11271 = str;
    }

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

    @Override // p138.p176.p177.p190.p198.p207.InterfaceC3660
    /* JADX INFO: renamed from: ֏ */
    public void mo5998(long j, int i) {
        this.f11280 = j;
    }

    @Override // p138.p176.p177.p190.p198.p207.InterfaceC3660
    /* JADX INFO: renamed from: ֏ */
    public void mo5999(InterfaceC3562 interfaceC3562, InterfaceC3690.C3694 c3694) {
        c3694.m6035();
        this.f11272 = c3694.m6036();
        this.f11273 = interfaceC3562.mo5891(c3694.m6037(), 1);
    }

    @Override // p138.p176.p177.p190.p198.p207.InterfaceC3660
    /* JADX INFO: renamed from: ֏ */
    public void mo6000(C4140 c4140) {
        while (c4140.m6679() > 0) {
            int i = this.f11274;
            if (i == 0) {
                byte[] bArr = c4140.f13227;
                int i2 = c4140.f13228;
                int i3 = c4140.f13229;
                while (true) {
                    if (i2 >= i3) {
                        c4140.m6693(i3);
                        break;
                    }
                    boolean z = (bArr[i2] & 255) == 255;
                    boolean z2 = this.f11277 && (bArr[i2] & 224) == 224;
                    this.f11277 = z;
                    if (z2) {
                        c4140.m6693(i2 + 1);
                        this.f11277 = false;
                        this.f11269.f13227[1] = bArr[i2];
                        this.f11275 = 2;
                        this.f11274 = 1;
                        break;
                    }
                    i2++;
                }
            } else if (i == 1) {
                int iMin = Math.min(c4140.m6679(), 4 - this.f11275);
                c4140.m6685(this.f11269.f13227, this.f11275, iMin);
                int i4 = this.f11275 + iMin;
                this.f11275 = i4;
                if (i4 >= 4) {
                    this.f11269.m6693(0);
                    if (C3569.m5903(this.f11269.m6688(), this.f11270)) {
                        C3569 c3569 = this.f11270;
                        this.f11279 = c3569.f10586;
                        if (!this.f11276) {
                            long j = ((long) c3569.f10590) * 1000000;
                            int i5 = c3569.f10587;
                            this.f11278 = j / ((long) i5);
                            this.f11273.mo5884(C3431.m5585(this.f11272, c3569.f10585, null, -1, 4096, c3569.f10588, i5, null, null, 0, this.f11271));
                            this.f11276 = true;
                        }
                        this.f11269.m6693(0);
                        this.f11273.mo5885(this.f11269, 4);
                        this.f11274 = 2;
                    } else {
                        this.f11275 = 0;
                        this.f11274 = 1;
                    }
                }
            } else {
                if (i != 2) {
                    throw new IllegalStateException();
                }
                int iMin2 = Math.min(c4140.m6679(), this.f11279 - this.f11275);
                this.f11273.mo5885(c4140, iMin2);
                int i6 = this.f11275 + iMin2;
                this.f11275 = i6;
                int i7 = this.f11279;
                if (i6 >= i7) {
                    this.f11273.mo5883(this.f11280, 1, i7, 0, null);
                    this.f11280 += this.f11278;
                    this.f11275 = 0;
                    this.f11274 = 0;
                }
            }
        }
    }

    @Override // p138.p176.p177.p190.p198.p207.InterfaceC3660
    /* JADX INFO: renamed from: ؠ */
    public void mo6001() {
    }
}
