package defpackage;

import android.os.SystemClock;
import android.util.Log;
import j$.util.Objects;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;

/* JADX INFO: renamed from: ːː, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C1971 implements InterfaceC3305, InterfaceC0794 {

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public volatile C1056 f7827;

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public final C5155 f7828;

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public volatile int f7829;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public final RunnableC4693 f7830;

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public volatile C3270 f7831;

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public volatile Object f7832;

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public volatile C0529 f7833;

    public C1971(C5155 c5155, RunnableC4693 runnableC4693) {
        this.f7828 = c5155;
        this.f7830 = runnableC4693;
    }

    @Override // defpackage.InterfaceC3305
    public final void cancel() {
        C0529 c0529 = this.f7833;
        if (c0529 != null) {
            c0529.f2716.cancel();
        }
    }

    @Override // defpackage.InterfaceC0794
    /* JADX INFO: renamed from: ʽˈˋ */
    public final void mo2883(InterfaceC0883 interfaceC0883, Object obj, InterfaceC5071 interfaceC5071, int i, InterfaceC0883 interfaceC08832) {
        this.f7830.mo2883(interfaceC0883, obj, interfaceC5071, this.f7833.f2716.mo1317(), interfaceC0883);
    }

    @Override // defpackage.InterfaceC0794
    /* JADX INFO: renamed from: ːˏᵟᵯ */
    public final void mo2884(InterfaceC0883 interfaceC0883, Exception exc, InterfaceC5071 interfaceC5071, int i) {
        this.f7830.mo2884(interfaceC0883, exc, interfaceC5071, this.f7833.f2716.mo1317());
    }

    /* JADX WARN: Removed duplicated region for block: B:9:0x0017  */
    @Override // defpackage.InterfaceC3305
    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final boolean mo5327() {
        if (this.f7832 != null) {
            Object obj = this.f7832;
            this.f7832 = null;
            try {
            } catch (IOException unused) {
                Log.isLoggable("SourceGenerator", 3);
            }
            if (m5328(obj)) {
                if (this.f7831 == null || !this.f7831.mo5327()) {
                    this.f7831 = null;
                    this.f7833 = null;
                    boolean z = false;
                    while (!z && this.f7829 < this.f7828.m10659().size()) {
                        ArrayList arrayListM10659 = this.f7828.m10659();
                        int i = this.f7829;
                        this.f7829 = i + 1;
                        this.f7833 = (C0529) arrayListM10659.get(i);
                        if (this.f7833 != null && (this.f7828.f19375.m7084(this.f7833.f2716.mo1317()) || this.f7828.m10660(this.f7833.f2716.mo1311()) != null)) {
                            this.f7833.f2716.mo1314(this.f7828.f19377, new C1709(23, this, this.f7833, false));
                            z = true;
                        }
                    }
                    return z;
                }
            }
        }
        return true;
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final boolean m5328(Object obj) throws Throwable {
        Throwable th;
        int i = AbstractC0925.f4045;
        SystemClock.elapsedRealtimeNanos();
        boolean z = false;
        try {
            InterfaceC0257 interfaceC0257M2846 = this.f7828.f19373.m5115().m2846(obj);
            Object objMo796 = interfaceC0257M2846.mo796();
            InterfaceC4562 interfaceC4562M10663 = this.f7828.m10663(objMo796);
            ᵯᵨᵲ r5 = new ᵯᵨᵲ(interfaceC4562M10663, objMo796, this.f7828.f19385, 12);
            InterfaceC0883 interfaceC0883 = this.f7833.f2717;
            C5155 c5155 = this.f7828;
            C1056 c1056 = new C1056(interfaceC0883, c5155.f19372);
            InterfaceC4865 interfaceC4865M10223 = c5155.f19371.m10223();
            interfaceC4865M10223.mo10108(c1056, r5);
            if (Log.isLoggable("SourceGenerator", 2)) {
                c1056.toString();
                obj.toString();
                interfaceC4562M10663.toString();
                SystemClock.elapsedRealtimeNanos();
            }
            if (interfaceC4865M10223.mo10107(c1056) != null) {
                this.f7827 = c1056;
                this.f7831 = new C3270(Collections.singletonList(this.f7833.f2717), this.f7828, this);
                this.f7833.f2716.mo1316();
                return true;
            }
            if (Log.isLoggable("SourceGenerator", 3)) {
                Objects.toString(this.f7827);
                obj.toString();
            }
            try {
                this.f7830.mo2883(this.f7833.f2717, interfaceC0257M2846.mo796(), this.f7833.f2716, this.f7833.f2716.mo1317(), this.f7833.f2717);
                return false;
            } catch (Throwable th2) {
                th = th2;
                z = true;
                if (z) {
                    throw th;
                }
                this.f7833.f2716.mo1316();
                throw th;
            }
        } catch (Throwable th3) {
            th = th3;
        }
    }
}
