package defpackage;

import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.graphics.Shader;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.security.keystore.KeyGenParameterSpec;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.util.Xml;
import android.widget.ImageView;
import androidx.media3.common.ParserException;
import androidx.media3.exoplayer.rtsp.RtspMediaSource$RtspPlaybackException;
import com.hierynomus.smbj.common.SMBRuntimeException;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.ByteOrder;
import java.security.GeneralSecurityException;
import java.security.InvalidKeyException;
import java.security.KeyStore;
import java.security.NoSuchAlgorithmException;
import java.security.ProviderException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicInteger;
import javax.crypto.KeyGenerator;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import org.xmlpull.v1.XmlPullParserException;

/* JADX INFO: renamed from: ˊᵱᵝᵭ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C1404 implements InterfaceC4978 {

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public final /* synthetic */ int f5806;

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public Object f5807;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public int f5808;

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public Object f5809;

    public C1404(byte b, int i) {
        this.f5806 = i;
        switch (i) {
            case 9:
                this.f5809 = new ByteArrayOutputStream(4096);
                try {
                    Mac mac = Mac.getInstance("HmacSHA1");
                    this.f5807 = mac;
                    this.f5808 = mac.getMacLength();
                    return;
                } catch (NoSuchAlgorithmException e) {
                    C4935.m10238(e);
                    throw null;
                }
            default:
                this.f5807 = "    ";
                this.f5809 = "type";
                this.f5808 = 3;
                return;
        }
    }

    public /* synthetic */ C1404(char c, int i) {
        this.f5806 = i;
    }

    public C1404(int i) {
        this.f5806 = 6;
        this.f5807 = new Object[i * 2];
        this.f5808 = 0;
    }

    public /* synthetic */ C1404(int i, int i2, Object obj, String str) {
        this.f5806 = i2;
        this.f5807 = obj;
        this.f5808 = i;
        this.f5809 = str;
    }

    public C1404(int i, String str, ArrayList arrayList, ArrayList arrayList2) {
        this.f5806 = 21;
        this.f5808 = i;
        this.f5809 = str;
        this.f5807 = arrayList;
    }

    public C1404(int i, C1527 c1527, String str) {
        this.f5806 = 15;
        this.f5808 = i;
        this.f5807 = c1527;
        this.f5809 = str;
    }

    public C1404(Context context) {
        this.f5806 = 10;
        context.getApplicationContext();
        this.f5807 = "_androidx_security_master_key_";
    }

    public C1404(Shader shader, ColorStateList colorStateList, int i) {
        this.f5806 = 2;
        this.f5807 = shader;
        this.f5809 = colorStateList;
        this.f5808 = i;
    }

    public C1404(ImageView imageView) {
        this.f5806 = 0;
        this.f5808 = 0;
        this.f5807 = imageView;
    }

    public C1404(CopyOnWriteArrayList copyOnWriteArrayList, int i, C4100 c4100) {
        this.f5806 = 12;
        this.f5809 = copyOnWriteArrayList;
        this.f5808 = i;
        this.f5807 = c4100;
    }

    public C1404(C0063 c0063, int i) {
        this.f5806 = 5;
        this.f5807 = c0063;
        this.f5808 = i;
        this.f5809 = new C2669();
    }

    public C1404(InterfaceC1479 interfaceC1479) {
        this.f5806 = 3;
        ˁʢᵛ r0 = new ˁʢᵛ();
        r0.ᵔᵖᵹᵫ = new ᵱᵻᵧᵷ();
        r0.ᵜᵪʾ = 3;
        this.f5809 = r0;
        this.f5807 = interfaceC1479;
        this.f5808 = 1;
    }

    public C1404(C1863 c1863) {
        this.f5806 = 14;
        this.f5809 = c1863;
    }

    public C1404(C2989 c2989) {
        this.f5806 = 16;
        this.f5807 = new AtomicInteger();
        this.f5808 = 16384;
        this.f5809 = c2989;
    }

    public C1404(ᵷᵝˎ r2) {
        this.f5806 = 17;
        this.f5807 = new SparseArray();
        this.f5809 = r2;
        this.f5808 = -1;
    }

    public C1404(C4923 c4923) {
        this.f5806 = 4;
        this.f5809 = AbstractC2765.m6673(150, new ᵟˑʽ(this));
        this.f5807 = c4923;
    }

    /* JADX WARN: Code restructure failed: missing block: B:100:0x01f5, code lost:
    
        if (r11 == 1) goto L112;
     */
    /* JADX WARN: Code restructure failed: missing block: B:102:0x01f8, code lost:
    
        if (r11 == 2) goto L111;
     */
    /* JADX WARN: Code restructure failed: missing block: B:103:0x01fa, code lost:
    
        r16 = (int[]) r0.f3433;
        r17 = (float[]) r0.f3432;
     */
    /* JADX WARN: Code restructure failed: missing block: B:104:0x0208, code lost:
    
        if (r10 == 1) goto L109;
     */
    /* JADX WARN: Code restructure failed: missing block: B:105:0x020a, code lost:
    
        if (r10 == 2) goto L108;
     */
    /* JADX WARN: Code restructure failed: missing block: B:106:0x020c, code lost:
    
        r0 = android.graphics.Shader.TileMode.CLAMP;
     */
    /* JADX WARN: Code restructure failed: missing block: B:108:0x0219, code lost:
    
        r0 = android.graphics.Shader.TileMode.MIRROR;
     */
    /* JADX WARN: Code restructure failed: missing block: B:109:0x021c, code lost:
    
        r0 = android.graphics.Shader.TileMode.REPEAT;
     */
    /* JADX WARN: Code restructure failed: missing block: B:110:0x021f, code lost:
    
        r11 = new android.graphics.LinearGradient(r21, r22, r26, r27, r16, r17, r0);
     */
    /* JADX WARN: Code restructure failed: missing block: B:111:0x0223, code lost:
    
        r11 = new android.graphics.SweepGradient(r8, r9, (int[]) r0.f3433, (float[]) r0.f3432);
     */
    /* JADX WARN: Code restructure failed: missing block: B:113:0x0235, code lost:
    
        if (r25 <= 0.0f) goto L125;
     */
    /* JADX WARN: Code restructure failed: missing block: B:114:0x0237, code lost:
    
        r20 = (int[]) r0.f3433;
        r21 = (float[]) r0.f3432;
     */
    /* JADX WARN: Code restructure failed: missing block: B:115:0x0246, code lost:
    
        if (r10 == 1) goto L121;
     */
    /* JADX WARN: Code restructure failed: missing block: B:117:0x0249, code lost:
    
        if (r10 == 2) goto L120;
     */
    /* JADX WARN: Code restructure failed: missing block: B:118:0x024b, code lost:
    
        r0 = android.graphics.Shader.TileMode.CLAMP;
     */
    /* JADX WARN: Code restructure failed: missing block: B:120:0x0256, code lost:
    
        r0 = android.graphics.Shader.TileMode.MIRROR;
     */
    /* JADX WARN: Code restructure failed: missing block: B:121:0x0259, code lost:
    
        r0 = android.graphics.Shader.TileMode.REPEAT;
     */
    /* JADX WARN: Code restructure failed: missing block: B:122:0x025c, code lost:
    
        r11 = new android.graphics.RadialGradient(r8, r9, r25, r20, r21, r0);
     */
    /* JADX WARN: Code restructure failed: missing block: B:124:0x0268, code lost:
    
        return new defpackage.C1404(r11, (android.content.res.ColorStateList) null, 0);
     */
    /* JADX WARN: Code restructure failed: missing block: B:126:0x0270, code lost:
    
        throw new org.xmlpull.v1.XmlPullParserException("<gradient> tag requires 'gradientRadius' attribute with radial type");
     */
    /* JADX WARN: Code restructure failed: missing block: B:92:0x01da, code lost:
    
        if (r13.size() <= 0) goto L94;
     */
    /* JADX WARN: Code restructure failed: missing block: B:93:0x01dc, code lost:
    
        r0 = new defpackage.C0767(r13, r7);
     */
    /* JADX WARN: Code restructure failed: missing block: B:94:0x01e2, code lost:
    
        r0 = null;
     */
    /* JADX WARN: Code restructure failed: missing block: B:95:0x01e3, code lost:
    
        if (r0 == null) goto L97;
     */
    /* JADX WARN: Code restructure failed: missing block: B:97:0x01e7, code lost:
    
        if (r20 == false) goto L99;
     */
    /* JADX WARN: Code restructure failed: missing block: B:98:0x01e9, code lost:
    
        r0 = new defpackage.C0767(r6, r5, r12);
     */
    /* JADX WARN: Code restructure failed: missing block: B:99:0x01ef, code lost:
    
        r0 = new defpackage.C0767(r6, r12);
     */
    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static C1404 m4025(Resources resources, int i, Resources.Theme theme) throws XmlPullParserException, IOException {
        int next;
        float f;
        int color;
        float f2;
        int i2;
        float f3;
        XmlResourceParser xml = resources.getXml(i);
        AttributeSet attributeSetAsAttributeSet = Xml.asAttributeSet(xml);
        do {
            next = xml.next();
            if (next == 2) {
                break;
            }
        } while (next != 1);
        if (next != 2) {
            throw new XmlPullParserException("No start tag found");
        }
        String name = xml.getName();
        name.getClass();
        if (!name.equals("gradient")) {
            if (name.equals("selector")) {
                ColorStateList colorStateListM10401 = AbstractC5074.m10401(resources, xml, attributeSetAsAttributeSet, theme);
                return new C1404((Shader) null, colorStateListM10401, colorStateListM10401.getDefaultColor());
            }
            throw new XmlPullParserException(xml.getPositionDescription() + ": unsupported complex color tag " + name);
        }
        String name2 = xml.getName();
        if (!name2.equals("gradient")) {
            throw new XmlPullParserException(xml.getPositionDescription() + ": invalid gradient color tag " + name2);
        }
        TypedArray typedArray = ᵫﾞˌ.ˉᵲ(resources, theme, attributeSetAsAttributeSet, AbstractC2350.f9221);
        float f4 = xml.getAttributeValue("http://schemas.android.com/apk/res/android", "startX") != null ? typedArray.getFloat(8, 0.0f) : 0.0f;
        float f5 = xml.getAttributeValue("http://schemas.android.com/apk/res/android", "startY") != null ? typedArray.getFloat(9, 0.0f) : 0.0f;
        float f6 = xml.getAttributeValue("http://schemas.android.com/apk/res/android", "endX") != null ? typedArray.getFloat(10, 0.0f) : 0.0f;
        float f7 = xml.getAttributeValue("http://schemas.android.com/apk/res/android", "endY") != null ? typedArray.getFloat(11, 0.0f) : 0.0f;
        float f8 = xml.getAttributeValue("http://schemas.android.com/apk/res/android", "centerX") != null ? typedArray.getFloat(3, 0.0f) : 0.0f;
        float f9 = xml.getAttributeValue("http://schemas.android.com/apk/res/android", "centerY") != null ? typedArray.getFloat(4, 0.0f) : 0.0f;
        int i3 = xml.getAttributeValue("http://schemas.android.com/apk/res/android", "type") != null ? typedArray.getInt(2, 0) : 0;
        int color2 = xml.getAttributeValue("http://schemas.android.com/apk/res/android", "startColor") != null ? typedArray.getColor(0, 0) : 0;
        boolean z = xml.getAttributeValue("http://schemas.android.com/apk/res/android", "centerColor") != null;
        int color3 = xml.getAttributeValue("http://schemas.android.com/apk/res/android", "centerColor") != null ? typedArray.getColor(7, 0) : 0;
        if (xml.getAttributeValue("http://schemas.android.com/apk/res/android", "endColor") != null) {
            f = f4;
            color = typedArray.getColor(1, 0);
        } else {
            f = f4;
            color = 0;
        }
        if (xml.getAttributeValue("http://schemas.android.com/apk/res/android", "tileMode") != null) {
            f2 = f5;
            i2 = typedArray.getInt(6, 0);
        } else {
            f2 = f5;
            i2 = 0;
        }
        float f10 = xml.getAttributeValue("http://schemas.android.com/apk/res/android", "gradientRadius") != null ? typedArray.getFloat(5, 0.0f) : 0.0f;
        typedArray.recycle();
        int depth = xml.getDepth() + 1;
        ArrayList arrayList = new ArrayList(20);
        float f11 = f10;
        ArrayList arrayList2 = new ArrayList(20);
        while (true) {
            int next2 = xml.next();
            float f12 = f6;
            if (next2 == 1) {
                f3 = f7;
                break;
            }
            int depth2 = xml.getDepth();
            f3 = f7;
            if (depth2 < depth && next2 == 3) {
                break;
            }
            if (next2 == 2 && depth2 <= depth && xml.getName().equals("item")) {
                TypedArray typedArray2 = ᵫﾞˌ.ˉᵲ(resources, theme, attributeSetAsAttributeSet, AbstractC2350.f9224);
                boolean zHasValue = typedArray2.hasValue(0);
                boolean zHasValue2 = typedArray2.hasValue(1);
                if (!zHasValue || !zHasValue2) {
                    break;
                }
                int color4 = typedArray2.getColor(0, 0);
                float f13 = typedArray2.getFloat(1, 0.0f);
                typedArray2.recycle();
                arrayList2.add(Integer.valueOf(color4));
                arrayList.add(Float.valueOf(f13));
            }
            f6 = f12;
            f7 = f3;
        }
        throw new XmlPullParserException(xml.getPositionDescription() + ": <item> tag requires a 'color' attribute and a 'offset' attribute!");
    }

    public String toString() {
        switch (this.f5806) {
            case C5224.DOUBLE_FIELD_NUMBER /* 7 */:
                StringBuilder sb = new StringBuilder("JsonConfiguration(encodeDefaults=false, ignoreUnknownKeys=false, isLenient=false, allowStructuredMapKeys=false, prettyPrint=false, explicitNulls=true, prettyPrintIndent='");
                sb.append((String) this.f5807);
                sb.append("', coerceInputValues=false, useArrayPolymorphism=false, classDiscriminator='");
                sb.append((String) this.f5809);
                sb.append("', allowSpecialFloatingPointValues=false, useAlternativeNames=true, namingStrategy=null, decodeEnumsCaseInsensitive=false, allowTrailingComma=false, allowComments=false, classDiscriminatorMode=");
                int i = this.f5808;
                sb.append(i != 1 ? i != 2 ? i != 3 ? "null" : "POLYMORPHIC" : "ALL_JSON_OBJECTS" : "NONE");
                sb.append(')');
                return sb.toString();
            case C5224.BYTES_FIELD_NUMBER /* 8 */:
                return m4038();
            case 18:
                StringBuilder sb2 = new StringBuilder();
                if (((EnumC0876) this.f5807) == EnumC0876.f3877) {
                    sb2.append("HTTP/1.0");
                } else {
                    sb2.append("HTTP/1.1");
                }
                sb2.append(' ');
                sb2.append(this.f5808);
                sb2.append(' ');
                sb2.append((String) this.f5809);
                return sb2.toString();
            default:
                return super.toString();
        }
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public void m4026() {
        C2531 c2531;
        ImageView imageView = (ImageView) this.f5807;
        Drawable drawable = imageView.getDrawable();
        if (drawable != null) {
            AbstractC0912.m3160(drawable);
        }
        if (drawable == null || (c2531 = (C2531) this.f5809) == null) {
            return;
        }
        C0359.m1681(drawable, c2531, imageView.getDrawableState());
    }

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public int m4027(byte[] bArr, byte[] bArr2) throws IOException {
        C2989 c2989 = (C2989) this.f5809;
        C4927 c4927 = (C4927) c2989.m10941(new C3847(c2989.f20254, c2989.f20255, c2989.f11517.f5278.f19713, 1163287L, c2989.f11518, new C4633(bArr.length, bArr), c2989.f11515), C2989.f11514);
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(4096);
        try {
            byteArrayOutputStream.write(c4927.f18727);
            if (EnumC0878.m3075(((C2964) ((InterfaceC2684) ((ᵜᵪʾ) c4927).ˌᴵ)).f11408).equals(EnumC0878.f3883)) {
                byteArrayOutputStream.write(c2989.m7063());
            }
            byte[] byteArray = byteArrayOutputStream.toByteArray();
            System.arraycopy(byteArray, 0, bArr2, 0, byteArray.length);
            return byteArray.length;
        } catch (IOException e) {
            throw new SMBRuntimeException(e);
        }
    }

    /* JADX INFO: renamed from: ˉᵲ, reason: contains not printable characters */
    public void m4028(C3622 c3622, int i, int i2, C5286 c5286, int i3, Object obj, long j, long j2) {
        m4031(new C1539(this, c3622, new C0990(i, i2, c5286, i3, obj, AbstractC0956.m3264(j), AbstractC0956.m3264(j2)), 0));
    }

    /* JADX INFO: renamed from: ˊᵙᵾᵲ, reason: contains not printable characters */
    public void m4029(C3622 c3622, int i) {
        m4028(c3622, i, -1, null, 0, null, -9223372036854775807L, -9223372036854775807L);
    }

    /* JADX INFO: renamed from: ˊᵨᵧ, reason: contains not printable characters */
    public void m4030(C3622 c3622, int i, IOException iOException, boolean z) {
        m4035(c3622, i, -1, null, 0, null, -9223372036854775807L, -9223372036854775807L, iOException, z);
    }

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public void m4031(InterfaceC3498 interfaceC3498) {
        for (C3707 c3707 : (CopyOnWriteArrayList) this.f5809) {
            AbstractC0956.m3251(c3707.f14121, new RunnableC2093(interfaceC3498, 5, c3707.f14120));
        }
    }

    /* JADX INFO: renamed from: ˋˈ, reason: contains not printable characters */
    public C2156 m4032(int i, String str, Map map, Uri uri) {
        C1863 c1863 = (C1863) this.f5809;
        String str2 = c1863.f7383;
        int i2 = this.f5808;
        this.f5808 = i2 + 1;
        ᵢʒʡᵟ r0 = new ᵢʒʡᵟ(i2, str2, str);
        if (c1863.f7375 != null) {
            c1863.f7382.getClass();
            try {
                r0.ʿٴˇ("Authorization", c1863.f7375.ᵲᵶᵳˈ(c1863.f7382, uri, i));
            } catch (ParserException e) {
                C1863.m5057(c1863, new RtspMediaSource$RtspPlaybackException(e));
            }
        }
        for (Map.Entry entry : map.entrySet()) {
            r0.ʿٴˇ((String) entry.getKey(), (String) entry.getValue());
        }
        return new C2156(uri, i, new C1527(r0), "");
    }

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public void m4033(AttributeSet attributeSet, int i) {
        int resourceId;
        ImageView imageView = (ImageView) this.f5807;
        Context context = imageView.getContext();
        int[] iArr = AbstractC0430.f2403;
        C5398 c5398M11010 = C5398.m11010(context, attributeSet, iArr, i);
        TypedArray typedArray = (TypedArray) c5398M11010.f20483;
        AbstractC2746.m6646(imageView, imageView.getContext(), iArr, attributeSet, (TypedArray) c5398M11010.f20483, i);
        try {
            Drawable drawable = imageView.getDrawable();
            if (drawable == null && (resourceId = typedArray.getResourceId(1, -1)) != -1 && (drawable = ᵥˇᵛˎ.ᵶˇᵱ(imageView.getContext(), resourceId)) != null) {
                imageView.setImageDrawable(drawable);
            }
            if (drawable != null) {
                AbstractC0912.m3160(drawable);
            }
            if (typedArray.hasValue(2)) {
                imageView.setImageTintList(c5398M11010.m11016(2));
            }
            if (typedArray.hasValue(3)) {
                imageView.setImageTintMode(AbstractC0912.m3159(typedArray.getInt(3, -1), null));
            }
            c5398M11010.m11012();
        } catch (Throwable th) {
            c5398M11010.m11012();
            throw th;
        }
    }

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public void m4034(byte[] bArr, int i, int i2) {
        ByteArrayOutputStream byteArrayOutputStream = (ByteArrayOutputStream) this.f5809;
        try {
            if (byteArrayOutputStream.size() + i2 > 4096) {
                m4051(0);
            }
            byteArrayOutputStream.write(bArr, i, i2);
        } catch (IllegalStateException e) {
            C4935.m10238(e);
        }
    }

    /* JADX INFO: renamed from: ˏːˆ, reason: contains not printable characters */
    public void m4035(C3622 c3622, int i, int i2, C5286 c5286, int i3, Object obj, long j, long j2, IOException iOException, boolean z) {
        m4031(new C4984(this, c3622, new C0990(i, i2, c5286, i3, obj, AbstractC0956.m3264(j), AbstractC0956.m3264(j2)), iOException, z));
    }

    @Override // defpackage.InterfaceC4978
    /* JADX INFO: renamed from: ːˏᵟᵯ */
    public /* synthetic */ void mo2718() {
    }

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public void m4036(Object obj, Object obj2) {
        int i = (this.f5808 + 1) * 2;
        Object[] objArr = (Object[]) this.f5807;
        if (i > objArr.length) {
            this.f5807 = Arrays.copyOf(objArr, AbstractC3544.m8058(objArr.length, i));
        }
        ˑᵕʾ.ʽˈˋ(obj, obj2);
        Object[] objArr2 = (Object[]) this.f5807;
        int i2 = this.f5808;
        int i3 = i2 * 2;
        objArr2[i3] = obj;
        objArr2[i3 + 1] = obj2;
        this.f5808 = i2 + 1;
    }

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public void m4037(C3622 c3622, int i, int i2, C5286 c5286, int i3, Object obj, long j, long j2, int i4) {
        m4031(new C1173(this, c3622, new C0990(i, i2, c5286, i3, obj, AbstractC0956.m3264(j), AbstractC0956.m3264(j2)), i4));
    }

    /* JADX INFO: renamed from: ᵝᵶ, reason: contains not printable characters */
    public String m4038() {
        StringBuilder sb = new StringBuilder("$");
        int i = this.f5808 + 1;
        for (int i2 = 0; i2 < i; i2++) {
            Object obj = ((Object[]) this.f5807)[i2];
            if (obj instanceof InterfaceC1482) {
                InterfaceC1482 interfaceC1482 = (InterfaceC1482) obj;
                boolean z = ᵥˈᵛ.ˊᵫᵗ(interfaceC1482.mo1420(), C1430.f5854);
                int[] iArr = (int[]) this.f5809;
                if (!z) {
                    int i3 = iArr[i2];
                    if (i3 >= 0) {
                        sb.append(".");
                        sb.append(interfaceC1482.mo1423(i3));
                    }
                } else if (iArr[i2] != -1) {
                    sb.append("[");
                    sb.append(((int[]) this.f5809)[i2]);
                    sb.append("]");
                }
            } else if (obj != ᵠʽᵲ.ˈᵲᵢ) {
                sb.append("['");
                sb.append(obj);
                sb.append("']");
            }
        }
        return sb.toString();
    }

    /* JADX INFO: renamed from: ᵟᵹᵙ, reason: contains not printable characters */
    public boolean m4039() {
        ColorStateList colorStateList;
        return ((Shader) this.f5807) == null && (colorStateList = (ColorStateList) this.f5809) != null && colorStateList.isStateful();
    }

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public C0400 m4040() {
        if ("".isEmpty()) {
            return new C0400(((Long) this.f5809).longValue(), this.f5808, (String) this.f5807);
        }
        ᵕᵩʽᵲ.ᵪᵹᵥᵻ("Missing required properties:".concat(""));
        return null;
    }

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public void m4041(Set set) {
        if (AbstractC0793.m2860(set)) {
            int size = (set.size() + this.f5808) * 2;
            Object[] objArr = (Object[]) this.f5807;
            if (size > objArr.length) {
                this.f5807 = Arrays.copyOf(objArr, AbstractC3544.m8058(objArr.length, size));
            }
        }
        Iterator it = set.iterator();
        while (it.hasNext()) {
            Map.Entry entry = (Map.Entry) it.next();
            m4036(entry.getKey(), entry.getValue());
        }
    }

    /* JADX INFO: renamed from: ᵪᵹᵥᵻ, reason: contains not printable characters */
    public void m4042(byte[] bArr) {
        try {
            ((Mac) this.f5807).init(new SecretKeySpec(bArr, "HmacSHA1"));
        } catch (InvalidKeyException e) {
            C4935.m10238(e);
        }
    }

    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public Object m4043(int i) {
        SparseArray sparseArray = (SparseArray) this.f5807;
        if (this.f5808 == -1) {
            this.f5808 = 0;
        }
        while (true) {
            int i2 = this.f5808;
            if (i2 <= 0 || i >= sparseArray.keyAt(i2)) {
                break;
            }
            this.f5808--;
        }
        while (this.f5808 < sparseArray.size() - 1 && i >= sparseArray.keyAt(this.f5808 + 1)) {
            this.f5808++;
        }
        return sparseArray.valueAt(this.f5808);
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public void m4044() {
        ((C2156) this.f5807).getClass();
        C5525 c5525 = ((C2156) this.f5807).f8585.f6168;
        HashMap map = new HashMap();
        AbstractC0228 it = ((C0224) c5525.f20851.keySet()).iterator();
        while (true) {
            AbstractC3171 abstractC3171 = (AbstractC3171) it;
            if (!abstractC3171.hasNext()) {
                C2156 c2156 = (C2156) this.f5807;
                m4047(m4032(c2156.f8584, ((C1863) this.f5809).f7373, map, c2156.f8586));
                return;
            }
            String str = (String) abstractC3171.next();
            if (!str.equals("CSeq") && !str.equals("User-Agent") && !str.equals("Session") && !str.equals("Authorization")) {
                map.put(str, (String) ᵸᵺᵜ.ˊᵙᵾᵲ(c5525.get(str)));
            }
        }
    }

    /* JADX INFO: renamed from: ᵱʡˏ, reason: contains not printable characters */
    public void m4045(C3622 c3622, int i, int i2, C5286 c5286, int i3, Object obj, long j, long j2) {
        m4031(new C1539(this, c3622, new C0990(i, i2, c5286, i3, obj, AbstractC0956.m3264(j), AbstractC0956.m3264(j2)), 1));
    }

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public void m4046(int i, C5286 c5286, int i2, Object obj, long j) {
        m4031(new C0732(this, 11, new C0990(1, i, c5286, i2, obj, AbstractC0956.m3264(j), -9223372036854775807L)));
    }

    @Override // defpackage.InterfaceC4978
    /* JADX INFO: renamed from: ᵲᵶᵳˈ */
    public C2744 mo2729(InterfaceC5206 interfaceC5206, long j) {
        long position = interfaceC5206.getPosition();
        long jM4048 = m4048(interfaceC5206);
        long jMo4706 = interfaceC5206.mo4706();
        interfaceC5206.mo4705(Math.max(6, ((C0063) this.f5807).f1247));
        long jM40482 = m4048(interfaceC5206);
        return (jM4048 > j || jM40482 <= j) ? jM40482 <= j ? new C2744(jM40482, -2, interfaceC5206.mo4706()) : new C2744(jM4048, -1, position) : new C2744(-9223372036854775807L, 0, jMo4706);
    }

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public void m4047(C2156 c2156) {
        String strM4330 = c2156.f8585.m4330("CSeq");
        strM4330.getClass();
        int i = Integer.parseInt(strM4330);
        C1863 c1863 = (C1863) this.f5809;
        SparseArray sparseArray = c1863.f7390;
        ᵻᵪ.ˌᴵ(sparseArray.get(i) == null);
        sparseArray.append(i, c2156);
        c1863.f7391.m10574(AbstractC0208.m1371(c2156));
        this.f5807 = c2156;
    }

    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public long m4048(InterfaceC5206 interfaceC5206) {
        int iMo4707;
        C2669 c2669 = (C2669) this.f5809;
        C0063 c0063 = (C0063) this.f5807;
        while (interfaceC5206.mo4706() < interfaceC5206.getLength() - 6) {
            int i = this.f5808;
            long jMo4706 = interfaceC5206.mo4706();
            C4545 c4545 = new C4545(17);
            int i2 = 0;
            boolean z = false;
            interfaceC5206.mo4701(c4545.f17284, 0, 2);
            if (c4545.m9625(0, ByteOrder.BIG_ENDIAN) != i) {
                interfaceC5206.mo4698();
                interfaceC5206.mo4705((int) (jMo4706 - interfaceC5206.getPosition()));
            } else {
                byte[] bArr = c4545.f17284;
                while (i2 < 15 && (iMo4707 = interfaceC5206.mo4707(bArr, 2 + i2, 15 - i2)) != -1) {
                    i2 += iMo4707;
                }
                c4545.m9612(i2 + 2);
                interfaceC5206.mo4698();
                interfaceC5206.mo4705((int) (jMo4706 - interfaceC5206.getPosition()));
                z = ᵣˉ.ᵱᵽʡᵚ(c4545, c0063, i, c2669);
            }
            if (z) {
                break;
            }
            interfaceC5206.mo4705(1);
        }
        if (interfaceC5206.mo4706() < interfaceC5206.getLength() - 6) {
            return c2669.f10317;
        }
        interfaceC5206.mo4705((int) (interfaceC5206.getLength() - interfaceC5206.mo4706()));
        return c0063.f1250;
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public C5534 m4049() {
        int i = this.f5808;
        if (i == 0 && ((KeyGenParameterSpec) this.f5809) == null) {
            ᵕᵩʽᵲ.ᵮᵣᵗˈ("build() called before setKeyGenParameterSpec or setKeyScheme.");
            return null;
        }
        if (i == 1) {
            this.f5809 = new KeyGenParameterSpec.Builder((String) this.f5807, 3).setBlockModes("GCM").setEncryptionPaddings("NoPadding").setKeySize(256).build();
        }
        KeyGenParameterSpec keyGenParameterSpec = (KeyGenParameterSpec) this.f5809;
        if (keyGenParameterSpec == null) {
            C4935.m10233("KeyGenParameterSpec was null after build() check");
            return null;
        }
        Object obj = AbstractC0034.f1175;
        if (keyGenParameterSpec.getKeySize() != 256) {
            ᵕᵩʽᵲ.ᵝᵶ("invalid key size, want 256 bits got ", keyGenParameterSpec.getKeySize(), " bits");
            return null;
        }
        if (!Arrays.equals(keyGenParameterSpec.getBlockModes(), new String[]{"GCM"})) {
            ᵕᵩʽᵲ.ᵶᵥᵝ(Arrays.toString(keyGenParameterSpec.getBlockModes()), "invalid block mode, want GCM got ");
            return null;
        }
        if (keyGenParameterSpec.getPurposes() != 3) {
            ˆˌᵣ.ᵷᵺʾᵖ(keyGenParameterSpec.getPurposes(), "invalid purposes mode, want PURPOSE_ENCRYPT | PURPOSE_DECRYPT got ");
            return null;
        }
        if (!Arrays.equals(keyGenParameterSpec.getEncryptionPaddings(), new String[]{"NoPadding"})) {
            ᵕᵩʽᵲ.ᵶᵥᵝ(Arrays.toString(keyGenParameterSpec.getEncryptionPaddings()), "invalid padding mode, want NoPadding got ");
            return null;
        }
        if (keyGenParameterSpec.isUserAuthenticationRequired() && keyGenParameterSpec.getUserAuthenticationValidityDurationSeconds() < 1) {
            ᵕᵩʽᵲ.ᵮᵣᵗˈ("per-operation authentication is not supported (UserAuthenticationValidityDurationSeconds must be >0)");
            return null;
        }
        synchronized (AbstractC0034.f1175) {
            String keystoreAlias = keyGenParameterSpec.getKeystoreAlias();
            KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore");
            keyStore.load(null);
            if (!keyStore.containsAlias(keystoreAlias)) {
                try {
                    KeyGenerator keyGenerator = KeyGenerator.getInstance("AES", "AndroidKeyStore");
                    keyGenerator.init(keyGenParameterSpec);
                    keyGenerator.generateKey();
                } catch (ProviderException e) {
                    throw new GeneralSecurityException(e.getMessage(), e);
                }
            }
        }
        return new C5534((KeyGenParameterSpec) this.f5809, keyGenParameterSpec.getKeystoreAlias());
    }

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public void m4050(long j, int i, long j2) {
        C0990 c0990 = new C0990(1, i, null, 3, null, AbstractC0956.m3264(j), AbstractC0956.m3264(j2));
        C4100 c4100 = (C4100) this.f5807;
        c4100.getClass();
        m4031(new C4021(this, c4100, c0990, 6));
    }

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public void m4051(int i) {
        ByteArrayOutputStream byteArrayOutputStream = (ByteArrayOutputStream) this.f5809;
        byte[] byteArray = byteArrayOutputStream.toByteArray();
        int length = byteArray.length - i;
        int i2 = 0;
        while (i2 < length) {
            int i3 = i2 + 16;
            ((Mac) this.f5807).update(byteArray, i2, i3 <= length ? 16 : length - i2);
            i2 = i3;
        }
        byteArrayOutputStream.reset();
    }

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public C1323 m4052(boolean z) {
        C3220 c3220;
        C3220 c32202;
        if (z && (c32202 = (C3220) this.f5809) != null) {
            throw c32202.m7362();
        }
        C1323 c1323M3843 = C1323.m3843(this.f5808, (Object[]) this.f5807, this);
        if (!z || (c3220 = (C3220) this.f5809) == null) {
            return c1323M3843;
        }
        throw c3220.m7362();
    }
}
