package s1;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import m1.r;
import r1.C2868b;

/* JADX INFO: renamed from: s1.h, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C2904h extends AbstractC2899c {
    @Override // r1.C2873g, r1.C2868b, r1.InterfaceC2874h
    public final void apply() {
        r rVar;
        ArrayList arrayList = this.f23890m0;
        Iterator it = arrayList.iterator();
        while (true) {
            boolean zHasNext = it.hasNext();
            rVar = this.f23888k0;
            if (!zHasNext) {
                break;
            } else {
                rVar.b(it.next()).g();
            }
        }
        C2868b c2868b = null;
        C2868b c2868b2 = null;
        for (Object obj : arrayList) {
            C2868b c2868bB = rVar.b(obj);
            if (c2868b2 == null) {
                Object obj2 = this.f23827N;
                if (obj2 != null) {
                    c2868bB.o(obj2);
                    c2868bB.k(this.l).m(this.f23860r);
                } else {
                    Object obj3 = this.f23828O;
                    if (obj3 != null) {
                        c2868bB.f23853j0 = 6;
                        c2868bB.f23828O = obj3;
                        c2868bB.k(this.l).m(this.f23860r);
                    } else {
                        Object obj4 = this.f23823J;
                        if (obj4 != null) {
                            c2868bB.o(obj4);
                            c2868bB.k(this.f23852j).m(this.f23858p);
                        } else {
                            Object obj5 = this.f23824K;
                            if (obj5 != null) {
                                c2868bB.f23853j0 = 6;
                                c2868bB.f23828O = obj5;
                                c2868bB.k(this.f23852j).m(this.f23858p);
                            } else {
                                String string = c2868bB.f23838a.toString();
                                c2868bB.o(0);
                                c2868bB.l(Float.valueOf(w(string))).n(Float.valueOf(v(string)));
                            }
                        }
                    }
                }
                c2868b2 = c2868bB;
            }
            if (c2868b != null) {
                String string2 = c2868b.f23838a.toString();
                String string3 = c2868bB.f23838a.toString();
                Object obj6 = c2868bB.f23838a;
                c2868b.f23853j0 = 7;
                c2868b.f23829P = obj6;
                c2868b.l(Float.valueOf(u(string2))).n(Float.valueOf(t(string2)));
                Object obj7 = c2868b.f23838a;
                c2868bB.f23853j0 = 6;
                c2868bB.f23828O = obj7;
                c2868bB.l(Float.valueOf(w(string3))).n(Float.valueOf(v(string3)));
            }
            String string4 = obj.toString();
            HashMap map = this.f24140o0;
            float fFloatValue = map.containsKey(string4) ? ((Float) map.get(string4)).floatValue() : -1.0f;
            if (fFloatValue != -1.0f) {
                c2868bB.f23847f = fFloatValue;
            }
            c2868b = c2868bB;
        }
        if (c2868b != null) {
            Object obj8 = this.f23829P;
            if (obj8 != null) {
                c2868b.f23853j0 = 7;
                c2868b.f23829P = obj8;
                c2868b.k(this.f23855m).m(this.f23861s);
            } else {
                Object obj9 = this.f23830Q;
                if (obj9 != null) {
                    c2868b.i(obj9);
                    c2868b.k(this.f23855m).m(this.f23861s);
                } else {
                    Object obj10 = this.f23825L;
                    if (obj10 != null) {
                        c2868b.f23853j0 = 7;
                        c2868b.f23829P = obj10;
                        c2868b.k(this.f23854k).m(this.f23859q);
                    } else {
                        Object obj11 = this.f23826M;
                        if (obj11 != null) {
                            c2868b.i(obj11);
                            c2868b.k(this.f23854k).m(this.f23859q);
                        } else {
                            String string5 = c2868b.f23838a.toString();
                            c2868b.i(0);
                            c2868b.l(Float.valueOf(u(string5))).n(Float.valueOf(t(string5)));
                        }
                    }
                }
            }
        }
        if (c2868b2 == null) {
            return;
        }
        float f6 = this.f24139n0;
        if (f6 != 0.5f) {
            c2868b2.f23849h = f6;
        }
        int iOrdinal = this.f24145t0.ordinal();
        if (iOrdinal == 0) {
            c2868b2.f23844d = 0;
        } else if (iOrdinal == 1) {
            c2868b2.f23844d = 1;
        } else {
            if (iOrdinal != 2) {
                return;
            }
            c2868b2.f23844d = 2;
        }
    }
}
