package androidx.core.view;

import android.os.Build;
import android.text.TextUtils;
import android.view.View;

/* JADX INFO: loaded from: classes.dex */
public abstract class f1 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final int f1736a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final Class f1737b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final int f1738c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final int f1739d;

    public f1(int i10, Class cls, int i11, int i12) {
        this.f1736a = i10;
        this.f1737b = cls;
        this.f1739d = i11;
        this.f1738c = i12;
    }

    public final Object a(View view) {
        if (Build.VERSION.SDK_INT < this.f1738c) {
            Object tag = view.getTag(this.f1736a);
            if (this.f1737b.isInstance(tag)) {
                return tag;
            }
            return null;
        }
        int i10 = ((d1) this).f1724e;
        switch (i10) {
            case 0:
                switch (i10) {
                    case 0:
                        return Boolean.valueOf(m1.c(view));
                    default:
                        return Boolean.valueOf(m1.b(view));
                }
            case 1:
                switch (i10) {
                    case 1:
                        return m1.a(view);
                    default:
                        return o1.a(view);
                }
            case 2:
                switch (i10) {
                    case 1:
                        return m1.a(view);
                    default:
                        return o1.a(view);
                }
            default:
                switch (i10) {
                    case 0:
                        return Boolean.valueOf(m1.c(view));
                    default:
                        return Boolean.valueOf(m1.b(view));
                }
        }
    }

    /* JADX WARN: Failed to find 'out' block for switch in B:23:0x0065. Please report as an issue. */
    /* JADX WARN: Removed duplicated region for block: B:37:0x0088  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void b(View view, Object obj) {
        boolean zEquals;
        boolean z10;
        if (Build.VERSION.SDK_INT >= this.f1738c) {
            int i10 = ((d1) this).f1724e;
            switch (i10) {
                case 0:
                    Boolean bool = (Boolean) obj;
                    switch (i10) {
                        case 0:
                            m1.g(view, bool.booleanValue());
                            break;
                        default:
                            m1.d(view, bool.booleanValue());
                            break;
                    }
                    break;
                case 1:
                    CharSequence charSequence = (CharSequence) obj;
                    switch (i10) {
                        case 1:
                            m1.e(view, charSequence);
                            break;
                        default:
                            o1.b(view, charSequence);
                            break;
                    }
                    break;
                case 2:
                    CharSequence charSequence2 = (CharSequence) obj;
                    switch (i10) {
                        case 1:
                            m1.e(view, charSequence2);
                            break;
                        default:
                            o1.b(view, charSequence2);
                            break;
                    }
                    break;
                default:
                    Boolean bool2 = (Boolean) obj;
                    switch (i10) {
                        case 0:
                            m1.g(view, bool2.booleanValue());
                            break;
                        default:
                            m1.d(view, bool2.booleanValue());
                            break;
                    }
                    break;
            }
        }
        Object objA = a(view);
        boolean z11 = false;
        int i11 = ((d1) this).f1724e;
        switch (i11) {
            case 0:
                Boolean bool3 = (Boolean) objA;
                Boolean bool4 = (Boolean) obj;
                switch (i11) {
                    case 0:
                        if ((bool3 != null && bool3.booleanValue()) == (bool4 != null && bool4.booleanValue())) {
                            z11 = true;
                        }
                        break;
                    default:
                        if ((bool3 != null && bool3.booleanValue()) == (bool4 != null && bool4.booleanValue())) {
                        }
                        break;
                }
                z10 = !z11;
                break;
            case 1:
                CharSequence charSequence3 = (CharSequence) objA;
                CharSequence charSequence4 = (CharSequence) obj;
                switch (i11) {
                    case 1:
                        zEquals = TextUtils.equals(charSequence3, charSequence4);
                        break;
                    default:
                        zEquals = TextUtils.equals(charSequence3, charSequence4);
                        break;
                }
                z10 = !zEquals;
                break;
            case 2:
                CharSequence charSequence5 = (CharSequence) objA;
                CharSequence charSequence6 = (CharSequence) obj;
                switch (i11) {
                    case 1:
                        zEquals = TextUtils.equals(charSequence5, charSequence6);
                        break;
                    default:
                        zEquals = TextUtils.equals(charSequence5, charSequence6);
                        break;
                }
                z10 = !zEquals;
                break;
            default:
                Boolean bool5 = (Boolean) objA;
                Boolean bool6 = (Boolean) obj;
                switch (i11) {
                    case 0:
                        if ((bool5 != null && bool5.booleanValue()) == (bool6 != null && bool6.booleanValue())) {
                        }
                        break;
                    default:
                        if ((bool5 != null && bool5.booleanValue()) == (bool6 != null && bool6.booleanValue())) {
                        }
                        break;
                }
                z10 = !z11;
                break;
        }
        if (z10) {
            b accessibilityDelegate = s1.getAccessibilityDelegate(view);
            if (accessibilityDelegate == null) {
                accessibilityDelegate = new b();
            }
            s1.setAccessibilityDelegate(view, accessibilityDelegate);
            view.setTag(this.f1736a, obj);
            s1.e(this.f1739d, view);
        }
    }
}
