// File: WeihuaZhu[P]hpc_prog2/./gtest/gtest-all.cc
// Function: testing::internal::ShouldUseColor(bool)
bool ShouldUseColor(bool stdout_is_tty) {
  const char* const gtest_color = GTEST_FLAG(color).c_str();

  if (String::CaseInsensitiveCStringEquals(gtest_color, "auto")) {
#if GTEST_OS_WINDOWS
    // On Windows the TERM variable is usually not set, but the
    // console there does support colors.
    return stdout_is_tty;
#else
    // On non-Windows platforms, we rely on the TERM variable.
    const char* const term = posix::GetEnv("TERM");
    const bool term_supports_color =
        String::CStringEquals(term, "xterm") ||
        String::CStringEquals(term, "xterm-color") ||
        String::CStringEquals(term, "xterm-256color") ||
        String::CStringEquals(term, "screen") ||
        String::CStringEquals(term, "screen-256color") ||
        String::CStringEquals(term, "linux") ||
        String::CStringEquals(term, "cygwin");
    return stdout_is_tty && term_supports_color;
#endif  // GTEST_OS_WINDOWS
  }

  return String::CaseInsensitiveCStringEquals(gtest_color, "yes") ||
      String::CaseInsensitiveCStringEquals(gtest_color, "true") ||
      String::CaseInsensitiveCStringEquals(gtest_color, "t") ||
      String::CStringEquals(gtest_color, "1");
  // We take "yes", "true", "t", and "1" as meaning "yes".  If the
  // value is neither one of these nor "auto", we treat it as "no" to
  // be conservative.
}

// Assembly:
subq $0x28, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, 0x26(%rsp)
leaq 0x4609c(%rip), %rdi     # 0x65ba0
callq 0xe370
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x2cd78(%rip), %rsi     # 0x4c892
callq 0x1b080
testb $0x1, %al
jne 0x1fb28
jmp 0x1fc35
leaq 0x2d47f(%rip), %rdi     # 0x4cfae
callq 0x36880
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x2d46e(%rip), %rsi     # 0x4cfb3
callq 0x19280
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0xe(%rsp)
jne 0x1fc0a
movq 0x10(%rsp), %rdi
leaq 0x2d452(%rip), %rsi     # 0x4cfb9
callq 0x19280
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0xe(%rsp)
jne 0x1fc0a
movq 0x10(%rsp), %rdi
leaq 0x2d43c(%rip), %rsi     # 0x4cfc5
callq 0x19280
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0xe(%rsp)
jne 0x1fc0a
movq 0x10(%rsp), %rdi
leaq 0x2d42d(%rip), %rsi     # 0x4cfd4
callq 0x19280
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0xe(%rsp)
jne 0x1fc0a
movq 0x10(%rsp), %rdi
leaq 0x2d416(%rip), %rsi     # 0x4cfdb
callq 0x19280
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0xe(%rsp)
jne 0x1fc0a
movq 0x10(%rsp), %rdi
leaq 0x2d408(%rip), %rsi     # 0x4cfeb
callq 0x19280
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0xe(%rsp)
jne 0x1fc0a
movq 0x10(%rsp), %rdi
leaq 0x2d3f0(%rip), %rsi     # 0x4cff1
callq 0x19280
movb %al, 0xe(%rsp)
movb 0xe(%rsp), %al
andb $0x1, %al
movb %al, 0xf(%rsp)
xorl %eax, %eax
testb $0x1, 0x26(%rsp)
movb %al, 0xd(%rsp)
je 0x1fc29
movb 0xf(%rsp), %al
movb %al, 0xd(%rsp)
movb 0xd(%rsp), %al
andb $0x1, %al
movb %al, 0x27(%rsp)
jmp 0x1fcae
movq 0x18(%rsp), %rdi
leaq 0x2d3b7(%rip), %rsi     # 0x4cff8
callq 0x1b080
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0xc(%rsp)
jne 0x1fca4
movq 0x18(%rsp), %rdi
leaq 0x2d39d(%rip), %rsi     # 0x4cffc
callq 0x1b080
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0xc(%rsp)
jne 0x1fca4
movq 0x18(%rsp), %rdi
leaq 0x2e9e9(%rip), %rsi     # 0x4e666
callq 0x1b080
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0xc(%rsp)
jne 0x1fca4
movq 0x18(%rsp), %rdi
leaq 0x2ddbf(%rip), %rsi     # 0x4da5a
callq 0x19280
movb %al, 0xc(%rsp)
movb 0xc(%rsp), %al
andb $0x1, %al
movb %al, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopl (%rax)