static void sp804_write(void *opaque, target_phys_addr_t offset,

                        uint64_t value, unsigned size)

{

    sp804_state *s = (sp804_state *)opaque;



    if (offset < 0x20) {

        arm_timer_write(s->timer[0], offset, value);

        return;

    }



    if (offset < 0x40) {

        arm_timer_write(s->timer[1], offset - 0x20, value);

        return;

    }



    /* Technically we could be writing to the Test Registers, but not likely */

    hw_error("%s: Bad offset %x\n", __func__, (int)offset);

}

static void sp804_write(void *opaque, target_phys_addr_t offset,

                        uint64_t value, unsigned size)

{

    sp804_state *s = (sp804_state *)opaque;



    if (offset < 0x20) {

        arm_timer_write(s->timer[0], offset, value);

        return;

    }



    if (offset < 0x40) {

        arm_timer_write(s->timer[1], offset - 0x20, value);

        return;

    }



    

    hw_error("%s: Bad offset %x\n", __func__, (int)offset);

}

static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,

                        uint64_t VAR_2, unsigned VAR_3)

{

    sp804_state *s = (sp804_state *)VAR_0;



    if (VAR_1 < 0x20) {

        arm_timer_write(s->timer[0], VAR_1, VAR_2);

        return;

    }



    if (VAR_1 < 0x40) {

        arm_timer_write(s->timer[1], VAR_1 - 0x20, VAR_2);

        return;

    }



    

    hw_error("%s: Bad VAR_1 %x\n", __func__, (int)VAR_1);

}

static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{ sp804_state *s = (sp804_state *)VAR_0; if (VAR_1 < 0x20) { arm_timer_write(s->timer[0], VAR_1, VAR_2); return; } if (VAR_1 < 0x40) { arm_timer_write(s->timer[1], VAR_1 - 0x20, VAR_2); return; } hw_error("%s: Bad VAR_1 %x\n", __func__, (int)VAR_1); }