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

```asm
<ClientCleanName>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  subl   $0x1,-0x34(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  movl   $0x0,-0xc(%rbp)
L62:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x15(%rbp)
  cmpb   $0x0,-0x15(%rbp)
  je     L193
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L25
  cmpb   $0x20,-0x15(%rbp)
  je     L34
L25:
  cmpb   $0x5e,-0x15(%rbp)
  jne    L91
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L92
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  and    $0x7,%eax
  test   %eax,%eax
  jne    L162
  addq   $0x1,-0x28(%rbp)
  jmp    L84
L162:
  mov    -0x34(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x14(%rbp)
  jge    L103
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  movzbl -0x15(%rbp),%edx
  mov    %dl,(%rax)
  mov    -0x28(%rbp),%rdx
  lea    0x1(%rdx),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x30(%rbp)
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  addl   $0x2,-0x14(%rbp)
  jmp    L84
L91:
  cmpb   $0x20,-0x15(%rbp)
  jne    L144
  addl   $0x1,-0xc(%rbp)
  cmpl   $0x3,-0xc(%rbp)
  jle    L153
  jmp    L84
L144:
  movl   $0x0,-0xc(%rbp)
L153:
  mov    -0x34(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jle    L137
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  movzbl -0x15(%rbp),%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x10(%rbp)
  addl   $0x1,-0x14(%rbp)
  jmp    L62
L34:
  nop
L84:
  jmp    L62
L193:
  nop
  jmp    L86
L92:
  nop
  jmp    L86
L103:
  nop
  jmp    L86
L137:
  nop
L86:
  mov    -0x30(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L177
  cmpl   $0x0,-0x10(%rbp)
  jne    L138
L177:
  mov    -0x34(%rbp),%edx
  mov    -0x8(%rbp),%rax
  lea    D4(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <Q_strncpyz@plt>
L138:
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D4
type: string

tool: D4: RedShirt

assistant: ```c
void ClientCleanName(const char *in, char *out, int outSize) {
  int len, colorlessLen;
  char ch;
  char *p;
  int spaces;
  outSize--;
  len = 0;
  colorlessLen = 0;
  p = out;
  *p = 0;
  spaces = 0;
  while (1) {
    ch = *in++;
    if (!ch) {
      break;
    }
    if (!*p && ch == ' ') {
      continue;
    }
    if (ch == '^') {
      if (!*in) {
        break;
      }
      if ((((*in) - '0') & 7) == 0) {
        in++;
        continue;
      }
      if (len > outSize - 2) {
        break;
      }
      *out++ = ch;
      *out++ = *in++;
      len += 2;
      continue;
    }
    if (ch == ' ') {
      spaces++;
      if (spaces > 3) {
        continue;
      }
    } else {
      spaces = 0;
    }
    if (len > outSize - 1) {
      break;
    }
    *out++ = ch;
    colorlessLen++;
    len++;
  }
  *out = 0;
  if (*p == 0 || colorlessLen == 0) {
    Q_strncpyz(p, "RedShirt", outSize);
  }
}
```