static void openpic_save(QEMUFile* f, void *opaque)

{

    OpenPICState *opp = (OpenPICState *)opaque;

    unsigned int i;



    qemu_put_be32s(f, &opp->glbc);

    qemu_put_be32s(f, &opp->veni);

    qemu_put_be32s(f, &opp->pint);

    qemu_put_be32s(f, &opp->spve);

    qemu_put_be32s(f, &opp->tifr);



    for (i = 0; i < opp->max_irq; i++) {

        qemu_put_be32s(f, &opp->src[i].ipvp);

        qemu_put_be32s(f, &opp->src[i].ide);

        qemu_put_sbe32s(f, &opp->src[i].last_cpu);

        qemu_put_sbe32s(f, &opp->src[i].pending);

    }



    qemu_put_be32s(f, &opp->nb_cpus);



    for (i = 0; i < opp->nb_cpus; i++) {

        qemu_put_be32s(f, &opp->dst[i].pctp);

        qemu_put_be32s(f, &opp->dst[i].pcsr);

        openpic_save_IRQ_queue(f, &opp->dst[i].raised);

        openpic_save_IRQ_queue(f, &opp->dst[i].servicing);

    }



    for (i = 0; i < MAX_TMR; i++) {

        qemu_put_be32s(f, &opp->timers[i].ticc);

        qemu_put_be32s(f, &opp->timers[i].tibc);

    }

}

static void openpic_save(QEMUFile* f, void *opaque)

{

    OpenPICState *opp = (OpenPICState *)opaque;

    unsigned int i;



    qemu_put_be32s(f, &opp->glbc);

    qemu_put_be32s(f, &opp->veni);

    qemu_put_be32s(f, &opp->pint);

    qemu_put_be32s(f, &opp->spve);

    qemu_put_be32s(f, &opp->tifr);



    for (i = 0; i < opp->max_irq; i++) {

        qemu_put_be32s(f, &opp->src[i].ipvp);

        qemu_put_be32s(f, &opp->src[i].ide);

        qemu_put_sbe32s(f, &opp->src[i].last_cpu);

        qemu_put_sbe32s(f, &opp->src[i].pending);

    }



    qemu_put_be32s(f, &opp->nb_cpus);



    for (i = 0; i < opp->nb_cpus; i++) {

        qemu_put_be32s(f, &opp->dst[i].pctp);

        qemu_put_be32s(f, &opp->dst[i].pcsr);

        openpic_save_IRQ_queue(f, &opp->dst[i].raised);

        openpic_save_IRQ_queue(f, &opp->dst[i].servicing);

    }



    for (i = 0; i < MAX_TMR; i++) {

        qemu_put_be32s(f, &opp->timers[i].ticc);

        qemu_put_be32s(f, &opp->timers[i].tibc);

    }

}

static void FUNC_0(QEMUFile* VAR_0, void *VAR_1)

{

    OpenPICState *opp = (OpenPICState *)VAR_1;

    unsigned int VAR_2;



    qemu_put_be32s(VAR_0, &opp->glbc);

    qemu_put_be32s(VAR_0, &opp->veni);

    qemu_put_be32s(VAR_0, &opp->pint);

    qemu_put_be32s(VAR_0, &opp->spve);

    qemu_put_be32s(VAR_0, &opp->tifr);



    for (VAR_2 = 0; VAR_2 < opp->max_irq; VAR_2++) {

        qemu_put_be32s(VAR_0, &opp->src[VAR_2].ipvp);

        qemu_put_be32s(VAR_0, &opp->src[VAR_2].ide);

        qemu_put_sbe32s(VAR_0, &opp->src[VAR_2].last_cpu);

        qemu_put_sbe32s(VAR_0, &opp->src[VAR_2].pending);

    }



    qemu_put_be32s(VAR_0, &opp->nb_cpus);



    for (VAR_2 = 0; VAR_2 < opp->nb_cpus; VAR_2++) {

        qemu_put_be32s(VAR_0, &opp->dst[VAR_2].pctp);

        qemu_put_be32s(VAR_0, &opp->dst[VAR_2].pcsr);

        openpic_save_IRQ_queue(VAR_0, &opp->dst[VAR_2].raised);

        openpic_save_IRQ_queue(VAR_0, &opp->dst[VAR_2].servicing);

    }



    for (VAR_2 = 0; VAR_2 < MAX_TMR; VAR_2++) {

        qemu_put_be32s(VAR_0, &opp->timers[VAR_2].ticc);

        qemu_put_be32s(VAR_0, &opp->timers[VAR_2].tibc);

    }

}

static void FUNC_0(QEMUFile* VAR_0, void *VAR_1)
{ OpenPICState *opp = (OpenPICState *)VAR_1; unsigned int VAR_2; qemu_put_be32s(VAR_0, &opp->glbc); qemu_put_be32s(VAR_0, &opp->veni); qemu_put_be32s(VAR_0, &opp->pint); qemu_put_be32s(VAR_0, &opp->spve); qemu_put_be32s(VAR_0, &opp->tifr); for (VAR_2 = 0; VAR_2 < opp->max_irq; VAR_2++) { qemu_put_be32s(VAR_0, &opp->src[VAR_2].ipvp); qemu_put_be32s(VAR_0, &opp->src[VAR_2].ide); qemu_put_sbe32s(VAR_0, &opp->src[VAR_2].last_cpu); qemu_put_sbe32s(VAR_0, &opp->src[VAR_2].pending); } qemu_put_be32s(VAR_0, &opp->nb_cpus); for (VAR_2 = 0; VAR_2 < opp->nb_cpus; VAR_2++) { qemu_put_be32s(VAR_0, &opp->dst[VAR_2].pctp); qemu_put_be32s(VAR_0, &opp->dst[VAR_2].pcsr); openpic_save_IRQ_queue(VAR_0, &opp->dst[VAR_2].raised); openpic_save_IRQ_queue(VAR_0, &opp->dst[VAR_2].servicing); } for (VAR_2 = 0; VAR_2 < MAX_TMR; VAR_2++) { qemu_put_be32s(VAR_0, &opp->timers[VAR_2].ticc); qemu_put_be32s(VAR_0, &opp->timers[VAR_2].tibc); } }