static void qdict_do_flatten(QDict *qdict, QDict *target, const char *prefix)

{

    QObject *value;

    const QDictEntry *entry, *next;

    const char *new_key;

    bool delete;



    entry = qdict_first(qdict);



    while (entry != NULL) {



        next = qdict_next(qdict, entry);

        value = qdict_entry_value(entry);

        new_key = NULL;

        delete = false;



        if (prefix) {

            qobject_incref(value);

            new_key = g_strdup_printf("%s.%s", prefix, entry->key);

            qdict_put_obj(target, new_key, value);

            delete = true;

        }



        if (qobject_type(value) == QTYPE_QDICT) {

            qdict_do_flatten(qobject_to_qdict(value), target,

                             new_key ? new_key : entry->key);

            delete = true;

        }



        if (delete) {

            qdict_del(qdict, entry->key);



            /* Restart loop after modifying the iterated QDict */

            entry = qdict_first(qdict);

            continue;

        }



        entry = next;

    }

}

static void qdict_do_flatten(QDict *qdict, QDict *target, const char *prefix)

{

    QObject *value;

    const QDictEntry *entry, *next;

    const char *new_key;

    bool delete;



    entry = qdict_first(qdict);



    while (entry != NULL) {



        next = qdict_next(qdict, entry);

        value = qdict_entry_value(entry);

        new_key = NULL;

        delete = false;



        if (prefix) {

            qobject_incref(value);

            new_key = g_strdup_printf("%s.%s", prefix, entry->key);

            qdict_put_obj(target, new_key, value);

            delete = true;

        }



        if (qobject_type(value) == QTYPE_QDICT) {

            qdict_do_flatten(qobject_to_qdict(value), target,

                             new_key ? new_key : entry->key);

            delete = true;

        }



        if (delete) {

            qdict_del(qdict, entry->key);



            

            entry = qdict_first(qdict);

            continue;

        }



        entry = next;

    }

}

    const char *new_key;
static void FUNC_0(QDict *VAR_0, QDict *VAR_1, const char *VAR_2)

{

    QObject *value;

    const QDictEntry *VAR_3, *next;

    const char *VAR_4;

    bool delete;



    VAR_3 = qdict_first(VAR_0);



    while (VAR_3 != NULL) {



        next = qdict_next(VAR_0, VAR_3);

        value = qdict_entry_value(VAR_3);

        VAR_4 = NULL;

        delete = false;



        if (VAR_2) {

            qobject_incref(value);

            VAR_4 = g_strdup_printf("%s.%s", VAR_2, VAR_3->key);

            qdict_put_obj(VAR_1, VAR_4, value);

            delete = true;

        }



        if (qobject_type(value) == QTYPE_QDICT) {

            FUNC_0(qobject_to_qdict(value), VAR_1,

                             VAR_4 ? VAR_4 : VAR_3->key);

            delete = true;

        }



        if (delete) {

            qdict_del(VAR_0, VAR_3->key);



            

            VAR_3 = qdict_first(VAR_0);

            continue;

        }



        VAR_3 = next;

    }

}

static void FUNC_0(QDict *VAR_0, QDict *VAR_1, const char *VAR_2)
{ QObject *value; const QDictEntry *VAR_3, *next; const char *VAR_4; bool delete; VAR_3 = qdict_first(VAR_0); while (VAR_3 != NULL) { next = qdict_next(VAR_0, VAR_3); value = qdict_entry_value(VAR_3); VAR_4 = NULL; delete = false; if (VAR_2) { qobject_incref(value); VAR_4 = g_strdup_printf("%s.%s", VAR_2, VAR_3->key); qdict_put_obj(VAR_1, VAR_4, value); delete = true; } if (qobject_type(value) == QTYPE_QDICT) { FUNC_0(qobject_to_qdict(value), VAR_1,
VAR_4 ? VAR_4 : VAR_3->key); delete = true; } if (delete) { qdict_del(VAR_0, VAR_3->key); VAR_3 = qdict_first(VAR_0); continue; } VAR_3 = next; } }