static int tcg_cpu_exec(CPUState *cpu)

{

    int ret;

#ifdef CONFIG_PROFILER

    int64_t ti;

#endif



#ifdef CONFIG_PROFILER

    ti = profile_getclock();

#endif

    if (use_icount) {

        int64_t count;

        int64_t deadline;

        int decr;

        timers_state.qemu_icount -= (cpu->icount_decr.u16.low

                                    + cpu->icount_extra);

        cpu->icount_decr.u16.low = 0;

        cpu->icount_extra = 0;

        deadline = qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL);



        /* Maintain prior (possibly buggy) behaviour where if no deadline

         * was set (as there is no QEMU_CLOCK_VIRTUAL timer) or it is more than

         * INT32_MAX nanoseconds ahead, we still use INT32_MAX

         * nanoseconds.

         */

        if ((deadline < 0) || (deadline > INT32_MAX)) {

            deadline = INT32_MAX;

        }



        count = qemu_icount_round(deadline);

        timers_state.qemu_icount += count;

        decr = (count > 0xffff) ? 0xffff : count;

        count -= decr;

        cpu->icount_decr.u16.low = decr;

        cpu->icount_extra = count;

    }

    ret = cpu_exec(cpu);

#ifdef CONFIG_PROFILER

    tcg_time += profile_getclock() - ti;

#endif

    if (use_icount) {

        /* Fold pending instructions back into the

           instruction counter, and clear the interrupt flag.  */

        timers_state.qemu_icount -= (cpu->icount_decr.u16.low

                        + cpu->icount_extra);

        cpu->icount_decr.u32 = 0;

        cpu->icount_extra = 0;

    }

    return ret;

}

static int tcg_cpu_exec(CPUState *cpu)

{

    int ret;

#ifdef CONFIG_PROFILER

    int64_t ti;

#endif



#ifdef CONFIG_PROFILER

    ti = profile_getclock();

#endif

    if (use_icount) {

        int64_t count;

        int64_t deadline;

        int decr;

        timers_state.qemu_icount -= (cpu->icount_decr.u16.low

                                    + cpu->icount_extra);

        cpu->icount_decr.u16.low = 0;

        cpu->icount_extra = 0;

        deadline = qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL);



        









        if ((deadline < 0) || (deadline > INT32_MAX)) {

            deadline = INT32_MAX;

        }



        count = qemu_icount_round(deadline);

        timers_state.qemu_icount += count;

        decr = (count > 0xffff) ? 0xffff : count;

        count -= decr;

        cpu->icount_decr.u16.low = decr;

        cpu->icount_extra = count;

    }

    ret = cpu_exec(cpu);

#ifdef CONFIG_PROFILER

    tcg_time += profile_getclock() - ti;

#endif

    if (use_icount) {

        



        timers_state.qemu_icount -= (cpu->icount_decr.u16.low

                        + cpu->icount_extra);

        cpu->icount_decr.u32 = 0;

        cpu->icount_extra = 0;

    }

    return ret;

}

static int FUNC_0(CPUState *VAR_0)

{

    int VAR_1;

#ifdef CONFIG_PROFILER

    int64_t ti;

#endif



#ifdef CONFIG_PROFILER

    ti = profile_getclock();

#endif

    if (use_icount) {

        int64_t count;

        int64_t deadline;

        int VAR_2;

        timers_state.qemu_icount -= (VAR_0->icount_decr.u16.low

                                    + VAR_0->icount_extra);

        VAR_0->icount_decr.u16.low = 0;

        VAR_0->icount_extra = 0;

        deadline = qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL);



        









        if ((deadline < 0) || (deadline > INT32_MAX)) {

            deadline = INT32_MAX;

        }



        count = qemu_icount_round(deadline);

        timers_state.qemu_icount += count;

        VAR_2 = (count > 0xffff) ? 0xffff : count;

        count -= VAR_2;

        VAR_0->icount_decr.u16.low = VAR_2;

        VAR_0->icount_extra = count;

    }

    VAR_1 = cpu_exec(VAR_0);

#ifdef CONFIG_PROFILER

    tcg_time += profile_getclock() - ti;

#endif

    if (use_icount) {

        



        timers_state.qemu_icount -= (VAR_0->icount_decr.u16.low

                        + VAR_0->icount_extra);

        VAR_0->icount_decr.u32 = 0;

        VAR_0->icount_extra = 0;

    }

    return VAR_1;

}

static int FUNC_0(CPUState *VAR_0)
{ int VAR_1; #ifdef CONFIG_PROFILER
int64_t ti; #endif
#ifdef CONFIG_PROFILER
ti = profile_getclock(); #endif
if (use_icount) { int64_t count; int64_t deadline; int VAR_2; timers_state.qemu_icount -= (VAR_0->icount_decr.u16.low
+ VAR_0->icount_extra); VAR_0->icount_decr.u16.low = 0; VAR_0->icount_extra = 0; deadline = qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL); if ((deadline < 0) || (deadline > INT32_MAX)) { deadline = INT32_MAX; } count = qemu_icount_round(deadline); timers_state.qemu_icount += count; VAR_2 = (count > 0xffff) ? 0xffff : count; count -= VAR_2; VAR_0->icount_decr.u16.low = VAR_2; VAR_0->icount_extra = count; } VAR_1 = cpu_exec(VAR_0); #ifdef CONFIG_PROFILER
tcg_time += profile_getclock() - ti; #endif
if (use_icount) { timers_state.qemu_icount -= (VAR_0->icount_decr.u16.low
+ VAR_0->icount_extra); VAR_0->icount_decr.u32 = 0; VAR_0->icount_extra = 0; } return VAR_1; }