static void cmd646_data_write(void *opaque, target_phys_addr_t addr,

                             uint64_t data, unsigned size)

{

    CMD646BAR *cmd646bar = opaque;



    if (size == 1) {

        ide_ioport_write(cmd646bar->bus, addr, data);

    } else if (addr == 0) {

        if (size == 2) {

            ide_data_writew(cmd646bar->bus, addr, data);

        } else {

            ide_data_writel(cmd646bar->bus, addr, data);

        }

    }

}

static void cmd646_data_write(void *opaque, target_phys_addr_t addr,

                             uint64_t data, unsigned size)

{

    CMD646BAR *cmd646bar = opaque;



    if (size == 1) {

        ide_ioport_write(cmd646bar->bus, addr, data);

    } else if (addr == 0) {

        if (size == 2) {

            ide_data_writew(cmd646bar->bus, addr, data);

        } else {

            ide_data_writel(cmd646bar->bus, addr, data);

        }

    }

}

static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,

                             uint64_t VAR_2, unsigned VAR_3)

{

    CMD646BAR *cmd646bar = VAR_0;



    if (VAR_3 == 1) {

        ide_ioport_write(cmd646bar->bus, VAR_1, VAR_2);

    } else if (VAR_1 == 0) {

        if (VAR_3 == 2) {

            ide_data_writew(cmd646bar->bus, VAR_1, VAR_2);

        } else {

            ide_data_writel(cmd646bar->bus, VAR_1, VAR_2);

        }

    }

}

static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{ CMD646BAR *cmd646bar = VAR_0; if (VAR_3 == 1) { ide_ioport_write(cmd646bar->bus, VAR_1, VAR_2); } else if (VAR_1 == 0) { if (VAR_3 == 2) { ide_data_writew(cmd646bar->bus, VAR_1, VAR_2); } else { ide_data_writel(cmd646bar->bus, VAR_1, VAR_2); } } }