package ඓ.ῲ.K.ᕣ.ᨨ;

import android.util.Log;
import com.bumptech.glide.load.engine.DecodeJob;
import com.bumptech.glide.load.engine.GlideException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import ඓ.ῲ.K.ᕣ.AbstractC0853;
import ඓ.ῲ.K.ᕣ.C1121;
import ඓ.ῲ.K.ᕣ.ᕣ.㿎.AbstractC0927;
import ඓ.ῲ.K.ᕣ.㿎.AbstractC1130;
import ඓ.K.K.K.C1293;
import ῲ.ᨨ.㳳.C1841;
import ῲ.ᨨ.㿎.AbstractC1871;

/* renamed from: ඓ.ῲ.K.ᕣ.ᨨ.㿎  reason: contains not printable characters */
/* compiled from: DecodePath */
public class C1025<DataType, ResourceType, Transcode> {

    /* renamed from: ʬ  reason: contains not printable characters */
    public final AbstractC0927<ResourceType, Transcode> f4459;

    /* renamed from: ඓ  reason: contains not printable characters */
    public final String f4460;

    /* renamed from: ῲ  reason: contains not printable characters */
    public final List<? extends AbstractC0853<DataType, ResourceType>> f4461;

    /* renamed from: K  reason: contains not printable characters */
    public final Class<DataType> f4462;

    /* renamed from: 㸾  reason: contains not printable characters */
    public final AbstractC1871<List<Throwable>> f4463;

    /* renamed from: ඓ.ῲ.K.ᕣ.ᨨ.㿎$K  reason: contains not printable characters */
    /* compiled from: DecodePath */
    public interface AbstractC1026<ResourceType> {
    }

    public C1025(Class<DataType> cls, Class<ResourceType> cls2, Class<Transcode> cls3, List<? extends AbstractC0853<DataType, ResourceType>> list, AbstractC0927<ResourceType, Transcode> r5, AbstractC1871<List<Throwable>> r6) {
        this.f4462 = cls;
        this.f4461 = list;
        this.f4459 = r5;
        this.f4463 = r6;
        StringBuilder r4 = C1293.m3416("Failed DecodePath{");
        r4.append(cls.getSimpleName());
        r4.append("->");
        r4.append(cls2.getSimpleName());
        r4.append("->");
        r4.append(cls3.getSimpleName());
        r4.append("}");
        this.f4460 = r4.toString();
    }

    public String toString() {
        StringBuilder r0 = C1293.m3416("DecodePath{ dataClass=");
        r0.append(this.f4462);
        r0.append(", decoders=");
        r0.append(this.f4461);
        r0.append(", transcoder=");
        r0.append(this.f4459);
        r0.append('}');
        return r0.toString();
    }

    /* JADX INFO: finally extract failed */
    /* renamed from: K  reason: contains not printable characters */
    public AbstractC1027<Transcode> m2840(AbstractC1130<DataType> r9, int i, int i2, C1121 r12, AbstractC1026<ResourceType> k) throws GlideException {
        List<Throwable> r0 = this.f4463.m4835();
        C1841.m4783(r0, "Argument must not be null");
        List<Throwable> list = r0;
        try {
            AbstractC1027<ResourceType> r92 = m2839(r9, i, i2, r12, list);
            this.f4463.m4836(list);
            DecodeJob.C0333 r13 = (DecodeJob.C0333) k;
            return this.f4459.m2641(DecodeJob.this.m1276(r13.f2234, r92), r12);
        } catch (Throwable th) {
            this.f4463.m4836(list);
            throw th;
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public final AbstractC1027<ResourceType> m2839(AbstractC1130<DataType> r9, int i, int i2, C1121 r12, List<Throwable> list) throws GlideException {
        int size = this.f4461.size();
        AbstractC1027<ResourceType> r1 = null;
        for (int i3 = 0; i3 < size; i3++) {
            AbstractC0853 r3 = (AbstractC0853) this.f4461.get(i3);
            try {
                if (r3.m2473(r9.m3024(), r12)) {
                    r1 = r3.m2472(r9.m3024(), i, i2, r12);
                }
            } catch (IOException | OutOfMemoryError | RuntimeException e) {
                if (Log.isLoggable("DecodePath", 2)) {
                    Log.v("DecodePath", "Failed to decode data for " + r3, e);
                }
                list.add(e);
            }
            if (r1 != null) {
                break;
            }
        }
        if (r1 != null) {
            return r1;
        }
        throw new GlideException(this.f4460, new ArrayList(list));
    }
}
