static void perf_cost(void)

{

    const unsigned long maxcycles = 40000000;

    unsigned long i = 0;

    double duration;

    unsigned long ops;

    Coroutine *co;



    g_test_timer_start();

    while (i++ < maxcycles) {

        co = qemu_coroutine_create(perf_cost_func);

        qemu_coroutine_enter(co, &i);

        qemu_coroutine_enter(co, NULL);

    }

    duration = g_test_timer_elapsed();

    ops = (long)(maxcycles / (duration * 1000));



    g_test_message("Run operation %lu iterations %f s, %luK operations/s, "

                   "%luns per coroutine",

                   maxcycles,

                   duration, ops,

                   (unsigned long)(1000000000 * duration) / maxcycles);

}

static void perf_cost(void)

{

    const unsigned long maxcycles = 40000000;

    unsigned long i = 0;

    double duration;

    unsigned long ops;

    Coroutine *co;



    g_test_timer_start();

    while (i++ < maxcycles) {

        co = qemu_coroutine_create(perf_cost_func);

        qemu_coroutine_enter(co, &i);

        qemu_coroutine_enter(co, NULL);

    }

    duration = g_test_timer_elapsed();

    ops = (long)(maxcycles / (duration * 1000));



    g_test_message("Run operation %lu iterations %f s, %luK operations/s, "

                   "%luns per coroutine",

                   maxcycles,

                   duration, ops,

                   (unsigned long)(1000000000 * duration) / maxcycles);

}

                   (unsigned long)(1000000000 * duration) / maxcycles);
static void FUNC_0(void)

{

    const unsigned long VAR_0 = 40000000;

    unsigned long VAR_1 = 0;

    double VAR_2;

    unsigned long VAR_3;

    Coroutine *co;



    g_test_timer_start();

    while (VAR_1++ < VAR_0) {

        co = qemu_coroutine_create(perf_cost_func);

        qemu_coroutine_enter(co, &VAR_1);

        qemu_coroutine_enter(co, NULL);

    }

    VAR_2 = g_test_timer_elapsed();

    VAR_3 = (long)(VAR_0 / (VAR_2 * 1000));



    g_test_message("Run operation %lu iterations %f s, %luK operations/s, "

                   "%luns per coroutine",

                   VAR_0,

                   VAR_2, VAR_3,

                   (unsigned long)(1000000000 * VAR_2) / VAR_0);

}

static void FUNC_0(void)
{ const unsigned long VAR_0 = 40000000; unsigned long VAR_1 = 0; double VAR_2; unsigned long VAR_3; Coroutine *co; g_test_timer_start(); while (VAR_1++ < VAR_0) { co = qemu_coroutine_create(perf_cost_func); qemu_coroutine_enter(co, &VAR_1); qemu_coroutine_enter(co, NULL); } VAR_2 = g_test_timer_elapsed(); VAR_3 = (long)(VAR_0 / (VAR_2 * 1000)); g_test_message("Run operation %lu iterations %f s, %luK operations/s, "
"%luns per coroutine",
VAR_0,
VAR_2, VAR_3,
(unsigned long)(1000000000 * VAR_2) / VAR_0); }