// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x60, %rsp
movl %edi, %ebx
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x433c5(%rip), %rsi     # 0x968b8
movq 0x433c6(%rip), %rdx     # 0x968c0
addq %rsi, %rdx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x155e4
movq (%r14), %r14
testq %r14, %r14
je 0x535b9
leaq 0x200c3(%rip), %rsi     # 0x735e0
movq %r14, %rdi
callq 0xd5a0
testl %eax, %eax
je 0x535c0
testq %r14, %r14
je 0x535b9
sete %bl
leaq 0x1d2f6(%rip), %rsi     # 0x70836
movq %r14, %rdi
callq 0xd5a0
testl %eax, %eax
sete %bpl
orb %bpl, %bl
jne 0x53723
testq %r14, %r14
sete %bl
leaq 0x1aba8(%rip), %rsi     # 0x6e10c
movq %r14, %rdi
callq 0xd5a0
testl %eax, %eax
sete %bpl
orb %bpl, %bl
jne 0x53723
testq %r14, %r14
sete %bl
leaq 0x21056(%rip), %rsi     # 0x745de
movq %r14, %rdi
callq 0xd5a0
testl %eax, %eax
sete %bpl
orb %bpl, %bl
jne 0x53723
leaq 0x1ca29(%rip), %rsi     # 0x6ffcf
movq %r14, %rdi
callq 0xd840
testl %eax, %eax
sete %bpl
jmp 0x53723
xorl %ebp, %ebp
jmp 0x53723
leaq 0x20afd(%rip), %rdi     # 0x740c4
callq 0xd6d0
testq %rax, %rax
je 0x536e2
movq %rax, %r14
leaq 0x20aea(%rip), %rsi     # 0x740c9
movq %rax, %rdi
callq 0xd840
movb $0x1, %bpl
testl %eax, %eax
je 0x536de
leaq 0x20ad6(%rip), %rsi     # 0x740cf
movq %r14, %rdi
callq 0xd840
testl %eax, %eax
je 0x536de
leaq 0x20acb(%rip), %rsi     # 0x740db
movq %r14, %rdi
callq 0xd840
testl %eax, %eax
je 0x536de
leaq 0x20ac0(%rip), %rsi     # 0x740e7
movq %r14, %rdi
callq 0xd840
testl %eax, %eax
je 0x536de
leaq 0x20ab0(%rip), %rsi     # 0x740ee
movq %r14, %rdi
callq 0xd840
testl %eax, %eax
je 0x536de
leaq 0x20a9e(%rip), %rsi     # 0x740f3
movq %r14, %rdi
callq 0xd840
testl %eax, %eax
je 0x536de
leaq 0x20a98(%rip), %rsi     # 0x74100
movq %r14, %rdi
callq 0xd840
testl %eax, %eax
je 0x536de
leaq 0x20a8b(%rip), %rsi     # 0x74106
movq %r14, %rdi
callq 0xd840
testl %eax, %eax
je 0x536de
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r14, %rdi
callq 0xd210
movq %r14, %rdx
addq %rax, %rdx
movq %rsp, %rdi
movq %r14, %rsi
callq 0x15892
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20a53(%rip), %rsi     # 0x7410d
leaq 0x20a55(%rip), %rdx     # 0x74116
leaq 0x40(%rsp), %rdi
callq 0x15892
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
callq 0x460c0
movl %eax, %ebp
movb $0x1, %al
jmp 0x536e6
xorl %eax, %eax
jmp 0x536e6
xorl %eax, %eax
xorl %ebp, %ebp
testb %al, %al
je 0x53720
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x53705
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xd530
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x53720
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xd530
andb %bl, %bpl
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x5373a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xd530
movl %ebp, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x53767
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xd530
jmp 0x53767
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x5377e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xd530
movq %rbx, %rdi
callq 0xda70