package 㴹.K.Ԕ.K;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import 㴹.K.Ԕ.ῲ.C2456;
import 㴹.K.㑃.AbstractC2514;

/* renamed from: 㴹.K.Ԕ.K.ῲ  reason: contains not printable characters */
/* compiled from: ListCompositeDisposable */
public final class C2485 implements AbstractC2514, AbstractC2486 {

    /* renamed from: ʬ  reason: contains not printable characters */
    public volatile boolean f8475;

    /* renamed from: ῲ  reason: contains not printable characters */
    public List<AbstractC2514> f8476;

    /* JADX WARNING: Code restructure failed: missing block: B:11:0x0015, code lost:
        if (r1 != null) goto L_0x0018;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:12:0x0018, code lost:
        r1 = r1.iterator();
     */
    /* JADX WARNING: Code restructure failed: missing block: B:14:0x0020, code lost:
        if (r1.hasNext() == false) goto L_0x003b;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:17:?, code lost:
        r1.next().dispose();
     */
    /* JADX WARNING: Code restructure failed: missing block: B:18:0x002c, code lost:
        r3 = move-exception;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:19:0x002d, code lost:
        ඓ.ⁱ.K.ඓ.C1252.m3329(r3);
     */
    /* JADX WARNING: Code restructure failed: missing block: B:20:0x0030, code lost:
        if (r2 == null) goto L_0x0032;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:21:0x0032, code lost:
        r2 = new java.util.ArrayList();
     */
    /* JADX WARNING: Code restructure failed: missing block: B:22:0x0037, code lost:
        r2.add(r3);
     */
    /* JADX WARNING: Code restructure failed: missing block: B:23:0x003b, code lost:
        if (r2 == null) goto L_?;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:25:0x0041, code lost:
        if (r2.size() != 1) goto L_0x004f;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:27:0x004e, code lost:
        throw io.reactivex.internal.util.ExceptionHelper.m1955((java.lang.Throwable) r2.get(0));
     */
    /* JADX WARNING: Code restructure failed: missing block: B:29:0x0054, code lost:
        throw new io.reactivex.exceptions.CompositeException(r2);
     */
    /* JADX WARNING: Code restructure failed: missing block: B:37:?, code lost:
        return;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:38:?, code lost:
        return;
     */
    @Override // 㴹.K.㑃.AbstractC2514
    public void dispose() {
        if (!this.f8475) {
            synchronized (this) {
                if (!this.f8475) {
                    this.f8475 = true;
                    List<AbstractC2514> list = this.f8476;
                    ArrayList arrayList = null;
                    this.f8476 = null;
                }
            }
        }
    }

    @Override // 㴹.K.㑃.AbstractC2514
    public boolean isDisposed() {
        return this.f8475;
    }

    @Override // 㴹.K.Ԕ.K.AbstractC2486
    /* renamed from: ʬ  reason: contains not printable characters */
    public boolean m6528(AbstractC2514 r2) {
        C2456.m6500(r2, "d is null");
        if (!this.f8475) {
            synchronized (this) {
                if (!this.f8475) {
                    List list = this.f8476;
                    if (list == null) {
                        list = new LinkedList();
                        this.f8476 = list;
                    }
                    list.add(r2);
                    return true;
                }
            }
        }
        r2.dispose();
        return false;
    }

    @Override // 㴹.K.Ԕ.K.AbstractC2486
    /* renamed from: ῲ  reason: contains not printable characters */
    public boolean m6529(AbstractC2514 r2) {
        if (!m6530(r2)) {
            return false;
        }
        r2.dispose();
        return true;
    }

    @Override // 㴹.K.Ԕ.K.AbstractC2486
    /* renamed from: K  reason: contains not printable characters */
    public boolean m6530(AbstractC2514 r3) {
        C2456.m6500(r3, "Disposable item is null");
        if (this.f8475) {
            return false;
        }
        synchronized (this) {
            if (this.f8475) {
                return false;
            }
            List<AbstractC2514> list = this.f8476;
            if (list != null) {
                if (list.remove(r3)) {
                    return true;
                }
            }
            return false;
        }
    }
}
