package m1;

import java.util.ArrayList;
import java.util.HashMap;
import r1.C2868b;
import r1.C2873g;
import r1.InterfaceC2874h;
import s1.C2897a;
import s1.C2898b;
import s1.C2901e;
import s1.C2902f;
import s1.C2903g;
import s1.C2904h;
import s1.C2905i;

/* JADX INFO: loaded from: classes.dex */
public final class r {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public K1.b f20462a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public boolean f20463b = true;

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

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

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final HashMap f20466e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final C2868b f20467f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public int f20468g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public final ArrayList f20469h;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public final ArrayList f20470i;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public boolean f20471j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public final h1.c f20472k;
    public long l;

    public r(h1.c cVar) {
        HashMap map = new HashMap();
        this.f20464c = map;
        this.f20465d = new HashMap();
        this.f20466e = new HashMap();
        C2868b c2868b = new C2868b(this);
        this.f20467f = c2868b;
        this.f20468g = 0;
        this.f20469h = new ArrayList();
        this.f20470i = new ArrayList();
        this.f20471j = true;
        c2868b.f23838a = 0;
        map.put(0, c2868b);
        this.f20472k = cVar;
        this.l = h1.b.b(0, 0, 15);
        h1.m mVar = h1.m.f16628a;
        this.f20462a = new K1.b(this, 26);
    }

    public final void a(Object obj) {
        this.f20469h.add(obj);
        this.f20471j = true;
    }

    public final C2868b b(Object obj) {
        HashMap map = this.f20464c;
        InterfaceC2874h interfaceC2874h = (InterfaceC2874h) map.get(obj);
        Object obj2 = interfaceC2874h;
        if (interfaceC2874h == null) {
            C2868b c2868b = new C2868b(this);
            map.put(obj, c2868b);
            c2868b.f23838a = obj;
            obj2 = c2868b;
        }
        if (obj2 instanceof C2868b) {
            return (C2868b) obj2;
        }
        return null;
    }

    public final int c(Float f6) {
        return Math.round(f6.floatValue());
    }

    public final C2903g d(int i6, String str) {
        C2868b c2868bB = b(str);
        Object obj = c2868bB.f23842c;
        if (obj == null || !(obj instanceof C2903g)) {
            C2903g c2903g = new C2903g(this);
            c2903g.f24183b = i6;
            c2903g.f24188g = str;
            c2868bB.f23842c = c2903g;
            c2868bB.a(c2903g.b());
        }
        return (C2903g) c2868bB.f23842c;
    }

    public final C2873g e(int i6) {
        C2873g c2904h;
        StringBuilder sb = new StringBuilder("__HELPER_KEY_");
        int i7 = this.f20468g;
        this.f20468g = i7 + 1;
        String strQ = Z0.o.q(sb, i7, "__");
        HashMap map = this.f20465d;
        C2873g c2873g = (C2873g) map.get(strQ);
        C2873g c2873g2 = c2873g;
        if (c2873g == null) {
            int i8 = 4;
            switch (AbstractC2464a.c(i6)) {
                case 0:
                    c2904h = new C2904h(this, 1);
                    break;
                case 1:
                    c2904h = new C2905i(this, 2);
                    break;
                case 2:
                    C2897a c2897a = new C2897a(this, i8, 0);
                    c2897a.f24135o0 = 0.5f;
                    c2904h = c2897a;
                    break;
                case 3:
                    C2897a c2897a2 = new C2897a(this, i8, 1);
                    c2897a2.f24135o0 = 0.5f;
                    c2904h = c2897a2;
                    break;
                case 4:
                    c2904h = new C2898b(this, 5);
                    break;
                case 5:
                default:
                    c2904h = new C2873g(this, i6);
                    break;
                case 6:
                case 7:
                    c2904h = new C2901e(this, i6);
                    break;
                case 8:
                case 9:
                case 10:
                    c2904h = new C2902f(this, i6);
                    break;
            }
            c2904h.f23838a = strQ;
            map.put(strQ, c2904h);
            c2873g2 = c2904h;
        }
        return c2873g2;
    }
}
