user: 请从给定的汇编指令推导出C源代码:

```asm
<ShouldUseColor>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  lea    D34(%rip),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  lea    D34(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <StringCaseInsensitiveCStringEquals@plt>
  test   %rax,%rax
  je     L169
  lea    D50(%rip),%rax
  mov    %rax,%rdi
  call   <posixGetEnv@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  lea    D97(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <StringCStringEquals@plt>
  test   %rax,%rax
  jne    L51
  mov    -0x8(%rbp),%rax
  lea    D137(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <StringCStringEquals@plt>
  test   %rax,%rax
  jne    L51
  mov    -0x8(%rbp),%rax
  lea    D98(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <StringCStringEquals@plt>
  test   %rax,%rax
  jne    L51
  mov    -0x8(%rbp),%rax
  lea    D101(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <StringCStringEquals@plt>
  test   %rax,%rax
  jne    L51
  mov    -0x8(%rbp),%rax
  lea    D115(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <StringCStringEquals@plt>
  test   %rax,%rax
  jne    L51
  mov    -0x8(%rbp),%rax
  lea    D12(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <StringCStringEquals@plt>
  test   %rax,%rax
  jne    L51
  mov    -0x8(%rbp),%rax
  lea    D139(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <StringCStringEquals@plt>
  test   %rax,%rax
  je     L22
L51:
  mov    $0x1,%eax
  jmp    L37
L22:
  mov    $0x0,%eax
L37:
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  je     L174
  cmpl   $0x0,-0x14(%rbp)
  je     L174
  mov    $0x1,%eax
  jmp    L47
L174:
  mov    $0x0,%eax
  jmp    L47
L169:
  mov    -0x10(%rbp),%rax
  lea    D16(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <StringCaseInsensitiveCStringEquals@plt>
  test   %rax,%rax
  jne    L7
  mov    -0x10(%rbp),%rax
  lea    D41(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <StringCaseInsensitiveCStringEquals@plt>
  test   %rax,%rax
  jne    L7
  mov    -0x10(%rbp),%rax
  lea    D92(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <StringCaseInsensitiveCStringEquals@plt>
  test   %rax,%rax
  jne    L7
  mov    -0x10(%rbp),%rax
  lea    D56(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <StringCStringEquals@plt>
  test   %rax,%rax
  je     L100
L7:
  mov    $0x1,%eax
  jmp    L47
L100:
  mov    $0x0,%eax
L47:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D34
datatype: string
name: retrieve_data
arguments: label: D50
datatype: string
name: retrieve_data
arguments: label: D97
datatype: string
name: retrieve_data
arguments: label: D137
datatype: string
name: retrieve_data
arguments: label: D98
datatype: string
name: retrieve_data
arguments: label: D101
datatype: string
name: retrieve_data
arguments: label: D115
datatype: string
name: retrieve_data
arguments: label: D12
datatype: string
name: retrieve_data
arguments: label: D139
datatype: string
name: retrieve_data
arguments: label: D16
datatype: string
name: retrieve_data
arguments: label: D41
datatype: string
name: retrieve_data
arguments: label: D92
datatype: string
name: retrieve_data
arguments: label: D56
datatype: string

tool: D34: auto

tool: D50: TERM

tool: D97: xterm

tool: D137: xterm-color

tool: D98: xterm-256color

tool: D101: screen

tool: D115: screen-256color

tool: D12: linux

tool: D139: cygwin

tool: D16: yes

tool: D41: true

tool: D92: t

tool: D56: 1

assistant: ```c
int ShouldUseColor(int stdout_is_tty) {
  const char *const gtest_color = "auto";
  if (StringCaseInsensitiveCStringEquals(gtest_color, "auto")) {
    const char *const term = posixGetEnv("TERM");
    const int term_supports_color = StringCStringEquals(term, "xterm") || StringCStringEquals(term, "xterm-color") || StringCStringEquals(term, "xterm-256color") || StringCStringEquals(term, "screen") || StringCStringEquals(term, "screen-256color") || StringCStringEquals(term, "linux") || StringCStringEquals(term, "cygwin");
    return stdout_is_tty && term_supports_color;
  }
  return StringCaseInsensitiveCStringEquals(gtest_color, "yes") || StringCaseInsensitiveCStringEquals(gtest_color, "true") || StringCaseInsensitiveCStringEquals(gtest_color, "t") || StringCStringEquals(gtest_color, "1");
}
```