package com.bytedance.assem.arch.extensions;

import X.0CB;
import X.0CH;
import X.1Bj;
import X.2up;
import X.C1509AdN;
import X.CxE;
import X.M12;
import androidx.fragment.app.Fragment;
import com.bytedance.assem.arch.core.Assembler;
import com.bytedance.covode.number.Covode;
import java.util.ArrayList;
import kotlin.h.b.n;

public final class AssembleExtKt$assemble$serviceStore$3$1 implements 1Bj {
    public final /* synthetic */ Fragment LIZ;
    public final /* synthetic */ CxE LIZIZ;
    public final /* synthetic */ Assembler LIZJ;

    static {
        Covode.recordClassIndex(23931);
    }

    public final void onStateChanged(0CH r11, 0CB r12) {
        M12.LIZ(r11, r12);
        if (C1509AdN.LIZ[r12.ordinal()] == 1) {
            2up r9 = this.LIZ;
            if (r9 instanceof 2up) {
                CxE cxE = this.LIZIZ;
                2up r92 = r9;
                Class cls = r92.getClass();
                Class[] interfaces = cls.getInterfaces();
                if (interfaces != null && interfaces.length != 0) {
                    while (cls != Object.class) {
                        Class[] interfaces2 = cls.getInterfaces();
                        M12.LIZ(interfaces2);
                        ArrayList<Class> arrayList = new ArrayList<>();
                        for (Class cls2 : interfaces2) {
                            if (2up.class.isAssignableFrom(cls2)) {
                                arrayList.add(cls2);
                            }
                        }
                        for (Class cls3 : arrayList) {
                            n.LIZIZ(cls3, "");
                            cxE.LIZIZ(cls3, r92);
                        }
                        cls = cls.getSuperclass();
                        if (cls == null) {
                            break;
                        }
                    }
                }
            }
            this.LIZJ.LIZLLL(this.LIZ);
        }
    }

    public AssembleExtKt$assemble$serviceStore$3$1(Fragment fragment, CxE cxE, Assembler assembler) {
        this.LIZ = fragment;
        this.LIZIZ = cxE;
        this.LIZJ = assembler;
    }
}
