static void type_initialize(TypeImpl *ti)

{

    TypeImpl *parent;



    if (ti->class) {

        return;

    }



    ti->class_size = type_class_get_size(ti);

    ti->instance_size = type_object_get_size(ti);



    ti->class = g_malloc0(ti->class_size);



    parent = type_get_parent(ti);

    if (parent) {

        type_initialize(parent);

        GSList *e;

        int i;



        g_assert(parent->class_size <= ti->class_size);

        memcpy(ti->class, parent->class, parent->class_size);

        ti->class->interfaces = NULL;



        for (e = parent->class->interfaces; e; e = e->next) {

            ObjectClass *iface = e->data;

            type_initialize_interface(ti, object_class_get_name(iface));

        }



        for (i = 0; i < ti->num_interfaces; i++) {

            TypeImpl *t = type_get_by_name(ti->interfaces[i].typename);

            for (e = ti->class->interfaces; e; e = e->next) {

                TypeImpl *target_type = OBJECT_CLASS(e->data)->type;



                if (type_is_ancestor(target_type, t)) {

                    break;

                }

            }



            if (e) {

                continue;

            }



            type_initialize_interface(ti, ti->interfaces[i].typename);

        }

    }



    ti->class->type = ti;



    while (parent) {

        if (parent->class_base_init) {

            parent->class_base_init(ti->class, ti->class_data);

        }

        parent = type_get_parent(parent);

    }



    if (ti->class_init) {

        ti->class_init(ti->class, ti->class_data);

    }





}

static void type_initialize(TypeImpl *ti)

{

    TypeImpl *parent;



    if (ti->class) {

        return;

    }



    ti->class_size = type_class_get_size(ti);

    ti->instance_size = type_object_get_size(ti);



    ti->class = g_malloc0(ti->class_size);



    parent = type_get_parent(ti);

    if (parent) {

        type_initialize(parent);

        GSList *e;

        int i;



        g_assert(parent->class_size <= ti->class_size);

        memcpy(ti->class, parent->class, parent->class_size);

        ti->class->interfaces = NULL;



        for (e = parent->class->interfaces; e; e = e->next) {

            ObjectClass *iface = e->data;

            type_initialize_interface(ti, object_class_get_name(iface));

        }



        for (i = 0; i < ti->num_interfaces; i++) {

            TypeImpl *t = type_get_by_name(ti->interfaces[i].typename);

            for (e = ti->class->interfaces; e; e = e->next) {

                TypeImpl *target_type = OBJECT_CLASS(e->data)->type;



                if (type_is_ancestor(target_type, t)) {

                    break;

                }

            }



            if (e) {

                continue;

            }



            type_initialize_interface(ti, ti->interfaces[i].typename);

        }

    }



    ti->class->type = ti;



    while (parent) {

        if (parent->class_base_init) {

            parent->class_base_init(ti->class, ti->class_data);

        }

        parent = type_get_parent(parent);

    }



    if (ti->class_init) {

        ti->class_init(ti->class, ti->class_data);

    }





}

            ObjectClass *iface = e->data;             type_initialize_interface(ti, object_class_get_name(iface));             type_initialize_interface(ti, ti->interfaces[i].typename);
static void FUNC_0(TypeImpl *VAR_0)

{

    TypeImpl *parent;



    if (VAR_0->class) {

        return;

    }



    VAR_0->class_size = type_class_get_size(VAR_0);

    VAR_0->instance_size = type_object_get_size(VAR_0);



    VAR_0->class = g_malloc0(VAR_0->class_size);



    parent = type_get_parent(VAR_0);

    if (parent) {

        FUNC_0(parent);

        GSList *e;

        int VAR_1;



        g_assert(parent->class_size <= VAR_0->class_size);

        memcpy(VAR_0->class, parent->class, parent->class_size);

        VAR_0->class->interfaces = NULL;



        for (e = parent->class->interfaces; e; e = e->next) {

            ObjectClass *iface = e->data;

            type_initialize_interface(VAR_0, object_class_get_name(iface));

        }



        for (VAR_1 = 0; VAR_1 < VAR_0->num_interfaces; VAR_1++) {

            TypeImpl *t = type_get_by_name(VAR_0->interfaces[VAR_1].typename);

            for (e = VAR_0->class->interfaces; e; e = e->next) {

                TypeImpl *target_type = OBJECT_CLASS(e->data)->type;



                if (type_is_ancestor(target_type, t)) {

                    break;

                }

            }



            if (e) {

                continue;

            }



            type_initialize_interface(VAR_0, VAR_0->interfaces[VAR_1].typename);

        }

    }



    VAR_0->class->type = VAR_0;



    while (parent) {

        if (parent->class_base_init) {

            parent->class_base_init(VAR_0->class, VAR_0->class_data);

        }

        parent = type_get_parent(parent);

    }



    if (VAR_0->class_init) {

        VAR_0->class_init(VAR_0->class, VAR_0->class_data);

    }





}

static void FUNC_0(TypeImpl *VAR_0)
{ TypeImpl *parent; if (VAR_0->class) { return; } VAR_0->class_size = type_class_get_size(VAR_0); VAR_0->instance_size = type_object_get_size(VAR_0); VAR_0->class = g_malloc0(VAR_0->class_size); parent = type_get_parent(VAR_0); if (parent) { FUNC_0(parent); GSList *e; int VAR_1; g_assert(parent->class_size <= VAR_0->class_size); memcpy(VAR_0->class, parent->class, parent->class_size); VAR_0->class->interfaces = NULL; for (e = parent->class->interfaces; e; e = e->next) { ObjectClass *iface = e->data; type_initialize_interface(VAR_0, object_class_get_name(iface)); } for (VAR_1 = 0; VAR_1 < VAR_0->num_interfaces; VAR_1++) { TypeImpl *t = type_get_by_name(VAR_0->interfaces[VAR_1].typename); for (e = VAR_0->class->interfaces; e; e = e->next) { TypeImpl *target_type = OBJECT_CLASS(e->data)->type; if (type_is_ancestor(target_type, t)) { break; } } if (e) { continue; } type_initialize_interface(VAR_0, VAR_0->interfaces[VAR_1].typename); } } VAR_0->class->type = VAR_0; while (parent) { if (parent->class_base_init) { parent->class_base_init(VAR_0->class, VAR_0->class_data); } parent = type_get_parent(parent); } if (VAR_0->class_init) { VAR_0->class_init(VAR_0->class, VAR_0->class_data); } }