package defpackage;

import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.HashMap;

/* renamed from: ᵥᵕ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C3512 {

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public final Object f13173;

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public Object f13174;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public Object f13175;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public int f13176;

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

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

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public int f13179;

    public C3512(C2468 c2468) {
        this.f13177 = 0;
        this.f13178 = 1;
        this.f13173 = c2468;
        this.f13175 = c2468;
    }

    public C3512(C5515 c5515, Object[] objArr, StringBuilder sb) {
        this.f13177 = 2;
        this.f13178 = 0;
        this.f13176 = -1;
        ˋᵮᵯᵔ.ᵾᵬ(c5515, "context");
        this.f13173 = c5515;
        this.f13179 = 0;
        this.f13175 = objArr;
        this.f13174 = sb;
    }

    public C3512(int[] iArr) {
        this.f13177 = 1;
        this.f13173 = iArr;
        C4176 c4176 = new C4176(-1, -1);
        this.f13175 = c4176;
        this.f13174 = c4176;
    }

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public static void m8027(StringBuilder sb, Object obj, String str) {
        sb.append("[INVALID: format=");
        sb.append(str);
        sb.append(", type=");
        sb.append(obj.getClass().getCanonicalName());
        sb.append(", value=");
        sb.append(AbstractC4313.m9290(obj));
        sb.append("]");
    }

    public String toString() {
        switch (this.f13177) {
            case 1:
                StringBuilder sb = new StringBuilder("digraph {\n");
                m8030((C4176) this.f13175, sb);
                sb.append("}");
                return sb.toString();
            default:
                return super.toString();
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:106:0x012a  */
    /* JADX WARN: Removed duplicated region for block: B:14:0x0027  */
    /* JADX WARN: Removed duplicated region for block: B:15:0x0029  */
    /* JADX WARN: Removed duplicated region for block: B:64:0x0092  */
    /* 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 void m8028(java.lang.Object r8, defpackage.EnumC2871 r9, defpackage.C2797 r10) throws java.io.IOException {
        /*
            Method dump skipped, instructions count: 457
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: defpackage.C3512.m8028(java.lang.Object, ᵝʨ, ᵜʾ):void");
    }

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public boolean m8029(int i, int i2, int i3, int i4) {
        if (i < 0 || i3 < 0) {
            return false;
        }
        int[] iArr = (int[]) this.f13173;
        int length = iArr.length;
        int iMin = Math.min(length, i2);
        if (iMin - i != Math.min(length, i4) - i3) {
            return false;
        }
        for (int i5 = i; i5 <= iMin; i5++) {
            if (iArr[i5] != iArr[(i3 + i5) - i]) {
                return false;
            }
        }
        return true;
    }

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public void m8030(C4176 c4176, StringBuilder sb) {
        for (C4176 c41762 : c4176.f15609.values()) {
            sb.append("  ");
            sb.append(c4176);
            sb.append(" -> ");
            sb.append(c41762);
            sb.append(" [label=\"");
            int[] iArr = (int[]) this.f13173;
            sb.append(Arrays.toString(Arrays.copyOfRange(iArr, c41762.f15607, Math.min(iArr.length, c41762.f15608 + 1))));
            sb.append("\"]\n");
            m8030(c41762, sb);
        }
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public void m8031() {
        if (this.f13176 == 0) {
            return;
        }
        HashMap map = ((C4176) this.f13174).f15609;
        int[] iArr = (int[]) this.f13173;
        C4176 c4176 = (C4176) map.get(Integer.valueOf(iArr[this.f13178]));
        while (true) {
            int i = (c4176.f15608 - c4176.f15607) + 1;
            int i2 = this.f13176;
            if (i > i2) {
                return;
            }
            int i3 = this.f13178 + i;
            this.f13178 = i3;
            this.f13174 = c4176;
            int i4 = i2 - i;
            this.f13176 = i4;
            if (i4 > 0) {
                c4176 = (C4176) c4176.f15609.get(Integer.valueOf(iArr[i3]));
            }
        }
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public void m8032() {
        this.f13178 = 1;
        this.f13175 = (C2468) this.f13173;
        this.f13179 = 0;
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public boolean m8033() {
        C0592 c0592M7728 = ((C2468) this.f13175).f9639.m7728();
        int iM9853 = c0592M7728.m9853(6);
        return !(iM9853 == 0 || ((ByteBuffer) c0592M7728.f17274).get(iM9853 + c0592M7728.f17273) == 0) || this.f13176 == 65039;
    }

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public void m8034() {
        C4176 c4176 = ((C4176) this.f13174).f15606;
        if (c4176 != null) {
            this.f13174 = c4176;
        } else {
            this.f13174 = (C4176) this.f13175;
            int i = this.f13176;
            if (i > 0) {
                this.f13176 = i - 1;
            }
            if (this.f13179 > 0) {
                this.f13178++;
            }
        }
        m8031();
    }
}
