static void qemu_input_event_trace(QemuConsole *src, InputEvent *evt)

{

    const char *name;

    int qcode, idx = -1;



    if (src) {

        idx = qemu_console_get_index(src);

    }

    switch (evt->kind) {

    case INPUT_EVENT_KIND_KEY:

        switch (evt->key->key->kind) {

        case KEY_VALUE_KIND_NUMBER:

            qcode = qemu_input_key_number_to_qcode(evt->key->key->number);

            name = QKeyCode_lookup[qcode];

            trace_input_event_key_number(idx, evt->key->key->number,

                                         name, evt->key->down);

            break;

        case KEY_VALUE_KIND_QCODE:

            name = QKeyCode_lookup[evt->key->key->qcode];

            trace_input_event_key_qcode(idx, name, evt->key->down);

            break;

        case KEY_VALUE_KIND_MAX:

            /* keep gcc happy */

            break;

        }

        break;

    case INPUT_EVENT_KIND_BTN:

        name = InputButton_lookup[evt->btn->button];

        trace_input_event_btn(idx, name, evt->btn->down);

        break;

    case INPUT_EVENT_KIND_REL:

        name = InputAxis_lookup[evt->rel->axis];

        trace_input_event_rel(idx, name, evt->rel->value);

        break;

    case INPUT_EVENT_KIND_ABS:

        name = InputAxis_lookup[evt->abs->axis];

        trace_input_event_abs(idx, name, evt->abs->value);

        break;

    case INPUT_EVENT_KIND_MAX:

        /* keep gcc happy */

        break;

    }

}

static void qemu_input_event_trace(QemuConsole *src, InputEvent *evt)

{

    const char *name;

    int qcode, idx = -1;



    if (src) {

        idx = qemu_console_get_index(src);

    }

    switch (evt->kind) {

    case INPUT_EVENT_KIND_KEY:

        switch (evt->key->key->kind) {

        case KEY_VALUE_KIND_NUMBER:

            qcode = qemu_input_key_number_to_qcode(evt->key->key->number);

            name = QKeyCode_lookup[qcode];

            trace_input_event_key_number(idx, evt->key->key->number,

                                         name, evt->key->down);

            break;

        case KEY_VALUE_KIND_QCODE:

            name = QKeyCode_lookup[evt->key->key->qcode];

            trace_input_event_key_qcode(idx, name, evt->key->down);

            break;

        case KEY_VALUE_KIND_MAX:

            

            break;

        }

        break;

    case INPUT_EVENT_KIND_BTN:

        name = InputButton_lookup[evt->btn->button];

        trace_input_event_btn(idx, name, evt->btn->down);

        break;

    case INPUT_EVENT_KIND_REL:

        name = InputAxis_lookup[evt->rel->axis];

        trace_input_event_rel(idx, name, evt->rel->value);

        break;

    case INPUT_EVENT_KIND_ABS:

        name = InputAxis_lookup[evt->abs->axis];

        trace_input_event_abs(idx, name, evt->abs->value);

        break;

    case INPUT_EVENT_KIND_MAX:

        

        break;

    }

}

static void FUNC_0(QemuConsole *VAR_0, InputEvent *VAR_1)

{

    const char *VAR_2;

    int VAR_3, VAR_4 = -1;



    if (VAR_0) {

        VAR_4 = qemu_console_get_index(VAR_0);

    }

    switch (VAR_1->kind) {

    case INPUT_EVENT_KIND_KEY:

        switch (VAR_1->key->key->kind) {

        case KEY_VALUE_KIND_NUMBER:

            VAR_3 = qemu_input_key_number_to_qcode(VAR_1->key->key->number);

            VAR_2 = QKeyCode_lookup[VAR_3];

            trace_input_event_key_number(VAR_4, VAR_1->key->key->number,

                                         VAR_2, VAR_1->key->down);

            break;

        case KEY_VALUE_KIND_QCODE:

            VAR_2 = QKeyCode_lookup[VAR_1->key->key->VAR_3];

            trace_input_event_key_qcode(VAR_4, VAR_2, VAR_1->key->down);

            break;

        case KEY_VALUE_KIND_MAX:

            

            break;

        }

        break;

    case INPUT_EVENT_KIND_BTN:

        VAR_2 = InputButton_lookup[VAR_1->btn->button];

        trace_input_event_btn(VAR_4, VAR_2, VAR_1->btn->down);

        break;

    case INPUT_EVENT_KIND_REL:

        VAR_2 = InputAxis_lookup[VAR_1->rel->axis];

        trace_input_event_rel(VAR_4, VAR_2, VAR_1->rel->value);

        break;

    case INPUT_EVENT_KIND_ABS:

        VAR_2 = InputAxis_lookup[VAR_1->abs->axis];

        trace_input_event_abs(VAR_4, VAR_2, VAR_1->abs->value);

        break;

    case INPUT_EVENT_KIND_MAX:

        

        break;

    }

}

static void FUNC_0(QemuConsole *VAR_0, InputEvent *VAR_1)
{ const char *VAR_2; int VAR_3, VAR_4 = -1; if (VAR_0) { VAR_4 = qemu_console_get_index(VAR_0); } switch (VAR_1->kind) { case INPUT_EVENT_KIND_KEY:
switch (VAR_1->key->key->kind) { case KEY_VALUE_KIND_NUMBER:
VAR_3 = qemu_input_key_number_to_qcode(VAR_1->key->key->number); VAR_2 = QKeyCode_lookup[VAR_3]; trace_input_event_key_number(VAR_4, VAR_1->key->key->number,
VAR_2, VAR_1->key->down); break; case KEY_VALUE_KIND_QCODE:
VAR_2 = QKeyCode_lookup[VAR_1->key->key->VAR_3]; trace_input_event_key_qcode(VAR_4, VAR_2, VAR_1->key->down); break; case KEY_VALUE_KIND_MAX:
break; } break; case INPUT_EVENT_KIND_BTN:
VAR_2 = InputButton_lookup[VAR_1->btn->button]; trace_input_event_btn(VAR_4, VAR_2, VAR_1->btn->down); break; case INPUT_EVENT_KIND_REL:
VAR_2 = InputAxis_lookup[VAR_1->rel->axis]; trace_input_event_rel(VAR_4, VAR_2, VAR_1->rel->value); break; case INPUT_EVENT_KIND_ABS:
VAR_2 = InputAxis_lookup[VAR_1->abs->axis]; trace_input_event_abs(VAR_4, VAR_2, VAR_1->abs->value); break; case INPUT_EVENT_KIND_MAX:
break; } }