package ඓ.ῲ.K.ᕣ.ᕣ.ʬ;

import android.graphics.Bitmap;
import com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import ඓ.ῲ.K.ᓣ.C0848;
import ඓ.ῲ.K.ᓣ.C0849;
import ඓ.ῲ.K.ᕣ.AbstractC0853;
import ඓ.ῲ.K.ᕣ.C1121;
import ඓ.ῲ.K.ᕣ.ᕣ.ʬ.C0873;
import ඓ.ῲ.K.ᕣ.ᨨ.AbstractC1027;
import ඓ.ῲ.K.ᕣ.ᨨ.ゎ.AbstractC0967;
import ඓ.ῲ.K.ᕣ.ᨨ.ゎ.AbstractC0976;

/* renamed from: ඓ.ῲ.K.ᕣ.ᕣ.ʬ.㶋  reason: contains not printable characters */
/* compiled from: StreamBitmapDecoder */
public class C0889 implements AbstractC0853<InputStream, Bitmap> {

    /* renamed from: ῲ  reason: contains not printable characters */
    public final AbstractC0967 f4142;

    /* renamed from: K  reason: contains not printable characters */
    public final C0873 f4143;

    /* renamed from: ඓ.ῲ.K.ᕣ.ᕣ.ʬ.㶋$K  reason: contains not printable characters */
    /* compiled from: StreamBitmapDecoder */
    public static class C0890 implements C0873.AbstractC0874 {

        /* renamed from: ῲ  reason: contains not printable characters */
        public final C0848 f4144;

        /* renamed from: K  reason: contains not printable characters */
        public final RecyclableBufferedInputStream f4145;

        public C0890(RecyclableBufferedInputStream recyclableBufferedInputStream, C0848 r2) {
            this.f4145 = recyclableBufferedInputStream;
            this.f4144 = r2;
        }

        @Override // ඓ.ῲ.K.ᕣ.ᕣ.ʬ.C0873.AbstractC0874
        /* renamed from: K  reason: contains not printable characters */
        public void m2566() {
            this.f4145.m1328();
        }

        @Override // ඓ.ῲ.K.ᕣ.ᕣ.ʬ.C0873.AbstractC0874
        /* renamed from: K  reason: contains not printable characters */
        public void m2567(AbstractC0976 r2, Bitmap bitmap) throws IOException {
            IOException iOException = this.f4144.f4075;
            if (iOException != null) {
                if (bitmap != null) {
                    r2.m2772(bitmap);
                }
                throw iOException;
            }
        }
    }

    public C0889(C0873 r1, AbstractC0967 r2) {
        this.f4143 = r1;
        this.f4142 = r2;
    }

    /* Return type fixed from 'ඓ.ῲ.K.ᕣ.ᨨ.䀟' to match base method */
    /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, int, int, ඓ.ῲ.K.ᕣ.㸾] */
    @Override // ඓ.ῲ.K.ᕣ.AbstractC0853
    /* renamed from: K  reason: contains not printable characters */
    public AbstractC1027<Bitmap> m2564(InputStream inputStream, int i, int i2, C1121 r12) throws IOException {
        RecyclableBufferedInputStream recyclableBufferedInputStream;
        boolean z;
        InputStream inputStream2 = inputStream;
        if (inputStream2 instanceof RecyclableBufferedInputStream) {
            recyclableBufferedInputStream = (RecyclableBufferedInputStream) inputStream2;
            z = false;
        } else {
            recyclableBufferedInputStream = new RecyclableBufferedInputStream(inputStream2, this.f4142);
            z = true;
        }
        C0848 r1 = C0848.m2464(recyclableBufferedInputStream);
        try {
            return this.f4143.m2534(new C0849(r1), i, i2, r12, new C0890(recyclableBufferedInputStream, r1));
        } finally {
            r1.m2465();
            if (z) {
                recyclableBufferedInputStream.m1330();
            }
        }
    }

    /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, ඓ.ῲ.K.ᕣ.㸾] */
    @Override // ඓ.ῲ.K.ᕣ.AbstractC0853
    /* renamed from: K  reason: contains not printable characters */
    public boolean m2565(InputStream inputStream, C1121 r2) throws IOException {
        this.f4143.m2536();
        return true;
    }
}
