void checkasm_report(const char *name, ...)

{

    static int prev_checked, prev_failed, max_length;



    if (state.num_checked > prev_checked) {

        print_cpu_name();



        if (*name) {

            int pad_length = max_length;

            va_list arg;



            fprintf(stderr, " - ");

            va_start(arg, name);

            pad_length -= vfprintf(stderr, name, arg);

            va_end(arg);

            fprintf(stderr, "%*c", FFMAX(pad_length, 0) + 2, '[');

        } else

            fprintf(stderr, " - %-*s [", max_length, state.current_func->name);



        if (state.num_failed == prev_failed)

            color_printf(COLOR_GREEN, "OK");

        else

            color_printf(COLOR_RED, "FAILED");

        fprintf(stderr, "]\n");



        prev_checked = state.num_checked;

        prev_failed  = state.num_failed;

    } else if (!state.cpu_flag) {

        int length;



        /* Calculate the amount of padding required to make the output vertically aligned */

        if (*name) {

            va_list arg;

            va_start(arg, name);

            length = vsnprintf(NULL, 0, name, arg);

            va_end(arg);

        } else

            length = strlen(state.current_func->name);



        if (length > max_length)

            max_length = length;

    }

}

void checkasm_report(const char *name, ...)

{

    static int prev_checked, prev_failed, max_length;



    if (state.num_checked > prev_checked) {

        print_cpu_name();



        if (*name) {

            int pad_length = max_length;

            va_list arg;



            fprintf(stderr, " - ");

            va_start(arg, name);

            pad_length -= vfprintf(stderr, name, arg);

            va_end(arg);

            fprintf(stderr, "%*c", FFMAX(pad_length, 0) + 2, '[');

        } else

            fprintf(stderr, " - %-*s [", max_length, state.current_func->name);



        if (state.num_failed == prev_failed)

            color_printf(COLOR_GREEN, "OK");

        else

            color_printf(COLOR_RED, "FAILED");

        fprintf(stderr, "]\n");



        prev_checked = state.num_checked;

        prev_failed  = state.num_failed;

    } else if (!state.cpu_flag) {

        int length;



        

        if (*name) {

            va_list arg;

            va_start(arg, name);

            length = vsnprintf(NULL, 0, name, arg);

            va_end(arg);

        } else

            length = strlen(state.current_func->name);



        if (length > max_length)

            max_length = length;

    }

}

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

{

    static int VAR_1, VAR_2, VAR_3;



    if (state.num_checked > VAR_1) {

        print_cpu_name();



        if (*VAR_0) {

            int VAR_4 = VAR_3;

            va_list arg;



            fprintf(stderr, " - ");

            va_start(arg, VAR_0);

            VAR_4 -= vfprintf(stderr, VAR_0, arg);

            va_end(arg);

            fprintf(stderr, "%*c", FFMAX(VAR_4, 0) + 2, '[');

        } else

            fprintf(stderr, " - %-*s [", VAR_3, state.current_func->VAR_0);



        if (state.num_failed == VAR_2)

            color_printf(COLOR_GREEN, "OK");

        else

            color_printf(COLOR_RED, "FAILED");

        fprintf(stderr, "]\n");



        VAR_1 = state.num_checked;

        VAR_2  = state.num_failed;

    } else if (!state.cpu_flag) {

        int VAR_5;



        

        if (*VAR_0) {

            va_list arg;

            va_start(arg, VAR_0);

            VAR_5 = vsnprintf(NULL, 0, VAR_0, arg);

            va_end(arg);

        } else

            VAR_5 = strlen(state.current_func->VAR_0);



        if (VAR_5 > VAR_3)

            VAR_3 = VAR_5;

    }

}

void FUNC_0(const char *VAR_0, ...)
{ static int VAR_1, VAR_2, VAR_3; if (state.num_checked > VAR_1) { print_cpu_name(); if (*VAR_0) { int VAR_4 = VAR_3; va_list arg; fprintf(stderr, " - "); va_start(arg, VAR_0); VAR_4 -= vfprintf(stderr, VAR_0, arg); va_end(arg); fprintf(stderr, "%*c", FFMAX(VAR_4, 0) + 2, '['); } else fprintf(stderr, " - %-*s [", VAR_3, state.current_func->VAR_0); if (state.num_failed == VAR_2)
color_printf(COLOR_GREEN, "OK"); else
color_printf(COLOR_RED, "FAILED"); fprintf(stderr, "]\n"); VAR_1 = state.num_checked; VAR_2  = state.num_failed; } else if (!state.cpu_flag) { int VAR_5; if (*VAR_0) { va_list arg; va_start(arg, VAR_0); VAR_5 = vsnprintf(NULL, 0, VAR_0, arg); va_end(arg); } else VAR_5 = strlen(state.current_func->VAR_0); if (VAR_5 > VAR_3)
VAR_3 = VAR_5; } }