void *checkasm_check_func(void *func, const char *name, ...)

{

    char name_buf[256];

    void *ref = func;

    CheckasmFuncVersion *v;

    int name_length;

    va_list arg;



    va_start(arg, name);

    name_length = vsnprintf(name_buf, sizeof(name_buf), name, arg);

    va_end(arg);



    if (!func || name_length <= 0 || name_length >= sizeof(name_buf))

        return NULL;



    state.current_func = get_func(name_buf, name_length);

    v = &state.current_func->versions;



    if (v->func) {

        CheckasmFuncVersion *prev;

        do {

            /* Only test functions that haven't already been tested */

            if (v->func == func)

                return NULL;



            if (v->ok)

                ref = v->func;



            prev = v;

        } while ((v = v->next));



        v = prev->next = checkasm_malloc(sizeof(CheckasmFuncVersion));

    }



    v->func = func;

    v->ok = 1;

    v->cpu = state.cpu_flag;

    state.current_func_ver = v;



    if (state.cpu_flag)

        state.num_checked++;



    return ref;

}

void *checkasm_check_func(void *func, const char *name, ...)

{

    char name_buf[256];

    void *ref = func;

    CheckasmFuncVersion *v;

    int name_length;

    va_list arg;



    va_start(arg, name);

    name_length = vsnprintf(name_buf, sizeof(name_buf), name, arg);

    va_end(arg);



    if (!func || name_length <= 0 || name_length >= sizeof(name_buf))

        return NULL;



    state.current_func = get_func(name_buf, name_length);

    v = &state.current_func->versions;



    if (v->func) {

        CheckasmFuncVersion *prev;

        do {

            

            if (v->func == func)

                return NULL;



            if (v->ok)

                ref = v->func;



            prev = v;

        } while ((v = v->next));



        v = prev->next = checkasm_malloc(sizeof(CheckasmFuncVersion));

    }



    v->func = func;

    v->ok = 1;

    v->cpu = state.cpu_flag;

    state.current_func_ver = v;



    if (state.cpu_flag)

        state.num_checked++;



    return ref;

}

void *FUNC_0(void *VAR_0, const char *VAR_1, ...)

{

    char VAR_2[256];

    void *VAR_3 = VAR_0;

    CheckasmFuncVersion *v;

    int VAR_4;

    va_list arg;



    va_start(arg, VAR_1);

    VAR_4 = vsnprintf(VAR_2, sizeof(VAR_2), VAR_1, arg);

    va_end(arg);



    if (!VAR_0 || VAR_4 <= 0 || VAR_4 >= sizeof(VAR_2))

        return NULL;



    state.current_func = get_func(VAR_2, VAR_4);

    v = &state.current_func->versions;



    if (v->VAR_0) {

        CheckasmFuncVersion *prev;

        do {

            

            if (v->VAR_0 == VAR_0)

                return NULL;



            if (v->ok)

                VAR_3 = v->VAR_0;



            prev = v;

        } while ((v = v->next));



        v = prev->next = checkasm_malloc(sizeof(CheckasmFuncVersion));

    }



    v->VAR_0 = VAR_0;

    v->ok = 1;

    v->cpu = state.cpu_flag;

    state.current_func_ver = v;



    if (state.cpu_flag)

        state.num_checked++;



    return VAR_3;

}

void *FUNC_0(void *VAR_0, const char *VAR_1, ...)
{ char VAR_2[256]; void *VAR_3 = VAR_0; CheckasmFuncVersion *v; int VAR_4; va_list arg; va_start(arg, VAR_1); VAR_4 = vsnprintf(VAR_2, sizeof(VAR_2), VAR_1, arg); va_end(arg); if (!VAR_0 || VAR_4 <= 0 || VAR_4 >= sizeof(VAR_2))
return NULL; state.current_func = get_func(VAR_2, VAR_4); v = &state.current_func->versions; if (v->VAR_0) { CheckasmFuncVersion *prev; do { if (v->VAR_0 == VAR_0)
return NULL; if (v->ok)
VAR_3 = v->VAR_0; prev = v; } while ((v = v->next)); v = prev->next = checkasm_malloc(sizeof(CheckasmFuncVersion)); } v->VAR_0 = VAR_0; v->ok = 1; v->cpu = state.cpu_flag; state.current_func_ver = v; if (state.cpu_flag)
state.num_checked++; return VAR_3; }