void netdev_del_completion(ReadLineState *rs, int nb_args, const char *str)

{

    int len, count, i;

    NetClientState *ncs[MAX_QUEUE_NUM];



    if (nb_args != 2) {

        return;

    }



    len = strlen(str);

    readline_set_completion_index(rs, len);

    count = qemu_find_net_clients_except(NULL, ncs, NET_CLIENT_OPTIONS_KIND_NIC,

                                         MAX_QUEUE_NUM);

    for (i = 0; i < count; i++) {

        QemuOpts *opts;

        const char *name = ncs[i]->name;

        if (strncmp(str, name, len)) {

            continue;

        }

        opts = qemu_opts_find(qemu_find_opts_err("netdev", NULL), name);

        if (opts) {

            readline_add_completion(rs, name);

        }

    }

}

void netdev_del_completion(ReadLineState *rs, int nb_args, const char *str)

{

    int len, count, i;

    NetClientState *ncs[MAX_QUEUE_NUM];



    if (nb_args != 2) {

        return;

    }



    len = strlen(str);

    readline_set_completion_index(rs, len);

    count = qemu_find_net_clients_except(NULL, ncs, NET_CLIENT_OPTIONS_KIND_NIC,

                                         MAX_QUEUE_NUM);

    for (i = 0; i < count; i++) {

        QemuOpts *opts;

        const char *name = ncs[i]->name;

        if (strncmp(str, name, len)) {

            continue;

        }

        opts = qemu_opts_find(qemu_find_opts_err("netdev", NULL), name);

        if (opts) {

            readline_add_completion(rs, name);

        }

    }

}

    for (i = 0; i < count; i++) {
void FUNC_0(ReadLineState *VAR_0, int VAR_1, const char *VAR_2)

{

    int VAR_3, VAR_4, VAR_5;

    NetClientState *ncs[MAX_QUEUE_NUM];



    if (VAR_1 != 2) {

        return;

    }



    VAR_3 = strlen(VAR_2);

    readline_set_completion_index(VAR_0, VAR_3);

    VAR_4 = qemu_find_net_clients_except(NULL, ncs, NET_CLIENT_OPTIONS_KIND_NIC,

                                         MAX_QUEUE_NUM);

    for (VAR_5 = 0; VAR_5 < VAR_4; VAR_5++) {

        QemuOpts *opts;

        const char *VAR_6 = ncs[VAR_5]->VAR_6;

        if (strncmp(VAR_2, VAR_6, VAR_3)) {

            continue;

        }

        opts = qemu_opts_find(qemu_find_opts_err("netdev", NULL), VAR_6);

        if (opts) {

            readline_add_completion(VAR_0, VAR_6);

        }

    }

}

void FUNC_0(ReadLineState *VAR_0, int VAR_1, const char *VAR_2)
{ int VAR_3, VAR_4, VAR_5; NetClientState *ncs[MAX_QUEUE_NUM]; if (VAR_1 != 2) { return; } VAR_3 = strlen(VAR_2); readline_set_completion_index(VAR_0, VAR_3); VAR_4 = qemu_find_net_clients_except(NULL, ncs, NET_CLIENT_OPTIONS_KIND_NIC,
MAX_QUEUE_NUM); for (VAR_5 = 0; VAR_5 < VAR_4; VAR_5++) { QemuOpts *opts; const char *VAR_6 = ncs[VAR_5]->VAR_6; if (strncmp(VAR_2, VAR_6, VAR_3)) { continue; } opts = qemu_opts_find(qemu_find_opts_err("netdev", NULL), VAR_6); if (opts) { readline_add_completion(VAR_0, VAR_6); } } }