void nbd_client_new(NBDExport *exp,

                    QIOChannelSocket *sioc,

                    QCryptoTLSCreds *tlscreds,

                    const char *tlsaclname,

                    void (*close_fn)(NBDClient *))

{

    NBDClient *client;

    NBDClientNewData *data = g_new(NBDClientNewData, 1);



    client = g_malloc0(sizeof(NBDClient));

    client->refcount = 1;

    client->exp = exp;

    client->tlscreds = tlscreds;

    if (tlscreds) {

        object_ref(OBJECT(client->tlscreds));

    }

    client->tlsaclname = g_strdup(tlsaclname);

    client->sioc = sioc;

    object_ref(OBJECT(client->sioc));

    client->ioc = QIO_CHANNEL(sioc);

    object_ref(OBJECT(client->ioc));

    client->close = close_fn;



    data->client = client;

    data->co = qemu_coroutine_create(nbd_co_client_start, data);

    qemu_coroutine_enter(data->co);

}

void nbd_client_new(NBDExport *exp,

                    QIOChannelSocket *sioc,

                    QCryptoTLSCreds *tlscreds,

                    const char *tlsaclname,

                    void (*close_fn)(NBDClient *))

{

    NBDClient *client;

    NBDClientNewData *data = g_new(NBDClientNewData, 1);



    client = g_malloc0(sizeof(NBDClient));

    client->refcount = 1;

    client->exp = exp;

    client->tlscreds = tlscreds;

    if (tlscreds) {

        object_ref(OBJECT(client->tlscreds));

    }

    client->tlsaclname = g_strdup(tlsaclname);

    client->sioc = sioc;

    object_ref(OBJECT(client->sioc));

    client->ioc = QIO_CHANNEL(sioc);

    object_ref(OBJECT(client->ioc));

    client->close = close_fn;



    data->client = client;

    data->co = qemu_coroutine_create(nbd_co_client_start, data);

    qemu_coroutine_enter(data->co);

}

                    void (*close_fn)(NBDClient *))     client->close = close_fn;
VAR_5voidVAR_5 VAR_5nbd_client_newVAR_5(VAR_5NBDExportVAR_5 *VAR_5VAR_0VAR_5,

                    VAR_5QIOChannelSocketVAR_5 *VAR_5VAR_1VAR_5,

                    VAR_5QCryptoTLSCredsVAR_5 *VAR_5VAR_2VAR_5,

                    VAR_5constVAR_5 VAR_5charVAR_5 *VAR_5VAR_3VAR_5,

                    VAR_5voidVAR_5 (*VAR_5VAR_4VAR_5)(VAR_5NBDClientVAR_5 *))

{

    VAR_5NBDClientVAR_5 *VAR_5clientVAR_5;

    VAR_5NBDClientNewDataVAR_5 *VAR_5dataVAR_5 = VAR_5g_newVAR_5(VAR_5NBDClientNewDataVAR_5, VAR_51VAR_5);



    VAR_5clientVAR_5 = VAR_5g_malloc0VAR_5(VAR_5sizeofVAR_5(VAR_5NBDClientVAR_5));

    VAR_5clientVAR_5->VAR_5refcountVAR_5 = VAR_51VAR_5;

    VAR_5clientVAR_5->VAR_5VAR_0VAR_5 = VAR_5VAR_0VAR_5;

    VAR_5clientVAR_5->VAR_5VAR_2VAR_5 = VAR_5VAR_2VAR_5;

    VAR_5ifVAR_5 (VAR_5VAR_2VAR_5) {

        VAR_5object_refVAR_5(VAR_5OBJECTVAR_5(VAR_5clientVAR_5->VAR_5VAR_2VAR_5));

    }

    VAR_5clientVAR_5->VAR_5VAR_3VAR_5 = VAR_5g_strdupVAR_5(VAR_5VAR_3VAR_5);

    VAR_5clientVAR_5->VAR_5VAR_1VAR_5 = VAR_5VAR_1VAR_5;

    VAR_5object_refVAR_5(VAR_5OBJECTVAR_5(VAR_5clientVAR_5->VAR_5VAR_1VAR_5));

    VAR_5clientVAR_5->VAR_5iocVAR_5 = VAR_5QIO_CHANNELVAR_5(VAR_5VAR_1VAR_5);

    VAR_5object_refVAR_5(VAR_5OBJECTVAR_5(VAR_5clientVAR_5->VAR_5iocVAR_5));

    VAR_5clientVAR_5->VAR_5closeVAR_5 = VAR_5VAR_4VAR_5;



    VAR_5dataVAR_5->VAR_5clientVAR_5 = VAR_5clientVAR_5;

    VAR_5dataVAR_5->VAR_5coVAR_5 = VAR_5qemu_coroutine_createVAR_5(VAR_5nbd_co_client_startVAR_5, VAR_5dataVAR_5);

    VAR_5qemu_coroutine_enterVAR_5(VAR_5dataVAR_5->VAR_5coVAR_5);

}

VAR_5voidVAR_5 VAR_5nbd_client_newVAR_5(VAR_5NBDExportVAR_5 *VAR_5VAR_0VAR_5,
VAR_5QIOChannelSocketVAR_5 *VAR_5VAR_1VAR_5,
VAR_5QCryptoTLSCredsVAR_5 *VAR_5VAR_2VAR_5,
VAR_5constVAR_5 VAR_5charVAR_5 *VAR_5VAR_3VAR_5,
VAR_5voidVAR_5 (*VAR_5VAR_4VAR_5)(VAR_5NBDClientVAR_5 *))
{ VAR_5NBDClientVAR_5 *VAR_5clientVAR_5; VAR_5NBDClientNewDataVAR_5 *VAR_5dataVAR_5 = VAR_5g_newVAR_5(VAR_5NBDClientNewDataVAR_5, VAR_51VAR_5); VAR_5clientVAR_5 = VAR_5g_malloc0VAR_5(VAR_5sizeofVAR_5(VAR_5NBDClientVAR_5)); VAR_5clientVAR_5->VAR_5refcountVAR_5 = VAR_51VAR_5; VAR_5clientVAR_5->VAR_5VAR_0VAR_5 = VAR_5VAR_0VAR_5; VAR_5clientVAR_5->VAR_5VAR_2VAR_5 = VAR_5VAR_2VAR_5; VAR_5ifVAR_5 (VAR_5VAR_2VAR_5) { VAR_5object_refVAR_5(VAR_5OBJECTVAR_5(VAR_5clientVAR_5->VAR_5VAR_2VAR_5)); } VAR_5clientVAR_5->VAR_5VAR_3VAR_5 = VAR_5g_strdupVAR_5(VAR_5VAR_3VAR_5); VAR_5clientVAR_5->VAR_5VAR_1VAR_5 = VAR_5VAR_1VAR_5; VAR_5object_refVAR_5(VAR_5OBJECTVAR_5(VAR_5clientVAR_5->VAR_5VAR_1VAR_5)); VAR_5clientVAR_5->VAR_5iocVAR_5 = VAR_5QIO_CHANNELVAR_5(VAR_5VAR_1VAR_5); VAR_5object_refVAR_5(VAR_5OBJECTVAR_5(VAR_5clientVAR_5->VAR_5iocVAR_5)); VAR_5clientVAR_5->VAR_5closeVAR_5 = VAR_5VAR_4VAR_5; VAR_5dataVAR_5->VAR_5clientVAR_5 = VAR_5clientVAR_5; VAR_5dataVAR_5->VAR_5coVAR_5 = VAR_5qemu_coroutine_createVAR_5(VAR_5nbd_co_client_startVAR_5, VAR_5dataVAR_5); VAR_5qemu_coroutine_enterVAR_5(VAR_5dataVAR_5->VAR_5coVAR_5); }