package ඓ.ῲ.K.㗗;

import com.bumptech.glide.request.RequestCoordinator;

/* renamed from: ඓ.ῲ.K.㗗.ⁱ  reason: contains not printable characters */
/* compiled from: ThumbnailRequestCoordinator */
public class C1197 implements RequestCoordinator, AbstractC1189 {

    /* renamed from: ʬ  reason: contains not printable characters */
    public volatile AbstractC1189 f4733;

    /* renamed from: ඓ  reason: contains not printable characters */
    public RequestCoordinator.RequestState f4734;

    /* renamed from: ῲ  reason: contains not printable characters */
    public final Object f4735;

    /* renamed from: ⁱ  reason: contains not printable characters */
    public boolean f4736;

    /* renamed from: K  reason: contains not printable characters */
    public final RequestCoordinator f4737;

    /* renamed from: 㴹  reason: contains not printable characters */
    public RequestCoordinator.RequestState f4738;

    /* renamed from: 㸾  reason: contains not printable characters */
    public volatile AbstractC1189 f4739;

    public C1197(Object obj, RequestCoordinator requestCoordinator) {
        RequestCoordinator.RequestState requestState = RequestCoordinator.RequestState.CLEARED;
        this.f4734 = requestState;
        this.f4738 = requestState;
        this.f4735 = obj;
        this.f4737 = requestCoordinator;
    }

    @Override // ඓ.ῲ.K.㗗.AbstractC1189
    public void clear() {
        synchronized (this.f4735) {
            this.f4736 = false;
            this.f4734 = RequestCoordinator.RequestState.CLEARED;
            this.f4738 = RequestCoordinator.RequestState.CLEARED;
            this.f4739.clear();
            this.f4733.clear();
        }
    }

    @Override // com.bumptech.glide.request.RequestCoordinator
    public RequestCoordinator getRoot() {
        RequestCoordinator root;
        synchronized (this.f4735) {
            root = this.f4737 != null ? this.f4737.getRoot() : this;
        }
        return root;
    }

    @Override // ඓ.ῲ.K.㗗.AbstractC1189
    public boolean isRunning() {
        boolean z;
        synchronized (this.f4735) {
            z = this.f4734 == RequestCoordinator.RequestState.RUNNING;
        }
        return z;
    }

    @Override // ඓ.ῲ.K.㗗.AbstractC1189
    public void pause() {
        synchronized (this.f4735) {
            if (!this.f4738.isComplete()) {
                this.f4738 = RequestCoordinator.RequestState.PAUSED;
                this.f4739.pause();
            }
            if (!this.f4734.isComplete()) {
                this.f4734 = RequestCoordinator.RequestState.PAUSED;
                this.f4733.pause();
            }
        }
    }

    @Override // com.bumptech.glide.request.RequestCoordinator
    /* renamed from: ʬ  reason: contains not printable characters */
    public void m3196(AbstractC1189 r3) {
        synchronized (this.f4735) {
            if (!r3.equals(this.f4733)) {
                this.f4738 = RequestCoordinator.RequestState.FAILED;
                return;
            }
            this.f4734 = RequestCoordinator.RequestState.FAILED;
            if (this.f4737 != null) {
                this.f4737.m1331(this);
            }
        }
    }

    @Override // com.bumptech.glide.request.RequestCoordinator
    /* renamed from: ඓ  reason: contains not printable characters */
    public boolean m3198(AbstractC1189 r5) {
        boolean z;
        boolean z2;
        synchronized (this.f4735) {
            RequestCoordinator requestCoordinator = this.f4737;
            z = false;
            if (requestCoordinator != null) {
                if (!requestCoordinator.m1332(this)) {
                    z2 = false;
                    if (z2 && r5.equals(this.f4733) && !m3201()) {
                        z = true;
                    }
                }
            }
            z2 = true;
            z = true;
        }
        return z;
    }

    @Override // com.bumptech.glide.request.RequestCoordinator
    /* renamed from: ῲ  reason: contains not printable characters */
    public boolean m3200(AbstractC1189 r5) {
        boolean z;
        boolean z2;
        synchronized (this.f4735) {
            RequestCoordinator requestCoordinator = this.f4737;
            z = false;
            if (requestCoordinator != null) {
                if (!requestCoordinator.m1333(this)) {
                    z2 = false;
                    if (z2 && (r5.equals(this.f4733) || this.f4734 != RequestCoordinator.RequestState.SUCCESS)) {
                        z = true;
                    }
                }
            }
            z2 = true;
            z = true;
        }
        return z;
    }

    @Override // ඓ.ῲ.K.㗗.AbstractC1189, com.bumptech.glide.request.RequestCoordinator
    /* renamed from: K  reason: contains not printable characters */
    public boolean m3201() {
        boolean z;
        synchronized (this.f4735) {
            if (!this.f4739.m3180()) {
                if (!this.f4733.m3180()) {
                    z = false;
                }
            }
            z = true;
        }
        return z;
    }

    @Override // com.bumptech.glide.request.RequestCoordinator
    /* renamed from: 㴹  reason: contains not printable characters */
    public boolean m3203(AbstractC1189 r5) {
        boolean z;
        boolean z2;
        synchronized (this.f4735) {
            RequestCoordinator requestCoordinator = this.f4737;
            z = false;
            if (requestCoordinator != null) {
                if (!requestCoordinator.m1335(this)) {
                    z2 = false;
                    if (z2 && r5.equals(this.f4733) && this.f4734 != RequestCoordinator.RequestState.PAUSED) {
                        z = true;
                    }
                }
            }
            z2 = true;
            z = true;
        }
        return z;
    }

    @Override // com.bumptech.glide.request.RequestCoordinator
    /* renamed from: 㸾  reason: contains not printable characters */
    public void m3204(AbstractC1189 r3) {
        synchronized (this.f4735) {
            if (r3.equals(this.f4739)) {
                this.f4738 = RequestCoordinator.RequestState.SUCCESS;
                return;
            }
            this.f4734 = RequestCoordinator.RequestState.SUCCESS;
            if (this.f4737 != null) {
                this.f4737.m1336(this);
            }
            if (!this.f4738.isComplete()) {
                this.f4739.clear();
            }
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:14:0x002d A[ORIG_RETURN, RETURN, SYNTHETIC] */
    @Override // ඓ.ῲ.K.㗗.AbstractC1189
    /* renamed from: K  reason: contains not printable characters */
    public boolean m3202(AbstractC1189 r4) {
        if (!(r4 instanceof C1197)) {
            return false;
        }
        C1197 r42 = (C1197) r4;
        if (this.f4733 == null) {
            if (r42.f4733 != null) {
                return false;
            }
        } else if (!this.f4733.m3181(r42.f4733)) {
            return false;
        }
        if (this.f4739 == null) {
            if (r42.f4739 == null) {
                return true;
            }
            return false;
        } else if (!this.f4739.m3181(r42.f4739)) {
            return false;
        }
        return true;
    }

    @Override // ඓ.ῲ.K.㗗.AbstractC1189
    /* renamed from: ῲ  reason: contains not printable characters */
    public void m3199() {
        synchronized (this.f4735) {
            this.f4736 = true;
            try {
                if (!(this.f4734 == RequestCoordinator.RequestState.SUCCESS || this.f4738 == RequestCoordinator.RequestState.RUNNING)) {
                    this.f4738 = RequestCoordinator.RequestState.RUNNING;
                    this.f4739.m3179();
                }
                if (this.f4736 && this.f4734 != RequestCoordinator.RequestState.RUNNING) {
                    this.f4734 = RequestCoordinator.RequestState.RUNNING;
                    this.f4733.m3179();
                }
            } finally {
                this.f4736 = false;
            }
        }
    }

    @Override // ඓ.ῲ.K.㗗.AbstractC1189
    /* renamed from: ʬ  reason: contains not printable characters */
    public boolean m3197() {
        boolean z;
        synchronized (this.f4735) {
            z = this.f4734 == RequestCoordinator.RequestState.SUCCESS;
        }
        return z;
    }

    @Override // ඓ.ῲ.K.㗗.AbstractC1189
    /* renamed from: 㸾  reason: contains not printable characters */
    public boolean m3205() {
        boolean z;
        synchronized (this.f4735) {
            z = this.f4734 == RequestCoordinator.RequestState.CLEARED;
        }
        return z;
    }
}
