static unsigned __stdcall win32_start_routine(void *arg)

{

    struct QemuThreadData data = *(struct QemuThreadData *) arg;

    QemuThread *thread = data.thread;



    free(arg);

    TlsSetValue(qemu_thread_tls_index, thread);



    /*

     * Use DuplicateHandle instead of assigning thread->thread in the

     * creating thread to avoid races.  It's simpler this way than with

     * synchronization.

     */

    DuplicateHandle(GetCurrentProcess(), GetCurrentThread(),

                    GetCurrentProcess(), &thread->thread,

                    0, FALSE, DUPLICATE_SAME_ACCESS);



    qemu_thread_exit(data.start_routine(data.arg));

    abort();

}

static unsigned __stdcall win32_start_routine(void *arg)

{

    struct QemuThreadData data = *(struct QemuThreadData *) arg;

    QemuThread *thread = data.thread;



    free(arg);

    TlsSetValue(qemu_thread_tls_index, thread);



    









    DuplicateHandle(GetCurrentProcess(), GetCurrentThread(),

                    GetCurrentProcess(), &thread->thread,

                    0, FALSE, DUPLICATE_SAME_ACCESS);



    qemu_thread_exit(data.start_routine(data.arg));

    abort();

}

    struct QemuThreadData data = *(struct QemuThreadData *) arg;     QemuThread *thread = data.thread;     free(arg);     TlsSetValue(qemu_thread_tls_index, thread);     DuplicateHandle(GetCurrentProcess(), GetCurrentThread(),                     GetCurrentProcess(), &thread->thread,                     0, FALSE, DUPLICATE_SAME_ACCESS);     qemu_thread_exit(data.start_routine(data.arg));
static unsigned __stdcall FUNC_0(void *VAR_0)

{

    struct QemuThreadData VAR_1 = *(struct QemuThreadData *) VAR_0;

    QemuThread *thread = VAR_1.thread;



    free(VAR_0);

    TlsSetValue(qemu_thread_tls_index, thread);



    









    DuplicateHandle(GetCurrentProcess(), GetCurrentThread(),

                    GetCurrentProcess(), &thread->thread,

                    0, FALSE, DUPLICATE_SAME_ACCESS);



    qemu_thread_exit(VAR_1.start_routine(VAR_1.VAR_0));

    abort();

}

static unsigned __stdcall FUNC_0(void *VAR_0)
{ struct QemuThreadData VAR_1 = *(struct QemuThreadData *) VAR_0; QemuThread *thread = VAR_1.thread; free(VAR_0); TlsSetValue(qemu_thread_tls_index, thread); DuplicateHandle(GetCurrentProcess(), GetCurrentThread(),
GetCurrentProcess(), &thread->thread,
0, FALSE, DUPLICATE_SAME_ACCESS); qemu_thread_exit(VAR_1.start_routine(VAR_1.VAR_0)); abort(); }