void qxl_log_command(PCIQXLDevice *qxl, const char *ring, QXLCommandExt *ext)

{

    bool compat = ext->flags & QXL_COMMAND_FLAG_COMPAT;

    void *data;



    if (!qxl->cmdlog) {

        return;

    }

    fprintf(stderr, "%" PRId64 " qxl-%d/%s:", qemu_get_clock_ns(vm_clock),

            qxl->id, ring);

    fprintf(stderr, " cmd @ 0x%" PRIx64 " %s%s", ext->cmd.data,

            qxl_name(qxl_type, ext->cmd.type),

            compat ? "(compat)" : "");



    data = qxl_phys2virt(qxl, ext->cmd.data, ext->group_id);

    switch (ext->cmd.type) {

    case QXL_CMD_DRAW:

        if (!compat) {

            qxl_log_cmd_draw(qxl, data, ext->group_id);

        } else {

            qxl_log_cmd_draw_compat(qxl, data, ext->group_id);

        }

        break;

    case QXL_CMD_SURFACE:

        qxl_log_cmd_surface(qxl, data);

        break;

    case QXL_CMD_CURSOR:

        qxl_log_cmd_cursor(qxl, data, ext->group_id);

        break;

    }

    fprintf(stderr, "\n");

}

void qxl_log_command(PCIQXLDevice *qxl, const char *ring, QXLCommandExt *ext)

{

    bool compat = ext->flags & QXL_COMMAND_FLAG_COMPAT;

    void *data;



    if (!qxl->cmdlog) {

        return;

    }

    fprintf(stderr, "%" PRId64 " qxl-%d/%s:", qemu_get_clock_ns(vm_clock),

            qxl->id, ring);

    fprintf(stderr, " cmd @ 0x%" PRIx64 " %s%s", ext->cmd.data,

            qxl_name(qxl_type, ext->cmd.type),

            compat ? "(compat)" : "");



    data = qxl_phys2virt(qxl, ext->cmd.data, ext->group_id);

    switch (ext->cmd.type) {

    case QXL_CMD_DRAW:

        if (!compat) {

            qxl_log_cmd_draw(qxl, data, ext->group_id);

        } else {

            qxl_log_cmd_draw_compat(qxl, data, ext->group_id);

        }

        break;

    case QXL_CMD_SURFACE:

        qxl_log_cmd_surface(qxl, data);

        break;

    case QXL_CMD_CURSOR:

        qxl_log_cmd_cursor(qxl, data, ext->group_id);

        break;

    }

    fprintf(stderr, "\n");

}

void FUNC_0(PCIQXLDevice *VAR_0, const char *VAR_1, QXLCommandExt *VAR_2)

{

    bool compat = VAR_2->flags & QXL_COMMAND_FLAG_COMPAT;

    void *VAR_3;



    if (!VAR_0->cmdlog) {

        return;

    }

    fprintf(stderr, "%" PRId64 " VAR_0-%d/%s:", qemu_get_clock_ns(vm_clock),

            VAR_0->id, VAR_1);

    fprintf(stderr, " cmd @ 0x%" PRIx64 " %s%s", VAR_2->cmd.VAR_3,

            qxl_name(qxl_type, VAR_2->cmd.type),

            compat ? "(compat)" : "");



    VAR_3 = qxl_phys2virt(VAR_0, VAR_2->cmd.VAR_3, VAR_2->group_id);

    switch (VAR_2->cmd.type) {

    case QXL_CMD_DRAW:

        if (!compat) {

            qxl_log_cmd_draw(VAR_0, VAR_3, VAR_2->group_id);

        } else {

            qxl_log_cmd_draw_compat(VAR_0, VAR_3, VAR_2->group_id);

        }

        break;

    case QXL_CMD_SURFACE:

        qxl_log_cmd_surface(VAR_0, VAR_3);

        break;

    case QXL_CMD_CURSOR:

        qxl_log_cmd_cursor(VAR_0, VAR_3, VAR_2->group_id);

        break;

    }

    fprintf(stderr, "\n");

}

void FUNC_0(PCIQXLDevice *VAR_0, const char *VAR_1, QXLCommandExt *VAR_2)
{ bool compat = VAR_2->flags & QXL_COMMAND_FLAG_COMPAT; void *VAR_3; if (!VAR_0->cmdlog) { return; } fprintf(stderr, "%" PRId64 " VAR_0-%d/%s:", qemu_get_clock_ns(vm_clock),
VAR_0->id, VAR_1); fprintf(stderr, " cmd @ 0x%" PRIx64 " %s%s", VAR_2->cmd.VAR_3,
qxl_name(qxl_type, VAR_2->cmd.type),
compat ? "(compat)" : ""); VAR_3 = qxl_phys2virt(VAR_0, VAR_2->cmd.VAR_3, VAR_2->group_id); switch (VAR_2->cmd.type) { case QXL_CMD_DRAW:
if (!compat) { qxl_log_cmd_draw(VAR_0, VAR_3, VAR_2->group_id); } else { qxl_log_cmd_draw_compat(VAR_0, VAR_3, VAR_2->group_id); } break; case QXL_CMD_SURFACE:
qxl_log_cmd_surface(VAR_0, VAR_3); break; case QXL_CMD_CURSOR:
qxl_log_cmd_cursor(VAR_0, VAR_3, VAR_2->group_id); break; } fprintf(stderr, "\n"); }