// File: WeihuaZhu[P]hpc_prog2/./gtest/gtest-all.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
  const bool use_color = false;
#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
  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:
subq $0xf8, %rsp
testb %al, %al
je 0x1fcff
movaps %xmm0, 0x40(%rsp)
movaps %xmm1, 0x50(%rsp)
movaps %xmm2, 0x60(%rsp)
movaps %xmm3, 0x70(%rsp)
movaps %xmm4, 0x80(%rsp)
movaps %xmm5, 0x90(%rsp)
movaps %xmm6, 0xa0(%rsp)
movaps %xmm7, 0xb0(%rsp)
movq %r9, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movl %edi, 0xf4(%rsp)
movq %rsi, 0xe8(%rsp)
leaq 0xd0(%rsp), %rax
leaq 0x10(%rsp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x100(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
cmpb $0x0, 0x45f5d(%rip)     # 0x65cb0
jne 0x1fdb9
leaq 0x45f54(%rip), %rdi     # 0x65cb0
callq 0xf4a0
cmpl $0x0, %eax
je 0x1fdb9
movq 0x45213(%rip), %rax     # 0x64f80
movq (%rax), %rdi
callq 0x368a0
movl %eax, 0xc(%rsp)
jmp 0x1fd7b
movl 0xc(%rsp), %edi
callq 0x36890
movl %eax, 0x8(%rsp)
jmp 0x1fd8a
movl 0x8(%rsp), %eax
testl %eax, %eax
setne %al
movzbl %al, %edi
callq 0x1faf0
movb %al, 0x7(%rsp)
jmp 0x1fda1
movb 0x7(%rsp), %al
andb $0x1, %al
movb %al, 0x45efb(%rip)      # 0x65ca8
leaq 0x45efc(%rip), %rdi     # 0x65cb0
callq 0xe610
xorl %eax, %eax
testb $0x1, 0x45ee6(%rip)     # 0x65ca8
movb %al, 0x6(%rsp)
je 0x1fdd7
cmpl $0x0, 0xf4(%rsp)
setne %al
movb %al, 0x6(%rsp)
movb 0x6(%rsp), %al
andb $0x1, %al
movb %al, 0xc3(%rsp)
testb $0x1, 0xc3(%rsp)
jne 0x1fe2f
movq 0xe8(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0xea70
leaq 0xd0(%rsp), %rax
jmp 0x1fe77
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
leaq 0x45e88(%rip), %rdi     # 0x65cb0
callq 0xe5f0
jmp 0x1fe7f
movl 0xf4(%rsp), %edi
callq 0x1fa80
movq %rax, %rsi
leaq 0x2d1bc(%rip), %rdi     # 0x4d001
movb $0x0, %al
callq 0xe090
movq 0xe8(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0xea70
leaq 0x2d1a2(%rip), %rdi     # 0x4d00a
movb $0x0, %al
callq 0xe090
leaq 0xd0(%rsp), %rax
addq $0xf8, %rsp
retq
movq 0xc8(%rsp), %rdi
callq 0xf410
nopl (%rax)