// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/../include/acutest.h
// Function: acutest_colored_printf_
acutest_colored_printf_(int color, const char* fmt, ...)
{
    va_list args;
    char buffer[256];
    int n;

    va_start(args, fmt);
    vsnprintf(buffer, sizeof(buffer), fmt, args);
    va_end(args);
    buffer[sizeof(buffer)-1] = '\0';

    if(!acutest_colorize_) {
        return printf("%s", buffer);
    }

#if defined ACUTEST_UNIX_
    {
        const char* col_str;
        switch(color) {
            case ACUTEST_COLOR_GREEN_:              col_str = "\033[0;32m"; break;
            case ACUTEST_COLOR_RED_:                col_str = "\033[0;31m"; break;
            case ACUTEST_COLOR_GREEN_INTENSIVE_:    col_str = "\033[1;32m"; break;
            case ACUTEST_COLOR_RED_INTENSIVE_:      col_str = "\033[1;31m"; break;
            case ACUTEST_COLOR_DEFAULT_INTENSIVE_:  col_str = "\033[1m"; break;
            default:                                col_str = "\033[0m"; break;
        }
        printf("%s", col_str);
        n = printf("%s", buffer);
        printf("\033[0m");
        return n;
    }
#elif defined ACUTEST_WIN_
    {
        HANDLE h;
        CONSOLE_SCREEN_BUFFER_INFO info;
        WORD attr;

        h = GetStdHandle(STD_OUTPUT_HANDLE);
        GetConsoleScreenBufferInfo(h, &info);

        switch(color) {
            case ACUTEST_COLOR_GREEN_:              attr = FOREGROUND_GREEN; break;
            case ACUTEST_COLOR_RED_:                attr = FOREGROUND_RED; break;
            case ACUTEST_COLOR_GREEN_INTENSIVE_:    attr = FOREGROUND_GREEN | FOREGROUND_INTENSITY; break;
            case ACUTEST_COLOR_RED_INTENSIVE_:      attr = FOREGROUND_RED | FOREGROUND_INTENSITY; break;
            case ACUTEST_COLOR_DEFAULT_INTENSIVE_:  attr = FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY; break;
            default:                                attr = 0; break;
        }
        if(attr != 0)
            SetConsoleTextAttribute(h, attr);
        n = printf("%s", buffer);
        SetConsoleTextAttribute(h, info.wAttributes);
        return n;
    }
#else
    n = printf("%s", buffer);
    return n;
#endif
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rsi, %r10
movl %edi, %ebx
leaq 0x120(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x2951
movaps %xmm0, 0x150(%rsp)
movaps %xmm1, 0x160(%rsp)
movaps %xmm2, 0x170(%rsp)
movaps %xmm3, 0x180(%rsp)
movaps %xmm4, 0x190(%rsp)
movaps %xmm5, 0x1a0(%rsp)
movaps %xmm6, 0x1b0(%rsp)
movaps %xmm7, 0x1c0(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rsp, %rcx
movq %rax, (%rcx)
leaq 0x1f0(%rsp), %rax
movq %rax, 0x8(%rcx)
movq %rsi, 0x10(%rcx)
leaq 0x20(%rsp), %r14
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdi
movq %r10, %rdx
callq 0x20a0
movb $0x0, 0xff(%r14)
cmpl $0x0, 0x792b(%rip)      # 0xa2c0
je 0x29db
movslq %ebx, %rax
leaq 0x36f7(%rip), %rcx      # 0x6098
movslq -0x4(%rcx,%rax,4), %rsi
addq %rcx, %rsi
leaq 0x3cdb(%rip), %rbx      # 0x668b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x20f0
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x20f0
movl %eax, %ebx
leaq 0x3cb2(%rip), %rdi      # 0x6684
xorl %eax, %eax
callq 0x20f0
jmp 0x29f0
leaq 0x3ca9(%rip), %rdi      # 0x668b
leaq 0x20(%rsp), %rsi
xorl %eax, %eax
callq 0x20f0
movl %eax, %ebx
movl %ebx, %eax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r14
retq