static void nvme_clear_ctrl(NvmeCtrl *n)

{

    int i;



    for (i = 0; i < n->num_queues; i++) {

        if (n->sq[i] != NULL) {

            nvme_free_sq(n->sq[i], n);

        }

    }

    for (i = 0; i < n->num_queues; i++) {

        if (n->cq[i] != NULL) {

            nvme_free_cq(n->cq[i], n);

        }

    }



    bdrv_flush(n->conf.bs);

    n->bar.cc = 0;

}

static void nvme_clear_ctrl(NvmeCtrl *n)

{

    int i;



    for (i = 0; i < n->num_queues; i++) {

        if (n->sq[i] != NULL) {

            nvme_free_sq(n->sq[i], n);

        }

    }

    for (i = 0; i < n->num_queues; i++) {

        if (n->cq[i] != NULL) {

            nvme_free_cq(n->cq[i], n);

        }

    }



    bdrv_flush(n->conf.bs);

    n->bar.cc = 0;

}

static void FUNC_0(NvmeCtrl *VAR_0)

{

    int VAR_1;



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

        if (VAR_0->sq[VAR_1] != NULL) {

            nvme_free_sq(VAR_0->sq[VAR_1], VAR_0);

        }

    }

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

        if (VAR_0->cq[VAR_1] != NULL) {

            nvme_free_cq(VAR_0->cq[VAR_1], VAR_0);

        }

    }



    bdrv_flush(VAR_0->conf.bs);

    VAR_0->bar.cc = 0;

}

static void FUNC_0(NvmeCtrl *VAR_0)
{ int VAR_1; for (VAR_1 = 0; VAR_1 < VAR_0->num_queues; VAR_1++) { if (VAR_0->sq[VAR_1] != NULL) { nvme_free_sq(VAR_0->sq[VAR_1], VAR_0); } } for (VAR_1 = 0; VAR_1 < VAR_0->num_queues; VAR_1++) { if (VAR_0->cq[VAR_1] != NULL) { nvme_free_cq(VAR_0->cq[VAR_1], VAR_0); } } bdrv_flush(VAR_0->conf.bs); VAR_0->bar.cc = 0; }