// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/test/googletest/googletest/src/gtest.cc
// Function: testing::internal::ShouldUseColor(bool)
bool ShouldUseColor(bool stdout_is_tty) {
  std::string c = GTEST_FLAG_GET(color);
  const char* const gtest_color = c.c_str();

  if (String::CaseInsensitiveCStringEquals(gtest_color, "auto")) {
#if defined(GTEST_OS_WINDOWS) && !defined(GTEST_OS_WINDOWS_MINGW)
    // 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 =
        term != nullptr && (String::CStringEquals(term, "xterm") ||
                            String::CStringEquals(term, "xterm-color") ||
                            String::CStringEquals(term, "xterm-kitty") ||
                            String::CStringEquals(term, "screen") ||
                            String::CStringEquals(term, "tmux") ||
                            String::CStringEquals(term, "rxvt-unicode") ||
                            String::CStringEquals(term, "linux") ||
                            String::CStringEquals(term, "cygwin") ||
                            String::EndsWithCaseInsensitive(term, "-256color"));
    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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl %edi, %ebx
leaq 0x43518(%rip), %rsi     # 0x848e8
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0xd880
movq (%r14), %r14
leaq 0x1a249(%rip), %rsi     # 0x5b630
movq %r14, %rdi
callq 0x3eb00
testb %al, %al
je 0x4151b
leaq 0x1ad16(%rip), %rdi     # 0x5c114
callq 0xd720
testq %rax, %rax
je 0x41569
movq %rax, %r14
leaq 0x1ad03(%rip), %rsi     # 0x5c119
movq %rax, %rdi
callq 0x3d5c8
movb $0x1, %bpl
testb %al, %al
jne 0x4156b
leaq 0x1acef(%rip), %rsi     # 0x5c11f
movq %r14, %rdi
callq 0x3d5c8
testb %al, %al
jne 0x4156b
leaq 0x1ace4(%rip), %rsi     # 0x5c12b
movq %r14, %rdi
callq 0x3d5c8
testb %al, %al
jne 0x4156b
leaq 0x1acd9(%rip), %rsi     # 0x5c137
movq %r14, %rdi
callq 0x3d5c8
testb %al, %al
jne 0x4156b
leaq 0x1acc9(%rip), %rsi     # 0x5c13e
movq %r14, %rdi
callq 0x3d5c8
testb %al, %al
jne 0x4156b
leaq 0x1acb7(%rip), %rsi     # 0x5c143
movq %r14, %rdi
callq 0x3d5c8
testb %al, %al
jne 0x4156b
leaq 0x1acad(%rip), %rsi     # 0x5c150
movq %r14, %rdi
callq 0x3d5c8
testb %al, %al
jne 0x4156b
leaq 0x1ac9c(%rip), %rsi     # 0x5c156
movq %r14, %rdi
callq 0x3d5c8
testb %al, %al
jne 0x4156b
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r14, %rsi
callq 0x1337a
leaq 0x1ac7a(%rip), %rsi     # 0x5c15d
leaq 0x48(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x1337a
leaq 0x8(%rsp), %r14
leaq 0x48(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x38990
movl %eax, %ebp
movq %r15, %rdi
callq 0xdbe8
movq %r14, %rdi
callq 0xdbe8
jmp 0x4156b
leaq 0x17386(%rip), %rsi     # 0x588a8
movq %r14, %rdi
callq 0x3eb00
movb $0x1, %bl
testb %al, %al
jne 0x4156e
leaq 0x14bde(%rip), %rsi     # 0x56115
movq %r14, %rdi
callq 0x3eb00
testb %al, %al
jne 0x4156e
leaq 0x1b0e4(%rip), %rsi     # 0x5c62e
movq %r14, %rdi
callq 0x3eb00
testb %al, %al
jne 0x4156e
leaq 0x16ae2(%rip), %rsi     # 0x5803f
movq %r14, %rdi
callq 0x3d5c8
movl %eax, %ebx
jmp 0x4156e
xorl %ebp, %ebp
andb %bpl, %bl
leaq 0x28(%rsp), %rdi
callq 0xdbe8
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xdbe8
jmp 0x41597
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xdbe8
movq %rbx, %rdi
callq 0xdaa0
nop