void replay_read_events(int checkpoint)

{

    while (replay_data_kind == EVENT_ASYNC) {

        Event *event = replay_read_event(checkpoint);

        if (!event) {

            break;

        }

        replay_mutex_unlock();

        replay_run_event(event);

        replay_mutex_lock();



        g_free(event);

        replay_finish_event();

        read_event_kind = -1;

    }

}

void replay_read_events(int checkpoint)

{

    while (replay_data_kind == EVENT_ASYNC) {

        Event *event = replay_read_event(checkpoint);

        if (!event) {

            break;

        }

        replay_mutex_unlock();

        replay_run_event(event);

        replay_mutex_lock();



        g_free(event);

        replay_finish_event();

        read_event_kind = -1;

    }

}

void FUNC_0(int VAR_0)

{

    while (replay_data_kind == EVENT_ASYNC) {

        Event *event = replay_read_event(VAR_0);

        if (!event) {

            break;

        }

        replay_mutex_unlock();

        replay_run_event(event);

        replay_mutex_lock();



        g_free(event);

        replay_finish_event();

        read_event_kind = -1;

    }

}

void FUNC_0(int VAR_0)
{ while (replay_data_kind == EVENT_ASYNC) { Event *event = replay_read_event(VAR_0); if (!event) { break; } replay_mutex_unlock(); replay_run_event(event); replay_mutex_lock(); g_free(event); replay_finish_event(); read_event_kind = -1; } }