// File: interimadd[P]M5Stack-PixelArt/test/lib/googletest/googletest/src/gtest.cc
// Function: testing::internal::ColoredPrintf(testing::internal::GTestColor, char const*, ...)
void ColoredPrintf(GTestColor color, const char* fmt, ...) {
  va_list args;
  va_start(args, fmt);

#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN || GTEST_OS_ZOS || \
    GTEST_OS_IOS || GTEST_OS_WINDOWS_PHONE || GTEST_OS_WINDOWS_RT
  const bool use_color = AlwaysFalse();
#else
  static const bool in_color_mode =
      ShouldUseColor(posix::IsATTY(posix::FileNo(stdout)) != 0);
  const bool use_color = in_color_mode && (color != COLOR_DEFAULT);
#endif  // GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN || GTEST_OS_ZOS
  // The '!= 0' comparison is necessary to satisfy MSVC 7.1.

  if (!use_color) {
    vprintf(fmt, args);
    va_end(args);
    return;
  }

#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE && \
    !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT
  const HANDLE stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE);

  // Gets the current text color.
  CONSOLE_SCREEN_BUFFER_INFO buffer_info;
  GetConsoleScreenBufferInfo(stdout_handle, &buffer_info);
  const WORD old_color_attrs = buffer_info.wAttributes;

  // We need to flush the stream buffers into the console before each
  // SetConsoleTextAttribute call lest it affect the text that is already
  // printed but has not yet reached the console.
  fflush(stdout);
  SetConsoleTextAttribute(stdout_handle,
                          GetColorAttribute(color) | FOREGROUND_INTENSITY);
  vprintf(fmt, args);

  fflush(stdout);
  // Restores the text color.
  SetConsoleTextAttribute(stdout_handle, old_color_attrs);
#else
  printf("\033[0;3%sm", GetAnsiColorCode(color));
  vprintf(fmt, args);
  printf("\033[m");  // Resets the terminal to default.
#endif  // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
  va_end(args);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
testb %al, %al
je 0x771cb
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
cmpb $0x0, 0x5a737(%rip)     # 0xd1950
jne 0x7728b
leaq 0x5a72e(%rip), %rdi     # 0xd1950
callq 0x52c30
cmpl $0x0, %eax
je 0x7728b
movq 0x59d6d(%rip), %rax     # 0xd0fa0
movq (%rax), %rdi
callq 0x8d4b0
movl %eax, -0xf4(%rbp)
jmp 0x77243
movl -0xf4(%rbp), %edi
callq 0x8d490
movl %eax, -0xf8(%rbp)
jmp 0x77256
movl -0xf8(%rbp), %eax
testl %eax, %eax
setne %al
movzbl %al, %edi
callq 0x76f60
movb %al, -0xf9(%rbp)
jmp 0x77271
movb -0xf9(%rbp), %al
andb $0x1, %al
movb %al, 0x5a6c9(%rip)      # 0xd1948
leaq 0x5a6ca(%rip), %rdi     # 0xd1950
callq 0x523c0
xorl %eax, %eax
testb $0x1, 0x5a6b4(%rip)     # 0xd1948
movb %al, -0xfa(%rbp)
je 0x772a9
cmpl $0x0, -0x4(%rbp)
setne %al
movb %al, -0xfa(%rbp)
movb -0xfa(%rbp), %al
andb $0x1, %al
movb %al, -0x3d(%rbp)
testb $0x1, -0x3d(%rbp)
jne 0x772e7
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x52610
leaq -0x30(%rbp), %rax
jmp 0x7731f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq 0x5a670(%rip), %rdi     # 0xd1950
callq 0x523b0
jmp 0x77328
movl -0x4(%rbp), %edi
callq 0x76f00
movq %rax, %rsi
leaq 0x32f6e(%rip), %rdi     # 0xaa267
movb $0x0, %al
callq 0x52090
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x52610
leaq 0x32f5c(%rip), %rdi     # 0xaa270
movb $0x0, %al
callq 0x52090
leaq -0x30(%rbp), %rax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x52bc0
nopw %cs:(%rax,%rax)