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

```asm
<process_color>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %esi,%r14d
  mov    %rdx,0x8(%rsp)
  mov    %rcx,%r12
  mov    %r8,%rbp
  mov    %r9,%r13
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L119
  mov    %rdi,%rbx
  call   <strlen@plt>
  test   %eax,%eax
  jne    L114
L119:
  test   %r14d,%r14d
  jne    L9
  lea    D27(%rip),%rcx
  mov    0x8(%rsp),%rdx
  lea    D111(%rip),%rsi
  lea    D3(%rip),%rdi
  call   <camserv_log@plt>
  movb   $0xff,(%r12)
  movb   $0xff,0x0(%rbp)
  movb   $0xff,0x0(%r13)
  mov    $0xffffff,%r15d
  jmp    L103
L114:
  lea    D36(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L55
  mov    %rbx,%rdi
  call   <valid_rgb_color@plt>
  mov    %eax,%r15d
  test   %eax,%eax
  jne    L69
  test   %r14d,%r14d
  jne    L95
  lea    D27(%rip),%rcx
  mov    0x8(%rsp),%rdx
  lea    D126(%rip),%rsi
  lea    D3(%rip),%rdi
  call   <camserv_log@plt>
  movb   $0xff,(%r12)
  movb   $0xff,0x0(%rbp)
  movb   $0xff,0x0(%r13)
  mov    $0xffffff,%r15d
  jmp    L103
L69:
  lea    0x20(%rsp),%rcx
  lea    0x1c(%rsp),%rdx
  lea    0x24(%rsp),%r8
  lea    D32(%rip),%rsi
  mov    %rbx,%rdi
  call   <sscanf@plt>
  mov    0x1c(%rsp),%eax
  mov    %al,(%r12)
  mov    0x20(%rsp),%eax
  mov    %al,0x0(%rbp)
  mov    0x24(%rsp),%eax
  mov    %al,0x0(%r13)
  movzbl 0x0(%rbp),%r15d
  shl    $0x8,%r15d
  movzbl %al,%eax
  or     %eax,%r15d
  movzbl (%r12),%eax
  shl    $0x10,%eax
  or     %eax,%r15d
  jmp    L103
L55:
  mov    $0xff000000,%r15d
  jmp    L103
L9:
  lea    D56(%rip),%rcx
  mov    0x8(%rsp),%rdx
  lea    D111(%rip),%rsi
  lea    D3(%rip),%rdi
  call   <camserv_log@plt>
  movb   $0x0,(%r12)
  movb   $0x0,0x0(%rbp)
  movb   $0x0,0x0(%r13)
  mov    $0x0,%r15d
L103:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L116
  mov    %r15d,%eax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L95:
  lea    D56(%rip),%rcx
  mov    0x8(%rsp),%rdx
  lea    D126(%rip),%rsi
  lea    D3(%rip),%rdi
  call   <camserv_log@plt>
  movb   $0x0,(%r12)
  movb   $0x0,0x0(%rbp)
  movb   $0x0,0x0(%r13)
  jmp    L103
L116:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D27
type_infered: string
name: parse_data
arguments: label: D111
type_infered: string
name: parse_data
arguments: label: D3
type_infered: string
name: parse_data
arguments: label: D36
type_infered: string
name: parse_data
arguments: label: D126
type_infered: string
name: parse_data
arguments: label: D32
type_infered: string
name: parse_data
arguments: label: D56
type_infered: string

tool: D27: fg

tool: D111: Invalid [%s]:%s color given.  Using default

tool: D3: textfilter

tool: D36: transparent

tool: D126: Invalid [%s]:%s color given.  Format should be: #RRGGBB, or 'transparent

tool: D32: %*c%2x%2x%2x

tool: D56: bg

assistant: ```c
int process_color(const char *color, int is_bg, char *secname, unsigned char *rint, unsigned char *gint, unsigned char *bint) {
  if (!color || !strlen(color)) {
    camserv_log("textfilter",
                "Invalid [%s]:%s color given.  "
                "Using default",
                secname, is_bg ? "bg" : "fg");
    if (is_bg) {
      *rint = (0x00ff0000 & 0x00000000) >> 16;
      *gint = (0x0000ff00 & 0x00000000) >> 8;
      *bint = (0x000000ff & 0x00000000) >> 0;
      return 0x00000000;
    } else {
      *rint = (0x00ff0000 & 0x00ffffff) >> 16;
      *gint = (0x0000ff00 & 0x00ffffff) >> 8;
      *bint = (0x000000ff & 0x00ffffff) >> 0;
      return 0x00ffffff;
    }
  }
  if (!strcmp(color, "transparent"))
    return 0xff000000;
  else {
    int rf, gf, bf;
    if (!valid_rgb_color(color)) {
      camserv_log("textfilter",
                  "Invalid [%s]:%s color given.  "
                  "Format should be: #RRGGBB, or 'transparent",
                  secname, is_bg ? "bg" : "fg");
      if (is_bg) {
        *rint = (0x00ff0000 & 0x00000000) >> 16;
        *gint = (0x0000ff00 & 0x00000000) >> 8;
        *bint = (0x000000ff & 0x00000000) >> 0;
        return 0x00000000;
      } else {
        *rint = (0x00ff0000 & 0x00ffffff) >> 16;
        *gint = (0x0000ff00 & 0x00ffffff) >> 8;
        *bint = (0x000000ff & 0x00ffffff) >> 0;
        return 0x00ffffff;
      }
    }
    sscanf(color, "%*c%2x%2x%2x", &rf, &gf, &bf);
    *rint = rf;
    *gint = gf;
    *bint = bf;
    return (*rint << 16) | (*gint << 8) | *bint;
  }
}
```