package p138.p145.p146.p151.p154;

import p000.p001.p002.p003.p004.C0567;
import p138.p145.p146.p151.InterfaceC2844;

/* JADX INFO: renamed from: ދ.ؠ.֏.ތ.ފ.ގ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class C2925<Z> implements InterfaceC2932<Z> {

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public final boolean f9029;

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public final boolean f9030;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public final InterfaceC2932<Z> f9031;

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public final InterfaceC2926 f9032;

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    public final InterfaceC2844 f9033;

    /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
    public int f9034;

    /* JADX INFO: renamed from: މ, reason: contains not printable characters */
    public boolean f9035;

    /* JADX INFO: renamed from: ދ.ؠ.֏.ތ.ފ.ގ$֏, reason: contains not printable characters */
    public interface InterfaceC2926 {
        /* JADX INFO: renamed from: ֏ */
        void mo5043(InterfaceC2844 interfaceC2844, C2925<?> c2925);
    }

    public C2925(InterfaceC2932<Z> interfaceC2932, boolean z, boolean z2, InterfaceC2844 interfaceC2844, InterfaceC2926 interfaceC2926) {
        C0567.m1858(interfaceC2932, "Argument must not be null");
        this.f9031 = interfaceC2932;
        this.f9029 = z;
        this.f9030 = z2;
        this.f9033 = interfaceC2844;
        C0567.m1858(interfaceC2926, "Argument must not be null");
        this.f9032 = interfaceC2926;
    }

    @Override // p138.p145.p146.p151.p154.InterfaceC2932
    public Z get() {
        return this.f9031.get();
    }

    public synchronized String toString() {
        return "EngineResource{isMemoryCacheable=" + this.f9029 + ", listener=" + this.f9032 + ", key=" + this.f9033 + ", acquired=" + this.f9034 + ", isRecycled=" + this.f9035 + ", resource=" + this.f9031 + '}';
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public synchronized void m5063() {
        if (this.f9035) {
            throw new IllegalStateException("Cannot acquire a recycled resource");
        }
        this.f9034++;
    }

    @Override // p138.p145.p146.p151.p154.InterfaceC2932
    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public int mo5064() {
        return this.f9031.mo5064();
    }

    @Override // p138.p145.p146.p151.p154.InterfaceC2932
    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public Class<Z> mo5065() {
        return this.f9031.mo5065();
    }

    @Override // p138.p145.p146.p151.p154.InterfaceC2932
    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public synchronized void mo5066() {
        if (this.f9034 > 0) {
            throw new IllegalStateException("Cannot recycle a resource while it is still acquired");
        }
        if (this.f9035) {
            throw new IllegalStateException("Cannot recycle a resource that has already been recycled");
        }
        this.f9035 = true;
        if (this.f9030) {
            this.f9031.mo5066();
        }
    }

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public void m5067() {
        boolean z;
        synchronized (this) {
            if (this.f9034 <= 0) {
                throw new IllegalStateException("Cannot release a recycled or not yet acquired resource");
            }
            z = true;
            int i = this.f9034 - 1;
            this.f9034 = i;
            if (i != 0) {
                z = false;
            }
        }
        if (z) {
            this.f9032.mo5043(this.f9033, this);
        }
    }
}
