static void qmp_input_start_alternate(Visitor *v, const char *name,

                                      GenericAlternate **obj, size_t size,

                                      bool promote_int, Error **errp)

{

    QmpInputVisitor *qiv = to_qiv(v);

    QObject *qobj = qmp_input_get_object(qiv, name, false, errp);



    if (!qobj) {

        *obj = NULL;

        return;

    }

    *obj = g_malloc0(size);

    (*obj)->type = qobject_type(qobj);

    if (promote_int && (*obj)->type == QTYPE_QINT) {

        (*obj)->type = QTYPE_QFLOAT;

    }

}

static void qmp_input_start_alternate(Visitor *v, const char *name,

                                      GenericAlternate **obj, size_t size,

                                      bool promote_int, Error **errp)

{

    QmpInputVisitor *qiv = to_qiv(v);

    QObject *qobj = qmp_input_get_object(qiv, name, false, errp);



    if (!qobj) {

        *obj = NULL;

        return;

    }

    *obj = g_malloc0(size);

    (*obj)->type = qobject_type(qobj);

    if (promote_int && (*obj)->type == QTYPE_QINT) {

        (*obj)->type = QTYPE_QFLOAT;

    }

}

static void FUNC_0(Visitor *VAR_0, const char *VAR_1,

                                      GenericAlternate **VAR_2, size_t VAR_3,

                                      bool VAR_4, Error **VAR_5)

{

    QmpInputVisitor *qiv = to_qiv(VAR_0);

    QObject *qobj = qmp_input_get_object(qiv, VAR_1, false, VAR_5);



    if (!qobj) {

        *VAR_2 = NULL;

        return;

    }

    *VAR_2 = g_malloc0(VAR_3);

    (*VAR_2)->type = qobject_type(qobj);

    if (VAR_4 && (*VAR_2)->type == QTYPE_QINT) {

        (*VAR_2)->type = QTYPE_QFLOAT;

    }

}

static void FUNC_0(Visitor *VAR_0, const char *VAR_1,
GenericAlternate **VAR_2, size_t VAR_3,
bool VAR_4, Error **VAR_5)
{ QmpInputVisitor *qiv = to_qiv(VAR_0); QObject *qobj = qmp_input_get_object(qiv, VAR_1, false, VAR_5); if (!qobj) { *VAR_2 = NULL; return; } *VAR_2 = g_malloc0(VAR_3); (*VAR_2)->type = qobject_type(qobj); if (VAR_4 && (*VAR_2)->type == QTYPE_QINT) { (*VAR_2)->type = QTYPE_QFLOAT; } }