static void hb_regs_write(void *opaque, hwaddr offset,

                          uint64_t value, unsigned size)

{

    uint32_t *regs = opaque;



    if (offset == 0xf00) {

        if (value == 1 || value == 2) {

            qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);

        } else if (value == 3) {

            qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);

        }

    }



    regs[offset/4] = value;

}

static void hb_regs_write(void *opaque, hwaddr offset,

                          uint64_t value, unsigned size)

{

    uint32_t *regs = opaque;



    if (offset == 0xf00) {

        if (value == 1 || value == 2) {

            qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);

        } else if (value == 3) {

            qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);

        }

    }



    regs[offset/4] = value;

}

static void FUNC_0(void *VAR_0, hwaddr VAR_1,

                          uint64_t VAR_2, unsigned VAR_3)

{

    uint32_t *regs = VAR_0;



    if (VAR_1 == 0xf00) {

        if (VAR_2 == 1 || VAR_2 == 2) {

            qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);

        } else if (VAR_2 == 3) {

            qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);

        }

    }



    regs[VAR_1/4] = VAR_2;

}

static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{ uint32_t *regs = VAR_0; if (VAR_1 == 0xf00) { if (VAR_2 == 1 || VAR_2 == 2) { qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); } else if (VAR_2 == 3) { qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); } } regs[VAR_1/4] = VAR_2; }