user: Converte this assembly snippet into its equivalent C code:

```asm
<Qt_setColorMode>:
  endbr64
  push   %r14
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  lea    D0(%rip),%rsi
  sub    $0xb8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xa8(%rsp)
  xor    %eax,%eax
  call   <strstr@plt>
  test   %rax,%rax
  je     L64
L81:
  mov    0xa8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L89
  add    $0xb8,%rsp
  mov    %r13d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L64:
  lea    D33(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L103
  lea    D88(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L25
  lea    D25(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L81
L103:
  mov    %rsp,%r13
  mov    %r12,%rdx
  lea    D92(%rip),%rsi
  xor    %eax,%eax
  mov    %r13,%rdi
  call   <sprintf@plt>
  mov    %r13,%rdx
  xor    %r13d,%r13d
  lea    D1(%rip),%rsi
  lea    D148(%rip),%rdi
  call   <Qt_handleString@plt>
  jmp    L81
  xchg   %ax,%ax
L25:
  lea    0x50(%rsp),%r13
  lea    D11(%rip),%rsi
  mov    %r13,%rdi
  call   <strcpy@plt>
  lea    D81(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L57
L73:
  lea    D136(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L47
L8:
  mov    %rsp,%r14
  mov    %r13,%rcx
  mov    %r12,%rdx
  xor    %eax,%eax
  lea    D55(%rip),%rsi
  mov    %r14,%rdi
  mov    $0x1,%r13d
  call   <sprintf@plt>
  mov    %r14,%rdx
  lea    D1(%rip),%rsi
  lea    D148(%rip),%rdi
  call   <Qt_handleString@plt>
  jmp    L81
  nopl   (%rax)
L47:
  lea    D84(%rip),%rsi
  mov    %r13,%rdi
  call   <strcpy@plt>
  jmp    L8
  nopl   0x0(%rax)
L57:
  lea    D84(%rip),%rsi
  mov    %r13,%rdi
  call   <strcpy@plt>
  jmp    L73
L89:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D0
data_type: string
name: read_data
arguments: label: D33
data_type: string
name: read_data
arguments: label: D88
data_type: string
name: read_data
arguments: label: D25
data_type: string
name: read_data
arguments: label: D92
data_type: string
name: read_data
arguments: label: D1
data_type: string
name: read_data
arguments: label: D148
data_type: string
name: read_data
arguments: label: D11
data_type: string
name: read_data
arguments: label: D81
data_type: string
name: read_data
arguments: label: D136
data_type: string
name: read_data
arguments: label: D55
data_type: string
name: read_data
arguments: label: D84
data_type: string

tool: D0: Gauge

tool: D33: static

tool: D88: alarm

tool: D25: discrete

tool: D92: %s::Static

tool: D1: enum

tool: D148: colorMode

tool: D11: Alarm

tool: D81: caTextEntry

tool: D136: caLineEdit

tool: D55: %s::%s

tool: D84: Alarm_Static

assistant: ```c
int Qt_setColorMode(char *widget, char *token) {
  char asc[80];
  char aux[80];
  if (strstr(widget, "Gauge") != (char *)0)
    return 0;
  if (!strcmp(token, "static")) {
    sprintf(asc, "%s::Static", widget);
    Qt_handleString("colorMode", "enum", asc);
    return 0;
  } else if (!strcmp(token, "alarm")) {
    strcpy(aux, "Alarm");
    if (!strcmp(widget, "caTextEntry"))
      strcpy(aux, "Alarm_Static");
    if (!strcmp(widget, "caLineEdit"))
      strcpy(aux, "Alarm_Static");
    sprintf(asc, "%s::%s", widget, aux);
    Qt_handleString("colorMode", "enum", asc);
    return 1;
  } else if (!strcmp(token, "discrete")) {
    sprintf(asc, "%s::Static", widget);
    Qt_handleString("colorMode", "enum", asc);
    return 0;
  }
  return 0;
}
```