package ඓ.ῲ.K.ᕣ.ᨨ;

import com.bumptech.glide.Priority;
import com.bumptech.glide.Registry;
import com.bumptech.glide.load.engine.DecodeJob;
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import ඓ.ῲ.K.C1220;
import ඓ.ῲ.K.ᕣ.AbstractC1029;
import ඓ.ῲ.K.ᕣ.AbstractC1030;
import ඓ.ῲ.K.ᕣ.C1121;
import ඓ.ῲ.K.ᕣ.ᕣ.C0900;
import ඓ.ῲ.K.ᕣ.ᨨ.C1013;
import ඓ.ῲ.K.ᕣ.ᨨ.ト.AbstractC0993;
import ඓ.ῲ.K.ᕣ.㳳.AbstractC1033;

/* renamed from: ඓ.ῲ.K.ᕣ.ᨨ.ⁱ  reason: contains not printable characters */
/* compiled from: DecodeHelper */
public final class C0956<Transcode> {

    /* renamed from: ʬ  reason: contains not printable characters */
    public C1220 f4302;

    /* renamed from: Ԕ  reason: contains not printable characters */
    public AbstractC1029 f4303;

    /* renamed from: ؿ  reason: contains not printable characters */
    public AbstractC0951 f4304;

    /* renamed from: ඓ  reason: contains not printable characters */
    public int f4305;

    /* renamed from: ᓣ  reason: contains not printable characters */
    public boolean f4306;

    /* renamed from: ᕣ  reason: contains not printable characters */
    public Class<Transcode> f4307;

    /* renamed from: ᨨ  reason: contains not printable characters */
    public C1121 f4308;

    /* renamed from: ῲ  reason: contains not printable characters */
    public final List<AbstractC1029> f4309 = new ArrayList();

    /* renamed from: ⁱ  reason: contains not printable characters */
    public Class<?> f4310;

    /* renamed from: K  reason: contains not printable characters */
    public final List<AbstractC1033.C1034<?>> f4311 = new ArrayList();

    /* renamed from: 㑃  reason: contains not printable characters */
    public boolean f4312;

    /* renamed from: 㗗  reason: contains not printable characters */
    public Priority f4313;

    /* renamed from: 㗽  reason: contains not printable characters */
    public boolean f4314;

    /* renamed from: 㳳  reason: contains not printable characters */
    public Map<Class<?>, AbstractC1030<?>> f4315;

    /* renamed from: 㴹  reason: contains not printable characters */
    public int f4316;

    /* renamed from: 㸾  reason: contains not printable characters */
    public Object f4317;

    /* renamed from: 㿎  reason: contains not printable characters */
    public DecodeJob.AbstractC0335 f4318;

    /* renamed from: 䁗  reason: contains not printable characters */
    public boolean f4319;

    /* JADX DEBUG: Multi-variable search result rejected for r1v0, resolved type: java.lang.Class<?> */
    /* JADX WARN: Multi-variable type inference failed */
    /* renamed from: ʬ  reason: contains not printable characters */
    public boolean m2709(Class<?> cls) {
        return m2714(cls) != null;
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public AbstractC0993 m2710() {
        return ((C1013.C1014) this.f4318).m2827();
    }

    /* renamed from: K  reason: contains not printable characters */
    public <Data> C1007<Data, ?, Transcode> m2714(Class<Data> cls) {
        Registry registry = this.f4302.f4849;
        Class<?> cls2 = this.f4310;
        Class<Transcode> cls3 = this.f4307;
        C1007<Data, ?, Transcode> r1 = registry.f2182.m2400(cls, cls2, cls3);
        if (registry.f2182.m2402(r1)) {
            return null;
        }
        if (r1 == null) {
            ArrayList arrayList = new ArrayList();
            for (Class cls4 : registry.f2180.m2403(cls, cls2)) {
                for (Class cls5 : registry.f2187.m2645(cls4, cls3)) {
                    arrayList.add(new C1025(cls, cls4, cls5, registry.f2180.m2404(cls, cls4), registry.f2187.m2646(cls4, cls5), registry.f2186));
                }
            }
            if (arrayList.isEmpty()) {
                r1 = null;
            } else {
                r1 = new C1007<>(cls, cls2, cls3, arrayList, registry.f2186);
            }
            registry.f2182.m2401(cls, cls2, cls3, r1);
        }
        return r1;
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public List<AbstractC1033.C1034<?>> m2708() {
        if (!this.f4312) {
            this.f4312 = true;
            this.f4311.clear();
            Registry registry = this.f4302.f4849;
            List r0 = registry.f2185.m2859(this.f4317);
            int size = r0.size();
            for (int i = 0; i < size; i++) {
                AbstractC1033.C1034<?> r3 = ((AbstractC1033) r0.get(i)).m2849(this.f4317, this.f4305, this.f4316, this.f4308);
                if (r3 != null) {
                    this.f4311.add(r3);
                }
            }
        }
        return this.f4311;
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public <Z> AbstractC1030<Z> m2711(Class<Z> cls) {
        AbstractC1030<Z> r0 = (AbstractC1030<Z>) this.f4315.get(cls);
        if (r0 == null) {
            Iterator<Map.Entry<Class<?>, AbstractC1030<?>>> it2 = this.f4315.entrySet().iterator();
            while (true) {
                if (!it2.hasNext()) {
                    break;
                }
                Map.Entry<Class<?>, AbstractC1030<?>> next = it2.next();
                if (next.getKey().isAssignableFrom(cls)) {
                    r0 = (AbstractC1030<Z>) next.getValue();
                    break;
                }
            }
        }
        if (r0 != null) {
            return r0;
        }
        if (!this.f4315.isEmpty() || !this.f4306) {
            return (C0900) C0900.f4154;
        }
        throw new IllegalArgumentException("Missing transformation for " + cls + ". If you wish to ignore unknown resource types, use the optional transformation methods.");
    }

    /* renamed from: K  reason: contains not printable characters */
    public List<AbstractC1033<File, ?>> m2713(File file) throws Registry.NoModelLoaderAvailableException {
        return this.f4302.f4849.f2185.m2859(file);
    }

    /* renamed from: K  reason: contains not printable characters */
    public List<AbstractC1029> m2712() {
        if (!this.f4319) {
            this.f4319 = true;
            this.f4309.clear();
            List<AbstractC1033.C1034<?>> r0 = m2708();
            int size = r0.size();
            for (int i = 0; i < size; i++) {
                AbstractC1033.C1034<?> k = r0.get(i);
                if (!this.f4309.contains(k.f4476)) {
                    this.f4309.add(k.f4476);
                }
                for (int i2 = 0; i2 < k.f4475.size(); i2++) {
                    if (!this.f4309.contains(k.f4475.get(i2))) {
                        this.f4309.add(k.f4475.get(i2));
                    }
                }
            }
        }
        return this.f4309;
    }
}
